format

Problem with short date format in php

Hi, I have problem with date function in php. If I supply string in format "d.m.y" for example "01.01.01" it gets rendered as todays date which means that php gets confused. I found: Note: The "Day, month and two digit year, with dots or tabs" format (dd [.\t] mm "." yy) only works for the year values 61 (inclusive) to 99 (...

convert array into .txt file

Possible Duplicate: Convert array into csv Hi, How to convert array into .txt file? This is my array: Array ( [OrderList_RetrieveByContactResult] => Array ( [OrderDetails] => Array ( [0] => Array ( [entityId] => 1...

R: number format, writing 1e-5 instead of 0.00001

Hello I've used read.table to read a file that contains numbers such as 0.00001 when I write them back with write.table those numbers appear as 1e-5 How can I keep the old format? thanks ...

is this url unvalid and not good practice?

i have a url in this format: http://www.example.com/manchester united note the space between manchester and united, is this bad practice, or is it perfectly fine, i just wanted to before i proceed, thanks ...

In IPhone(Objective C) how do I get the current date formatted in miliseconds to send to a server Rest Web Service?

Hi, I am new to IPhone development. I need to take the current date from device and send to a server in JSon format. The server expects this date to be in milliseconds as since January 1, 1970, 00:00:00 GMT(Unix time) . I have noticed IPhone has some methods to get the current time in SECONDS, well, should be very easy to transform se...

Get current computer datetimeformat

Hi I am new to web programming and I have an mvc app which runs on azure. There is a functionality where users can export grid data to csv and one of the fields is a datetime field. When the user clicks on export I take whatever is in the grid, format it to csv and then return a FileContentResult. The problem I have is that since the con...

PHP file generating CSV, how to correctly output text.

Currently I am working on a PHP script to output a CSV file from entries in a MySQL database. My problem lies in how to correctly output the values. Many of the entries in the MySQL database will contain commas and quotes, which destroy the format of the CSV file if I just plainly print them out to the file. I'm aware that I can surro...

What are the security implications of using boost/format?

I am starting to use boost/format. When coding with boost/format, what should I pay attention to with regard to security? Can I do the following without being concerned about security? std::cout << boost::format("Hello %2%! Do you want to %1%?") % user_supplied_str1 % user_supplied_str2 << std::endl; What are situations where ...

ExpressionEngine - No <img> tags from files selected via File Manager

Is there a way in ExpressionEngine to disable the img tag formatting when loading an entry's text-input field with a filepath from the File Manager? Would be great to just have the filepath listed there after selecting an image (i.e. just the string that should appear inside of the src attribute) without any of the extra html. Have trie...

C# How to Format a Number to a Hexicadecimal with a Prefix '0x'

Hi, How to Format a Number to a Hexicadecimal with a Prefix '0x'? Such as: int space = 32; MessageBox.Show(space.ToString("'0x'X4")); // Output 0xX4 instead of 0x0020 I followed this link: Custom Numeric Format Strings http://msdn.microsoft.com/en-us/library/0c899ak8.aspx Literal string delimiter: Indicates that the enclosed charact...

wprintf format type specification %ws

I just discovered that %ws was common knowledge (to some), for formatting unicode strings, as is %wZ - however msdn does not document these in a place I can find them. There are many people who write about these usefull printf format types individually on the web, but no official catch-all that I can find, and hence learn that they exist...

Sanity of appending data to an executable binary

Is it generally sane to append some random data to an executable binary file? What measures should be taken to ensure safe operation of the resulting executable, like padding before appended data or whatever? A typical C example would be: gcc -o main.o -c main.c gcc -o main main.o -lfoo cat bar.txt >> main The target system is broadl...

iPhone timeIntervalSinceDate

I'm trying to measure time between taps. I've gathered code from a couple other posts, but still no luck. I running into issues when I'm taking the difference between two time stamps and trying to make it readable in seconds. // Time elapsed NSTimeInterval duration = [[NSDate date] timeIntervalSinceDate:touchesBegan]; NSDateForma...

How to addClass() to the pictures of a certain format

Hi, I need to style images of a JPG format only. (jQuery) I need class to be applied to jpeg's when it's placed in specific container (not all jpg's on the page). For example: <img src="non-jpeg.jpg"> <!--no changes made--> <img src="jpeg-image.jpg"> <!--no changes made--> <div class="spec-container"><img src="jpeg-image.jpg"></div> ...

querying a sqlite db with date needs always a time value too like ("yyyy-MM-dd 00:00:00");

Hello, I use C# and sqlite. To get data for a certain datetime value I have to write this: com.Parameters.Add(new SQLiteParameter("@MyDate", day.ToString("yyyy-MM-dd 00:00:00"))); In my database all date entries have a time date + 00:00:00. How can I query my database with ONLY a date format not datetime format? ...

Aligning items with jquery

I'm building a scheduling system for my work, and it's set up to be a two column page - one column for the nav bar, and the next column for the data. I'm using some jquery to have it automatically format the column widths depending on the size of the user's screen. For some reason the size of the columns in my header table are differen...

SSIS Format File

I have inherited a SSIS package which contains a bulk import task. The bulk import tasks uses the following format file: 8.0 38 1 SQLCHAR 0 2 "" 1 branch_code Latin1_General_CI_AS 2 SQLCHAR 0 10 "" 2 sfkacct_number ...

How to format a java string with leading zero?

Here is the String, for example: "Apple", and I would like to add zero to fill in 8 chars. I would like to show the result like this;' "000Apple" How can I do so? Thank you. ...

PHP: JSON like data format, searching parser

Hi, i would like to have an JSON like data format with the following features: support of arrays (ideal with [item; item; item] as notation and [key: value; key2: value2]), also nested string support, ideal with the following: "foo",0x0a,"bar" hex numbers, bin numbers, decimal numbers Does anyone know a parser for such a data format ...