Hi,
I'm using Django to serve up some XML. Part of the requirements is that my dates are formatted as follows: 1969-12-31T18:33:28-06:00
How can I output a DateField in Django in that format?
I have a bunch of files. Some are unix line endings, many are dos. I'd like to test each file to see if if is dos formatted, before I switch the line endings.
How would I do this? Is there a flag I can test for? Something similar?
Hi there,
I want to allow users enter numbers in textfield and once the textbox loses focus. The number is formatted with commas.
e.g. User enters 100000
textfield looses focus
value displayed: 100,000
How can I achieve this in Grails.
I have looked at
<g:formatNumber number="${myNumber}" format="\\$###,##0" />
But it doesnt solve my problem as the number is from a textfield.
thanks
Much appreciated.
IT is running a series of VMs that we'd like to see optimized further: if the VMs' are Windows XP, storing their NTFS images out to the virtual disk (ext3) provided by Linux/VMWare, how much of a hit are we taking - as opposed to having a partition of the host hard drive formatted NTFS to eliminate the translation layer and the extra level of operating system IO preparation?
I recently installed ubuntu 10.04 LTS and formatted my windows 7 hdd, but the windows 7 entry is still showing in grub. How can I remove the entry from grub?
Greetz
How can I convert the nullable DateTime dt2 to a formatted string?
DateTime dt = DateTime.Now;
Console.WriteLine(dt.ToString("yyyy-MM-dd hh:mm:ss")); //works
DateTime? dt2 = DateTime.Now;
Console.WriteLine(dt2.ToString("yyyy-MM-dd hh:mm:ss")); //gives following error:
no overload to method ToString takes
one argument
How to loop through a select statement results to have a formatted text?
for example the select is like:
select name from table
and we want a variable @names like this:
"name1,name2,name3"
Database is SQL Server 2005
What is the best way to get formatted Int32 numbers?
Let say I have this o function:
string o(int x);
This is the value that o need to return according to x
x = 0 => o = 00
x = 1 => o = 01
x = 5 => o = 05
x = 10 => o = 10
x = 31 => o = 31
x = 106 => o = 106
Basically need the default Wordpress TinyMCE WYSIWYG editor where the user will enter some formatted text in my plugin. How do I integrate/implement TinyMCE in a simple HTML Wordpress form??
I'm using Wordpress v2.9!
i want to log some information of every single request send to a busy http server in a formatted form,use log module would create some thing i don't want to:
[I 131104 15:31:29 Sys:34]
i think of csv format but i don't know how to customize it,and python got csv module,but read the manual
import csv
with open('some.csv', 'w', newline='') as f:
writer = csv.writer(f)
writer.writerows(someiterable)
since it would open and close a file each time, i am afraid in this way would slow down the whole server performance, what could i do?
Hello, I want to use either http://onehackoranother.com/projects/jquery/tipsy/ or http://bassistance.de/jquery-plugins/jquery-plugin-tooltip/ and I was wondering if lets say I have a div on my page that has a class 'item_info'.
Can I have my tooltip that is created output the div inside the tooltip and formatted properly according to my css?
Is there another plugin I should be looking into?
Thanks. I hope this is clear enough.
i have debian system in which i have mounted the OS on a ext-3 system . I have got a partition of 60 gb , which is formatted to ext-2 partition . Even if I mount , i cant write anything into it . How can i change that ? How can I make the disk writable?
Hi, I'm trying to get the unix time for date strings that are formatted like so:
'second sunday of march 2010'
'first sunday of november 2010'
I was under the impression that strtotime could handle such a string, but apparently not, as this returns false. How can I convert to unix time when given a day of week, which one of those in the month (ie. first, second, etc.), a month and a year.
Right now I am writing a simulation program which output is formatted according to certain factors. The question is in a MVC architecture, where is the conditional formatting to be taken place? What are some strategies for implement this feature?
FYI, The platform I am using is rather bare-bone in its GUI/front-end execution. To change color and formatting, it requires a change to the formatting state (much like OpenGL).
I'm trying to color individual pixels on a BufferedImage (TYPE_INT_RGB) using setRGB but I'm not for sure how to set format the RGB values I want as a single integer. Is there a method that will take 3 ints (RGB values) and return a correctly formatted integer for setRGB?
How would I covert a date formatted like this
Thu, 08 Jul 2010 15:51:01 into a date like this Thursday July 8th, 2010 3:51 pm. Also, how would I filter the first sting to not include time, so that it could look like this in the end Thursday July 8th, 2010
I have to render some text to a web page. The text is coming from sources outside my control and it is formatted using \n and\t
Now \n can be replaced by a <br> but what about \t. A brief search reveals there is no way to render tab characters in html, bu there has to be a workaround. Anyone?
I have some table cells containing dates formatted like this: 2009-01-01. I.E 7 seems to be breaking these into two lines at the hyphen. Is there any way to turn this off?
Hi,
i found a way to send plain text email using intent:
final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("text/plain");
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new
String[]{"[email protected]"});
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Subject");
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Test");
But I need to send HTML formatted text.
Trying to setType("text/html") doesn't work.
I am passing in command line arguments to my Lisp program and they are formatted like this when they hit my main function:
("1 1 1" "dot" "2 2 2")
I have a dot function and would like to call it directly from the argument, but first I must strip the " characters.
I tried variations of this function:
(defun remove-quotes (s)
(setf (aref s 0) '""))
to no avail, Lisp complains that "" is not a member of base-char.
Thanks!
So let's say I have a view that access a date:
<%= Html.TextBoxFor(model => Model.Birthday) %>
How do I have my view dictate how that date is formatted? I'd like to use common formatting options, and it's important that this is 2-way (both for display and data-entry).
Is it possible to query App Engine's Datastore from outside the cloud, i.e. a client application?
I could possibly write an app to be housed within AppStore and query the Datastore returning XML-formatted data; I want to know, however, if there are any Datastore endpoints which would allow me to do it directly.
Also, in case it is possible, am I able to do so via SSL?
Is it possible to get information about the commenter with the comment_text action in wordpress?
What I want to do is modify a comment someone makes based on who they are, like if they are user_a I might want to make their comments show up as green, if they are user_b I might want their comments to be bolded, or formatted differently.
C++ is my first language, and as such I'm used to whitespace being ignored. However, I've been toying around with Python, and I don't find it too hard to get used to the whitespace rules. It seems, however, that a lot of programmers on the Internet can't get past the whitespace rules. From what I've seen, peoples' C++ programs tend to be formatted very consistently with respect to whitespace (or else it's pretty hard to read), so why do some people have such a problem with whitespace-based languages like Python?
Does anyone have any good answer what kind of difference there is between
using some arbitrary pre-formatted Excel 2007 *.xlsx file as a template, loading it in my C# app, and filling up some of its cells with data using the Microsoft OpenXML SDK
versus
creating specific Excel templates (*.xltx) files and using those as basis for my "data filling" exercise
Do I loose something when I don't use the Excel templates (*.xltx)? If so - what do I loose?