text

Read Unicode Files

Hello, i have a problem reading and using the content from unicode files . i am working on a unicode release build, and i am trying to read the content from an unicode file but the data has strange characters and i can't seem to find a way to convert data to ASCII . im using fgets, tried fgetws,WideCharToMultiByte and alot of function...

XML vs comma delimited text files

Ok, I've read a couple books on XML and wrote programs to spit it out and what not. But here's the question. Both a comma delimited file and a XML file are "human readable." But in general, the comma delimited file is much easier on my eyes than a XML file; the tags typically take up as much if not more space than the data. This just...

Find largest cluster of a particular word in a block of text

I have a block of text (of arbitrary length) with a particular word highlighted in yellow whenever it appears. I want to show only a 400 word chunk of the text but I want to show the chunk with the most highlighted words. Does anyone know a good algorithm for this? I have the character position of each highlighted word, so the algorith...

Detecting on-topic text?

I'd like to sift text (in particular, Twitter messages) to see if they relate to a particular topic. Have you been down that road? If so, I'd love to hear what approach you'd use. For my case, just searching for topic keywords gets me useful text about 7% of the time; the keywords have multiple meanings, some of which aren't on topic. F...

OS X Get highlighted text

Hi, I'm interested in writing a plugin for OS X to support multiple operations on highlighted text in the right click context menu. The operations are simple enough that I could write them by myself. I've looked at automator's "Copy to Clipboard" action, but it requires some text input first. The "Get contents of Clipboard" action will...

Searching text with 'Match case' and 'Match whole word' in file in C++ or Java

Hi. I need a solution in C++ or Java. Are there standard functions? ...

iPhone setting text from HTTP JSON response in UITableView displays corrupted characters

I'm trying to display text in a UITableView that's a response from a JSON containing something like "Congratulations you just won a prize!", and when I display it in a UITableView the first 9 characters are "corrupted" and display weird symbols. When I do an NSLog("%@", jsonString); I see the text correctly. Is there some type of UTF8...

Find URLs, @replies and #hashtags from Tweets

I'm building a little Twitter thing in PHP and I'm trying to parse URLs, @replies and #hashtags and make them into clickable links. The @replies would link to http://twitter.com/replies #Hashtags would like to http://search.twitter.com/search?q=%23hashtags I've found a class for parsing URLs and I'm wondering if this could also be u...

Control to view a file with a large amount of text

Is there a TextBox-like WinForms control that can show a large amount of text (hundreds of megabytes) in read-only mode? Of course it should work without loading the whole file into memory at once. I'm trying to implement this myself, using a standard TextBox, processing scroll and keyboard events and reading the amount of text necessar...

What is the best tool to query delimited text files in Java?

I need to execute basic queries on a text file which consists of several columns. I tried to use StelsCSV which is a JDBC Driver for CSV files. It is good but commercial. Do you know other tools for the same task? ...

Photoshop Mock Up Font isn't same as in HTML

(Beginner to HTML) I have made a Photoshop mock-up of the website I want to make, but the text I have used in the mock-up looks different when viewed in Firefox. The text is Arial font, size 18pt and regular weight, and I have implemented this into HTML code, but it looks different. Is there a way to make the font look the same in HTML...

Using HTML elements inside an XML loaded by Flash

I am trying to use html elements to style text inside an XML file that is loaded and displayed by flash. When I do this the text will not display at all. Here is a chunck of my XML : <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Page> <Title>You should be <b>Bold</b> ! </Title> <Page> When I try the code below, it disp...

how to use htmlparsing and curl in JAVA for this task...?

I'm trying to write a program that takes company names from a text file and searches them on a search engine website (SEC's Edgar search). Each search usually comes up with 1-10 unique search result links and so I want to use curl to click on the link with the relevant company name. The link page has a brief summary with the term "state ...

Oracle Equivalent of MySQL's TEXT type

Does Oracle have an equivalent column type to MySQL's TEXT type? If not, how are larger blobs of text typically stored? BLOB, varchar(32767)? It's Oracle 10 being accessed via PHP, if it matters. Historical context is more than welcome. ...

How do you parse multi-level "nodes" in text?

I have a configuration format similar to *.sln format, so take the following as an example: DCOM Productions Configuration File, Format Version 1.0 BeginSection:Global GlobalKeyA = AnswerOne .: Stores the global configuration key :: for the application. This key is used :: to save the current state of the app. :: a...

Cgi scripts returning data as html/text.. How safe is that?

Hi, It makes sense to return data when a form is submitted using post method. It looks as if only html/text can be returned ordinarily... I use gwt on the client side and it does not seem to work properly if plain/text is returned. The question: how safe is to return all kind of text using html/text? Is it possible that some data could ...

Auto-converting numbers to comma-fied versions

Given the following text /feeds/tag/remote-desktop 1320 17007 22449240 /feeds/tag/terminal-server 1328 15805 20989040 /foo/23211/test 1490 11341 16898090 Let's say we want to convert those numbers to their comma-fied forms, ...

Mozilla canvas adding floating text

Hi, In my canvas element,i want to add a draggable text over an image.User should able to move it within the canvas area.I could add text by using some API functions, but i have no idea of movable text.Do i need to use DIV tag to contain text ?,But the problem is, finally i need to save the canvas as an image file, so ordinary DIV tag o...

how text-heavy websites store text internally?

Hi all, I wondering, how those "text-heavy" websites, like stackoverflow.com, news.yahoo.com, bbc.co.uk store their text internally? Are those texts stored as text files? or stored in database? How do they cope with the ever-increasing content? ...

light weight HTML Parser for translating to formatted text?

I'm finding light weight HTML Parser for translating to formatted text. for example: <html> <body> <a href="http://www.google.com/"&gt;Google&lt;/a&gt; <img src="http://images.google.com/intl/en_us/images/logos/images_logo.gif" alt="Google image logo" /> <ol> <li>first</li> <li>second</li> </ol> <ul> <li>apple</li> <li>orange</li> </ul>...