formatting

How to visualize or format a diff / patch file?

I have a patch file (unified diff), like the output from svn diff, git diff, or diff -u .... I want to review it, but the unified diff format - especially with many files & changes - is hard on my eyes. How can I get a nicely-formatted diff view from the patch file? I don't have the files themselves, only the diff, so I can't use all th...

std::string formating like sprintf

Hi guys, I have to format std::string with sprintf and send it into file stream. How can I do this? ...

Multi-dimensional array formatting in Aptana / Eclipse

I'm using Aptana Studio, one issue I'm having with is formatting multi-dimensional arrays. I really want arrays in a tree-like structure, so arrays-within-arrays are shown with indents. Similar to a print_r wrapped in < pre > tags. I can set formatting preferences to put each element on a new line, but can't find how to indent array le...

passing a formatted date with jquery datepicker

Hi all, I'm using the jQuery Datepicker (http://keith-wood.name/datepick.html) with custom date range. My problem is that I need the output of the date for the user to be in a readable format such as dd/mm/yyyy but then take that date and pass it into a search form as yyyymmdd. $(function() { $('#startDatepicker,#endDatepicker').datep...

Is there anything like css for formatting a report output in SQL server reporting service?

I want to know that is there a solution for formatting the output of the report controls like css that is used for web forms? ...

mvc formatting text

i have text like this div bla-bla end div i need to get only 'bla-bla' without div, because of i need to call substring in controller only to text bla-bla not to div tags. is it possible p.s. how to input tags here? ...

Format Java Code in Netbeans / Eclipse, but save it differently

Hi all, I asked a related question before, but I guess the root of the question is. Let's say I have 2 developers on the team and they both like to look at code in different formats. One likes the braces to be on a new line and the other doesn't. The approach I was using before is that anytime we run a build, the code is automaticall...

Simple WPF formatting question

How can I prefix bound values in TextBlock controls in a StackPanel without using separate controls for the prefixes? E.g., let's say I have a dialog that uses a TreeView to display a list of books, with the top nodes being the title, and a set of subordinate nodes for the other book attributes (ISBN, Author, etc.). I have the binding ...

Week number and Week day

I have week number of current year and week day generated by date() like this. $week_number = date('W'); $week_day = date('w'); I need to format this. How can I get starting date of this week? Or day of month with $week_number and $week_day? ...

Whitespace Between Tags in HAML

Is there a way to specify "pretty-print"-like formatting around HTML tags? I want to be able to put whitespace between blocks of HTML, so this: <!-- container --> <div id='container'> </div> <!-- footer --> <div id="footer"> </div> <!-- analytics --> ... ...is converted to this: <!-- container --> <div id='container'> </div> <!-- ...

How to order my objects in a C++ class correctly

Hello, I have been coding regurlarly in C++ in the past months. I am getting used to it step by step... but there are things that confuse me about formatting. I know there is a lot of legacy from C that I supousee mixes with C++. This time I have doubts about how to order properly my members and functions within in a class. Also consid...

LaTeX - Simple way to inset table?

I'm a LaTeX beginner. Up until now whenever I've created a table (using the tabular environment) LaTeX floats it in its own paragraph, between my lines of text. However, I want a way to embed a small table within a paragraph (to the left or right), having the text flow around it. Is there a simple way to do this without having to exer...

Python: File formatting

I have a for loop which references a dictionary and prints out the value associated with the key. Code is below: for i in data: if i in dict: print dict[i], How would i format the output so a new line is created every 60 characters? and with the character count along the side for example: 0001 MRQLLLISDLDNTWVGDQQALEH...

Make a disabled, formatted NSTextField update on a locale change?

I've got a couple of NSTextFields in my application for entering date and time. They have NSDateFormatters (using NSDateFormatterBehavior10_4) attached to them. When I change the system date format in System Preferences, then switch back to my application, the text fields automatically update with the new date format, but only if they ...

Coding style - keep parentheses on the same line or new line?

Suppose you are calling a function, where there's clearly a need to break down the statement into few lines, for readability's sake. However there are at least two way to do it: Would you do this: return render(request, template, { 'var1' : value1, 'var2' : value2, 'var3' : ...

Why use semicolon?

Are there any reasons, apart from subjective visual perception and cases where you have multiple statements on the same line, to use semicolon at the end of statements in Javascript? ...

How do I keep formatting when copying from gedit into open office?

I am editing octave files in gedit, and it does a nice job highlighting them. However, when I try to copy and paste the code into Open Office, it loses all formatting. Even when I try paste > special, it still doesn't work. Is there any way to do this without having to manually go through all my code highlighting keywords? ...

Formatting C# output

I am trying to format some c# output so that a number always has 2 digits for instance if int = 0 i would like Console.WriteLine(int); to produce 00. ...

Using Alphabetic Characters in SimpleDateFormat Pattern String

Is it possible to include an alphabetic character in a SimpleDateFormat Pattern String? I am trying to create a format string where the letter 'T' is included before the time for example: 2003-11-15*T*09:30:47-05:00. I am currently using yyyy-MM-ddhh:mm:ssZ as the pattern string. If I change it to yyyy-MM-ddThh:mm:ssZ it will throw a...

Stop Excel from changing cell contents, ever

I work with card numbers, like credit card and ID numbers. We do not do any calculations with card numbers, obviously. They are "text." I format them as text, I type them like text. I know how that works. Excel doesn't care. 16 digit card numbers get their last digit turned into a zero, changed into scientific notation, stupid stuff tha...