On iphone, how can i get the system date in the proper format
Based on local user settings, I want to get the correct date format. For example, it could be any of these: 5 Jan 2010 January 5, 2010 1/5/10 And how about on windows? Thanks. ...
Based on local user settings, I want to get the correct date format. For example, it could be any of these: 5 Jan 2010 January 5, 2010 1/5/10 And how about on windows? Thanks. ...
Before using String.Format to format a string in C#, I would like to know how many parameters does that string accept? For eg. if the string was "{0} is not the same as {1}", I would like to know that this string accepts two parameters For eg. if the string was "{0} is not the same as {1} and {2}", the string accepts 3 parameters How...
Hi, Is there a very simple way in PHP to convert one date format into another date format? I have this: $old_date = date('y-m-d-h-i-s'); // works $middle = strtotime($old_date); // returns (bool)false $new_date = date('Y-m-d H:i:s', $middle); // returns 1970-01-01 00:00:00 But I'd of course like it to r...
I have an object that I want to be able to stream. But I want to be able to stream it in different ways by using different formats, or should I say ways to describe this object. And I wonder how this is supposed to be solved with streams. What I want is to be able to use a generic format and use some kind of format adapter to transform...
Hi I've got a problem with EXE format http://www.delorie.com/djgpp/doc/exe/. I've loaded my file as hex into my editor (qedit) then I disassembled that and I was surprised ! My CS equalled 0 and IP also but code of my program (maybe it's 00000040 ?) is starting several bytes later and I can't be even sure because the code which I wrote...
I can use this method to signal an alternative layout. someformat.example.com but when I cache that it will be in, for example public/someformat Why involve DNS and the web server if I don't have to? Is there a way to make a Rails app just stay in a url subdir, i.e. to make all url generation relative? I'm attempting this for a Fa...
I often use textboxes in my wpf-projects which are bound to datetime-propertys. I want to format the dates into the german format dd.MM.yyyy. Currently I do this with a self-written converter, which I can give the needed dateformat. For example like this: <TextBox Name="Date" Text="{Binding RelativeSource={RelativeSource Mode=FindAnces...
Hello, I'm using VB 6.0 and it gives me: "Compile Error: Can't Find Project or Library" in this sub: Private Sub MDITimer_Timer() Dim textStr As String textStr = Format(Now, "dd-mm-yyyy hh:mm:ss") StatusBar.Panels(1).Text = textStr End Sub I made it like this and the error still was in the Format function (so it is not a...
Is there a way to get Authlogic to validate the format of a password, for instance must contain at least one letter and at least one number? The omission of a validates_format_of_password_options method to be used in the acts_as_authentic config block seems to indicate that Authlogic has the opinion that one should not be imposing such ...
Sorry, this might be a dumb question but I have no idea how to google this... I've got output from a CLI tool and I was wondering, what the format is called. I wouldn't want to write a parser myself if it's a common format, and I'm sure it is. It looks like this; statusList { status { int time="1260878400" value { char...
When I read books about WPF, I saw the authors mention XPS like it was something important. Windows also includes its XPS viewer, and I've seen that listed as a "feature" of Windows. But why? What's the point? Who the heck uses it? It's my understanding that XPS is, basically, like PDF, xhtml, or ePub (which is just xhtml)...or even Wor...
Hi ! I'm using Visual Studio 2008. I'm currently working with WPF and I'm using Edit->Format Document to format my source code. The problem is that I want to have formatting set total differently for style and for Controls themselves. Which means that I have to switch formatting logic every half an hour through this menu: Tools->O...
I recently came across a big problem, as I have a system that's paying the customers weekly. As we all know, a year has 52 weeks, and there are standards for it. I'm using PHP aka date('W') to get the week number from a date, that calculates that according to the standard ISO-8601. Here are some references: http://www.iso.org/iso/da...
I want to store multiple mp3 files and search them by giving some part of song, to detect which song it is. I am thinking of storing all binary content in mysql and when I want to search for a specific song by content I will take some middle portion of song and actually match it with the binary data in MySQL. My questions are: Is thi...
Morning Guys, I have a few ComboBoxes bound to List of TimeSpan. I am formatting the TimeSpans using IValueConverter and ItemTemplate. I was wondering if there were an easier way to format the TimeSpans. Here's what I'm currently doing. public class TimeSpanConverter : IValueConverter { #region IValueConverter Members public o...
I would like to format integers as professional looking currency strings. For example: 1200000 -> $1.2 million 456 -> $456.00 Do you know a good library for this, ideally with localization to handle European formats. ...
Hi, i tried this: echo date('W'); It gives me "06" (without quotes), but I only want 6, instead of 06. Is there a way to get the week of year in single character if the week is less than 10. I have couple of ways to deal with this, like: Check if week is less than 10, then use substring. etc.. Is there any more convenient way? ...
Hi, if i have a datetime string in a weird format, such as YYYY##MM##DD HH**M**SS, how can i create a new datetime object base on that? i have read something about the datetimeformatinfoclass but not sure how to get it working.. ...
I have this as input called $material_price: 2.40 1000 0.60 They run through <!-- setup currency rendering --> <xsl:decimal-format name="dkk" decimal-separator="," grouping-separator="."/> <xsl:value-of select="format-number($material_price, '#.###,00', 'dkk')"/> Output is: 2,40 1.000,00 ,60 How can I make changes to the xslt so...
Okay, I have read through all the other related questions and cannot find one that helps with java. I get the general idea from deciphering what i can in other languages; but i am yet to figure it out. Problem: I would like to level sort (which i have working using recursion) and print it out in the general shape of a tree. So say i h...