Search Results

Search found 34830 results on 1394 pages for 'text'.

Page 144/1394 | < Previous Page | 140 141 142 143 144 145 146 147 148 149 150 151  | Next Page >

  • Firefox 3.5.9 pushes down input:text when all other browsers render it fine

    - by Ad Taylor
    Hi, I have run into a really odd bug with FF3.5.9 (and potentially lower) where it is moving the input:text below the input:submit. The strangest thing with this is that it is working on IE6/7/8, Chrome, Safari and Firefox 3.6. Here is a test page so you can see how it is marked up: http://paste-it.net/public/s6479e6/ I can fix the issue for FF3.5.9 by adding padding-bottom (15px) but this then puts the other browsers out of action. Has anyone else had a similar issue and found a fix? Seems like such a minor issue but I just can't find a fix for it and I am not really into having to absolute position the inputs as that seems too hacky! Thanks for your time, Ad

    Read the article

  • Kerning problems when drawing text character by character

    - by shekel
    I'm trying to draw strings character by character to add lighting effects to shapes composed of text. while (i != line.length()) { c = line.substring(i, i + 1); cWidth = g.getFontMetrics().stringWidth(c); g.drawString(c, xx += cWidth, yy); i++; } The problem is, the width of a character isn't the actual distance it's drawn from another character when those two characters are printed as a string. Is there any way to get the correct distance in graphics2d?

    Read the article

  • Creating C# form fields with events based off of a text file

    - by evolve
    I need to generate windows form fields based off of a text file that I am parsing. I also want to automatically generate validation event handlers which all will be basically the same only the form field and the regular expression which is used to validate the field will change. I'm having a difficult time figuring out the quickest and easiest method to go about doing this. Any pointers in the right direction would really be great, maybe even some keywords that I'm missing. I can only imagine this type of question has been covered before, I just don't know what I'm searching for really.

    Read the article

  • Automatically CONCATENATE text on data entry

    - by Bill T
    I am a newbie and need help. I have a table called "Employees". It has 2 fields [number] and [encode]. I want to automatically take whatever number is entered into [number] and store it in [encode] so that it is preceded by the appropriate amount of 0's to always make 12 digits. Example: user enters '123' into [number], '000000000123' is automatically stored in [encode] user enters '123456789' into [number], '000123456789' is automatically stored in [encode] I think i want to write a trigger to accomplish this. I think that would make it happen at the time of data entry. is that right? The main idea is would be something like this: variable1 = LENGTH [number] variable2 = REPEAT (0,12-variable1) variable3 = CONCATENATE (variable2, [number]) [encode] = variable3 I just don't know enough to make this happen ANY help would be FANTASTIC. I have SQL-SERVER 2005 and both fields are text

    Read the article

  • How to use Map element as text of a JComboBox

    - by llm
    I am populating a JComboBox (using addItem()) with all the elements of a collection. Each element in the collection is a HashMap (so its a ComboBox of Hashmaps..). My question is - Given that I need each item to be a HashMap how do I set the text to apear in the combobox on the GUI? It needs to be the value of a certain key in the map. Normally if I am populating a combobox with my own type, I would just overide the toString() method...but I am not sure how to acheive this since I am using a Java HashMap. Any ideas (if possible, without implementing my own HashMap)? Update: It seems like there isn't anyway to avoid having the object int the JComboBox overide toString() if I want custom functionality..I wish there was a way to (1) specify the objects to be loaded into the JComboBox and (2) specify how these objects are to appear in the GUI.

    Read the article

  • Putting links into text in Django

    - by Dane Larsen
    I have a notifications app that generates notifications for users. The notification class has to be really general, because notifications are generated by all sorts of different things. My question is this: How do I insert links into the text of the notifications? What I tried was this: note = Notification(..., notification="""%s %s has accepted the task: <a href="/tasks/%d/">%s</a>.""" % (request.user.first_name, request.user.last_name, task.id, task.name), ...) In retrospect, it's obvious this wouldn't work. How should I go about this? Thanks in advance!

    Read the article

  • Avoiding jagged text when pasting into vi?

    - by overtherainbow
    Hello Although I have no problem using SecureCRT (5.1.2 build 274) to work from Windows and connect to PC's running Linux, I have a problem when connecting to an embedded Asterisk appliance that provides"vi" through BusyBox 1.4.1 (2008-03-10). The issue I'm having, is that when I paste code into vi, the text appears jagged like this: <?php try { $dbh = new PDO("sqlite:./db.sqlite"); $dbh->exec("CREATE TABLE IF NOT EXISTS customer (id INTEGER PRIMARY KEY AUTOINCREMENT, name VARCHAR(255))"); Does someone what the problem is? Is there a way to reconfigure either BusyBox or SecureCRT so that I can paste successfully? Thank you.

    Read the article

  • Truncate text if it atempts to run into three lines

    - by Jigs
    I have a small about 140px wide aligned next to a picture. In total there is space for four lines of text. The first two lines are reserved for the title and there are two lines of other info. I want the title to be cut if it spans more than two lines else it will push the other info out of line with the bottom of the image. The only solution I could think of was to create a div the height of two lines with an overflow to hidden. However, if the title is only one line it leaves a big gap. The solution can be Jquery, plain javascript, CSS or even PHP (if its possible). TIA

    Read the article

  • jQuery - Change background of input field if text getting replaced

    - by ywickham
    I'm currently using jQuery to restrict a text box to number only input as follows: $('input.numbersOnly').keyup(function () { this.value = this.value.replace(/[^0-9\.]/g,''); }); I'd like to let the user know that what they are typing is being rejected by changing the background color of the field. I know that I can change the background of a field using something like this: $('input.numbersOnly').addClass('alertClass'); My question is, how do I combine the two code examples above so that the color of the field changes as the character is getting replaced? My goal is to alert the user that something is wrong with their input as they type it in the field. Thanks!

    Read the article

  • MySQL : incrementing text id in DB

    - by BarsMonster
    I need to have text IDs in my application. For example, we have acceptable charset azAZ09, and allowed range of IDs [aaa] - [cZ9]. First generated id would be aaa, then aab, aac, aad e.t.c. How one can return ID & increment lower bound in transaction-fashion? (provided that there are hundreds of concurrent requests and all should have correct result) To lower the load I guess it's possible to define say 20 separate ranges, and return id from random range - this should reduce contention, but it's not clear how to do single operation in the first place. Also, please note that number of IDs in range might exceed 2^32. Another idea is having ranges of 64-bit integers, and converting integer-char id in software code, where it could be done asyncroniously. Any ideas?

    Read the article

  • Read the "Human friendly" text of a WebPage

    - by oidfrosty
    I need to read the final user page text, for example : "&#x73;&#x74;&#x61;&#x63;&#x6B;&#x6F;&#x76;&#x65;&#x72;&#x66;&#x6C;&#x6F;&#x77;&#x2E;&#x63;&#x6F;&#x6D;" is displayed as "stackoverflow.com". the aim is to avoid the use of script/encoding to avoid my filters it will be done with a content filtering proxy. i was thinking about injecting a script in the page

    Read the article

  • iPhone SDK 3.0 deprecation of UITableViewCell .text

    - by djt9000
    Came across an SDK3.0 deprecation that I am having a bit of trouble tryinig to figure out. If my declaration of @property (nonatomic, retain) UIImage *rowImage; does not work, nor @property (nonatomic, readonly, retain) UIImage *rowImage; and I @synthesize rowImage; Do I need to write my own setter because @synthesize will not properly handle this? cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:RootViewControllerCell] autorelease]; // Dpericated in SDK 3.0 // //cell.text = controller.title; //cell.image = controller.rowImage; // Using what the documentation says to use Error=== cell.textLabel = controller.title; Error=== cell.imageView = controller.rowImage; Error: Object cannot be set - Either readonly property or no setter found. Hope this makes sense, any help would be appreciated.

    Read the article

  • how to add markup to text using JavaScript regex

    - by Richard
    I need to add markup to some text using JavaScript regular expressions. In Python I could do this with: >>> import re >>> re.sub('(banana|apple)', r'<b>{\1}</b>', 'I have 1 banana and 2 apples!') 'I have 1 <b>{banana}</b> and 2 <b>{apple}</b>s!' What is the equivalent in JavaScript? string.replace(regex, newstring) seems to only take a raw string for replacing.

    Read the article

  • Getting text from a URL in ASP.NET

    - by user102533
    I am looking for a reliable way of extracting text given the web address, in ASP.NET/C#. Can anyone point me the right direction? Also, the web address could be say a news site that might have a lot of ads and menus etc. I need some intelligent way of extracting only the relevant content. Not sure how this could be done as how would I define what relevance is? Should I maybe read from a RSS feed? Any thoughts on this?

    Read the article

  • [JQuery] Highlight a Radio field and then pop up an input text box field

    - by kwokwai
    Hi all, I am trying to make some dynamic effect to a HTML page using JQuery. 1. When the user clicks a Radio feild, the field will be highlighted. 2. When the user clicks the Radio 'Man', a Input text box will be provided immeditely just below it. Here is my simple HTML page, but I don't know how to do with the JQuery part: <Table> <TR> <TD>Gender</TD> <TD> Man: <INPUT type=radio name="gender" value="M"><Br/> Woman: <INPUT type=radio name="gender" value="F"> </TD> </TR> <?Table>

    Read the article

  • Alter text field focus order with jQuery

    - by Akinator
    Hi, I was wondering, if I have text fields displayed so, could I alter the order in which the focus using javascript (preferably jQuery). See this example here. What I mean that when you tab around them, instead on going "one, two, three, four, five" force them to go: "one, two, four, three, five". Thanks in advance!! EDIT: Thanks to all, I didn´t know it was possible with HTML only. Of course if this is the case I´ll go with that. BTW Thanks to all your answers!!! (I`ll upvote the complete ones) but will accept the first one.

    Read the article

  • Change ID to text in paragraph with jQuery

    - by Reuben
    I would like to take what text is in my p tag and make that the p tags parent (div) that ID. I would also like to add a _ for any spaces in the p tag. Example: <div class="circle"><p>Apple</p></div> <div class="circle"><p>Banana</p></div> <div class="circle"><p>Carrot Juice</p></div> to <div id="Apple" class="circle"><p>Apple</p></div> <div id="Banana" class="circle"><p>Banana</p></div> <div id="Carrot_Juice" class="circle"><p>Carrot Juice</p></div>

    Read the article

  • natural sort of text and numbers, JavaScript

    - by ptrn
    I'm looking for the easiest way to sort an array that consists of numbers and text, and a combination of these. E.g. '123asd' '19asd' '12345asd' 'asd123' 'asd12' turns into '19asd' '123asd' '12345asd' 'asd12' 'asd123' This is going to be used in combination with the solution to another question I've asked here. The sorting function in itself works, what I need is a function that can say that that '19asd' is smaller than '123asd'. I'm writing this in JavaScript. Edit: as adormitu pointed out, what I'm looking for is a function for natural sorting

    Read the article

  • Concatenate text files with Windows command line, dropping leading lines

    - by James
    I need to concatenate some relatively large text files, and would prefer to do this via the command line. Unfortunately I only have Windows, and cannot install new software. type file1.txt file2.txt > out.txt allows me to almost get what I want, but I don't want the 1st line of file2.txt to be included in out.txt. I have noticed that more has the +n option to specify a starting line, but I haven't managed to combine these to get the result I want. I'm aware that this may not be possible in Windows, and I can always edit out.txt by hand to get rid of the line, but is there a simple way of doing it from the command line?

    Read the article

  • Replacing keywords in text with php & mysql

    - by intacto
    Hello, I have a news site containing an archive with more than 1 million news. I created a word definitions database with about 3000 entries, consisting of word-definition pairs. What I want to do is adding a definition next to every occurence of these words in the news. I cant make a static change as I can add a new keyword everyday, so i can make it realtime or cached. The question is, a str_replace or a preg_replace would be very slow for searching 3 thousand keywords in a text and replacing them. Are there any fast alternatives?

    Read the article

  • How to make DropDownList automatically be selected based on the Label.Text

    - by Archana B.R
    I have a DropDownlist in the GridView, which should be visible only when edit is clicked. I have bound the DropDownList from code behind. When I click on Edit, the label value of that cell should automatically get selected in the DropDownList. The code I have tried is: protected void GridView3_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { SqlCommand cmd = new SqlCommand("SELECT Location_Name FROM Location_Table"); DropDownList bind_drop = (e.Row.FindControl("DropList") as DropDownList); bind_drop.DataSource = this.ExecuteQuery(cmd, "SELECT"); bind_drop.DataTextField = "Location_Name"; bind_drop.DataValueField = "Location_Name"; bind_drop.DataBind(); string Loc_type = (e.Row.FindControl("id2") as Label).Text.Trim(); bind_drop.Items.FindByValue(Loc_type).Selected = true; } } When I run the code, it gives an exception error Object reference not set in the last line of the above code. Cannot find out whats wrong. Kindly help

    Read the article

  • UILabels text disappears when animating

    - by Wilhelm Michaelsen
    I have this code: - (void)my_button_tapped { if (my_button.tag == 0) { [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.5]; my_label.frame = CGRectMake(450, 455, 200, 20); [UIView commitAnimations]; [my_button setBackgroundImage:[UIImage imageNamed:@"check.png"] forState:UIControlStateNormal]; my_button.tag = 1; } else { [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.5]; my_label.frame = CGRectMake(450, 455, 0, 20); [UIView commitAnimations]; [my_button setBackgroundImage:nil forState:UIControlStateNormal]; my_button.tag = 0; } } When I tap my_button first time the label is expanded into 200px width, when I press the button again the label decreases to 0px width but immediately at button press the text disappears. What's wrong?

    Read the article

  • Improve performance writing 10 million records to text file using windows service

    - by user1039583
    I'm fetching more than 10 millions of records from database and writing to a text file. It takes hours of time to complete this operation. Is there any option to use TPL features here? It would be great if someone could get me started implementing this with the TPL. using (FileStream fStream = new FileStream("d:\\file.txt", FileMode.OpenOrCreate, FileAccess.ReadWrite)) { BufferedStream bStream = new BufferedStream(fStream); TextWriter writer = new StreamWriter(bStream); for (int i = 0; i < 100000000; i++) { writer.WriteLine(i); } bStream.Flush(); writer.Flush(); // empty buffer; fStream.Flush(); }

    Read the article

  • xmlhttprequest responsetext coming for Accept header: text/xml , but server error for application/JS

    - by encryptor
    I have to get response text from a resourceindex page as JSON object. When I dont put a Accept header in the request, it shows me the xml response (i see it in an alert).. But I want the response as a JSON object.. What should I do. One solution would have been httpRequest.setRequestHeader('Accept', 'application/JSON'); but this gives me a server error :500 Also it says A message body writer for Java type, class ...., and MIME media type, application/octet-stream, was not found Can someone suggest on what to do to overcome this and get the response as JSON?

    Read the article

  • displaying datepicker on the tap of a particular text field only

    - by praseed
    hi, i have a number of textfields . i want to display datepicker on the tap of a particular textfield only. wat i have is a number of textfields for entering details of a person like Name, address, date of birth etc... On the tap of text field for entering the date of birth i want to display date picker. if i include the code for the date picker in the textFieldShouldBeginEditing method ,will that show datepicker for tap on every textfield, . Pls help me out to find a solution for this ,, I am new to iphone app development...

    Read the article

< Previous Page | 140 141 142 143 144 145 146 147 148 149 150 151  | Next Page >