Search Results

Search found 3210 results on 129 pages for 'steve wall'.

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

  • Maze not generating properly. Out of bounds exception. need quick fix

    - by Dan Joseph Porcioncula
    My maze generator seems to have a problem. I am trying to generate something like the maze from http://mazeworks.com/mazegen/mazetut/index.htm . My program displays this http://a1.sphotos.ak.fbcdn.net/hphotos-ak-snc7/s320x320/374060_426350204045347_100000111130260_1880768_1572427285_n.jpg and the error Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -1 at Grid.genRand(Grid.java:73) at Grid.main(Grid.java:35) How do I fix my generator program? import java.awt.*; import java.awt.Color; import java.awt.Component; import java.awt.Graphics; import javax.swing.*; import java.util.ArrayList; public class Grid extends Canvas { Cell[][] maze; int size; int pathSize; double width, height; ArrayList<int[]> coordinates = new ArrayList<int[]>(); public Grid(int size, int h, int w) { this.size = size; maze = new Cell[size][size]; for(int i = 0; i<size; i++){ for(int a =0; a<size; a++){ maze[i][a] = new Cell(); } } setPreferredSize(new Dimension(h, w)); } public static void main(String[] args) { JFrame y = new JFrame(); y.setLayout(new BorderLayout()); Grid f = new Grid(25, 400, 400); y.add(f, BorderLayout.CENTER); y.setSize(450, 450); y.setVisible(true); y.setDefaultCloseOperation(y.EXIT_ON_CLOSE); f.genRand(); f.repaint(); } public void push(int[] xy) { coordinates.add(xy); int i = coordinates.size(); coordinates.ensureCapacity(i++); } public int[] pop() { int[] x = coordinates.get((coordinates.size())-1); coordinates.remove((coordinates.size())-1); return x; } public int[] top() { return coordinates.get((coordinates.size())-1); } public void genRand(){ // create a CellStack (LIFO) to hold a list of cell locations [x] // set TotalCells = number of cells in grid int TotalCells = size*size; // choose a cell at random and call it CurrentCell int m = randomInt(size); int n = randomInt(size); Cell curCel = maze[m][n]; // set VisitedCells = 1 int visCel = 1,d=0; int[] q; int h,o = 0,p = 0; // while VisitedCells < TotalCells while( visCel < TotalCells){ // find all neighbors of CurrentCell with all walls intact if(maze[m-1][n].countWalls() == 4){d++;} if(maze[m+1][n].countWalls() == 4){d++;} if(maze[m][n-1].countWalls() == 4){d++;} if(maze[m][n+1].countWalls() == 4){d++;} // if one or more found if(d!=0){ Point[] ls = new Point[4]; ls[0] = new Point(m-1,n); ls[1] = new Point(m+1,n); ls[2] = new Point(m,n-1); ls[3] = new Point(m,n+1); // knock down the wall between it and CurrentCell h = randomInt(3); switch(h){ case 0: o = (int)(ls[0].getX()); p = (int)(ls[0].getY()); curCel.destroyWall(2); maze[o][p].destroyWall(1); break; case 1: o = (int)(ls[1].getX()); p = (int)(ls[1].getY()); curCel.destroyWall(1); maze[o][p].destroyWall(2); break; case 2: o = (int)(ls[2].getX()); p = (int)(ls[2].getY()); curCel.destroyWall(3); maze[o][p].destroyWall(0); break; case 3: o = (int)(ls[3].getX()); p = (int)(ls[3].getY()); curCel.destroyWall(0); maze[o][p].destroyWall(3); break; } // push CurrentCell location on the CellStack push(new int[] {m,n}); // make the new cell CurrentCell m = o; n = p; curCel = maze[m][n]; // add 1 to VisitedCells visCel++; } // else else{ // pop the most recent cell entry off the CellStack q = pop(); m = q[0]; n = q[1]; curCel = maze[m][n]; // make it CurrentCell // endIf } // endWhile } } public int randomInt(int s) { return (int)(s* Math.random());} public void paint(Graphics g) { int k, j; width = getSize().width; height = getSize().height; double htOfRow = height / (size); double wdOfRow = width / (size); //checks verticals - destroys east border of cell for (k = 0; k < size; k++) { for (j = 0; j < size; j++) { if(maze[k][j].checkWall(2)){ g.drawLine((int) (k * wdOfRow), (int) (j * htOfRow), (int) (k * wdOfRow), (int) ((j+1) * htOfRow)); }} } //checks horizontal - destroys north border of cell for (k = 0; k < size; k++) { for (j = 0; j < size; j++) { if(maze[k][j].checkWall(3)){ g.drawLine((int) (k * wdOfRow), (int) (j * htOfRow), (int) ((k+1) * wdOfRow), (int) (j * htOfRow)); }} } } } class Cell { private final static int NORTH = 0; private final static int EAST = 1; private final static int WEST = 2; private final static int SOUTH = 3; private final static int NO = 4; private final static int START = 1; private final static int END = 2; boolean[] wall = new boolean[4]; boolean[] border = new boolean[4]; boolean[] backtrack = new boolean[4]; boolean[] solution = new boolean[4]; private boolean isVisited = false; private int Key = 0; public Cell(){ for(int i=0;i<4;i++){wall[i] = true;} } public int countWalls(){ int i, k =0; for(i=0; i<4; i++) { if (wall[i] == true) {k++;} } return k;} public boolean checkWall(int x){ switch(x){ case 0: return wall[0]; case 1: return wall[1]; case 2: return wall[2]; case 3: return wall[3]; } return true; } public void destroyWall(int x){ switch(x){ case 0: wall[0] = false; break; case 1: wall[1] = false; break; case 2: wall[2] = false; break; case 3: wall[3] = false; break; } } public void setStart(int i){Key = i;} public int getKey(){return Key;} public boolean checkVisit(){return isVisited;} public void visitCell(){isVisited = true;} }

    Read the article

  • How to use Facebook graph API to retrieve fan photos uploaded to wall of fan page?

    - by Joe
    I am creating an external photo gallery using PHP and the Facebook graph API. It pulls thumbnails as well as the large image from albums on our Facebook Fan Page. Everything works perfect, except I'm only able to retrieve photos that an ADMIN posts to our page. (graph.facebook.com/myalbumid/photos) Is there a way to use graph api to load publicy uploaded photos from fans? I want to retrieve the pictures from the "Photos from" album, but trying to get the ID for the graph query is not like other albums... it looks like this: http://www.facebook.com/media/set/?set=o.116860675007039 Another note: The only way i've come close to retreiving this data is by using the "feed" option.. ie: graph.facebook.com/pageid/feed EDIT: This is about as far as I could get- it works, but has certain issues stated below. Maybe someone could expand on this, or provide a better solution. (Using FB PHP SDK) <?php require_once ('config.php'); // get all photos for album $photos = $facebook->api("/YourID/tagged"); $maxitem =10; $count = 0; foreach($photos['data'] as $photo) { if ($photo['type'] == "photo"): echo "<img src='{$photo['picture']}' />", "<br />"; endif; $count+= 1; if ($count >= "$maxitem") break; } ?> Issues with this: 1) The fact that I don't know a method for graph querying specific "types" of Tags, I had to run a conditional statement to display photos. 2) You cannot effectively use the "?limit=#" with this, because as I said the "tagged" query contains all types (photo, video, and status). So if you are going for a photo gallery and wish to avoid running an entire query by using ?limit, you will lose images. 3) The only content that shows up in the "tagged" query is from people that are not Admins of the page. This isn't the end of the world, but I don't understand why Facebook wouldn't allow yourself to be shown in this data as long as you posted it "as yourself" and not as the page.

    Read the article

  • Facebook SDK , How To Put Name of user in wall post?

    - by Viola Courtney
    I got this code and working fine $access_token = $facebook->getAccessToken(); $vars = array( 'caption' => 'Caption message', 'message' => 'I need help', 'name' => 'I need Help', 'link' => 'http://www.google.com/', 'description' => 'description', 'picture' => '' ); But I want to replace the message or the name in to like : " (name of user) Need Help...

    Read the article

  • Post to wall as Facebook App (not as a user)?

    - by Sebastian
    I need to obtain an access_token as an App, not as an admin or user. This is so that I can post/comment/like in a the style of "[ app name ] has commented on your post". The problem is that when I attempt to get an access token (which I do successfully), I'm getting one that is for me (the admin) because I'm logged in when I attempt to call: https://graph.facebook.com/oauth/authorize?client_id=[app id]&redirect_uri=[url]&scope=publish_stream,offline_access&type=user_agent&display=popup What is the process for getting an non-expiring access token AS an app, rather than an admin? Thanks in advance

    Read the article

  • Our winners- and some BBQ for everyone

    - by Steve Tunstall
    Congrats to our two winners for the first two comments on my last entry. Steve from Australia and John Lemon. Steve won since he was the first person over the International Date Line to see the post I made so late after a workday on Friday. So not only does he get to live in a country with the 2nd most beautiful women in the world, but now he gets some cool Oracle Swag, too. (Yes, I live on the beach in southern California, so you can guess where 1st place is for that other contest…Now if Steve happens to live in Manly, we may actually have a tie going…) OK, ok, for everyone else, you can be winners, too. How you ask? I will make you the envy of every guy and gal in your neighborhood or campsite. What follows is the way to smoke the best ribs you or anyone you know have ever tasted. Follow my instructions and give it a try. People at your party/cookout/campsite will tell you that they’re the best ribs they’ve ever had, and I will let you take all the credit. Yes, I fully realize this post is going to be longer than any post I’ve done yet. But let’s get serious here. Smoking meat is much more important, agreed? J In all honesty, this is a repeat of another blog I did, so I’m just copying and pasting. Step 1. Get some ribs. I actually really like Costco’s pack. They have both St. Louis and Baby Back. (They are the same ribs, but cut in half down the sides. St. Louis style is the ‘front’ of the ribs closest to the stomach, and ‘Baby back’ is the part of the ribs where is connects to the backbone). I like them both, so here you see I got one pack of each. About 4 racks to a pack. So these two packs for $25 each will feed about 16-20 of my guests. So around 3 bucks a person is a pretty good deal for the best ribs you’ll ever have. Step 2. Prep the ribs the night before you’re going to smoke. You need to trim them to fit your smoker racks, and also take off the membrane and add your rub. Then cover and set in fridge overnight. Here’s how to take off the membrane, which will not break down with heat and smoke like the rest of the meat, so must be removed. Use a butter knife to work in a ways between the membrane and the white bone. Just enough to make room for your finger. Try really hard not to poke through the membrane, you want to keep it whole. See how my gloved fingers can now start to lift up and pull off the membrane? This is what you are trying to do. It’s awesome when the whole thing can come off at once. This one is going great, maybe the best one I’ve ever done. Sometime, it falls apart and doesn't come off in one nice piece. I hate when that happens. Now, add your rub and pat it down once into the meat with your other hand. My rub is not secret. I got it from my mentor, a BBQ competitive chef who is currently ranked #1 in California and #3 in the nation on the BBQ circuit. He does full-day classes in southern California if anyone is interested in taking his class. Go to www.slapyodaddybbq.com to check him out. I tweaked his run recipe a tad and made my own. It’s one part Lawry’s, one part sugar, one part Montreal Steak Seasoning, one part garlic powder, one-half part red chili powder, one-half part paprika, and then 1/20th part cayenne. You can adjust that last ingredient, or leave it out. Real cheap stuff you can get at Costco. This lets you make enough rub to last about a year or two. Don’t make it all at once, make a shaker’s worth and use it up before you make more. Place it all in a bowl, mix well, and then add to a shaker like you see here. You can get a shaker with medium sized holes on it at any restaurant supply store or Smart & Final. The kind you see at pizza places for their red pepper flakes works best. Now cover and place in fridge overnight. Step 3. The next day. Ok, I’m ready to go. Get your stuff together. You will need your smoker, some good foil, a can of peach nectar, a bottle of Agave syrup, and a package of brown sugar. You will need this stuff later. I also use a clean spray bottle, and apple juice. Step 4. Make your fire, or turn on your electric smoker. In this example I’m using my portable charcoal smoker. I got this for only $40. I then modified it to be useful. Once modified, these guys actually work very well. Trust me, your food DOES NOT KNOW how expensive your smoker is. Someone who tells you that you need to spend a bunch of money on a smoker is an idiot. I also have an electric smoker that stays in my backyard. It’s cleaner and larger so I can smoke more food. But this little $40 one works great for going camping. Here is what my fire-bowl looks like. I leave a space in the middle open, and place cold charcoal and wood chucks in a circle going outwards. This makes it so when I dump the hot coals down the middle, they will slowly burn outwards, hitting different wood chucks at different times, allowing me to go 4-5 hours without having to even touch my fire. For ribs, I use apple and pecan wood. Pecan works for anything. Apple or any fruit wood is excellent for pork. So now I make my hot charcoal with a chimney only about half-full. I found a great use for that side-burner on my grill that I never use. It makes a fantastic chimney starter. You never use fluids of any kind, nor ever use that stupid charcoal that has lighter fluid built into it. Never, ever, ever. Step 5. Smoke. Add your ribs in the racks and stack them up in your smoker. I have a digital thermometer on a probe that I use to keep track of the temp in the smoker. I just lay the probe on the top rack and shut the lid. This cheap guy is a little harder to maintain the right temperature of around 225 F, so I do have to keep my eye on it more than my electric one or a more expensive charcoal one with the cool gadgets that regulate your temp for you. Every hour, spray apple juice all over your ribs using that spray bottle. After about 3 hours, you should have a very good crust (called the Bark) on your ribs. Once you have the Bark where you want it, carefully remove your ribs and place them in a tray. We are now ready for a very important part to make the flavor. Get a large piece of foil and place one rib section on it. Splash some of the peach nectar on it, and then a drizzle of the Agave syrup. Then, use your gloved hand to pack on some brown sugar. Do this on BOTH sides, and then completely wrap it up TIGHT in the foil. Do this for each rib section, and then place all the wrapped sections back into the smoker for another 4 to 6 hours. This is where the meat will get tender and flavorful. The first three hours is only to make the smoke bark. You don’t need smoke anymore, since the ribs are wrapped, you only need to keep the heat around 225 for the next 4-6 hours. Obviously you don’t spray anymore. Just time and slow heat. Be patient. It’s actually really hard to overdo it. You can let them go longer, and all that will happen is they will get even MORE tender!!! If you take them out too soon, they will be tough. How do you know? Take out one package (use long tongs) and open it up. If you grab a bone with your tongs and it just falls apart and breaks away from the rest of the meat, you are done!!! Enjoy!!! Step 6. Eat. It pulls apart like this when it’s done. By the way, smoking tri-tip is way easier. Just rub it with the same rub, and put in your smoker for about 2.5 hours at 250 F. That’s it. Low-maintenance. It comes out like this, with a fantastic smoke ring and amazing flavor. Thanks, and I will put up another good tip, about the ZFSSA, around the end of November. Steve 

    Read the article

  • Counting and joining two tables

    - by Eikern
    Eventhosts – containing the three regular hosts and an "other" field (if someone is replacing them) eventid | host (SET[Steve,Tim,Brian,other]) ------------------------------------------- 1 | Steve 2 | Tim 3 | Brian 4 | other 5 | other Event id | other | name etc. ---------------------- 1 | | … 2 | | … 3 | | … 4 | Billy | … 5 | Irwin | … This query: SELECT h.host, COUNT(*) AS hostcount FROM host AS h LEFT OUTER JOIN event AS e ON h.eventid = e.id GROUP BY h.host Returns Steve | 1 Tim | 1 Brian | 1 other | 2 I want it to return Steve | 1 Tim | 1 Brian | 1 Billy | 1 Irwin | 1 OR Steve | | 1 Tim | | 1 Brian | | 1 other | Billy | 1 other | Irwin | 1 Can someone tell me how I can achieve this or point me in a direction?

    Read the article

  • .htaccess redirect question

    - by russp
    I have a slight problem with .htaccess redirect. I have a dynamic site with 2 levels of variables - content="type -(alpha)" and ID="number" but this is very not seo friendly what I really would like to create is a rewrite rule that generates a "friendly" url for serach engines & users alike. Very much like WordPress does. Each ID is already unique (obviously) and on creation is creating a unique "permalink" field so for example ID=1 has a "permalink field" as "2009/10/27/page title" and ID=100 would be "2010/10/27 page title". I would like folder/wall.php?content=type&ID=number to redirect to folder/permalink.php/html/htm (don't mind a non dynamic extension) Any clues? - this is not right (I know) but it also "breaks" my css file RewriteEngine On RewriteRule wall/content/(.*)/ID/(.*)/ wall.php?content=$1&ID=$2 RewriteRule wall/content/(.*)/ID/(.*) wall.php?content=$1&ID=$2

    Read the article

  • how to do collision detection for hollow(?) movieclips in flash AS3?

    - by Pieter888
    Hey everyone, I'm making small interactive games in flash to learn AS3, now I ran into a problem that I need some help with. I need to check the collision between the player and the wall which is normally simple using the hitTestObject function. But now I made a wall object totally surrounding the player with corridors and turn, a collision playground so to speak. Now when I use the hitTestObject function to check whether the player is in collision with the wall it tells me it always collides supposedly because the player object is within the bounds of the wall object. So assuming that I'm correct about the error: How can I prevent getting a collision when I'm inside the bounds of the wall object but not touching the actual walls in that object?

    Read the article

  • Grails withCriteria testing

    - by Steve Wall
    Hello, I'd like to test a "withCriteria" closure and am not sure how to go about it. I see how to mock out the withCriteria call, but not test the code within the closure. When running the test that executes the "withCriteria", I keep getting a MissingMethodException, even though the code runs fine under the normal flow of execution. Any ideas? Thanks! Steve

    Read the article

  • 2D Ball Collisions with Corners

    - by Aaron
    I'm trying to write a 2D simulation of a ball that bounces off of fixed vertical and horizontal walls. Simulating collisions with the faces of the walls was pretty simple--just negate the X-velocity for a vertical wall or the Y-velocity for a horizontal wall. The problem is that the ball can also collide with the corners of the walls, where a horizontal wall meets with a vertical wall. I have already figured out how to detect when a collision with a corner is occurring. My question is how the ball should react to this collision--that is, how its X and Y velocities will change as a result. Here's a list of what I already know or know how to find: *The X and Y coordinates of the ball's center during the frame when a collision is detected *The X and Y components of the ball's velocity *The X and Y coordinates of the corner *The angle between the ball's center and the corner *The angle in which the ball is traveling just before the collision *The amount that the ball is overlapping the corner when the collision is detected I'm guessing that it's best to pretend that the corner is an infinitely small circle, so I can treat a collision between the ball and that circle as if the ball were colliding with a wall that runs tangent to the circles at the point of collision. It seems to me that all I need to do is rotate the coordinate system to line up with this imaginary wall, reverse the X component of the ball's velocity under this system, and rotate the coordinates back to the original system. The problem is that I have no idea how to program this. By the way, this is an ideal simulation. I'm not taking anything like friction or the ball's rotation into account. I'm using Objective-C, but I'd really just like a general algorithm or some advice. Many thanks if anyone can help!

    Read the article

  • 500.19 error NetBios command limit thread on forums.iis.net

    - by steve schofield
    Here is a great thread on how a person reported fixing a problem 500.19 error NetBios command limit and using a UNC based content architecture. http://forums.iis.net/p/1165964/1937935.aspx http://download.microsoft.com/download/7/4/f/74fe970d-4a7d-4034-9f5d-02572567e7f7/24_CHAPTER_11_Troubleshooting_IIS_6.0.doc http://support.microsoft.com/kb/813776 Check out the UNC tag regarding others that have great information. http://weblogs.asp.net/steveschofield/archive/tags/UNC/default.aspx Steve SchofieldMicrosoft MVP - IIS

    Read the article

  • Share IIS and related information via IIS Community Newsletter WIKI

    - by steve schofield
    Trying something different!  Do you have something to share with the IIS community?  Are you an IIS community leader wanting to share your info?  Do you run a local usergroup and want to let others know!  Sign-up for our WIKI @ http://www.iislogs.com/wiki/   The information will be reviewed and potentially included in the IIS Community Newsletter.  Cheers, Steve SchofieldMicrosoft MVP - IIS  

    Read the article

  • ming 0.4.2 compilation errors on Ubuntu 12.04 when installing from source code

    - by gmuhammad
    I am trying to install ming 0.4.2 from source code and it was compilable before on Ubuntu 10.04, but now it' giving following compilation errors when I try to install using command sudo make install (libpng is already installed). /bin/bash ../libtool --tag=CC --mode=link gcc -g -O2 -Wall -DSWF_LITTLE_ENDIAN -o img2swf img2swf.o ../src/libming.la libtool: link: gcc -g -O2 -Wall -DSWF_LITTLE_ENDIAN -o .libs/img2swf img2swf.o ../src/.libs/libming.so gcc -DHAVE_CONFIG_H -I. -I../src -I../src -g -O2 -Wall -DSWF_LITTLE_ENDIAN -MT png2dbl.o -MD -MP -MF .deps/png2dbl.Tpo -c -o png2dbl.o png2dbl.c png2dbl.c: In function ‘readPNG’: png2dbl.c:64:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result] mv -f .deps/png2dbl.Tpo .deps/png2dbl.Po /bin/bash ../libtool --tag=CC --mode=link gcc -g -O2 -Wall -DSWF_LITTLE_ENDIAN -o png2dbl png2dbl.o ../src/libming.la libtool: link: gcc -g -O2 -Wall -DSWF_LITTLE_ENDIAN -o .libs/png2dbl png2dbl.o ../src/.libs/libming.so png2dbl.o: In function `readPNG': /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:69: undefined reference to `png_create_read_struct' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:74: undefined reference to `png_create_info_struct' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:82: undefined reference to `png_create_info_struct' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:97: undefined reference to `png_init_io' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:98: undefined reference to `png_set_sig_bytes' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:99: undefined reference to `png_read_info' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:101: undefined reference to `png_get_IHDR' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:127: undefined reference to `png_get_valid' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:156: undefined reference to `png_read_update_info' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:158: undefined reference to `png_get_IHDR' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:162: undefined reference to `png_get_channels' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:187: undefined reference to `png_get_rowbytes' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:194: undefined reference to `png_read_image' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:128: undefined reference to `png_set_expand' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:135: undefined reference to `png_set_strip_16' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:143: undefined reference to `png_set_gray_to_rgb' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:151: undefined reference to `png_set_filler' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:125: undefined reference to `png_set_packing' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:107: undefined reference to `png_get_valid' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:117: undefined reference to `png_get_PLTE' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:78: undefined reference to `png_destroy_read_struct' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:92: undefined reference to `png_destroy_read_struct' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:86: undefined reference to `png_destroy_read_struct' png2dbl.o: In function `writeDBL': /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:278: undefined reference to `floor' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:280: undefined reference to `compress2' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:278: undefined reference to `floor' /home/gmuhammad/Downloads/ming-0.4.2/util/png2dbl.c:280: undefined reference to `compress2' collect2: ld returned 1 exit status make[1]: *** [png2dbl] Error 1 make[1]: Leaving directory `/home/gmuhammad/Downloads/ming-0.4.2/util' make: *** [install-recursive] Error 1

    Read the article

  • Ubuntu 12.10 wont fully load

    - by Steve
    I want to try Ubuntu from my 16Gb stick without ditching Win7 just yet. Everything boots up fine, I get the spash screen, I get the question screen (Do you want to try Ubuntu or install (or something like that)) I select try and then my screen goes black with what appears to be a DOS prompt. No keyboard keys work at this time. Have tried re-downloading Ubuntu, rebooting etc. Any help very much appreciated. Regards Steve

    Read the article

  • Extend my LAN network

    - by user268291
    i have a patch panel and hardwiring already setup in my office. The patch panel is 24-port and all the ports are engaged. All my switch ports are engaged. Now, I have a printer connected to a wall point (RJ45) which I want to shift to a new room where there is no LAN setup. I want to have two RJ45 wall plugs in the new room so that I can connect one RJ45 port to have my LAN in the new room and the other RJ45 wall port I want to use for my printer. There is no option other than LAN (no wireless). Please help me and tell me how do I get the two RJ45 wall plate plugs in the new room up and keep my LAN running. It is a little urgent for me. Please help.

    Read the article

  • A dusty server room

    - by pauska
    Here's the story.. The owners of the building we lease office space from decided to do a renovation of the exterior. This involved in some pretty heavy work at the level where our server room is, including exchanging windows wich are fit inside a concrete wall. My red alert went off when I heard that they were going to do the same thing with our server room (yes, our server room has a window. We're a small shop with 3 racks. The window is secured with steel bars.) I explicity told the contractor that they need to put up a temporarily wall between our racks and the original wall - and to make sure that the temporary wall is 100 % air and water-tight. They promised to do so. The temporary wall has a small door in it, so that workers can go in/out through the day (through our server room, wich was the only option....). On several occasions I could find the small door half-way shut while working evenings/nights. I locked the door, and thought that they would hopefully get the point soon and keep the door shut. I even gave a electrician a mouthful when I saw that he didn't close the door properly. By this point - I bet that most of you get a picture of what happened. Yes, they probably left the door open while drilling in the concrete. I present you our 4 weeks old EMC VNX: I'll even put in a little bonus, here is the APC UPS one rack further away from the temporary wall. See the nice little landing strip from my finger? What should I do? The only thing that comes to mind is to either call all our suppliers (EMC, HP, Dell, Cisco) and get them to send technicians to check out all the gear in the server room, or get some kind of certified 3rd-party consulant to check all of it. Would you run production systems on this gear? How long? Edit: I should also note that our aircondition isn't exactly enterprise-grade, given the nature of our small room. It's just a single inverter, wich have failed one time before I started working here (failed inverters usually leads to water dripping out).

    Read the article

  • Advanced (?) Excel sorting

    - by Preston Grayskull
    First of all, I'd like to admit that I don't really know anything about Excel, but I have tried to look up a solution to this in Excel books and Googling. Here's what I'm trying to do: I have a really long spreadsheet There are 7 columns total, but only two columns that I'm most interested in. Here's an example CSV that is much more simple than my actual dataset, but the search/sort is analogous: John, Apple Dave, Apple Dave, Orange Steve, Apple Steve, Orange Steve, Kiwi Bob, Apple Bob, Banana I'm interested in extracting the entire rows (all of the columns) that meet the following criteria: ["Apple"] OR ["Apple" and "Orange"] NOT ["Apple" and "Orange" and Anything Else] NOT ["Apple" and Anything that isn't Orange] So with the above CSV, I would get the entire rows for John and Dave, but not Steve and not Bob. I started doing this manually, and will likely finish by the time this question has an answer, but I would like to know this for future reference. Thanks!

    Read the article

  • jerky walljump in unity rigidbody2d

    - by Lilz Votca Love
    hey there i know people have encountered issues with it before i looked upon the different solutions provided but i couldnt get any fix at all.im making a 2d game and am stuck with the walljump.i detect the wall wonderfully i also detect the jump and it works the player jumps off the wall when facing right with the use of rigidbody.addforce(new vector2(-1,2)*jumpforce) now when jumping on the oposite wall using the same vector with the sign in x axis changed to 1,the player jumps too but it goes more in the y axis than it should.Here is an image to show you the curves it(the player) follows. check the following url to see the behaviour https://scontent-b-mad.xx.fbcdn.net/hphotos-xpf1/t1.0-9/1470386_10152415957141154_156025539179003805_n.jpg voila the green one is happennig when player faces right and the other one happens when he is not here is the section of code if (wall) { if (wallJump) { if (facingRight) { rigidbody2D.velocity = Vector2.zero; flip (); rigidbody2D.AddForce (new Vector2 (-1f, 2f) * Jumpforce / 1.5f); Debug.Log ("saut mural gauche" + new Vector2 (-1f, 2f) * Jumpforce / 1.5f); } else { rigidbody2D.velocity = Vector2.zero; flip (); rigidbody2D.AddForce (new Vector2 (1f, 2f) * Jumpforce / 1.5f); Debug.Log ("saut mural droit--" + new Vector2 (Mathf.Sign (1f), 2f) * Jumpforce / 1.5f + "jump" + jump); } } } else { wallJump = false; } here the code is not optimized yet but i assure you it works so guys any help would be so awesome!! thanks

    Read the article

  • Meaning of offset in pygame Mask.overlap methods

    - by Alan
    I have a situation in which two rectangles collide, and I have to detect how much did they collide so so I can redraw the objects in a way that they are only touching each others edges. It's a situation in which a moving ball should hit a completely unmovable wall and instantly stop moving. Since the ball sometimes moves multiple pixels per screen refresh, it it possible that it enters the wall with more that half its surface when the collision is detected, in which case i want to shift it position back to the point where it only touches the edges of the wall. Here is the conceptual image it: I decided to implement this with masks, and thought that i could supply the masks of both objects (wall and ball) and get the surface (as a square) of their intersection. However, there is also the offset parameter which i don't understand. Here are the docs for the method: Mask.overlap Returns the point of intersection if the masks overlap with the given offset - or None if it does not overlap. Mask.overlap(othermask, offset) -> x,y The overlap tests uses the following offsets (which may be negative): +----+----------.. |A | yoffset | +-+----------.. +--|B |xoffset | | : :

    Read the article

  • Simple collision detection for pong

    - by Dave Voyles
    I'm making a simple pong game, and things are great so far, but I have an odd bug which causes my ball (well, it's a box really) to get stuck on occasion when detecting collision against the ceiling or floor. It looks as though it is trying to update too frequently to get out of the collision check. Basically the box slides against the top or bottom of the screen from one paddle to the other, and quickly bounces on and off the wall while doing so, but only bounces a few pixels from the wall. What can I do to avoid this problem? It seems to occur at random. Below is my collision detection for the wall, as well as my update method for the ball. public void UpdatePosition() { size.X = (int)position.X; size.Y = (int)position.Y; position.X += speed * (float)Math.Cos(direction); position.Y += speed * (float)Math.Sin(direction); CheckWallHit(); } // Checks for collision with the ceiling or floor. // 2*Math.pi = 360 degrees // TODO: Change collision so that ball bounces from wall after getting caught private void CheckWallHit() { while (direction > 2 * Math.PI) { direction -= 2 * Math.PI; } while (direction < 0) { direction += 2 * Math.PI; } if (position.Y <= 0 || (position.Y > resetPos.Y * 2 - size.Height)) { direction = 2 * Math.PI - direction; } }

    Read the article

  • Collision Detection with SAT: False Collision for Diagonal Movement Towards Vertical Tile-Walls?

    - by Macks
    Edit: Problem solved! Big thanks to Jonathan who pointed me in the right direction. Sean describes the method I used in a different thread. Also big thanks to him! :) Here is how I solved my problem: If a collision is registered by my SAT-method, only fire the collision-event on my character if there are no neighbouring solid tiles in the direction of the returned minimum translation vector. I'm developing my first tile-based 2D-game with Javascript. To learn the basics, I decided to write my own "game engine". I have successfully implemented collision detection using the separating axis theorem, but I've run into a problem that I can't quite wrap my head around. If I press the [up] and [left] arrow-keys simultaneously, my character moves diagonally towards the upper left. If he hits a horizontal wall, he'll just keep moving in x-direction. The same goes for [up] and [left] as well as downward-diagonal movements, it works as intended: http://i.stack.imgur.com/aiZjI.png Diagonal movement works fine for horizontal walls, for both left and right-movement However: this does not work for vertical walls. Instead of keeping movement in y-direction, he'll just stop as soon as he "enters" a new tile on the y-axis. So for some reason SAT thinks my character is colliding vertically with tiles from vertical walls: http://i.stack.imgur.com/XBEKR.png My character stops because he thinks that he is colliding vertically with tiles from the wall on the right. This only occurs, when: Moving into top-right direction towards the right wall Moving into top-left direction towards the left wall Bottom-right and bottom-left movement work: the character keeps moving in y-direction as intended. Is this inherited from the way SAT works or is there a problem with my implementation? What can I do to solve my problem? Oh yeah, my character is displayed as a circle but he's actually a rectangular polygon for the collision detection. Thank you very much for your help.

    Read the article

  • Hit Detection When rotating the camera

    - by SD1990
    This bug/feature has been plaguing me for a while and i want to know the best way to fix it. I'm testing simple hit detection with a wall, like: if (Forward button) if(Inv.w.z < -49 || Inv.w.z > 49) pos.z = 0.0f; else if(Inv.w.x < -49 || Inv.w.x > 49) pos.z = 0.0f; else pos.z = +1.0f; where Inv.w. is the camera positions. Now obviously when i now hit that certain point i can no longer move away from the wall or anywhere in fact. How can i change this code to allow for the camera to be turned away from the wall so therefore i should be allowed to move? for example, the player hits the wall and i cant move until i turn around or to the side? I know its something to do with velocity but im pretty new to this so please bare with me if this is easy.

    Read the article

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