- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 15
- Posts with Upvotes
- 12
- Upvoting Members
- 7
- Downvotes Received
- 2
- Posts with Downvotes
- 2
- Downvoting Members
- 2
Play Guitar and Bass, love programming
- PC Specs
- Ubuntu 10.04/Windows 7 Dual Boot
Re: Don't know if it's been suggested, but if you're into wanting to make video games, try to create a text version of Battleship, Tic-Tac-Toe, or any other game you can think of. Then, create an AI to play with you. And make it really good, and hard to beat. It's … | |
Okay, so I am creating a battleship game, I posted a thread here earlier to figure out how to place the ships, but know I'm back, because I am curious as to how I should program the AI for it. Here's my base code now, and I'll explain how the … | |
Essentially, I'm learning how emulators work. I've got the core down, but I wanted to know if I'm actually doing this the right way, or if I should be doing it differently. [CODE]#include <stdio.h> // Opcode + Argument Retriever #define GetOpCodeControl1(x) (x>>14) #define GetOpCodeControl2(x) ((x>>12)&0x3) #define GetOpCode0Arg(x) (x&0x0FFF) #define GetOpCode1Arg(x) … | |
Re: Um. People, it is very tough to create a fully functional web browser such as Firefox, IE, Chrome, Safari, etc. If you want to do something simple, how about using Python and a GUI toolkit to retrieve a website, then display it. It'd just have a simple address bar, and … | |
Alright , so I spent _forever_ trying to figure this out. So, if any newbies here need to know how to write and read ANY object (with the exclusion of pointers, but I'll get to that), this is something that can help. First and foremost, you have to take endianness … | |
I posted a while back ago on making directx work in classes. I'm having more issues now. On line 125 (system.cpp), when in debugging, it tells me that it has an access violation. I googled the issue, and someone had said something about initializing the pointer, but that is taken … | |
I am at my wit's end with this thing. I just can't figure out, why I cannot set the WNDCLASSEX.lpfnWndProc equal to my class's function. Can someone help? Here's my code: system.h [code] #ifndef SYSTEM_H #define SYSTEM_H #include "stdinc.h" class System { private: void initD3D (void); void cleanD3D (void); LRESULT … | |
Hey there. I've been programming in Python for about a month now. I've created simple programs for myself, such as games and e-mail applications. Still getting GUI down, I'll post if I need help there. Anyways, here's my problem: Running: Windows XP Python: Python 2.6 I installed the newest version … | |
Re: You need to call the function "input" So it'd look like: [code]input()[/code] | |
Re: [QUOTE=ret801;1568618]I dont get exactly what it does still is there no good documentation for it? and how come you post on all my posts do you live on daniweb and post on all newb stuff? lol im no complaining you have helped me out a bit , are you a … | |
Re: I'm sorry, but doesn't Bash already support remote ssh log-in? And that's not remote desktop, but rather remote log-in. Two different things. Can you give a better explanation of what you want? | |
Hello, I'm trying to take a C array of char's and trying to take all of the spaces out of it. Yet I keep running into a segmentation fault. Can anyone help me here? [code] #include <stdio.h> #include <stdlib.h> int strlen(char* Str) { int toret=0; int i=0; char tmp = … | |
Re: My opinion, if wanted, if I was in your situation, I would keep your laptop, not fix it, but I would buy a moniter for it. And also buy the new laptop. I'm sure you can find a cheap CRT moniter somewhere. Near where I live, there's a used computer … | |
Re: Also, you'll need to learn a few languages here: 1) HTML (Most definitely) 2) CSS 3) PHP 4) MySQL (or another good database) Also, you'll need to read up on servers and apache, find what to use, etc etc. | |
Well, since there was no option for "tutorial" in the type of post, it has been created as a simple thread... Obfuscation - confusion resulting from failure to understand obfuscated code - Code that is hard to read In this tutorial, I will show you how to convert something readable, … | |
Re: I bet he's making a game which takes place on a different planet :D | |
I have the following function (from windows.h) which I am trying to use the Python C API to allow python to call it. This is the function: [code syntax=C] BOOL ReadConsoleOutputCharacter( HANDLE hConsoleOutput, (Type Handle to Change (use STD_OUTPUT)) LPTSTR lpCharacter, (char pointer to store Characters read) DWORD nLength, (length … | |
Okay, so I'm sitting here bashing my head against the desk. I've been googling this for what seems the past hour. I cannot find any relative good links for making Python work with WAMP server. Yes, I understand how CGI scripts work. Unfortunately, I have no idea how to configure … | |
Here is my issue: I have a program, that downloads roms off the internet. Everything works fine, but I would like to show an indefinite progress bar while it is downloading. I have that with the following code: [code] # -*- coding: utf-8 -*- # Form implementation generated from reading … | |
I have created a program, and wanted some critique on it. There is a website that I go to in order to download roms, and I do not like clicking a ton of links and waiting 15 seconds to download it, so I created a program to fetch it for … | |
Re: Hey, why not just store it in a string and eval() it? [code] _main = eval("__name__ == '__main__'") if _main: main() [/code] | |
Re: Hmm... Perhaps use a dictionary to sort it all? [code] # Original values L1=['v1', 'v2', 'v3', 'v4', 'v5'] L2= [3, 1, 7, 6, 5] # Dictionary to keep them in order d = {} for x in range(0, len(L2)): d[L2[x]] = L1[x] # The dictionary should automatically sort by number, … | |
Re: Or perhaps you could do this: [code] import os var = 'test.txt' os.system('gedit '+var) [/code] | |
Re: Look, if you want a new function, and you're sure that it'll always be a 3x3 matrix, think about what you need to do. Outline it. Do it by hand a few times, and then list EVERY step needed to do it. Then translate it into the python code. So … | |
Re: Hey, just to show you something dangerous you can do with input(), (If the module 'sys' has been imported): [code] >>> input("> ") > sys.stdout.write('OGGA') OGGA [/code] I know it's not much, but think of things you could do with that | |
Re: I'm still using 2.6, but I have the newest 3 installed. I don't use 3, because there aren't many modules made for it. However, I do try and use 3's syntax in 2.6 where applicable (ie print("") not print ""). I do wish that I could do one liner "for" … | |
Re: Well, you could just do this as well: [code] import time timevar1 = time.time() # YOUR CODE GOES HERE timevar2 = time.time() print(timevar2-timevar1) [/code] That will determine how many seconds it takes for your script to execute | |
Re: It's not that it's impossible, just not really practical. | |
Re: Okay, first off... See all of those purple words now that it's in the [-code-] tags? Yeah, those mean that they are internally defined, and do something. You want to change all of those variables to something else. Second, your error is self-explanatory, the variable "line" is not defined anywhere … |