Formatting Questions
Ad
Formatted string in scanf() in C
Just like printf(), i was trying to use optional specifiers in scanf() format string. i tried to use the width and
How sscanf() splits a string in C
So basically i have a simple string and i am trying to use sscanf() to split this string and store the values in appropriate
Printing a variable number of arguments to a format string
Given a format string, a counter variable for the number of specifiers and an array of the strings to be inputted, how could this be printed?
Creating a format string with a variable number of specifiers
I am trying to use va_list & its associated macros with vsprintf() to create a format string that has a variable number of specifiers. here is
Failed to convert value of type 'java.lang.String' to required type 'java.util.Date' when sending GET request
I have this method in my controller (this is a kotlin method, but i think you can understand it): open fun getais(
Excel CSV - Number cell format
I produce a report as an csv file. when i try to open the file in excel, it makes an assumption about the data type based on the contents of the
How to format print function in Java to print equal width per different number?
Given these variables: int a = 1, b = 123, c = 55, d= 1231; is there a way in java to print them with a set width
Correct string formatting (or rounding)
Var rounded = math.round(value, 1); string prob = string.format("{0:p}", rounded);
How to find out about the accepted coding styles
Where to read up on (the best-practice in) source code formatting, for individual languages i.e. what are the conventions for naming variables
Is there a C# auto formatter that I can use to define custom rules for formatting?
My group has a source analysis tool that enforces certain styles that we have to comply with. i can't change it, and some of the rules are just a
Ad
Visual Studio 2005/2008: How can you share/force all developers to use the same formatting rules?
I would like to have all developers on my team to use the same rules for formatting several types of code (aspx, css, javascript, c#). can i have
Properly handling missing values and formatting for pandas data frame printed to tabulate
In the following scenario, i would like to: replace the missing values with a custom character, for example -
What does "%1$d" mean in a format string?
I can't figure out what this %1$d format specifier means. can someone help me? int zahl = 100;
Controlling the number of decimals in a mixed list printout (pprint.pformat, json.dumps)
I have a "mixed list" (here meaning, a list that may include lists, dicts, strings, ints or floats), and i would like to print it - that is,
Getting this error: warning: too many arguments for format [-Wformat-extra-args]
printf("\nenter matrix a\n", i + 1, j + 1); for (i = 0; i < r; ++i) for (j = 0; j < c; ++j) {
React input - cursor jump to the end
I'm using this package react-phone-number-input context i've this phone number field
Plotly: How to format text (underline, bold, italic)
I try to underline text in plotly when using annotations. i add my annotations using import plotly.graph_objects as go g =
How can I convert PascalCase string to a usable slug in Laravel 7 with PHP?
I currently have a variable with the value of "extraoption". i wonder if it is possible (with laravel helpers perhaps) convert this
How do I create a system with limited if statements?
I'm trying to make a program where three levers control a security access system. the user is asked, for each lever, whether they pull the lever
Horizonatal alignment with python print / write functions?
Often i need print lists, dictionaries etc. with nice horizontal alignment (something like tab in ms-word but not \t
Using multiple font sizes in Plotly chart title (Python)
I have a chart title which spans multiple lines using line breaks. i'd like to have everything after the first line in a smaller font
Ad
Format plain text to date
Goal write a script that does the following: get data from sheet modify column to flip names from [last, first] to
Style Property of TextSpan Widget in Flutter
I am working on a route that displays information about my flutter app. i've used richtext and textspan widgets in order to display inline
Python not all arguments converted during string formatting?
I've received following error when trying to execute script to copy specific file from remote server to jumphost and then to my local computer.
Flutter/dart formatting data to instances not working
So, i can receive the data and print it but it won't format correctly any more into a list. i have attached all the code below used to get the
In Javascript numbers with only double zeros in their decimal place lost their double zero when converted to String ? Why?
I am developing a web app in which i need to concat some numbers as string format one of the number need 00 at decimal place if it is
Zapier - Javascript wrong custom function behaviour
I defined a function numberformat in my zapier app i was expecting a result like 50 but actually i get 5000. any
Converting any numbers to same scale using Numeral JS
Currently when using numeral(1000000).format('0a') will return 1m, however is it possible to set a scale, for example
Reformat Strings in Javascript
How can i reformat this string 0 - 32 1994--245 to 032-199-42-45 i tried this
PHP: Ways to tidy up date time information?
A php/laravel program of mine collects time dates from an api endpoint, in a variable that i'll call $time. it's presented in the following
PHP Strip Zeros From String of Numbers
Currently, i have a sku that is a string that is ls181004. i want to convert that string to just 18104. however, i am having problems with strings
how to fix KeyError: 'w'. got it while doing string formatting in python
I am trying to print the decimal, octal, hex and binary representation of a given number with format : number = int(input()) w =
Ad
How to use cleave.js as a Formik field?
I'd like to use a cleave (see
flutter format not accepted by pub.dev
In the score tab of a flutter package on pub.dev, i get 10 points removed because of formatting. though, i did run flutter format .
How to force pythons format method to place values as they are evaluated
I need to figure out the accounting year based on a date, while i am using the format method with datetime.datetime object it is generating the
How to convert time format to a number format (Google Sheets/Data Studio)
I want to convert the numbers in cola to normal numbers, like the ones i have in colb. the one in cola currently are in this format: 00:56:00.000.
Flutter/Dart - Format double to String with thousand separators AND digits after decimal point
I am trying to achieve a formatted string from a double variable, which will include thousand separators (",") and will include always 2
How can I print the empty spaces with " | | " until the line ends
I am working with vectors and i wanna know how i can print the empty spaces in between until the line ends.
Conditional form rendering in react
So i am trying to render a form to start a new darts game conditionally depending on the game type selected. the form has a local state and
Conditional fill a value in Data frame based on ranges
I want to make groups according to age ranges in a data frame. i tried: df$agegroup <- ifelse(df$age >= 20 & df$age <=
ISO8601 Format are different in MongoDB and iOS
I want to post a date with ios8601 format from ios to nodejs(mongodb), and get from nodejs to ios. but the
How to bold text with **text** in String
I want to bold text in between of **. i have tried with following code but no success. it is creating whole text bold.
How do I set different font sizes to a string (that is highlighted, underlined) in a textview
I am displaying text in a textview without using tostring(), to keep the formatting(bold, underline, italics) within the text. but now i want to
Ad
I would like to format the inputfield in a Unity3D Android App
I´m facing some troubles, i made an easy app where the user needs to input a time into an input field. the time have to be in a hh:mm format, i
How can I split up a String in Dart and add dashes in between? (Flutter, Dart, Strings, Formatting)
I have these types of uids here: c4vtsvn3jfuxx9durorzj33uhfa2 and now i would like to receive this in my dart code
flutter nosuchmethoderror class string has no instance getter 'isnegative'
I am following a tutorial trying to create a horizontal singlechildscrollview which contains object with product description and
Format float with fixed amount of digits python
I would like to format my floats with a fixed amount of digits. right now i'm doing the following format="%6.6g"
How to pass a variable into a bash command in Python
I have a python script which selects a port at random and passes it to the bash command: #!/usr/bin/env python import random
Conditional formatting entire row pandas for excel
I'm fairly new to python and i can't figure this out : i'm trying to format a whole row based on a cell value. i have tried this code and
How to print each object of an array of objects in a new line in txt file using javascript?
My result set is an array of objects that returns from a function. [{brand:"toyota", model: "prius"}, {brand:"subaru",
Formatting exported excel file in laravel
I use the maatwebsite/excel package to produce excel files from database tables. the export is successful, but i need some help with formatting
How to reposition cursor while editing EditText field which is formatted like US currency- Android
I am formatting edit text field as per us currency format, where while typing number in a field, let's say "12345678" it appears like
Correct syntax to apply a method within render () using arrow function
I found this great method on stackoverflow to convert duration from ss into hh.mm.ss
How to fix string formatting in Python?
I just wrote a code, everything is okay, but the code doesn't work i restarted my machine and still doesn't work don't know why? here is an
Ad
Replace spaces in a list
I want to replace my_string my_string = '[[4.6, 4.3, 4.3], [8.75, 5.6, 6.6], [4.6, 4.3, 4.3]]' such that it
How to deal with commas for decimal AND thousand separator
Due to reasons that are not important here, i have an excel sheet where my numbers have commas for decimal points as well as thousands separators.
How to format all parameters of a function in one line in Visual Studio Code
My javascript code is formatted like this and i'm not comfortable with this : function( req, req.session, amount,
Creating a matrix with given row column,but have a output formatting problem
I have a question on creating an r*c matrix with given number of rows and columns. i wrote this which takes r number of rows and c number of
How can be string formatting method in python used for concatenating list elements
Var = [‘a’, ‘b’, ‘c’] sign = [‘=’, ‘:’, ‘=’] value = [‘100’, ‘200’, ‘300’] out =
Is there a way to print all values of a complex structure in hexadecimal format without loops, in python?
I sometimes have to print complex structures, such as list of tuples, say: lst = [(101, 102), (103, 104)] print(lst) [(101, 102),
format a 12 digit number in XXXX XXXX XXXX format using javascript
I have an input field in which the user types a 12 digit number and i need to show it in the format xxxx xxxx xxxx (sapce after every 4 digits).
How do I copy conditional rendering in Excel to multiple rows quickly?
I have an excel spreadsheet with the following data:
Geotools decimal places
I'm using geotools.js to convert os grid references into latitudes and longitudes. unfortunately the output is by default (i believe) restricted
Android multilanguage support: string formatting issue due to different placeholder counts
I'm making a french android app and i'm trying to support english. i use "placeholders" to format my strings, so i can adapt them to male
Conditional formatting of pandas DataFrame columns based on column header string
I want to highlight cells if they are greater than a value dependent on the column header. i want to 'read' the column header, if it is
Ad
Flutter NumberFormat format without changing language
I am trying to format the number according to selected currency without translating it. for example the
Formatting on save moves import statment in VS-Code
I am learning flask and building a app based on
Custom format string : arguments in double brackets java
I am working on android project but i retrieve from a server a .xml file with all localisations strings. i face a problem because
Python: How do I call a "container" in a new def function?
Answer3 is a name in a function's body and i want to use the object assigned to it in another function's body. is there a way to do
Numpy savetxt with mixed data
I have to save an array containing strings as the first columns and some integers/floating point numbers as the remaining columns. i have tried
How to print a list of dicts as an aligned table?
So after going through multiple questions regarding the alignment using format specifiers i still can't figure out why the numerical data gets
How can I rewrite the Google Sheet formula to make it autofill without hand dragging?
I have only given data a & b 2 columns and want to create column c to concatenate column a & b with autofill function. how can i rewrite
How can I format a local mobile phone number to a international one?
I am using the contact_service package for flutter to retrieve contacts from a device. but i noticed that when i look at the
unroll a tuple for print
I want to append the values of a tuple to a string. however i don't get it to work with slices... actually i only want the
display the user input text in color in the windows cmd
I have yet another question regarding my little console program for the windows cmd. i use colorama to color my text in the terminal which
Add leading zeros only if the number starts with 6 in R dataframe
I have a dataframe with numbers that i need to format. how do i add leading zeroes to only numbers that starts with 6? all examples seen using
Ad
How does an asterisk `*` work in the string formatting method `.format(*) ` in Python 3?
What is the use of * in .format(*)? when using it in the format function below
combining columns for a new date format in python
I'm new to python so any help or advice is very appreciated and sorry if i'm asking very obvious things. i'm having the following data :
matplotlib label formatting font changed
I use matplotlib to generate data analysis plots, which i then show to people at conferences, in publications etc. i normally store
How to round off to 2 decimal places with format SI prefix?
Example in my case: d3.format("~s")(656628); //656.628k but my expected result: 656.63k i would like
While loop does not stop when the condition is met
I want to stop this while loop when it prints "you smell funny trump!". the code does stop, but it does not stop at the right sentence, what did i
Laravel date_format Validation Fails on Textual Month
My javascript library
How to handle reformatting of nested function calls with multi line string arguments
We have set up automatic formatting of our python code base using oitnb, using the multi-line-unwrap option in the
Perform calculation in format string that is evaluated by legacy code
I am using a function foo (from an external package that i cannot modify) that accepts, fills out gaps in, and outputs a string. i
React manipulating NumberFormat format to work conditional
I am having trouble with manipulating the format from react's numberformat. i need it to turn out as format="(###)
A non well formed numeric value encountered After Formatted by number_format() function
I am using accessor for format my number value. problem start when i try to calculate the formatted value because number_format() function return
Javascript toString() strange behavior
I have a really strange output result from tostring() built in function here is my code: function strangefunction(num) {
Ad
ESLint error (Unexpected token ...) on JavaScript reduce to dictionary
I do have a javascript code snippet that iterates through an array of fields looking for specific properties and adding those to a dictionary.
Markov Analysis, Formatting
I have a program that reads in a big chunk of text from a text file and then randomizes the content to display back as a short story based on the
Formatting multiple lines in Python with method calls
What's the accepted style in python to format multiple lines of code that are method calls?
Format number when using Calculation Functions tabulator
Hi i am trying add some number format when sum column value in tabulator (format number for sum function in footer). and this is what i try
Currency getting differently formatted on iOS and android with same locale
I am working on an application using react native where i need to show currency in euro and in rupees as well. i am using javascript's
ndarray rows are not displayed each one per line
I have this code: import numpy as np m =
How to configure ESLint / Prettier formatting rules on "codesandbox.io"
On "codesandbox.io", how do i have to configure "prettier" not to change my line breaks any longer (or maybe to deactive
Format string exploit length
I'm new to software security and i'm studying it now at the university. i had some doubts about the format string exploit, in particular how to
Change WooCommerce price display
Please allow me to provide additional information and i hope this helps. targets: customize the shop page make
Is there a function in C language that enables me to split numeric output?
Is there a way i can split my output with a separator in c. for instance, i have processed a calculation, and the output is... 10000. is there a
Excel; Conditional formatting Date/Time between two columns
I have two columns, for example column a and b with the below style of set up. what i am wanting to do is to highlight both columns in a
Ad
How to format all numbers into millions in Ruby using NumberHelper
Ruby newbie here - i'm trying to any number (including thousands) into millions, and then rounded up to 2 decimal places, eg:
How to use format specifiers to set field width of a string?
Printf("%5s\n", "#"); gives: # is their a way to set field width of this string
Ad
Blog Categories
Ad