Search Results

Search found 6934 results on 278 pages for 'zero fill'.

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

  • MSCRM Tax default to Zero

    - by MarkPearl
    I have been playing around with MSCRM4 lately. It has been interesting going. I had a problem getting the tax to reflect correctly, it was defaulting at zero. Eventually I found a solution after scouring the web for a while... see steps below…                 Add the following code to OnSave and OnLoad events of quotedetails form with (crmForm.all) { try { var dTax = (baseamount.DataValue - manualdiscountamount.DataValue) *15.5 /100;         tax.DataValue = dTax;         extendedamount.DataValue = baseamount.DataValue - manualdiscountamount.DataValue + tax.DataValue ; } catch(e) {         alert(e.message); } } // with Don’t forget to publish your changes once you are done and to test.

    Read the article

  • Silabs cp2102 driver problem

    - by Zxy
    I downloaded appropriate driver from its own site, unzipped it and then tried to install it. But: root@ghostrider:/home/zero/Downloads# tar xvf cp210x-3.1.0.tar.gz cp210x-3.1.0/ cp210x-3.1.0/COPYING cp210x-3.1.0/cp210x/ cp210x-3.1.0/cp210x-3.1.0.spec cp210x-3.1.0/cp210x/.rpmmacros cp210x-3.1.0/cp210x/configure cp210x-3.1.0/cp210x/cp210x.c cp210x-3.1.0/cp210x/cp210x.h cp210x-3.1.0/cp210x/cp210xuniversal.c cp210x-3.1.0/cp210x/cp210xuniversal.h cp210x-3.1.0/cp210x/installmod cp210x-3.1.0/cp210x/Makefile24 cp210x-3.1.0/cp210x/Makefile26 cp210x-3.1.0/cp210x/rpmmacros24 cp210x-3.1.0/cp210x/rpmmacros26 cp210x-3.1.0/cp210x/Rules.make cp210x-3.1.0/INSTALL cp210x-3.1.0/makerpm cp210x-3.1.0/PACKAGE-LIST cp210x-3.1.0/README cp210x-3.1.0/RELEASE-NOTES cp210x-3.1.0/REPORTING-BUGS cp210x-3.1.0/rpm/ cp210x-3.1.0/rpm/brp-java-repack-jars cp210x-3.1.0/rpm/brp-python-bytecompile cp210x-3.1.0/rpm/check-rpaths cp210x-3.1.0/rpm/check-rpaths-worker root@ghostrider:/home/zero/Downloads# cd cp210x-3.1.0 root@ghostrider:/home/zero/Downloads/cp210x-3.1.0# ls COPYING cp210x-3.1.0.spec makerpm README REPORTING-BUGS cp210x INSTALL PACKAGE-LIST RELEASE-NOTES rpm root@ghostrider:/home/zero/Downloads/cp210x-3.1.0# run ./makerpm No command 'run' found, did you mean: Command 'zrun' from package 'moreutils' (universe) Command 'runq' from package 'exim4-daemon-heavy' (main) Command 'runq' from package 'exim4-daemon-light' (main) Command 'runq' from package 'sendmail-bin' (universe) Command 'grun' from package 'grun' (universe) Command 'qrun' from package 'torque-client' (universe) Command 'qrun' from package 'torque-client-x11' (universe) Command 'lrun' from package 'lustre-utils' (universe) Command 'rn' from package 'trn' (multiverse) Command 'rn' from package 'trn4' (multiverse) Command 'rup' from package 'rstat-client' (universe) Command 'srun' from package 'slurm-llnl' (universe) run: command not found root@ghostrider:/home/zero/Downloads/cp210x-3.1.0# sudo ./makerpm + uname -r + kernel_release=3.2.0-25-generic-pae + pwd + current_dir=/home/zero/Downloads/cp210x-3.1.0 + export current_dir + uname -r + KVER=3.2.0-25-generic-pae + echo 3.2.0-25-generic-pae + awk -F . -- { print $1 } + KVER1=3 + echo 3.2.0-25-generic-pae + awk -F . -- { print $2 } + KVER2=2 + sed -e s/3\.2\.//g + echo 3.2.0-25-generic-pae + KVER3=0-25-generic-pae + [ -f /root/.rpmmacros ] + echo 2 2 + [ 2 == 4 ] ./makerpm: 25: [: 2: unexpected operator + echo 0-25-generic-pae 0-25-generic-pae + [ 0-25-generic-pae -gt 15 ] ./makerpm: 29: [: Illegal number: 0-25-generic-pae + cp /home/zero/Downloads/cp210x-3.1.0/cp210x/rpmmacros24 /root/.rpmmacros + d=/var/tmp/silabs + [ ! -d /var/tmp/silabs ] + mkdir /var/tmp/silabs + cd /var/tmp/silabs + r=/var/tmp/silabs/rpmbuild + o=cp210x-3.1.0 + s=/var/tmp/silabs/rpmbuild/SOURCES + spec=cp210x-3.1.0.spec + rm -rf /var/tmp/silabs/rpmbuild + mkdir rpmbuild + mkdir rpmbuild/SOURCES + mkdir rpmbuild/SRPMS + mkdir rpmbuild/SPECS + mkdir rpmbuild/BUILD + mkdir rpmbuild/RPMS + cd /var/tmp/silabs/rpmbuild/SOURCES + rm -rf cp210x-3.1.0 + mkdir cp210x-3.1.0 + cp -r /home/zero/Downloads/cp210x-3.1.0/cp210x/Makefile24 /home/zero/Downloads/cp210x-3.1.0/cp210x/Makefile26 /home/zero/Downloads/cp210x- 3.1.0/cp210x/Rules.make /home/zero/Downloads/cp210x-3.1.0/cp210x/configure /home/zero/Downloads/cp210x-3.1.0/cp210x/cp210x.c /home/zero/Downloads/cp210x- 3.1.0/cp210x/cp210x.h /home/zero/Downloads/cp210x-3.1.0/cp210x/cp210xuniversal.c /home/zero/Downloads/cp210x-3.1.0/cp210x/cp210xuniversal.h /home/zero/Downloads/cp210x- 3.1.0/cp210x/installmod /home/zero/Downloads/cp210x-3.1.0/cp210x/rpmmacros24 /home/zero/Downloads/cp210x-3.1.0/cp210x/rpmmacros26 cp210x-3.1.0 + echo 2 2 + [ 2 == 4 ] ./makerpm: 64: [: 2: unexpected operator + echo 0-25-generic-pae 0-25-generic-pae + [ 0-25-generic-pae -gt 15 ] ./makerpm: 68: [: Illegal number: 0-25-generic-pae + cp /home/zero/Downloads/cp210x-3.1.0/cp210x/.rpmmacros24 cp210x-3.1.0/.rpmmacros cp: cannot stat `/home/zero/Downloads/cp210x-3.1.0/cp210x/.rpmmacros24': No such file or directory + MyCopy=0 + rm -f cp210x-3.1.0.tar + rm -f cp210x-3.1.0.tar.gz + tar -cf cp210x-3.1.0.tar cp210x-3.1.0 + gzip cp210x-3.1.0.tar + cp /home/zero/Downloads/cp210x-3.1.0/cp210x-3.1.0.spec /var/tmp/silabs/rpmbuild/SPECS + rpmbuild -ba /var/tmp/silabs/rpmbuild/SPECS/cp210x-3.1.0.spec ./makerpm: 121: ./makerpm: rpmbuild: not found + [ -f /root/.rpmmacros.cp210x ] How may I solve my problem? Thanks

    Read the article

  • Non-zero exit status for clean exit

    - by trinithis
    Is it acceptable to return a non-zero exit code if the program in question ran properly? For example, say I have a simple program that (only) does the following: Program takes N arguments. It returns an exit code of min(N, 255). Note that any N is valid for the program. A more realistic program might return different codes for successfully ran programs that signify different things. Should these programs instead write this information to a stream instead, such as to stdout?

    Read the article

  • Flash Player et Acrobat Reader : vulnérabilité critique zero-day confirmée par Adobe, elle serait déjà exploitée

    Flash Player et Acrobat Reader : vulnérabilité critique zero-day confirmée Des pirates l'auraient déjà exploitée Adobe tire la sonnette d'alarme. Une faille critique non corrigée dans son lecteur Flash Player serait déjà exploitée par des pirates. Selon un avis de sécurité qui vient d'être publié par l'éditeur, la vulnérabilité pourrait être exploitée par des pirates distants pour provoquer un crash de l'application ou, plus préoccupant, pour prendre le contrôle du système affecté en intégrant des fichiers Flash infectés dans un document Microsoft Excel envoyé en pièce jointe. La vulnérabilité aurait déjà été utilisée pour des attaques ciblées. La vulnérabilité touche égale...

    Read the article

  • Mounting NFS directory causes creating Zero byte files

    - by Alaa
    I have two Servers, Server X (IP 192.168.1.1) and Server Y (IP 192.168.1.2), both of them are ubuntu 9.1 i have created varnish load balancer on them for my drupal website (pressflow 6.22) I have mounted a directory of imagecache from server X to Y as below @X:/etc/exports == /var/www/proj/htdocs/sites/default/files/images 192.168.1.2(rw,async,no_subtree_check) @Y:/etc/fstab == 192.168.1.1:/var/www/proj/htdocs/sites/default/files/images var/www/proj/htdocs/sites/default/files/images nfs defaults 0 0 also i made this on server X X:/var/www/proj/htdocs/sites/default/files$ chmod -R 777 images i tried to touch, rm, vim, and cat files in images directory that has been mounted on Y and everything went fine. now, ALWAYS when server Y's imagecache tries to create an image in images directory, the image is created with ZERO byte file size. anyone face the same before? any idea of how to fix this problem or what might cause it? Thanks for your help

    Read the article

  • How to be a zero-bug programmer?

    - by Elaine
    My boss ever told me that as a good programmer, who should be able to ensure the code he/she changed must be reliable, correct, thoroughly self-verified, who should completely understand what all the results and impacts that he/she did or revised will cause. I did try my best to be as this kind of programmer, test again and again. But.. bugs are still there. How could I be a zero-bug programmer? know every char of my code will cause and effect?

    Read the article

  • Make Your Own Windows 8 Start Button with Zero Memory Usage

    - by The Geek
    After using Windows 8 for a while, I’ve come to the conclusion that removing the Start button from the Taskbar was a huge mistake. Here’s how to make your own “Start” button that brings up the Metro Start screen—but doesn’t waste any memory at all. What we’ll be doing is pretty simple—create a script that simulates pressing the Windows key button, make it into an executable, assign an icon, and pin it to the taskbar so that it sorta looks like the Start button, and works the same way. Since nothing is running, no RAM is wasted. Make Your Own Windows 8 Start Button with Zero Memory Usage Reader Request: How To Repair Blurry Photos HTG Explains: What Can You Find in an Email Header?

    Read the article

  • Free serif font with clearly distinguishable 0 (zero) character

    - by l0b0
    I'm using gLabels to create some small pieces of paper to give away to people - Just two lines of about 15-20 characters each. One of the important parts of the design is that there are no "o" ("oh") characters, but there are "0" ("zero") characters in an all-lowercase URL. Therefore I need a non-monospaced (and very legible in print) font where "0" cannot be confused with "o" even without reference. The closest thing I've found so far is Andale Mono and Inconsolata , but they are both monospace, and as such not very easy to read in print. Alternatively, to find a font myself, is there some way to preview all fonts in the Ubuntu repositories without installing them?

    Read the article

  • How to make a div to fill a remaining horizontal space (a very simple but annoying problem for CSS e

    - by janoChen
    I have 2 divs: one in the left side and one in the right side of my page. The one in the left side has fixed width and I want the one of the right side to fill the remaining space. The one on the right side is the navigation and I want it to to fill the remaining space on it right side: My CSS: #search { width: 160px; height: 25px; float: left; background-color: #FFF; } #navigation { width: 780 float: left; /*background-color: url('../images/transparent.png') ;*/ background-color: #A53030; } My Html: <div id="search"> </div> <?php include("navigation.html"); ?> <div id="left-column"> Thank in advance!

    Read the article

  • Cuda program results are always zero in HW, correct in EMU??

    - by Orion Nebula
    Hi all! I am having a weird problem .. I have written a CUDA code which executes correctly in emulation and all results show up.. however, when executed on hardware "G210" .. the results in the result memory are always 0 I am passing two vectors to the kernel, one with random variables the other is initialized to zero, the code copies the first vector to shared memory, does some swapping and other operations and then writes back the results on the second vector (the one with the initial 0's) I am using double precision, the -arch sm13 flag is used, all memory allocation also use sizeof(double) .. I have checked if the kernel is invoked, it does .. so no problems here .. the cudaMemCpy has no problems .. what could be the problem .. :( why would it work in emulation but not on HW I am quite confused .. any ideas?

    Read the article

  • gl_PointCoord always zero

    - by Jonathan
    I am trying to draw point sprites in OpenGL with a shader but gl_PointCoord is always zero. Here is my code Setup: //Shader creation..(includes glBindAttribLocation(program, ATTRIB_P, "p");) glEnableVertexAttribArray(ATTRIB_P); In the rendering loop: glUseProgram(shader_particles); float vertices[]={0.0f,0.0f,0.0f}; glEnable(GL_TEXTURE_2D); glEnable(GL_POINT_SPRITE); glEnable(GL_VERTEX_PROGRAM_POINT_SIZE); //glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE);(tried with this on/off, doesn't work) glVertexAttribPointer(ATTRIB_P, 3, GL_FLOAT, GL_FALSE, 0, vertices); glDrawArrays(GL_POINTS, 0, 1); Vertex Shader: attribute highp vec4 p; void main() { gl_PointSize = 40.0f; gl_Position = p; } Fragment Shader: void main() { gl_FragColor = vec4(gl_PointCoord.st, 0, 1);//if the coords range from 0-1, this should draw a square with black,red,green,yellow corners } But this only draws a black square with a size of 40. What am I doing wrong? Edit: Point sprites work when i use the fixed function, but I need to use shaders because in the end the code will be for opengl es 2.0 glUseProgram(0); glEnable(GL_TEXTURE_2D); glEnable(GL_POINT_SPRITE); glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE); glPointSize(40); glBegin(GL_POINTS); glVertex3f(0.0f,0.0f,0.0f); glEnd(); Is anyone able to get point sprites working with shader? If so, please share some code.

    Read the article

  • How to zero out a drive?

    - by Mohd Arafat Hossain
    I'm currently running Ubuntu 12.04 and want to completely format my laptop so I can install Windows 7 (replace Ubuntu). When I put in my bootable USB with the OS it just shows a black screen with a white blinking cursor on the top left corner. I wait for hours (to be specific 5 whole hours) waiting for something to happen but I get nothing, so I pull out the USB and my Ubuntu 12.04 loads up. Repeated this several times with putting different boot priority options on top-est that relate to USB but the results are same. I go and visit some sites on the net like this http://www.techspot.com/community/topics/cant-replace-ubuntu-with-windows.175716/ that say I have to zero out my hard drive. My question is how? Note: Erasing out all my data is no problem cause I have nothing important to backup. If I have to lose my primary OS (Ubuntu 12.04) in the process I am ready to as my aim is just to install Windows 7 successfully. Please don't answer that there is something wrong with my USB or my USB reader/port/hardware or the content inside the USB cause they all works fine on my brothers PC as it boots up flawlessly.

    Read the article

  • Eliminating zero-length files

    - by RhZ
    I have been having multiple crashes recently. 4-5 last night within a few hours. I posted about it before, and got an answer but not sure how to proceed. The messages in my logs right before the crash are multiple complaints about valid eCryptfs headers. But the chron might not be related, I don't think I saw that in previous crashes: xxx-desktop kernel: [ 1112.274474] Valid eCryptfs headers not found in file header region or xattr region, inode 32376924 xxx-desktop CRON[4212]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly) So I was sent to an answer providing this script: for i in find $(mount | grep " on $HOME type ecryptfs" | awk '{print $1}') -size 0c; do if ! fuser -v $i; then rm -f $i fi done I did find some zero byte files, not in the exactly right place (a folder called .private as I remember), but I need to fix this, its too bad right now. So I need to delete any of them that are not in use. I am a little too clueless, can someone walk me through executing this script? I don't know how.

    Read the article

  • Achieving Zero Downtime Deployment

    - by MattW
    I am trying to achieve zero downtime deployments so I can deploy less during off hours and more during "slower" hours - or anytime, in theory. My current setup, somewhat simplified: Web Server A (.NET App) Web Server B (.NET App) Database Server (SQL Server) My current deployment process: "Stop" the sites on both Web Server A and B Upgrade the database schema for the version of the app being deployed Update Web Server A Update Web Server B Bring everything back online Current Problem This leads to a small amount of downtime each month - about 30 mins. I do this during off hours, so it isn't a huge problem - but it is something I'd like to get away from. Also - there is no way to really go 'back'. I don't generally make rollback DB scripts - only upgrade scripts. Leveraging The Load Balancer I'd love to be able to upgrade one Web Server at a time. Take Web Server A out of the load balancer, upgrade it, put it back online, then repeat for Web Server B. The problem is the database. Each version of my software will need to execute against a different version of the database - so I am sort of "stuck". Possible Solution A current solution I am considering is adopting the following rules: Never delete a database table. Never delete a database column. Never rename a database column. Never reorder a column. Every stored procedure must be versioned. Meaning - 'spFindAllThings' will become 'spFindAllThings_2' when it is edited. Then it becomes 'spFindAllThings_3' when edited again. Same rule applies to views. While, this seems a bit extreme - I think it solves the problem. Each version of the application will be hitting the DB in a non breaking way. The code expects certain results from the views/stored procedures - and this keeps that 'contract' valid. The problem is - it just seeps sloppy. I know I can clean up old stored procedures after the app is deployed for awhile, but it just feels dirty. Also - it depends on all of the developers following these rule, which will mostly happen, but I imagine someone will make a mistake. Finally - My Question Is this sloppy or hacky? Is anybody else doing it this way? How are other people solving this problem?

    Read the article

  • flood fill algorithm

    - by user335593
    i want to implement the flood fill algorthm...so that when i get the x and y co-od of a point...it should start flooding from that point and fill till it finds a boundary but it is not filling the entire region...say a pentagon this is the code i am using void setpixel(struct fill fillcolor,int x,int y) { glColor3f(fillcolor.r,fillcolor.g,fillcolor.b); glBegin(GL_POINTS); glVertex2i(x,y); glEnd(); glFlush(); } struct fill getpixcol(int x,int y) { struct fill gotpixel; glReadPixels(x,y,1,1,GL_RGB,GL_UNSIGNED_BYTE,pick_col); gotpixel.r =(float) pick_col[0]/255.0; gotpixel.g =(float) pick_col[1]/255.0; gotpixel.b =(float) pick_col[2]/255.0; return(gotpixel); } void floodFill(int x, int y,struct fill fillcolor,struct fill boundarycolor) { struct fill tmp; // if ((x < 0) || (x >= 500)) return; // if ((y < 0) || (y >= 500)) return; tmp=getpixcol(x,y); while (tmp.r!=boundarycolor.r && tmp.g!=boundarycolor.g && tmp.b!=boundarycolor.b) { setpixel(fillcolor,x,y); setpixel(fillcolor,x+1,y); setpixel(fillcolor,x,y+1); setpixel(fillcolor,x,y-1); setpixel(fillcolor,x-1,y); floodFill(x-1,y+1,fillcolor,boundarycolor); floodFill(x-1,y,fillcolor,boundarycolor); floodFill(x-1,y-1,fillcolor,boundarycolor); floodFill(x,y+1,fillcolor,boundarycolor); floodFill(x,y-1,fillcolor,boundarycolor); floodFill(x+1,y+1,fillcolor,boundarycolor); floodFill(x+1,y,fillcolor,boundarycolor); floodFill(x+1,y-1,fillcolor,boundarycolor); } }

    Read the article

  • Fill a Flash Drive with Portable Software using Lupo PenSuite

    - by Asian Angel
    A flash drive full of portable software is helpful to have along wherever you go. The Lupo PenSuite lets you choose from three different versions to get the best fit for your everyday needs. Note: If running the full version you will need a 512 MB USB flash drive or larger. Using Lupo PenSuite The one window to watch for during the setup process is where you have the opportunity to add a specific language pack if needed. Outside of that all that you need to do is sit back and wait for the suite to be extracted. Note: Extraction times will vary based on version and extraction location. Here we browsed to our flash drive to extract it to… Once the setup process is complete locate and double click the Lupo_PenSuite.exe file. This one time window will present you the opportunity to start using the suite immediately, or go directly into the options. When the suite is active you will have a new system tray icon that operates as a start menu button. At the bottom you can monitor the remaining room on your flash drive, and use the close button to exit the suite (may display as a power button based on menu theme). A quick look at the set up inside the suite. There is a pre-configured area for organizing and storing your personal files. Prefer a classic style menu? Just select for it in the options (various tab) and enjoy a smaller streamlined look. Note: You can also change the theme for the regular menu and add a user pic. The suite provides access to your portable software and online sites. You get to enjoy the best of both as shown in the following examples. Websites will open using the suite’s portable Firefox install. VLC is ready to play your downloaded videos. The suite also has some very nice photo editing programs added in. Installing Additional Apps If one of your favorite programs is not included in the suite version, it only takes a few minutes to add it in. Go to the Additional Apps webpage, download the app(s), and extract them onto your hard-drive. Note: Link for additional apps webpage provided below. Add the extracted app(s) to the MyApps folder in the suite’s folder hierarchy. Click on ASuite in the suite’s start menu. Drag and drop the portable app’s exe file into the MyApps section in the ASuite window. Your new software’s shortcut should display as shown here. Close this window when finished. Checking the suite’s start menu will show your new software ready to be used. Conclusion If you need a good portable software collection to carry with you on a flash drive then Lupo PenSuite is definitely worth taking a look at. We tested Lupo PenSuite on XP, Vista, and Windows 7 and it works great on all three. Another popular choice is PortableApps and you can check out our Review of that too they are essentially the same thing, each is just packaged differently. Links Download Lupo PenSuite (Full, Lite, & Zero versions) *Download links approximately one-third down the page. Download Additional Apps for Lupo PenSuite Download Additional Skins for Lupo PenSuite Start Menu View Video Tutorials *Has tutorial for easy updating of entire suite. Similar Articles Productive Geek Tips Install and Run Applications from Your iPod, Flash Drive or Mp3 PlayerRebit Backup Software [Review]BitLocker To Go Encrypts Portable Flash Drives in Windows 7Create a Bootable Ubuntu USB Flash Drive the Easy WaySpeed up Your Windows Vista Computer with ReadyBoost TouchFreeze Alternative in AutoHotkey The Icy Undertow Desktop Windows Home Server – Backup to LAN The Clear & Clean Desktop Use This Bookmarklet to Easily Get Albums Use AutoHotkey to Assign a Hotkey to a Specific Window Latest Software Reviews Tinyhacker Random Tips All My Movies 5.9 CloudBerry Online Backup 1.5 for Windows Home Server Snagit 10 VMware Workstation 7 Google TV The iPod Revolution Ultimate Boot CD can help when disaster strikes Windows Firewall with Advanced Security – How To Guides Sculptris 1.0, 3D Drawing app AceStock, a Tiny Desktop Quote Monitor

    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

  • Zero-channel RAID for High Performance MySQL Server (IBM ServeRAID 8k) : Any Experience/Recommendati

    - by prs563
    We are getting this IBM rack mount server and it has this IBM ServeRAID8k storage controller with Zero-Channel RAID and 256MB battery backed cache. It can support RAID 10 which we need for our high performance MySQL server which will have 4 x 15000K RPM 300GB SAS HDD. This is mission-critical and we want as much bandwidth and performance. Is this a good card or should we replace with another IBM RAID card? IBM ServeRAID 8k SAS Controller option provides 256 MB of battery backed 533 MHz DDR2 standard power memory in a fixed mounting arrangement. The device attaches directly to IBM planar which can provide full RAID capability. Manufacturer IBM Manufacturer Part # 25R8064 Cost Central Item # 10025907 Product Description IBM ServeRAID 8k SAS - Storage controller (zero-channel RAID) - RAID 0, 1, 5, 6, 10, 1E Device Type Storage controller (zero-channel RAID) - plug-in module Buffer Size 256 MB Supported Devices Disk array (RAID) Max Storage Devices Qty 8 RAID Level RAID 0, RAID 1, RAID 5, RAID 6, RAID 10, RAID 1E Manufacturer Warranty 1 year warranty

    Read the article

  • Why does an EXE file that does *nothing* contain so many dummy zero bytes?

    - by Lambert
    Hi, I've compiled a C file that does absolutely nothing (just a main that returns... not even a "Hello, world" gets printed), and I've compiled it with various compilers (MinGW GCC, Visual C++, Windows DDK, etc.). All of them link with the C runtime, which is standard. But what I don't get is: When I open up the file in a hex editor (or a disassembler), why do I see that almost half of the 16 KB is just huge sections of either 0x00 bytes or 0xCC bytes? It seems rather ridiculous to me... is there any way to prevent these from occurring? And why are they there in the first place? Thank you!

    Read the article

  • Pressing zero key brings up lock/switch user screen in W7

    - by qinghua
    This issue started after my cat walked all over the keyboard... Whenever I press the "zero" key, the screen goes black and I'm taken to the lock/switch user screen. The other functions of the key work fine - it can produce ) and / like usual. Numlock is off, and as far as I know, my computer doesn't have Function Lock. If I log out of my user account and sign in as a guest, the "zero" works again, but if I create a new user profile, it doesn't work. I get the same issue when I hit "zero" using the on-screen keyboard. My keyboard layout is set to US English. I've uninstalled and reinstalled the ATK package, and updated my keyboard drivers. I have an ASUS U43JC-X1 laptop running Windows 7, and I haven't installed any new programs lately.

    Read the article

  • C#: Using one Data Table in order to fill 2 different comboboxes?

    - by odiseh
    Hi all. I have 2 comboboxes on a form (form1) called combobox1 and combobox2. Each comboboxes should be filled with data stored in 2 different tables in Sql server 2005: table1 and table2 I mean: combobox1 -- table1 combobox2 -- table2 I fill data table with proper data and then bind the comboboxes to it separately. My problem is: after filling 2 combos, both of them have equal data got from table2. This is my code: DataTable tb1 = new DataTable(); //Filling tb1 with data got from table1 combobox1.Items.Clear(); combobox1.DataSource = tb1; combobox1.DisplayMember = "Name"; combobox1.ValueMember = "ID"; combobox1.SelectedIndex = -1; //filling tb1 with data got from table2 combobox2.Items.Clear(); combobox2.DataSource = tb1; combobox2.DisplayMember = "Name"; combobox2.ValueMember = "ID"; combobox2.SelectedIndex = -1; What's wrong? It seems that if I get 2 different data tables (tb1 and tb2) , every thing will be all right. Any suggestions please. Thank you

    Read the article

  • ASP.NET – Function to Fill Month, Date and Year into Dropdown lists

    - by SAMIR BHOGAYTA
    public void fillMonthList(DropDownList ddlList) { ddlList.Items.Add(new ListItem("Month", "Month")); ddlList.SelectedIndex = 0; DateTime month = Convert.ToDateTime("1/1/2000"); for (int intLoop = 0; intLoop { DateTime NextMont = month.AddMonths(intLoop); //ddlList.Items.Add(new ListItem(NextMont.ToString("MMMM"), NextMont.Month.ToString())); ddlList.Items.Add(new ListItem(NextMont.ToString("MMMM"), NextMont.ToString("MMMM"))); } } public void fillDayList(DropDownList ddlList) { ddlList.Items.Add(new ListItem("Day", "Day")); ddlList.SelectedIndex = 0; int totalDays = DateTime.DaysInMonth(DateTime.Now.Year, DateTime.Now.Month); for (int intLoop = 1; intLoop { ddlList.Items.Add(new ListItem(intLoop.ToString(), intLoop.ToString())); } } public void fillYearList(DropDownList ddlList) { ddlList.Items.Add(new ListItem("Year", "Year")); ddlList.SelectedIndex = 0; int intYearName = 1900; for (int intLoop = intYearName; intLoop { ddlList.Items.Add(new ListItem(intLoop.ToString(), intLoop.ToString())); } }

    Read the article

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