All Questions
Tagged with formatting format
350 questions
1
vote
1
answer
79
views
how to format all single action methods into a lambda expression methods when saving a file?
my method
public void Method()
{
OneAction;
}
need format in
Method() => OneAction;
0
votes
0
answers
50
views
Add support for custom html void tags to vscode.html-language-features
I gave up on prettier for formatting html because if insists on closing all void tags.
It just produces invalid html and pretends like it's fixing it.
Browsers have traditionally been ignoring this ...
1
vote
1
answer
89
views
Excel/Vba How to conditionally change the number format of ALL workbook cells with numbers in them, based on their number values?
I think this is a unique question which I need help with.
This code does NOT work but I hope there is a syntax that would work and I would also need to know where to put it.
In which event and at what ...
0
votes
1
answer
72
views
Formatting in Millions - MS Access
I'm trying to format a figure in an access form to read in millions but retain the 0. in how it displays.
Using the formatting: #,###,,.0 makes my figure of 200,000 read as .2 which is great.... But I ...
0
votes
2
answers
86
views
How to format an array of numbers into a string in C#?
The method String.Format has the following overload:
public static string Format (string format, params object?[] args);
which I supposed was meant for formatting many args of the same type into a ...
0
votes
1
answer
47
views
(JavaScript) How to split a paragraph string into lines without - str.split(/\r\n|\r|\n/g);
My program is supposed to take in a string and split it into an array of diffrent lines.The format of the string is shown bellow (it has no explicit \n, just a new line created through the enter key). ...
0
votes
0
answers
39
views
What is the default datatype for the emotions dataset (one of huggingface's site dataset)?
I'm working with the emotions dataset from HuggingFace library.
I know I can switch its presentation format to pandas by doing:
emotions.set_format(type='pandas')
And I can switch it back to its ...
1
vote
0
answers
83
views
Only format IntelliJ on manually save, with autosave enabled
I am coming from VSCode, where it autosaves files, but do not format them until you manually save it.
In IntelliJ I have set autosave for 1 second (the minimum), and I had reformat code on save ...
0
votes
0
answers
82
views
printf("%d", x) alters value of %d when spaces are added to the formatted string? [duplicate]
Consider this very simple lines of code:
#include <stdio.h>
#include <stdlib.h>
typedef int board[8][8];
board * initBoard(void)
{
board * b = malloc(sizeof(board));
if (!b) { ...
0
votes
1
answer
68
views
Format JavaScript vscode code to be like java in eclipse
I have code formatted like this
subRedirect() {
let features = this.config.get('features')
if (features !== null) {
features.forEach(feature => {
...
-1
votes
1
answer
570
views
Download base64 encoded zip file I receive from server
I'm receiving a base64 encoded zip file from the server,and I have to save it.
When I first receive the string it looks like this:
After that, if I atob(content), it looks like this:
Minimal ...
0
votes
1
answer
438
views
How can I add line breaks in between code outputs in a MatLab live script?
I have this code in a live script cell:
u = symunit;
syms V_GS
V_t_value = 0.4*u.V;
K_n_W_L_value = 2*u.mA/u.V^2;
%get V_GS
i_d_equation_saturation = 0.5*K_n_W_L_value*(V_GS - V_t_value)^2;
assume(...
1
vote
1
answer
1k
views
How to use .formatted(.percent) with a specified precision? (FormatStyle protocol)
I want to convert a progress view's Double value ranging from 0 to 1 into a formatted String with a selected amount of fraction digits, e.g. 0.789123456 to "79,1 %".
Added challenge: I want ...
1
vote
1
answer
3k
views
What JSON formatter does Visual Studio Code use to format JSON?
Visual Studio Code has built-in JSON tools, including a formatter: https://code.visualstudio.com/docs/languages/json#_formatting
What underlying JSON formatter does Visual Studio Code use?
Is it ...
0
votes
0
answers
2k
views
Format code block or code lines in ChatGPT
Is it possible to format a code block or a code line in chatgpt like he does? I asked him and it tells me to do it with 3 backticks at the beginning and at the end but it doesnt work
Here's what i ...