Computing desk | ||
---|---|---|
< July 26 | << Jun | July | Aug >> | July 28 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
10 or 15 years ago (I think), there was a project to get volunteers to input common knowledge into a database for an AI program to use (things like apple ISA edible fruit). Does anybody know what happened to it? Clarityfiend ( talk) 04:12, 27 July 2009 (UTC)
When I use if x in y: (expecting a boolean to be returned), the real operator being called is __contains__ (so that x.__contains__(y) is the same as y in x). But apparently, when I use for x in y: it's something different. It's not even mentioned in help(list). Here's some sample code I wrought up:
class x:
def __init__(self):
self.data = 1,2,3,4,6,5,7
def __contains__(self,con):
return con in self.data
## Now, testing it:
if 4 in d:
print(4) ## good - it returns 4
if 26 in d:
print(4) ## good - it doesn't return 4
for x in d:
print(x) ## bad - it gives "TypeError: 'x' object is not iterable"
Anybody know what the underlying operator is? Thanks, [ flaming lawyer 04:24, 27 July 2009 (UTC)
class Uppercaser(object):
def __init__(self, strings):
self._strings = strings
def __iter__(self):
for string in self._strings:
yield string.upper()
>>> for s in Uppercaser(['Foo', 'bAr', 'baZ']):
... print(s)
...
FOO
BAR
BAZ
Hi. My friend has several albums on Shutterfly of an activity that I was in too, and I want to download the pictures onto my computer (hi resolution if possible). I know Shutterfly probably doesn't want you to do this (as they won't make ad money if you don't use their site to access the pictures), but I was wondering if someone has made a free tool to do it. I clicked on one image and it gave me an option to download that image after I sign in (I don't know if this is a limited thing or if it will work for every picture). However, there doesn't seem to be a way to download the entire album. The albums have like 700 pictures in them so manually going through each picture is not feasible. Thanks, -- 76.91.63.71 ( talk) 10:25, 27 July 2009 (UTC)
I can't get any further, please help me complete the fucking game .. It's soo hard!! (: I can't find any light, so I can go into the cave, and how do we move on? Please help we are desperate!!!!
can anyone give me a description and the general purpose of the window vista ultimate?? i will wait for your reply.... wish to see your reply soon... thank you ^^ —Preceding unsigned comment added by Bebezaii ( talk • contribs) 13:49, 27 July 2009 (UTC)
How do I use this file BitDefenderRescueCD_v2.0.0_27_07_2009.iso.md5, MD5 check program accept it. Also how should I verify the checksum of BitDefenderRescueCD_v2.0.0_27_07_2009.iso. yousaf465'
" I think this file is correct. Will check with a md5checksum program. yousaf465'
Does anyone know what program this icon is from?— msh210℠ 17:03, 27 July 2009 (UTC)
Are there any advantages of Macs over Windows and vice versa (From a general perspective)? Chevymontecarlo ( talk) 17:24, 27 July 2009 (UTC)
I'm going to be using my computer for gaming (From disks, not on the internet), surfing the web, creating word documents and saving music files in MP3 format (I have an iPod)
Chevymontecarlo (
talk)
10:32, 30 July 2009 (UTC)
My school will have a programming competition. The idea is to make an algorithm to control pieces of a board game. The game takes place on a MxN grid. It starts by placing K black and white pieces on random positions on the board. On every turn a piece is randomly selected and the algorithm gets to move it. The piece can move one step to one of the 4 major directions, possibly eating an enemy piece, but not off the grid or onto a friend piece. The data the algorithm gets for deciding where to move the piece is what the piece "sees" in the four major directions and the distance to it. If the piece sees a friend piece (instead of the grid edge or an enemy piece), it also sees the "color" of that piece, a 4 byte number (pieces can't see their own color and there's no other memory that lasts longer than a turn). The piece can also set its own color when it gets a turn. A player wins the game if all of his pieces are "connected visually", ie any piece can see all other pieces directly or through other piece that sees other piece ... that sees the piece. (Please forgive my English).
I'm a bit stuck with this. The only thing I can think of is trying to command the pieces towards the center of the board. I don't know any other similar games either. All kinds of help are welcome. -- 91.145.73.220 ( talk) 22:19, 27 July 2009 (UTC)
Sorry about the confusion.
-- 91.145.73.220 ( talk) 23:03, 27 July 2009 (UTC)
I thought this would be easy to find, but no! it's not. Could anyone point me in the direction of research papers/articles on good (and perhaps not-so-good) colour schemes in GUIs or similar? There are a couple of names in my head who did research in this area but their actual names escape me now. Thanks in advance. x42bn6 Talk Mess 22:37, 27 July 2009 (UTC)
Computing desk | ||
---|---|---|
< July 26 | << Jun | July | Aug >> | July 28 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
10 or 15 years ago (I think), there was a project to get volunteers to input common knowledge into a database for an AI program to use (things like apple ISA edible fruit). Does anybody know what happened to it? Clarityfiend ( talk) 04:12, 27 July 2009 (UTC)
When I use if x in y: (expecting a boolean to be returned), the real operator being called is __contains__ (so that x.__contains__(y) is the same as y in x). But apparently, when I use for x in y: it's something different. It's not even mentioned in help(list). Here's some sample code I wrought up:
class x:
def __init__(self):
self.data = 1,2,3,4,6,5,7
def __contains__(self,con):
return con in self.data
## Now, testing it:
if 4 in d:
print(4) ## good - it returns 4
if 26 in d:
print(4) ## good - it doesn't return 4
for x in d:
print(x) ## bad - it gives "TypeError: 'x' object is not iterable"
Anybody know what the underlying operator is? Thanks, [ flaming lawyer 04:24, 27 July 2009 (UTC)
class Uppercaser(object):
def __init__(self, strings):
self._strings = strings
def __iter__(self):
for string in self._strings:
yield string.upper()
>>> for s in Uppercaser(['Foo', 'bAr', 'baZ']):
... print(s)
...
FOO
BAR
BAZ
Hi. My friend has several albums on Shutterfly of an activity that I was in too, and I want to download the pictures onto my computer (hi resolution if possible). I know Shutterfly probably doesn't want you to do this (as they won't make ad money if you don't use their site to access the pictures), but I was wondering if someone has made a free tool to do it. I clicked on one image and it gave me an option to download that image after I sign in (I don't know if this is a limited thing or if it will work for every picture). However, there doesn't seem to be a way to download the entire album. The albums have like 700 pictures in them so manually going through each picture is not feasible. Thanks, -- 76.91.63.71 ( talk) 10:25, 27 July 2009 (UTC)
I can't get any further, please help me complete the fucking game .. It's soo hard!! (: I can't find any light, so I can go into the cave, and how do we move on? Please help we are desperate!!!!
can anyone give me a description and the general purpose of the window vista ultimate?? i will wait for your reply.... wish to see your reply soon... thank you ^^ —Preceding unsigned comment added by Bebezaii ( talk • contribs) 13:49, 27 July 2009 (UTC)
How do I use this file BitDefenderRescueCD_v2.0.0_27_07_2009.iso.md5, MD5 check program accept it. Also how should I verify the checksum of BitDefenderRescueCD_v2.0.0_27_07_2009.iso. yousaf465'
" I think this file is correct. Will check with a md5checksum program. yousaf465'
Does anyone know what program this icon is from?— msh210℠ 17:03, 27 July 2009 (UTC)
Are there any advantages of Macs over Windows and vice versa (From a general perspective)? Chevymontecarlo ( talk) 17:24, 27 July 2009 (UTC)
I'm going to be using my computer for gaming (From disks, not on the internet), surfing the web, creating word documents and saving music files in MP3 format (I have an iPod)
Chevymontecarlo (
talk)
10:32, 30 July 2009 (UTC)
My school will have a programming competition. The idea is to make an algorithm to control pieces of a board game. The game takes place on a MxN grid. It starts by placing K black and white pieces on random positions on the board. On every turn a piece is randomly selected and the algorithm gets to move it. The piece can move one step to one of the 4 major directions, possibly eating an enemy piece, but not off the grid or onto a friend piece. The data the algorithm gets for deciding where to move the piece is what the piece "sees" in the four major directions and the distance to it. If the piece sees a friend piece (instead of the grid edge or an enemy piece), it also sees the "color" of that piece, a 4 byte number (pieces can't see their own color and there's no other memory that lasts longer than a turn). The piece can also set its own color when it gets a turn. A player wins the game if all of his pieces are "connected visually", ie any piece can see all other pieces directly or through other piece that sees other piece ... that sees the piece. (Please forgive my English).
I'm a bit stuck with this. The only thing I can think of is trying to command the pieces towards the center of the board. I don't know any other similar games either. All kinds of help are welcome. -- 91.145.73.220 ( talk) 22:19, 27 July 2009 (UTC)
Sorry about the confusion.
-- 91.145.73.220 ( talk) 23:03, 27 July 2009 (UTC)
I thought this would be easy to find, but no! it's not. Could anyone point me in the direction of research papers/articles on good (and perhaps not-so-good) colour schemes in GUIs or similar? There are a couple of names in my head who did research in this area but their actual names escape me now. Thanks in advance. x42bn6 Talk Mess 22:37, 27 July 2009 (UTC)