- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 8
- Posts with Upvotes
- 7
- Upvoting Members
- 6
- Downvotes Received
- 5
- Posts with Downvotes
- 3
- Downvoting Members
- 4
22 Posted Topics
if you want a program that tells you the total heads, tails, the percentage of both of these, prints the results in a easy format such as: H T H T and allows you to export this data to a .txt file previously created i have already programmed such a …
I just recently wanted to dabble in GUI programming so I took one of my older programs and added a GUI to it. By the way: I'm using python 3.1 and the tkinter that comes with it... they changed the module name from Tkinter to tkinter in 3.1... [code=python] import …
I'm working on a site that on the homepage it rips posts off of a certain forum in the forums... That works perfectly. I am now trying to parse bbcode from the posts. [CODE] function BBCode ($string) { global $globals; $search = array(); $replace = array(); $con = mysql_connect($globals['forum']['host'].':'.$globals['forum']['port'],$globals['forum']['user'],$globals['forum']['pass']); mysql_select_db($globals['forum']['db'],$con); …
I recommend reposting this on the Minecraft forums: [URL="http://www.minecraftforums.net"]http://www.minecraftforums.net[/URL] or finding help on the Bukkit forums: [URL="http://www.bukkit.org"]http://www.bukkit.org[/URL] Bukkit forums specializes in minecraft modding with many of the staff or developers working with MCP or on the MCP project so that may be the place to post.
Also what you are referring to is not an Array at all. Many languages say an array is a key => value which is what you are saying you want. In Java there is a distinction between an Array (list) and a Map (Array in other languages, so on). So …
My line numbers that I'm getting from your code is not lining up with that of your exception. Could you highlight or comment or do something to line 155 so we can see it in context?
I found an AP Computer Science A book extremely helpful. It takes the stance that you know nothing about programming. I got a 5 on the test so its fairly easy to learn and understand. I suggest going to your local Barnes & Noble and looking in their reference section …
Fairly straight forward [CODE=java] class ComplexNumber{ private double real; private double imaginary; public ComplexNumber(double r, double i){ setReal(r); setImaginary(i); } public ComplexNumber(){ setReal(0); setImaginary(0); } public double getReal(){ return real; } public double getImaginary(){ return imaginary; } public void setReal(double r){ real = r; } public void setImaginary(double i){ imaginary …
I recommend using a simple MySQL database. You can find MySQL libs online for free and either rewrite one or find one with a lenient license. You just need a online MySQL database, this can be solved with a web host, or install MySQL on a local comp thats on …
Very simple solution, get an IDE that error checks. I recommend Eclipse or NetBeans. I personally use Eclipse and threw your code into a new class and it found several errors that have not yet been addressed. Also one error that eclipse will not catch because it cannot catch Intention …
you have not defined the function db_single... meaning that function doesn't exist in this code.
Ok what you do is download the python 3.1 .tar.bz2 file [URL="http://sites.google.com/site/theunofficialguide/Home/Programs"]here[/URL]. extract it to your desktop. this is my website and its unfinished... enter this in your terminal.. [CODE] cd ~/Desktop/Python-3.1/ ./configure [/CODE] if this turns up no errors continue else your missing some dependencies. [CODE] make sudo make …
How do I run a .py file from another python file.... I want a program depending upon the option you choose to run a different python program... Ho do i do this... I have tried: [CODE=python] import os if os.path.isfile('file.py'): exec(open('file.py').read) [/CODE] and it requires everything to be global.... only …
if you post what y our having problems with on the save function i could take a look at it... not making any promises though...
dude... he may not be from an English speaking country and using a translator or what little knowledge they have to type in English... there are people like that on this site... and when have you known a translator to translate text in grammatically correct English... be a little more …
How do I import a variable from another function in the same class [code=Python] class W(object): #my class def variable(self): #one of my functions f = 5 def printf(self): #what do i put here to import f from the function variable... #I'm currently working with python 3.1. #I know its …
also for the last line of your code [code=python] index = index + 1 #you could simplify this to index += 1 [/code] this does the exact same thing and is simpler to write...
yes some more details would be more useful... such as what you are trying to shut down... a server or your program... and some snippets of code that you are having trouble with... that way we can see what you have attempted and what you have included in your program...
yes to compile the answers into one post there are three ways that me and my associates can think of: putting: [code=python] #code here input('Please press enter to close: ') #raw_input() on any IDLE except 3 #or import time #code here time.sleep(10) #put the time in sec you want it …
don't know about creating a .txt but you can write in one, read one, and several other things i normally go about writing in one similar to vegaseat: [code=python] yourface = 1 f = open('randomfile.txt', 'w') write = ' if you have integers in your code you want to write …
you could also write a function such as: [code=python] import time def function(self): while : time.sleep(1) #you put the time to wait in seconds here #rest of function [/code] you could use time.sleep() in a number of scenarios...
I am writing a dice rolling simulation and i need help redefining a variable inside a loop.
The End.
Arrorn