text

Java - High cpu usage

Hi I have a production web application running in Tomcat. The web application uses struts 2 as MVC layer. We had an issue wherein one of the web servers spiked to 100% cpu usage. This issue lasted for over several hours. I took the thread dump and saw over several hundred threads in runnable state and the dumps show the same stack tra...

shell script writing to a new file

Quick question: If I do the following, will it create the file, or do I have to do that separately? echo "output" > file.txt ...

mysql question - way to update case for field?

I have some entries in a field that look like this: NEvada city or nevada City... Is there a way to update the database so that entries have initial caps: Nevada City? ...

How to read the text from an image in iphone

Hi all... i want to read text in an image how to do that... Thanks ...

cant get VBA to write "http://"as text?

Hi everyone, I wrote the code bellow and need the asociated .PGP file to have the text http:// included. the PGP file is namely read by Autocad which requers the "http://" in its text to be able to launch the desierd webpage. problem is , is that VBA is Auto formating the http:// as a code entatie and not writting it to the text based P...

ORACLE SQL: Replace part of text field ignoring case

I need to replace a path stored in an Oracle DB text field. However paths have been specified with different cases (ie MYPATH, MyPath, Mypath, mypath). When using a combination of REPLACE and UPPER, it does not work as I need it to, ie: UPDATE Actions SET Destination = REPLACE(UPPER(Destination), 'MYPATH', 'My_New_Path') This does th...

how put predifined text in text box

how do i put text in a text box that shows up on start i used the following but it dont work? TextBox1.Text = "enter your name here!" the text box remains empty? ta- ...

Java code for wrapping text lines to a max line width

Before I re-invent the wheel (poorly), I'd like to know if there is a some existing Java code for wrapping text lines to a given maximum width. Ideally it would: respect existing linebreaks break up lines that exceed a maximum length on word boundaries break up words whose length exceeds the maximum line width by inserting hyphens Ed...

C# How can I make the text in a ListView column right-align instead of left-align?

I have a ListView in details view so it has 2 columns - but with the text which populates the list, it is more important to see the end of the text instead of the beginning. Is there any way to set the listview to show the right-side of the text by default (ie have the ... at the beginning instead of the end if the text is too large to ...

Setting the caret position to an empty node inside a contentEditable element

My task is to set a text caret to appear inside an empty span node within a contentEditable div. The following gives me no problems on Firefox 3.6: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <script type="text/javascript" src="js/jquery-1.4.3.min.js"> ...

jQuery text() returns null in Google Chrome

Hello I'm studying a strange behavior in Google Chrome when using jQuery text function: $(document).ready(function () { $("#btnSubmit").click(function () { var t = $('#txtMessage').text(); alert(t); //this shows nothing in Google Chrome, but works in IE9 }); }); when I change var t = $('#txtMessage').text(); to va...

How to programmatically merge text files with potential conflicts (ala git or svn, etc)?

As part of a larger project, I want the ability to take two bodies of text and hand them to a merge algorithm which returns either an auto-merged result (in cases where the changes are not conflicting) or throws an error and (potentially) produces a single text document with the conflicting changes highlighted. Basically, I just want a ...

dynamic text in Augmented reality via Flex 4

I have been playing with Augmented Reality recently, with my code I can create a cube but I want to create a dynamic Text which will give some information about the cube and change dynamically according movement of Marker. the code of cube private var container:FLARBaseNode; var ml:MaterialsList=new MaterialsList({all:new FlatShad...