Search Results

Search found 4036 results on 162 pages for 'nested loops'.

Page 34/162 | < Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >

  • Python for loop question

    - by Joe Dunk
    I was wondering how to achieve the following in python: for( int i = 0; cond...; i++) if cond... i++; //to skip an run-through I tried this with no luck. for i in range(whatever): if cond... : i += 1

    Read the article

  • Java - Can i have a faster performance for this loop ?

    - by Brad
    I am reading a book and deleting a number of words from it. My problem is that the process takes long time, and i want to make its performance better(Less time), example : Vector<String> pages = new Vector<String>(); // Contains about 1500 page, each page has about 1000 words. Vector<String> wordsToDelete = new Vector<String>(); // Contains about 50000 words. for( String page: pages ) { String pageInLowCase = page.toLowerCase(); for( String wordToDelete: wordsToDelete ) { if( pageInLowCase.contains( wordToDelete ) ) page = page.replaceAll( "(?i)\\b" + wordToDelete + "\\b" , "" ); } // Do some staff with the final page that does not take much time. } This code takes around 3 minutes to execute. If i skipped the loop of replaceAll(...) i can save more than 2 minutes. So is there a way to do the same loop with a faster performance ?

    Read the article

  • How to get the class of an input inside a jQuery each loop?

    - by Paul Atkins
    Hi, I have function which appends inputs inside a list item when a link is clicked. I then loop through these inputs using an each loop using the code below. It is working correctly as shown, however instead of using field.name I want to use the class of the input as the array key but when i try to do this the class is shown as undefined. Here is the code I am currently using: var values = {}; $.each($('li :input').serializeArray(), function(i, field) { values[field.name] = field.value; }); Here is the code I have inside the list item once I have appended the hidden inputs using jQuery append: <li><input type="hidden" name="group" class="group" value="2"/><input type="hidden" name="condition" class="condition" value="isany"/><input type="hidden" name="value" class="value" value="1,2"/></li> I can get the name attribute fine but class is always undefined. Could anybody help with this?

    Read the article

  • only return random number when it is unique

    - by phil
    My brain is melting today and i cannot think how to do this simple bit of code. numberList is a string of numbers seperated by commas like '2, 34, 10' etc.. when i request a random number i need to check if the string has the number, if it does i want to keep requesting a random number until the random number is definitely not in the string. i cant think what kind of loop i would do to get this to work: Random r = new Random(); public int RandomPos(int max) { int i; do { i = r.Next(max) + 1; } while (!numberList.Contains(i.ToString())); return i; }

    Read the article

  • Add inputs to more than one row in a structure array in matlab

    - by ZaZu
    Hi there, I would like to know how can I get certain inputs and put them in more than one row in the structure ... I basically want a structure that updates one input per row in ever loop. The loop is looped 30 times, so I want to have 30 rows and 2 columns ( x and y columns) I have this code : For N=1:30 . . . Binary = bwlabel(blacknwhite); s = regionprops(Binary,'centroid'); centroids = cat(1, s.Centroid); hold(imgca,'on') plot(imgca,centroids(1,1), centroids(1,2),'r*') . . . end I dont think this does what I want ... only the first row is updated in my loop .. So how can I create this structure ? If you want more info please tell me and I will update it right away. Thanks !

    Read the article

  • More compact way to do this?

    - by Macha
    I have a couple of functions that loop around the surrounding cells of a cell. The grid is contained inside an array. In my code, I have checks to make sure it's not one of the edge cells, as checking an undefined cell causes an error. As such, I have code like this: if(x > 0) { var firstX = x - 1; } else { var firstX = x; } if(x < 199) { var lastX = x + 1; } else { var lastX = x; } if(y > 0) { var firstY = y - 1; } else { var firstY = y; } if(y < 199) { var lastY = y + 1; } else { var lastY = y; } A lot of lines of code to do very little. Is there a more elegant way to do this?

    Read the article

  • ruby looping question

    - by jonepatr
    Hello! I want to make a loop on a variable that can be altered inside of the loop. first_var.sort.each do |first_id, first_value| second_var.sort.each do |second_id, second_value_value| difference = first_value - second_value if difference >= 0 second_var.delete(second_id) else second_var[second_id] += first_value if second_var[second_id] == 0 second_var.delete(second_id) end first_var.delete(first_id) end end end How do I do this, because this doesn't work?

    Read the article

  • PHP while loop, table row

    - by Elliott
    Hi, I'm trying to loop through a database and output data into a div, if there are 3 divs horizontally accross it will the start a new tr until it reaches another 3 etc. It is currently outputted like : [] [] [] [] [] [] Currently I have it working when it reaches 3 it starts a new row, but I don't know how I can only echo a new tr once? As it creates a new table row each time. echo '<table><tr>'; while ($result) { $i ++; if ($i&3) { echo '<td> <div>Row Data</div> </td>'; } else { echo '<tr> <td> <div>Row Data</div> </td></tr>'; } } echo '</tr></table>'; The $result variable is the recordset from my sql query, everything works fine I just don't know how to only create a new table row once? Thanks

    Read the article

  • Objective-C vs JavaScript loop performance

    - by micadelli
    I have a PhoneGap mobile application that I need to generate an array of match combinations. In JavaScript side, the code hanged pretty soon when the array of which the combinations are generated from got a bit bigger. So, I thought I'll make a plugin to generate the combinations, passing the array of javascript objects to native side and loop it there. To my surprise the following codes executes in 150 ms (JavaScript) whereas in native side (Objective-C) it takes ~1000 ms. Does anyone know any tips for speeding up those executing times? When players exceeds 10, i.e. the length of the array of teams equals 252 it really gets slow. Those execution times mentioned above are for 10 players / 252 teams. Here's the JavaScript code: for (i = 0; i < GAME.teams.length; i += 1) { for (j = i + 1; j < GAME.teams.length; j += 1) { t1 = GAME.teams[i]; t2 = GAME.teams[j]; if ((t1.mask & t2.mask) === 0) { GAME.matches.push({ Team1: t1, Team2: t2 }); } } } ... and here's the native code: NSArray *teams = [[NSArray alloc] initWithArray: [options objectForKey:@"teams"]]; NSMutableArray *t = [[NSMutableArray alloc] init]; int mask_t1; int mask_t2; for (NSInteger i = 0; i < [teams count]; i++) { for (NSInteger j = i + 1; j < [teams count]; j++) { mask_t1 = [[[teams objectAtIndex:i] objectForKey:@"mask"] intValue]; mask_t2 = [[[teams objectAtIndex:j] objectForKey:@"mask"] intValue]; if ((mask_t1 & mask_t2) == 0) { [t insertObject:[teams objectAtIndex:i] atIndex:0]; [t insertObject:[teams objectAtIndex:j] atIndex:1]; /* NSArray *newCombination = [[NSArray alloc] initWithObjects: [teams objectAtIndex:i], [teams objectAtIndex:j], nil]; */ [combinations addObject:t]; } } } ... the array in question (GAME.teams) looks like this: { count = 2; full = 1; list = ( { index = 0; mask = 1; name = A; score = 0; }, { index = 1; mask = 2; name = B; score = 0; } ); mask = 3; name = A; }, { count = 2; full = 1; list = ( { index = 0; mask = 1; name = A; score = 0; }, { index = 2; mask = 4; name = C; score = 0; } ); mask = 5; name = A; },

    Read the article

  • How to iterate over numerically named object properties

    - by Scott Schluer
    So I have a horribly designed class that I can't change that has properties like this: object.Color1 object.Color2 object.Color3 etc... How can I iterate through those with a for loop. In other words, something like this: for (int i = 0; i <= 40; i++) { string PropertyName = "Color" + i; if (object.PropertyName != "") { // do something } } Obviously this code wouldn't work but it gives you an idea of what I'm after. I have to do some processing on each property and I don't want to repeat my code 40 times. :) A loop would be perfect, I'm just not sure how to create the name of the property on the fly.

    Read the article

  • Java loop to collect the second and third elements every three in an array

    - by mhollander38
    I have a file with data in the form timestamp, coordinate, coordinate, seperated by spaces, as here; 14:25:01.215 370.0 333.0 I need to loop through and add the coordinates only to an array. The data from the file is read in and put into as String[] called info, from split(" "). I have two problems, I think the end of the file has a extra " " which I need to lose appropriately and I also want confirmation/suggestions of my loop, at the moment I am getting sporadic out of bounds exceptions. My loop is as follows; String[] info; info = dataHolder.split(" "); ArrayList<String> coOrds1 = new ArrayList<String>(); for (int counter = 0; counter < info.length; counter = counter+3) { coOrds1.add(info[counter+1]); coOrds1.add(info[counter+2]); } Help and suggestions appreciated. The text file is here but the class receives in a UDP packet from another class so I am unsure if this potentially adds " " at the end or not.

    Read the article

  • How to get the next row from the Database table?

    - by Parth
    How to get the next row from the Database table? Such that the row might be incremented row that is if structure has a field called "id" then the row can be id++ or very next incremented row, but it may also b any other id containing row (NOT VERY NEXT) , (because the ids could be deleted from the table). the point of id I am talking about is It could be 1,2,3,4.... or it could be 1,6,7,8,23.. so on.... Please help for fetching the next row in the for loop to get it checked.

    Read the article

  • Java: "cannot find symbol" error of a String[] defined within a while-loop

    - by David
    Here's the relevant code: public static String[] runTeams (String CPUcolor) { boolean z = false ; //String[] a = new String[6] ; boolean CPU = false ; while (z == false) { while (CPU==false) { String[] a = assignTeams () ; printOrder (a) ; for (int i = 1; i<a.length; i++) { if (a[i].equals(CPUcolor)) CPU = true ; } if (CPU==false) { System.out.println ("ERROR YOU NEED TO INCLUDE THE COLOR OF THE CPU IN THE TURN ORDER") ; } } System.out.println ("is this turn order correct? (Y/N)") ; String s = getIns () ; while (!((s.equals ("y")) || (s.equals ("Y")) || (s.equals ("n")) || (s.equals ("N")))) { System.out.println ("try again") ; s = getIns () ; } if (s.equals ("y") || s.equals ("Y") ) z = true ; } return a ; } the error i get is: Risk.java:416: cannot find symbol symbol : variable a location: class Risk return a ; ^ Why did i get this error? It seems that a is clearly defined in the line String[] a = assignTeams () ; and if anything is used by the lineprintOrder (a) ;` it seems to me that if the symbol a really couldn't be found then the compiler should blow up there and not at the return statment. (also the method assignTeams returns an array of Strings.)

    Read the article

  • How to add up amount of data from an external file in C# (Stream Reader)

    - by user2985995
    I'm new to this site, and pretty new to programming, at the moment I'm trying to display a count amount for the users names on my donation list, and then I also want to have a sum to work out the total amount of money the donation list contains, If someone could help me with creating a way to add up amount of donors on the donations.txt file that would be great help, I have no idea where to start, but so far this is my coding: string sName; double dAmount; string sTotalNames; double dAmountTotal; double dAmountAverage; using (StreamReader sr = new StreamReader("Donations.txt")) { while (sr.Peek() != -1) { sName = sr.ReadLine(); Console.WriteLine(sName); dAmount = Convert.ToDouble(sr.ReadLine()); Console.WriteLine(dAmount); } Console.WriteLine("Press any key to close"); Console.ReadKey(); }

    Read the article

  • Retrieving the value of a concatenated variable within a Java FOR loop

    - by Rajat
    I have been using this "logic" in C++ and VB with success, but am tied up in Java... Simply put, public void DataProviderExample(String user, String pwd, String no_of_links, String link1, String link2, String link3) { for (int i=1;i<=no_of_links;i++) { String link = "link"+i; System.out.println(link); } Now, if the variables link1, link2 and link3 have a value of "X", "Y" and "Z" respectively, upon running this program, I get the following output - link1 link2 link3 What I want is - X Y Z Any ideas?

    Read the article

  • Historical Rolling Daily sum

    - by user2980057
    I have a table of consisting of Dates and the amount of revenue recorded for that day going back for about 12 years. What I would like to do with this data is create a new table with Dates and prior 7-day revenue numbers. Any guidance would be greatly appreciated. Below is an example of what my source table and what my results would need to look like.... Source Table.. DATE | Revenue 12/31/2013 | 200 12/30/2013 | 300 12/29/2013 | 400 12/28/2013 | 100 12/27/2013 | 200 12/26/2013 | 150 12/25/2013 | 350 12/24/2013 | 450 12/23/2013 | 200 12/22/2013 | 300 12/21/2013 | 100 12/20/2013 | 300 Resulting Table... DATE | 7Dayrev 12/31/2013 | 1700 12/30/2013 | 1950 12/29/2013 | 1850 12/28/2013 | 1750 12/27/2013 | 1750 12/26/2013 | 1850 ETC......

    Read the article

  • Loop through different sets of unique permutations

    - by user558610
    Hi I'm having a hard time getting started to layout code for this problem. I have a fixed amount of random numbers, in this case 8 numbers. R[] = { 1, 2, 3, 4, 5, 6, 7, 8 }; That are going to be placed in 3 sets of numbers, with the only constraint that each set contain minimum one value, and each value can only be used once. For example: R1[] = { 1, 4 } R2[] = { 2, 8, 5, 6 } R3[] = { 7, 4 } I need to loop through all possible combinations of a set R1, R2, R3. Order is not important, so if the above example happened, I don't need R1[] = { 4, 1 } R2[] = { 2, 8, 5, 6 } R3[] = { 7, 4 } NOR R1[] = { 2, 8, 5, 6 } R2[] = { 7, 4 } R3[] = { 1, 4 } What is a good method?

    Read the article

  • How to get data from dynamically created EditText views and insert it into an array?

    - by Snwspeckle
    So basically what I need my program to do at this point is that when I click the submit button, I need to loop through each dynamic row of the ListView and grab the value in the EditText view and then insert that into an array which I will do further calculations after. Here is my code right now. package com.hello_world; import java.util.ArrayList; import com.hello_world.ByteInputActivity.MyAdapter.ViewHolder; import android.app.Activity; import android.content.Context; import android.os.Bundle; import android.util.Log; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnFocusChangeListener; import android.view.View.OnKeyListener; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.Button; import android.widget.EditText; import android.widget.ListView; import android.widget.TextView; public class ByteInputActivity extends Activity { private ListView myList; private MyAdapter myAdapter; private Integer resQuestions; private Integer indexVal = 0; private View caption; ViewHolder holder; ArrayList<Integer> intArrayList = new ArrayList<Integer>(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.fieldlist); //Gets number of questions from MainActivity Bundle extras = getIntent().getExtras(); if(extras !=null) { resQuestions = extras.getInt("index"); } myList = (ListView) findViewById(R.id.FieldList); myList.setItemsCanFocus(true); myAdapter = new MyAdapter(); myList.setAdapter(myAdapter); Button submit = (Button) findViewById(R.id.btn_New); submit.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { for (int i = 0; i < myList.getCount() ; i++) { View vListSortOrder; vListSortOrder = myList.getChildAt(i); String temp = holder.caption.getText().toString(); Log.e("VALUES", "" +temp); } } }); } public class MyAdapter extends BaseAdapter { private LayoutInflater mInflater; public ArrayList myItems = new ArrayList(); public MyAdapter() { mInflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE); for (int i = 0; i < resQuestions; i++) { ListItem listItem = new ListItem(); listItem.caption = "Index " + i; listItem.indexText = "Index " + i; myItems.add(listItem); indexVal += 1; } notifyDataSetChanged(); } public int getCount() { return myItems.size(); } public Object getItem(int position) { return position; } public long getItemId(int position) { return position; } public View getView(int position, View convertView, ViewGroup parent) { if (convertView == null) { holder = new ViewHolder(); convertView = mInflater.inflate(R.layout.item, null); holder.indexText = (TextView) convertView .findViewById(R.id.textView1); holder.caption = (EditText) convertView .findViewById(R.id.ItemCaption); convertView.setTag(holder); } else { holder = (ViewHolder) convertView.getTag(); } //Fill EditText with the value you have in data source holder.caption.setText(""); holder.caption.setId(position); holder.indexText.setText("Index " + position); holder.indexText.setId(position); //we need to update adapter once we finish with editing holder.caption.setOnFocusChangeListener(new OnFocusChangeListener() { public void onFocusChange(View v, boolean hasFocus) { if (!hasFocus){ final int position = v.getId(); final EditText Caption = (EditText) v; myItems.set(position, Caption.getText().toString()); } } }); return convertView; } class ViewHolder { EditText caption; TextView indexText; } class ListItem { String caption; String indexText; } } }

    Read the article

  • Error Expected Loop VBScript

    - by Yoko21
    I have a script that opens up an excel file if the password provided is correct. If its wrong, it prompts a message. It works perfectly when I add a loop at the end. However, the problem is whenever the password is wrong the script won't stop asking for the password because of the loop. What I want is the script to quit/close if the password is wrong. I tried to remove the loop and replaced it with "wscript.quit" but it always prompts the message "expected loop". Here is the code I made. password = "pass" do ask=inputbox ("Please enter password:","DProject") select case ask case password answer=true Set xl = CreateObject("Excel.application") xl.Application.Workbooks.Open "C:\Users\test1\Desktop\test.xlsx" xl.Application.Visible = True Set xl = Nothing wscript.quit end select answer=false x=msgbox("Password incorrect... Aborting") loop until answer=true Is it possible to put a message like that counts when aborting. like "Aborting in 3.... 2... 1".

    Read the article

  • Loop crashing program having to do with 2D arrays

    - by user450062
    I am creating an encoding program and when I instruct the program to create a 5X5 grid based on the alphabet while skipping over letters that match up to certain pre-defined variables(which are given values by user input during runtime). I have a loop that instructs the loop to keep running until the values that access the array are out of bounds, the loop seems to cause the problem. This code is standardized so there shouldn't be much trouble compiling it in another compiler. Also would it be better to seperate my program into functions? here is the code: #include<iostream> #include<fstream> #include<cstdlib> #include<string> #include<limits> using namespace std; int main(){ while (!cin.fail()) { char type[81]; char filename[20]; char key [5]; char f[2] = "q"; char g[2] = "q"; char h[2] = "q"; char i[2] = "q"; char j[2] = "q"; char k[2] = "q"; char l[2] = "q"; int a = 1; int b = 1; int c = 1; int d = 1; int e = 1; string cipherarraytemplate[5][5]= { {"a","b","c","d","e"}, {"f","g","h","i","j"}, {"k","l","m","n","o"}, {"p","r","s","t","u"}, {"v","w","x","y","z"} }; string cipherarray[5][5]= { {"a","b","c","d","e"}, {"f","g","h","i","j"}, {"k","l","m","n","o"}, {"p","r","s","t","u"}, {"v","w","x","y","z"} }; cout<<"Enter the name of a file you want to create.\n"; cin>>filename; ofstream outFile; outFile.open(filename); outFile<<fixed; outFile.precision(2); outFile.setf(ios_base::showpoint); cin.ignore(std::numeric_limits<int>::max(),'\n'); cout<<"enter your codeword(codeword can have no repeating letters)\n"; cin>>key; while (key[a] != '\0' ){ while(b < 6){ cipherarray[b][c] = key[a]; if ( f == "q" ) { cipherarray[b][c] = f; } if ( f != "q" && g == "q" ) { cipherarray[b][c] = g; } if ( g != "q" && h == "q" ) { cipherarray[b][c] = h; } if ( h != "q" && i == "q" ) { cipherarray[b][c] = i; } if ( i != "q" && j == "q" ) { cipherarray[b][c] = j; } if ( j != "q" && k == "q" ) { cipherarray[b][c] = k; } if ( k != "q" && l == "q" ) { cipherarray[b][c] = l; } a++; b++; } c++; b = 1; } while (c < 6 || b < 6){ if (cipherarraytemplate[d][e] == f || cipherarraytemplate[d][e] == g || cipherarraytemplate[d][e] == h || cipherarraytemplate[d][e] == i || cipherarraytemplate[d][e] == j || cipherarraytemplate[d][e] == k || cipherarraytemplate[d][e] == l){ d++; } else { cipherarray[b][c] = cipherarraytemplate[d][e]; d++; b++; } if (d == 6){ d = 1; e++; } if (b == 6){ c++; b = 1; } } cout<<"now enter some text."<<endl<<"To end this program press Crtl-Z\n"; while(!cin.fail()){ cin.getline(type,81); outFile<<type<<endl; } outFile.close(); } } I know there is going to be some mid-forties guy out there who is going to stumble on to this post, he's have been programming for 20-some years and he's going to look at my code and say: "what is this guy doing".

    Read the article

  • How can I speed-up this loop (in C)?

    - by splicer
    Hi! I'm trying to parallelize a convolution function in C. Here's the original function which convolves two arrays of 64-bit floats: void convolve(const Float64 *in1, UInt32 in1Len, const Float64 *in2, UInt32 in2Len, Float64 *results) { UInt32 i, j; for (i = 0; i < in1Len; i++) { for (j = 0; j < in2Len; j++) { results[i+j] += in1[i] * in2[j]; } } } In order to allow for concurrency (without semaphores), I created a function that computes the result for a particular position in the results array: void convolveHelper(const Float64 *in1, UInt32 in1Len, const Float64 *in2, UInt32 in2Len, Float64 *result, UInt32 outPosition) { UInt32 i, j; for (i = 0; i < in1Len; i++) { if (i > outPosition) break; j = outPosition - i; if (j >= in2Len) continue; *result += in1[i] * in2[j]; } } The problem is, using convolveHelper slows down the code about 3.5 times (when running on a single thread). Any ideas on how I can speed-up convolveHelper, while maintaining thread safety?

    Read the article

  • How to do a for loop in windows command line?

    - by TheFoxx
    I was wondering if this was possible? I'm not familiar with using windows command line, but I have to use it for a project I'm working on. I have a a number of files, for which I need to perform a function for each. I'm used to working with python, but obviously this is a bit different, so I was hoping for some help. Basically I need the for loop to iterate through 17 files in a folder, perform a function on each (that's using the specific software I have here for the project) and then that will output a file with a unique name (the function normally requires me to state the output file name) I would suck it up and just do it by hand for each of the 17, but basically it's creating a database of a file, and then comparing it to each of the 17. It needs to be iterated through several hundred times though. Using a for loop could save me days of work. Suggestions?

    Read the article

  • Why are my thread being terminated ?

    - by Sephy
    Hi, I'm trying to repeat calls to methods through 3 differents threads. But after I start my threads, during the next iteration of my loop, they are all terminated so nothing is executed... The code is as follows : public static void main(String[] args) { main = new Main(); pollingThread.start(); } static Thread pollingThread = new Thread() { @Override public void run() { while (isRunning) { main.poll(); // test the state of the threads try { Thread.sleep(1000); } catch (InterruptedException e) { e.printStackTrace(); } } }; }; public void poll() { if (clientThread == null) { clientThread = new Thread(new Runnable() { @Override public void run() { //create some objects } }); clientThread.start(); } else if (clientThread.isAlive()) { // do some treatment } if (gestionnaireThread == null) { gestionnaireThread = new Thread(new Runnable() { @Override public void run() { //create some objects }; }); gestionnaireThread.start(); } else if (gestionnaireThread.isAlive()) { // do some treatment } if (marchandThread == null) { marchandThread = new Thread(new Runnable() { @Override public void run() { // create some objects }; }); marchandThread.start(); } else if (marchandThread.isAlive()) { // do some treatment } } And for some reason, when I test the state of my different threads, they appear as runnable and then a the 2nd iteration, they are all terminated... What am I doing wrong? I actually have no error, but the threads are terminated and so my loop keeps looping and telling me the threads are terminated.... Thanks for any help.

    Read the article

  • Java loop and increment problem

    - by user552961
    Can any one tell me what is the problem in my program? String a[],b[]; int c[] = new int[b.length]; for (int j = 0; j < a.length; j++) { for (int k = 0; k < b.length; k++) { if (b[k].equals(a[j])) { c[k]++; } else { c[k] = 0; } } } I have thousands of words stored in a HashMap. Now I want to check in every file that how many time one word occurred from allWords. Can you point out mistake in my program or give me your idea that how I can do it?

    Read the article

  • Using Jquery 1.8.0 return false is not breaking an each() loop

    - by user1879729
    Here is the script I am using. $('.row').each(function(){ $(this).each(function(){ if($(this).find('.name').val()==""){ $(this).find('.name').val(data.name); $(this).find('.autonomy').val(data.autonomy); $(this).find('.purpose').val(data.purpose); $(this).find('.flow').val(data.flow); $(this).find('.relatedness').val(data.relatedness); $(this).find('.challenge').val(data.challenge); $(this).find('.mastery').val(data.mastery); $(this).find('.colour').val(data.colour); done=true; } if(done==true){ alert("here"); return false; } }); }); It just seems to totally ignore the return false and I can't seem to work out why!

    Read the article

< Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >