Search Results

Search found 349 results on 14 pages for 'shortest'.

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

  • MongoDB -what's the safest and most efficient way to change from Master-Slave to ReplicaSet?

    - by SecondThought
    I now have two mongo servers with a Master-Slave configuration (all read-writes are done with the Master, the Slave is just a cold backup) serving a pretty demanding web app. I want to switch to ReplicaSet of 3 servers - I have these 3 already configured and working (still not connected to the web app). Just wondering what's the most efficient way (shortest down-time required, and lossless transfer of all data) to transfer all the data from the master/slave to the RS.

    Read the article

  • A seekable one-frame FLV video (with audio)?

    - by George Stephanos
    Is it possible to generate an FLV out of an MP3 and a JPG, without uselessly looping the image and still be able to seek the audio ? This command generates a non-seekable video: ffmpeg -y -i audio.mp3 -i image.jpg -r 1 -acodec copy video.flv and this one generates a seekable one, but with uselessly looping the image occupying both space and time: ffmpeg -y -loop_input -i audio.mp3 -i image.jpg -r 1 -acodec copy video.flv -shortest

    Read the article

  • Why is Reinforcement Learning so rarely used in pathfinding?

    - by doug
    The venerable shortest-path graph theoretic algorithm A* and subsequent improvements (e.g., Hierarchical Annotated A*) is clearly the technique of choice for pathfinding in game development. Instead, it just seems to me that RL is a more natural paradigm to move a character around a game space. And yet I'm not aware of a single game developer who has implemented a Reinforcement Learning-based pathfinding engine. (I don't infer from this that the application of RL in pathfinding is 0, just that it's very small relative to A* and friends.) Whatever the reason, it's not because these developers are unaware of RL, as evidenced by the fact that RL is frequently used elsewhere in the game engine. This question is not a pretext for offering an opinion on RL in pathfinding; in fact, i am assuming that the tacit preference for A* et al. over RL is correct--but that preference is not obviously to me and i'm very curious about the reason for it, particularly from anyone who has tried to use RL for pathfinding.

    Read the article

  • Adaptative interface with Open GL and machine learning in C#

    - by Afnan
    For my Semester project I have to go for any Adaptative Interface Design. My language is C# and I have to Use OpenTK (wrapper for OpenGL). I have an idea that I should show two points and some obstacles and my subject (user) would drag an object from one place to the final place avoiding the Obstacles. Also (s)he can place obstacles randomly. My software should be able to learn some paths by doing test runs and then after learning it should be able to predict the shortest path. I do not know how stupid this idea sounds but it is just an idea. I need help regarding any ideas for adaptative interface possible small projects or if my idea is ok then please can you tell me what should be used to implement it? I mean that along with OpenGl for the Graphics what can I use for machine learning?

    Read the article

  • My Mix10 coup de coeur

    - by guybarrette
    If you ask me what was my Mix10 coup de coeur, I’d have to say Bill Buxton.  I was privileged to spend an hour an a half in a small room with about twelve people and Bill Buxton.  This man has such a incredible background and he is so inspiring.  You could really tell that he is a researcher because as he was talking about something, you could see him thinking about something else and trying at the same time to cross reference that. Here’s a list of videos recorded at Mix.  The first one is the shortest one at 9 minutes. Bytes by MSDN (Interviewed by Tim Huckaby, a legend himself) Mix Day 2 Keynote (Last 1/4) An Hour with Bill Buxton (His Mix session) Bill Buxton & Microsoft Student Insiders at MIX10 Channel 9 Live at MIX10: Bill Buxton & Erik Meijer - Perspectives on Design var addthis_pub="guybarrette";

    Read the article

  • Adaptative Interface with Open GL and Machine Learning in c#

    - by Afnan
    For my Semester project i have to go for any Adaptative Interface Design. My language is c# and i have to Use OpenTK(Wrapper for Open GL). I have an idea that I should show Two points and some obstacles. and my subject which is user would drag an object from one place to the final place avoiding the Obstacles. and he can place obstacles randomly.My software should be made to learn some paths by doing test runs and then after learning program should be able to predict the shortest path. I donot know how stupid this idea sounds but it is just an idea.I need help regarding any ideas for adaptative interface possible small projects or if my idea is ok then please can you tell me what should be used to implement it? I mean that along with OpenGl for the Graphics what can i use for machine learning that helps me Thanks

    Read the article

  • Finding the contact point with SAT

    - by Kai
    The Separating Axis Theorem (SAT) makes it simple to determine the Minimum Translation Vector, i.e., the shortest vector that can separate two colliding objects. However, what I need is the vector that separates the objects along the vector that the penetrating object is moving (i.e. the contact point). I drew a picture to help clarify. There is one box, moving from the before to the after position. In its after position, it intersects the grey polygon. SAT can easily return the MTV, which is the red vector. I am looking to calculate the blue vector. My current solution performs a binary search between the before and after positions until the length of the blue vector is known to a certain threshold. It works but it's a very expensive calculation since the collision between shapes needs to be recalculated every loop. Is there a simpler and/or more efficient way to find the contact point vector?

    Read the article

  • Learning to optimize with Assembly

    - by niktehpui
    I am a second year student of Computer Games Technology. I recently finished my first prototype of my "kind" of own pathfinder (that doesn't use A* instead a geometrical approach/pattern recognition, the pathfinder just needs the knowledge about the terrain that is in his view to make decisions, because I wanted an AI that could actually explore, if the terrain is already known, then it will walk the shortest way easily, because the pathfinder has a memory of nodes). Anyway my question is more general: How do I start optimizing algorithms/loops/for_each/etc. using Assembly, although general tips are welcome. I am specifically looking for good books, because it is really hard to find good books on this topic. There are some small articles out there like this one, but still isn't enough knowledge to optimize an algorithm/game... I hope there is a modern good book out there, that I just couldn't find...

    Read the article

  • Techniques for getting off the ground in any language

    - by AndyBursh
    When I start learning a new language, I have a couple of simple implementations that I like to complete to familiarise myself with the language. Currently, I write: Fibonacci and/or factorial to get the hang of writing and calling methods, and basic recursion Djikstras shortest path (with a node type) to get to grips with making classes (or whatever the language equivalent is) with methods and properties, and also using them in slightly more complex code. I was wondering: does anybody else have any techniques or tools they like to use when getting off the ground in a new language? I'm always looking for new things to add to my "start-up routine".

    Read the article

  • Which of these algorithms is best for my goal?

    - by JonathonG
    I have created a program that restricts the mouse to a certain region based on a black/white bitmap. The program is 100% functional as-is, but uses an inaccurate, albeit fast, algorithm for repositioning the mouse when it strays outside the area. Currently, when the mouse moves outside the area, basically what happens is this: A line is drawn between a pre-defined static point inside the region and the mouse's new position. The point where that line intersects the edge of the allowed area is found. The mouse is moved to that point. This works, but only works perfectly for a perfect circle with the pre-defined point set in the exact center. Unfortunately, this will never be the case. The application will be used with a variety of rectangles and irregular, amorphous shapes. On such shapes, the point where the line drawn intersects the edge will usually not be the closest point on the shape to the mouse. I need to create a new algorithm that finds the closest point to the mouse's new position on the edge of the allowed area. I have several ideas about this, but I am not sure of their validity, in that they may have far too much overhead. While I am not asking for code, it might help to know that I am using Objective C / Cocoa, developing for OS X, as I feel the language being used might affect the efficiency of potential methods. My ideas are: Using a bit of trigonometry to project lines would work, but that would require some kind of intense algorithm to test every point on every line until it found the edge of the region... That seems too resource intensive since there could be something like 200 lines that would have each have to have as many as 200 pixels checked for black/white.... Using something like an A* pathing algorithm to find the shortest path to a black pixel; however, A* seems resource intensive, even though I could probably restrict it to only checking roughly in one direction. It also seems like it will take more time and effort than I have available to spend on this small portion of the much larger project I am working on, correct me if I am wrong and it would not be a significant amount of code (100 lines or around there). Mapping the border of the region before the application begins running the event tap loop. I think I could accomplish this by using my current line-based algorithm to find an edge point and then initiating an algorithm that checks all 8 pixels around that pixel, finds the next border pixel in one direction, and continues to do this until it comes back to the starting pixel. I could then store that data in an array to be used for the entire duration of the program, and have the mouse re-positioning method check the array for the closest pixel on the border to the mouse target position. That last method would presumably execute it's initial border mapping fairly quickly. (It would only have to map between 2,000 and 8,000 pixels, which means 8,000 to 64,000 checked, and I could even permanently store the data to make launching faster.) However, I am uncertain as to how much overhead it would take to scan through that array for the shortest distance for every single mouse move event... I suppose there could be a shortcut to restrict the number of elements in the array that will be checked to a variable number starting with the intersecting point on the line (from my original algorithm), and raise/lower that number to experiment with the overhead/accuracy tradeoff. Please let me know if I am over thinking this and there is an easier way that will work just fine, or which of these methods would be able to execute something like 30 times per second to keep mouse movement smooth, or if you have a better/faster method. I've posted relevant parts of my code below for reference, and included an example of what the area might look like. (I check for color value against a loaded bitmap that is black/white.) // // This part of my code runs every single time the mouse moves. // CGPoint point = CGEventGetLocation(event); float tX = point.x; float tY = point.y; if( is_in_area(tX,tY, mouse_mask)){ // target is inside O.K. area, do nothing }else{ CGPoint target; //point inside restricted region: float iX = 600; // inside x float iY = 500; // inside y // delta to midpoint between iX,iY and tX,tY float dX; float dY; float accuracy = .5; //accuracy to loop until reached do { dX = (tX-iX)/2; dY = (tY-iY)/2; if(is_in_area((tX-dX),(tY-dY),mouse_mask)){ iX += dX; iY += dY; } else { tX -= dX; tY -= dY; } } while (abs(dX)>accuracy || abs(dY)>accuracy); target = CGPointMake(roundf(tX), roundf(tY)); CGDisplayMoveCursorToPoint(CGMainDisplayID(),target); } Here is "is_in_area(int x, int y)" : bool is_in_area(NSInteger x, NSInteger y, NSBitmapImageRep *mouse_mask){ NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSUInteger pixel[4]; [mouse_mask getPixel:pixel atX:x y:y]; if(pixel[0]!= 0){ [pool release]; return false; } [pool release]; return true; }

    Read the article

  • How to deal with project managers who micromanage?

    - by entens
    Perhaps I'm just naive, but when I try to decipher the wall of tasks I'm targeted to do over the course of a week, I just can't help but think whoever builds the project schedule needs to get some remedial training on basic project management. For example, I am assigned 13 tasks today, the shortest lasting .13 days (default time metric in Microsoft Project), and the longest lasting .75 days. I can't help but think that it is blatant micromanagement scheduling projects in sub 10 minute intervals. The effects of management are becoming evident in slipped tasks, resource assignment exceeding capacity by a factor of two at some points in time, and spending more time clearing tasks and figuring out what comes next than actually doing work. How can I convince the project manager to create tasks with larger duration and to see the larger picture?

    Read the article

  • which kernels can I safely purge?

    - by ecoologic
    I use the main answer of this question quite often to clear some space, but now I'm in extreme need and I'd like to better understand which kernels are safe to purge, my list is the following 10:50:58-673 - ~> dpkg -l | grep -Eo "^.i +linux-(image|headers)[^ ]+" | cut -c 5- | grep --color -E "$|"`uname -r` linux-headers-2.6.38-15 linux-headers-2.6.38-15-generic linux-headers-2.6.38-15-generic-pae linux-headers-2.6.38-16 linux-headers-2.6.38-16-generic linux-headers-2.6.38-16-generic-pae # current one linux-headers-generic linux-headers-generic-pae linux-headers-server linux-image-2.6.38-15-generic-pae linux-image-2.6.38-16-generic-pae linux-image-generic-pae linux-image-server Is it enough to keep linux-headers-2.6.38-15 linux-headers-2.6.38-15-generic linux-headers-2.6.38-15-generic-pae linux-headers-2.6.38-16 linux-headers-2.6.38-16-generic linux-headers-2.6.38-16-generic-pae # current one Or would this be enough linux-headers-2.6.38-15-generic-pae linux-headers-2.6.38-16-generic-pae # current one Or which other would be the shortest (keeping the previous one too)? And why?

    Read the article

  • Channelling an explosion along a narrow passage

    - by finnw
    I am simulating explosions in a 2D maze game. If an explosion occurs in an open area, it covers a circular region (this is the easy bit.) However if an explosion occurs in a narrow passage (i.e narrower than the blast range) then it should be "compressed", so that it goes further and also it should go around corners. Ultimately, unless it is completely boxed-in, then it should cover a constant number of pixels, spreading in whatever direction is necessary to reach this total area. I have tried using a shortest-path algorithm to pick the nearest N pixels to the origin avoiding walls, but the effect is exaggerated - the blast travels around corners too easily, making U-turns even when there is a clear path in another direction. I don't know whether this is realistic or not but it is counter-intuitive to players who assume that they can hide around a corner and the blast will take the path of least resistance in a different direction. Is there a well-known (and fast) algorithm for this?

    Read the article

  • What are the Crappy Code Games - What are the challenges?

    - by simonsabin
    This is part of a series on the Crappy Code Games The background Who can enter? What are the challenges? What are the prizes? Why should I attend? Tips on how to win What are the challenges? There are 4 games that you can enter. Each one is to test a different aspect of SQL Server. The High Jump: Generate the highest I/O per second The 100 m dash: Cumulative highest number of I/O’s in 60 seconds The SSIS-athon: Load one billion row fact table in the shortest time The Marathon: Generate the highest...(read more)

    Read the article

  • Installing multiple ubuntu partitions on same machine without corrupting GRUB

    - by LGB
    I had only ubuntu installed on my pc, but I felt like adding another ubuntu (same version) partition so I could have one just for work/study and another one just for personal generic use. I installed it and it worked out okay, but I found I needed more space on the new created Ubuntu partition, so I booted up from the Live CD, and used GParted to move/shrink/grow the partitions as the Ubuntu's tutorials suggested it was pretty straightforward. But in doing all this I messed up with Grub, so when I start my system it shows: error: unknow filesystem grub rescue What would be the easiest way to recover it so I could have both partitions working? Btw, it wouldn't be a problem for me to lose the partitions if it's the shortest/easiest way. Thanks in advance.

    Read the article

  • Distance Between GIS Points

    - by Paul
    I have a large number of GIS (latitude, longitude) coordinates, and I'd like to get the distance between them. Is there a service that will calculate the shortest path for me? I know about google maps, but I'd like something I can use from Python, and that can handle a large batch of requests at once. I'm looking for the driving distance, so a straight distance won't do. Thanks

    Read the article

  • Code Golf: MSM Random Number Generator

    - by Vivin Paliath
    The challenge The shortest code by character count that will generate (pseudo)random numbers using the Middle-Square Method. The Middle-Square Method of (pseudo)random number generation was first suggested by John Von Neumann in 1946 and is defined as follows: Rn+1 = mid((Rn)2, m) For example: 34562 = 11943936 mid(11943936) = 9439 94392 = 89094721 mid(89094721) = 0947 9472 = 896809 mid(896809) = 9680 96802 = 93702400 mid(93702400) = 7024 Test cases: A seed of 8653 should give the following numbers (first 10): 8744, 4575, 9306, 6016, 1922, 6940, 1636, 6764, 7516, 4902

    Read the article

  • Dijkstra’s algorithms - a complete list

    - by baris_a
    Hi guys, I have recently asked a question about one of the Dijkstra’s algorithms. But, almost everyone thought it was shortest path. Therefore, I opened this post to gather all the algorithms that were invented by Dijkstra. Please add any if you know. Thanks in advance. 1 ) Shunting-yard algorithm

    Read the article

  • Code Golf: Numeric Equivalent of an Excel Column-Name

    - by Vivin Paliath
    Can you figure out the numeric equivalent of an Excel column string in the shortest-possible way, using your favorite language? For example, the A column is 1, B is 2, so on and so forth. Once you hit Z, the next column becomes AA, then AB and so on. Rules: Here is some sample input and output: A: 1 B: 2 AD: 30 ABC: 731 WTF: 16074 ROFL: 326676 I don't know if the submitter is allowed to post a solution, but I have a Perl solution that clocks in at 125 characters :).

    Read the article

  • Python networkx DFS or BFS missing?

    - by sadawd
    Dear Everyone I am interested in finding a path (not necessarily shortest) in a short amount of time. Dijsktra and AStar in networkx is taking too long. Why is there no DFS or BFS in networkx? I plan to write my own DFS and BFS search (I am leaning more towards BFS because my graph is pretty deep). Is there anything that I can use in networkx's lib to speed me up? Thx

    Read the article

  • Most idiomatic way to print a time difference in Java?

    - by Zombies
    I'm familiar with printing time difference in milliseconds: long time = System.currentTimeMillis(); //do something that takes some time... long completedIn = System.currentTimeMillis() - time(); But, is there a nice way print a complete time in a specified format (eg: HH:MM:SS) either using Apache Commons or even the dreaded platform API's Date/Time objects? In other words, what is the shortest, simplest, no nonsense way to write this in Java?

    Read the article

  • Amazing families of algorithms over implicit graphs

    - by Diego de Estrada
    Dynamic programming is, almost by definition, to find a shortest/longest path on an implicit dag. Every DP algorithm just does this. An Holographic algorithm can be loosely described as something that counts perfect matchings in implicit planar graphs. So, my question is: are there any other families of algorithms that use well-known algorithms over implicit graphs to achieve a considerable speedup?

    Read the article

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