FAQ Database Discussion Community

## Is it possible to format a Textbox for currency just in ASP NET?

asp.net,textbox,formatting,currency
I have this textbox that should show currency values to 2 decimal numbers. I would like to do using the "Text" property of textboxes. Is that possible? <asp:TextBox ID="txtImponibile" runat="server" Width="120px" Enabled="False" ></asp:TextBox> Thanks....

## How to make string paragraph easier to read for source code

powershell,formatting

## How do I pass an HTML document to CodeMirror as a start value?

javascript,html,xml,formatting,codemirror

## Printing a dictionary without newlines?

python,dictionary,file-io,printing,formatting
I'm trying to get the formatting right on my print-out and it's trickier than it should be. My objective is to have my code read in a dictionary, turn it to a list, sort it, then print it back out a text file looking like "String" "Float" "String" "Float" "String"...

## SSRS Average Time in Minutes and then Format to HH MM

sql,stored-procedures,reporting-services,formatting
I've seen a lot of questions about average time in SSRS but I'm pretty new to this and none of these questions address my specific need so any help would be appreciated. I have a duration field (Fields!Duration1.Value) which is pulling in a duration in minutes (example: 170). In my...

## Override Conditional Formatting with Worksheet_SelectionChange

excel,vba,events,formatting
I have some code in a worksheet to highlight the row of a selected cell. However, this sheet has conditional formatting which colours some of the rows. The highlighting macro does not work on the rows where the formatting condition is being met (in the sense that the colour of...

Is there a existing Haskell function which provide an engineering notation formatting (as String)? If not, I read that printf can be extended by adding an instance to PrintfArg. Do you believe this is a good solution ? By engineering notation, I mean an exponent notation whose exponent is a...

## Change font color for a row when the value is one specific value

formatting,ssrs-2008,bids
I'm trying to change the font color on complete row when a value. I found the question and answer for changing the font color on a particular cell on another post here. This was part of the other answer: =IIF(Fields!Registrations.Value <> Previous(Fields!Registrations.Value), "Black", "Blue") but it won't do what I...

I can't seem to find out how to format my javadoc to show to show up with links to String rather than the whole path. I've gone through several different guides with no luck. I was hoping to make it look more in line with how documents at oracle look....

## Reformatting Dictionary output in python

python,csv,formatting,ordereddictionary
I have an OrderedDict and I've exported it to a csv but I want it to be formatted differently. My code for reading, sorting, and making the dictionary: from collections import defaultdict, OrderedDict counts = defaultdict(lambda: {"User": 0, "Equipment": 0, "Neither": 0}) with open('sorterexample.csv', 'rb') as fh: reader = csv.reader(fh,...

## How to serialize a custom formatted time to/from xml in Go?

xml,go,formatting,date-formatting
When serializing a datetime to/from xml how do I make it use a custom time format?

## Excel - Conditional Formatting using time arguments

excel,date,formatting,formula,conditional-statements
Looking to change the fill of a cell based upon the amount of time between the current date (TODAY), an entered value detailing when something was done historically and a set period from that historical date of either 6months or 1year. E.g. I have a date of 12/04/2015 entered as...

## How to convert html code to a string that replaces the newlines with \n and tabs with \t

javascript,html,string,formatting,markup
Is there an easy way to convert HTML code, that is structured in a certain way, to a single string (that can then be used in a Javascript variable). The new lines and tabs in the html code need to be converted to \n and \t so that the formatting...

## Excel formatting with Java Apache POI

java,excel,formatting,apache-poi
I have an excel file in the following format: I would like to restructure this format and have it outputted in the following format: The sections are repeating and can appear in any order but they will have either format. The 'Check' column is sometimes merged across rows as shown...

## How to write a large amount of columns in a formatted file

formatting,fortran,fortran90
I'm trying to write a code in fortran90 that allows me to create lets say 20 columns (f10.6) with one space between them in to the "output file". When I try to create file just with the 4 columns it works, but when I try to format a file with...

## Specifying styles for portions of a PyYAML dump (II): sequences

python,formatting,yaml
This is a follow up question to Specifying styles for portions of a PyYAML dump: Consider following code contaning as input manually formatted YAML data. I am modifying the YAML data, but would like to keep edges on single lines in the written YAML file. import yaml st2 = yaml.load("""...

## Copying lines from text file- remove formatting- Python

python,file,formatting,format
I am attempting to read text from a file, then print out the corresponding Shakespearean sonnet off of input from a user. [if the user enters 1, print sonnet 1, etc.]. The code I have below functions, however, I would like the answers to be without all the formatting 'def...

## Google Sheets - propagate column date formatting to new rows

The date format in the column is not propagating to new rows, whenever new rows are being added to the bottom of the sheet. The column formatting is not automatically applied - this in regards to date, currency format, alignment etc.

## How to dynamically set currency symbol in Excel custom format?

excel,formatting,format
The figures in my spreadsheet use the following custom formatting: €#,###.##,, "M" So figures are expressed in millions with 2 decimal places prefixed by the euro symbol and followed by M for millions. My workbook will need to be converted to other currencies and I don't want to have to...

## How to set font-weight of a column text to bold based on another column value in Telerik Grid

telerik,formatting,conditional,client-templates
I have a Telerik grid in which based on whether my IsTrue value is true or false, I need to set the font-weight of Name text in only that particular row to bold. I tried the following but I seem to be missing something. columns.Bound(d => d.IsTrue).Width(0).HtmlAttributes(new { id="hdnIsTrue", style...

## Use formatting tags in XML

html,xml,xslt,tags,formatting
Below is the source code for XML and XSLT file, the output that I am getting is "Bold Text Italics Text" the bold and italics formatting tags are ignored. How can I adjust this code to make sure ALL tags are applied and my output text is in bold/italic? XML...

## Formatting long-form survey data in R

r,table,formatting,reshape,long-form
We asked 3 people two or three yes-no questions. Let me denote these 3 people by 101,102,103 the questions by "A", "B","C" and the responses by 0, 1. The result is q<-data.frame(response=c(0,0,1,0,0,1,1), qstn=c("A","B","A","B","A","B","C"), person=c(101,101,102,102,103,103,103)) We need to convert this table to the following format person|qustionA|questionB|questionC 101 | 0 | 0...

## How can you use a variable name inside a Python format specifier

python,formatting
Is it possible to use a variable inside of a Python string formatting specifier? I have tried: display_width = 50 print('\n{:^display_width}'.format('some text here')) but get a ValueError: Invalid format specifier. I have also tried display_width = str(50) however, just entering print('\n{:^50}'.format('some text here')) works just fine....

## Show Results' line numbers using grep

linux,bash,grep,formatting,line
how i can show the result of my grep command with incremental numbers before them , i'm not talking about using -n or -nr to show where is my string located in that files. i'm talking about something like this : grep foo *.* result should be like this :...

## Auto insert a standard comment header for every “newly generated java file” in eclipse

java,eclipse,formatting
I want to add some default text to every newly generated java file, so that I don't have to add it manually every time. I've set the below configuration in eclipse: But when I create a new java file, the default comment I found is blank, like this: /** *...