formatting

Conditional Formatting for background color and text based another cell value

Hello, I want to be able to test the value in cell $A$3 and determine if it has the text "YES" entered. IF $A$3 is "YES" then the cell $D$3 background should be set to a color and the text for cell $D$3 should say "NA". I've tried using the following for Microsoft Excel 2003, but does not work. Any guidance would be appreciated. Thank...

Correct formatting of numbers with errors (C++)

I have three sets of numbers, a measurement (which is in the range 0-1 inclusive) two errors (positive and negative. These numbers should be displayed consistently to the number of significant figures, rounded up, which corresponds to the first non-zero entry in either of the number. This requirement is skipped on the measurement if it...

dynamic string formatting using string.format and List<T>.Count()

I have to print out some PDFs for a project at work. Is there way to provide dynamic padding, IE. not using a code hard-coded in the format string. But instead based on the count of a List. Ex. If my list is 1000 elements long, I want to have this: Part_0001_Filename.pdf... Part_1000_Filename.pdf And if my list is say 500 elements ...

Visual Studio 2003 Removing Width & Height Attributes

Hi, I have a really anoying thing with Visual Studio 2003. If i create an textbox server control on my page and manually set the width & height attributes via the style tag (not the width & height attributes), when i flick to designer mode and then back to HTML mode those attributes from the STYLE tag have dissapeared! If there were any...

What does a hash/pound (#) represent in a format string?

I have some code to format a file size string: NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init]; [numberFormatter setPositiveFormat: @"#,##0.## bytes"]; Is the @"#,##0.## bytes" the same kind of format string as I'd use in stringWithFormat? What do the hash/pound symbols mean here? Thanks! ...

Crystal Reports DateTime Formatting

Hello, I'd like to format a datetime in Crystal Reports to a include the day of week. From: 19/06/2009 To: Friday, June 19, 2009 Thanks, ...

C#: is calling an event handler explicitly really "a good thing to do"?

This question is related to C#, but may be applicable to other languages as well. I have a reservation against using code such as the following: using System.Windows.Forms; class MyForm : Form { private Timer myTimer; private Button myButton; public MyForm() { // Initialize the components, etc. myTimer...

Reformat C++ braces without changing indentation?

We would like to make our C++ brace style more consistent. Right now, our code contains a mix of: if (cond) { // ... } else { // ... } ...and: if (cond) { // ... } else { // ... } We want to use the latter style exclusively. However, we don't want to change the indentation of our code. I've tried using astyle,...

Format (make bold or italics) a portion of a Textbox or Formula object in Crystal Reports

I am trying to format (bold or italics) only a portion of a textbox or Formula object (IFieldObject) in Crystal Reports for Visual Studio 2008. I know how to make the entire field bold, but I want only a portion. For example: ...blah blah blah May 12, 2009 blah blah blah... Is this possible? I'm thinking there must be some sort o...

Format .NET DateTime "Day" with no leading zero

For the following code, I would expect result to equal 2, because the MSDN states that 'd' "Represents the day of the month as a number from 1 through 31. A single-digit day is formatted without a leading zero.". DateTime myDate = new DateTime( 2009, 6, 4 ); string result = myDate.ToString( "d" ); However, result is actually equal to...

Controlling VS auto-Code formatting

I like single line styles in my content pages...like this .lblLogin {left:14px;top:95px;position:absolute} .lblPassword {left:14px;top:128px;position:absolute} When I drop a new control on a page VS creates generic style classes .Style1, .Style2, etc., after renaming them and making them single line, if I move a control on th...

Auto-formatting a source file in emacs

How do I apply a set of formatting rules to an existing source file in emacs? Specifically I have an assembly (*.s) file, but I would like a generic command for all types of files. I am trying to use M-x c-set-style with gnu style, but I am getting an error: Buffer *.s is not a CC Mode buffer (c-set-style) ...

right align/pad numbers in bash

What's the best way to pad numbers when printing output in bash, such that the numbers are right aligned down the screen. So this: 00364.txt with 28 words in 0m0.927s 00366.txt with 105 words in 0m2.422s 00367.txt with 168 words in 0m3.292s 00368.txt with 1515 words in 0m27.238 Should be printed like this: 00364.txt with 28 words...

is there a way to format actionscript in flashdevelop?

is there a way to format/beautify actionscript (as3) in flashdevelop? if not are there easy ways to do this without using the Flash IDE. Thanks, Josh ...

Reporting Services, Custom Percent Format

I have some fields I currently populate with a P0. The results is like this: 2,434% I want however something like this: 2434% How do I do this? ...

Oracle 'printf' equivalent

Is there an equivalent or alternative to the following? SELECT mix_type || ' (' || mix_num || ')' as description FROM acid_batch WHERE mix_num < 10 Does Oracle have something like printf style formatting? SELECT printf("%s (%s)", mix_type, mix_num) as description, FROM acid_batch WHERE mix_num < 10 ...

MySQL - Convert Number to English Representation

Is there a particularly easy way to convert a number like "21.08" into "Twenty One and 08/100" using MySQL? I know in Oracle there was a trick you could use that involved working with Julian dates. It would get the job done in a line or so but it doesn't appear to work in MySQL (since it doesn't support Julian dates). It's not a parti...

How can I display an array in a human readable format?

If I have an array that looks like this: $str = ''; if( $_POST['first'] ) $str = $_POST['first']; if( $_POST['second'] ) $str .= ($str != '' ? ',' : '') . $_POST['second']; if( $_POST['third'] ) $str .= ($str != '' ? ',' : '') . $_POST['third']; if( $_POST['fourth'] ) $str .= ($str != '' ? ',' : '') . $_POST['second']; $...

Displaying information from MATLAB without a line feed

Is there any way to output/display information from a MATLAB program without an ending line feed? My MATLAB program outputs a number a bit now and then. Between outputting the number the program does a lot of other stuff. This is a construct mainly to indicate some kind of progress and it would be nice not to have a line feed each time,...

HTML, CSS, Javascript - Problem with hiding/showing elements

I'm using the Blueprint CSS grid for my HTML page. I have a table which I want to show/hide - linking it to a button, using jQuery. The problem is that everytime I click on the button to show/hide the table, everything on the page shifts slightly left-right. Is this a common problem? Does anyone know what could be causing this and what ...