formatting

Making links clickable in Javascript?

Is there an simple way of turning a string from Then go to http:/example.com/ and foo the bar! into Then go to <a href="http://example.com"&gt;example.com&lt;/a&gt; and foo the bar! in Javascript within an existing HTML page? ...

How to display an output of float data with 2 decimal places in Java?

Can I do it with System.out.print? Thank you. ...

how to display formatted text but have the actual text

hello I have my own textbox which inherits System.Windows.Forms.TextBox I am trying to display texts like 5000000 formatted ==> 5,000,000 but the problem is that Control.Text should return 5000000 but it should display 5,000,000. I know it is WTF, but i really need it and i couldn't Google a lot because my native language is not Engl...

How to split mobile number into country code, area code and local number?

How to split mobile number into country code, area code and local number? e.g +919567123456 after split country code = 91 area code = 9567 local number = 123456 ...

Format PHP Source Code on Save with Zend Studio for Eclipse

I would expect this option to exist in PHP -> Editor -> Save Actions but the only thing available there is to "remove trailing whitespace"... It's available in JavaScript -> Editor -> Save Actions but not php :( Is there a plugin that will let me do this? ...

Change default font of controls in winforms

Hi, Is there any way to change default font of controls in winforms. I must change font in about hundred font in recent project and it's coming next project with other fonts and I wanna at start setting properly fonts. ...

Visual Studio incorrectly smart indents the opening brace

When I type the closing brace in an html page, this i what Visual Studio does. Notice the opening brace is now 1 indent before the foreach. They should be even as shown by the closing brace. Not a big thing but driving me nuts. <% foreach (var item in Model.Messages) { %> <% } %> ...

Problem with .NET ToolStripMenuItem ImageAlign property

I am creating a .NET form application in Visual Studio 9. In the designer I have added a MenuStrip to where I have added ToolStripMenuItems (standard dropdown menu). To the ToolStripMenuItems I have added images by setting the Image property. The images appear as expected, except they are aligned to the left, even though the ImageAlign...

XmlSerializer.Deserialize method appends timezone to a time and datetime field

Have a small script in Microsoft.NET 2.0 that deserializes a XML back to a typed object, connects dyanimcally to a web service using ServiceDescription and binds the deserialized typed object to the WebMethod inbound. The XML prior to serialization looks like below <completion_time>12:19:38</completion_time> on the wire when communic...

Date/Time formatting in .NET (Devexpress Gantt charts to show time rather than date)

I have some data about a day's events that I'm trying to visualise as a Gantt chart using Devexpress XtraCharts. Devexpress's example here shows the chart being populated by date. However, I'd like it to be populated by time to compare the events throughout one day. My X-axis is displaying correctly - done like so: ganttDiagram.AxisY.D...

Java printf using variable field size?

I'm just trying to convert some C code over to Java and I'm having a little trouble with String.printf. In C, to get a specific width based on a variable, I can use: printf("Current index = %*d\n", sz, index); and it will format the integer to be a specific size based on sz. Trying: System.out.println(String.format("Current index =...

Automatically format sourcecode in Netbeans on save?

One Feature I miss from Eclipse are Save Actions for autoformatting. Any way to have the same in Netbeans? ...

How do I handle Column Headers in a Delimited Oracle Report

I am back in the Oracle 10g world and I need some help. I have created a dynamic Oracle report calling from an Oracle Form that will output a tab delimited file, but I am having problems with the orientation of the column headers. SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_DESFORMAT, 'DELIMITED') I have no problem with the functi...

Line breaks not working in UILabel

Hi folks, I'm loading some help text from a plist and displaying the same in the form of UILabels housed in a UIScrollView. Portion of the code follows: UILabel *sectionDetailLabel = [[[UILabel alloc] initWithFrame:CGRectMake(34, myOriginForThisSection, 286, 20)] autorelease]; sectionDetailLabel.backgroundColor = [UIColor cle...

How do I automate the formatting of PHP source?

I have a large-ish PHP project (hundreds of files) that I've been brought in to work on and the source formatting hasn't been very consistent from the beginning. I'd now like to take all source and format it according to the Zend Framework coding standards (tabs to spaces, short tags to full php tags, correct indenting, etc.), however t...

How to set tab stops after whitespaces in latex?

I'm trying to set tab stops in latex in the tabbing environment. My problem is that I want to set a tab stop after a number of whitespaces. The problem is that latex of course ignores multiple whitespaces, and it seems to only support setting tab stops after actual text. What I would like to be able to do is format the arrows below so t...

Format gridview

Can anyone give me a website with a tutorial on formatting the asp.net gridview? I want something that looks really good and professional (not just a basic tutorial that shows how to change colors and fonts in the properties window). I'm not a great designer, but I'd like something that looks like it was done by a great designer. ...

using xmllint or other formatter to correct indentations but not linefeeds

I'm using xmllint on the command line to normalize the various indentation schemes people are using. Unfortunately xmllint also likes to remove empty lines which I would like to keep because they help structure the document better. Is there any way xmllint (or some other tool) can correct indentations but allow empty lines? (Of course i...

as3 formatting a textfield

Hi, I'm dynamically creating textfields in as3, and formatting them with the TextFormat class. I'm having some issues though with selecting the exact "style" of font to apply to the textfields. My code so far looks like: formatT = new TextFormat( ); formatT.bold = false; formatT.color = 0x000000; formatT.font = "TradeGoth...

Preserve whitespace and formatting for text returned from $.get jquery call

I have a jquery $.get() call in my app that requests an entire web page. In the callback function, I access a div in the returned page, get its data and show it on my page. The problem is that the text I get from the div does not preserve the source formatting. If the div in the requested page had say an ordered list, then when i get t...