Posts
 
Reputation
Joined
Last Seen
Ranked #2K
Strength to Increase Rep
+6
Strength to Decrease Rep
-1
55% Quality Score
Upvotes Received
7
Posts with Upvotes
6
Upvoting Members
6
Downvotes Received
5
Posts with Downvotes
5
Downvoting Members
5
1 Commented Post
0 Endorsements
Ranked #1K
~106.01K People Reached
PC Specs
I'm running Ubuntu 10.10 on a Samsung laptop...
Favorite Tags

120 Posted Topics

Member Avatar for samaru

To make some things clear: -Ditz you were not allowed to post twice in a row! -Anastacia, you just skipped 759 pages :f Yogi bear was the last post of the first page I go on with Paramore... Paramore --> Paramount

Member Avatar for Salem
2
53K
Member Avatar for loken

Okay, I don't want to start a new treath, most famous games probably use c++, but how are they written? pure from source, with a 3d engine, ... ?

Member Avatar for cherqeza
0
1K
Member Avatar for jephthah
Member Avatar for Scottex
Member Avatar for Toikkala

I would instead of using seperate variables for the different materials, use a dictionary [code=python]#-*- coding: cp1252 -*- substances = { 'aluminium':0.000023, 'concrete':0.000012, 'silver':0.000019, 'gold':0.000014, 'copper':0.000017, 'glass':0.000008, } a = raw_input("enter substance: ") l = float(raw_input("give original length: ")) t = float(raw_input("how much the temperature changes: ")) answer = substances[a]*l*t …

Member Avatar for woooee
0
255
Member Avatar for icehiro

First: if you get an error it's always helpfull if you give the error in this case the error can be the fact that you forgot a space between FROM and *

Member Avatar for debasisdas
0
79
Member Avatar for Josef01

the correct statement is: SELECT a, b, sum(a + b) from table1 sum is an existing method that returns the sum of the passed items

Member Avatar for Josef01
0
102
Member Avatar for andrewtrench

Hm, your model is regarded as a long instead of a model, can you paste the views.py or full shell code you are trying to execute?

Member Avatar for Kruptein
0
159
Member Avatar for redous

I think it might be this: [code=php]'<p> <center> { if($_POST['Submit']){ [/code] php thinks the first ' of the $_POST is the closing ' from = '<p> I do though not see what could be the closing ' for the $getpage I think you forgot to do $getpage['code']='<p>'

Member Avatar for redous
0
309
Member Avatar for Kruptein

Hey I've released the first alpha of a project of me called Minimal-D It's meant to combine at least 3-development aspects: -text-editing -file browsing -ftp uploading/downloading (-sql) I combine these three in a simple,lightweight and small program and I want to know what you think about it... You can see …

0
74
Member Avatar for Kruptein

I'm fetching a list with all files/folders on a ftp-server, I want to put a [F] before a folder, and leave files like they are, but I can't find a way to check if it's a file or a dir... I already tried: [code=python]from ftplib import FTP import os ftp …

Member Avatar for Sunjay03
0
7K
Member Avatar for Kruptein

Hey, I've been not so active for the past months, but that's because I was working on a litle project called Deditor. It's a text-editor for linux. The thing that makes it special is that it is made for python and thus has some python-specific features like, syntax-highlighting, interactive interpreter, …

Member Avatar for redyugi
0
102
Member Avatar for mahesham

I assume you use wxPython because it's python and not c++(=wxWidgets) Add this to the set_properties function [code=python]_icon = wx.EmptyIcon() _icon.CopyFromBitmap(wx.Bitmap("./logo.gif", wx.BITMAP_TYPE_ANY)) self.SetIcon(_icon)[/code]

Member Avatar for mahesham
0
196
Member Avatar for lewashby

Okay was the answer griswolf gave not sufficiant? or didn't you understand what he said [url]http://www.daniweb.com/forums/thread286224.html[/url]

Member Avatar for Kruptein
0
125
Member Avatar for Kruptein

I'm looking for people to test a program, I've just finished the rewrite of a program and I need people to test for bugs etc... It's a program for developers written in python and wxpython-gui-toolkit It's made with the aim on linux, although windows-testers are welcome as well link: [url]http://launchpad.net/d-cm[/url] …

Member Avatar for Kruptein
0
92
Member Avatar for madoverclocker
Member Avatar for Kruptein

I have this wx.ListCtrl and I want to get the "Variable" name and the "Value" name, but I can only get the "Variable" name, how to get the second? [code=python]def __init__(...): ... self.list_ctrl_1.InsertColumn(0, 'Variable') self.list_ctrl_1.InsertColumn(1, 'Value') self.list_ctrl_1.SetColumnWidth(0, 200) self.list_ctrl_1.SetColumnWidth(1, 200) for item in ls: self.list_ctrl_1.Append((item[0],item[1])) self.Bind(wx.EVT_LIST_ITEM_SELECTED, self.dclick) def dclick(self, event): …

0
72
Member Avatar for Kruptein

Well like the title says, everything was alined fine, untill I added the Shell, it's the shell I want to resize, but if I pass wx.Size(100,100) of self.console.SetSize((100,100)), it doesn't work :f What am I doing wrong? [code=python]class DEDITOR(wx.Frame): def __init__(self, *args, **kwds): # begin wxGlade: DEDITOR.__init__ kwds["style"] = wx.DEFAULT_FRAME_STYLE …

0
72
Member Avatar for Kruptein

somehow this does not work: [icode]self.list_box_1.SetForegroundColour(5,"red")[/icode] SetForegroundColour is though listed in [url="http://www.wxpython.org/docs/api/wx.ListBox-class.html"]the api reference[/url]

Member Avatar for HiHe
0
168
Member Avatar for Kruptein

Hey, I've made a program called d-cm, it's a web-development tool. I want to know if everything works and/or if it works on windows too. Therefore I'm asking if some people are willing to test it... [url="http://code.google.com/p/d-cm/downloads"]googlecode project link[/url] P.S. I'm posting it here because in the Show off your …

0
80
Member Avatar for dreadyteddy

Well the error code says: you can not append a number to a string. you can't do "hello"+5 you can though do [icode][int(site):int(site)+6][/icode] this ofcourse assumes that site is a number..

Member Avatar for dreadyteddy
0
232
Member Avatar for Kruptein

Okay my syntax highlighter works very well, I only have on problem, Sometimes GetWords() adds "\n" to operatorless although there isn't pressed an enter I think the problem is within the GetWords() function, but I give all functions to be sure.. Main function is OnKeyUp, colorize prints the text colored …

Member Avatar for Kruptein
0
112
Member Avatar for Kruptein

I'm working on an addon system for one of my projects. I'm able to add a new menu item, but the self.Bind(...) is causing me troubles instead of bind the function to the menu-item, it just calls the function. and doesn't bind at all... :s [code=python]self.ID_OPEN=wx.NewId() wxglade_tmp_menu.Append(self.ID_OPEN, eval(menucontent)[i][0], "", eval("wx.ITEM_"+eval(menucontent)[i][1])) …

Member Avatar for Kruptein
0
106
Member Avatar for Kruptein

I'm working on an add-on system, which is till now going pretty good. no I need to assign an id to a menu item, but I don't know which are all in use (by other addons f.e.) so is there a way to either: -get a random integer that isn't …

Member Avatar for Kruptein
0
146
Member Avatar for Kruptein

The SetValue() and GetValue() are to complicated, but it should work with WriteText()... although this always prints a newline if I press the space button...? [code=python] def OnKeyDown(self, event): insp=self.text_ctrl_1.GetInsertionPoint() words=self.text_ctrl_1.GetValue().split(" ") #get all the words hl=[["in","red"]] #syntax list All words=in should become red prev="" #previous words processed wordcount=0 for …

0
60
Member Avatar for Kruptein

Is there a way to catch the text a user types, then do some function on it and then return it to the screen? input(text) -> function(text) -> output(text) I want to colourize certain words, so I want the function to find those words and then colorize them..

Member Avatar for Kruptein
0
392
Member Avatar for camigirl4k3

In your case it's actually much easier to use: [code=python]def wordtonum(word): wordList = ["zero","one","two","three","four","five","six","seven","eight","nine"] return int(wordList.index(word))[/code]

Member Avatar for TrustyTony
0
131
Member Avatar for pythonnewbie10

[code=python] if countLost == games: print com raw_input("Press Enter to exit") resetScores(countWin, countLost, games) raw_input("\n\tPress Enter to continue\n\n\n\n")[/code] If I pressed enter with the last raw_input, nothing would have happened because their is no other command after that one.

Member Avatar for TrustyTony
0
180
Member Avatar for Kruptein

I want to fetch a page from a website, which isn't hard at all. But to view that page you have to be logged in (I do have an account on the site). How can I log me in and then fetch the correct page? I thought something with session_id's …

Member Avatar for TrustyTony
0
78
Member Avatar for lebron

You should keep one integer trough the main loop that keeps counting till the person quits. and another integer that only adds up if the user gives a correct answer. [code=python]total=0 wins=0 main(): ... total+=1 if user wins: wins+=1[/code] something like that, to see if the player wants to quit …

Member Avatar for Kruptein
0
104
Member Avatar for Kruptein

I was wondering if it was possible to use pygments with wxPython? I want to use it on the text_ctrl widget. If it is not possible on that widget but is possible on an other please tell me...

Member Avatar for Kruptein
0
197
Member Avatar for pythonnewbie10

In the again loop you don't specify the max value for main [code=python]]if again == "": main() #main(3) f.e.[/code] btw why do you use the max anyway?

Member Avatar for woooee
0
145
Member Avatar for bharatk

Do you know something about queries? like mysql,sqlite,... [url]http://docs.djangoproject.com/en/dev/topics/db/queries/[/url] -> this is the way to make queries in django

Member Avatar for Kruptein
0
161
Member Avatar for Kruptein

I'm learning pygame and followed a tutorial about a pong game. Everything is from the tutorial except the score system, I implemented. It does work, but instead that the score is updated, the new score is printed over the previous score.. Which isn't a nice view. How can I solve …

Member Avatar for IsharaComix
0
284
Member Avatar for kjock002

[code="python"]#!/usr/bin/python def sums(n): total = 0 next_odd=1 while next_odd <= n: total += next_odd next_odd+=2 return total def main(): n = input('Enter a number: ') s = sums(n) print 'The sum of the numbers is', s while n <= 0: print "Please Enter a positive number." break main()[/code]

Member Avatar for The_Kernel
0
3K
Member Avatar for Kruptein

I have this id that should be default 15px from the bottom (which works). But if I have content larger, the content box should grow in height, how can I specify this? [code=css]#content { position:absolute; top: 85px; left:15px; right:130px; bottom:15px; background-color:#00CC00; font-family: Arial, Helvetica, Tahoma, sans-serif; }[/code]

Member Avatar for Kruptein
0
70
Member Avatar for Tommy.Leedberg

I don't think you would use errorInformation.insert() to update a text widget. Which GUI are you using? if it is wxPython you would do self.errorInformation.SetValue("value")

Member Avatar for Tommy.Leedberg
0
123
Member Avatar for Kruptein

I have a code in which the user should pass something through raw_input, this works fine for strings less then one line, but when I copy-paste a longer string, only the first line is passed by raw_input, how can I also past the rest of the string?

Member Avatar for Kruptein
0
2K
Member Avatar for Kruptein

I'm using the rsa module (easy_install rsa), and if I use it from command line: [code=python]import rsa public,private = rsa.gen_pubpriv_keys(3) cipher=rsa.encrypt("test",public) rsa.decrypt("cipher",private)[/code] this will return test again. (like expected) but in my code it gives a zlib error -3 incorrect headers [code=python]def RSA(txt): global crypt if crypt=="en": key=raw_input("Public key:") ciphertext=rsa.encrypt(txt,eval(key)) …

Member Avatar for Kruptein
0
112
Member Avatar for Kruptein

I have found a module pycrypto which has an AES encryption and decryption function, in commandline everything works fine both encryption and decryption, but if I want to implement it in my program, it fails =( [code=python]def aes(txt): global crypt message="".join(txt) #format the message which has to be encrypted/decrypted to …

Member Avatar for jcao219
0
230
Member Avatar for brett2k9

[code=mysql]SELECT * FROM data WHERE url = "daniweb.com";[/code] you mean something like that?

Member Avatar for Kruptein
0
52
Member Avatar for denero1
Member Avatar for spesseh

if digit is in string form: [icode]digit[:1][/icode] if the digit is an integer: [icode]str(digit)[:1][/icode] *or even easier: [icode]str(digit)[0][/icode]

Member Avatar for spesseh
0
9K
Member Avatar for JuneM

First: Please use code tags! [code=c]code[/code] Second: I think this : window.addWindowListener(new WindowAdapter(){ public void windowClosing(WindowEvent e){ System.exit(0); } }); should be: window.addWindowListener(new WindowAdapter()){ public void windowClosing(WindowEvent e){ System.exit(0); } };

Member Avatar for sincerelibran
0
406
Member Avatar for mstone42
Member Avatar for Simon Tite
0
128
Member Avatar for footsouljaN

I think the easiest way is to go the ajax way, this can collect things from the server and show them on the webpage dynamicly without refreshing the page

Member Avatar for footsouljaN
0
68
Member Avatar for Kruptein

I have created a script to encrypt and decrypt a text message based on the bifid cipher([url=http://en.wikipedia.org/wiki/Bifid_cipher]wiki about bifid[/url]) everything works fine [B]IF[/B] the text message does only contain letters. How can I integrate the ability off spaces etc... the best way? by adding them to my alphabet might solve …

Member Avatar for Kruptein
0
2K
Member Avatar for Bob_180_Bob

I already heard of it, but I don't think it is so handy, talking about updates etc. I prefer to have the most recent version and I don't know ninite will be able to guarantee this.

Member Avatar for Bob_180_Bob
2
133
Member Avatar for Imaginative 1

[QUOTE=tooke;1118190]i hope somebody gets this. lol. i am looking to create a game much like: [url]http://www.ogame.org/[/url] and [url]http://www.zorgempire.net/[/url] what all do i need 2 know in order 2 do this? thanx[/QUOTE] You have to know at least: html and css and a server side language. I advise PHP, because it …

Member Avatar for IntraDevJosh
0
312
Member Avatar for gridder

The End.