formatting

Format an input with Jquery?

I'm building a calculator that has a slider. Everytime I slide the bar an input box is updated with the number, the calculator passes the value and updates the calculation. So my input boxes have dollar values that can range anywhere from $0 to $10,000. Right now my boxes display 0 to 10000 and I want them to be displayed as $0 to $10...

Conditional Formatting in Excel

I'm very new to Excel and VBA and was wondering if there is a way I could make conditional formatting based on values in a drop down list (created from data validation). I currently have a warning if the user enters something that is not valid (data validation), but I want to change the cell's background color to red if invalid, or gree...

Is there an XmlWriter that writes a colorful HTML-formatted output for displaying XML in a webpage?

I've got a bit of XML I want to display on my ASP.NET website as-is (for debugging purposes), and it would be nice if it was colored. This should be easy to achieve with the right kind of XmlWriter, but I don't have the time to make one myself. Is there an existing (free) component that can do this? ...

In Rails, how can I allow some html in a text area?

I have a Rails app (blog) that I am creating. Very basic stuff. In my content area I have a text area for the content of the post. I am needing to include some html in the text area (links, formating, etc). <%= f.text_area :content %> Is there another tag that I can use instead of text_area, that will allow me to do this? ...

Format results in sql management studio

Good morning. Is it possible in some way to format the results of a query, like changing for example the background color of a selected row of the result to higlight negative values? Thanks. ...

HTML to 'pretty' text conversion for printing on text only printer (dot matrix)

Hi, I have a web-site that generates some simple tabular data as html tables, many of my users print the web-page on a laser/inkjet printer; however some like to print on legacy Dot Matrix printers (text only) and there-in lies the problem. When giving Print from web-browser onto dot-matrix printer, the printer actually perceives data...

How do I prevent a <td> from being too high?

It must be something stupid, but I can't figure it out so far... Here is my HTML: <table cellspacing="0" cellpadding="0" border="0"> <tr> <td style="height: 8px"><img src="/media/note2.png" width="8" height="8" border="0"></td> <td style="height: 8px"></td> <td style="height: 8px"><img src="/media/note1.png" width="8" heigh...

Eclipse Clean Up and Formatting settings for Android application

I’m looking for a settings file that is customized for Android development, can you point to any? ...

XSLT 1 Plain Text Spacing

Using Perl's XML::LibXSLT necessitates that I use XSLT 1.0, which means that I am stuck without XSLT 2.0 features. Is there a way that I can still pad text cleanly in a plain-text output from my processing? What I want is: <values> <headers> <header>Header 1</header> <header>Header 2</header> </headers> <va...

Good way to format decimal in SQL Server

We store a decimal(9,8) in our database. It can have any number of places after the decimal point (well, no more than 8). I am frustrated because I want to display it as human-readable text as part of a larger string created on the server. I want as many decimals to the right of the decimal point as are non-zero, for example: 0.05 0....

CKEDITOR - Is there anyway to prevent formatting code in SOURCE mode?

I've spent the good portion of my day trying to figure this out, and I figured I'd finally just give in and ask. How can you prevent ANY automatic formatting when in SOURCE mode? I like to edit HTML source code directly instead of using the WYSIWYG interface, but whenever I write new lines, or layout tags how I would indent them, it al...

How do I format an email for Gmail?

I'm sending out an email using CodeIgniter's built in library. All I'm trying to do is send a bolded string, but instead of rendering the tags, it is printing them. What I have: <html> <head> </head> <body> <b>Donkey</b> </body> </html> That is, character for character, the email I'm getting. Why aren't the tags rendering? ...

Using h:outputFormat to message-format the f:selectItems of a h:selectOneRadio

I am having some trouble with using h:selectOneRadio. I have a list of objects which is being returned which needs to be displayed. I am trying something like this: <h:selectOneRadio id="selectPlan" layout="pageDirection"> <f:selectItems value="#{detailsHandler.planList}" /> </h:selectOneRadio> and planList is a List of Plans. Pla...

SQLInForm.com like plug-in for SQL Server 2008

Is there a plug-in like the java applet @ SQLinForm.com for MS SQL Server Management Studio 2008? I tried SSMS tools based on someone's answer to my previous question but I don't find any functionality to format (beautify/tabify) SQL. If somebody could please point out that in SSMS tools or suggest some other tool (preferably free) T...

Format String become xxx1, xx10 or 1###, 10## etc

Hi all, I have following numbers : 1, 2, 3, 4, 10 But I want to print those numbers like this: 0001 0002 0003 0004 0010 I have searched in Google. the keyword is number format. But I've got nothing, I just get, format decimal such ass 1,000,000.00. I hope you can suggest me a reference or give me something to solve this problem. ...

HTML element that contains no formatting

I'm constantly modifying some text on a web page with JavaScript. I want the text to be in-line with other elements, like texts, inputs, etc. What HTML element should I use? Both <div> and <p> create new-lines and other things. <b> kind of does what I want, but it bolds all the text. What's the correct alternative? ...

Passing in number, Number.prototype.format

I've seen this format function referenced on several sites, but none of them have an explicit example of how to pass in a number into the function. I've tried '12345'.format('0.00') which I believe is how it should be written, but it gives me the error that the object doesn't support the property or method. I've also tried Number('1234...

Regex for url formatting (www.domain.tld to anchors)

Hi. I'm currently developing a little browser-based Twitter widget. Currently, I'm stuck with getting the URLs to work. I'm kinda newbie, when it comes to regex (I know, how to get parts of a string, but this one – tough one). So, I need a regex that would search/replace www.domain.tld -> <a href="http://www.domain.tld"&gt;http://www....

Asp.Net MVC 2 Html.TextBoxFor Best way to specify a format string for a DateTime property of model

As the question title explains, what is the best way to specify a format which my Views use when displaying values of a DateTime property via the Html.TextboxFor method. The default display includes the Date and Time where I really only want the Date displayed. Thanks ...

Java Code Formating

I'm using FreeMarker to generate java code, but as most of it is dynamically generated it's difficult to control the code formation. I want to get code well formatted. Does anyone knows a lib or something like a pretty printer for java code? ...