text

My text isnt html?

I am using ckeditor to save my texts... (asp.net mvc) In the database the text are stored like this: <ul><li>List item</li><li>List item</li><li>List item</li></ul> And when I am running my website I want it look like this: List item List item List item But the text are the same as in the database: <ul><li>List item</li><li>List...

What is the right method for modifying text content in Flex component lifecycle?

Hi, I have custom components which must adjust their text content based on space constraints. For example a component adds labels until there is no space, and then the content of the last label becomes "(x more)" I do not have access to size of child controls before adding them. When in updateDisplayList, I make changes to the layout of...

A good Linux based text editor, with FTP editing, and ability to keep alive ftp connection.

I need a text editor for linux with the following features: Syntax Highlighting for PHP, Javascript (most have these) Autocompletion of braces, parenthesis, and Most important of all, editing via FTP. Even more important of all, have a 'keep alive' function when editing via ftp. I have a not so fast internet connection and many editor...

TextField multiline + wrap get text height

I have a TextField with multiline and word wrap enabled, and a fixed width. I want to calculate the total height of the text inside it. I tried using TextField.textHeight, but that gives me the height of one line. Because of the wrapping, I can't easily calculate the number of lines to multiply it with the line height. TextField.height ...

simple text wrapping and copyfitting language/library

I'm writing a flashcard generating library. The user provides a text file, my program needs to output something that can be printed, directly or indirectly (e.g., TeX, PS, PDF, XSL-FO). My text formatting is very simple: plain, monospace, italic, or bold. I also need a way to center text in the region. Nothing else. However, I need some...

How does X11 clipboard handle multiple data formats?

It probably happened to you as well - sometimes when you copy a text from some web page into your rich-text e-mail draft in your favorite webmail client, you dislike the fact that the pasted piece has a different font/size/weight.. it somehow remembers the style (often images, when selected). How is it than that if you paste the same int...

Python code flow does not work as expected ?

Hello everyone, I am trying to process various texts by regex and NLTK of python -which is at http://www.nltk.org/book-. I am trying to create a random text generator and I am having a slight problem. Firstly, here is my code flow: Enter a sentence as input -this is called trigger string, is assigned to a variable- Get longest word in ...

PHP implementation of Bayes classificator: Assign topics to texts

In my news page project, I have a database table news with the following structure: - id: [integer] unique number identifying the news entry, e.g.: *1983* - title: [string] title of the text, e.g.: *New Life in America No Longer Means a New Name* - topic: [string] category which should be chosen by the classificator, e.g: *Sports* ...

algorithm to calculate similarity between texts

Hello all, I am trying to score similarity between posts from social networks, but didn't find any good algorithms for that, thoughts? I just tried Levenshtein, JaroWinkler, and others, but those one are more used to compare texts without sentiments. In posts we can get one text saying "I really love dogs" and an other saying "I really...

SSIS Text was truncated with status value 4

I am developing a SSIS package, trying to update an existing SQL table from a CSV flat file. All of the columns are successfully updating except for one column. If I ignore this column on truncate, my package completes successfully. So I know this is a truncate problem and not error. This column is empty for almost every row. Howeve...

How can I make text appear on next line instead of overflowing?

I have a fixed width div on my page that contains text. When I enter a long string of letters it overflows. I don't want to hide overflow I want to display the overflow on a new line, see below: <div id="textbox" style="width:400px; height:200px;"> dfssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssfdddddddddddddd...

Transforming early modern English into 20th century spelling using the NLTK

I have a list of strings that are all early modern English words ending with 'th.' These include hath, appointeth, demandeth, etc. -- they are all conjugated for the third person singular. As part of a much larger project (using my computer to convert the Gutenberg etext of Gargantua and Pantagruel into something more like 20th century ...

Mapping a set of intervals to 2D text buffer with text change synchronization

Hello, Here's the problem. I have a 2D text-like buffer (basically List<List<Object>>), indexed by (row, col) coordinates. Each row can have arbitrary length. Let pos = (row, col). Then an interval is defined by (fromPos, toPos). The text buffer can be modified by inserting and deleting characters: void addRow(int rowIndex, Row<T> ne...

html to text conversion using python language

import urllib2 from BeautifulSoup import * resp = urllib2.urlopen("file:///D:/sample.html") rawhtml = resp.read() resp.close() print rawhtml I am using this code to get text from a html document, but it also gives me html code. What should i do to fetch only text from the html document? ...

Text rotation Flex

How to rotate text (s:label)? I've tried using rotationZ but instead of rotating text it rotates each letter with some weird effect... How to change text angle? ...

Is there a way to find the second longest word in a sentence in Python ?

Hello everyone, I got stuck on this idea: how do I get the second longest word in a sentence ? I'm going to use it for an exit route in my code where the longest word might fail a test. Any ideas ? Thanks in advance. ...

How to make this random text generator more efficient in Python ?

Hello everyone, I'm working on a random text generator -without using Markov chains- and currently it works without too many problems. Firstly, here is my code flow: Enter a sentence as input -this is called trigger string, is assigned to a variable- Get longest word in trigger string Search all Project Gutenberg database for sentences...

How can you force Mercurial (hg) to treat a file as binary?

I have a LaTeX hg repository for a paper and I use hg serve to display the progress to my coauthors. Until last week the file paper.pdf was treated as binary and its contents were not displayed in the changesets. (The users could download it via the raw link) Since last week, paper.pdf is treated as text and I see huge diffs of PDF code...

How can I randomize this text generator even further ?

Hello everyone, I'm working on a random text generator -without using Markov chains- and currently it works without too many problems -actually generates a good amount of random sentences by my criteria but I want to make it even more accurate to prevent as many sentence repeats as possible-. Firstly, here is my code flow: 1-Enter a sen...

Controlling appearance of new lines in IBM mainframe

All, So I'm uploading a text file from C# to an IBM MVS mainframe. The file is converted to ebcdic using C# libraries and it works well as I can read the data on the mainframe. The problem is the new lines. The text file has 10 rows of data and while viewing it in the mainframe environment, all data is present. But there are no new l...