format

WPF C#: Starting crash due to client 'Region and Language' settings

Hi, I'm working on a WPF C# application, and it seems to crash with a few random people. So eventually I found out it was the 'Region and Language' settings that was responsible. For example, if I were to set my Format to English (United States) it will work, if I set it to Swedish (Sweden) it will crash from the start. When I test th...

storage format for small iphone database?

I need to make a program, which will have about 1000 articles in it. Articles are grouped by categories, one article can be under more than one category. Users can browse through articles through categories (iphone tables will be used here) or through full text search. There will be hyperlinks in articles too, they will lead to another a...

Parsing and validating arbitrary date formats in ruby (on rails)

I have a requirement to handle custom date formats in an existing app. The idea is that the users have to do with multiple formats from outside sources they have very little control over. We will need to be able to take the format and both validate Dates against it, as well as parse strings specifically in that format. The other thing is...

Convert rank-per-candidate format to OpenSTV BLT format

I recently gathered, using a questionnaire, a set of opinions on the importance of various software components. Figuring that some form of Condorcet voting method would be the best way to obtain an overall rank, I opted to use OpenSTV to analyze it. My data is in tabular format, space delimited, and looks more or less like: A B C D E...

Bash script: specify bc output number format

Greetings! I uses bс to make some calculations in my script. For example: bc scale=6 1/2 .500000 For further usage in my script I need "0.500000" insted of ".500000". Could you help me please to configure bc output number format for my case? ...

Images and links not showing up in feeds published using Feedburner?

The images and links added to the description of my RSS feeds are not showing up in the feeds I'm publishing through Feedburner, but if I subscribe to the raw feed(example.com/feeds.xml) the image and links are published appropriately in the feeds. I don't see any problem in the format of my feeds. Does feedburner need a special format? ...

Attribute to specify display format of a property or field

I currently already decorate properties in my business objects with attributes related to validation in Windows Forms. I would like to add attributes that would determine how the data is formatted. This would hopefully work seamlessly with data binding. Is there a way to do this? ...

How to wrap Java String.format()?

Hey everyone, I would like to wrap the String.format() method with in my own Logger class. I can't figure a way how to pass arguments from my method to String.format(). public class Logger { public static void format(String format, Object... args) { print(String.format(format, args)); // <-- this gives an error obviousl...

JTextField that has inner fields or preformated format, something like the ip field in windows

I want to create a text field that will be for dates and will have dd.mm.YYYY format. Now what I want the user to type only the numbers, not the dots to. So the field would be like: _ _. _ _ . _ _ _ _ So when the user wants to type the date: 15.05.2010 for example, he will only type the numbers in the sequence 15052010. Also I would ...

Format number as I type Expand this post

Hi I am working on an app at the moment that requires number input to be formatted as the textfield changes as well as perform a calculation. I have the text fields set up so that as the user types notifications are passed out and a calculation is performed. However what I need to do now is format the text to be in this style: €1,000,000...

Objective-C stringWithFormat misses an argument?

When I run this code: - (NSString *)description{ return [NSString stringWithFormat:@"(FROG idle:%i animating:%i rect:%@ position:%@ tongue:%@)", self.idleTime, self.animating, NSStringFromCGRect(self.rect), ...

Android Money Input with fixed decimal

How do you create an edittext entry that formats input in money format only? When the user enters 5, I want the input to look like "$0.05" and when they then enter 3, the input should now look like "$0.53" and finally they enter 6 and the input should look like "$5.36". ...

Django date filter: how come the format used is different from the one in datetime library ???

Hello ! For formatting a date using date filter you must use the following format : {{ my_date|date:"Y-m-d" }} If you use strftime from the standard datetime, you have to use the following : my_date.strftime("%Y-%m-%d") So my question is ... isn't it ugly (I guess it is because of the % that is used also for tags, and therefore is ...

Is there a better way to format this date string

Hello is there are better way to structure this line of code, as you can see, I am changing the format of a string that contains a date. lblCourseStartDate.Text = String.Format("{0:D}", DateTime.Parse(CourseStartDate)); I just found it untidy that I am converting twice or three times to get the format I want. Thanks ...

how to low-level format a hard disk using AIX?

Hi guys, I have a server with AIX 6.1 , I formated some hdisks using diag tool, but in some way some of its VGDA survived. how may I low-level format a hard disk using AIX? or how may I clear the VGDA of a specific hdisk? thanks ...

scanf("%d", char*) - char-as-int format string?

What is the format string modifier for char-as-number? I want to read in a number never exceeding 255 (actually much less) into an unsigned char type variable using sscanf. Using the typical char source[] = "x32"; char separator; unsigned char dest; int len; len = sscanf(source,"%c%d",&separator,&dest); // validate and proceed....

Live audio format

Hello, Are there any different formats for live audio in iPhone? Thank You ...

NUnit's TestResult.xml displayed nicely?

Im running the nunit-console program to test some assemblies after the build script is run. The TestResult.xml is then copied to a static web server. Im looking for a tool that could format the xml output into a nice html page that displays the results similar to how the NUnit GUI does it. Im looking for a color coded hierarchal display...

obtaing File Format in java/ DOS-UNIX

Is there an easy way to see whether particular file has DOS/MAC/UNIX line endings? Currently i read the file byte by byte and stop if i see Windows carriage return for (byte thisByte : bytes) { if ((!isDos) && (thisByte == 13)) { isDos = true; } ... Is there a way to get same information without reading file byte by byte? ...

Which Win32 API reports the Format preference in the Region and Language control panel?

Windows 7 and Windows Vista have a Region and Language control panel which contains a Formats tab which contains a popup menu titled Format. This menu allows the user to select from among many language-oriented sets of number, currency, time, and date formatting preferences regardless of the language of the base system. For example, I co...