format

Convert hexadecimal number to hexadecimal number presentation in common lisp

Hello all! I'm trying to convert hexadecimal number to hexadecimal number presentation. for example is below. CL-USER> (foo 0D) #x0D Should i use macro function? ...

Drupal - how to disable "Input Format" fieldset in node edit form

Hi! I am using hook_form_alter to disable some publishing options whet authors adds or edits the nodes: /** * hook_form_alter () */ function mymodule_form_alter(&$form, $form_state, $form_id) { global $user; if ($form['#id'] == 'node-form') { unset($form['comment_settings']); unset($form['path']); unset($form['revision...

How many formats of x.509 client certificate file are there?

I am working on a task which is to get the client certificate when the user sends a request to the server. I have to get the certificate and get the 3 pieces of information from the certificate: user name, user's email address and user's firm name. At first it seems quite simple to just get the "Subject CN" for user name, "Subject E" fo...

Drupal - How to change input format for comments?

This issue irritates me much. Somehow after installing wysiwig editor my comment body form turned into rich.. bla bla area. I do not want this but I can not find the place where to turn back comment input format to the plain text (or filtered format). I know how to change filter options for different content types but turning back commen...

AJAXy action accessible via "normal" request

Greetings, I have an application which contains a calendar as alternative index view for Courses (Project has_many Courses). There I have two arrows for navigating to the next/previous month, it works via AJAX. Now, that's my action for updating the calendar: def update_calendar @project = Project.find params[:id] @date = Date.pars...

Best way to convert Java SQL Date from yyyy-MM-dd to dd MMMM yyyy format.

Hello Is there a straightforward way of converting a Java SQL Date from format yyyy-MM-dd to dd MMMM yyyy format? I could convert the date to a string and then manipulate it but I'd rather leave it as a Java SQL Date. at the time I need to do this, the data has already been read from the MySQL database so I cant do the change there. T...

SimpleDateFormatter won't parse!

Hello I am trying to use the SimpleDateFormatter to parse the date Wed, 30 Jun 2010 15:07:06 CST I am using the following code public static SimpleDateFormat postedformat = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z"); Date newDate = new Date(posteformat.parse("Wed, 30 Jun 2010 15:07:06 CST")); but I am getting an illeg...

Deplhi to .Net format string conversion

I am looking for a library or snippet to convert Date/Time format strings from Delphi to .Net. This is for Delphi version 2007. For example, Delphi 2007 specifies "m" as month, whereas .Net uses "M". However, in Delphi, if the "m" follows an "h", then it represents a minute value. Are any available, or do I have to roll my own? ...

.NET LINQ foreach DATETIME cannot convert String to DateTime exception

I have SQL data table that containes a DATE or DATETIME field a LINQ statement show here just to get the basic idea var testLinq = from t in DBDataContext.Certificates select t; foreach (var t in testLinq) { .... } Left out the code in {..} for briefness. BUT whenever 'foreach' tries to use t I get this exception ...

Is locale setting global in perl?

I'm debugging a perl script which looks like this (simplified): #!/usr/bin/perl use strict; use warnings; use Evil::Module; printf "%.3f\n", 0.1; This script outputs 0,100 (note , instead of .). If I comment out the use Evil::Module statement, the output will be 0.100. I believe that this is related to locale setting in the mod...

How to format this date type 2010-06-24T00:00:00Z to sun,24/06/10 7.15 p.m (CDT) using javascript or jquery

How to format this date type 2010-06-24T00:00:00Z to sun,24/06/10 7.15 p.m (CDT). using javascript or jquery. sun,24/06/10 7.15 p.m (CDT) this is just a format representation which i need & not the actual date of the above string. Appreciate the quick response Thanks in advance! ...

GWT document format converter

Hello, I am searching on ways to make a small app using GWT for converting documents from one format to other. Mainly these formats .doc , .pdf , .odt , .rtf.. and maybe a couple more. Has anyone tried this before?? I came across the library JODConverter but it needs open office to be already installed and i don't really know how ...

Why is the Binding Format event called twice?

I am playing around with data binding and noticed that the Binding Format is called twice upon loading the form in the code below. I thought it would only happen once when the test class TextBoxText property is fist bound to textbox1. Is this normal? If not, then what can I do to prevent it? Note, when I press button1 and it changes t...

Label.Text / Convert.ToString And String.Format Help / Thousand Separator

I have a label that i want to show it's Text("1234567") Like A Number With Thousand Separator// how can i do this with : Lable1.Text = string.Format(.....; Lable1.Text = Convet.ToString(.....; please explain these two. ...

Number Format / DecimalDigits

I have code like: lblFranshizShowInvwNoskhehEdit.Text = string.Format("{0:n}", (double)(int.Parse(drDarman["FranshizDarsad"].ToString()) * Convert.ToInt64(RadNumerictxtPayInvwNoskhehEdit.Text)) / 100); But {0:n0} string format forces the label's text to not have decimal digits and {0:n} string format forces the label's te...

how to work on mysql date fomat ?

Hi What is the problem with the mysql syntax SELECT FORMAT(dCreatedDate,'YYYY-MM-DD') as date1 FROM tbl_book_self I want to select the date from mysql database in this format,How to use this syntax ...

iphone NSDate with NSDateFormatter Problem

All i am trying to do, is to get an NSString with the value of the current date ( NOW ) with this format: 7/14/10 8:20 PM Exactly like the native mail app of the iPhone. i am using the following code to do it: NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init]; [dateFormat setDateFormat:@"EEE, dd MMMM yyyy HH:mm:ss ...

Format file size as MB, GB etc

I need to display a file size as String using sensible units. e.g. 1L ==> "1 B"; 1024L ==> "1 KB"; 2537253L ==> "2.3 MB" etc. I found this previous answer, which I didn't find satisfatory I have come up with my own solution which has similar shortcomings: private static final long K = 1024; private static final long M = K * K; pri...

format.js argument

Hi all, I've a question about passing argument with format.js There's my code (create method): respond_to do |format| format.js end I would like to know how can i get a variable value in my create.js.erb Thanks ...

(iPhone app) error: too many arguments to function 'URLWithString:'

I'm trying to format a URL string however it's saying there are too many arguments. My code is below: -(IBAction)tweetRandom { //NSLog(@"CALLED"); test = 100; [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://twitter.com/%i", test]]; // problem line } Anyone know how to format the URL? Was hoping there was ...