formatting

WPF RichTextBox - Formatting of typed text

I am applying formatting to selected tokens in a WPF RichTextBox. To do this I get a TextRange that encompasses the token that I would like to highlight. I will then change the color of the text like this: // Get start and end pointer for token TextPointer startPointer = run.ContentStart.GetPositionAtOffset(startOffset); TextPointer end...

Change a name field from LAST FIRST ordered to FIRST LAST ordered.

I have an excel spreadsheet with about 700 entries. The names are listed as "DOE JOHN" (no comma separating the names). I need to format them so they read JOHN DOE. 1.) I would like to learn how to do this in excel. 2.) I would like to learn how to do this in linux. Thanks! ...

Selecting multiple columns and rows for formatting - Excel

I have a report which I used the command subtotals. Aesthetically, I just want to make these subtotal rows (columns A to P) filled with color, be in Bold and have a surrounding border. There are hundreds of totals generated in my report. And they do not have a recurring row position. So basically in order for it to look good, I do it man...

How to change direction of Text in Xcode?

Hi all, I want to type in Arabic in Xcode. But I can't copy paste in the Xcode properly in right to left direction. Please help me out. Thanks in advance. ...

Forcing positive sign on double in .Net String.Format

Context: .Net, C# I want to print a complex number made from two doubles. The sign needs to show on the imaginary part. I'd like to use the default double formatting for each part to minimize the number of characters. I tried using String.Format("{0:+G;-G}{1:+G;-G}j", real, imaginary) but this ended up printing: "+G-Gj". Not quit...

C# Formatting Currency

I am seeing an intriguing situation rounding Currency in C# (VS 2008 SP1). Below is an image of the test cases: I was expecting cases five, six, and seven (my bad on not numbering them in the output) to round the number up to a penny. Here is my test code: static void Main(string[] args) { decimal one = 10.994m; decimal two...

Filler dots for Table of Contents in Reporting Services

Does anyone have a slick way of adding filler dots to a table of contents page in RS? This would not be a problem were it using proportional fonts. e.g. Monkey.........5 House..........1 Tree...........11 Underpants.....2 Obviously the example above sucks as the font is proportional ...

How should I properly format this code?

Hi, I've a small issue here. I am using an if statement with UIAlertView and I have two situations, both result in UIAlertViews. However, in one situation, I want to dismiss just the UIAlertView, the other, I want the UIAlertView to be dismissed and view to return to root view. This code describes is: if([serverOutput isEqualToString:@...

Pretty Printer for T-SQL?

I'm looking for a good T-SQL Pretty Printer so that all the code looks consistent between developers in our project. Preferably a free/open source one, but paid for isn't out of the realms of possibility as long as it's reasonably priced. Are there any particular industry leaders? I'm not that fussed about what particular standard it ...

Get table row count outside scope of table in SSRS 2008

I can count the rows in the dataset that the table consumes, but this doesn't return the right value as the data in the table is grouped. I need to know the table size in order to dynamically size a chart that appears along side the table. CountRows is obviously no good as you have to be in the scope of the table, which I'm not. Any i...

Sharepoint xsl ddwrt FormatDateTime issue

I use the ddwrt:FormatDateTime function to format the output like yyyyMMdd. inputs like 01/01/2010 work fine but when the day gets over the number 12 the output is an emtpy string. ddwrt:FormatDate(string(@myDate), 1033, 'yyyyMMdd') At first I thought it could be a language specific problem but even none of those combinations work: 1...

JQuery/JS Markdown plugin?

I'm writing a chat app, and I'd like to add some simple functionality where users use markup to affect text formatting, like bold or italics. I'm envisioning this would be like how it is done on Google Talk or StackOverflow. Does JQuery have any plugins to do this? ...

When using Doxygen for C++ sources a size of font for \subsubsection is larger than for \section and \subsection

I installed Doxygen 1.6.1. I used \section, \subsection and \subsubsection for titles in C++ sources. I surprisingly obtained titles in which \subsubsection have large font size than for \subsection and \section. How can this be fixed? CSS should be used to workaround this or can I fix my doxygen installation to obtain expected common...

C++ Formatting like visual studio c# formatting

I like the way Visual studio (2008) format C# code; unfortunately it seems it doesn't behave in the same way when writing C++ code. For example, when I write a code in this way: class Test { public: int x; Test() {this->x=20;} ~Test(){} }; in C# (ok this is C++ but you can understand what I mean), this part: Test() {this...

latex list environment inside the tabular environment: extra line at top preventing alignment

Hello good people of stackoverflow. I have a LaTeX question that is bugging me. I have been trying to get a list environment to appear correctly inside the tabular environment. So far I have gotten everything to my liking except one thing: the top of the list does not align with other entries in the table, in fact it looks like it adds o...

Combine two numbers into one. Example: 123 and 456 become 123456

In C++, how do I combine (note: not add) two integers into one big integer? For example: int1 = 123; int2 = 456; Is there a function to take the two numbers and turn intCombined into 123456? EDIT: My bad for not explaining clearly. If int2 is 0, then the answer should be 123, not 1230. In actuality though, int1 (the number on the...

Format a money field in SQL without converting to varchar?

I need to be able to display a money field as $XX,XXX.XX, but without converting to varchar using total_eval = '$' + CONVERT(varchar(19),total_eval.opvValueMoney,1) My project uses sorting of the information after I pull this to sort the column and it doesn't sort correctly when the column is a varchar. Is there anyway to do this? Thi...

How to display a DateTime with chosen date parts, but in the order of the FormatProvider?

I want to display the date in the order that the culture provides, but with the elements I want only. The DateTime.Tostring() method has a list of patterns that are very useful but I would like a very small change in it. The CultureInfo used in the following the following code are chosen as example, I don't want to rely on a specific l...

HowTo: obtain culture dateTime format

?string.Format(CultureInfo.GetCultureInfo("en-US"), "{0:d}", now) "4/12/2010" ?string.Format(CultureInfo.GetCultureInfo("fr-FR"), "{0:d}", now) "12/04/2010" I want to write a method: string GetDateFormat(culture) ?GetDateFormat(CultureInfo.GetCultureInfo("en-US")) "M/d/yyyy" ?GetDateFormat(CultureInfo.GetCultureInfo("fr-FR")) "dd/MM...

Changing ASP.NET tag formatting

When I drag a Label control to my document, I get the following code : <asp:Label ID="Label1" runat="server" text="Label"></asp:Label> I prefer my code to look like the following instead : <asp:Label ID="Label1" runat="server" Text="Label" /> How can I get .NET to do this by default? I looked in Tools -> Options -> Text Editor, whe...