Search Results

Search found 4481 results on 180 pages for 'black rez'.

Page 65/180 | < Previous Page | 61 62 63 64 65 66 67 68 69 70 71 72  | Next Page >

  • Clever DIY Display Showcases Game Consoles While Concealing Cables

    - by Jason Fitzpatrick
    How do you display all your vintage game consoles while keeping them in a clutter free and ready-to-play state? This wall-mounted display does a great job showing off the retro gear while keeping everything tidy. Courteys of German tinker and gamer Holger, the design of the display is deceptively simple. The wall mount is a basic 2×4 frame wrapped in black roofing batten (similar to the lightweight weed-fabric used in gardens). Screw-in mounts for the LACK shelves are positioned every foot or so going up the frame and a small slit in the fabric allows for hidden routing of the cables. While it looks like the consoles are simply on display, they’re actually all hooked up and ready to play. For more photos of the build, hit up the link below. LACK Video Console Shelf with Hidden Cables [IKEAHacker] 7 Ways To Free Up Hard Disk Space On Windows HTG Explains: How System Restore Works in Windows HTG Explains: How Antivirus Software Works

    Read the article

  • (and a new ray smith equipment webpage)

    - by raysmithequip
    Originally posted on: http://geekswithblogs.net/raysmithequip/archive/2013/10/15/154351.aspxPlease bear with me, apparently we lost jabry.com to what I am not sure.  I have yet another webpage coming to http://www.raysmithequip.netai.net/ . Right now it is pretty bare, I just spent an hour configuring web matrix 2.0 (3 no likey like vista!!).  I should have the shoppers corner sub page back up intime for black friday though, soo keep your eyes posted.To keep you busy meantime, be sure to check out inmoov, a really cool open source 3d printed diy robot.I chanced upon it from the dangerous prototypes web site some time ago and consider it the one project that will rock the world in the immediate future.inmoov.blogspot.com/ raysmithn3twu

    Read the article

  • Can't boot into windows7 after installling Ubuntu-12.04 (LTS) on HP 6735s laptop 12.04

    - by Dimeji
    I installed Ubuntu-12.04 (LTS) through a USB drive and when it's done i cant load Windows 7 (Loader)(on/dev/sda1) in GRUB. When I select that, it displays a black screen and then returns to GRUB but i'm still able to boot into 12.04. Help me to solve this, I installed Boot-repair,I checked reinstall grub in the main option tab and checked place boot flag on sda1 windows7 in other options tab , re booted and it wasnt working this is was bootinfo summary http://paste.ubuntu.com/1206875/, i also tried sudo grub-install "(hd0)" sudo update-grub in the terminal and i gave me found Windows 7 (loader) on /dev/sda1 and rebooted but i still wasnt able to boot into windows 7, this is my bootinfoo summary after i typed those two commands http://pastebin.ubuntu.com/1206955/ please help me,I'm at wits end thanks Dimeji

    Read the article

  • DIY Coffee Table Arcade Hides Retro Gaming Inside

    - by Jason Fitzpatrick
    Last week we showed you a nifty man-cave arcade-in-coffee-table build that was a bit, shall we say, exposed. If you’re looking for a sleek build that conceals its arcade-heart until it’s game time, this clean and concealed build is for you. Courtesy of IKEAHacker reader Sam Wang, the beauty of this build is that other than the rectangle of black glass in the center of the table–which could just as well be a design accent–there is no indication that the coffee table is a gaming machine when not in use. Slide out the drawers and boot it up, however, and you’re in business–full MAME arcade emulation at your finger tips. Hit up the link below to check out his full photo build guide. My DIY Arcade Machine Coffee Table [via IKEAHacker] How To Switch Webmail Providers Without Losing All Your Email How To Force Windows Applications to Use a Specific CPU HTG Explains: Is UPnP a Security Risk?

    Read the article

  • can't install with usb pen drive, SYSLINUX problem

    - by nkint
    i'm on ubuntustudio and i want to format my hd and try kubuntu (install in my acer notebook, no partion, no double operating system problem, only istall it) i've downloaded iso file ( kubuntu-10.10-desktop-i386.iso ), insert usb pen drive, then: system administration startup disk creator erased usb pen content, and "make startup disk" finally, reboot computer with pen inside usb port normal boot didn't start (as expected) but only black screen with this signal: SYSLINUX 4.03 2010-10-22 EDD Copyright (c) 1994-2010, H. Peter Anvin et al unknown keyword in configuration file boot: i've tried different usb pen stick and different iso files (ubuntu, kubuntu, netbook edition).. always same problem (sometimes only the first line without "unknow keyword in conf file" error) some advice?? sorry for my bad english

    Read the article

  • Mathematica 8 crashes Ubuntu 13.10

    - by Georgy Ivanov
    I have Mathematica 8 installed on my Ubuntu laptop since 2011. I updated Ubuntu several times, and experienced no problems with Mathematica. It also worked smoothly after I updated Ubuntu to 13.10 (it worked for sure for a week after update). When I tried to start Mathematica today by executing a .sh-file, the screen went black, I was logged out from the session and thrown back to the login screen. Typing mathematica in the terminal produced the same effect. Typing mathematica -cleanstart or mathematica -mesa did not help. Starting Gnome session with or without effects did not help Launching mathematica under another user account did not help. I still can run text-only version of mathematica by typing math in the terminal. I don't remember making any changes to my configuration except for installing updates. Is there any quick way to fix this behavior? How can I know which component exactly crashed? Where should I look for crash logs?

    Read the article

  • Maintaining packages with code - Adding a property expression programmatically

    Every now and then I've come across scenarios where I need to update a lot of packages all in the same way. The usual scenario revolves around a group of packages all having been built off the same package template, and something needs to updated to keep up with new requirements, a new logging standard for example.You'd probably start by updating your template package, but then you need to address all your existing packages. Often this can run into the hundreds of packages and clearly that's not a job anyone wants to do by hand. I normally solve the problem by writing a simple console application that looks for files and patches any package it finds, and it is an example of this I'd thought I'd tidy up a bit and publish here. This sample will look at the package and find any top level Execute SQL Tasks, and change the SQL Statement property to use an expression. It is very simplistic working on top level tasks only, so nothing inside a Sequence Container or Loop will be checked but obviously the code could be extended for this if required. The code that actually sets the expression is shown below, the rest is just wrapper code to find the package and to find the task. /// <summary> /// The CreationName of the Tasks to target, e.g. Execute SQL Task /// </summary> private const string TargetTaskCreationName = "Microsoft.SqlServer.Dts.Tasks.ExecuteSQLTask.ExecuteSQLTask, Microsoft.SqlServer.SQLTask, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91"; /// <summary> /// The name of the task property to target. /// </summary> private const string TargetPropertyName = "SqlStatementSource"; /// <summary> /// The property expression to set. /// </summary> private const string ExpressionToSet = "@[User::SQLQueryVariable]"; .... // Check if the task matches our target task type if (taskHost.CreationName == TargetTaskCreationName) { // Check for the target property if (taskHost.Properties.Contains(TargetPropertyName)) { // Get the property, check for an expression and set expression if not found DtsProperty property = taskHost.Properties[TargetPropertyName]; if (string.IsNullOrEmpty(property.GetExpression(taskHost))) { property.SetExpression(taskHost, ExpressionToSet); changeCount++; } } } This is a console application, so to specify which packages you want to target you have three options: Find all packages in the current folder, the default behaviour if no arguments are specified TaskExpressionPatcher.exe .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } Find all packages in a specified folder, pass the folder as the argument TaskExpressionPatcher.exe C:\Projects\Alpha\Packages\ .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } Find a specific package, pass the file path as the argument TaskExpressionPatcher.exe C:\Projects\Alpha\Packages\Package.dtsx The code was written against SQL Server 2005, but just change the reference to Microsoft.SQLServer.ManagedDTS to be the SQL Server 2008 version and it will work fine. If you get an error Microsoft.SqlServer.Dts.Runtime.DtsRuntimeException: The package failed to load due to error 0xC0011008… then check that the package is from the correct version of SSIS compared to the referenced assemblies, 2005 vs 2008 in other words. Download Sample Project TaskExpressionPatcher.zip (6 KB)

    Read the article

  • HDMI with Intel Mobile 4 Graphics Controller

    - by roel
    When connecting my TV over HDMI, it shows up in display settings and xrandr: Aspire1825PTZ:~$ lspci | grep VGA 00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07) Aspire1825PTZ:~$ xrandr Screen 0: minimum 320 x 200, current 1366 x 768, maximum 8192 x 8192 LVDS1 connected 1366x768+0+0 (normal left inverted right x axis y axis) 256mm x 144mm 1366x768 60.0*+ 1360x768 59.8 60.0 1024x768 60.0 800x600 60.3 56.2 640x480 59.9 VGA1 disconnected (normal left inverted right x axis y axis) HDMI1 connected (normal left inverted right x axis y axis) 720x576 50.0 720x480 59.9 DP1 disconnected (normal left inverted right x axis y axis) HDMI2 disconnected (normal left inverted right x axis y axis) DP2 disconnected (normal left inverted right x axis y axis) DP3 disconnected (normal left inverted right x axis y axis) TV1 disconnected (normal left inverted right x axis y axis) However, the resolution is way too low and the screen remains black. Everything works fine in Windows, but I'd rather not reboot just to watch a film... Could anyone help me please?

    Read the article

  • Pac-Man Hiding Spot Makes High Scores a Snap

    - by Jason Fitzpatrick
    This interesting bug (feature?) in the original Pac-Man game makes it easy to hide from the ghosts, ensuring a long-lived and well-fed Pac-Man. Check out the video above to see the black hole you can park Pac-Man in to avoid assault by the ghosts. There’s two big caveats with this trick: first, it only works in the original game (spin offs and modern adaptations won’t necessarily have it but the original machine and MAME implementations of it will). Second, it doesn’t work if the ghosts see you park yourself there; you need to slip into the spot our of their direct line of sight. Still craving more Pac-Man goodness? Check out these cheat maps that map out all the patterns you need to follow to sneak through every level unmolested by ghosts. [via Neatorama] How To Be Your Own Personal Clone Army (With a Little Photoshop) How To Properly Scan a Photograph (And Get An Even Better Image) The HTG Guide to Hiding Your Data in a TrueCrypt Hidden Volume

    Read the article

  • Blender Object Appearing Gray when all Lights are Off

    - by celestialorb
    I have an issue with Blender where, when I turn my only light off (a sun lamp) and render the image my object appears gray rather than black (and thus, not appear to the camera). I can't figure out why this is happening. Here's what I just did in my scene: Added a new UV Sphere mesh (to make a total of two spheres), made it visible to the camera, turned off the sun lamp (by setting energy to 0), and rendered. The result I obtained is below. I discovered this when attempting to render the first sphere with a material/texture on it and it was too bright. The material on the spheres (which are different) are very basic, there's no emit, diffuse and specular are at default values. Could there be an issue with the way my camera is setup? Thanks in advance!

    Read the article

  • Trying to do a batch rename, can't figure out the proper RegEx

    - by trezy
    I'm trying to rename my movie collection. All of the files are currently named using dots instead of spaces, i.e. Men.in.Black.avi. I want to replace all of the dots with spaces which isn't terribly difficult, but I need to preserve the last dot for the file extension, i.e. .avi, .mp4, .ogg, etc. My Googling has provided no solutions. I'm also a Javascript developer and could see some snazzy applications for it. So, any suggestions?

    Read the article

  • Flood fill algorithm for Game of Go

    - by Jackson Borghi
    I'm having a hell of a time trying to figure out how to make captured stones disappear. I've read everywhere that I should use the flood fill algorithm, but I haven't had any luck with that so far. Any help would be amazing! Here is my code: package Go; import static java.lang.Math.*; import static stdlib.StdDraw.*; import java.awt.Color; public class Go2 { public static Color opposite(Color player) { if (player == WHITE) { return BLACK; } return WHITE; } public static void drawGame(Color[][] board) { Color[][][] unit = new Color[400][19][19]; for (int h = 0; h < 400; h++) { for (int x = 0; x < 19; x++) { for (int y = 0; y < 19; y++) { unit[h][x][y] = YELLOW; } } } setXscale(0, 19); setYscale(0, 19); clear(YELLOW); setPenColor(BLACK); line(0, 0, 0, 19); line(19, 19, 19, 0); line(0, 19, 19, 19); line(0, 0, 19, 0); for (double i = 0; i < 19; i++) { line(0.0, i, 19, i); line(i, 0.0, i, 19); } for (int x = 0; x < 19; x++) { for (int y = 0; y < 19; y++) { if (board[x][y] != YELLOW) { setPenColor(board[x][y]); filledCircle(x, y, 0.47); setPenColor(GRAY); circle(x, y, 0.47); } } } int h = 0; } public static void main(String[] args) { int px; int py; Color[][] temp = new Color[19][19]; Color[][] board = new Color[19][19]; Color player = WHITE; for (int i = 0; i < 19; i++) { for (int h = 0; h < 19; h++) { board[i][h] = YELLOW; temp[i][h] = YELLOW; } } while (true) { drawGame(board); while (!mousePressed()) { } px = (int) round(mouseX()); py = (int) round(mouseY()); board[px][py] = player; while (mousePressed()) { } floodFill(px, py, player, board, temp); System.out.print("XXXXX = "+ temp[px][py]); if (checkTemp(temp, board, px, py)) { for (int x = 0; x < 19; x++) { for (int y = 0; y < 19; y++) { if (temp[x][y] == GRAY) { board[x][y] = YELLOW; } } } } player = opposite(player); } } private static boolean checkTemp(Color[][] temp, Color[][] board, int x, int y) { if (x < 19 && x > -1 && y < 19 && y > -1) { if (temp[x + 1][y] == YELLOW || temp[x - 1][y] == YELLOW || temp[x][y - 1] == YELLOW || temp[x][y + 1] == YELLOW) { return false; } } if (x == 18) { if (temp[x - 1][y] == YELLOW || temp[x][y - 1] == YELLOW || temp[x][y + 1] == YELLOW) { return false; } } if (y == 18) { if (temp[x + 1][y] == YELLOW || temp[x - 1][y] == YELLOW || temp[x][y - 1] == YELLOW) { return false; } } if (y == 0) { if (temp[x + 1][y] == YELLOW || temp[x - 1][y] == YELLOW || temp[x][y + 1] == YELLOW) { return false; } } if (x == 0) { if (temp[x + 1][y] == YELLOW || temp[x][y - 1] == YELLOW || temp[x][y + 1] == YELLOW) { return false; } } else { if (x < 19) { if (temp[x + 1][y] == GRAY) { checkTemp(temp, board, x + 1, y); } } if (x >= 0) { if (temp[x - 1][y] == GRAY) { checkTemp(temp, board, x - 1, y); } } if (y < 19) { if (temp[x][y + 1] == GRAY) { checkTemp(temp, board, x, y + 1); } } if (y >= 0) { if (temp[x][y - 1] == GRAY) { checkTemp(temp, board, x, y - 1); } } } return true; } private static void floodFill(int x, int y, Color player, Color[][] board, Color[][] temp) { if (board[x][y] != player) { return; } else { temp[x][y] = GRAY; System.out.println("x = " + x + " y = " + y); if (x < 19) { floodFill(x + 1, y, player, board, temp); } if (x >= 0) { floodFill(x - 1, y, player, board, temp); } if (y < 19) { floodFill(x, y + 1, player, board, temp); } if (y >= 0) { floodFill(x, y - 1, player, board, temp); } } } }

    Read the article

  • Play PlayStation Games on a Rooted Nook Simple Touch

    - by Jason Fitzpatrick
    Just when you feel like you’ve seen it all, some guy comes along and shows you how he can play original PlayStation games on his ebook reader. Check out the video to see the surprisingly full-speed–albeit black and white–graphics in action. The secret sauce in Sean’s cool setup? He’s rooted the device and installed Free PlayStation Emulator (FPSE) on it–along with the NoRefresh hack–to enjoy touch-screen controls and PS emulation. The whole thing is shockingly smooth; once you get past the choppy intro videos, the games run at full speed. [via Hack A Day] HTG Explains: Why Do Hard Drives Show the Wrong Capacity in Windows? Java is Insecure and Awful, It’s Time to Disable It, and Here’s How What Are the Windows A: and B: Drives Used For?

    Read the article

  • Second display running off laptop VGA not correctly positioned (offset left and up)

    - by Filthy Pazuzu
    I have black bars on the right and bottom of my display! I'm running my laptop's VGA output to an recognized as a It is 20", but the assumed 3" difference does not account for the incorrect position. Everything displays fine. It runs high-res video beautifully. But it's 3/4" offset left and an unreasonably annoying 1/4" offset up. I've tried going through the display's annoying & useless menu, but it doesn't have any way to adjust the position. I'm certainly no linux newbie, but on this Ubuntu (Pangolin, BTW) I can't figure out how to make simple positional display changes on Ubuntu. It's not only frustrating, it's a bit humiliating! So. Does anyone know of an app that will allow me to make basic display position alterations? ("App" - annoyingly trendy, but a useful word - no matter how grating.) Thanks, & Cheers, Paz

    Read the article

  • Can Ubuntu create a semi-transparent subtitle player for accessibility?

    - by Tyler
    I've asked this in Reddit.com/r/Ubuntu in here. I've tried to get the Subtitle Player linked here to work and it have failed on Wine. So I'm curious if Ubuntu community would be willing to try and build a simple transparent subtitle player for better accessibility on Flash Player, Netflix, or even in movie theaters? Currently, I'm watching movies/videos with an Android Tablet that runs on a blank black video for 3 hours with a subtitle overlay on it so I can enjoy movie and so forth, but it requires a bit of effort and it definitely isn't for everyone. (People will have to look at the subtitle playing tablet and the movie back and forth at 60 degrees angle, while a transparent subtitle player would reduce it to 5 degrees angle to watch the movie.) Please and thank you.

    Read the article

  • Why does editor color scheme preference seem to vary by language?

    - by Carl Manaster
    I've spent most of my career in C++ and Java, and like most of my peers I have the editor configured to display dark (black with dark-colored syntax highlighting) on a white background. I spent a day this week with Rubyists, and they all seem to favor light text on a dark background. I've observed this before. Why is it? What cultural differences between the Java and Ruby communities explain it? Or is it as simple as these are the default settings for our respective editors?

    Read the article

  • assigning values to shader parameters in the XNA content pipeline

    - by Nick
    I have tried creating a simple content processor that assigns the custom effect I created to models instead of the default BasicEffect. [ContentProcessor(DisplayName = "Shadow Mapping Model")] public class ShadowMappingModelProcessor : ModelProcessor { protected override MaterialContent ConvertMaterial(MaterialContent material, ContentProcessorContext context) { EffectMaterialContent shadowMappingMaterial = new EffectMaterialContent(); shadowMappingMaterial.Effect = new ExternalReference<EffectContent>("Effects/MultipassShadowMapping.fx"); return context.Convert<MaterialContent, MaterialContent>(shadowMappingMaterial, typeof(MaterialProcessor).Name); } } This works, but when I go to draw a model in a game, the effect has no material properties assigned. How would I go about assigning, say, my DiffuseColor or SpecularColor shader parameter to white or (better) can I assign it to some value specified by the artist in the model? (I think this may have something to do with the OpaqueDataDictionary but I am confused on how to use it--the content pipeline has always been a black box to me.)

    Read the article

  • Ubuntu 10.10 Netbook Remix on Asus Eee PC 701 4G - boot process hangs up

    - by Andrew
    I've got an old Eee PC 701 4G with the following specifications: 512 MB RAM 4GB SSD drive SM223AC 8GB SD card extension Screen resolution: 800 x 480 BIOS Revision 1101 (05/16/2008) EC Firmware version: EPC-079 Windows XP SP3 works fine on it, but I decided to switch my OS to Ubuntu. I have downloaded an Ubuntu 10.10 Netbook Remix ISO and wrote it to my FAT32 SD card using Universal-USB-Installer-1.8.3.3, as described on ubuntu.com During standard load from the SD card the boot process hangs up with black screen. If I'll press F6 while preloading Ubuntu, it sucessfully displays the boot menu, selecting language and showing 2 main commands: "Run ubuntu from USB drive" and "Insall Ubuntu". Selecting either of these commands leading to the same result - after some background work the main loading indicator is displayed ("Ubuntu" text with dotted progress bar under it), and it's progressing forever without any effect. Is Ubuntu 10.10 compatible with my Eee PC at all? How to boot it correctly?

    Read the article

  • Find odd and even rows using $.inArray() function when using jQuery Templates

    - by hajan
    In the past period I made series of blogs on ‘jQuery Templates in ASP.NET’ topic. In one of these blogs dealing with jQuery Templates supported tags, I’ve got a question how to create alternating row background. When rendering the template, there is no direct access to the item index. One way is if there is an incremental index in the JSON string, we can use it to solve this. If there is not, then one of the ways to do this is by using the jQuery’s $.inArray() function. - $.inArray(value, array) – similar to JavaScript indexOf() Here is an complete example how to use this in context of jQuery Templates: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head runat="server">     <style type="text/css">         #myList { cursor:pointer; }                  .speakerOdd { background-color:Gray; color:White;}         .speaker { background-color:#443344; color:White;}                  .speaker:hover { background-color:White; color:Black;}         .speakerOdd:hover { background-color:White; color:Black;}     </style>     <title>jQuery ASP.NET</title>     <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.4.4.min.js" type="text/javascript"></script>     <script src="http://ajax.aspnetcdn.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js" type="text/javascript"></script>     <script language="javascript" type="text/javascript">         var speakers = [             { Name: "Hajan1" },             { Name: "Hajan2" },             { Name: "Hajan3" },             { Name: "Hajan4" },             { Name: "Hajan5" }         ];         $(function () {             $("#myTemplate").tmpl(speakers).appendTo("#myList");         });         function oddOrEven() {             return ($.inArray(this.data, speakers) % 2) ? "speaker" : "speakerOdd";         }     </script>     <script id="myTemplate" type="text/x-jquery-tmpl">         <tr class="${oddOrEven()}">             <td> ${Name}</td>         </tr>     </script> </head> <body>     <table id="myList"></table> </body> </html> So, I have defined stylesheet classes speakerOdd and speaker as well as corresponding :hover styles. Then, you have speakers JSON string containing five items. And what is most important in our case is the oddOrEven function where $.inArray(value, data) is implemented. function oddOrEven() {     return ($.inArray(this.data, speakers) % 2) ? "speaker" : "speakerOdd"; } Remark: The $.inArray() method is similar to JavaScript's native .indexOf() method in that it returns -1 when it doesn't find a match. If the first element within the array matches value, $.inArray() returns 0. From http://api.jquery.com/jQuery.inArray/ So, now we can call oddOrEven function from inside our jQuery Template in the following way: <script id="myTemplate" type="text/x-jquery-tmpl">     <tr class="${oddOrEven()}">         <td> ${Name}</td>     </tr> </script> And the result is I hope you like it. Regards, Hajan

    Read the article

  • FloodFill Algorithm for Game of Go

    - by Jackson Borghi
    I'm having a hell of a time trying to figure out how to make captured stones disappear. I've read everywhere that I should use the FloodFill algorithm, but I havent had any luck with that so far. Any help would be amazing! Here is my code: package Go; import static java.lang.Math.; import static stdlib.StdDraw.; import java.awt.Color; public class Go2 { public static Color opposite(Color player) { if (player == WHITE) { return BLACK; } return WHITE; } public static void drawGame(Color[][] board) { Color[][][] unit = new Color[400][19][19]; for (int h = 0; h < 400; h++) { for (int x = 0; x < 19; x++) { for (int y = 0; y < 19; y++) { unit[h][x][y] = YELLOW; } } } setXscale(0, 19); setYscale(0, 19); clear(YELLOW); setPenColor(BLACK); line(0, 0, 0, 19); line(19, 19, 19, 0); line(0, 19, 19, 19); line(0, 0, 19, 0); for (double i = 0; i < 19; i++) { line(0.0, i, 19, i); line(i, 0.0, i, 19); } for (int x = 0; x < 19; x++) { for (int y = 0; y < 19; y++) { if (board[x][y] != YELLOW) { setPenColor(board[x][y]); filledCircle(x, y, 0.47); setPenColor(GRAY); circle(x, y, 0.47); } } } int h = 0; } public static void main(String[] args) { int px; int py; Color[][] temp = new Color[19][19]; Color[][] board = new Color[19][19]; Color player = WHITE; for (int i = 0; i < 19; i++) { for (int h = 0; h < 19; h++) { board[i][h] = YELLOW; temp[i][h] = YELLOW; } } while (true) { drawGame(board); while (!mousePressed()) { } px = (int) round(mouseX()); py = (int) round(mouseY()); board[px][py] = player; while (mousePressed()) { } floodFill(px, py, player, board, temp); System.out.print("XXXXX = "+ temp[px][py]); if (checkTemp(temp, board, px, py)) { for (int x = 0; x < 19; x++) { for (int y = 0; y < 19; y++) { if (temp[x][y] == GRAY) { board[x][y] = YELLOW; } } } } player = opposite(player); } } private static boolean checkTemp(Color[][] temp, Color[][] board, int x, int y) { if (x < 19 && x > -1 && y < 19 && y > -1) { if (temp[x + 1][y] == YELLOW || temp[x - 1][y] == YELLOW || temp[x][y - 1] == YELLOW || temp[x][y + 1] == YELLOW) { return false; } } if (x == 18) { if (temp[x - 1][y] == YELLOW || temp[x][y - 1] == YELLOW || temp[x][y + 1] == YELLOW) { return false; } } if (y == 18) { if (temp[x + 1][y] == YELLOW || temp[x - 1][y] == YELLOW || temp[x][y - 1] == YELLOW) { return false; } } if (y == 0) { if (temp[x + 1][y] == YELLOW || temp[x - 1][y] == YELLOW || temp[x][y + 1] == YELLOW) { return false; } } if (x == 0) { if (temp[x + 1][y] == YELLOW || temp[x][y - 1] == YELLOW || temp[x][y + 1] == YELLOW) { return false; } } else { if (x < 19) { if (temp[x + 1][y] == GRAY) { checkTemp(temp, board, x + 1, y); } } if (x >= 0) { if (temp[x - 1][y] == GRAY) { checkTemp(temp, board, x - 1, y); } } if (y < 19) { if (temp[x][y + 1] == GRAY) { checkTemp(temp, board, x, y + 1); } } if (y >= 0) { if (temp[x][y - 1] == GRAY) { checkTemp(temp, board, x, y - 1); } } } return true; } private static void floodFill(int x, int y, Color player, Color[][] board, Color[][] temp) { if (board[x][y] != player) { return; } else { temp[x][y] = GRAY; System.out.println("x = " + x + " y = " + y); if (x < 19) { floodFill(x + 1, y, player, board, temp); } if (x >= 0) { floodFill(x - 1, y, player, board, temp); } if (y < 19) { floodFill(x, y + 1, player, board, temp); } if (y >= 0) { floodFill(x, y - 1, player, board, temp); } } } }

    Read the article

  • Ask the Readers: Favorite Deal App?

    - by Jason Fitzpatrick
    Black Friday is mere days away and the holiday shopping season is upon us. This week we want to hear about your favorite deals apps—how do you find the best deals on the go? The parameters for this week’s Ask the Readers question are pretty straight forward: we want to hear about your favorite deal finding/deal comparison smart phone app. Whether it’s for Android, iOS, or a web site with a very cleanly formatted mobile interface, we want to hear about how you score serious deals out in the field. How do you know if the deal you see in the store is the best deal? Sound off in the comments with your favorite deal app and then check in on Friday for the What You Said roundup. How to See What Web Sites Your Computer is Secretly Connecting To HTG Explains: When Do You Need to Update Your Drivers? How to Make the Kindle Fire Silk Browser *Actually* Fast!

    Read the article

  • Lost transparency in SDL surfaces drawn manually

    - by Christian Ivicevic
    I want to create SDL_Surface objects for each layer of my 2d tile-based map so that I have to render only one surface per layer rather than too many tiles. With normal tiles which do not have transparent areas this works well, however I am not able to create a SDL_Surface with transparent pixels everywhere to be able to draw some tiles on specific parts which should be visible (I do NOT want the whole surface to appear with a specific opacity - I want to create overlaying tiles where one can look through). Currently I am creating my layers like this to draw with SDL_BlitSurface on them: SDL_Surface* layer = SDL_CreateRGBSurface( SDL_HWSURFACE | SDL_SRCALPHA, layerWidth, layerHeight, 32, 0, 0, 0, 0); If you have a look at this screenshot I have provided here you can see that the bottom layer with no transparent parts gets rendered correctly. However the overlay with the tree tile (which is transparent in the top left corner) is drawn own its own surface which is black and not transparent as expected. The expected result (concerning the transparency) can be seen here Can anyone explain me how to handle surfaces which are actually transparent rather than drawing all my overlay tiles separately?

    Read the article

  • How to Save Tweet Links for Later Reading from Your Desktop and Phone

    - by Zainul Franciscus
    Have you come across a lot of interesting links from Twitter, but you don’t have the time to read all of them? Today we’ll show you how to read these links later from your desktop and phone. Organizing links from Twitter can be a troublesome, but these tools will reduce the effort greatly Latest Features How-To Geek ETC The How-To Geek Valentine’s Day Gift Guide Inspire Geek Love with These Hilarious Geek Valentines RGB? CMYK? Alpha? What Are Image Channels and What Do They Mean? How to Recover that Photo, Picture or File You Deleted Accidentally How To Colorize Black and White Vintage Photographs in Photoshop How To Get SSH Command-Line Access to Windows 7 Using Cygwin View the Cars of Tomorrow Through the Eyes of the Past [Historical Video] Add Romance to Your Desktop with These Two Valentine’s Day Themes for Windows 7 Gmail’s Priority Inbox Now Available for Mobile Web Browsers Touchpad Blocker Locks Down Your Touchpad While Typing Arrival of the Viking Fleet Wallpaper A History of Vintage Transformers [Infographic]

    Read the article

  • Ubuntu 12.04 doesn't start after installing with LiveUSB

    - by Kevin Arutyunyan
    I need help! I installed Ubuntu with my LiveUSB, and it said restart to use your system, so I restarted. Now I am just stuck in a completely black screen with a blinking _ I'm already waiting 10 minutes for something to happen, but there's nothing. I don't know what the problem could be, but maybe the message I got during installation that said 'APT couldn't be configured, so no additional apps will be installed' was the problem? I'm still waiting.. Fast answers please :) thanks.

    Read the article

  • LiveCD does not work on my desktop

    - by Boris
    I've installed Oneiric on my laptop without any issue using the LiveCD downloaded here (from the French Ubuntu community server). But on my desktop, weird things happen: During the 1st try booting with the LiveCD on my desktop, my 2 year old child just hit the keyboard, and after several error messages the desktop loaded and I've been able to test Oneiric. But I wanted to redo a boot before installing Oneiric to avoid mistakes. So during the 2nd time I tried to boot with the LiveCD, I couldn't access to the point where I can choose to test or install. Before trying a 3rd time, I've "cleaned the system" from System Parameter System. But after that I'm still not able to access to the point where I can choose to test or install. Now it stops all the time on a black screen. I do not understand why several boot attempts with same CD have several results. So I wonder if the state of my current installation 11.04 can affect re-booting with my CD 11.10 ?

    Read the article

< Previous Page | 61 62 63 64 65 66 67 68 69 70 71 72  | Next Page >