formatting

django form datefield with runtime formatting

So, I have a form: class FormBasicInfo(BasicForm): valid_from = forms.DateField(required=False, input_formats=('%d/%m/%Y',), widget=DateInput(format='%d/%m/%Y')) and I set the input and output formats. However, what if I want to set these formats at runtime, based on the date format preference of my user? how can that be done? T...

Need to set time range on Y axis on a MSChart.

I'm looking to set the y-axis for a MSChart to be midnight to midnight, in either regular time format(i.e. - "1:30 AM") or military time. I figured out I can specify the y-axis format using ChartArea.AxisY.LabelStyle = new LabelStyle() { Format = "HH:mm" }, but cannot figure out what to set the minimum/maximum values to be. Has anyon...

Formatting E-Zine correctly for Outlook embedding

Hi, my client wants an E-Zine that can be embedded in an email along with edited and managed in an email. A solution to this is creating a basic HTML file which is embedded into an email, upon clicking "forward" the HTML file can be edited. This is what my client wants, however I'm having trouble formatting it correctly. Has anybody els...

Access VBA Formatting

Hey all, I managed to integrate my Database quite well with Excel in the end, but in the end after I showed it to the bosses they asked me to develop the forms and reports in Access again. That did not take too long fortunately, so I ended up doing two front ends for one back end Database. But in the end it'll be a fully Access database ...

add commas to a number in jQuery

I have these numbers 10999 and 8094 and 456 And all i want to do is add a comma in the right place if it needs it so it looks like this 10,999 and 8,094 and 456 These are all within a p tag like this <p class="points">10999</p> etc. Can it be done? I've attempted it here with the help of other posts http://jsfiddle.net/pdWTU/1/ but...

Format ms access currency field in a query

Hi how can I format a currency field in a query to show without the £ symbol, but still include the correct figure after the decimal point? thanks ...

Creating readable list output in PHP/Wordpress

I'm trying to figure out how best to get this PHP statement $wpdb->get_results("SELECT verb, display_name AS organization, inline_the FROM userorganizations U, organizations O WHERE U.org_id = O.ID AND U.user_id=$author_id", OBJECT); To spit out something like the following: John works for Initech, owns John's Tasty Pastry, and w...

SQL Query Formatting

SELECT `accounts`.`password` FROM accounts WHERE `accounts`.`user`='some_user' SELECT password FROM accounts WHERE user='some_user' I am a bit confused about the two. I know as far as the results, there is not a thing different between the two. However is there some reason to do one way as opposed to the other? I learned it the second...

Python, format this list

I've got a list like [(1, 2), (1, 8), (2, 3), (2, 7), (2, 8), (2, 9), (3, 1), (3, 2), (3, 5), (3, 6), (3, 7), (3, 7), (3, 9)] I want to make it looks like [('1',' ', '2', '8'), ('2', ' ', '3', '7', '8', '9'), ('3', " ", '2', '5', '6', '7', '7', '9')] How can I code this loop? Really tried times, and nothing came up. Please help~~ ...

Hidden dynamic matrix groups still take space in SSRS

The Problem I am using dynamic matrix groups as in Dynamic Grouping from Chris Hays's Reporting Services Sleazy Hacks Weblog (which has some great stuff and is worth checking out, by the way). I have my row and column groups bound to two multi-value parameters and everything is working great, except for one thing. Even though I am suppr...

Formatting of dynamically generated HTML - does no one care?

Possible Duplicate: Formatting of dynamically generated HTML - does no one care? I have very little experience in web development, so this may be a very basic question. It's just, from the limited experience I do have (a little PHP, and a little Ruby on Rails), it seems that the way dynamically generated HTML is formatted jus...

Formatting of dynamically generated HTML - does no one care?

I have very little experience in web development, so this may be a very basic question. It's just, from the limited experience I do have (a little PHP, and a little Ruby on Rails), it seems that the way dynamically generated HTML is formatted just "doesn't matter"; it ends up ugly, with weird indentation, and nobody cares because that i...

Java Format Detailed Difference Between Dates

I'm sure this has been asked before in some other way that I just can't find, so I apologize upfront for repeating if I am. I am trying to calculate the difference between two dates and then display that difference in days, minutes, and seconds; something like "3 days 23 minutes and 59 seconds" Very easy, I'm sure, but I'm a C# guy by ...

Python: Convert this list into dictionary

Hi, I've got a problem , and do not know how to code in python. I've got a list[10, 10, 10, 20, 20, 20, 30] I want it be in a dictionary like this {"10": 1, "20": 3, "30" : 1} How could I achieve this? ...

JavaScript formatting: must braces be on the same line as the if/function/etc keyword?

Possible Duplicate: why results varies upon placement of curly braces in javascript code We have company policies that dictate that in PHP opening curly braces should be on their own lines for readability and so that they can line-up with the closing brace; thus: if (true) { ... } but in JS they should be kept on the s...

Cleaning up a large, legacy Java project

I've been assigned to do some work on a huge Java project, and the influence of several iterations of developers is obvious. There is no standard coding style, formatting, naming conventions or class structure. It's a good day when I come across a class with Javadoc, and unit testing is a happy daydream. So far those of us on the proj...

Which API can I use to format an int to 2 digits?

What API can I use to format an int to be 2 digits long? For example, in this loop for (int i = 0; i<100; i++) { System.out.println("i is " + i); } What can I use to make sure i is printed out like 01, 02, 10, 55 etc (assuming a range of 01-99 ) ...

Crystal Report showing HTML text, but the bullets don't show. Why?

I'm getting data out of a SQL-Server nvarchar(3000) field, which is formatted as html, displaying it in Crystal Reports 11. The data is being saved as bullets, and if I pull out the data and drop it in a text file with an html extension, it shows the bullets. But from Crystal, it does not. I get the new line, but no bullets. The fiel...

MATLAB matrix not formatting correctly

Hi everyone, I have some code below, and I cant seem to get the matrices formatted correctly. I have been trying to get the matrices to look more professional (close together) with \t and fprintf, but cant seem to do so. I am also having some trouble putting titles for each columns of the matrix. Any help would be much appreciated! cle...

Data collection task

I have data that follows this kind of patten: ID Name1 Name2 Name3 Name4 ..... 41242 MCJ5X TUAW OXVM4 Kcmev 1 93532 AVEV2 WCRB3 LPAQ 2 DVL2 . . . As of now this is just format in a spreadsheet and has about 6000 lines. What I need to do is to create a new row for each Name after Name1 and asso...