Delete a line of text in javascript
In javascript, If i have a text block like so Line 1 Line 2 Line 3 What would i need to do to lets say delete the first line and turn it into: Line 2 Line 3 ...
In javascript, If i have a text block like so Line 1 Line 2 Line 3 What would i need to do to lets say delete the first line and turn it into: Line 2 Line 3 ...
I have a UITableViewCell and it is UITableViewCellStyleDefault. When I try to put text longer than the UITableViewCell, it truncates it. How do I make the cell expand to accommodate this text? ...
I'm new to iPhone development, and I have a question on how to create a view for my application. The view should display a problem (using formatted/syntax highlighted text), and multiple possible answers. The user should be able to click on an answer to validate it. Currently, I am trying to use a UITableView embedding UIWebView as con...
hey, ive been trying to have a default value in a text input, then with jQuery, when you "onfocus" the textbox, it makes the text black (default a light gray), and deletes the default value. I think you know what im talking about, so do you guys know how to accomplish this? ...
My current project involves gathering text content from an element and all of its descendents, based on a provided selector. For example, when supplied the selector #content and run against this HTML: <div id="content"> <p>This is some text.</p> <script type="text/javascript"> var test = true; </script> <p>This is some more...
How to save text file content to different arrays? my text file content is like this; 12 14 16 18 13 17 14 18 10 23 pic1 pic2 pic3 pic4 pic5 pic6 pic7 pic8 pic9 pic10 left right top left right right top top left right 100 200 300 400 500 600 700 800 900 1000 how can I save each line into different array? e.g. line 1 will be saved in...
I took advice from an answer to another question I asked which led to me using a DPI of 72 to match points to pixels for the text in my game. The problem is that pyglet is rendering text far too big or far too small. Perhaps it depends on the framebuffer size? I haven't got a clue. Here's my code for rendering fonts: class Font(): ...
An inexperienced question: I need to store about 10 unknown-length text fields per record into a MySQL table. I expect no more than 50K rows in total for this table but speed is important. The database actions will be solely SELECTs for all practical purposes (and searches will be done using an integer PK id only). I'm using InnoDB. In...
hello I have my own textbox which inherits System.Windows.Forms.TextBox I am trying to display texts like 5000000 formatted ==> 5,000,000 but the problem is that Control.Text should return 5000000 but it should display 5,000,000. I know it is WTF, but i really need it and i couldn't Google a lot because my native language is not Engl...
Hi I got some binary files containing integers. Is there some nice unix command, that will allow me to dump it to a terminal without offset info etc? something like double int[4]; while(fread(tmp,sizeof(int),4,stdin)) for(int i=0;i<4;i++) printf("%d\t",tmp[i]); It seems that hexdump and od gives me the information I want, but t...
So I just got my sorry ass hacked, the hack put some obscure string in almost every one of the php files on my website. How can I remove every instance that line occurs? The code it added started with <?php so therefore I cannot simply replace it with blank, I need to delete it and move up the actual relevant code up one line as <?php c...
At the moment I have the following code which works fine. label = new JLabel(panelLabel,SwingConstants.CENTER); outputPanel.add(label,BorderLayout.CENTER); I get the text in the center of the panel (in terms of the left-right position as well as in terms of the top-bottom). Now I want to set the position to the bottom (and center in...
hey guys i have a textfile i have divided it into 4 parts. i want to search each part for the words that appear in each part and score that word exmaple welcome to the national basketball finals,the basketball teams here today have come a long way. without much delay lets play basketball. i will want to return national = 1 as it appe...
I need to replace some text that is on the page within the body tag. I am using javascript but have jquery available if needed. I basically need to replace test (test with the registered trademark) with TEST or tests with TESTS and it could even be test with TEST or tests with TESTS. I am able to uppercase them but its not liking to work...
Hey all, I have been doing nothing but web development over the last few years and haven't written any Java or C++ in what feels like forever. I don't necessarily need to use these languages, so I'm entirely open to suggestion. I was given an email list by a client to import into their mailchimp account yesterday and unfortunately, Mai...
I have a web view which displays a simple login form, containing username and password fields. However when the user clicks in one of the text fields, although the cursor appears in the text field, the on-screen keyboard does not appear. I've tried registering for UIKeyboardWillShowNotifications notifications and I see this notificatio...
I have several CATextLayers. When I doubleclick one of them, I want to be able to edit it's string. Think of text as it's handled in Keynote or many other apps. Any ideas? I thought of putting an editable textfield right in front of the layer and then dismiss it on enter, but I didn't get far. :-( I target Mac OS X 10.5 with Objective-...
HI, I'm trying to develop some code in Javascript that adds highlighted text to a class. What I want to achieve with this is the ability of text highlighting with a custom color. I want it to kind of look like the following: window.getSelected = "<span class=\"highlighted\">" + window.getSelected + "</span>" after the above code is e...
I use FPDF to creat PDF from PHP and i have a problem with the Write() function i use the following code and i want to indent the text block not just the first row: $pdf->SetX(60); $pdf->Write(5,'' . str_repeat( ' This is a test of setX.', 30 )); but as you can understand it's just indents the first row, any idea on how to move the w...
I want to be able to replace style="STUFF" I keep thinking that this is the correct REGEX: style=(")(?!")*(") But for some reason that won't match. Any ideas? ...