- Strength to Increase Rep
- +2
- Strength to Decrease Rep
- -0
- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 2
- Posts with Downvotes
- 2
- Downvoting Members
- 2
The example shows how to establish a dictionary of (row, column):value pairs to mimic a two dimensional array. This can be easily expanded to more dimensions. Python3 has dictionary comprehension, making the process of creating a dictionary of this type easier. |
|
I loved the original Dungeon Keeper and Dungeon Keeper 2 back when Bullfrog made them. I spent untold amounts of time playing the games! EA has now ported Dungeon Keeper to mobile devices, and not in a good way. Just to play 1 level normally, you need to pay anywhere … |
|
When I started to compile this list I did not think there would be very many "Space Sandbox" games out there - boy was I wrong ! Here is a list of all the space building / sandbox games that I know of - If I missed any, let me … |
|
Here is a login page I have been working on for a while, what do you think ? It automatically strips "user input" of all special characters. <html> <title>Login Page</title> <head> <style type="text/css"> body { text-align:center; } </style> </head> <?php include "sql.php"; $me = $_SERVER['PHP_SELF']; function check($v){ return isset($_POST[$v]); } … |
|
I am attempting to use preg_replace to purge everything except letters and numbers in the $_POST, however is seems to be failing to work. Sample code below demonstrating the problem. <html> <?php if( isset($_POST["name"]) || isset($_POST["age"]) ) { $x1 = preg_replace('[^A-Za-z0-9]', "", $_POST['name'] ); $x2 = preg_replace('[^A-Za-z0-9]', "", $_POST['age'] ); … |
|
For some reason my string is spitting out pure trash, and I have no idea why it's doing it. There are no errors kicked out when debugging. #include <iostream> #include <string> using namespace std; void main(){ string xx = ""; string yy = ""; for( int x = 0; x … |
|
What is the Python (2.7) equivalent of the PHP $_POST, $_GET, $_SESSION and $_COOKIE, and how are they used ? After almost 2 years of trying I have finally gotten Python to work on my WAMP server - only to find that it is severely lacking in web page functionality. |
|
I need to keep a string from resetting each time the class is called, but haven't found any good way of doing it ... Every time [B]if (block != LastC){}[/B] evaluates to true. ( which shouldn't happen very often ) [CODE] --- code snip --- public class Player_Move implements Listener … |
|
An assignment I'm working on requires me to write a method for the sole purpose of calling that method in a later method. As such I am required to write the first method to not display anything on screen and then I need to comment the calculation within the method. … |
|
It's going on 4 hours now, and I have yet to find an answer on how to do this. All I want to do access and manipulate data in a list, from another class. The 2 classes: [B]GetList.java[/B] [CODE]public class GetList { public static void main(String args[]) { MakeList xx … |
|
This is a working beta of a virtual slot machine I am working on. Eventually I'm going to add a GUI. [CODE]# Python 3 # Slot Machine # By : RLS0812 # Note: The Odds are a bit off of what they actually are. import random def Reels(): # [0]Winning … |
|
im working on a tron game with pygame and i cant figure out how to make my tail that the player's car makes disappear after somany pixels. i want the tail to start shortening itself after like 500 pixels. if you can, can you post the full code edited (im … |
|
According to this post [url]http://www.python-forum.org/pythonforum/viewtopic.php?f=3&t=31349#p146797[/url] it claimed to be possible to create a list were you can store and recall data using a coordinate system ... [code]SomeList[1][5][2] = 234 [/code] I have been playing around with the code a while, and have ran into a problem. No matter what I … |
|
While correcting errors in someone else's code, I decided to completely rewrite the original script, and improve upon it. This is the basic code for making 3D arrays using dictionaries. [code] ar = { (x,y,z):0 # creating the array for x in range(3) for y in range (3) for z … |