Search Results

Showing results 1 to 40 of 85
Search took 0.02 seconds.
Search: Posts Made By: scru
Forum: Python Oct 18th, 2009
Replies: 6
Views: 314
Posted By scru
Not really sure what exactly you're trying to do...
Forum: Geeks' Lounge Oct 8th, 2009
Replies: 179
Views: 10,529
Posted By scru
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
Posted By scru
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
Posted By scru
I can tell already that you won't have much luck with Linux.
Forum: Python Sep 12th, 2009
Replies: 6
Views: 352
Posted By scru
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
Posted By scru
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
Posted By scru
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
Posted By scru
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
Posted By scru
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
Posted By scru
wtf?
Forum: Geeks' Lounge Jul 21st, 2009
Replies: 22
Views: 1,181
Posted By scru
Damn, you're ugly. The both of you.
Forum: Geeks' Lounge Jul 17th, 2009
Replies: 83
Views: 4,212
Posted By scru
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
Posted By scru
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
Posted By scru
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
Posted By scru
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
Posted By scru
That's one reason not to sign.
Forum: Geeks' Lounge Jul 12th, 2009
Replies: 10
Views: 540
Posted By scru
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
Posted By scru
Give Google control of my desktop? I'm too paranoid for that.
Forum: Geeks' Lounge Jun 30th, 2009
Replies: 26
Views: 1,726
Posted By scru
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
Posted By scru
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
Posted By scru
Forum: Python Jun 8th, 2009
Replies: 4
Views: 276
Posted By scru
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
Posted By scru
:|

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
Posted By scru
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
Posted By scru
Forum: Geeks' Lounge May 27th, 2009
Replies: 19
Views: 1,267
Posted By scru
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
Posted By scru
I'm afraid I have to retract my original opinion about this film.
Forum: Python May 20th, 2009
Replies: 5
Views: 402
Posted By scru
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
Solved: name change
Views: 2,219
Posted By scru
Dude, you really should learn to pronounce his name right.
Forum: Python May 8th, 2009
Replies: 80
Views: 17,657
Posted By scru
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
Posted By scru
You need to get out more.
Forum: Geeks' Lounge May 3rd, 2009
Replies: 29
Views: 1,752
Posted By scru
Forum: Python May 1st, 2009
Replies: 14
Views: 1,007
Posted By scru
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
Posted By scru
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
Posted By scru
You better hope windowsrefund doesn't find this thread.
Forum: Python Apr 16th, 2009
Replies: 11
Solved: looping/random
Views: 459
Posted By scru
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
Posted By scru
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
Posted By scru
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
Posted By scru
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
Posted By scru
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...
Showing results 1 to 40 of 85

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC