text

Simple SWT question, how to have text fields fill 100% horizontally

If I have a text field with SWT, how can I get the field to fill to 100% or some specified width. For example, this text field will only reach for so much horizontally. public class Tmp { public static void main (String [] args) { Display display = new Display (); Shell shell = new Shell (display); GridLayout gridLay...

Best way to code stackoverflow style 'questions' / 'tags' rollover buttons

Whats the best way to implement rollover 'buttons' like Stackoverflow has for 'Questions', 'Tags', 'Users' at the top. It is actually implemented like this : <div class="nav"> <ul class="primarynav"> <li class=""> <a href="/questions">Questions</a> </li> <li class=""> <a href="/tags">...

Document,text format

Hi, to my project i need document editor for many types of documents(tabular data, invoices, letters, some formulars,...) and i am looking for text format and editor to acompish my task is there some MS Word like format? I know for example rtf, I need formating, invissible comment will be veeery good open format same 3th p. editor wi...

printing on screen and a text file

I need to dump the certain things into a text file and same has needs to be displayed on screen. (I'm telling about a C program utiltiy) The menu option looks like following, 1. display AA parameters 2. display BB parameters 3. display CC parameters 4. dump all 5. Exit Select option > If they select 1/2/3, it just needs to displayed ...

How to print out dash or dot using fprintf/printf?

As of now I'm using below line to print with out dot's fprintf( stdout, "%-40s[%d]", tag, data); I'm expecting the output would be something like following, Number of cards..................................[500] Fixed prize amount [in whole dollars]............[10] Is this a high winner prize?.....................[yes] How to prin...

How to explicity tell SVN to treat a file as text, not binary

I have a number of files that I checked into SVN without having set up their Mime types correctly. SVN initially classified them as binary. I've since set their Mime type in SVN via propset to "text/plain; charset=UTF-8" and I'vc made sure that all the files are UTF-8 signed. When I do 'svn blame filename', svn says that the file is b...

Best way to show a edit text over screen?

If I have a application that has a primary layout of Portrait (It is fixed as portrait), but there is one place to type in text. I would like to launch like a popup window but in Landscape w/ the background image fogged out? I hope that makes sense. I know there is a Popup Widget, but any ideas to rotate the edittext box would be great. ...

Fluid layout of text in Flex3

In my Flex3 app I have some floating windows which contain variable amounts of text. The windows are meant to be user-resizable. Currently, while I can resize the windows OK, I can't get the text in a TextArea in the window to re-flow when the window is resized. I've come across blog postings that there's a size bug in TextArea that mean...

How do I change text color using flash actionscript 2?

How do I change text color using flash actionscript 2? ...

What's a good html e-mail template system that also, correctly, renders a text/plain alternative?

We have a web application that periodically sends out e-mails to users. At the moment we generate the html version and the text version in the code. However, this is cumbersome to maintain. Is there a good e-mail template system out there that can generate both the html and text versions of an e-mail from the same template for Java? So...

Tool or language to count occurrances of errors in a log file

I am trying to determine the best way to parse a log file and get a count of all of the errors in it by type. Currently, I open the log in a text editor, strip out the date and thread ID, then sort the file. This puts all errors together by type, which I can then count (using the count function in the editor, not manually). I am looki...

Print a text file without any interaction with print dialogue & page setup.

u can set font name & pitch for known windows notepad. setting margins & etc. & then print file with /p switch. but many other properties such as orientation has no desired behavior. any idea for this problem? such as vbscript, using api or dll or ... ...

How to limit JTextArea max Rows and Coloums?

I am using JTextArea in JScrollPane I want to limit the maximum number of lines possible and the maximum chars in each line. I need that the string will be exactly like on the screen, each line will end with '\n' (if there another line after it) and the user will be able to insert only X lines and Y chars in each line. I tried to limit ...

Java library for free-text diff

I need to match up two almost-the-same long freetext strings; i.e., to find index-to-index correspondences wherever possible. Because this is freetext, the comparison should not be line-based as in code diffing. Any suggestions for Java libraries? A simple example (In real life , of course, there would not be extra whitespace to lin...

Loading a text file into a vector <string>

I want to load separately the words on a text file like text.txt Hi this is a text file with many words I don't know how many into a vector<string> how do I go about it? ...

Get MySQL columns width ?

Hello. I was wondering if I can somehow convert a column header text form MySQL into actial width size pixels. I am trying to generate a PDF from the database and I want it to automatically adjust column widths. As I will use it for many tables, the width must differ so I should be able to see it like: "The header for this column is call...

How do I convert a HTML table to a fixed font textual table?

I have an application in Perl that reads in HTML based mark up and converts it to a textual output. One of the things I have encountered is the need to easily convert a HTML table to a fixed font output. <table border="1"> <tr><td>Hello</td> <td>World</td> <tr> <td>foo</td> <td>bar</td> </tr></table> I am looking f...

What's the best tradeoff between text and icons on buttons?

In a discussion with co-workers today, I lamented that I can't ever remember what an icon means, and have to hover over them to see the tooltips, and thus to find the button I need. On their side, they were saying that when the text needs to be translated, it might not fit (German vs English for example), and that every place where the...

Is there a way to Convert Number words to Integers? Python

I need to convert 'one' into '1' 'two' into '2' and so on. Is there a way to do this a library or a class or anything? ...

Outputting to a text file

How to print the following code to a .txt file y = '10.1.1.' # /24 network, for x in range(255): x += 1 print y + str(x) # not happy that it's in string, but how to print it into a.txt There's copy paste, but would rather try something more interesting. ...