text

How does one reproduce the inset text style when drawing text with Mac OS X Cocoa?

I'm talking about the groove style of the text on focussed title bars, or safari's bookmarks bar for example. Is there an easy way to reproduce this style when using: [string drawAtPoint:... withAttributes:...]; ...

How can I get the untruncated text value of an <OPTION> element?

I have HTML output similar to this: <select> <option value="1">Item1 </option> </select> How do I use JavaScript to get the value "Item1 " (with the space) rather than "Item1"? In Internet Explorer all the properties I've tried, e.g. text, innerHTML, data, nodeValue return "Item1" instead of "Item1 ". Interestingly in Firefox, textC...

Preset Value on Infragistics UltraCombo

I have an ingragistics ultraCombo that I set to a specific datasource. I want to pre-select one of those values so the user doesn't have to choose it (most of the time it will be the pre-selected value). However, when I set the ultraCombo to that value it modifies the dropdown list to contain only that single value! I've tried using...

How can I add a new line to the beginning of a file without overwriting any data?

I am trying to figure out how to write a new line of text at the beginning of a file (a header). I know I can open the file, or seek to the beginning of a file, but if I write with that, it will overwrite what's there. Do I have to write a new file and then write the other data to it line by line, or is there a better way? Example file:...

How can you measure the space that a text will take in Javascript?

In Javascript, I have a certain string, and I would like to somehow measure how much space (in pixels) it will take within a certain element. Basically what I have is an element that will float above everything else (like a tooltip), and I need to set its width manually through Javascript, so it will adjust to the text inside. I can't h...

Shortening large CSV on debian

I have a very large CSV file and I need to write an app that will parse it but using the >6GB file to test against is painful, is there a simple way to extract the first hundred or two lines without having to load the entire file into memory? The file resides on a Debian server. ...

How fast is MySQL compared to a C/C++ program running in the server?

Ok, I have a need to perform some intensive text manipulation operations. Like concatenating huge (say 100 pages of standard text), and searching in them etc. so I am wondering if MySQL would give me a better performance for these specific operations, compared to a C program doing the same thing? Thanks. ...

Textual Irregularities

Does anybody know of a library or piece of software out there that will locate irregularities in text? For example, lets say I have... 1. Name 1, Comment 2. Name 2, Comment 3. Name 3 , Comment 5. Name 10, Comment This software or library would first cut up portions of text that it would find similar (much alike a piece of compression...

Windows style text editor for .NET

Can you guys recommend a Windows style text editor control for a .net winforms application? Under $100 preferably. ...

what is the best way to mark any text?

I need users to mark some section of text with custom tags, I can't use the xml based tags as the whole text will be embedded in XML documents and all the < will be converted to html escape code <. I want users to marks some section of text with tags like skip, bookmark, these tags can have attributes also like bookmark name="first". Whi...

Writing from one form to another

I have two forms. Form A has three text input; A1, A2, A3. Form B has one text input, B1. Whenever you type in any of the inputs on Form A, Form B should get updated, right away, with all three inputs from Form A. If one of the Form A inputs is empty, a 0 should replace it in B1. For example, if I'm typing "test" in A1 and leave A...

What is the easiest way to join 12 columns?

I have 12 columns separated by a tab. How can I join them side-by-side? [Added] You can also tell me other methods as AWK: the faster the better. ...

Open .csv file containing special characters in Excel

I have a system that exports a .csv file and some of the rows contain special box characters such that the data looks like this: Please specify the primary type of opportunity which you’re proposing: └─ Please specify what type of sport: └─ What is this person’s vocation? └── How long have they been in the industry? However, when I op...

File Vs Database

I'm going to implement an Access Control List for each individual user so they can assign access to their own resources so they can hide stuff, for example, from their mothers, but show their friends. Now storing ACL in a database seems like it can get pretty insane when each user is also a group, which can have many sub groups. So I'm ...

Analyzing, categorizing and indexing metadata

I have a large (~2.5M records) data base of image metadata. Each record represents an image and has a unique ID, a description field, a comma-separated list of keywords (say 20-30 keywords per image), and some other fields. There's no real database schema, and I have no way of knowing which keywords exists in the database without iterati...

How would you justify text in Silverlight?

Does anyone have any suggestions on how to justify read-only text (rendered into a TextBlock) in Silverlight 2? WPF supports text justification by way of the TextAlignment enumeration: public enum TextAlignment { Left, Right, Center, Justify // <--- Missing from Silverlight :( } However, Silverlight 2 only supports the...

How can I determine the content type of a file in .NET?

I'm given a filename and I have to be able to read it from disk and send its contents over a network. I need to be able to determine whether the file is text or binary so I know whether to use a StreamReader or BinaryReader. Another reason why I need to know the content type is because if it is binary, I have to MIME encode the data be...

how to get a Flex text control to word wrap

I'm creating an Adobe Flex application and I have a Text control (mx:Text), which is supposedly used when you need multiline noneditable text (as opposed to a Label, which is single line noneditable text). My text control does not wrap when I resize the browser window to be smaller than the text (or load it with the browser window alrea...

How do I draw text with GLUT / OpenGL in C++?

How do I draw a text string onto the screen using GLUT / OpenGL drawing functions? ...

Creating xml files from a database or list of variables.

I have a template and need to create several xml files. The file contains one variable -this- to replace several times, save it as that name -this-.xml and then repeat for each of the values in my text or excel list or from a database - How would I best go about doing this? ...