Search Results

Search found 14236 results on 570 pages for 'times square'.

Page 14/570 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • AJAX binds jquery events multiple times

    - by Dynde
    Hi... I have a masterpage setup, with a pageLoad in the topmost masterpage, which calls pageLoad2 for nested masterpages which calls pageLoad3 for content pages. In my content page I have a jquery click event and in my nested masterpage I have a web user control. Whenever I use the user control in the nested masterpage, it rebinds the click event in the content page (undoubtedly because the pageLoad3 is called again), but this makes the click event fire twice on a single click. The problem gets worse the higher up masterpages you go (eg. fires 3 times if user control from topmost masterpage is called). Can anyone tell me how to make sure it only binds the jquery events once?

    Read the article

  • How to compare two times in milliseconds precision?

    - by Marcos Issler
    I have a subtitle text file that works with standart srt format 00:00:00,000 Hour, minutes, seconds, milliseconds. I want to create a timer to update the subtitle screen and check the current time to know what subtitle show on screen. Which is the best to use? NSTimeInterval, NSDate? I think the best is to convert all to times to milliseconds number and compare. But NSTimeInterval works with seconds, not milliseconds. Some clue? Marcos

    Read the article

  • Best CPUs for speeding up compiling times of C++ w/ DistGCC

    - by Jay
    I'm putting together a distributed build farm with DistGCC to speed up our teams compile times and just looking for thoughts on which processors to use in the hosts. Are we going to get a noticeable decrease in time using 8 cores vs. 4-hyperthreaded cores? Big difference in time between i7 and Xeon? etc, etc. Just need advice from people who've put together kick-a build clusters. We've got a majority of the normal things to speed up builds in place (pre-compiled headers, ccache, local gigabit connections between them, tons of ram, etc) so please just give advice on the best processor to use. And money is a factor, but anythings doable if the performance increase is noticeable. Thanks. Jay

    Read the article

  • Flex: Result event multiple times

    - by Tom
    Hello everybody!! I am trying to learn Flex and now i have the next code: http://pastebin.com/rZwxF7w1 This code is for my login component. I want to get a special string for encrypting my password. This string is given by my authservice. But when i login i get a multiple times a alert with Done(line 69 in the pastebin code or line 4 in the code on the bottom of this question). But i want that it shows one single time. Does someone know what is wrong with this code? Tom protected function tryLogin():void { encryptStringResult.addEventListener('result', function(event:ResultEvent):void { var encryptString:String = event.result.toString(); Alert.show('Done'); }); encryptStringResult.token = auth.getEncryptString(); }

    Read the article

  • Run java thread at specific times

    - by rmarimon
    I have a web application that synchronizes with a central database four times per hour. The process usually takes 2 minutes. I would like to run this process as a thread at X:55, X:10, X:25, and X:40 so that the users knows that at X:00, X:15, X:30, and X:45 they have a clean copy of the database. It is just about managing expectations. I have gone through the executor in java.util.concurrent but the scheduling is done with the scheduleAtFixedRate which I believe provides no guarantee about when this is actually run in terms of the hours. I could use a first delay to launch the Runnable so that the first one is close to the launch time and schedule for every 15 minutes but it seems that this would probably diverge in time. Is there an easier way to schedule the thread to run 5 minutes before every quarter hour?

    Read the article

  • Foreach loop is running n times

    - by Furqan Khyraj
    foreach($CarAdList as $CarAd) { echo($msg .= '<tr><td>'.$CarAd->getCarAdID().'</td><td>' .$CarAd->getBrandText().'</td><td>' .$CarAd->getDescription(). '</td><td><a href="status.php?id='.$CarAd->getCarAdID().'"><img src="../images/active.png" /></a></td><td><img src="../images/delete.png" width="30px" /></td></tr>'); } e.g, the number of rows =38 n= the number of rows * the number of rows-- it is running n times so its displaying 5 5 4 5 4 3 5 4 3 2 5 4 3 2 1

    Read the article

  • Flex: Result event given multiple times

    - by Tom
    Hello everybody!! I am trying to learn Flex and now i have the next code: http://pastebin.com/rZwxF7w1 This code is for my login component. I want to get a special string for encrypting my password. This string is given by my authservice. But when i login i get a multiple times a alert with Done(line 69 in the pastebin code or line 4 in the code on the bottom of this question). But i want that it shows one single time. Does someone know what is wrong with this code? Tom protected function tryLogin():void { encryptStringResult.addEventListener('result', function(event:ResultEvent):void { var encryptString:String = event.result.toString(); Alert.show('Done'); }); encryptStringResult.token = auth.getEncryptString(); }

    Read the article

  • Designing a Tag table that tells how many times it's used

    - by Satoru.Logic
    Hi, all. I am trying to design a tagging system with a model like this: Tag: content = CharField creator = ForeignKey used = IntergerField It is a many-to-many relationship between tags and what's been tagged. Everytime I insert a record into the assotication table, Tag.used is incremented by one, and decremented by one in case of deletion. Tag.used is maintained because I want to speed up answering the question 'How many times this tag is used?'. However, this seems to slow insertion down obviously. Please tell me how to improve this design. Thanks in advance.

    Read the article

  • Object sent -autorelease too many times

    - by mongeta
    I have this code that simple returns Today's date as a string formatted: +(NSString*) getTodayString_YYYY_MM_DD { NSDate * today = [NSDate date]; NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; [formatter setDateFormat:@"yyyy-MM-dd"]; return [[formatter stringFromDate:today] autorelease]; } With instruments I'm not getting a memory leak, but when I Analyze, XCode says: Object sent -autorelease too many times If I understand correctly, I have to release manually the formatter as I'm creating it using 'alloc', but I can't release here because I have to return the value, so I add the autorelease. How I can do it better to improve it ? thanks, r.

    Read the article

  • How to make a thread try to reconnect to the Database x times using JDBCTemplate

    - by gillJ
    Hi, I have a single thread trying to connect to a database using JDBCTemplate as follows: JDBCTemplate jdbcTemplate = new JdbcTemplate(dataSource); try{ jdbcTemplate.execute(new CallableStatementCreator() { @Override public CallableStatement createCallableStatement(Connection con) throws SQLException { return con.prepareCall(query); } }, new CallableStatementCallback() { @Override public Object doInCallableStatement(CallableStatement cs) throws SQLException { cs.setString(1, subscriberID); cs.execute(); return null; } }); } catch (DataAccessException dae) { throw new CougarFrameworkException( "Problem removing subscriber from events queue: " + subscriberID, dae); } I want to make sure that if the above code throws DataAccessException or SQLException, the thread waits a few seconds and tries to re-connect, say 5 more times and then gives up. How can I achieve this? Also, if during execution the database goes down and comes up again, how can i ensure that my program recovers from this and continues running instead of throwing an exception and exiting?

    Read the article

  • Calcualting Optimal Site to Site Routing using pre-computed times between sites

    - by Idistic
    Assume that I have a number of sites (locations) and the time it takes to travel from each site to each site is pre-computed Example Data - Site to Site Pre-Calculated Times in minutes From Start Site To A 20 To B 15 To C 15 From Site A To B 10 To C 15 Site B To A 10 To C 20 Site C To A 15 To B 20 4 Sites is fairly simple, but what if the site set was say 1000 sites? Given a large site set What would the best approach be to quickly find the optimal routes from the start site while visiting every other site just once? Route Solutions from Start Site for 3 sites from a start site 1 A(20) B(10) C(20) = 50 2 A(20) C(15) B(20) = 55 3 B(15) A(10) C(15) = 40 4 B(15) C(20) A(15) = 50 5 C(15) A(15) B(10) = 40 6 C(15) B(20) A(10) = 45

    Read the article

  • Objective-c class initializer executes multiple times

    - by apisip
    Unless I misunderstood it, this LINK from Apple's documentation clearly states that the class initializer, "+ (void)initialize)", only executes once per class. Here is the excerpt: Special Considerations initialize it is invoked only once per class. If you want to perform independent initialization for the class and for categories of the class, you should implement load methods. However, I'm getting a weird behavior on my project and the initializer is being executed twice. So I have to check if _classContext is null. I only got one class that has this method. What are the possible reasons why this is happening? I'm using XCode 4.5.2 and OS X 10.8.2. I got multiple iOS simulators, iPhone 5.1 and 6.0. + (void) initialize { num++; NSLog([NSString stringWithFormat:@"Times: %i", num]); if(_classContext == nil) _classContext = [[myClass alloc] init]; }

    Read the article

  • Very Different Execution Times of SQL Query in C# and SQL Server Management Studio

    - by Paul
    I have a simple SQL query that when run from C# takes over 30 seconds then times-out every time, whereas when run on SQL Server Management Studio successfully completes instantly. In the latter case, a query execution plan reveals nothing troubling, and the execution time is spread nicely through a few simple operations. I've run 'EXEC sp_who2' while the query is running from C#, and it is listed as taking 29,000 milliseconds of CPU time, and is not blocked by anything. I have no idea how to begin solving this. Does anyone have some insight? The query is: SELECT c.lngId, ... FROM tblCase c INNER JOIN tblCaseStatus s ON s.lngId = c.lngId INNER JOIN tblCaseStatusType t ON t.lngId = s.lngId INNER JOIN [Another Database]..tblCompany cm ON cm.lngId = cs.lngCompanyId WHERE t.lngId = 25 AND c.IsDeleted = 0 AND s.lngStatus = 1

    Read the article

  • How to print lines from a file that have repeated more than six times

    - by Mike
    I have a file containing the data shown below. The first comma-delimited field may be repeated any number of times, and I want to print only the lines after the sixth repetition of any value of this field For example, there are eight fields with 1111111 as the first field, and I want to print only the seventh and eighth of these records Input file: 1111111,aaaaaaaa,14 1111111,bbbbbbbb,14 1111111,cccccccc,14 1111111,dddddddd,14 1111111,eeeeeeee,14 1111111,ffffffff,14 1111111,gggggggg,14 1111111,hhhhhhhh,14 2222222,aaaaaaaa,14 2222222,bbbbbbbb,14 2222222,cccccccc,14 2222222,dddddddd,14 2222222,eeeeeeee,14 2222222,ffffffff,14 2222222,gggggggg,14 3333333,aaaaaaaa,14 3333333,bbbbbbbb,14 3333333,cccccccc,14 3333333,dddddddd,14 3333333,eeeeeeee,14 3333333,ffffffff,14 3333333,gggggggg,14 3333333,hhhhhhhh,14 Output: 1111111,gggggggg,14 1111111,hhhhhhhh,14 2222222,gggggggg,14 3333333,gggggggg,14 3333333,hhhhhhhh,14 What I have tried is to transponse the 2nd and 3rd fields with respect to 1st, so that I can use nawk on the field of $7 or $8 #!/usr/bin/ksh awk -F"," '{ a[$1]; b[$1]=b[$1]","$2 c[$1]=c[$1]","$3} END{ for(i in a){ print i","b[i]","c[i]} } ' file > output.txt

    Read the article

  • button and drop down controls events firing every alternate times

    - by Phani Kumar PV
    I am having a drop down list control and a button in user control. the button click event is registered dynamically. this event i sgetting fired every alternating time. dont know the reason why it is behaving so. later added the selected index changed to the drop down list control. this also is getting fired alternate times. the user control is invoked in a sharepoint web part. any pointers are greatly appreciated..

    Read the article

  • Ttstyledtextlabel does not draw properly when text property is assigned multiple times

    - by user210504
    I have A ttstyledtextlabel in my uitableview cell. It has got some web URLs for images which are being rendered. But since images take some time to download i reload the cell after sometime to render the images if they have been downloaded. The problem I am facing is that during subsequent assignment of text if the size of the label changes, happens when images have been successfully loaded the label does not render properly but rather blanks out. But I see the proper label when is scroll and come back to the cell again. Anyone faced this issue or simply when the following line is executed multiple times, the Styled Label goes blank StyledView.text = [TTStyledText textFromXHTML:[self getStyledText] lineBreaks:YES URLs:YES];

    Read the article

  • Parse xml file with same tag multiple times iphone sdk

    - by neha
    Hi all, In my application, I have a tag multiple times. I'm using xml parser. I'm taking a corresponding element with similar name as the one in xml file in my class. So in case of: <photo>abc</photo> <photo>def</photo> What I get in photo element of my class is the second element i.e def, as the first one gets overwritten as there's only one photo element in my class. My question is am I wrong in taking similar elements in class as in case of xml? Is there any better method or a better parser? Or I'm on right path and have to do this manually by setting some flags etc? Thanx in advance.

    Read the article

  • Display values and how many times they occured using a Dictionary

    - by user1730056
    I've been told to By using a dictionary (or your solution to Part 4), write a method at_least(a, n) that takes a list, a, and an integer, n, as arguments and returns a list containing only the elements of a that occur at least n times. For complete marks, the list should contain the elements in order of their first occurrence in a. I was able to figure this without using a dictionary, with def at_least2(a, n): return [x for x in a if a.count(x) is n] I was wondering how I can write this using a dictionary? The input is: a = [-6, 8, 7, 3, 2, -9, 1, -3, 2, -4, 4, -8, 7, 8, 2, -2, -7, 0, 1, -9, -3, -7, -3, -5, 6, -3, 6, -3, -10, -8] def at_least(a, 2): and the output: [8, 7, 2, -9, 1, -3, 2, -8, 7, 8, 2, -7, 1, -9, -3, -7, -3, 6, -3, 6, -3, -8] Edit: I don't understand how a dictionary is being used, yet the output isn't in dictionary form? My understanding is that dictionaries have values for each object. I'm not sure if I'm using the right terms.

    Read the article

  • Using View multiple times in Interface Builder

    - by user1396236
    I'm using a UITableview and have a custom Cell with some labels. I set up all the constraints in Interface Builder. Now I'm using this Cell multiple times, I just copied it in IB. Now it's the time to change some of these contraints because of some bugs (I'm converting a iPhone App to an Universal). But it can't be right that I now have to set the constraints manually for every cell? How do I do right? If I want to control the constraints in one central place, do I have to set them up in Code? I would really not like that! Thanks in advance.

    Read the article

  • ActionBar menu appearing 2 times one at top and second at bottom

    - by Ripal Tamboli
    In my application appearing very strange problem. I am using Action Bar with the help of "import android.support.v7.app.ActionBar; import android.support.v7.app.ActionBarActivity;" Now issue is same menu appearing two times. one is at top and second is at bottom. I want that menu at only top area. Below is the screenshot for your reference. My code for setting Action Bar is here: ActionBar actionBar = getSupportActionBar(); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD); actionBar.setDisplayShowTitleEnabled(true); actionBar.setTitle(title); if(isBackToHome) actionBar.setDisplayHomeAsUpEnabled(true); else{ actionBar.setDisplayHomeAsUpEnabled(false); actionBar.setHomeButtonEnabled(false); }

    Read the article

  • returning values from function or method multiple times by only calling the class once

    - by Sokhrat Sikar
    I have a members.php file that shows my websites members. I echo members name by using foreach method. A method of Members class returns an array, then I use foreach loop in the members.php file to echo the members. I am trying to aovid writing php code in my members.php file. Is there a way to avoid using foreach inside members.php file? For example, is it possible to return value from a method couple of times? (by only calling the object once). Just like how we normally call the functions? This question doesn't make sense, but I am just trying to see if there is a away around this issue?

    Read the article

  • Calling a method on an object a bunch of times versus constructing an object a bunch of times

    - by Ami
    I have a List called myData and I want to apply a particular method (someFunction) to every element in the List. Is calling a method through an object's constructor slower than calling the same method many times for one particular object instantiation? In other words, is this: for(int i = 0; i < myData.Count; i++) myClass someObject = new myClass(myData[i]); slower than this: myClass someObject = new myClass(); for(int i = 0; i < myData.Count; i++) someObject.someFunction(myData[i]); ? If so, how much slower?

    Read the article

  • How to call 3 threads sequentially many times?

    - by Hello
    How to call 3 threads sequentially many times? For example: In iteration 1, execution order should be "Thread0-thread1-thread2" then in iteration 2 should be same i.e "Thread0 - thread1-thread2" and so on. The sample code is just executing 3 threads only once. It is not going to 2nd iteration. Thread0 = CreateThread( NULL,0,ThreadProc0, NULL, CREATE_SUSPENDED, &ThreadID); Thread1 = CreateThread( NULL,0,ThreadProc1, NULL, CREATE_SUSPENDED, &ThreadID); Thread2 = CreateThread( NULL,0,ThreadProc2, NULL, CREATE_SUSPENDED, &ThreadID); for(i=0;i<iterations;i++) //Iterations in calling threads { ResumeThread(Thread0); WaitForSingleObject(Thread0, INFINITE); ResumeThread(Thread1); WaitForSingleObject(Thread1, INFINITE); ResumeThread(Thread2); WaitForSingleObject(Thread2, INFINITE); } // Close thread and semaphore handles

    Read the article

  • Matching two sections same number of times

    - by Leszczu
    Hello, i need a HTML to parse: <span>some text<span><span><span>text</span></span></span></span> I need to remove unnecessary <span> occurrences, so that output is: <span>some text<span>text</span></span> I wrote a regex, which does this once: /<SPAN>[^<]*<\/SPAN>/i How to make this work same number of times on both <span> and </span>?

    Read the article

  • What algorithm to use to fill a KenKen square board with cages?

    - by JimmyBoh
    I am working on recreating KenKen, a popular math puzzle involving a blank grid that is divided into "cages". Each cage is just a collection of adjacent squares and has a clue which is generally a number and an operand, shown below: What type of algorithm would be best to fill the square with cages? Assume the maximum number of cells per cage would be 3 and the board is 4x4 in size, like in the example above.

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >