format

Converting a file to UTF8 format using Perl

How do I convert a file to its utf-8 format using Perl? and how do I check whether the converted file is in utf-8 format? ...

what is the jqgrid footer json format

hi. i am currently trying to solve my problem with the total in the footer. i tried searching in the internet with some examples, but they are using php, and i am using java. can you please show me what exactly the json looks like for this php script $response->userdata['total'] = 1234; $response->userdata['name'] = 'Totals:'; is thi...

printf("... %c ...",'\0') and family - what will happen?

How will various functions that take printf format string behave upon encountering the %c format given value of \0/NULL? How should they behave? Is it safe? Is it defined? Is it compiler-specific? e.g. sprintf() - will it crop the result string at the NULL? What length will it return? Will printf() output the whole format string or ju...

Objective C display money format like Sensible Soccer

I'm wanting to display money like SWOS (or Sensible World of Soccer) used to. IE: Instead of: $10,000,000+ you got $10m, 10.5m, etc. Instead of: $1,000,000 you got $1m Instead of: $1,500,000 you got $1.5m It also worked for both large and smaller figures, say; 1k, 1.25k, 0.75k, 0.25k, etc. I'm wondering...

Date format strings in .Net and Java

I have an application that runs on both C# .Net and Java. Two entirely separate but identical code bases. The problem Im having is formatting date and numbers. For example: A user running the .Net variant is inputting a date and a format string. The 26th of April 1986 is formatted 1986-04-26. The actual date, along with the format stri...

Draggable Elements for Token Field like Mac clock format panel

I need to be able to make a token field with draggable elements like the Mac clock format panel (see the following image). Thanks so much, Alex. ...

Want to read exact values from excel sheet in C#.

Hi , I am reading the excel sheet by interop services.eXcel sheet have some values like 1.520 ok? but while i reading it by interop service by following line : drRow[dtSourceEXLData.Columns[constants.Width]] = ((Excel.Range)worksheet.Cells[iRowindex, colIndex_q8]).Value2.ToString(); it is giving me value as 1.52, but i want exact one ,...

Byte order (endian) of int in NSLog?

NSLog function accepts printf format specifiers. My question is about %x specifier. Does this print hex codes as sequence on memory? Or does it have it's own printing sequence style? unsigned int a = 0x000000FF; NSLog(@"%x", a); Results of above code on little or big endian processors are equal or different? And how about NSString's -...

TinyMCE BBcode plugin breaks text format on paste

Hi all, I have a problem with the BBcode plugin of TinyMce. If i paste a normal text took from a site like this (i took it from lipsum.com): Code: "The standard Lorem Ipsum passage, used since the 1500s "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut eni...

whats the format for a string of forward slash / in c#

Hi, I'm using a htmlhelper where i give table data id's based on day and month values which are retrieved. The problem is the id is not recognized in the format it is. / seems to not be picked up yet when i replace '/' with '-' it works. daysRow.AppendFormat("<td id='{0}/{1}'>{0}</td>", day, d1.Month.ToString()); can anyone tell me h...

Flex: convert VideoPlayer.currentTime to string "00:00:00:000"

Hi there! what about this one: I want to format the currentTime displayed by a videoPlayer component inside flex, something like : 8230.999 to something like 01:59:59:999 which is "hours:minutes:seconds:milliseconds" I trie different sets of codes but they can't get it to work because currentTime is nor a correct miliseconds time as it...

how to format date when i load data from google-app-engine..

i use remote_api to load data from google-app-engine. appcfg.py download_data --config_file=helloworld/GreetingLoad.py --filename=a.csv --kind=Greeting helloworld the setting is: class AlbumExporter(bulkloader.Exporter): def __init__(self): bulkloader.Exporter.__init__(self, 'Greeting', ...

C# decimal places with integer operators

So I have this code: p.Value = 1; decimal avg = p.Value * 100 / 10000; string prntout = p.Key + " : " + avg.ToString(); Console.WriteLine(prntout); But the program prints out 0, instead of 0.01. p.Value is an int. How do I fix that? ...

Line formatting with Ruby.

There is a text file containing words with 1 space between each of them. And there is also a command line entry that gives the length of line (output) wanted. Output will be words that fit into the length of the line (taken from command line). Also the first word will be on the left side of the line and the last word will be right side ...

Writing reports with Perl

Hi, I am trying to write out multiple report files using perl. Each file has the same structure, but with different data. So, my basic code looks something like #begin code our $log_fh; open %log_fh, ">" . $logfile our $rep; if (multipleReports) { while (@reports) { printReport($report[0]); } } sub printReports { open...

SQL Server Reporting Services Format Hours as Hours:Minutes

I'm writing reports on SQL Server Reporting Server that have a number of hours grouped by, say, user, and a total calculated based on the sum of the values. Currently my query runs a stored proc that returns the hours as in HH:MM format, rather than decimal hours, as our users find that more intuitive. The problem occurs when I try and...

Windows 7 Style Help File ?

How does one make their application help file similar to the new windows 7 help format and is that compatible with Windows XP? Can anyone provide details ? Can we use the windows 7 default viewer as a shell to our own help files???? ...

How to create playable FLV video from part of FLV file using FFMPEG?

So we had real FLV video file. we had devided it into 3 parts (more or less equal, not looking into structure orcontext). We have taken second part and forgot about first 2. Video contained audio and video track. mp3 and on vp6. Is it any how possible to play thsat second part after sending to ffmpeg some command? So how to (using any...

Detecting if a file is binary or plain text?

How can I detect if a file is binary or a plain text? Basically my .NET app is processing batch files and extracting data however I don't want to process binary files. As a solution I'm thinking about analysing first X bytes of the file and if there are more unprintable characters than printable characters it should be binary. Is thi...

How to save data in .txt file in MATLAB

I have 3 txt files s1.txt, s2.txt, s3.txt.Each have the same format and number of data.I want to combine only the second column of each of the 3 files into one file. Before I combine the data, I sorted it according to the 1st column: UnSorted file: s1.txt s2.txt s3.txt 1 23 2 33 3 22 4 32 4 32 2 11 5 22 1 10 ...