Search Results

Search found 1068 results on 43 pages for 'degree'.

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

  • 360 snake movement

    - by Darius Janavicius
    I'm trying to do 360 degree snake game in actionscript 3. Here is my movement code: //head movement head.x += snake_speed*Math.cos((head.rotation) * (Math.PI /180)); head.y += snake_speed*Math.sin((head.rotation) * (Math.PI /180)); if (dir == "left") head.rotation -= snake_speed*2; if (dir == "right") head.rotation +=snake_speed*2; //Body part movement for(var i:int = body_parts.length-1; i>0; i--) { var angle = (body_parts[i-1].rotation)*(Math.PI/180); body_parts[i].y = body_parts[i-1].y - (25 * Math.sin(angle)); body_parts[i].x = body_parts[i-1].x - (25 * Math.cos(angle)); body_parts[i].rotation = body_parts[i-1].rotation; } With this code head moves just like I want it to move, but body parts have the same angle as head and it looks wrong. What I want to achieve is to make body parts to move like in game "Ultimate snake". Here is a link to that game: http://armorgames.com/play/387/ultimate-snake P.S. I saw similar question here "How to approach 360 degree snake" but didnt understand the answer :/

    Read the article

  • School vs Self-Taught [duplicate]

    - by Joan Venge
    This question already has an answer here: Do I need a degree in Computer Science to get a junior Programming job? [closed] 8 answers Do you think university is a good learning environment or is it better to be autodidact? [closed] 3 answers Do you think formal education is necessary to gain strong programming skills? There are a lot of jobs that aren't programming but involves programming, such as tech artists in games, fx tds in film for example. I see similar patterns in the people I work where the best ones I have seen were self-taught, because of being artists primarily. But I also see that while the software, programming knowledge is varied and deep, hardware knowledge is very basic, including me, again due to lack of formal education. But I also work with a lot of programmers who possess both skills in general (software and hardware). Do you think it's necessary to have a formal education to have great programming skills? Would you think less of someone if he didn't have a degree in computer science, or software engineering, etc in terms of job opportunities? Would you trust him to do a software engineering job, i.e. writing a complex tool? Basically I feel the self-taught programmer doesn't know a lot of things, i.e. not knowing a particular pattern or a particular language, etc. But I find that the ability to think outside the box much more powerful. As "pure" programmers what's your take on it?

    Read the article

  • What are `Developmental Milestones` for programming skills?

    - by Holmes
    I studied in the field of Computer Science for 6 years, bachelor's degree and master's degree. I have studied all the basic programming like C, Java, VB, C#, Python, and etc. When I have free times, I will learn new programming languages and follow new programming trends by myself , such as PHP, HTML5, CSS5, LESS, Bootstrap, Symfony2, and GitHub. So, if someone wants me to write some instructions using these languages, I'm certain that I can do it, not so good but I can get a job done. However, I don't have any favorite programming language. Moreover, I also have studied about algorithms, database, and etc. Everything I just wrote so far seems that I know a lot in this field. In fact, I feel I am very stupid. I cannot answer 80% of the questions on SO. In spite of those languages??, I have studied. Perhaps it is because I have never worked before. As there is the Developmental Milestones for children, which refers to how a child becomes able to do more complex things as they get older, I would like to evaluate the same thing but for programming skills. What are the set of functional skills or age-specific tasks that most programmers can do at a certain age range? In order to evaluate myself, I would like to ask your opinions that all of the skills I mentioned above, are they enough for programmers to know when they are 25 years old? What are your suggestions in order to improve the skills in this field?

    Read the article

  • Natural talent vs experience [on hold]

    - by Tord Johansson Munk
    Hi i have a question for you guys if you had a choice of hiring one of two programmers. One of them is a natural born programming talent, he has been programming since he was 14 year old and he has been programming all sorts of things by him self, 3d renders,games,his own frameworks, he is really good at algorithms and problem solving. He is now about 25 years old and is looking for a job after some unchallenged years of college the only experience he has is working on his own/university stuff and some open source project. This guy spends all his free time programming and has several pet projects at home. The other person is a 37 year old career programmer. He has been programming since he graduated from university at the age of 26 and have been working since then. He did not have an interest in programming before university. During his studies he discovered that programming was fun and challenging but it never was a "passion". During his career he mainly worked with "enterprise" platforms such as .net or javaEE. He mainly have done database business applications and thus is lacking skills of the young talent like abstract problem solving or algorithms. But he know the tools he has been using during the years and is reliable and almost always makes his boss happy. He keeps him self updated in the platform and tools he has and is using. But outside the office walls he don't touch any code at all. Witch one would you hire? Would you favor one of them in certain projects? Do you think that if the young talent learns his tools he will be a better programmer than the older one? Would your decision be different if both of them where lacking a degree? or if only one of them was lacking a degree be the old and experienced or the young genius.

    Read the article

  • Slopes in 2D Platformer

    - by Carlosrdz1
    I'm dealing with Slopes in a 2D platformer game I'm developing in XNA Game Studio. I was really tired of trying without success, until I found this post: 45° Slopes in a Tile based 2D platformer, and I solved part of the problem with the bummzack answer. Now I'm dealing with 2 more problems: 1) Inverted slopes: The post says: If you're only dealing with 45 degree angles, then it gets even simpler: y1 = y + (x1 - x) If the slope is the other way round, it's: y1 = y + (v - (x1 - x)) My question is, what if I'm dealing with slopes with less than 45 degree angles? Does y1 = y + (v - (x1 - x)) work? 2) Going down the slope: I can't find a better way to handle the "going down through the slope" situation, considering that my player can accelerate its velocity. Edit: I was about to post a image but I guess I need to have more reputation he he he... What I'm trying to say with "going down" is like walking towards the opposite direction, assuming that if you are walking to the right, you are incrementing your Y position because you are climbing the slope, but if you are walking to the left, you are decrementing your Y position.

    Read the article

  • SQLAuthority News – Technology and Online Learning – Personal Technology Tip

    - by pinaldave
    This is the fourth post in my series about Personal Technology Tips and Tricks, and I knew exactly what I wanted to write about.  But at first I was conflicted.   Is online learning really a personal tip?  Is it really a trick that no one knows?  However, I have decided to stick with my original idea because online learning is everywhere.  It’s a trick that we can’t – and shouldn’t – overlook.  Here are ten of my ideas about how we should be taking advantage of online learning. 1) Get ahead in the work place.  We all know that a good way to become better at your job, and to become more competitive for promotions and raises.  Many people overlook online learning as a way to get job training, though, thinking it is a path for people still seeking their high school or college diplomas.  But take a look at what companies like Pluralsight offer, and you might be pleasantly surprised. 2) Flexibility.  Some of us remember the heady days of college with nostalgia, others remember it with loathing.  A lot of bad memories come from remembering the strict scheduling and deadlines of college.  But with online learning, the classes fit into your free time – you don’t have to schedule your life around classes.  Even better, there are usually no homework or test deadlines, only one final deadline where all work must be completed.  This allows students to work at their own pace – my next point. 3) Learn at your own pace.  One thing traditional classes suffer from is that they are highly structured.  If you work more quickly than the rest of the class, or especially if you work more slowly, traditional classes do not work for you.  Online courses let you move as quickly or as slowly as you find necessary. 4) Fill gaps in your knowledge.  I’m sure I am not the only one who has thought to myself “I would love to take a course on X, Y, or Z.”  The problem is that it can be very hard to find the perfect class that teaches exactly what you’re interested in, at a time and a price that’s right.  But online courses are far easier to tailor exactly to your tastes. 5) Fits into your schedule.  Even harder to find than a class you’re interested in is one that fits into your schedule.  If you hold down a job – even a part time job – you know it’s next to impossible to find class times that work for you.  Online classes can be taken anytime, anywhere.  On your lunch break, in your car, or in your pajamas at the end of the day. 6) Student centered.  Online learning has to stay competitive.  There are hundreds, even thousands of options for students, and every provider has to find a way to lure in students and provide them with a good education.  The best kind of online classes know that they need to provide great classes, flexible scheduling, and high quality to attract students – and the student benefit from this kind of attention. 7) You can save money.  The average cost for a college diploma in the US is over $20,000.  I don’t know about you, but that is not the kind of money I just have lying around for a rainy day.  Sometimes I think I’d love to go back to school, but not for that price tag.  Online courses are much, much more affordable.  And even better, you can pick and choose what courses you’d like to take, and avoid all the “electives” in college. 8) Get access to the best minds in the business.  One of the perks of being the best in your field is that you are one person who knows the most about something.  If students are lucky, you will choose to share that knowledge with them on a college campus.  For the hundreds of other students who don’t live in your area and don’t attend your school, they are out of luck.  But luckily for them, more and more online courses is attracting the best minds in the business, and if you enroll online, you can take advantage of these minds, too. 9) Save your time.  Getting a four year degree is a great decision, and I encourage everyone to pursue their Bachelor’s – and beyond.  But if you have already tried to go to school, or already have a degree but are thinking of switching fields, four years of your life is a long time to go back and redo things.  Getting your online degree will save you time by allowing you to work at your own pace, set your own schedule, and take only the classes you’re interested in. 10) Variety of degrees and programs.  If you’re not sure what you’re interested in, or if you only need a few classes here and there to finish a program, online classes are perfect for you.  You can pick and choose what you’d like, and sample a wide variety without spending too much money. I hope I’ve outlined for everyone just a few ways that they could benefit from online learning.  If you’re still unconvinced, just check out a few of my other articles that expand more on these topics. Here are the blog posts relevent to developer trainings: Developer Training - Importance and Significance - Part 1 Developer Training – Employee Morals and Ethics – Part 2 Developer Training – Difficult Questions and Alternative Perspective - Part 3 Developer Training – Various Options for Developer Training – Part 4 Developer Training – A Conclusive Summary- Part 5 Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: Developer Training, PostADay, SQL, SQL Authority, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology Tagged: Developer Training

    Read the article

  • How to Point sprite's direction towards Mouse or an Object [duplicate]

    - by Irfan Dahir
    This question already has an answer here: Rotating To Face a Point 1 answer I need some help with rotating sprites towards the mouse. I'm currently using the library allegro 5.XX. The rotation of the sprite works but it's constantly inaccurate. It's always a few angles off from the mouse to the left. Can anyone please help me with this? Thank you. P.S I got help with the rotating function from here: http://www.gamefromscratch.com/post/2012/11/18/GameDev-math-recipes-Rotating-to-face-a-point.aspx Although it's by javascript, the maths function is the same. And also, by placing: if(angle < 0) { angle = 360 - (-angle); } doesn't fix it. The Code: #include <allegro5\allegro.h> #include <allegro5\allegro_image.h> #include "math.h" int main(void) { int width = 640; int height = 480; bool exit = false; int shipW = 0; int shipH = 0; ALLEGRO_DISPLAY *display = NULL; ALLEGRO_EVENT_QUEUE *event_queue = NULL; ALLEGRO_BITMAP *ship = NULL; if(!al_init()) return -1; display = al_create_display(width, height); if(!display) return -1; al_install_keyboard(); al_install_mouse(); al_init_image_addon(); al_set_new_bitmap_flags(ALLEGRO_MIN_LINEAR | ALLEGRO_MAG_LINEAR); //smoother rotate ship = al_load_bitmap("ship.bmp"); shipH = al_get_bitmap_height(ship); shipW = al_get_bitmap_width(ship); int shipx = width/2 - shipW/2; int shipy = height/2 - shipH/2; int mx = width/2; int my = height/2; al_set_mouse_xy(display, mx, my); event_queue = al_create_event_queue(); al_register_event_source(event_queue, al_get_mouse_event_source()); al_register_event_source(event_queue, al_get_keyboard_event_source()); //al_hide_mouse_cursor(display); float angle; while(!exit) { ALLEGRO_EVENT ev; al_wait_for_event(event_queue, &ev); if(ev.type == ALLEGRO_EVENT_KEY_UP) { switch(ev.keyboard.keycode) { case ALLEGRO_KEY_ESCAPE: exit = true; break; /*case ALLEGRO_KEY_LEFT: degree -= 10; break; case ALLEGRO_KEY_RIGHT: degree += 10; break;*/ case ALLEGRO_KEY_W: shipy -=10; break; case ALLEGRO_KEY_S: shipy +=10; break; case ALLEGRO_KEY_A: shipx -=10; break; case ALLEGRO_KEY_D: shipx += 10; break; } }else if(ev.type == ALLEGRO_EVENT_MOUSE_AXES) { mx = ev.mouse.x; my = ev.mouse.y; angle = atan2(my - shipy, mx - shipx); } // al_draw_bitmap(ship,shipx, shipy, 0); //al_draw_rotated_bitmap(ship, shipW/2, shipH/2, shipx, shipy, degree * 3.142/180,0); al_draw_rotated_bitmap(ship, shipW/2, shipH/2, shipx, shipy,angle, 0); //I directly placed the angle because the allegro library calculates radians, and if i multiplied it by 180/3. 142 the rotation would go hawire, not would, it actually did. al_flip_display(); al_clear_to_color(al_map_rgb(0,0,0)); } al_destroy_bitmap(ship); al_destroy_event_queue(event_queue); al_destroy_display(display); return 0; } EDIT: This was marked duplicate by a moderator. I'd like to say that this isn't the same as that. I'm a total beginner at game programming, I had a view at that other topic and I had difficulty understanding it. Please understand this, thank you. :/ Also, while I was making a print of what the angle is I got this... Here is a screenshot:http://img34.imageshack.us/img34/7396/fzuq.jpg Which is weird because aren't angles supposed to be 360 degrees only?

    Read the article

  • C++ : C++ Primer (Stanley Lipmann) or The C++ programming language (special edition)

    - by Kim
    I have a Computer Science degree (long2 time ago) .. I do know Java OOP but i am now trying to pick up C++. I do have C and of course data structure using C or pascal. I have started reading Bjarne Stroustrup book (The C++ Programming Language - Special Edition) but find it extremely difficult esp. some section which i don't have exposure such as Recursive Descent Parser (chapter 6). In terms of the language i don't foresee i have problem but i have problem as mentioned cos' those topic are usually covered in a Master Degree program such as construction of compiler. I just bought a book called C++ primer (Stanley Lipmann) which i heard it is a very good book for C++. Only setback is it's of course no match with the amount of information from the original C++ creator. Please advice. Thanks.

    Read the article

  • Polynomial division overloading operator (solved)

    - by Vlad
    Ok. here's the operations i successfully code so far thank's to your help: Adittion: polinom operator+(const polinom& P) const { polinom Result; constIter i = poly.begin(), j = P.poly.begin(); while (i != poly.end() && j != P.poly.end()) { //logic while both iterators are valid if (i->pow > j->pow) { //if the current term's degree of the first polynomial is bigger Result.insert(i->coef, i->pow); i++; } else if (j->pow > i->pow) { // if the other polynomial's term degree is bigger Result.insert(j->coef, j->pow); j++; } else { // if both are equal Result.insert(i->coef + j->coef, i->pow); i++; j++; } } //handle the remaining items in each list //note: at least one will be equal to end(), but that loop will simply be skipped while (i != poly.end()) { Result.insert(i->coef, i->pow); ++i; } while (j != P.poly.end()) { Result.insert(j->coef, j->pow); ++j; } return Result; } Subtraction: polinom operator-(const polinom& P) const //fixed prototype re. const-correctness { polinom Result; constIter i = poly.begin(), j = P.poly.begin(); while (i != poly.end() && j != P.poly.end()) { //logic while both iterators are valid if (i->pow > j->pow) { //if the current term's degree of the first polynomial is bigger Result.insert(-(i->coef), i->pow); i++; } else if (j->pow > i->pow) { // if the other polynomial's term degree is bigger Result.insert(-(j->coef), j->pow); j++; } else { // if both are equal Result.insert(i->coef - j->coef, i->pow); i++; j++; } } //handle the remaining items in each list //note: at least one will be equal to end(), but that loop will simply be skipped while (i != poly.end()) { Result.insert(i->coef, i->pow); ++i; } while (j != P.poly.end()) { Result.insert(j->coef, j->pow); ++j; } return Result; } Multiplication: polinom operator*(const polinom& P) const { polinom Result; constIter i, j, lastItem = Result.poly.end(); Iter it1, it2, first, last; int nr_matches; for (i = poly.begin() ; i != poly.end(); i++) { for (j = P.poly.begin(); j != P.poly.end(); j++) Result.insert(i->coef * j->coef, i->pow + j->pow); } Result.poly.sort(SortDescending()); lastItem--; while (true) { nr_matches = 0; for (it1 = Result.poly.begin(); it1 != lastItem; it1++) { first = it1; last = it1; first++; for (it2 = first; it2 != Result.poly.end(); it2++) { if (it2->pow == it1->pow) { it1->coef += it2->coef; nr_matches++; } } nr_matches++; do { last++; nr_matches--; } while (nr_matches != 0); Result.poly.erase(first, last); } if (nr_matches == 0) break; } return Result; } Division(Edited): polinom operator/(const polinom& P) const { polinom Result, temp2; polinom temp = *this; Iter i = temp.poly.begin(); constIter j = P.poly.begin(); int resultSize = 0; if (temp.poly.size() < 2) { if (i->pow >= j->pow) { Result.insert(i->coef / j->coef, i->pow - j->pow); temp = temp - Result * P; } else { Result.insert(0, 0); } } else { while (true) { if (i->pow >= j->pow) { Result.insert(i->coef / j->coef, i->pow - j->pow); if (Result.poly.size() < 2) temp2 = Result; else { temp2 = Result; resultSize = Result.poly.size(); for (int k = 1 ; k != resultSize; k++) temp2.poly.pop_front(); } temp = temp - temp2 * P; } else break; } } return Result; } }; The first three are working correctly but division doesn't as it seems the program is in a infinite loop. Final Update After listening to Dave, I finally made it by overloading both / and & to return the quotient and the remainder so thanks a lot everyone for your help and especially you Dave for your great idea! P.S. If anyone wants for me to post these 2 overloaded operator please ask it by commenting on my post (and maybe give a vote up for everyone involved).

    Read the article

  • Polynomial division overloading operator

    - by Vlad
    Ok. here's the operations i successfully code so far thank's to your help: Adittion: polinom operator+(const polinom& P) const { polinom Result; constIter i = poly.begin(), j = P.poly.begin(); while (i != poly.end() && j != P.poly.end()) { //logic while both iterators are valid if (i->pow > j->pow) { //if the current term's degree of the first polynomial is bigger Result.insert(i->coef, i->pow); i++; } else if (j->pow > i->pow) { // if the other polynomial's term degree is bigger Result.insert(j->coef, j->pow); j++; } else { // if both are equal Result.insert(i->coef + j->coef, i->pow); i++; j++; } } //handle the remaining items in each list //note: at least one will be equal to end(), but that loop will simply be skipped while (i != poly.end()) { Result.insert(i->coef, i->pow); ++i; } while (j != P.poly.end()) { Result.insert(j->coef, j->pow); ++j; } return Result; } Subtraction: polinom operator-(const polinom& P) const //fixed prototype re. const-correctness { polinom Result; constIter i = poly.begin(), j = P.poly.begin(); while (i != poly.end() && j != P.poly.end()) { //logic while both iterators are valid if (i->pow > j->pow) { //if the current term's degree of the first polynomial is bigger Result.insert(-(i->coef), i->pow); i++; } else if (j->pow > i->pow) { // if the other polynomial's term degree is bigger Result.insert(-(j->coef), j->pow); j++; } else { // if both are equal Result.insert(i->coef - j->coef, i->pow); i++; j++; } } //handle the remaining items in each list //note: at least one will be equal to end(), but that loop will simply be skipped while (i != poly.end()) { Result.insert(i->coef, i->pow); ++i; } while (j != P.poly.end()) { Result.insert(j->coef, j->pow); ++j; } return Result; } Multiplication: polinom operator*(const polinom& P) const { polinom Result; constIter i, j, lastItem = Result.poly.end(); Iter it1, it2, first, last; int nr_matches; for (i = poly.begin() ; i != poly.end(); i++) { for (j = P.poly.begin(); j != P.poly.end(); j++) Result.insert(i->coef * j->coef, i->pow + j->pow); } Result.poly.sort(SortDescending()); lastItem--; while (true) { nr_matches = 0; for (it1 = Result.poly.begin(); it1 != lastItem; it1++) { first = it1; last = it1; first++; for (it2 = first; it2 != Result.poly.end(); it2++) { if (it2->pow == it1->pow) { it1->coef += it2->coef; nr_matches++; } } nr_matches++; do { last++; nr_matches--; } while (nr_matches != 0); Result.poly.erase(first, last); } if (nr_matches == 0) break; } return Result; } Division(Edited): polinom operator/(const polinom& P) { polinom Result, temp; Iter i = poly.begin(); constIter j = P.poly.begin(); if (poly.size() < 2) { if (i->pow >= j->pow) { Result.insert(i->coef, i->pow - j->pow); *this = *this - Result; } } else { while (true) { if (i->pow >= j->pow) { Result.insert(i->coef, i->pow - j->pow); temp = Result * P; *this = *this - temp; } else break; } } return Result; } The first three are working correctly but division doesn't as it seems the program is in a infinite loop. Update Because no one seems to understand how i thought the algorithm, i'll explain: If the dividend contains only one term, we simply insert the quotient in Result, then we multiply it with the divisor ans subtract it from the first polynomial which stores the remainder. If the polynomial we do this until the second polynomial( P in this case) becomes bigger. I think this algorithm is called long division, isn't it? So based on these, can anyone help me with overloading the / operator correctly for my class? Thanks!

    Read the article

  • Education After High School

    - by Travis O.
    I know this isn't specifically a programming question, but please bear with me. I'm currently a high-school junior. I have no idea what to look for in a college: what degree, what school, etc. I've searched all around the internet but can't really find anything that relevant. I know I need a degree, but I don't know which or what to specialize in. My grades are good and I am in the top 15 percent of my class. I scored about a 1800 on the SAT and have not yet taken the ACT. I'd like to go to a 4 year school that doesn't cost too much. What do I need to be looking for and what is important to colleges accepting CS students and the business after college?

    Read the article

  • Problems with cos and sin in Android

    - by bajen micke
    I have a problem with my code in Android. I am using this to moving a ball. If the degree is 90 it should move to the right, if the degree is 180 it should move down etc. This is the code I have done. int degrees=180; int bollspeed=4; bollX += bollspeed*Math.cos(Math.toRadians(degrees)); bollY += bollspeed*Math.sin(Math.toRadians(degrees)); The problem is that when the ball should move 90 degrees it moves 180, and when it should move 180 degrees it moves 270. I have tested all I could come to think... Can anyone see any error in my code or have a expanation I would be really glad. Thanks

    Read the article

  • Does the specific signed integer matter when implementing compareTo in a Comparable <Type> class?

    - by javanix
    When implementing compareTo(), does the degree of "difference" need to be taken into account? For instance, if I have 3 objects, C1, C2, and C3, such that C1 < C2 < C3. Should C1.compareTo(C2) return an integer that is less than C2.compareTo(C3)? The documentation for the Comparable interface doesn't seem to specify one way or another, so I'm guessing the degree doesn't matter, but it would be nice to know if there is some advantage returning a specific number (for example, improving TreeSet sort speed or something). http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Comparable.html#compareTo(T)

    Read the article

  • C++ Primer (Stanley Lipmann) or The C++ programming language (special edition)

    - by Kim
    I have a Computer Science degree (long2 time ago) .. I do know Java OOP but i am now trying to pick up C++. I do have C and of course data structure using C or pascal. I have started reading Bjarne Stroustrup book (The C++ Programming Language - Special Edition) but find it extremely difficult esp. some section which i don't have exposure such as Recursive Descent Parser (chapter 6). In terms of the language i don't foresee i have problem but i have problem as mentioned cos' those topic are usually covered in a Master Degree program such as construction of compiler. I just bought a book called C++ primer (Stanley Lipmann) which i heard it is a very good book for C++. Only setback is it's of course no match with the amount of information from the original C++ creator. Please advice. Thanks.

    Read the article

  • Finding the Reachability Count for all vertices of a DAG

    - by ChrisH
    I am trying to find a fast algorithm with modest space requirements to solve the following problem. For each vertex of a DAG find the sum of its in-degree and out-degree in the DAG's transitive closure. Given this DAG: I expect the following result: Vertex # Reacability Count Reachable Vertices in closure 7 5 (11, 8, 2, 9, 10) 5 4 (11, 2, 9, 10) 3 3 (8, 9, 10) 11 5 (7, 5, 2, 9, 10) 8 3 (7, 3, 9) 2 3 (7, 5, 11) 9 5 (7, 5, 11, 8, 3) 10 4 (7, 5, 11, 3) It seems to me that this should be possible without actually constructing the transitive closure. I haven't been able to find anything on the net that exactly describes this problem. I've got some ideas about how to do this, but I wanted to see what the SO crowd could come up with.

    Read the article

  • Error using `loess.smooth` but not `loess` or `lowess`

    - by Sandy
    I need to smooth some simulated data, but occasionally run into problems when the simulated ordinates to be smoothed are mostly the same value. Here is a small reproducible example of the simplest case. > x <- 0:50 > y <- rep(0,51) > loess.smooth(x,y) Error in simpleLoess(y, x, w, span, degree, FALSE, FALSE, normalize = FALSE, : NA/NaN/Inf in foreign function call (arg 1) loess(y~x), lowess(x,y), and their analogue in MATLAB produce the expected results without error on this example. I am using loess.smooth here because I need the estimates evaluated at a set number of points. According to the documentation, I believe loess.smooth and loess are using the same estimation functions, but the former is an "auxiliary function" to handle the evaluation points. The error seems to come from a C function: > traceback() 3: .C(R_loess_raw, as.double(pseudovalues), as.double(x), as.double(weights), as.double(weights), as.integer(D), as.integer(N), as.double(span), as.integer(degree), as.integer(nonparametric), as.integer(order.drop.sqr), as.integer(sum.drop.sqr), as.double(span * cell), as.character(surf.stat), temp = double(N), parameter = integer(7), a = integer(max.kd), xi = double(max.kd), vert = double(2 * D), vval = double((D + 1) * max.kd), diagonal = double(N), trL = double(1), delta1 = double(1), delta2 = double(1), as.integer(0L)) 2: simpleLoess(y, x, w, span, degree, FALSE, FALSE, normalize = FALSE, "none", "interpolate", control$cell, iterations, control$trace.hat) 1: loess.smooth(x, y) loess also calls simpleLoess, but with what appears to be different arguments. Of course, if you vary enough of the y values to be nonzero, loess.smooth runs without error, but I need the program to run in even the most extreme case. Hopefully, someone can help me with one and/or all of the following: Understand why only loess.smooth, and not the other functions, produces this error and find a solution for this problem. Find a work-around using loess but still evaluating the estimate at a specified number of points that can differ from the vector x. For example, I might want to use only x <- seq(0,50,10) in the smoothing, but evaluate the estimate at x <- 0:50. As far as I know, using predict with a new data frame will not properly handle this situation, but please let me know if I am missing something there. Handle the error in a way that doesn't stop the program from moving onto the next simulated data set. Thanks in advance for any help on this problem.

    Read the article

  • Need help on how to begin learning website development

    - by Golfy
    OK for the past 10 days I have been trying to figure out where to begin learning website development a dynamic one, So far everyone told me you should start with computer science and I am like What the @#$% how am I suppose to learn computer science without going to school and get a degree but I don't want a degree I just want to learn how to devlope websites. So now I am here and confused about how to put together a website. I get HTML and CSS but still have some problems designing the site now on the other had I am having trouble trying to figure out how php and database mysql is used to put together a website. I have seen videos from lynda.com and still have no Idea after I have watched the video the basic one, one that teach you the Variables, Loops, Strings ext... ok than what happens, how do you build the website with it, that is the question I am real not understand the answer to. Any help will be appreciated.

    Read the article

  • Learning networking fundamentals

    - by bplus
    Not having a CS degree has left large holes in my programming related knowledge. In particular I'd really like to learn some of the computer networking stuff I would have got in a good CS degree. The problem I really have is "not knowing what I don't know". So far I know I don't know anything about the following (as far as computer networks are concearned) -sockets -ports -internet protocol (the whole IP stack I keep hearing about). Can anyone add more to the list? Can anyone suggest a project (writing a toy web server?) Thanks in advance

    Read the article

  • What should I do to practice?

    - by simion
    I start a year long industrial placement in September where i will be coding in Java predominantly. I am going to use the summer to brush up on my Java as in year one of the degree Java was the main language taught for OOP modules. However this year i have had no Java exposure except for an algorithms module, which was one of eight, so as you can see i am probably getting really rusty!. What i wanted to know is, how does the "real world" java programming differ from university coding and what do you suggest i brush up on that would be different to my normal workings. As a start I definitely need to get familiar with a professional IDE like NetBeans, opposed to having used BlueJ throughout but more specifically what coding practices should I get more familiar with. I appreciate they wont expect me to be a qualified full developer and will give me time, but I would like to hit the ground running as it were, with me having full hopes to secure a permanent position after I finish my degree.

    Read the article

  • What should i do to practise?

    - by simion
    Hi guys I start a year long industrial placement in september where i will be coding in java predominantly. I am going to use the summer to brush up on my java as in year one of the degree java was the main language taught for OOP modules. However this year i have had no java exposure except for an algorithms module, which was one of eight, so as you can see i am probably getting really rusty!. What i wanted to know is, how does the "real world" java programming differ from university coding and what do you suggest i brush up on that would be different to my normal workings. As a start i definatley need to get familiar with a professional IDE like netbeans, opoosed to havign used BlueJ throughout but more specifically what coding practises should i get more familiar with I appreciate they wont expect me to be a qualified full developer and will give me time, but i would like to hit the ground running as it were, with me having full hopes to secure a perminant position after i finish my degree. Thanks for reading

    Read the article

  • What area of Software Engineering are you going to focus your research on?

    - by ultrajohn
    hi guys! I have this very subjective question regarding software engineering. Let's say you want to pursue a graduate degree i.e. master degree with a major in software engineering, what particular topic or area of research in the field are your going to pursue? From your experience, what are the different aspects of software engineering which are vital in our field that are "under"(less) research. I know this is very subjective, I just want to elicit ideas from you guys whom I think knows a lot about the field. Thanks a lot.

    Read the article

  • Would you hire a foreigner ? [closed]

    - by user229999
    Hi! I'd like to dedicate this question (hope it's not a subjective) especially to people who own their companies. Would you (and why) hire a foreigner, which experience is documented in CV and portfolio, which can communicate in english (with grammar mistakes, but still)? I am writing in the name of all these guys looking for great opportunities abroad, living in countries which do not give you any opportunities at all. Is it real, to be hired like a programmer (PHP, Ruby, Python, C#) in country like UK, USA, Nederland, Sweeden or even Germany, if you're a foreigner? Please response in two categories: a) foreigner with engineer degree, zend certificate, few open source projects b) foreigner without any degree, with nice portfolio, and few big projects created Also, does First Certificate in English aka FCE matter for you ?

    Read the article

  • what do i need to do now that I want to take programming hobby to next level ?

    - by hohog
    i've always wanted to make games but did not start actively learning programming by myself until 1st year of university. i kept going throughout university learning new languages, showing off things i had made, while neglecting my major in Biology. Anyways, i've ended up with an Economics degree, with a portfolio of SaaS and web apps i had created so i could eat during my final year. So far, I'm getting a few interviews here and there in web programming positions. When I get a logic pretest, I fail miserably. or job requires comp sci degree. I mean I can easily design and code an entire app which I emphasize through my portfolio.... but i dont know why I am so slow at logic puzzles on prescreening interview... So what should I do now ? get certificates in languages ? go back to school and learn CS ? is it too late to get into windows programming jobs than web programming ?

    Read the article

  • Stuck on solving the Minimal Spanning Tree problem.

    - by kunjaan
    I have reduced my problem to finding the minimal spanning tree in the graph. But I want to have one more constraint which is that the total degree for each vertex shouldnt exceed a certain constant factor. How do I model my problem? Is MST the wrong path? Do you know any algorithms that will help me? One more problem: My graph has duplicate edge weights so is there a way to count the number of unique MSTs? Are there algorithms that do this? Thank You. Edit: By degree, I mean the total number of edges connecting the vertex. By duplicate edge weight I mean that two edges have the same weight.

    Read the article

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