Forum: Python Oct 18th, 2009 |
| Replies: 6 Views: 314 Not really sure what exactly you're trying to do... |
Forum: Geeks' Lounge Oct 8th, 2009 |
| Replies: 179 Views: 10,529 I say just ignore the thing until it crawls back under the bridge. It cannot be reasoned with. |
Forum: Geeks' Lounge Oct 7th, 2009 |
| Replies: 179 Views: 10,529 Okay, I didn't read much of what was said (I tend not to pay much attention to fanboys). But anybody who says things like "Anyone who has a good understanding of operating systems in addition to... |
Forum: Geeks' Lounge Oct 6th, 2009 |
| Replies: 179 Views: 10,529 I can tell already that you won't have much luck with Linux. |
Forum: Python Sep 12th, 2009 |
| Replies: 6 Views: 352 bytes, as they exist in Python 3.1 are conceptually new to Python (starting with version 3). This isn't to say that 8-bit strings didn't exist before in the form of regular text strings. Note the... |
Forum: Python Sep 12th, 2009 |
| Replies: 6 Views: 352 I happen to think this behavior is consistent (with indexing and slicing rules).
Here's why it makes sense:
bytes and str are not the same. They aren't even conceptually the same.
A bytes... |
Forum: Python Sep 6th, 2009 |
| Replies: 4 Views: 292 Look, not to be harsh or anything, but given you previous posts I think you would be better off reading a book or a wiki or even just a tutorial on Python OOP and maybe Python in general. Really. |
Forum: Geeks' Lounge Sep 6th, 2009 |
| Replies: 46 Views: 3,236 Definition of "own" (http://www.google.com.vc/search?q=define%3A+own&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a)
Defintion of "use"... |
Forum: Python Aug 23rd, 2009 |
| Replies: 12 Views: 1,375 No, please don't do that.
That is okay if the page you are reading is encoded in ascii or utf-8. But if it is encoded in latin-1 (a fairly common encoding in its own right), you can run into... |
Forum: Geeks' Lounge Jul 27th, 2009 |
| Replies: 32 Views: 1,942 |
Forum: Geeks' Lounge Jul 21st, 2009 |
| Replies: 22 Views: 1,181 Damn, you're ugly. The both of you. |
Forum: Geeks' Lounge Jul 17th, 2009 |
| Replies: 83 Views: 4,212 It's a little sad that some people are still holding onto the idea that Vista is what XP was. ME, perhaps, but not XP. Even Microsoft sees Vista as a failure. Sure Vista introduces some nice things,... |
Forum: IT Professionals' Lounge Jul 15th, 2009 |
| Replies: 22 Views: 1,171 Joking aside, there really is no point to insisting on the use of int main as opposed to void main.
void main()
{
printf("hello world!\n");
}
is just as valid a program as |
Forum: IT Professionals' Lounge Jul 15th, 2009 |
| Replies: 22 Views: 1,171 It's time to get that stick out of your butt and start using it. So what if the standard says so? You're only writing code for Windows anyway (and if you aren't, the chances that someone else is even... |
Forum: Python Jul 15th, 2009 |
| Replies: 2 Views: 268 Well, I'm not Dan, but here's a little hack adapted from http://www.dotnetspider.com/resources/15834-eject-close-cd-tray.aspx for Python. It's only two lines of code!
To open:
import ctypes... |
Forum: Geeks' Lounge Jul 15th, 2009 |
| Replies: 31 Views: 2,056 That's one reason not to sign. |
Forum: Geeks' Lounge Jul 12th, 2009 |
| Replies: 10 Views: 540 Kim Jong-il: It's time to launch an offensive on those imbeciles. Something that will make them squirm and rue the day that they did that one thing to **** me off, bringing their societies to a... |
Forum: Geeks' Lounge Jul 9th, 2009 |
| Replies: 15 Views: 701 Give Google control of my desktop? I'm too paranoid for that. |
Forum: Geeks' Lounge Jun 30th, 2009 |
| Replies: 26 Views: 1,726 I remember the first time I saw Misty from pokemon. It was love at first sight. With her skinny jeans and legs like an eight year old. But it's the triangle face that really got me (so hawt!). And... |
Forum: Python Jun 19th, 2009 |
| Replies: 31 Views: 1,568 Aw hell nah. I'm not gonna debug that for you. But, is this supposed to be a game? Why isn't it interactive? If it is, how do I play it? I actually love this silly game. |
Forum: Geeks' Lounge Jun 10th, 2009 |
| Replies: 75 Views: 4,990 |
Forum: Python Jun 8th, 2009 |
| Replies: 4 Views: 276 Try:
import urllib
import os
import time
open_file=open('html.html','r')
file=open_file.read() |
Forum: Geeks' Lounge Jun 4th, 2009 |
| Replies: 83 Views: 4,212 :|
Something to note though, Windows 7 is definitely not faster than XP (not comparable to XP speeds either). It won't run well on XP class hardware. That said, if you still have XP class hardware... |
Forum: Python May 29th, 2009 |
| Replies: 2 Views: 922 If you want to just find out if one string is contained inside another:
strvalue1 in strvalue2
If you want to find out how many occurrences of one string there are in another:
num =... |
Forum: Geeks' Lounge May 29th, 2009 |
| Replies: 32 Views: 2,443 |
Forum: Geeks' Lounge May 27th, 2009 |
| Replies: 19 Views: 1,267 For those not knowing how to use IRC, here is a quick recipe on how to join the daniweb channel.
You will need:
Mozilla Firefox web browser
Directions:
1. Install that chatzilla add-on from... |
Forum: Geeks' Lounge May 24th, 2009 |
| Replies: 23 Views: 1,928 I'm afraid I have to retract my original opinion about this film. |
Forum: Python May 20th, 2009 |
| Replies: 5 Views: 402 The best way I think is to get a solid foundation in Python 2. That and read up a bit on unicode. Once done, you can just read the "What's new in python 3" page (Google it) and learn everything there... |
Forum: Geeks' Lounge May 13th, 2009 |
| Replies: 32 Views: 2,219 Dude, you really should learn to pronounce his name right. |
Forum: Python May 8th, 2009 |
| Replies: 80 Views: 17,657 Here's an example of a basic window frame in pyQT.
You can get pyQT from here: http://www.riverbankcomputing.co.uk/software/pyqt/download
# Code Example: Display a window in PyQt4
# Python... |
Forum: Geeks' Lounge May 6th, 2009 |
| Replies: 54 Views: 4,708 You need to get out more. |
Forum: Python May 1st, 2009 |
| Replies: 14 Views: 1,007 One of the best nuggets of wisdom I ever got about using Ubuntu (and other Debian based systems) is learn to use apt.
I suppose it applies to whatever package manager that your distribution... |
Forum: Geeks' Lounge Apr 25th, 2009 |
| Replies: 89 Views: 4,682 No. That would suggest that the older you are, the more you know, which is just not true.
Case in point: you're older than I am. |
Forum: Geeks' Lounge Apr 23rd, 2009 |
| Replies: 12 Views: 951 You better hope windowsrefund doesn't find this thread. |
Forum: Python Apr 16th, 2009 |
| Replies: 11 Views: 459 Do you mean like:
import random
def sample(items, amount):
if amount > len(items):
raise ValueError("Amount incorrect")
r = set() |
Forum: Python Apr 12th, 2009 |
| Replies: 4 Views: 367 Having wxPython installed on a server is pointless. Why? Because when it displays the GUI, nobody sees it.
I think the original poster needs to clarify his/her intentions. |
Forum: Python Apr 12th, 2009 |
| Replies: 2 Views: 248 replace print i with print "*" * i. You may need to initialize i to 1 instead of 0.
EDIT:
Actually, that's the easy way out. The other way which might be the one your tutor is looking for... |
Forum: Python Apr 12th, 2009 |
| Replies: 6 Views: 449 You can take out the entire else part of the statement statement; the else and elif parts of an if statement are optional.
Another way is the pass keyword. Use it to get out of a block that you... |
Forum: Python Apr 9th, 2009 |
| Replies: 4 Views: 236 take the initializers and put them inside the function body, so that you have:
def sum(n):
i = 0
total = 0
...rest of your code starting with while statement
Although, I have... |