text

split text file in two using bash script

I have a text file with a marker somewhere in the middle: one two three blah-blah *MARKER* blah-blah four five six ... I just need to split this file in two files, first containing everything before MARKER, and second one containing everything after MARKER. It seems it can be done in one line with awk or sed, I just can't figure out h...

Recommendations for PDF text extraction

Hello, can anyone recommend a library/API for extracting the text and images from a PDF? We need to be able to get at text that is contained in pre-known regions of the document, so the API will need to give us positional information of each element on the page. We would like that data to be output in xml or json format. We're curren...

Javascript text range in firefox + greasemonkey

Hello, i m a beginner but i need a script that could help me in some pages. I need a script that analazizes the text in the page and if there is the word that i m searching for it shows a popoup, if not does nothing. here s the code but it doesn t work with firefox because the text range function is only for IE (probably won t work eithe...

identify select drop-down text using jquery $(this)

I've got several select elements on a page e.g. <select class="dd" id="dropdown1"> <option value="123">Option A</option> <option value="234">Option B</option> </select> <select class="dd" id="dropdown2"> <option value="456">Option C</option> </select> etc etc I would like to use jquery's $(this) to identify which of the s...

Java library or text file that maps mime types to nice human friendly file types.

GOAL My goal is to find a text file or library that enables me to map when given a mime type input and return a nice human friendly format. For example given the mime type for Word (as shown below) I would like a result that is something like "Microsoft Office Word Document". application/vnd.openxmlformats-officedocument.wordprocessing...

python - edit a text file

hi, I am using python and i want to delete some characters from the end of a text file. The file is big a and i dont want to read all of it and duplicate the interesting part. My best guess is that i need to change the file size.... can anyone help me please thanks ...

Bash: append text to last line of file

How can I add a percentage symbol % to the end of the last line in a text file? I do not want the % to be on a new line, it must be at the end of the last line. Thanks! ...

HTML Single Line Text, appended with "..." if longer than one line?

Does HTML support a behavior of text rendering where multiple lines will be avoided with an automatic placement of "..." ? Sorry, I just cannot find the style/tag associated with this behavior, if it exists! ...

How to read data in certain format

I have a log file that can get pretty big. The information in my log file is in a certain format and I want to be retreiving them a seperate blocks of data. For example, This is the start. Blah Blah Blah Blah Blah Blah Blah Blah Blah This is the start. Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Blah Bla...

How to get the "Text" of a html page ? (Webbrowser - Delphi)

Hi , I'm using WebBrowser to get source of html pages . Our page source have some text and some html tags . like this : FONT&gt;&lt;/P&gt;&lt;P align=center&gt;&lt;FONT color=#ccffcc size=3&gt;**Hello There , This is a text in our html page** &lt;/FONT&gt;&lt;/P&gt;&lt;P align=center&gt; &lt;/P&gt; Html tags are random and we can not ...

Parse line of text

Hi all, I have thousands of text files, and each file contains just a single line of text. Any single file looks like this: somevalue1|somevalue2|somevalue3|somevalue4|somevalue5 The format never changes, and from above, you can see how each value is separated by a "|". And there are always exactly 5 values in each file. Can someon...

Excel formatting...

I have a spreadsheet with text in column A. For example A1=MY TEXT1 A2=MY TEXT2 A3=MY TEXT3 A4=MY TEXT4 A5=MY TEXT5 I want to add an apostrophe to the front and back of the text Result to be: B1='MY TEXT1' B2='MY TEXT2' B3='MY TEXT3' B4='MY TEXT4' B5='MY TEXT5' It seems like a straight forward thing to do. Any one know how? ...

How can I tell if a file is text using PHP?

I'm making a search engine for our gigantic PHP codebase. Given a filepath, how can I determine with some degree of certainty whether a file is a text file, or some other type? I'd prefer not to have to resort to file extensions (like substr($filename, -3) or something silly), as this is a linux based filesystem, so anything goes as far...

Weird situation with TextBox.Text property in WPF

This one has me stumped. I found some code posted by Ray Burns to create a DependencyProperty for a TextBox that allows you to restrict which characters can be deleted by the user. I modified it a little to instead restrict which characters can be inserted, and used that to create TextBoxes that only accept numeric input (plus the decima...

How to make the text "test" larger or smaller as the div's resize using jquery ui .

this is my code : <!DOCTYPE html> <html> <head> <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"&gt;&lt;/script&gt; <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jq...

How to get whole text including tags from an XML file with jQuery

I have an xml file like: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <legends> <legend> <number>1</number> <legendString><ul><li>1.across:a system of rules of conduct or method of practice</li><li>1.down:a disagreement or argument about something important</li><li>2.down:any broad thin surface</li><li>3.across:the passage of...

PHP GD ttftext center alignment

I'm using imagettftext to make a bar graph and at the top of each bar I want to put the value. I have the following variables for each bar (which are really rectangles) $x1 $y1 $x2 $y2 $imagesx $imagesy $font_size Also, The fontsize should decrease as the string length increases. ...

Get latest 100MB Of text file in linux.

Hi, How do I get the latest 100MB from a text log on Linux? Is there a tool for it, or could you point me on a script? I have no programming experience on Shell Scripting, Perl or Python, and I don't want to install mono so I can write it in C#. Thanks!! Yvan Janssens ...

Does anyone know how to change the character of a textfield caret with javascript?

Like the title reads, I want to change the character of a caret. Maybe make it a letter or something? Thanks. ...

PHP fileread plain text files

Hey, I want to 'force' the download of a plain text file in PHP. I have the following code, which I picked up on the web somewhere: if (isset($_REQUEST["file"])) { $file=$_REQUEST["file"]; header("Content-type: application/force-download"); header("Content-Transfer-Encoding: ansi"); header("Content-length: ".filesize($file)); ...