Search Results

Search found 47335 results on 1894 pages for 'find'.

Page 6/1894 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • why python find not working

    - by user283405
    i am using python 2.5.2. The following code not working. def (self, text, findText): index = text.find(findText) print index Although the findText is present in text, but it still returns None. I have printed the values of text and findText and they are present.

    Read the article

  • jQuery Find element else do nothing ?

    - by Andrew
    Hi Guys, I am trying to use jQuery to basically wrap a bunch of CSS modifications via jQuery but on pages where the #IDs or Classes dont exist I get errors ? Like jQuery(".class").css(random_stuff) is not a function Any ideas what I can do to either "find" the elements and do nothing or ?

    Read the article

  • Find text position

    - by serhiyiv
    Hi. Could you please help me !!!! For example, I load some page into opera/Firefox etc., there is a text on the page (which is a link). What I need is to find position of the text on the screen and send mouse click to that position. Is it possible to do? If you can, give an example please!!!!

    Read the article

  • Rails find :conditions

    - by Sam
    I have a Reservation model that I'm searching for with three fields. The container_id must always be self.id but as confirmed and auto_confirmed only one needs to be true. I have the following but it doesn't preform what I need: Reservation.find(:all, :conditions => ['container_id = ? AND confirmed = ? OR auto_confirm = ?', self.id, true, true,]) How should I change this?

    Read the article

  • jquery find h2 tags and append into div

    - by SoulieBaby
    Hi all, I'm trying to write a bit of jquery which finds all h2 tags inside a div (.content), then appends each one into another div (.intro). So far I have this: var h2 = $(".content").find("h2"); $(h2).each(function() { $(this).append(".intro"); }); But it's not working.. if someone could help me out, that'd be great :)

    Read the article

  • Rails SQL Query with find

    - by Nave
    I want this SQL query to be written in rails controller using find select id,name from questions where id not in (select question_id from levels_questions where level_id=15) How will I do this?I am using Rails framework and MySQL db thanks in advance.

    Read the article

  • jQuery .find() not working in IE

    - by Jake
    I have a function trying to run this: if ( action=='fadeIn' ) { if ( $( this ).css( 'position' ) == "static" ) { $( this ).css( {position: 'relative'} ); } $( this ).append( '<span class="bg_fade">' ) } var fader = $( this ).find( '.bg_fade' ); alert(fader.attr('class')); It works fine in Firefox, but in IE, the alert returns undefined. Any ideas?

    Read the article

  • django template find value within list

    - by dotty
    Hay, how do i find a value with in python list in django's template system? example list = [1,2,3,4,5,6,7] x = 1 if x is in list: return u'found!' else: return u'not found' endif: Something along those lines. any help would be great

    Read the article

  • jquery .find to get the text in a <li>

    - by Chris
    So I have a series of 2 nested ul's. When you click on the text (which is in an a tag) in the li, my page makes that editable and adds a save button. clicking the save button needs to give me back the new text inside that li and the id of that li. The id is not a problem. I'm trying to use jQuery's .find to select that anchor tag (which is successful) but i can't seem to get the text from it. Here is an example of the first list and it's sublists. <ul class='lists'> <li class='list1'> <a class='a list' id='list1'> List 1 Name</a> <img id='savelist1id' onClick="SaveName(this.parentNode.id)" src='save.jpg'> <ul class='list1subs'> <li class='sub1'> <a class='a sub' id='sub1id'> Sub 1 Name</a> <img id='savesub1id' onClick="SaveName(this.parentNode.id)" src='save.jpg'> </li> <li class='sub3'> <a class='a sub' id='sub2id'> Sub 2 Name</a> <img id='savesub2id' onClick="SaveName(this.parentNode.id)" src='save.jpg'> </li> <li class='sub2'> <a class='a sub' id='sub3id'> Sub 3 Name</a> <img id='savesub3id' onClick="SaveName(this.parentNode.id)" src='save.jpg'> </li> </ul> </li> </ul> Here's the code for identifying which save button you clicked. function SaveName(parentid){ $('li').find('a').each(function(){ if (this.id == parentid){ alert(this.id+' '+this.text) } } }); I am wanting this.text to show me the text inside the anchor tags. Help, please?

    Read the article

  • can't find variable: $j

    - by orangebrainer
    Ahh i'm stuck again. helpp why do i encounter this "can't find variable: $j" when i use this method function myMethod(htmlObject) { var buttonTags = $j("button",htmlObject); ... } Sorry for askin silly questions again. running outta time =\ THANKS FOR THEHELP!

    Read the article

  • Can i use a model object directly in a find

    - by user340100
    Hi, Can i pass a_teacher directly into the find? or do i have to compare each of its attributes as i have done here? thanks a_teacher = Techer.new(:name => "Bob", :age => 30) self.classes.all(:conditions => ["teacher.name = ? AND teacher.age = ?", a_teacher.name,a_teacher.age], :joins => :teacher)

    Read the article

  • bash script problem, find , mv tilde files created by gedit

    - by Ke
    Hi, im using linux with gedit which has the wonderful habit of creating a temp file with a tilde at the end for every file I edit. im trying to move all of these files at once to a different folder using the following: find . -iname “*.php~” -exec mv {} /mydir \; However, its now giving me syntax errors, as if it were searching through each file and trying to move the piece of text. I just want to move all of the files ending in .php~ to another directory. Any idea how I do that? Cheers Ke

    Read the article

  • Rails created_at find condition...

    - by Dustin Brewer
    I'm attempting to sum daily purchase amounts for a given user. @dates is an array of 31 dates. I need the find condition to compare a date from the array to the created_at date of the purchases. What I'm doing below compares the exact DateTime for the create_at column. I need it to look at the day itself, not the DateTime. How can I write this so created_at is in between the date from the array? <% @dates.each do |date| %> <%= current_user.purchases.sum(:amount, :conditions = ["created_at = ?", date]) % <% end %

    Read the article

  • how find objects between two labels in clearcase

    - by cheia
    Hi , I would like to get all sources/objects between two releases that happened within a month from clearcase. I wrote the below command and it displays only less number of sources compared to the actual one. Please advive where I am wrong cleartool find <path> -element "lbtype (Label b) && ! lbtype(label a) && ! -element (.../Branch1/latest)" -print where: label a is the label of last month release label b is the current label and branch1 is the branch from where all release happened Thanks in advance

    Read the article

  • Java - Could not find the main class?

    - by asmo
    I'm having a hard-time with a Java error. I'm getting this when double-clicking on my compiled project Jar file in order to run it: Could not find the main class: testPackage.testFrame. Program will exit. However, my main class is cleary defined in the project properties. Furthermore, everything works fine when I run the project directly from NetBeans. I'm using the ip2c.jar third-party library to determine countries from IP addresses. If I comment the class that is using the ip2c.jar file, I don't get the error. How can a third-party library be preventing the JVM from finding my main class?

    Read the article

  • Multiline Find & Replace in Visual Studio

    - by hawbsl
    Can it be done? We're using either VS2005 or VS2008. I don't mean regular expressions - which have their place - but plain old text find & replace. I know we can do it (at a pinch) with regular expressions using the \n tag but prefer not to get tangled up in regex escapes characters, plus there's a readability issue. If it can't be done what plain and simple (free) alternative are people using? That doesn't involve knocking up our own macro.

    Read the article

  • How to find rows between other rows w/ID then add class

    - by Ravex
    Hi guys. i'm stuck with my table. need create toggle rows function. but i no idea how to find sub rows in table. Some one can help me? I have table with many rows 500 All Rows have class="row-1,row-2.....row-600 etc" And all main rows also have class="parent" between each "parent" rows i have 6 rows So i need for toggle/collapse purposes find all (sub)rows betwen parent rows. and add class with id like in prevous parent row. For example: parent have class="row-1 parent" all sub must have - class="child-row-1" default table <table id="table"> <tr class="row-1 odd parent"> <th class="column-1">st. 3 - 5</th> <th class="column-2">Profile</th> <th class="column-3">Purpose</th> </tr> <tr class="row-2 even"> <td class="column-1">Metal Stamp</td> <td class="column-2">Width</td> <td class="column-3">Price</td> </tr> <tr class="row-3 odd"> <td class="column-1">Circle 3 - 5</td> <td class="column-2">28-110</td> <td class="column-3">21500</td> </tr> <tr class="row-4 even"> <td class="column-1">Circle 3 - 5</td> <td class="column-2">115-180</td> <td class="column-3">20700</td> </tr> <tr class="row-5 odd"> <td class="column-1">Cube 3 - 5</td> <td class="column-2">63-80</td> <td class="column-3">21500</td> </tr> <tr class="row-6 even"> <td class="column-1">Cube 3 - 5</td> <td class="column-2">100-220</td> <td class="column-3">20700</td> </tr> <tr class="row-7 odd"> <td class="column-1">Line 3 - 5</td> <td class="column-2">10-50 ? 40-200</td> <td class="column-3">27000</td> </tr> </table> in the end it should look like this: <table id="table"> <tr class="row-1 odd parent"> <th class="column-1">st. 3 - 5</th> <th class="column-2">Profile</th> <th class="column-3">Purpose</th> </tr> <tr class="row-2 even child-row-1"> <td class="column-1">Metal Stamp</td> <td class="column-2">Width</td> <td class="column-3">Price</td> </tr> <tr class="row-3 odd child-row-1"> <td class="column-1">Circle 3 - 5</td> <td class="column-2">28-110</td> <td class="column-3">21500</td> </tr> <tr class="row-4 even child-row-1"> <td class="column-1">Circle 3 - 5</td> <td class="column-2">115-180</td> <td class="column-3">20700</td> </tr> <tr class="row-5 odd child-row-1"> <td class="column-1">Cube 3 - 5</td> <td class="column-2">63-80</td> <td class="column-3">21500</td> </tr> <tr class="row-6 even child-row-1"> <td class="column-1">Cube 3 - 5</td> <td class="column-2">100-220</td> <td class="column-3">20700</td> </tr> <tr class="row-7 odd child-row-1"> <td class="column-1">Line 3 - 5</td> <td class="column-2">10-50 ? 40-200</td> <td class="column-3">27000</td> </tr> </table>

    Read the article

  • Find and replace text in a string using C#

    - by Joey Morani
    Anyone know how I would find & replace text in a string? Basically I have two strings: string firstS = "/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDABQODxIPDRQSERIXFhQYHzMhHxwcHz8tLyUzSkFOTUlBSEZSXHZkUldvWEZIZoxob3p9hIWET2ORm4+AmnaBhH//2wBDARYXFx8bHzwhITx/VEhUf39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f3//"; string secondS = "abcdefg2wBDABQODxIPDRQSERIXFh/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/abcdefg"; I want to search firstS to see if it contains any sequence of characters that's in secondS and then replace it. It also needs to be replaced with the number of replaced characters in squared brackets: [NUMBER-OF-CHARACTERS-REPLACED] For example, because firstS and secondS both contain "2wBDABQODxIPDRQSERIXFh" and "/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/f39/" they would need to be replaced. So then firstS becomes: string firstS = "/9j/4AAQSkZJRgABAQEAYABgAAD/[22]QYHzMhHxwcHz8tLyUzSkFOTUlBSEZSXHZkUldvWEZIZoxob3p9hIWET2ORm4+AmnaBhH//2wBDARYXFx8bHzwhITx/VEhUf39[61]f3//"; Hope that makes sense. I think I could do this with Regex, but I don't like the inefficiency of it. Does anyone know of another, faster way?

    Read the article

  • Algorithm to find added/removed elements in an array

    - by jj
    Hi all, I am looking for the most efficent way of solving the following Problem: given an array Before = { 8, 7, 2, 1} and an array After ={1, 3, 8, 8} find the added and the removed elements the solution is: added = 3, 8 removed = 7, 2, 1 My idea so far is: for i = 0 .. B.Lenghtt-1 { for j= 0 .. A.Lenght-1 { if A[j] == B[i] A[j] = 0; B[i] = 0; break; } } // B elemnts different from 0 are the Removed elements // A elemnts different from 0 are the Added elemnts Does anyone know a better solution perhaps more efficent and that doesn't overwrite the original arrays

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >