Search Results

Search found 5313 results on 213 pages for 'steve care'.

Page 97/213 | < Previous Page | 93 94 95 96 97 98 99 100 101 102 103 104  | Next Page >

  • list or container O(1)-ish insertion/deletion performance, with array semantics

    - by Chris Kaminski
    I'm looking for a collection that offers list semantics, but also allows array semantics. Say I have a list with the following items: apple orange carrot pear then my container array would: container[0] == apple container[1] == orangle container[2] == carrot Then say I delete the orange element: container[0] == apple container[1] == carrot I don't particularly care if sort order is maintained, I'd just like the array values to function as accelerators to the list items, and I want to collapse gaps in the array without having to do an explicit resizing.

    Read the article

  • Opinions on collision detection objects with a moving scene

    - by Evan Teran
    So my question is simple, and I guess it boils down to how anal you want to be about collision detection. To keep things simple, lets assume we're talking about 2D sprites defined by a bounding box. In addition, let's assume that my sprite object has a function to detect collisions like this: S.collidesWith(other); Finally the scene is moving and "walls" in the scene can move, an object may not touch a wall. So a simple implementation might look like this (psuedo code): moveWalls(); moveSprite(); foreach(wall as w) { if(s.collidesWith(w)) { gameover(); } } The problem with this is that if the sprite and wall move towards each other, depending on the circumstances (such as diagonal moment). They may pass though each other (unlikely but could happen). So I may do this instead. moveWalls(); foreach(wall as w) { if(s.collidesWith(w)) { gameover(); } } moveSprite(); foreach(wall as w) { if(s.collidesWith(w)) { gameover(); } } This takes care of the passing through each other issue, but another rare issue comes up. If they are adjacent to each other (literally the next pixel) and both the wall and the sprite are moving left, then I will get an invalid collision since the wall moves, checks for collision (hit) then the sprite is moved. Which seems unfair. In addition, to that, the redundant collision detection feels very inefficient. I could give the player movement priority alleviating the first issue but it is still checking twice. moveSprite(); foreach(wall as w) { if(s.collidesWith(w)) { gameover(); } } moveWalls(); foreach(wall as w) { if(s.collidesWith(w)) { gameover(); } } Am I simply over thinking this issue, should this just be chalked up to "it'll happen rare enough that no one will care"? Certainly looking at old sprite based games, I often find situations where the collision detection has subtle flaws, but I figure by now we can do better :-P. What are people's thoughts?

    Read the article

  • Invoking a URL - c#

    - by user177883
    I m trying to invoke a URL in C#, I am just interested in invoking, and dont care about response. When i have the following, does it mean that I m invoking the URL? HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);

    Read the article

  • Google image Swirl - interactive information visualization

    - by skyde
    I have seen this image swirl effect on a visual thesaurus. Is there any open source code for this? Or research paper explaining how they made it. I don't care about the algorithm to match similar objects. I only am wondering about the effects. From what i understand they are called recursive orbital diagram. Screenshot: google Wonder Wheel google image swirl

    Read the article

  • What's faster to parse lots of data (5Mb): eval or json?

    - by AlfaTeK
    I want to get, via ajax, a collection of data objects and parse them into JS data. Currently I have 2 choices: - Server returns valid javascript code and then I eval it. - Server returns JSON object and then I eval the json object What is the fastest of these in Firefox? (I only care about the "parsing" performance, not server or data transfer)

    Read the article

  • Error at JSON:Missing ] after element list

    - by dhivya
    var phoneBookTableValue = []; phoneBookTableValue.push({ "key":"1", "value":["3396,Accounting ,CCH,,,,","1"]}); phoneBookTableValue.push({ "key":"2", "value":["3284,Acute Care ,CCH,,,,","2"]}); phoneBookTableValue.push({ "key":"3", "value":["3265,Acute'Care East ,CCH,,,,","3"]}); When running the javascript file I get the error "missing ] after element list. Can U help me? PLZ!

    Read the article

  • Mercurial Workflow (Shared Files)

    - by Jake Pearson
    Let's say I have programmers and artists working on a project. The artists have some folders they care about: /Doodles /Images/Jpgs And maybe the programmers have a folder like this: /Code/View/Jpgs What is the best process in Mercurial to keep the 2 Jpgs folders synced? I have used Vault, where you can have 2 or more files/folders linked in a repository so updating one updates another. Is there a way to do the same thing with Mercurial?

    Read the article

  • Rookie file permissions question

    - by Camran
    What is the ending 'r' for and the leading 'd' for in file permissions on Linux? Example: drwxr-xr-x I know about the user, group, others part, and I know w=write, r=read, x=execute. But I don't know about the leading 'd' and the trailing 'r'. Care to explain? Thanks

    Read the article

  • What are some good usability guidelines an average developer should follow?

    - by Allain Lalonde
    I'm not a usability specialist, and I really don't care to be one. I just want a small set of rules of thumb that I can follow while coding my User Interfaces so that my product has decent usability. At first I thought that this question would be easy to answer "Use your common sense", but if it's so common among us developers we wouldn't, as a group, have a reputation for our horrible interfaces. Any Suggestions?

    Read the article

  • Cool open source projects

    - by icco
    This is a similar question to one posted earlier, but slightly different. I'm interested in what your favorite Open Source app is. I don't care if it's well coded or if it isn't active anymore, I just am interesteed in apps that work and do something useful. The internet is a big place, so with a few suggestions some of us may find a new favorite app.

    Read the article

  • Good Haskell coding standards

    - by Alexey Romanov
    Could someone provide a link to a good coding standard for Haskell? I've found this and this, but they are far from comprehensive. Not to mention that the HaskellWiki one includes such "gems" as "use classes with care" and "defining symbolic infix identifiers should be left to library writers only."

    Read the article

  • Dictionary with single item

    - by alhazen
    In the case where Dictionary<object, object> myDictionary happens to contain a single item, what is the best way to retrieve the value object (if I don't care about the key) ? if (myDictionary.Count == 1) { // Doesn't work object obj = myDictionary.Values[0]; } Thanks

    Read the article

  • With ARC why use @properties anymore?

    - by trapper
    In non-ARC code retained properties handily take care of memory management for you using the self.property = syntax, so we were taught to use them for practically everything. But now with ARC this memory management is no longer an issue, so does the reason for using properties evaporate? is there still any good reason (obviously other than providing public access to instance variables) to use properties anymore?

    Read the article

  • a script translatable to JavaScript with callback-hell automatic avoider :-)

    - by m1uan
    I looking for "translator" for JavaScript like already is CoffeScript, which will be work for example with forEach (inspired by Groovy) myArray.forEach() -> val, idx { // do something with value and idx } translate to JavaScript myArray.forEach(function(val, idx){ // do something with value and idx }); or something more usefull... function event(cb){ foo()-> err, data1; bar(data1)-> err, data2; cb(data2); } the method are encapsulated function event(cb){ foo(function(err,data1){ bar(data1, function(err, data2) { cb(data2); }); }); } I want ask if similar "compiler" to JavaScript like this even better already doesn't exists? What would be super cool... my code in nodejs looks mostly like this :-) function dealer(cb){ async.parallel([ function(pcb){ async.watterfall([function(wcb){ first(function(a){ wcb(a); }); }, function(a, wcb){ thirt(a, function(c){ wcb(c); }); fourth(a, function(d){ // dealing with “a” as well and nobody care my result }); }], function(err, array_with_ac){ pcb(array_with_ac); }); }, function(pcb){ second(function(b){ pcb(b);}); }], function(err, data){ cb(data[0][0]+data[1]+data[0][1]); // dealing with “a” “b” and “c” not with “d” }); } but, look how beautiful and readable the code could be: function dealer(cb){ first() -> a; second() -> b; third(a) -> c; // dealing with “a” fourth(a) -> d; // dealing with “a” as well and nobody care about my result cb(a+b+c); // dealing with “a” “b” and “c” not with “d” } yes this is ideal case when the translator auto-decide, method need to be run as parallel and method need be call after finish another method. I can imagine it's works Please, do you know about something similar? Thank you for any advice;-)

    Read the article

  • Running ssh-keygen without human interaction?

    - by Marco
    Would it be possible to run ssh-keygen without human interaction? I have a shell script that takes care of server deployment from start to finish, but ssh-keygen is the only remaining piece that still requires my input. Would it be possible to feed the parameters to it? Or is there something similar to debconf-set-selections that could be used for this? *running Debian

    Read the article

  • C++ Coding Style Conventions Doc

    - by uray
    I need to write some coding style convention document in C++ for my team, is there any example or reference how such document is made, what should I define? which convention is should be avoided? is there any C++ coding style standard defined somewhere? or care to share some if you have one? *note: I know its been asked many time, but what I need is something like this http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html but specifically for C++

    Read the article

  • Rails routes matching query parameters

    - by Harry Wood
    Rails routes are great for matching RESTful style '/' separated bits of a URL, but can I match query parameters in a map.connect config. I want different controllers/actions to be invoked depending on the presence of a parameter after the '?'. I was trying something like this... map.connect "api/my/path?apple=:applecode", :controller = 'apples_controller', :action = 'my_action' map.connect "api/my/path?banana=:bananacode", :controller = 'bananas_controller', :action = 'my_action' For routing purposes I don't care about the value of the parameter, as long as it is available to the controller in the 'params' hash

    Read the article

  • Best light weight JavaScript IDE

    - by Superdumbell
    What is a good light weight JavaScript IDE? I don't care too much for the one built into VS because it seams lacking. I've been using 1st JavaScript Editor Pro as a alternative for working with JavaScript but I wanted to see if there is any thing else out there that is better and light weight.

    Read the article

  • Placing an embedded google map marker with Selenium

    - by Isaac
    I have an asp.net website which as part of a wizard uses an embedded google map to select a location by clicking on the map to place a marker. How do I automate this with Selenium? In particular I've tried: ClickAt DoubleClickAt MouseDownAt MouseUpAt In all cases passing the map div id as the locator and "100,100" as the coordinate. I don't care where on the map the marker is placed, as long as I can place that marker.

    Read the article

  • Creating content input form with custom theme (Drupal)

    - by AndrewSmith
    I'm creating a site which I want to place content input form in custom themed template. I opted to do this because I wanted the whole site to be looked uniform. That said, I'm not sure as to what is the best approach to do this. Is it proper to invoke hook_insert/delete/update and hook_perm/hook_access by myself or is there anyway I can still use my custom theme and write a code in a way that drupal would take care of invoking appropriate hooks accordingly? Thanks in advance PS : I'm on drupal 6.x

    Read the article

  • How to load image data from resource bitmap file for directshow filter ?

    - by Forrest
    I need put one bitmap image to my directshow filter. Then user can use this bitmap image and do not care where is it. First, I import this bitmap file into resource bundle, and get one IDB_BITMAP1. Then, I need to read this IDB_BITMAP1 using opencv cvLoadImage or some windows image API to load this image into buffer. So question is how to do this ? Or is that possible ? Thanks

    Read the article

< Previous Page | 93 94 95 96 97 98 99 100 101 102 103 104  | Next Page >