- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 7
- Posts with Upvotes
- 6
- Upvoting Members
- 6
- Downvotes Received
- 5
- Posts with Downvotes
- 5
- Downvoting Members
- 5
- PC Specs
- I'm running Ubuntu 10.10 on a Samsung laptop...
120 Posted Topics
Re: 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 | |
Re: 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, ... ? | |
Re: Your battery inside your acer may be broken ? | |
Re: 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 … | |
Re: 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 * | |
Re: 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 | |
Re: 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? | |
Re: 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>' | |
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 … | |
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 … | |
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, … | |
Re: 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] | |
Re: 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] | |
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] … | |
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): … | |
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 … | |
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] | |
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 … | |
Re: 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.. | |
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 … | |
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])) … | |
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 … | |
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 … | |
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.. | |
Re: 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] | |
Re: [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. | |
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 … | |
Re: 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 … | |
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... | |
Re: 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? | |
Re: 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 | |
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 … | |
Re: [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] | |
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] | |
Re: 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") | |
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? | |
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)) … | |
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 … | |
Re: [code=mysql]SELECT * FROM data WHERE url = "daniweb.com";[/code] you mean something like that? | |
Re: 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] | |
Re: 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); } }; | |
Re: try this: [icode]find ./ -type f -exec test $( `ftype {}` ) = 'image' \;[/icode] | |
Re: 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 | |
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 … | |
Re: 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. | |
Re: [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 … | |
Re: can you give an example + expected output |
The End.