Search Results

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

Page 93/570 | < Previous Page | 89 90 91 92 93 94 95 96 97 98 99 100  | Next Page >

  • Revision, Quadratic Time

    - by stan
    I am not sure if you can post revision programming questions in here but i am stuck with some algorithms revision If an algorithm is quadratic it takes time proportional to the number of n^2 ? So if the slides say its almost 1/2 the square of n records is this the same as saying (n^2 * 0.5) Thanks

    Read the article

  • iPhone "multi-threading" question

    - by MrDatabase
    I have a simple iPhone game consisting of two "threads": the main game loop where all updating and rendering happen 30 times per second (NSTimer)... and the "thread" that calls the accelerometer delegate 100 times per second. I have a variable "xPosition" that's updated in the accelerometer delegate function and used in the game loop. Is there a possibility of the two "threads" trying to use xPosition at the same time (hence causing a crash or some other problem). If so how can I fix this w/ minimal impact to the game's performance? I've been using this set-up for many months of development and incremental testing and I've never run into any problems. Cheers!

    Read the article

  • Test massive website

    - by Ant
    My company has just migrated all the code for our website to 3 identical servers on an off-site location. Now it is our job to test them. However, the amount of websites/functionality that we have to test is exorbitant, and multiply that times 3! To check every single link and every single function is a daunting task. We are in the process of manually doing that right now. My question to you guys/girls is this... Is there a way to automate the testing so we don't have to waste our time clicking, waiting, and checking the response, times 3? ;-) Let me know if you need any other info. Thanks!

    Read the article

  • How to style forms in the Zend framework?

    - by user505988
    Hi, I really like the idea of putting forms into a seperate class that manages validation etc, but I don't like everything ending up in a DL and also not being able to use square bracket notation in post elements like <input type='checkbox' name='data[]'>. Is there another way of generating forms - like in views so I can style them the way I want, but also keeping the validation aspect? Also how would I load this view into my current view (using partial view somehow?)

    Read the article

  • Multiple svn projects into one git repository?

    - by trondgzi
    Hi, I have started to use git-svn for some of my work to be able to do local commits. This works great for projects that use standard svn layout. Recently I started working on a Java project that is split into multiple connected modules (20-25), and each module have its own root folder in the same svn repo with its own trunk/branches/tags. svnrepo/ module-1 trunk branches tags module-N trunk branches tags I have cloned each and every module with git svn clone -s /path/to/svnrepo/module[1-N]. The "problem" is that when I want to do git svn rebase on all modules i have to do it N times. I have tried to do git svn clone /path/to/svnrepo/ do avoid doing the rebase operation N times, but that leaves me with a directory layout that is the same as in the svn repo. Is there a way that I can track all the trunks of all modules in one git repo? So that I get a directory layout like this within my git repository: module-1 module-2 module-N

    Read the article

  • In SQL, how can I count the number of values in a column and then pivot it so the column becomes the

    - by Josh Yeager
    I have a survey database with one column for each question and one row for each person who responds. Each question is answered with a value from 1 to 3. Id Quality? Speed? -- ------- ----- 1 3 1 2 2 1 3 2 3 4 3 2 Now, I need to display the results as one row per question, with a column for each response number, and the value in each column being the number of responses that used that answer. Finally, I need to calculate the total score, which is the number of 1's plus two times the number of 2's plus three times the number of threes. Question 1 2 3 Total -------- -- -- -- ----- Quality? 0 2 2 10 Speed? 2 1 1 7 Is there a way to do this in set-based SQL? I know how to do it using loops in C# or cursors in SQL, but I'm trying to make it work in a reporting tool that doesn't support cursors.

    Read the article

  • Please help me with this Ruby code

    - by Bragaadeesh
    Hi, I am new to Ruby and I know that I am not using the simple and powerful methods available within it. I made my code work but it has to be simple not this huge (especially I feel I am very bad at loop variables) i = 0 j = 0 loop_count = ((to_date-from_date)/(60*60*24)).to_i#diff b/w two dates in days loop_count.times do 48.times do event = Icalendar::Event.new status = get_availability_on_date_and_hour(@templates, @availabilities, from_date+j.days, i).downcase if(status != 'unavailable') #Initialize start and end dates in DateTime's civil format bias_date_time = DateTime.civil(from_date.year, from_date.month, from_date.day) event.dtstart = bias_date_time + j.day + (i/2).to_i.hour + (i%2*30).to_i.minutes event.dtend = event.dtstart + 30.minutes event.summary = status.upcase cal.add_event(event) end i += 1 end i = 0 j += 1 end

    Read the article

  • Why can I check some event handlers for null, some not?

    - by Inno
    Hi, I have a ugly piece of code that adds event handlers. The problem is, if the code is called multiple times, the event handlers are called multiple times. To solve the problem, I remove the event handler first and then add it. Now I've seen the following behaviour: Some event handlers can be checked like: if (object.event == null) { // // Code // } others of the form if (object.object.event == null) { // // Code // } I get a message like 'object.object.event' may only occur left of -= or +=. (Since I'm using a german version of visual studio, I don't know the correct translation to english). I have no idea why the behaviour looks this inconsequent so I would be grateful for some information on this. To be more specific: It's user control. if (myControl.Event == null) { // // works // } if (myControl.TreeView.NodeMouseClick == null) { // // doesn't work // }

    Read the article

  • HTML5 click event

    - by RichadC
    I made an array of squares ctx.fillStyle = "rgb(0,0,0)"; for(x=0;x<=25;x++){ for(y=0;y<=25;y++){ ctx.fillRect(x, y, 20, 20); } } and I want a square to change its colour when clicked. How can I do that? I'm don't know much HTML5 and need some help. Thanks

    Read the article

  • Why is numpy c extension slow?

    - by Bitwise
    I am working on large numpy arrays, and some native numpy operations are too slow for my needs (for example simple operations such as "bitwise" A&B). I started looking into writing C extensions to try and improve performance. As a test case, I tried the example given here, implementing a simple trace calculation. I was able to get it to work, but was surprised by the performance: for a (1000,1000) numpy array, numpy.trace() was about 1000 times faster than the C extension! This happens whether I run it once or many times. Is this expected? Is the C extension overhead that bad? Any ideas how to speed things up?

    Read the article

  • living column in instruments

    - by dubbeat
    In the context of allocations what exactly does the living column mean? Does it mean the number of times an object was created or does it mean how many instances of an object there is? I ask because I'm testing going in and out of a view. When I enter the view I create a class "myClass". When I exit the view I nil "myClass" and release it. If I go in and out of the view 6 times for example the living column in instruments for "myClass" says 6. Is this normal or is it not being released properly?

    Read the article

  • How to, set-justification-full per line in emacs without messing up on return?

    - by inaki
    Hi, I have two problems in emacs. First. How do I set-justification-full for the whole document? I can do M-X set-justification-full for a region successfully, but I would like to make it work in the whole document. Second. How do I manage not to get lines jumping from one place to another when I have done set-justification-full, and press enter? That is, say I have the following paragraph: %%if normalized beforehand then the rule would be, %%\begin{gather} %%(\hat{y}_{i}^{'} \times \hat{y}_{i+1}^{'}) \cdot \hat{z}_{mst} = 1, \quad then \ \Omega 1\\ %%(\hat{y}_{i}^{'} \times \hat{y}_{i+1}^{'}) \cdot \hat{z}_{mst} = %%-1,\quad then \ \Omega When I do set-justification-full, it will convert six lines into three lines, that is, what I want to do is a per line justification. Is this possible in emacs? Thank you all very much for your help. Inhaki2006

    Read the article

  • Word Counter Implementation

    - by kenny
    Is there a better way than the following brute foce implementation of a c# word counting class? UPDATED CODE: Sorry! /// <summary> /// A word counting class. /// </summary> public class WordCounter { Dictionary<string, int> dictTest = new Dictionary<string, int> (); /// <summary> /// Enters a word and returns the current number of times that word was found. /// </summary> /// <param name="word">The word or string found.</param> /// <returns>Count of times Found() was called with provided word.</returns> public int Found ( string word ) { int count = 1; return dictTest.TryGetValue ( word, out count ) ? ++dictTest[word] : dictTest[word] = 1; } }

    Read the article

  • HTML/Javascript - Inconsistent positioning

    - by user1473358
    I'm in the process of designing this site http://www.parisgaa.org/parisgaels and have a problem. The image slider on the homepage messes up sometimes. Most of the time it works and looks fine, but other times its positioning seems to get messed up and it appears underneath the content that should be below it (i.e. with that content overlapping the image). You should be able to replicate this in Chrome - just refresh a couple of times. I'd appreciate any help at all.

    Read the article

  • Will PHP script running on top of Apache be faster than C# stand alloun programm doing same thing (s

    - by Ole Jak
    I mean PHP scripts on Apache are oriented for many users to use tham at the same time. So will 1000 requests which came at the (relativly) same time be fully responsed faster than C# .Net programm perfoming algorithm 1000 times in while loop? So we input same data, we perform same algorithm, which is written in a wary same way (respecting language diferencis ofcourse), outputing same data (lat us say saving it to file for tham to be relativly equal) Who will be faster on some 1000 times of performing O(NN) algorithm, in which case (if it is possible) one will owerrun another?

    Read the article

  • java/swing: font size selection + rendering

    - by Jason S
    I want to create and fill/stroke a path that consists of an outer boundary which is a square of side d and an inner boundary that is the outline of any of the capital letters. How can I do this? (challenges = creating a mask from a font, and figuring out the right size/position to use)

    Read the article

  • jQuery AJAX functions

    - by sundowatch
    I am using jQuery's load() function when getting a page to a div like that: content.php page is : <script type="text/javascript"> $(".content").load("asd.php"); </script> and asd.php is: <script type="text/javascript"> alert("Hello World"); </script> When load ajax finished alert() message appears 3 times. Actually it must appears only 1 time. So load() function get page 3 times. How can I get the page a time?

    Read the article

  • Fickle IE Issues with Height:100%'

    - by Mike R
    I am trying to set the height to 100% in the viewport for Internet Explorer. As you might imagine, the following code works everywhere else: * { margin: 0; padding: 0; } html, body { height: 100%; } body { font-family: Times New Roman, Times, serif; font-size: 13px; background-color:#E8E8E8; background:url(/images/background.png) repeat-x; } #wrap { margin:0 auto; width: 935px; /* Change to desired width :) */ min-height: 100%; background:url(/images/content.png)repeat-y; } #main { overflow: auto; padding-bottom: 112px; } /* must be same height as the footer */

    Read the article

  • reuse generators

    - by wiso
    I need to check the central limit with dices. Rool D dices. Sum the results. Repeat the same thing for N times. Change D and repeat. There's no need to store random values so I want to use only generators. The problem is that generators are consuming, I can't resuging them more times. Now my code use explicit for and I don't like it. dice_numbers = (1, 2, 10, 100, 1000) repetitions = 10000 for dice_number in dice_numbers: # how many dice to sum sum_container = [] for r in range(repetitions): rool_sum = sum((random.randint(1,6) for _ in range(dice_number))) sum_container.append(rool_sum) plot_histogram(sum_container) I want to create something like for r in repetitions: rools_generator = (random.randint(1,6) for _ in range(dice_number) sum_generator = (sum(rools_generator) for _ in range(r)) but the second time I resuse rools_generator it is condumed. I need to construct generator class?

    Read the article

< Previous Page | 89 90 91 92 93 94 95 96 97 98 99 100  | Next Page >