Wikipedia:Reference desk/Archives/Computing/2007 July 10
Computing desk | ||
---|---|---|
< July 9 | << Jun | July | Aug >> | July 11 > |
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. |
July 10
editFirefox Add-ons
editHey I'm a big fan of using Firefox on my flashdrive but I'm having trouble with extensions. Whenever I download a Firefox extension or skin onto my flashdrive it will only work when I'm using it on the computer I was using when I installed it. All of the files are still located on the flashdrive but for some reason Firefox can't use them on other computers. Does anyone know of a way to fix this? Thanks Mix Lord 01:16, 10 July 2007 (UTC)
- Try this Portable FireFox from portableapps.com Think outside the box 10:32, 11 July 2007 (UTC)
Watermark
editI am looking for a way to put a simple watermark onto pictures. I tried using GIMP, but I couldn't figure out how to do it. The only other drawing program I have is regular Paint. Does anyone know an easy way to do this? 68.231.151.161 01:30, 10 July 2007 (UTC)
- It is very easy in GIMP. Open the picture. In the Layers dialog, add a new layer with a transparent background. Draw your watermark (or paste it) on the new layer. Turn the opacity down to the level you like (about 20%). Then, go to Layer menu and merge down. Save the image with the watermark on it. While that seems like a lot of steps, it is just 2 steps: Make a new layer on top of the original image with low opacity. Merge that layer onto the original layer. -- Kainaw(what?) 01:36, 10 July 2007 (UTC)
- Thanks, that helped a lot 68.231.151.161 02:04, 10 July 2007 (UTC)
python self.__class__.__name__
editYou can use
print self.__class__.__name__
to get the name of the current class when inside class foobar. Is there a way to get the name of all classes in a given source file when inside class foobar?
something like
for classname in self.__parent__.__classnames__: print classname
or whatever? NoClutter 03:25, 10 July 2007 (UTC)
- What you want is the
__module__
attribute:
import types #in some class... [obj.__name__ for obj in globals().itervalues() if isinstance(obj,(type,types.ClassType))]
- Here I get all members of the defining class's module and filter them to get those that are classes (new-style ones have type
type
, and old-style ones have type<type 'classobj'>
, which I reference with thetypes
module). --Tardis 15:15, 10 July 2007 (UTC)
(EC) I don't really know Python, and Tardis' code didn't work for me, but I think this will do what you want. --TotoBaggins 15:43, 10 July 2007 (UTC)
def print_classes(module): import types for key, val in module.__dict__.iteritems(): if type(val) is types.ClassType: print "module '%s' defines old-style class '%s'" % (module.__name__, key) elif type(val) is types.TypeType: print "module '%s' defines new-style class '%s'" % (module.__name__, key) import foo print_classes(foo)
- Sorry, I goofed and forgot that
__module__
is a string (so I wantedsys.modules[self.__class__.__module__]
to get the object). There's a shorter way to say that, and I've modified my code above to use it. Thanks for pointing that out. --Tardis 22:37, 10 July 2007 (UTC)
fix broken laptop display
editHello, I have an IBM T40 laptop. When I start it up, the screen doesn't display anything. I know there is power because all of the lights on the laptop's side go on. Is there anything I can do myself to try and fix the display. I don't have a lot of cash right now to send it for repairs. Any suggestions would be greatly appreciated.
Thanks
- Are you able to hook another monitor upto it? You could try that to determine if the problem is with the screen or the hardware. Mix Lord 05:13, 10 July 2007 (UTC)
actually, i tried that and here's what happened: the first time I connected it, the IBM logo came up and everything seemed to be going well. I thoght safe mode would be good so I pressed f8 and fn, then the screen(the external monitor) went blank. Since then, I have tried several times to get back, but each time the monitor says no signal.
- If it's a problem with safe mode, you could try something like a Knoppix CD, although this sounds more like safe mode went outside your monitor's limits. Have you tried using the auto-adjust function on your monitor after it's booted to see what happens? --Laugh! 12:45, 10 July 2007 (UTC)
Creating a bot to insert conservation status of North American organims
editI know very little about programming and I've already posted this idea at Wikipedia:Bot requests, but got no response. That page suggested that request for the creation of new bots could be placed here. I wouldn't be able to make such a bot myself, nor do I even know if this idea is feasible. Basically I would appreciate it if someone would have a look through and tell me if a bot could do this kind of work, and if yes, if there is anyone in the community that would be willing to create it.
Essentially I often add the conservation status for plant articles in North America, which involves using the same formula over and over again. It takes quite a bit of time to do myself, but I imagine its simple and mechanical enough for a bot to handle. It essentially works like this:
1)I insert a piece of copied text inside of an existing taxobox above the field for "| regnum =" like this:
| status = G5 | status_system = TNC | status_ref = <ref name=natureserve>{{Cite web | publisher =NatureServe | title = Eurybia divaricata | work = NatureServe Explorer | url = http://www.natureserve.org/explorer/servlet/NatureServe?searchName=Eurybia+divaricata | accessdate = 2007-06-13}}</ref>
such that the old taxobox looks like this with the new text:
{{Taxobox | color = lightgreen | name = White Wood Aster | image = Aster divaricatus R0019871.JPG | image_width = 250px | status = G5 | status_system = TNC | status_ref = <ref name=natureserve>{{Cite web | publisher =NatureServe | title = Eurybia divaricata | work = NatureServe Explorer | url = http://www.natureserve.org/explorer/servlet/NatureServe?searchName=Eurybia+divaricata+ | accessdate = 2007-06-13}}</ref> | regnum = [[Plant]]ae | divisio = [[Flowering plant|Magnoliophyta]] | classis = [[Magnoliopsida]] | ordo = [[Asterales]] | familia = [[Asteraceae]] | tribus = [[Astereae]] | genus = ''[[Eurybia (genus)|Eurybia]]'' | species = '''''E. divaricata''''' | binomial = ''Eurybia divaricata'' | binomial_authority = ([[L.]]) G.L.Nesom | synonyms = *''Aster divaricatus'' <small>L.</small> *''Aster corymbosum'' <small>[[William Aiton|Aiton]]</small> }}
2)I then change the text under "title" with the formula "| title =Genus species"
3)I change the part of the url such that "searchName=Genus+species"
4)I change the "accessdate" to today's
5)I change the field for "status" with the appropriate level listed on the NatureServe website, that being the url in the reference (can be G1, G2, G3, G4 or G5)
6)if there is no {{reflist}} tag, or a ==References== section, then I add one or both of those when needed
Problems might arise with the fact that some articles have taxoboxs and some don't,. I suppose the bot would have to have some mechanism for checking this. If anyone thinks this bot is a possibilty, it would save a lot of time and improve the Plants project significantly. If there are any more questions needed to be answered just let me know. Thanks! Djlayton4 | talk | contribs 11:42, 10 July 2007 (UTC)
- A bot might be created for this, but meanwhile you can use AWB to do it semi-automatically. It goes through a list of articles making changes (though you have to be there to approve the changes before submitting). Create the list from a category of such articles, use a regular expression to see if
{{{{Taxobox
is present and status_ref is empty, then add changestatus_ref=
tostatus_ref=[1]
I do not have AWB atm, so cant guide you through the exact steps. --soum talk 11:52, 10 July 2007 (UTC)
- Thanks for the quick response. I'll give AWB a try. Djlayton4 | talk | contribs 12:11, 10 July 2007 (UTC)
IP Address
editI am not that familiar with the technical side of computers / hardware, etc. So please try to provide an answer at an elementary level, so that I can understand it. Thanks. I often hear that a person can be tracked down or identified by their IP address. I have heard this on Wikipedia (re: vandalism and anonymous accounts). And sometimes, even, you hear on TV that they catch a criminal this way (online sex predators and I believe that serial killer Dennis Rader in Kansas). First, what exactly is an IP address? Does my PC always have the same IP address or is it fluid/changing every time I log onto the Internet? Then, how do "they" link an IP address to a specific individual? Is it, for example, through the information that I gave (say) AOL when I registered with AOL to access the Internet? And, what exactly, can/does the IP address identify? A person's exact name, exact street address, etc.? Or just some generalized information, like "it was a computer located in the Houston, Texas area"? Or, more along the lines of "it was a computer registered to John Smith and the PC is located at 123 Main Street in Houston, Texas"? Thanks. (JosephASpadaro 17:17, 10 July 2007 (UTC))
- An IP address is just a long number that identifies the computer sending a communication on the internet. Each message (packet) you sent has a recipient's address and your own one; your own one because that's a "sender's address", which the recipient uses to send their reply back to you.
- Some IP addresses are consistently assigned to one computer, but most aren't. Many are shared by large institutions (companies, web cafes, colleges), and many are assigned to a big pool that are handed out for short periods to normal users at home. So it's very difficult to really say "person X is IP Y". There is a public registry of IP addresses (kinda like a phone book) but most of the time you look up a number you get an unhelpful reply like "AOL" or "GTE in Texas". Law enforcement can get more info, because they can go to the owner of that IP address (usually an internet service provider like AOL) and say "on June 13th at 2pm who had IP X", and AOL keep records of which subscriber they had temporarily assigned that IP address to. And of course AOL know their subscriber's details (or at least their credit-card numbers, which is enough for the cops). -- Finlay McWalter | Talk 17:27, 10 July 2007 (UTC)
- IP address is that thing like 132.116.228.45 (I just pulled this out of thin air, I hope it doesn't designate anything special). it's actually more like a phone number than an address. Back in the dawn days, the IP addresses were parcelled out to the participants in Arpanet; IBM got a bunch, AT&T got a block, MIT got a block, the Department of Defense got a block, etc. They're blocked out by the first or first and second numbers. (Each number is a decimal version of a double hex number, so each number can only go from 0 up to 16 squared minus one, or 255). So, 132.116.228.XXX would be a block of 256 addresses, 132.116.XXX.XXX would be a block of 256 squared addresses, etc. If you dial in, you pretty much get a temporary assignment of an address; the real IP address is assigned to AOL or whoever, as long as you are connected they know to route it to you. If you have a permanent on connection, like cable, then most likely you have a "temporary permanent" address; as long as your cable modem is connected, you have the same IP address. If it gets powered down and fired up again a while later, you might get assigned a different address. Which company is assigned any particular address is publicly available. The company presumably knows which computer or dialup account is assigned any particular address at any given time, for billing purposes, and they can be induced to cough that info up, along with other details of your account, by the law, or threats of legal action, or bribery, or whatever. Gzuckier 17:30, 10 July 2007 (UTC)
So, would it be safe to say that ... while the police / law enforcement can find out my identity if they need to ... an average everyday person would not be able to do so? (i.e., say some one that you have communicated with through emails or the internet chats, etc.) Thanks. (JosephASpadaro 23:01, 10 July 2007 (UTC))
- They would be able to tell who your internet service provider was, and possibly the city you lived in, but no, they couldn't tell your identity from just the IP address. Theresa Knott | Taste the Korn 23:05, 10 July 2007 (UTC)
- Well from your IP address alone, likely not, however it becomes much easier to send you spyware or the like that could find things out. In generally, having your IP known isn't a bad thing, as long as you don't REALLY piss anyone off --Laugh! 23:35, 10 July 2007 (UTC)
Also probably worth noting that, strictly, the IP address doesn't identify your computer - it identifies the network device. For many people that will be your modem or router. (We have four computers on a LAN using a router - as far as the Internet is concerned, they all have the same IP address - the one for the router) A computer can also have more than one IP address (if it has more than one network device) Worm 00:13, 11 July 2007 (UTC)
I created an article about George F. Heinrich M.D. but it does not reach quality measures. Could you please either make it quality or tell me how to? Thanks.
- Sure. All you do is write in the article why this doctor is any more notable than any other doctor, and add links to reputable sources (such as the websites of legitimate newspapers) which back up those claims. Ben Carson is an example of a physician who is notable without being as famous as Jonas Salk or Christiaan Barnard --TotoBaggins 20:07, 10 July 2007 (UTC)
- ^ "Eurybia divaricata". NatureServe Explorer. NatureServe. Retrieved 2007-06-13.