text

Overlayed text?

Hi! Quick text-processing question. It's not necessarily related to programming, but this is the best place I figured I should go. Rate down to tell me this kind of question is not welcome here. (Though, I really like my one little reputation point.) Anyways, how can I encode text so that two characters get rendered in the same charspa...

strip_tags plus annotate links

Note: The input HTML is trusted; it is not user defined! I'll highlight what I need with an example. Given the following HTML: <p> Welcome to <a href="http://google.com/" class="crap">Google.com</a>!<br> Please, <a href="enjoy.html">enjoy</a> your stay! </p> I'd like to to convert it to: Welcome to Google.com[1] Please, enjoy[2...

How to count the occurrences of a string inside TEXT datatype in sql server 2005

There is a column of datatype TEXT in my table. Now, I need to find the number of occurrences of a string in that TEXT field. I have already created a Full-text index on that table. But I don't know how to proceed further. I already found ways to count string occurrences for VARCHAR. But they cannot be applied AS IS to TEXT field. Any s...

Java text analysis libraries

I'm looking for a java driven solution to a requirement for analysing sentences to log whether a key word was used positively or negatively. Ie The key word might be 'cabbages' and the sentence:- 'I like cabbages but not peas' And I'd like a java text analyser of some kind to log this as positive. Can the lucene (Hibernate-Search) li...

Silverlight 4.0 + MVVM Pattern + Copy Paste a name in AutocompleteBox

Hi, I am using a Autocomplete textbox for "like" search text from Database using KeyDown Event. One of the scenario is COPY-PASTE textname to Autocompletebox where data is already available in Database. I was unable to complete this scenario because when I try to paste the text, "Ctrl" is getting fired instead of "Ctrl+V" from keyboar...

How to disable text selection with css or js?

Hi every body! I am making a html/css/jquery gallery, with serveral pages. I indeed have a "next" button, which is a simple link with a jquery click listener. The problem is that if the user click the button serveral times, the text of the button is selected, and then the full line of text. In my really darky design, that is really ...

Tkinter text highlighting in python

Hello guys. I wanna know how to change the style of certain words, expressions .. etc based on certain pattens. I am using the Tkinter.Text widget and I am not sure how can we do such thing (The same idea of syntax highlighting in text editors). I am not sure even if this is the right widget to use for that purpose. ...

Simple way to read and write name value text file

Hi I have some class with lots of fields; public class CrowdedHouse { public int value1; public float value2; public Guid value3; public string Value4; // some more fields below } My classmust be (de)serialized into simple Windows text file in the following format NAME1=VALUE1 NAME2=VALUE2 What is the most co...

How can I animate a lot of text behind a graphic?

The page would be white with the shape of the Taj Majal punched out (i.e., a mask) with the letters scrolling from right to left on a layer below the mask. See a visual comp here. Each line of text should scroll independently, and loop around when it reaches the left edge. I've looked at SVG, HTML5/canvas, and jQuery marquee. Is one of...

How can I grep and sort text files using Perl?

I have a simple log file which is very messy and I need it to be neat. The file contains log headers, but they are all jumbled up together. Therefore I need to sort the log files according to the log headers. There are no static number of lines - that means that there is no fixed number of lines for the each header of the text file. And ...

Truncate a label: find out when text overflows a 2-row 400px-long label.

I have a (fixed-width and height) label which sums up a long list of selection criteria, and the specs say that, if label content exceeds 2 lines @ 400px, it should be trimmed, an ellipse should be added, and the rest should be displayed in a hovered div on mouseover, à la tooltip. I'd like some advice on which is the best way to pick th...

iphone / ipad: Font problem for non-latin languages

Hello All. I have a problem about the font in iphone/ipad Everyone knows UILabel can't do rich text. So I choose FrontLabel http://github.com/zynga/FontLabel/blob/master/README I guess what FrontLabel is doing is something like NSAttributedString and core text framework, and also, it is quite low level. But anyway, I have a problem....

positioning in css?

sorry im a newbie in css, so please dnt be angry at me, i really wanted postion something like this: taking in mind that the number will grow, so the text has to stay in the middle. if you get what i mean! :)) ...

Add space between glyphs when drawing a FormattedText object

I am drawing a block of text using a FormattedText object and DrawingContext.DrawText(...) and I am wondering if there is any way to add more space between the glyphs. If not, I can always draw each glyph separately and manage the location so I can add the space manually, but I am hoping for an easier way. jorj ...

How do applications like Firefox calculate text height efficiently?

I'm curious about what technique fast applications (maybe Safari is a better example here) do to calculate the height of a terribly long page of text (for example, a chat log or a huge document). Considering there is a huge amount of text with the same line height, this is already something that can be multiplied by the number of those ...

Hyper Text Coffee Pot Control Protocol

I know that the Hyper Text Coffee Pot Control Protocol is a joke, but is there say a joke browser that supports htcpcp? ...

How would you process 1GB of text data?

Task: Process 3 text files of close to 1GB size and turn them into csv files. The source files have a custom structure, so regular expressions would be useful. Problem: There is no problem. I use php for it and it's fine. I don't actually need to process the files faster. I'm just curious how you would approach the problem in general. I...

number of lines in UILabel

I need to get the number of lines in a UILabel, so that I can move another UILabel to be at the bottom of the last line of text. I have done: int lines = [cellDetailTextLabel.text sizeWithFont:cellDetailTextLabel.font constrainedToSize:cellDetailTextLabel.frame.size lineBreakMode:UILineBreakModeWordWrap].height /16; but well it's not ...

C# make a list with image and label like Messenger

Hello, How can I build on C# a a list like on Messenger where contacts appear with an image and a text with the contact's name? What components should I use to build it? Using Winforms by the way. Thanks ...

How do I combined CSS text-shadow and "background-image: -webkit-gradient"

I am trying to achieve a gradient + text shadow effect in Chrome/Safari using CSS text-shadow and a combination of text-shadow and background-image: -webkit-gradient, see example blw. I can only make one of the effects apply(if I add the shadow the gradient disappears. What am I doing wrong? h1 { font-size: 100px; background-image: -web...