- Strength to Increase Rep
- +15
- Strength to Decrease Rep
- -3
- Upvotes Received
- 337
- Posts with Upvotes
- 256
- Upvoting Members
- 105
- Downvotes Received
- 19
- Posts with Downvotes
- 19
- Downvoting Members
- 13
- Interests
- Guns, target/sharp shooting, martial arts, hunting, cooking
Re: Some cause happiness wherever they go; others, whenever they go. -- Oscar Wilde | |
Re: A kumquat and huckleberry combo with holy water. | |
Re: According to my engineering professor, the reason there is a variety of computer languages is that each language (at least the popular once) was written for a purpose. Python was not written to make Operating Systems, but C was (for Unix). So it would be a little silly to use … | |
Re: Probably the easiest way to do this is to use the local variable dictionary vars() to create new variables on the fly: [code=python]food = 'bread' vars()[food] = 123 print bread # --> 123 [/code]You can print out vars() to see what's going on. | |
Re: Looking at main.py this program is a nightmare of imports. https://github.com/PicciMario/iPhone-Backup-Analyzer-2/blob/master/main.py | |
Re: Go to: [url]http://www.daniweb.com/code/c.html[/url] and search for: image | |
Re: The American News Media can only handle three major events at a time. | |
Re: Try this: ''' wxBoxSizer101.py button1 at upper right corner button2 at lower right corner ''' import wx class MyFrame(wx.Frame): def __init__(self, parent, mytitle, mysize): wx.Frame.__init__(self, parent, wx.ID_ANY, mytitle, size=mysize) self.create_widgets() def create_widgets(self): self.button1 = wx.Button(self, wx.ID_ANY, label='Button1') self.button2 = wx.Button(self, wx.ID_ANY, label='Button2') # use a box sizer to lay out … | |
Re: A simple timing example: import time def print_timing(func): """ a decorator function to time another function time.clock() works on Windows systems only you can use time.time() instead, but it gets updated less frequently and can give 0.0 results on faster functions """ def inner(*arg): """*arg are the arguments of function … | |
Re: wxMediaCtrl uses native backends to render media, for example on Windows there is a ActiveMovie/DirectShow backend, and on Macintosh there is a QuickTime backend backend options:. wx.MEDIABACKEND_GSTREAMER for linux/unix wx.MEDIABACKEND_QUICKTIME for Mac | |
Re: How do you get a sweet little 80-year-old lady to say the F word? Get another sweet little 80-year-old lady to yell “BINGO!” | |
Re: Put the code between code tags. Read the lightgray message in the background of the Quick Reply field below. Or read: [url]http://www.daniweb.com/forums/announcement114-3.html[/url] | |
Re: The function sqrt(x) returns a float: [code=python]import math x = 9 y = math.sqrt(x) print y, type(y) # 3.0 <type 'float'> [/code]If you want the result to be an integer use int(y). | |
In the last couple of threads people have used the Python class, but really don't seem to know how to use them properly, or why to use them. Hence my question: "Why would you use a class in Python?" I though only Java forces you to use OOP. | |
Re: I think it's just style. | |
Re: Import the module shutil, it has functions for copying and moving files, copying whole directory trees, deleting directory trees and more. | |
Re: Predict the outcome of this Python code: [code=python]def sub_one(x): print "x before if -->", x if x > 1: x = x - 1 sub_one(x) print "x after if -->", x return x x = 5 final = sub_one(x) print "final result -->", final [/code]Can you explain the odd behaviour? | |
Re: Each king in a deck of playing cards represents a great king from history: Spades --> King David Clubs --> Alexander the Great Hearts --> Charlemagne Diamonds --> Julius Caesar | |
I got infected right after a Java and Adobe update on my Windows7 machine. folder \jnihmpibahpjjmcodbopcpdaelkbpjnc is most likely a random generated folder. Note on malware **PriceLess** (pops up as Chrome extension, highlights strings for ads): PriceLess is in folders: C:\Users\HomeGroupUser$\AppData\Local\Chromatic Browser\User Data\Default\Extensions\jnihmpibahpjjmcodbopcpdaelkbpjnc\5.2 C:\Users\HomeGroupUser$\AppData\Local\Comodo\Dragon\User Data\Default\Extensions\jnihmpibahpjjmcodbopcpdaelkbpjnc\5.2 C:\Users\HomeGroupUser$\AppData\Local\Google\Chrome\User Data\Default\Extensions\jnihmpibahpjjmcodbopcpdaelkbpjnc\5.2 C:\Users\HomeGroupUser$\AppData\Local\Google\Chrome SxS\User Data\Default\Extensions\jnihmpibahpjjmcodbopcpdaelkbpjnc\5.2 … | |
Re: In my book the only thing that lives on is meaningful communication you made with people that survive you. | |
Re: Here is a comparison of some common Python GUI toolkits. These were created on my Ubuntu/Linux machine, because I could never get PyGTK to go on my Windows Vista machine. I followed the installation routine carefully, but there was always a dll missing, or an entry point wasn't found, or … | |
| |
Re: There is also an error in line 12. Since you are not running Python3 but Python2 tkinter should be Tkinter | |
Re: According to Einstein the Sun uses up more and more matter, its gravitational pull should lessen and the Earth should move further away. | |
Re: Give us a short example of what your project data looks like. | |
Re: There might be a Persian version of Python. | |
Re: Normally you build a house from the bottom up. Try to understand the basics of Python first and put the windows in later. | |
Re: @ivel I looked at the code you have written and at NathanOliver's helpful suggestions. I came to the conclusion that you need beginner's help. I took your code and corrected it, please study it: /* modulus_exercise101.cpp Write a program that counts the numbers from 3 to 117. For multiples of … |