text

jQuery text truncation (read more style)

Hi There, My question is very similar to "http://stackoverflow.com/questions/2104653/trim-text-to-340-chars" but in jQuery. It sounded very straight forward but when I searched around I couldn't find any reference for it. Ok, I have a div $('#content') I want to trim the text to 'x' amount of characters lets say '600' BUT I don't want ...

Formatting an output file.

I'm currently indexing my music collection with python. Ideally I'd like my output file to be formatted as; "Artist; Album; Tracks - length - bitrate - md5 Artist2; Album2; Tracks - length - bitrate - md5" But I can't seem to work out how to achieve this. Any suggestions? ...

Add Text to the Image

HI Im currently developing an application where i have to add the text over the image at any position in the image(not subview) and the output should be the single image file with the original image and the text embedded in it,any help will be appreciable. eg : water mark on the image Thanks sivasankar ...

jQuery find if a dynamic generated <p> have text

I try to find if a dynamic created <p> have text. '.layer'+count returns my class but I can not get it to work with .lenght. if ( ($('.layer'+count).text()).length > 0 ){ alert ('I have text') } Any tips on making this work? Thanx ...

Adding text to start of each new line in a .txt file

I would like to add a predefined text to each new line on a text file and create a new text file with the added text. Please help. ...

Mysterious Orphan Text

I'm using a sliding the [jquery.hslides.js] plugin for a project... I've never seen anything like this but when I changed the overall width of the sliding container, out of nowhere I have these orphan bits of text floating around. I have ZERO clue where they came from... they're not selectable. You can see them here: http://cld.ly/821d...

Changing the highlight color when selecting text in an HTML text input.

Hey folks! I've been looking for this throughout the web and can't even find anyone else even asking this, let alone a solution... Is there a way to change the color of the highlight area within a a text input when text is selected? Not the highlight border or the background, but the portion that appears around the text when you have t...

Editing files in PHP

Is there a way to append or remove a line of text from a file using PHP. I am in the process of writing a hosting control panel for my specific web hosting stack and would like to be able to make changes to the files with minimal requirements to touch the file system, and as such would like not to have to rewrite the whole file to add o...

Python repr function problem

Hi, I'm dealing with some text parsing in Python and for that purpose, it's good for me to apply repr() function on each string I'm gonna parse, but after the parsing, I need to convert some parsed substring back to the previous representation, because I want to print them and I'm not able to do this. I thought that str() function shoul...

How to count how many time a word occurs in an xml file.

I was given the task of doing quality check on a machine translation xml file. The translations are from English to a foreign language. I have about 2000 translation blocks in the file and I have to check 200 of them by adding my remarks in the block enclosed in a < comment > tag with a quality attribute. Is there a linux command or some...

Delete the line contains specific words/phrases with PHP

guys i have a text file and i want to remove some lines that contain specific words <?php // set source file name and path $source = "problem.txt"; // read raw text as array $raw = file($source) or die("Cannot read file"); now there's array from which i want to remove some lines and want to use them so on example words, martin , m...

Text editor inside of OpenGL?

Does anyone know of a good text editor implemented inside of OpenGL? I'm writing this OpenGL app, and I need some basic text editing apps inside of the app. [Not an external application.] Thanks! (PS; if it's a mini-vi clone inside of OpenGL, even better!) Edit: I'm using C++. ...

How to read a file from a jar file?

hello guys I have a file on a jar file; it's 1.txt for example how can I call it ; my source code is : Double result=0.0; try { File file = new File("1.txt")); //how get this file from a jar file BufferedReader input = new BufferedReader(new FileReader(file)); String li...

How to insert text with several pages into iReport? a contract, for example

I am trying to create auto-fillable contract with several pages in latest iReport. The problem is it allows to create one big page or create several static pages with static text, but my text is flexible. thanks. ...

How to create layer that floats above the tabbarcontroller on the iphone.

'lo all. I am in the ending portion of my app for the iPhone and found that I am in a section of the app where I want to give feedback about the status of some background process running (location manager accuracy) and want to place it in the lower left of the screen. This can tell a user how "sure" we are about the given search resu...

Java - best library to help draw text at arbitrary anchor points

Hi all, I'm familiar with how to use the various FontMetrics functions to center text vertically, horizontally, and whatnot. However, I am looking for a library that supports drawing text at a given xy location relative to the string (e.g. I want the center of the string at x,y, or I want the upper right corner of it to be here, etc.) ...

How do I replace lines in the middle of a file with Perl?

I am opening the file in append mode. I need to replace lines 2,3, and 4 in the file, and later I need to add the new data at the end of the file. ...

Techniques to display related content or articles

Hi I've been trying to learn Text mining and other related things in Collective Intelligence field. I am interested to make an app which will scan thru the document and show related posts/articles on page. What algorithm(s) would be helpful to retrieve required info? Thanks /A ...

Remove duplicate domains from list with regular expressions

I'd like to use PCRE to take a list of URI's and distill it. Start: http://abcd.tld/products/widget1 http://abcd.tld/products/widget2 http://abcd.tld/products/review http://1234.tld/ Finish: http://abcd.tld/products/widget1 http://1234.tld/ Any ideas, dear members of StackOverflow? ...

Win32 API GroupBox: How to get an offset of text in the header

I have a groupbox (BS_GROUPBOX) like this: http://i50.tinypic.com/34osspd.png (Sorry, new users like me cannot insert images directly) The text of header is sets dynamicaly. I need to determine that current text fit width or not. I use GetTextExtentPoint() to determine string width (textWidth) and, of course, I know a size of control (...