format

How to get a time since string from a NSDate object?

Basically, I'm getting a date time string from an API, and I want to show in the app that this activity happened '5 hours ago' or '3 days ago', and so on... I am currently trying to get the NSTimeInterval from [NSDate timeIntervalSinceNow] method. And then converting the time interval to NSDate again using [NSDate dateWithTimeIntervalSi...

Data Formats and File Formats Java Sound

I'm going through the Java Trail on their Sound api and they described two types of formatted audio data (data format and file format). From my understanding of it data format tells you how to interpret the raw sound data, while file format tells you how to interpret the file that contains that data. They used mp3 as an example for a spe...

how can i format jquery datepicker as "25-JAN-2009"

i would have thought this was: .datepicker({ dateFormat: 'dd-mmm-yyyy' }); for month, i get some number that i dont understnad where they are coming from: ...

PickUp/Apply Paragraph Formatting in PowerPoint 2007

In PowerPoint 2007, PickUp/Apply does not capture some paragraph formatting, such as bullet formatting, when used programmatically (VBA). Adding the PickUp and Apply buttons to the Quick Access Toolbar (QAT) and trying this manually confirms this. However, if you triple-click on a bulleted paragraph and select PickUp from the QAT, then...

Lisp format and force-output

I don't understand why this code behaves differently in different implementations: (format t "asdf") (setq var (read)) In CLISP it behaves as would be expected, with the prompt printed followed by the read, but in SBCL it reads, then outputs. I read a bit on the internet and changed it: (format t "asdf") (force-output t) (setq var ...

Delphi - undeclared identifier: LOCALE_SYSTEM_DEFAULT

Hi all, I'm trying to format a float (extended) by the system locale's default currency settings. I have found the key proponent to this solution to be the following line: GetLocaleFormatSettings(LOCALE_SYSTEM_DEFAULT, format_settings); and everywhere I look, they provide the solution exactly as shown (no class specifier before, li...

Why in some dynamic website , their pages are in html format ?

Hi I've seen a lot of dynamic website through the internet that their pages are in html or htm format . I don't get it why is that ? And how they do that ? Just look at this website : http://www.realmadrid.com/cs/Satellite/en/Home.htm ...

How to format the value in a strongy typed view when using ASP.Net MVC's Html.TextBoxFor

I am trying to format a date rendered by ASP.Net MVC's TextBoxFor using the value of a strongly typed view. The date is nullable so if it is null I want to see a blank value, otherwise I want to see it in the format MM/dd/yyyy. <%= Html.TextBoxFor(model => model.BirthDate, new { style = "width: 75px;" })%> Thanks, Paul Speranza ...

how to format 1700 to 1'700 and 1000000 to 1'000'000 in c#?

I like to format all numbers like in math. is there a predefined function or is that just possible with substring and replace? edit: my culture is de-ch Best regards ...

DOS command to format string to hex value

Is it possible to format a string to a hex value using DOS command? I'm trying to pass a hex value to my program from command line but it takes that complete value a a string and not as hex value? ...

Avoiding localiztion on formatting numbers written to file

I have a program that sometimes is used in locales that use commas for the decimal separator. Its nice how C# handles all that (good for the UI), but when I export to a file, I need to always use a ".", not the locale specific number. Currently, I do: String.Format("{0:0.####},{1:0.####}", x, y) Problem is that in some locales, that ...

How can I convert yyyy-mm-dd hh:mm:ss into UTC in Perl?

convert datetime format yyyy-mm-dd hh:mm:ss (Might be a string) into UTC, Looking into DateTime but I don't see how to parse the string? UPDATE: Is this working correctly? require 5.002; use strict; use warnings; use DateTime::Format::DateManip; my $string = '2010-02-28 00:00:00'; my @dates = ( $string ); for my $date ( @date...

Optimal way to store datetime values in SQLite database (Delphi)

I will be storing datetime values in an SQLite database (using Delphi and the DISqlite library). The nature of the db is such that it will never need to be transferred between computers or systems, so interoperability is not a constraint. My focus instead is on reading speed. The datetime field will be indexed and I will be searching on ...

change the format of SpreadXML type excel file

Hi, We are displaying in an XML spreadsheet data exported from an SQL server DB and if th euser clicks save without changing the format the file size is over 6 time the size of the same data in native .xls Does anyone know a way to force the save as .xls? ...

How to custom format data in datagridview during databinding

I'm looking a way to format DataGridViewTextBoxColumn so that the value to be databinded is formatted during databind. For example I have a CompanyName property and I need to take first 5 letters from the CompanyName when databinding happens. I could hook on different DataGridView events (e.g. RowsAdded) and loop through all the rows an...

Formats for communicating between backend and Objective-C/Cocoa

I'm developing an iPhone app that is connected to a backend server. It needs to communicate with it many times, through several requests. I'm sending HTTP messages, but I want to receive more complex responses that I can parse somehow. Supposedly, I can provide any type of format for responses from the server, so my question is: which on...

PHP math question

Lets say I divide 14 / 15 times it by 100 to get the percentage which is 93.33333333333333 how can I display it as 93.3% using php? Here is the code. $percent = ($avg / 15) * 100; ...

PEAR MAIL HTML email not well formatted in Hotmail/Yahoo/GMail

Hello, I'm using PEAR to send HTML emails from my website. My email are sent, but they are not formatted according to the CSS when viewed in Hotmail/Yahoo/GMail. When I view them in Windows Live MAil, they look great. To be more specific, it seems as if non of the CSS is taken into consideration (text format, background images etc.). ...

I think i have a vector image format, how do use it to draw an image in php?

I have found an image format that is being used by some applets. but i don't know what it is. I think it is some kind of vector graphics format that is used by the GD library. could someone help me decode it? I would like to use the raw data to produce a png, in php the data is being generated from squiggles drawn by the mouse. Is t...

How can I format a timestamp in Perl?

I would like to get this timestamps formatting: 01/13/2010 20:42:03 - - Where it's always 2 digits for the number except for the year, where it's 4 digits. And it's based on a 24-hour clock. How can I do this in Perl? I prefer native functions. ...