text-formatting

How do I make a specific word (variable) in a message box bold in Java?

Hi all, I'm trying to make one word (variable) of a message box bold in my Java program. Here is my code: int n = messageBox.showConfirmDialog(frame, "The File "+ file +" already exists." + "\n" + "Do you want to replace it?", "File Already Exists!", messageBox.YES_NO_OPTION); I want to make the variable "file" appear in bold text in...

How to write to a text file in pipe delimited format from SQL Server / ASP.Net?

I have a text file which needs to be constantly updated (regular intervals). All I want is the syntax and possibly some code that outputs data from a SQL Server database using ASP.Net. The code I have so far is : <%@ Import Namespace="System.IO" %> <script language="vb" runat="server"> sub Page_Load(sender as Object, e as EventArgs...

LaTeX - Making a lighter version of text, like anti-bold?

I'm making a LaTeX document for someone. A certain piece of text looks "bold" for them, even though I'm not using the \textbf command. It's just a normal default LaTeX font. Is there any command to make a 'lighter version', i.e. make the text lighter, thinner? Something that looks to normal text, what normal text looks to bold? ...

how to use "tab space" while writing in text file

SimpleDateFormat formatter = new SimpleDateFormat("ddMMyyyy_HHmmSS"); String strCurrDate = formatter.format(new java.util.Date()); String strfileNm = "Cust_Advice_" + strCurrDate + ".txt"; String strFileGenLoc = strFileLocation + "/" + strfileNm; String strQuery="select name, age, data from basetable"; try { stmt = conn.creat...

Why would LaTeX ignore the font size in the documentclass

I have a LaTeX file. I'm experimenting with trying to reduce the font size (this is related to my other question here http://stackoverflow.com/questions/2636647/latex-changing-the-font-size-for-a-document-but-in-the-preamble-not-the-docum ). The LaTeX file is generated from another programme. I have edited it to start with \documentcla...

Vim: wrap text ("gq") without modifying underlined headings

Is there a way of formatting text in Vim that respects underlined headings? In Markdown, there are two ways of representing headings: #Level 1 heading ##Level 2 heading ###Level 3 heading and for level 1 & 2 only: Level 1 heading =============== Level 2 heading --------------- I am fond of the underlining style, as I think it rea...

reStructured Text - Escape a headline?

I have a reStructuredText document. rST uses =====, etc. as a heading format. However I need to include some lines that have this text in it, e.g.: some of my text ===== stuff ===== some more of my text And I don't want the ==== to be interpreted as a heading, i.e. I don't want stuff to be a heading. I would rather that those equal s...

Formatting Text in C# with XNA

Hello, I'm currently trying to make a TextBox for my GUI with XNA, and I was wondering how could I find tagged text in a string. For instanceI have this kind of text: Hey there, I was <r>going to</r> the <b>Mall</b> today! So the <r> tag would represent red text and the <b> tag would represent blue text. And I want to know exactly whe...

read pdf file with original contents

Hi I want to read pdf file with original content like its font(its possible that some font size is small while some font size is big ) and paragraph and table if it is. how its possible. plz help. ...

How can I output a list as comma-separated values in Perl?

Let's say I have a list of elements @list=(1,2,3); #desired output 1,2,3 and I want to print them as comma separated values. Most importantly, I do not want the last element to have a comma after it. What is the cleanest way to do this in Perl? ...

Using a FormattedText object, how do I find out how much of my text was actually displayed?

If I have code like this: FormattedText text = new FormattedText(sTheBook, System.Globalization.CultureInfo.CurrentUICulture, System.Windows.FlowDirection.LeftToRight, new Typeface("Times New Roman"), 13, Brushes.Black); text.MaxTextWidth = 300; text.MaxTextHeight = 600; text.TextAlignment = TextAlignment.Just...

How to output integers with leading zeros in JavaScript

I can round to x amount of decimal places with math.round but is there a way to round left of the decimal? for example 5 becomes 05 if I specify 2 places ...

Web page text display problem.

I keep getting these weird text characters when I display user submitted text. like in the following example below. Is there a way I can fox this using PHP, CSS or something so that the characters are displayed properly? Here is the problem text. Problems of �real fonts� on the web. The one line summary: different browsers and dif...

LaTeX - Automatically scale down an area so that it will be inside a page if it's too big?

I'm making a document in LaTeX. It includes a set of images in a row. A small percentage are quite wide and will stretch and push off the page. If I shrink all the image sequences then most of them will look too small. However it's not easy to figure out what sets are going to be too large. I'd like some automatic way to resize these set...

LaTeX - Description list - Split the item across multiple lines

I have the following LaTeX file. Notice how the item on the description is very long ...foo.... \documentclass{article} \begin{document} \begin{description} \item[foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo foo] bar \item[baz] bang \end{description} \end{document...

LaTeX - Lots of sections (with no content) running of the edge of the page?

I have a LaTeX document like this: \documentclass{article} \begin{document} \section{1} \section{2} \section{3} \section{4} \section{5} \section{6} \section{7} \section{8} \section{9} \section{10} \section{11} \section{12} \section{13} \section{14} \section{15} \section{16} \section{17} \section{18} \section{19} \section{20} \section{2...

Searching Math Symbols as Text: Mission Impossible?

How could the math types being represented in a format that are searchable like text? I mean that there is a toolbar that you can have input math symbols and search for them as text, so the format can represent math symbols as text. Is it such a task impossible to implement because math types can be represented only as icons? What do ...

How to handle text copy/pasted from Word

We have a textbox where users will be entering reviews. They should be able to do simple formatting things like bold, italics, lists, headers, etc... Our problem is that the majority of our users will most likely create their reviews in MS Word then copy/paste the text to our form. As you know, this can (and mostly will) cause problems w...

Text formatting in NSTextField

I have a graphics app that uses a NSTextField instance for in-place text editing, this feature was added long time ago and I never had a reason to check it, however, I have recently received a report: text filed doesn't allow text formatting. Format -> Text menu subitems are all disabled, so there is no way to set the paragraph of a text...

How to know the preferred display width of Unicode characters?

In different encodings of Unicode, for example UTF-16le or UTF-8, a character may occupy 2 or 3 bytes. Many Unicode applications doesn't take care of display width of Unicode chars just like they are all Latin letters. For example, in 80-column text, which should contains 40 Chinese characters or 80 Latin letters in one line, but most ap...