switch instead of if else
First of all I made this in the iPad so it might not be in perfect coding but I was wondering if i could shorten the script with "switch" instead of "if....else" Also I will use Microsoft Visual C++...
View ArticleReadProcessMemory()
Hello, I've wanted to read another programs variables by using their memory address. In a tutorial I read it only demonstrated how to read a programs memory by creating an unsigned int with the address...
View Articleparse hashmap to sql preparedstatement
I am trying to parse hashmap values of country name and country rate to PreparedStatement , but I am unable to store the values. here is a link to my full class working without any errors you run it...
View ArticleMM-YY Format for PostGreSQL
Hey all, I seem to be having a bit of trouble in formatting a certain type of date. What I do is this: Read in a CSV file into a staging table From the staging table insert it into a production table...
View ArticlePolygon Clipping, won't clip
Hello, I am stuck on this Polygon Clipping Assignment. It won't clip. http://www.megafileupload.com/en/file/383064/cg1-clip-zip.html This is what I have so far: // // Clipper.java // // /** * Object...
View ArticleSeeing if a std::string contains a particular substring efficiently
As the title says, I'd like to see if a substring of a string is at a particular position within the string. Let's say I have the string "IDENTIFIER 10239", and I want to see if "IDENTIFIER" is the...
View Articleneed a return statement for calculating number of years
I am working through a tutorial on calculating how old a person is. 1. I Convert inputed values into this format: YYYYMMDD 2. Subtract the birth information from the current information 3. The first...
View Articleneed a return statement for calculating number of years
I am working through a tutorial on calculating how old a person is. 1. I Convert inputed values into this format: YYYYMMDD 2. Subtract the birth information from the current information 3. The first...
View ArticleSnakes and Ladders calling boolean method
public static boolean move1() { int amount = p1dice1; if(position1 + amount >= 100){ position1 = 100; } return true; //the player has reached the end } public static boolean move2() { int amount =...
View ArticleIf and Else not working as planned.
Hello all, I am making the simplest program you can imagine: /code name = input("A number for doublifier:") word = input("say Doublify") if word == Doublify: print ("Your doubled number is ", name * 2)...
View ArticleMultiple Forms Switching Problem, Closing Second Form Keeps App Open.
Hello, I'm a recent member here at dreamincode and a recent programmer. I have been looking into this problem and it could be me just being paranoid. I have multiple forms, frm_login, which is a log in...
View Articletree equivalence
hi i have this code which determined if tow trees are equal or not the code is working in these cases: 1: equals; 8 8 4 20 4 20 2: the roots not equals 8 80 4 20 4 20 and does not worked in this case 8...
View ArticleChange Title of Sitemap through code.. not working
HI, i have a sitemap and i want to update through code behind,, but its now working,, please help me to correct this <?xml version="1.0" encoding="utf-8" ?> <siteMap...
View ArticleSimple shooter game program help
Hi i have made a shooter game where cars travel across the screen and when you shoot them your score goes up. I have two problems. 1 is that when I start the program all the cars follow eachother...
View ArticleSending and recieving 'int' data (Sockets)
Hi guys! I've just cleared up making my server and client. I can tell they work because I made it do so: If the server is open, and the client connects, it'll gladly allow them to play. If the server...
View Articlemysql underscore escape not working?
$name='john_doe'; $name=str_replace('_','\_',$name); $sql="select * from table where customer='".$name."'"; in the table, i have john_doe, john_smith, etc. I am not getting the expected result?
View ArticleMSSQL does not close properly
I an running a MSSQL database that is opened and closed continually within a permanent loop. The process runs within a backgroundworker. The process opens the database, scans for any changes, performs...
View ArticleDelete Function error
I have been making a shooter game for fun, and it is not working. I have made few libraries that is of my own. However, it is giving me problemes with the delete function, and if I take them out, I...
View ArticleThe Delete Fuction Probleme
Another one, this one is more specific. Same delete function problem. #include <allegro.h> #include <cstdlib> #include <time.h> #include "Character.h" #include "Ship.h" #include...
View ArticleStriking out text in middle of the label?
I have this string, and I want to strike out a part of a text in the code, how would I do that? Here is the text: "This program was intended to recreate the Farkle game with the basic rules." I want to...
View Article