Do you place separators (commas, and, or operators) at the front of the line?
Select Field1
, Field2
--, Field3
From [some_table] as ST
Inner Join [other_table] as OT
ON ST.PKID = OT.FKID
Where [this] = [that]
and [one_other] > 53;
I think the best feature is to help expose important operators (AND/OR). As a secondary adva...
I have an csv file, the data, and an HTML file, the template.
I want a script that will create an individual html file per record from the csv file, using the html file as a template.
Which is the best way to do this in Ruby? Python?
Is there a tool/library I can use for this in either language?
...
I'm using a simple web-based PHP application that outputs a table as a spreadsheet
header("Content-Disposition: attachment; filename=" . $filename . ".xls");
header("Content-Type: application/vnd.ms-excel");
//inserts tab delimited text
But I'm finding the downloaded spreadsheet opens as a read-only file and must be saved locally and...
I have a page that users are able to add xml markup into a text area input. I'd like after they enter it that it be color-coded and formatted as xml would look in an IDE such as Visual Studio. Anybody know of a script or tool that would allow for this within a client-side browser?
...
Say I have a database table like the following:
FileID | FileName | FileSize | Group
-------------------------------------
1 test.txt 100 Group1
2 test2.txt 100 Group1
3 test3.txt 100 Group2
What would be the best way to display this data with an MVC view in the style of:
Group 1
Table C...
This should be easy.
here's my array (rather, a method of generating representative test arrays):
>>> ri = numpy.random.randint
>>> ri2 = lambda x: ''.join(ri(0,9,x).astype('S'))
>>> a = array([float(ri2(x)+ '.' + ri2(y)) for x,y in ri(1,10,(10,2))])
>>> a
array([ 7.99914000e+01, 2.08000000e+01, 3.94000000e+02,
4.661000...
How do I format cells in Excel with python?
In particular I need to change the font of several subsequent rows
to be regular instead of bold.
Thnak you,
Alex
...
I have a list of strings that can contain a letter or a string representation of an int (max 2 digits).
They need to be sorted either alphabetically or (when it is actually an int) on the numerical value it represents.
Example:
IList<string> input = new List<string>()
{"a", 1.ToString(), 2.ToString(), "b", 10.ToString()};
input.Or...
For example, I'd like to not indent namespaces in C++ code, but the prefpane doesn't seem to have any place to make a decision of this granularity. Is there some hidden config file or something? Or am I just out of luck?
...
Recently, my Visual Studio 2008(with Resharper 4.5) has started to reformat asp tags into lowercase.
Example:
<asp:Repeater runat="server" id="rp">
becomes
<asp:repeater runat="server" id="rp">
and I can't find a way to make it not do this. I use Ctrl-k Ctrl-d to reformat.
I've tried resetting the Visual Studio settings, turning...
Hello,
How can I, create a vertical line between the open brace and close brace in Visual Studio 2008 (C#), if you can't understand about what I'm talking, there's a following picture(Pic1).
[Pic1 - I want to do this with the braces]
http://www.hanselman.com/blog/content/binary/vsbeforefonts.png
Thanks.
...
I'm trying to retrofit/fix lots of legacy web code and unfortunately most of it is poorly formatted JavaScript. I'm looking for a batch/scriptable utility that can fix JavaScript that is missing simicolons at the end of executable statements.
I've tried the beautify-cl.js script with Rhino but that does not does not add semicolons. In...
I'm building a general purpose data translation tool for internal enterprise use, using Java 5. The various departments use differing formats for coordinate information (latitudes/longitudes), and they want to see the data in their own format. For example, the coordinates of the White House in DMS format are
38° 53' 55.133" N, 77° 02...
I use astyle to format my code most of the time, and I love it, but one annoyance is that it can't specify at least a "hint" for max line length. If you have a line of code like:
this->mButtonCancel->setLeftClickProc(boost::bind(&FileListDialog::cancelLeftClick, this));
I would like a source code formatter to be able to wrap it even ...
I want to be able to read vCard and vCalendar data using .NET, I have something which does this, and have looked at the specification.
For those not familar with the format here is some test data from my current application:
BEGIN:VCALENDAR
VERSION:2.0
PRODID:-//Microsoft Corporation//Windows Calendar 1.0//EN
CALSCALE:GREGORIAN
METHOD...
Hi,
is there a way to move the data from an excel sheet to a word document and reformat it. I'd like the data in the first column to be formatted as 'Heading1' and the data in the second column to be formatted as 'Normal'.
So that every row results in a header and a content, but without a table itself.
...
What is the correct way to do conditional formatting in Django?
I have a model that contains a date field, and I would like to display a list of records, but colour the rows depending on the value of that date field. For example, records that match today's date I want to be yellow, records that is before today I want green and ones afte...
I have a .NET 2.0 website that is periodically losing the value for the DateTimeFormatInfo.CurrentInfo.AMDesignator (or PMDesignator) property. This causes code such as Now.ToString() or even Now.ToString("dd/MM/yyyy hh:mm tt") to not properly display the AM/PM designation which then causes date validation to fail. This issue happens sp...
I have a website form that collects url of users to store in a database. They should not enter the http:// with their URL however many and the result is that when their url is displayed it looks like this
http;//http://www.foo.com I need the form to strip it or ignore it or what ever you think is the best way to handle it.
thanks
...
I am writing a program that uses prints a hex dump of its input. However, I'm running into problems when newlines, tabs, etc are passed in and destroying my output formatting.
How can I use printf (or cout I guess) to print '\n' instead of printing an actual newline? Do I just need to do some manual parsing for this?
EDIT: I'm receivin...