As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [formatting]

The process of transforming text or data for presentation. A typical example would be the transformation of a decimal into a particular currency format with the correct number of decimal places.

Filter by
Sorted by
Tagged with
1 vote
1 answer
17 views

Django formatting DecimalField to money

In my Django project I'm saving a money amount in a decimalField. The problem is the format of the number when I print it. I need it in the german money format 10.000,00 € so first a point as ...
FLYAX's user avatar
  • 99
0 votes
4 answers
39 views

Join 2D string array more elegantly

I have a list of argument and value pairs, that I want to join into the format -arg0=val0 -arg1=val1 ... -argN=valN The following code works but it feels a bit clumsy and I suspect it can be written ...
infinitezero's user avatar
  • 1,500
0 votes
0 answers
14 views

How do I format specific columns (e.g., as a percentage or to a number of dp) in a MultiIndex column pandas data frame (in Jupyter Notebook)

I am trying to format columns in a MultiIndex data frame in Jupyter Notebook. In the photo, I want to format all the Z-score columns to 1 d.p. and all the Pctile columns as percentages to 1 d.p. ...
ArthurW's user avatar
-1 votes
0 answers
8 views

WebStorm / JetBrains IDEs - Reformat Code for directory

I am using WebStorm IDE and I want to format the code for all files in the selected folder and subfolders in the set formatting style. All files are .xml files. When I select the folder and use the ...
Tobias's user avatar
  • 19
0 votes
0 answers
8 views

Why is google forms changing my text formating and how do I stop it

I have created a form and it looks good in creation but when I send a link to myself to go look how it would look for a customer filling out the form the text is all messed up on some of the title ...
Jeremy Frank's user avatar
-1 votes
0 answers
13 views

What does a good code documentation look like? [closed]

In the past I've made some backend and frontend projects and put them on github. I want the interviewers to look at my projects on github, but I've been struggling with making a good documentation. ...
ikiwq's user avatar
  • 15
-1 votes
2 answers
46 views

Retaining Formatting with UNION Query - Modifying UNION Values with CASE [closed]

CONTEXT: I have the Following Tables; LABORATORES [LabID (AUTONUMBER), LabName (VARCHAR-255)] STORAGES [StoreID (AUTONUMBER), StoreName (VARCHAR-255)] In LabID, it is Formatted to Prefix 'L' ...
Genious28's user avatar
0 votes
1 answer
22 views

Can ggplot format points with '<' values on-the-fly or do I need a separate data column?

How can I handle LOQ values in ggplot? I would like to use the original data: Parameter Concentration Fe <2 Fe 12 Fe 7 and just mark the <-values in some way, either with a "<" ...
Martin Liungman's user avatar
0 votes
0 answers
17 views

Preventing merge conflicts with a `black` formatted local branch and non-formatted upstream branch

There is a Python package that I have cloned. I've set the parent Python package to be the upstream branch so that I can keep my version up-to-date with any changes to the parent code. However, I'd ...
Andrew Rosen's user avatar
1 vote
1 answer
43 views
+50

Format specific authors with Bold font in bibliography created with Quarto

I've put together a webpage for my research group using quarto - we have a page listing the lab's publications I've adapted a .csl file to fit most of my formatting needs (eg. listing chronologically ...
June Skeeter's user avatar
  • 1,130
0 votes
0 answers
8 views

Format the fields in the formulas

It will not allow you to format the fields in the formulas. Simply {mb.mb-num}& "-" &{ln.ln-num} provides 1000.00-10.00 numbers, but I need the .00 removed from both numbers. I have ...
user22009025's user avatar
1 vote
1 answer
35 views

SAXParseException: output_pdml.xml:1089:0: not well-formed (invalid token), while parsing pcap log using xml sax parser in python languge

I am seeing "SAXParseException: output_pdml.xml:1089:0: not well-formed (invalid token)" error message while parsing pcap log in PDML .xml file format. Actual root cause of this failure is ...
chandra's user avatar
  • 11
0 votes
0 answers
5 views

Adding time to VBA macro returns different date format despite range formatting

Vba swaps date and month despite formatting when entering using 'Date'-function What I'm trying to do I am trying to return todays date and a specific time in a cell. Let's say today is 01/06/2023. I'...
I.B's user avatar
  • 11
0 votes
1 answer
28 views

How can I resize a Google Play Store badge to match an Apple App Store badge size of 200x83px?

Working on a website and I'm looking to resize a badge that's linked to the google play store. The code I'm using is: <a href='https://play.google.com/store/apps/details?id=com.coachcare....
Doug K's user avatar
  • 1
0 votes
0 answers
31 views

how to ignore the assignment intendation in any python formatter (black, yapf, autopep8)

i would like my code to look like following: short = value long_name = value very_long_name = value instead all python formatter give the following result: short = value long_name = ...
pimem31108's user avatar
-1 votes
0 answers
21 views

Get RGB from Excel color conditional formatting

I used Excel's conditional formatting function to convert numeric scores to colors but I need to find out the RGB of the colors. I tried looking it up through the Format Cell - Color but the color of ...
frankieR's user avatar
-1 votes
0 answers
12 views

Error -69830 when erasing/formatting an SD card on MacBook [closed]

I want to erase an SD card on MacBook. However, I always meet error -69830. This is what I ran in the terminal: $diskutil list .... .... /dev/disk2 (external, physical): #: ...
gudiandian's user avatar
0 votes
2 answers
52 views

In Rust, 'for loops' can print all the values in a Rust range, but {:?} does not print all the values in a range

I tried creating a range with let myvar =1..5;, and then printing it out with both the {:?} formatter and a for loop. If I understand correctly, ranges are iterators in Rust, if {:?} can be used to ...
Anon Anon's user avatar
1 vote
1 answer
25 views

How do I configure prettier to behave in a specific way for Vue.js template syntax?

I want to customize a specific behavior in Prettier. I'm wondering if there's a quick way to implement below solution without having to write my own parser. My .prettierrc.js: module.exports = { $...
passionateLearner's user avatar
0 votes
1 answer
91 views

difficult python parsing and data formation

I am getting the data from server as follows dataProducer00 ==>  Collected:      37402  Answer (MQ):       6234  Text/s:    12467   Text/s[3s]:    12467  lined:       0/75     liveData:   n/a    ...
Juliana Ashok's user avatar
0 votes
2 answers
28 views

Print ufloat variable name and value, not representation

There is a useful recent feature in python allowing one to print a variable's name and its value: https://stackoverflow.com/a/57225950/6843348. This doesn't quite work with the uncertainties library'...
Mister Mak's user avatar
0 votes
0 answers
8 views

Problem with JS/JSX Code Auto-formatting Using Prettier in VSCode

I am experiencing an issue with the auto-formatting of my JS/JSX code in VSCode. I'm using the Prettier extension. I want to format the following code snippets: { id: 'e1', title: 'Toilet Paper', ...
shashah's user avatar
  • 11
0 votes
0 answers
30 views

Is there a way to use dbt-formatter to automatically reformat all my sql scripts in VS Code?

I'm using dbt as a dwh managing tool and want to reformat all the sql scripts using one style in VS Code. The only working solution I've managed to find is dbt-formatter extension but I have to ...
Babatunde's user avatar
0 votes
0 answers
28 views

Numerical label with certain number of digits (regular expressions in Bash)

In a bash script, I have a numerical variable that I will use as a label to address a file. For instance: label=23 filename=file.$label.txt But there is a convention that the label has a constant ...
freude's user avatar
  • 3,592
-2 votes
0 answers
27 views

How to format numbers in Vue to display thousands and decimals without losing sorting capability?

I am working on Vue and I have the following: created() { . . . this.tableItems = filterData(this.config.sources, filters); console.log(this.tableItems); . . . > }); > } > ...
mayerga's user avatar
  • 17
0 votes
1 answer
13 views

Is there a way to prevent Prettier in VS Code from adding excessive lines when formatting HTML?

When I'm formatting code with Prettier on, it wraps the text which I do want to happen, but it creates more lines of code. This is how I want it to be: But when I save with Prettier, it creates a lot ...
leandrobvs's user avatar
-1 votes
1 answer
13 views

How to downplay non-essentials in HTML file from Microsoft Steps Recorder? to let others focus on essential info

Microsoft Community Expert advises following I save and download as a .mht or html file from Steps Recorder app and open it with Microsoft Edge. Click "Control" + "U" on the ...
panes-rubrics's user avatar
1 vote
1 answer
51 views

How to convert an IMPORTRANGE() array to a string, for use with QUERY()?

I have the same problem which is discussed here, except that I am working with IMPORTRANGE() instead of a direct array reference (e.g., D12:I119). Somehow I need QUERY() to understand its input as an ...
Doubt's user avatar
  • 1,115
0 votes
2 answers
54 views

Formatting an email to start a new line

I produced Word VBA code to send an email with an attachment. It works, apart from the vbNewLine command. When the email arrives in the inbox the complete message is on one line. Sub ...
Chris's user avatar
  • 1
0 votes
2 answers
41 views

How to format numeric values with separators starting at 1,000 instead of 10,000 using Intl.NumberFormat?

I have the following function: formatNumericValues() { const numberFormat = new Intl.NumberFormat('es', { minimumFractionDigits: 0, maximumFractionDigits: 2, }); this....
Manuel Yerbes's user avatar
0 votes
1 answer
12 views

How to add tslint-disable and prettier-ignore both for a single line

How can I disable tslint/eslint and ignore the prettier for a single line, both rules at the same line? I want to align all the properties of the object using vscode plugin but prettier reformats it ...
Suhail Akhtar's user avatar
0 votes
0 answers
29 views

How to format logging for the python http.server

Using the python http.server (see https://docs.python.org/3/library/http.server.html), I am running this as a systemd service. In order to get the output of the server, I define StandardOutputand ...
Lonerider's user avatar
0 votes
0 answers
33 views

Left aligning long y ticklabels [duplicate]

I have a heatmap with long y tick labels. I would like to align them all to the left. Here is a picture of what I have: Here is the image of how I would like it to be: I found this page, which does ...
Gustavo Amarante's user avatar
0 votes
3 answers
48 views

VBA extract percentage number

I need to extract the percentage number from cell A1. The content in the cell varies, it could be "20% (Less applicable fees and taxes)", or pure number like 90%, or 100%. I will later use ...
qiao's user avatar
  • 115
-1 votes
0 answers
43 views

Using DateTimeFormatter examples from the documentation but getting exception when converting string to ZonedDateTime

What I am trying to do is parse a string to ZonedDateTime. Since I have several possible formats I tried using DateTimeFormatterBuilder like: new DateTimeFormatterBuilder() .append(...
TenebrisNocte's user avatar
0 votes
0 answers
48 views

How does one conditionally format a cell based on another cell's value in excel?

I have been searching high and low for a formula that will help me highlight a cell if the cell next to it contains a date. For example: If cell M2 contains a date, then I want cell L2 to be ...
llamagirl's user avatar
0 votes
1 answer
26 views

**gt** will not format column labels in Word output

Example (gt 0.9.0, R 4.3.0): column labels for gt table should be bold, but are not. library(gt) res <- gt(mtcars) %>% tab_style(locations = cells_column_labels(), style = cell_text(weight = &...
cgmil's user avatar
  • 411
0 votes
1 answer
14 views

How can I use ktfmtFormat to format project's existing kotlin files?

My project files have different formatting of kotlin and I want to use ktfmtFormat gradle plugin on Android Studio on windows. What is a command-line script to apply the formatting to all kotlin files?...
Kaleab Woldemariam's user avatar
0 votes
2 answers
37 views

Google Sheets Hightlight Top 10 Values AND Ignore Blank Cells

I have been trying to figure out a conditional format rule that will highlight the top 5 values (The values are prices e.g. "$12,000.00") in a column. There are also blank cells throughout ...
Henry Mangelsdorf's user avatar
0 votes
1 answer
20 views

vb.net winforms, what is the e.handled = true equivalent for anything to do with column headers in a dgv?

I have a dgv that is populated with formatted data(backcolor). Ss soon as a user clicks on one of the headercells to re-order the rows all the formatting disappears. How can I set the headercells to ...
SvenLie's user avatar
  • 21
0 votes
1 answer
43 views

Stop VBA simplifying a fraction and keep the format

I'm trying to use VBA to put together two numbers with a "/" between them and a leading zero but it keeps simplifying the fraction rather than keeping the format I have set. Sub ...
karlfranz's user avatar
2 votes
2 answers
60 views

Removing empty lines in Google Docs

I have some text in google docs. • line 1• line 2• line 3 I would like to find an automated way to make this text line 1 line 2 line 3 (with no empty lines between each bullet) I used google apps ...
bryanvernon's user avatar
0 votes
1 answer
35 views

In Python, is there a max length float to string formatting parameter?

I have a program that prints matrices in the console which means I want the spacing for each matrix entry to be the same, regardless of how big the number is, positive or negative. I want numbers that ...
User's user avatar
  • 121
0 votes
0 answers
27 views

How can I add a custom code formatter to VScode?

I have a formatter with the signature def align_assignment_expressions(code: str) -> str: which takes some python code as a string and returns a formatted version. How can I use this as a ...
Joe Boyle's user avatar
  • 169
-2 votes
0 answers
25 views

Why does CodePen.io add newlines to my arrays (see image) and how do I make it stop?

I have a reduce function in CodePen https://codepen.io/MaxRocket/pen/Baqxpvo to get all the possible subsets of an array: const getSubsets = (orgArray) => orgArray.reduce( (accumulator, ...
MaxRocket's user avatar
  • 917
-1 votes
2 answers
53 views

What is the feature that lets you "minimize" text in an IDE like VS Code called?

I've simply been wondering what to call it. Also, does anyone know any extensions for VS Code that would let make custom ones, not simply the automade ones. While true and dropdown arrow I've kept ...
that one kid's user avatar
0 votes
0 answers
32 views

Using a Custom Attribute to assign a formatted value to a property C#

I want to build a custom attribute to format a variable in a model. I have a model: public class invoiceModel { public int id { get; set; } public DateTime dateDue { get; set; } ...
Jonny's user avatar
  • 65
0 votes
0 answers
30 views

VSTACK in Excel: cell format linked to exact cell position, not data

I created a master sheet using vstack function which collect data from several other sheets. However, when I mark certain data with color fill or text color in master sheets, an unwanted effect seen: ...
Pavel Nesmiyanov's user avatar
0 votes
1 answer
27 views

Issues with formula not outputting the correct/desire date. My weeks start on Saturdays and finish on Fridays

Using a formula, I would like to determine the next following Friday from a given date. I have an issue where Saturdays (all) are being given an output of the previous Fridays, for instance: Column A ...
JD Farina's user avatar
0 votes
1 answer
30 views

Numbers won't feed in to Sodoku layout properly

I'm trying to set this in Python. I think that I am close but not quite sure where to go with it. I want each section of list to fill in each row of Sudoku layout, but I can only get it to fill in the ...
KrugerSigma's user avatar

1
2 3 4 5
271