Search Results

Search found 1725 results on 69 pages for 'equation solving'.

Page 9/69 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Closest Approach question for math/physics heads

    - by Kyle
    I'm using a Segment to Segment closest approach method which will output the closest distance between two segments of length. These objects are moving at variable speed each, so even when it succeeds I'm currently using a 10-step method and calculating the distance between 2 spheres as they move along the two segments. So, basically the length of each segment is the object's traverse in the physics step, and the radius is the objects radius. By stepping, I can tell where they collide, and if they collide (Sort of; for the MOST part.).. I get the feeling that there could be something better. While I sort of believe that the first closest approach call is required, I think that the method immediately following it is a TAD weak. Can anyone help me out? I can illustrate this if needed. Thanks alot!

    Read the article

  • What Does OSGi Solve?

    - by Pablo Fernandez
    I've read on wikipedia and other sites about OSGi, but I don't really see the big picture. It says that it's a component based platform, and that you can reload modules at runtime. Also the "practical example" given everywhere is the Eclipse Plugin Framework. My questions are: 1) What is the CLEAR and SIMPLE definition of OSGi? 2) What COMMON PROBLEMS does it solve? By "common problems" I mean problems we face everyday, like "what can OSGi do for making our jobs more efficient/fun/simple" Thanks.

    Read the article

  • A problem with connected points and determining geometry figures based on points' location analysis

    - by StolePopov
    In school we have a really hard problem, and still no one from the students has solved it yet. Take a look at the picture below: http://d.imagehost.org/0422/mreza.gif That's a kind of a network of connected points, which doesn't end and each point has its own number representing it. Let say the numbers are like this: 1-23-456-78910-etc. etc.. (You can't see the number 5 or 8,9... on the picture but they are there and their position is obvious, the point in middle of 4 and 6 is 5 and so on). 1 is connected to 2 and 3, 2 is connected to 1,3,5 and 4 etc. The numbers 1-2-3 indicate they represent a triangle on the picture, but the numbers 1-4-6 do not because 4 is not directly connected with 6. Let's look at 2-3-4-5, that's a parallelogram (you know why), but 4-6-7-9 is NOT a parallelogram because the in this problem there's a rule which says all the sides must be equal for all the figures - triangles and parallelograms. Also there are hexagons, for ex. 4-5-7-9-13-12 is a hexagon - all sides must be equal here too. 12345 - that doesn't represent anything, so we ignore it. I think i explained the problem well. The actual problem which is given to us by using an input of numbers like above to determine if that's a triangle/parallelogram/hexagon(according to the described rules). For ex: 1 2 3 - triangle 11 13 24 26 -parallelogram 1 2 3 4 5 - nothing 11 23 13 25 - nothing 3 2 5 - triangle I was reading computational geometry in order to solve this, but i gave up quickly, nothing seems to help here. One friend told me this site so i decided to give it a try. If you have any ideas about how to solve this, please reply, you can use pseudo code or c++ whatever. Thank you very much.

    Read the article

  • being able to solve google code jam problem sets

    - by JPro
    This is not a homework question, but rather my intention to know if this is what it takes to learn programming. I keep loggin into TopCoder not to actually participate but to get the basic understand of how the problems are solved. But to my knowledge I don't understand what the problem is and how to translate the problem into an algorithm that can solve it. Just now I happen to look at ACM ICPC 2010 World Finals which is being held in china. The teams were given problem sets and one of them is this: Given at most 100 points on a plan with distinct x-coordinates, find the shortest cycle that passes through each point exactly once, goes from the leftmost point always to the right until it reaches the rightmost point, then goes always to the left until it gets back to the leftmost point. Additionally, two points are given such that the the path from left to right contains the first point, and the path from right to left contains the second point. This seems to be a very simple DP: after processing the last k points, and with the first path ending in point a and the second path ending in point b, what is the smallest total length to achieve that? This is O(n^2) states, transitions in O(n). We deal with the two special points by forcing the first path to contain the first one, and the second path contain the second one. Now I have no idea what I am supposed to solve after reading the problem set. and there's an other one from google code jam: Problem In a big, square room there are two point light sources: one is red and the other is green. There are also n circular pillars. Light travels in straight lines and is absorbed by walls and pillars. The pillars therefore cast shadows: they do not let light through. There are places in the room where no light reaches (black), where only one of the two light sources reaches (red or green), and places where both lights reach (yellow). Compute the total area of each of the four colors in the room. Do not include the area of the pillars. Input * One line containing the number of test cases, T. Each test case contains, in order: * One line containing the coordinates x, y of the red light source. * One line containing the coordinates x, y of the green light source. * One line containing the number of pillars n. * n lines describing the pillars. Each contains 3 numbers x, y, r. The pillar is a disk with the center (x, y) and radius r. The room is the square described by 0 = x, y = 100. Pillars, room walls and light sources are all disjoint, they do not overlap or touch. Output For each test case, output: Case #X: black area red area green area yellow area Is it required that people who program should be should be able to solve these type of problems? I would apprecite if anyone can help me interpret the google code jam problem set as I wish to participate in this years Code Jam to see if I can do anthing or not. Thanks.

    Read the article

  • best practices - multiple functions vs single function with switch case

    - by Amit
    I have a situation where I need to perform several small (but similar) tasks. I can think of two ways to achieve this. First Approach: function doTask1(); function doTask2(); function doTask3(); function doTask4(); Second Approach: // TASK1, TASK2, ... TASK4 are all constants function doTask(TASK) { switch(TASK) { case TASK1: // do task1 break; case TASK2: // do task2 break; case TASK3: // do task3 break; case TASK4: // do task4 break; } } A few more tasks may be added in future (though the chances are rare. but this cannot be ruled out) Please suggest which of the two approaches (or if any other) is a best practice in such a situation.

    Read the article

  • Most efficient way to solve system of equations involving the digamma function?

    - by Neil G
    What is the most efficient way to solve system of equations involving the digamma function? I have a vector v and I want to solve for a vector w such that for all i: digamma(sum(w)) - digamma(w_i) = v_i and w_i 0 I found the gsl function gsl_sf_psi, which is the digamma function. Is there an identity I can use to reduce the equations? Is my best bet to use a solver? I am using C++0x; which solver is easiest to use and fast?

    Read the article

  • Compact a given array problem

    - by Bragaadeesh
    Dont know whether this is a duplicate, but this was an interview question asked to me. Given an array of random numbers and -1 placed inbetween, I have to compact the array meaning all the -1s are to be replaced and the final output should be the last valid index with the fresh array. For example. Input: 3 4 -1 -1 -1 5 8 -1 8 Output: 3 4 5 8 8 5 8 -1 8 and last valid index is 4 Input: -1 -1 -1 -1 -1 2 Output: 2 -1 -1 -1 -1 2 and last valid index is 0 Input: -1 -1 -1 3 3 3 Output: 3 3 3 3 3 3 and last valid index is 2 You should not swap the values just the last valid index along with the array is enough to decipher the non negative values.

    Read the article

  • What is the most efficient way to solve system of equations containing the digamma function?

    - by Neil G
    What is the most efficient way to solve system of equations involving the digamma function? I have a vector v and I want to solve for a vector w such that for all i: digamma(sum(w)) - digamma(w_i) = v_i and w_i 0 I found the gsl function gsl_sf_psi, which is the digamma function (calculated using some kind of series.) Is there an identity I can use to reduce the equations? Is my best bet to use a solver? I am using C++0x; which solver is easiest to use and fast?

    Read the article

  • RSA Factorization problem

    - by dada
    At class we found this programming problem, and currently, we have no idea how to solve it. The positive integer n is given. It is known that n = p * q, where p and q are primes, p<=q and |q-k*p|<10^5 for some given positive integer k. You must find p and q. Input: 35 1 121 1 1000730021 9 Output: 5 * 7 11 * 11 10007 * 100003 It's not a homework, we are just trying to solve some interesting problems. If you have some ideas, please post them here so we can try something, thanks.

    Read the article

  • multidimensional vector rotation and angle computation -- how?

    - by macias
    Input: two multidimensional (for example dim=8) vectors a and b. I need to find out the "directed" angle (0-2*Pi, not 0-Pi) between those vectors a and b. And if they are not parallel I need to rotate vector b in plane a,b by "directed" angle L. If they are parallel, plane does not matter, but angle of rotation is still the same L. For 2d and 3d this is quite easy, but for more dimensions I am lost, I didn't find anything on google, and I prefer using some already proved&tested equations (avoiding errors introduced by my calculations :-D). Thank you in advance for tips, links, etc. Edit: dimension of the space is the same as dimension of the vectors.

    Read the article

  • What good timesheet should and shouldn't have for a small (non programming) 50 people company?

    - by MadBoy
    I'm sure most people here had to fill at least one time sheet in their life that made their life miserable, hell it's even the worst time taker ever especially after you have to fill it in hurry. I will be developing some simple TimeSheet application for a small company of 50 people (non programming related, it's actually 4 companies working together) and would like it to be user friendly and as less disturbing as possible. So what in your opinion makes it a good timesheet (lack of it doesn't count :p), what data it should store? Should be only hours per day with possibility to choose project, company and simple overview what you have worked on like: Day 1, 3:00, 'Company 1', 'Project5', 'Name', Short Overview Day 1, 5:00, 'Company 2', 'Project6', 'Name', Short Overview Or should it gather more data? Would it be realy bad if it were an WinForms application considering that I don't know ASP.NET or any other web based language? I would be deploying it using ClickOnce or so.

    Read the article

  • Getting Preferred, Varied Products -- Tough Pseudocode Question

    - by Volomike
    I have a Dallas client who has given me a tough process to work out. I'm seeking your advice. I use PHP, but the language doesn't matter. We can work this out in pseudocode. In a nutshell, this involves showing products on a page based on matching keyword phrases, and using a preferred product provider, but varying this up so that I try to show products from each provider as much as possible when I can. He has 3 product companies: Amazon, eBay, and Overstock. I already have worked out with the API to get products back in an array via a function. He wants to give the user the preference of which one to use primarily -- so a priority number on each. He wants to display anywhere from 1 to 6 products on a page from them. Let's go with 6 for now in this example to start with. Let's assume Amazon first, then eBay, then Overstock as far as priority. He wants me to attempt to take a keyword phrase and find relevant products (all the keywords found in product title) from Amazon, eBay, and Overstock. If we find 1 product from each provider, he wants me to only display one product from each. But if we run out of a particular provider with a matching product, I start over again and grab another product from another provider until we reach 6 products. If there just aren't 6 relevant products, then I do the best I can -- even if I only display one product. If no relevant products, then I don't display anything.

    Read the article

  • Please quickly help with this problem I got 52 minutes left.

    - by Hamish Grubijan
    Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz". Woman said use any common language. Please make it short and test it. My screen is small. Thanks. P.S. I have test anxiety particularly after talking to people in suits. I also stayed up all night studying Java codes.

    Read the article

  • Have you ever derived a programming solution from nature?

    - by Ryu
    When you step back and look at ... the nature of animals, insects, plants and the problems they have organically solved perhaps even the nature and balance of the universe Have you ever been able to solve a problem by deriving an approach from nature? I've heard of Ant Colony Algorithms being able to optimize supply chain amongst other things. Also Fractal's being the "geometry of nature" have been applied to a wide range of problems. Now that spring is here again and the world is coming back to life I'm wondering if anybody has some experiences they can share. Thanks PS I would recommend watching the "Hunting the Hidden Dimension" Nova episode on fractals.

    Read the article

  • What problem does NHibernate solve?

    - by SLC
    I've seen some jobs that require nhibernate knowledge, as well as numerous questions on stack. I found another question that pointed me to Summer Of NHibernate and I am watching the videos now. However it has no introduction explaining why NHibernate was created and what problem is solves. By looking on wikipedia, I can see vaguely what it does, but to me it looks like .NET already has the entity framework which seems to do the same thing. Can anyone clarify why nhibernate exists?

    Read the article

  • A problem During running OracleDBConsoleoracle service

    - by Waheedoo
    I am facing this problem when I try to run OracleDBConsoleoracle in oracle 11 "Windows could not start the OracleDBConsoleoracle on Local Computer.For more information, review the System Event Log.If this is a non-Microsoft service, contact the service vendor, and refer to service-specific error code 2." Noteice:I was online when I installed Oracle 11. What's the problem? Thanks...

    Read the article

  • important question on Android 2.2

    - by poeschlorn
    Hi guys, I've just updated my nexus one to 2.2...now all of my (own and some from the market) apps throw exceptions and were closed... It's weird, in the app i'm developing atm, there it displays only my start page with buttons, but when i tap on one button to fire an intent to another activity my app gets closed with an exception. Yesterday before the update everything worked fine... The same thing in my emulator: I have two devices, one with API level 7 and one with level 8...Level 7 worked fine, but level 8 killed my app :( What is the problem and how can I solve this? I'm desperatly trying to get it working again :( I hope someone can help me fixing this

    Read the article

  • how to get unique values set from a repeating values list

    - by Mariselvam
    I need to parse a large log file (flat file), which contains two column of values (column-A , column-B). Values in both columns are repeating. I need to find for each unique value in column-A , I need to find a set of column-B values. Is this can be done using unix shell command or need to write any perl or python script? What are the ways this can be done? Example: xxxA 2 xxxA 1 xxxB 2 XXXC 3 XXXA 3 xxxD 4 output: xxxA - 2,1,3 xxxB - 2 xxxC - 3 xxxD - 4

    Read the article

  • While programming, what to do when facing with a seemingly unsolvable situation with a time limit?

    - by Ersan Tasan
    This is not a technical question, but rather a social and methodical one. I am a computer sciences student and I usually have really tough programming assignments. I don`t know if it is only happening to me but sometimes, particularly when deadline is approaching, i find myself in a harsh situation. I cannot find my mistake in the code or come up with a another great idea. Then boredom comes in and the problem begins to seem unsolvable. I know there are more-than-great professional coders here. I would like to learn their ideas to cope with this situation. Is it better to focus on something else for a while and try again or try harder and harder and look for the solution on the net etc...

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >