Wikipedia:Reference desk/Computing
of the Wikipedia reference desk.
Main page: Help searching Wikipedia
How can I get my question answered?
- Select the section of the desk that best fits the general topic of your question (see the navigation column to the right).
- Post your question to only one section, providing a short header that gives the topic of your question.
- Type '~~~~' (that is, four tilde characters) at the end – this signs and dates your contribution so we know who wrote what and when.
- Don't post personal contact information – it will be removed. Any answers will be provided here.
- Please be as specific as possible, and include all relevant context – the usefulness of answers may depend on the context.
- Note:
- We don't answer (and may remove) questions that require medical diagnosis or legal advice.
- We don't answer requests for opinions, predictions or debate.
- We don't do your homework for you, though we'll help you past the stuck point.
- We don't conduct original research or provide a free source of ideas, but we'll help you find information you need.
How do I answer a question?
Main page: Wikipedia:Reference desk/Guidelines
- The best answers address the question directly, and back up facts with wikilinks and links to sources. Do not edit others' comments and do not give any medical or legal advice.
October 3
vids
i need a program that will download vids from sites like metacafe ect. but will preserve the quality. i have the free firefox one but it only works on youtube ( i think)? —Preceding unsigned comment added by Kj650 (talk • contribs) 06:17, 3 October 2010 (UTC)
- Stop thinking and know (and keep in mind that there are going to be some sites with videos/streams that you won't be able to easily download, despite it being wholly technically possible). ¦ Reisio (talk) 07:38, 4 October 2010 (UTC)
- Try Flashgot. It works with most video sites. I just tried it with metacafe and it worked fine. APL (talk) 07:57, 3 October 2010 (UTC)
Looking up unicode character names from glyphs
I've just seen a series of peculiar glyphs used on a messageboard. Is there a site somewhere with an input box which I can paste a glyph into, which will tell me its unicode name so I can get some idea why it exists? Wurstgeist (talk) 13:11, 3 October 2010 (UTC)
- http://www.fileformat.info/info/unicode/char/search.htm -- Finlay McWalter ☻ Talk 13:20, 3 October 2010 (UTC)
- But it's worth just searching Wikipedia for it; there are articles for many of the commoner characters (e.g. 京). Failing that, search Google for "京 unicode" and you end up with pages like this. -- Finlay McWalter ☻ Talk 13:40, 3 October 2010 (UTC)
- Thank you kindly. That didn't work for most of the characters (some of them turned into ordinary characters, some returned "not found") but it gave me the clue that what was going on was some heavy abuse of combining characters. Still not sure which ones. Probably all of them. :) 86.21.204.137 (talk) 13:44, 3 October 2010 (UTC)
- Sometimes I've found myself pasting the mysterious characters into a python shell like this:
- >>> u'天下の台所'
- u'\u5929\u4e0b\u306e\u53f0\u6240'
- So those characters are U+5929, U+4e0b, U+306e, U+53f0, U+6240, which we can then look up in the unicode character reference. -- Finlay McWalter ☻ Talk 14:26, 3 October 2010 (UTC)
- I use this Firefox addon. Algebraist 14:29, 3 October 2010 (UTC)
- Thanks - that's very useful. -- Finlay McWalter ☻ Talk 14:39, 3 October 2010 (UTC)
- Yes, that did a really good job. COMBINING OGONEK (NON-SPACING OGONEK), COMBINING INVERTED BREVE BELOW (NON-SPACING INVERTED BREVE BELOW), COMBINING ALMOST EQUAL TO ABOVE, etc., etc. Wurstgeist (talk) 15:39, 3 October 2010 (UTC)
- I use this Firefox addon. Algebraist 14:29, 3 October 2010 (UTC)
- Sometimes I've found myself pasting the mysterious characters into a python shell like this:
- I wouldn't be surprised if you're talking about some strange smiley or something, but it's worth noting that if there's a mismatch between the input character set and the character encoding the page is being sent with, characters can render enitrely different from how the author may have intended them to. ¦ Reisio (talk) 18:54, 3 October 2010 (UTC)
- It looks like this question has already been answered, but for future reference, when I want to look up a single Unicode character I've found unicode-search.net to be helpful. —Bkell (talk) 14:35, 4 October 2010 (UTC)
Hard drive
I have lots of internal hard drives, some with Serial ATA and some with Parallel ATA connections. Some also differ in size and physical shape. I want to use them without opening up my computer and restarting it each time. I looked into hard drive enclosures and docking stations but it seems as though there's no "all in one" solution that will work with all my drives, and I don't want 30 different enclosures. Is there a specific name for just the cables without casing which would work with all the drives that I can look up? 82.44.55.25 (talk) 17:21, 3 October 2010 (UTC)
- You want them easily interchangeable? An external drive docking station would probably be a good bet. Search your favorite computer supplier for "Hard Drive Docking." If you want to go a cheaper route you could run extension cables outside of the case, but I don't think you'll be able to swap those without powering down the computer first. You'll also probably need different ones for Parallel ATA and SATA, although you might get lucky and find one that does both. There are some external enclosures that do both, but you have to switch cables. Shadowjams (talk) 21:21, 3 October 2010 (UTC)
- I looked into docking stations already but they specify sizes, and because of the different physical shapes of my drives (some are old and very bulky) I didn't think they would fit into docking stations designed for standard size drives. Basically what I want is a usb docking station, but without the casing; ie just the usb cable and wires to connect to the drive. Is that kind of thing manufactured? Does it have a specific name which I can search for? 82.44.55.25 (talk) 22:58, 3 October 2010 (UTC)
- There are plenty of USB units that can connect to both PATA and SATA, eg [1] - won't that do what you need? Unilynx (talk) 22:59, 3 October 2010 (UTC)
- Yes, thanks :) 82.44.55.25 (talk) 23:06, 3 October 2010 (UTC)
Wikipedia Copyrights
can i copy and past wikipedia is it a copywrite low? —Preceding unsigned comment added by 113.11.9.68 (talk) 19:28, 3 October 2010 (UTC)
- See Wikipedia:Copyrights#Reusers.27_rights_and_obligations 82.44.55.25 (talk) 19:38, 3 October 2010 (UTC)
- The text of Wikipedia is licensed under the Creative Commons WP:CC-BY-SA license (if you look at the bottom of the page, it says this in the small print). This means (approximately) that you can copy text as long as you cite Wikipedia. (Also, you can publish modified versions, as long as you make your modifications available under CC-BY-SA, also. This clause doesn't come up very often.)
- Note that, depending on the setting, copyright law might not be the only constraint. For example, in academic settings, citations are necessary and plagiarism is unacceptable, even for works in the public domain. It's also often inadvisable to do long quotations of Wikipedia, even properly marked and cited, because encyclopedias are tertiary sources, which means that you're getting a "pre-digested" summary of the topic. Paul (Stansifer) 12:10, 4 October 2010 (UTC)
- You also need to be aware that any photos or other media files may be licensed differently to the text. If you intend to use them you need to check the reuse requirements for each one separately and comply with that. --jjron (talk) 08:17, 5 October 2010 (UTC)
October 4
Restore iPhone texts and pics without doing a iTunes restore from backup
How can I restore my text messages and pictures with iTunes without using the restore backup option on iTunes? I don't want to restore everything like my settings and all that. Just my text messages and pictures. I am doing a fresh install of OS 4.1, thats the reason I ask. Thanks 76.169.33.234 (talk)Dave —Preceding undated comment added 02:12, 4 October 2010 (UTC).
Smartphone as meeting/seminar reminder via Google Calendar?
I've recently started a PhD where I'm having a lot of meetings and seminars at different times and could do with having my Google Calendar follow me wherever I go, to warn me in advance so that I don't miss things. I don't want to pay more than I need to, so ideally the phone (or some alternative but small device) could synchronise with Google Calendar via Internet-connected PCs (my desktop at home as well as my laptop and my desktop at work) via bluetooth or something similar and then beep a couple of times 15 minutes before a meeting is due to begin. What would be a good option for this? I don't think I'd use all the features of top-end models of phone. I'm happy to pick up e-mail etc. for free when I'm at a computer. Can you guys suggest anything? Thanks. --129.215.5.255 (talk) 09:27, 4 October 2010 (UTC)
- Any expensive phone is likely to do this out of the box (at least my iPhone does). For cheaper phones, have a look at gcalsync; it is a small program that can be run on most Java-supporting phones (there is a list of supported phones on that link). Haven't tried it but I know others who have. I don't think it supports Bluetooth, though, and a simple phone is not likely to be able to connect to wireless networks. Still, paying a couple cents each time you sync through packet data (that is, the cellphone network) is probably still the cheapest option. Your other option is to get your home calendar (for example Outlook) to sync with Google calendar (not trivial when I tried some years ago, but I think I managed to get it to work) and then get your phone to sync with Outlook (usually trivial using software that comes with the phone). Googling will give you some suggestions for solutions. Jørgen (talk) 06:54, 5 October 2010 (UTC)
Excel - add years to a date
How do I add years to a date in Excel? I have a column of dates, and in the next column I need the date 5 years after them. e.g. In the first column I have 01/02/2003, and in the next I need 01/02/2008. Thanks. DuncanHill (talk) 11:45, 4 October 2010 (UTC)
- User YEAR, MONTH and DAY to extract year, month and day number from original date, add 5 to the year number, then use DATE to convert new year, month and day back to an Excel date value. So, if your original date is in cell A1, then your formula is:
- =DATE(YEAR(A1)+5, MONTH(A1), DAY(A1))
- Splendid, many thanks! DuncanHill (talk) 12:06, 4 October 2010 (UTC)
I suspect Gandalf61's solution would suit you fine in most cases, but consider what you want your answer to be when adding 5 years to the 29th of February in a leap year, 2004, for example. In the table, x is Gandalf61's method, and y is mine.
Date | x | y |
---|---|---|
28 February 2004 | 28 February 2009 | 26 February 2009 |
29 February 2004 | 01 March 2009 | 27 February 2009 |
01 March 2004 | 01 March 2009 | 28 February 2009 |
The formula for y is:
- =DATE(YEAR(A1), MONTH(A1), DAY(A1)+(365*5))
I think what's happening here is that method x is averaging over the leap days, therefore you lose 2 days (one in 2004 and one in 2008). I work in pensions and this sort of thing is very material when calculating service (and therefore, cold hard cash!) and it's exactly the sort of thing we get queried on by eagle-eyed pension payers! --Rixxin (talk) 20:49, 6 October 2010 (UTC)
Spam replies
I get about 25 pieces of spam everyday. A large portion is Viagra, increase your dick size pills and Canadian/Mexican pharmacy stuff and assorted other crap. So I have started a policy. Every day I take 15 minutes out to send an email to each and every spammer with the message "fuck you spammer" in it (but about 500 of this phrase over and over in the body). Two questions. First, am I completely wasting my time or am I actually bothering them, or are they just bots? (bothering them back is the point). Second, is it possible this will actually work to get some of them to stop? Note that none of these are legit emails with any link in them or a website you can go to to ask them to remove you from their spamlist.
Another related thing. Is there anything else I can do to stop receiving this spam? Note that I do have my spam filter on and I use mail.yahoo.com. Thanks.--108.27.106.173 (talk) 13:48, 4 October 2010 (UTC)
- It's worse than wasting your time; you're potentially sending emails to entirely innocent people. I get about 15000 spams a day over several domains, and they all have forged "from:" addresses; about 20% claim to be from my own domains, and about 5% claim to be from me. So mailing these is pointless. I occasionally get mails from someone who got a spam which had a forged email address appearing to be from my email address, and once a threatening phone call; I've twice had to call the police on people. Clicking on those "please remove me" things is useless too (for real spams, rather than promotional emails from companies you've actually done business with), as it confirms they've got through to a real person. Professional spammers don't care that you don't like their email, and nothing will make them stop. Reading your emails through a client with a decent spam filter of its own, like Thunderbird, will help. -- Finlay McWalter ☻ Talk 14:04, 4 October 2010 (UTC)
- (e/c) Replying back to spam is a very bad idea. The messages are sent by a bot or even a virus-infected computer of some unsuspecting fellow. The messages usually have a forged "From" address field, which means you will be replying to somebody who did not send the message anyway. And if your reply gets back to the spammer, it only proves to them that your email address is valid, and therefore they will send you more spam.—Emil J. 14:07, 4 October 2010 (UTC)
- Thank you for the information. I am holding my head now. Egad. It's so infuriating. They need to do something about this. Who exactly "they" is I don't know. There has to be a way that all the smart people out there can work together to stop this. I mean, half the messages I receive actually have "viagra" in the subject line. There has to be a way to stop these in transit. Anyway, following your responses I guess I'll abandon my "project". By the way, I'm not dumb enough to have opened all these emails from my home PC. I've only done this from a work MAC.--108.27.109.167 (talk) 18:32, 4 October 2010 (UTC)
- Oh, "they" have plenty of solutions, but "they" want money from you for doing them, or want to be able to exempt themselves and their partners from the solution. The tragic truth is that, while only a tiny proportion of people buy stuff from the spammers, it's still enough for it to be worth their while. -- Finlay McWalter ☻ Talk 18:51, 4 October 2010 (UTC)
- Stopping spam in transit is problematic, because it means that everyone has to share a universal definition of "spamminess". But Bayesian spam filtering can be very effective -- it essentially works by observing, for each word in the email, how many times it's been used before in spam and how many times it's been used in legitimate email. One side-effect of it was that spammers were attempting elaborate circumlocutions (or bizarre spellings) to avoid using spammy words; if they are literally using the word "viagra" (without resorting to spelling trickery), it suggests that the spammers have given up (it wasn't a very effective tactic), and are focusing their efforts entirely on recipients who don't have access to email clients with Bayesian filtering. This is a fascinating development, if so. Paul (Stansifer) 20:42, 4 October 2010 (UTC)
Mystery unconnectability
I'm running a computer with Windows 7 Ultimate x64, and Windows XP Professional x64 on another partition. A particular problem has been bugging me since I built it a few months ago, namely that whatever I do, I can never open a port. There are two other PCs on this network running exactly the same with no issue - same operating systems, same method of forwarding ports, same everything, making this all the more confusing. I've tried it on different ethernet ports too, with different cables, and through different modems and routers (but not in a different house, however we have switched ISPs during this time).
I've forwarded a port for utorrent in the router, as per instructions and exactly how it's done for the other computers (obviously not the same port, but just to clarify I've not missed that). canyouseeme, utorrent, deluge, azureus and the torrent sites I am a member of confirmed every time that the port is not in fact open, so the first variable I tested was my IP address and the port I was using. Everything else I changed, I tried with different combinations of these just to check.
I added exceptions to my firewall (Comodo) for all the torrent programs I tried, which changed nothing. Windows firewall is totally disabled, and disabling Comodo didn't solve the problem. I tried using DMZ on the router (sorry if that's incorrect terminology, I have a vague grasp on this but I'm not sure of the specifics) with the firewall disabled, which STILL didn't work. Everything was still telling me that the port was closed, or I was behind a firewall. It's the same in XP and 7.
Bizarrely, utorrent and Deluge now give me the happy little green symbol, and torrent sites tell me I am connectable - however, Deluge tells me there are no incoming connections, and canyouseeme still tells me the port is closed. I can torrent from seeds, but seeding myself is impossible. I don't often play online games so that's not much of an issue, but it's still frustrating and totally nonsensical (as far as I can tell).
Any ideas what the hell is going on? —Preceding unsigned comment added by 194.83.69.19 (talk) 14:38, 4 October 2010 (UTC)
- Your router tries to solve the problem what you have only one ip address visible from the internet (assigned to you by your ISP), but have several actual computers which want to connect to the internet. When someone connects to the ip address given by the ISP on a given port, the router needs to know which of the computers to forward the connection to.
- First off, you probably just want to enable UPnP. This is the easy option, and may just work. Get each computer to listen on different port – if you both try and listen on the same port, the router won't know which computer to forward stuff too (actually all but one will get to listen on a random port number instead of the one you asked for).
- Failing that, this is the way to open a port on my (netgear) router:
- Go to router settings page by going to 192.168.0.1. This may also be different for you, it's normally printed on the router itself.
- Each time you re-connect your computer to the router, it will give you a new ip address from the private address space (these ip addresses only work inside the local network). You want to permanently associate an ip address to the MAC address of your computer's network card. On my router, I use "Address reservation" under "LAN Setup" to do this.
- When someone asks to connect to a specific port on your router, most routers don't reply. You need to instruct the router to forward connections from the internet to your ip address on the local network (the ip address from the private address space you set to be a single value in the previous step). Set your router's firewall to forward connections to the port you're interested in to your ip address on the local network. On my router, I need to add a "service" to give a name for the port I want to open, then add a firewall rule to the "inbound services" chain, as described here.
- Now check it works by trying to connect to the port you opened from a computer on the internet (not a computer on the local network). Success would be the same response that someone else on your local network gets (what response this is will depend on your computer's firewall). As a Linux user, I used
netcat
for this; no idea what how to do it on Windows.
- Btw, I'm not sure what the DMZ setting does – a DMZ is a semi-public area between an internal and external router. It may be for setting the location of the internal router. You don't want this. --h2g2bob (talk) 23:49, 4 October 2010 (UTC)
- This is what I've done; I have a static IP address and all the computers on the network have different ports forwarded. This is why I don't understand why it isn't working, because the exact same procedure works for the others but not for me. I will be moving tomorrow however, so I'll be able to see if it happens in a different house entirely.
- I'm not entirely sure on the DMZ setting either, but googling the issue and looking through FAQs led me to believe that it effectively opens all the ports to that internal IP address, so while it should in general be turned off, it can be used to diagnose problems... however since it didn't work even then, I don't know what to make of it. 194.83.69.19 (talk) 10:15, 5 October 2010 (UTC)
- For clarity you have the same firewall on the PCs without the problem? Are you sure you've assigned the static IP address correctly? For example can you ping the IP from some other computer in the LAN? What's the network card in the computer where it doesn't work? Have you tried turning off one of the computers where you have port forwarding working and changing the IP on the computer where it doesn't work to the IP of the one you turned off and seeing if it works? (You may need to restart your router in case it gets confused/thinks theres a collision.) BTW this seems somewhat unlikely if you are having the same problem on different OSes but not on different PCs with the same firewall but who knows. Have you tried uninstalling the firewall? From my experience firewalls have the nasty habit of still causing problems even when disabled. Zonealarm was notorious for this but I had it with at least one other one, can't remember what but it could have been Comodo. On the DMZ issue, see DMZ (computing)#DMZ host for what this means on cheap routers. Nil Einne (talk) 13:11, 5 October 2010 (UTC)
- Yes, all of them are running Comodo. I have not tried pinging the IP from another computer on the network but that is something to try, I am fairly certain it is set up correctly but yeah. The idea of changing the IP to that of a working computer is also something I will try. I have moved now as I mentioned, but I expect I'll get the chance to test these things out (I'm not sure it's worth it where I am, since I'm on a shared network using a BT homehub (ugh)). I will try uninstalling the firewall as well, I wouldn't be surprised if it was simply being sneaky and 'helpful'. Thanks for the suggestions!194.83.69.19 (talk) 09:17, 7 October 2010 (UTC)
- For clarity you have the same firewall on the PCs without the problem? Are you sure you've assigned the static IP address correctly? For example can you ping the IP from some other computer in the LAN? What's the network card in the computer where it doesn't work? Have you tried turning off one of the computers where you have port forwarding working and changing the IP on the computer where it doesn't work to the IP of the one you turned off and seeing if it works? (You may need to restart your router in case it gets confused/thinks theres a collision.) BTW this seems somewhat unlikely if you are having the same problem on different OSes but not on different PCs with the same firewall but who knows. Have you tried uninstalling the firewall? From my experience firewalls have the nasty habit of still causing problems even when disabled. Zonealarm was notorious for this but I had it with at least one other one, can't remember what but it could have been Comodo. On the DMZ issue, see DMZ (computing)#DMZ host for what this means on cheap routers. Nil Einne (talk) 13:11, 5 October 2010 (UTC)
How do I create virtual tours like this one ?
Hi, is there any free tool available to create something like http://www.mysorepalace.tv/360_Eng/index.html ? I suppose that it is made using some kind of photo-stitching software (or could it be using a video camera ?). Assuming that I have a camera (SLR or video), is there a way to create this on my own for free ? - WikiCheng | Talk 15:14, 4 October 2010 (UTC)
- I believe VR photography is what you're looking for. QuickTime VR was the first example of this tech that I'm aware of. Comet Tuttle (talk) 16:30, 4 October 2010 (UTC)
Thank you ! - WikiCheng | Talk 16:50, 5 October 2010 (UTC)
bin vs iso
For making a disk image from a cd or dvd, which is the better format to go for? 82.44.55.25 (talk) 15:18, 4 October 2010 (UTC)
- From my experience, iso is supported more than bin. So, I would use iso. -- kainaw™ 15:27, 4 October 2010 (UTC)
- Is there any difference between the two formats in terms of how accurately they save the disk contents? I read a while ago that iso isn't an exact copy and can't handle lots of sectors, but I can't seem to find where I read that to verify. 82.44.55.25 (talk) 15:32, 4 October 2010 (UTC)
- The bin format handles multi-track and copy protection better. If you have a multi-track or copy protected disk that you are trying to copy and iso fails, you should use bin. For normal disks, iso works fine. -- kainaw™ 16:17, 4 October 2010 (UTC)
- Ok, thanks :) 82.44.55.25 (talk) 17:18, 4 October 2010 (UTC)
- The bin format handles multi-track and copy protection better. If you have a multi-track or copy protected disk that you are trying to copy and iso fails, you should use bin. For normal disks, iso works fine. -- kainaw™ 16:17, 4 October 2010 (UTC)
Battery not detected in ancient MacBook
My MacBook (using Windows Vista) has been showing a nice "Battery not detected" warning for the past few days, and resetting the SMC (whatever that is) hasn't helped (did a Google search and found SMC-resetting options). Any ideas on what might do the trick and make my battery get detected?? Thanks in advance. 115.184.97.157 (talk) 15:44, 4 October 2010 (UTC)
- Try it with another battery? That'll at least tell you if it is a problem with the battery and not the machine. I suspect it's the battery — they only have a limited life. If you can take it to an Apple store, they can take a look at that for you. --Mr.98 (talk) 18:10, 4 October 2010 (UTC)
- Sometimes the battery gets 'unseated' (for want of a better term) and fails to be detected by the computer. Turn the machine off, take the battery out (while it's out it could be worth checking that the contacts are clean), then firmly reinsert it, and turn the machine back on. This may be an outside chance, but it has worked for me a number of times when I've come across similar problems. Even if the battery is nearing the end of its life it's unusual for the machine not to recognise its existence, nor give you a warning before it's completely stuffed. --jjron (talk) 08:11, 5 October 2010 (UTC)
Sudo security
I understand that giving sudo access to anything with a shell or a modifiable script is a security problem, but is there a risk if I enable access to a specific script that's not modifiable. For instance, if I have a script that reads a line from a 400 permissioned file, and that script is modifiable only by root (755 permissions), is there a security risk with that? I realize if the script itself allows for some user input there could be an issue, but assuming the script itself is fine, can anyone think of security issues with this setup? Shadowjams (talk) 20:04, 4 October 2010 (UTC)
- I'm confused. Super-User has access to everything on the system - so any user who has permission to run sudo has (effectively) permission to run or access or modify any program, irrespective of file-permissions. "Sudo" does not have any other configurable access rights - it has permission to anything. Maybe I am misunderstanding your explanation? How exactly are you "denying" sudo access to any file? Nimur (talk) 20:20, 4 October 2010 (UTC)
- See /etc/sudoers. The idea is to restrict what commands can be run as root (by a particular user). Of course, in this case one could just use setuid (and then check the real uid against an access list if needed) if the kernel in question does it properly for shell scripts. --Tardis (talk) 20:25, 4 October 2010 (UTC)
- Sudo does have configurable access rights through the sudoers file (as Tardis points out). Sorry, I should have been clearer that I was hoping to restrict non-privileged users to a small set of programs/commands. I'm curious about the security risks of that. Shadowjams (talk) 20:29, 4 October 2010 (UTC)
- It's better than nothing, but you still really need to think through what a malicious abuser of one of those sudo commands can do. Can they create a suid-root executable (or set an existing root executable suid)? Can they insert an executable, or a link to one, or a symlink, into a directory that's on root's path, and so get root to run that inadvertently (and ditto for other privileged accounts that run servers). Can they manipulate device files, mount points, or temporary files in a way that could let them gain full root (or persuade genuine root processes to do something unexpected)? Can someone abuse the dynamic loading mechanism, or the tracing mechanism, to persuade the sudoed executable to load code the abuser generated? And do any of the programs that the sudoers can run, or any subprogram, shell out? - all kinds of things like mail clients and text editors will let you. sudo is better than su, but there's a lot to consider. -- Finlay McWalter ☻ Talk 21:25, 4 October 2010 (UTC)
- Incidentally I think sudo does take care of some of this (no time for research: cooking), in particular I hope it doesn't use the user's LD_LIBRARY_PATH or allow a user process to ptrace into sudo (surely the kernel will prevent that). -- Finlay McWalter ☻ Talk 21:48, 4 October 2010 (UTC)
- The most important thing is to make sure that all commands in the script are specified by absolute paths, so that the user can't substitute a "trojan" for any command in your script. That's not by any means the only risk, but it is the most obvious one. Looie496 (talk) 23:15, 4 October 2010 (UTC)
- In general setuid scripts (and programs in general) have been a rich source of security holes, so yes. This page covers some of the angles. --Sean 16:19, 5 October 2010 (UTC)
- Writing a simple suid'd binary in C that starts the script would probably be the safer bet than messing with sudo or suid scripts. Something like:
#include <stdlib.h>
int main (int argc, const char * argv[])
{
int errCheck = system("/bin/sh /path/to/myscript.sh");
if (errCheck == -1 || errCheck == 127) {
/* means the fork or the shell failed somehow, do something about the error here */
}
return errCheck;
}
- Better yet would be to port the script to C as a stand alone program. Horselover Frost (talk · edits) 06:54, 6 October 2010 (UTC)
- In general, never ever call
system(3)
, and especially not under setuid (as the man page says). Use theexec(3)
family (probablyexecl()
for this case; notexec*p()
) instead. (system()
returns a wait status anyway, so you'd need to useWEXITSTATUS()
and friends to analyze the return value.) --Tardis (talk) 14:06, 6 October 2010 (UTC)- I was using the BSD man pages (I'm on OS X), which are a bit different. Thanks for the info though. Horselover Frost (talk · edits) 20:54, 6 October 2010 (UTC)
- In general, never ever call
Photo Editing
So I have some photos that I took of the night sky, with moderate exposure lengths (10-15 s). My camera isn't terribly good, and there's a lot of noise in the photos (example). I can visually tell what's a star and what's noise (at least for the bright stars), but would there be any way to tell some photo editing software to treat everything below a certain threshold as black, thus eliminating most noise, plus some of the dimmest stars? I realize that this wouldn't necessarily give me an accurate representation of how the sky looked exactly, but it would make it much easier to identify individual stars with a star chart. Buddy431 (talk) 21:55, 4 October 2010 (UTC)
- I believe that both Photoshop and The Gimp have an actual feature called "threshold" that might be what you're looking for, but is probably too extreme. Probably what you want to do is to bring up the "Levels" dialog in either of those programs, and drag the "black" slider (On the far left of the histogram) a little bit to the right. APL (talk) 22:34, 4 October 2010 (UTC)
- And if you want to be very fancy, astrophysical image processing software exists. Ideally what you want to do is perform image registration against a known star chart, and then use a numerical optimization scheme to determine a "best fit" between your stars and known stars. Then, a series of estimation algorithms can attempt to determine whether a particular "speckle" is a true object or a noise. Stacking multiple images of the same area of sky is a good way to coherently add stars and incoherently attenuate random thermal noise (electronic sensor noise, usually - but the occasional cosmic ray striking your camera sensor will register as a blip too!) Nimur (talk) 23:11, 4 October 2010 (UTC)
- Thanks. The "levels" thing in GIMP worked pretty well. I also appreciate the information about dedicated astrophotography image processing software, though I am not in a situation where I would use such a thing. Incidentally, what exactly am I doing when I adjust the "levels" slider in GIMP? Buddy431 (talk) 03:28, 5 October 2010 (UTC)
- You are transforming the brightness values according to a curve whose shape you are adjusting. Gimp has a similar tool called Curves that would also probably have solved your problem, and is a bit easier to understand because you can actually see the transformation you are creating, but it's a little harder to use than Levels. The documentation for the Levels tool is here, but unfortunately it isn't very easy to make sense of. Looie496 (talk) 04:00, 5 October 2010 (UTC)
- Thanks. The "levels" thing in GIMP worked pretty well. I also appreciate the information about dedicated astrophotography image processing software, though I am not in a situation where I would use such a thing. Incidentally, what exactly am I doing when I adjust the "levels" slider in GIMP? Buddy431 (talk) 03:28, 5 October 2010 (UTC)
- And if you want to be very fancy, astrophysical image processing software exists. Ideally what you want to do is perform image registration against a known star chart, and then use a numerical optimization scheme to determine a "best fit" between your stars and known stars. Then, a series of estimation algorithms can attempt to determine whether a particular "speckle" is a true object or a noise. Stacking multiple images of the same area of sky is a good way to coherently add stars and incoherently attenuate random thermal noise (electronic sensor noise, usually - but the occasional cosmic ray striking your camera sensor will register as a blip too!) Nimur (talk) 23:11, 4 October 2010 (UTC)
- The Histogram represents the current distribution of brightness values in the image. You're asking the program to redistribute those values so that everything to the left of the black slider goes to pure black, everything to the right of the white slider goes to pure white, and the values in the middle are "stretched" to fill the whole gamut from white to black. (You can also move the mid-point slider to effect how the values are "stretched".)
- Like Looie496 says, the Curves tool does the same thing, and it does it in a way that makes the math easier to understand, but (in my opinion) is virtually impossible to use. APL (talk) 15:07, 5 October 2010 (UTC)
IPv5
I know that there is IPv4 and IPv6, but what happened to IPv5? Why did they skip from v4 to v6? Feinoha Talk, My master 23:34, 4 October 2010 (UTC)
- From our IPv6 article - "The IETF assigned version 6 for the new protocol as a successor to version 4, because version 5 had previously been assigned to an experimental protocol, the Internet Stream Protocol, similar to IPv4, intended to support video and audio." --LarryMac | Talk 23:44, 4 October 2010 (UTC)
- (ec) - Our article has a section on version history: "Version numbers 0 through 3 were development versions of IPv4 used between 1977 and 1979. Version number 5 was used by the Internet Stream Protocol, an experimental streaming protocol." Nimur (talk) 23:44, 4 October 2010 (UTC)
October 5
Scripting OpenRPG
Can someone tell me where I can find a tutorial for scripting in OpenRPG? I already can program, and I would have no trouble finding a tutorial to learn Python. I just don't know how to run scripts on it, or how I'd make scripts use stuff on it.
Alternately, can someone tell me a different program like that and a tutorial for it? — DanielLC 00:28, 5 October 2010 (UTC)
Using Eclipse as a C++ compiler
I'm trying to use Eclipse on Windows XP, and it works fine for Java, but not C++. I've installed the CDT plugin, but when I try to run a program, it says that 'no binaries were found'. Also, I've tried building it, but that didn't do anything different. Help? KyuubiSeal (talk) 00:41, 5 October 2010 (UTC)
- From experience, I can tell you that it is quite a bit of work to get set up. And even more if you intend to do any serious, long-term work. If you are not prepared for such a task, then save yourself a lot of frustration and just install Visual C++ Express 2010. It is an excellent IDE with extremely compliant compiler even with significant support for C++0x. 180.11.188.56 (talk) 02:48, 5 October 2010 (UTC)
- Okay, I installed it. The components I selected were C++ compiler and MSYS Basic System. Now it's saying nothing to build. KyuubiSeal (talk) 14:47, 5 October 2010 (UTC)
- Also, isn't Visual C++ Express a trial edition? KyuubiSeal (talk) 20:19, 5 October 2010 (UTC)
- I don't believe so...their page says "The Visual Studio® 2010 Express is a set of free tools which offers you an exciting experience with the new integrated development environment, a new editor built in Windows® Presentation Foundation (WPF) and support for the new .NET Framework 4. " —Preceding unsigned comment added by Smallman12q (talk • contribs) 23:06, 5 October 2010 (UTC)
- Also, isn't Visual C++ Express a trial edition? KyuubiSeal (talk) 20:19, 5 October 2010 (UTC)
- No, it is fully functional and free. See Microsoft Visual Studio Express. 124.214.131.55 (talk) 23:10, 5 October 2010 (UTC)
- It doesn't build still. :\ When I try, the console shows this:
**** Build of configuration Debug for project Hello World ****
- WARNING: The "Debug" Configuration may not build ****
- because it uses the "MinGW GCC" ****
- tool-chain that is unsupported on this system. ****
- Attempting to build... ****
(Cannot run program "make": Launching failed)
- Also, the Terms of Service for Visual C++ Express, section 1b says "Trial Edition. The initial installation of the software is a trial edition. You may convert your trial rights at any time by obtaining a product key from Microsoft. The trial software will present conversion options to you thirty (30) days after you install the trial software. After the expiration of the 30-day trial period, without conversion, the trial software will stop running." So are the conversion options free then? KyuubiSeal (talk) 23:49, 5 October 2010 (UTC)
- Yes, it is free. If you're using it on a computer that isn't connected to the internet, you may need a Windows Live ID (also free) to acquire the product key.
decltype
(talk) 13:49, 6 October 2010 (UTC)
- Yes, it is free. If you're using it on a computer that isn't connected to the internet, you may need a Windows Live ID (also free) to acquire the product key.
- Have you ensured that the settings in the "Tool chain editor" under "Project properties" are correct?
decltype
(talk) 13:49, 6 October 2010 (UTC)- It says 'Current toolchain: MinGW GCC', 'Current builder: CDT Internal Builder'. But there's a warning saying 'The configuration support is not installed on the system' So did I mess up the installation of MinGW? KyuubiSeal (talk) 14:22, 6 October 2010 (UTC)
- Okay, I've just decided to give up on using Eclipse, and I installed Visual C++. I should have just followed the first response. :P One last question though. Is there an equivalent in Visual C++ to Eclipse's error-checking? EDIT: Okay, found it. Thank you! KyuubiSeal (talk) 21:14, 6 October 2010 (UTC)
- Also, the Terms of Service for Visual C++ Express, section 1b says "Trial Edition. The initial installation of the software is a trial edition. You may convert your trial rights at any time by obtaining a product key from Microsoft. The trial software will present conversion options to you thirty (30) days after you install the trial software. After the expiration of the 30-day trial period, without conversion, the trial software will stop running." So are the conversion options free then? KyuubiSeal (talk) 23:49, 5 October 2010 (UTC)
Phantom linux installation
While trying and failing to set up a dual-boot of Ubuntu on my Mac Pro, I accidentally installed the boot loader on my OSX hdd. My OSX install still works fine, but now whenever I start up my machine rEFIt shows a non-existent linux installation. Is there any way to get rid of this annoying behaviour? Horselover Frost (talk · edits) 01:29, 5 October 2010 (UTC)
- Presuming that Mac OS X is the only operating system left on your computer, have you tried to remove rEFIt? Xenon54 (talk) 01:36, 5 October 2010 (UTC)
- I could, but I would like to be successful in installing a linux one of these days. Horselover Frost (talk · edits) 02:13, 5 October 2010 (UTC)
- Also, knowing that little bit of dangling code is still there kind of annoys me. Horselover Frost (talk · edits) 02:14, 5 October 2010 (UTC)
Swapping 2 character arrays in C
Hi, so in C I have two character arrays: a[] = "this is a long piece of text!" b[] = "short" and I want to swap them. Can I just swap their pointers, using an intermediary middle variable, eg.: char * temp = a; &a = &b; &b = temp;
I'm just not sure if C somehow keeps track of the length of character arrays internally and I wanted to make sure switching the pointers to the variables would not screw up C's internal representations of the character arrays.
Thanks =) —Preceding unsigned comment added by Darkleg (talk • contribs) 05:09, 5 October 2010 (UTC)
- That's fine. In C strings have a ASCII NUL character delimiting the end of each string. CS Miller (talk) 05:43, 5 October 2010 (UTC)
- The code you showed above won't work, I'm pretty sure, because &a and &b are constants rather than variables when you declare them that way, but here is some that will:
char *a = "this is a long piece of text!"; char *b = "short"; char *temp = a; a = b; b = temp;
- Short answer, no. You seem to be a little bit confused about arrays and pointers in C. They are completely different concepts.[2] Yes, C does keep track of the array's length, because it is part of its type. The a and b objects are of type array of char. So attempting to assign the address of one to the other won't accomplish what you're trying to do. Why do you (think) you want to swap the two arrays?
decltype
(talk) 06:03, 5 October 2010 (UTC)
- Short answer, yes. It is not completely clear what you (the OP) mean by "swap" in this context, but you can assign the address of one string to a pointer that used to hold the address of another string, no problem.
- I don't know what Decltype means by "completely different concepts", either, and his link is broken. C is not a high-level language, it is a structured assembler, and happily allows you to assign all kinds of things to each other that other languages, with stronger typing features, will not allow. In C, the type "array of char" and the type "pointer to char" are closely related; a pointer to char is how an array of char is implemented, and C run-times typically do NOT keep track of the length of an array internally. There is no mechanism for knowing, at run-time, how many elements are in an array, which is why C has the convention of putting a null character at the end of an array of characters (a.k.a. a 'string').
- rc (talk) 15:10, 5 October 2010 (UTC)
- All that is true to an extent, but not really relevant. (For instance, this is a compile-time issue, so the "unknown" length of arrays at run time is unimportant.) The OP tries to assign to the result of the & operator, which is not an lvalue. It's not proper to say that an array is "implemented" as a pointer: an array (used as an rvalue) decays into a pointer to its first element, but you can't change that value because the array is actually occupying memory there and you can't change the address of that memory. (Since you can't assign to an array, the only way to use an array as an lvalue and see it for what it really is is to use the & or sizeof operators.) You can of course assign to pointer variables; the line
const char *s="foo";
is more or less equivalent to
- All that is true to an extent, but not really relevant. (For instance, this is a compile-time issue, so the "unknown" length of arrays at run time is unimportant.) The OP tries to assign to the result of the & operator, which is not an lvalue. It's not proper to say that an array is "implemented" as a pointer: an array (used as an rvalue) decays into a pointer to its first element, but you can't change that value because the array is actually occupying memory there and you can't change the address of that memory. (Since you can't assign to an array, the only way to use an array as an lvalue and see it for what it really is is to use the & or sizeof operators.) You can of course assign to pointer variables; the line
- rc (talk) 15:10, 5 October 2010 (UTC)
const char __literal_42[]="foo"; /* the compiler stashes the string literal somewhere */
const char *s=__literal_42; /* equivalently, &__literal_42[0] */
- It's also possible, of course, to exchange the contents of two arrays (if they are of appropriate length). For instance:
char a[]="short\0a lot of dummy text",b[]="eleventyone",tmp[15]; /* sizeof a=26, sizeof b=12, sizeof tmp=15 */
strcpy(tmp,b); strcpy(b,a); strcpy(a,tmp);
- The null character in a makes it be 5 characters long as a string but with space for much more. strcpy() won't overflow on any of these because it stops at the NUL. However, you can't do this explicit copying with pointers to string literals because string literals are read-only. --Tardis (talk) 16:03, 5 October 2010 (UTC)
- What Tardis said. A pointer to char is not how an array is implemented, and the mechanism for determining the number of elements in an array, both at compile time, and run time, is the sizeof operator. It is true that the OP said "swap their pointers", however, in the example she is indeed trying to assign to its address (an rvalue). I stand by the statement that arrays and pointers are completely different: An array is a nonempty set of contiguous objects of a particular type; a pointer provides a reference to exactly one object.
decltype
(talk) 11:47, 6 October 2010 (UTC)
- What Tardis said. A pointer to char is not how an array is implemented, and the mechanism for determining the number of elements in an array, both at compile time, and run time, is the sizeof operator. It is true that the OP said "swap their pointers", however, in the example she is indeed trying to assign to its address (an rvalue). I stand by the statement that arrays and pointers are completely different: An array is a nonempty set of contiguous objects of a particular type; a pointer provides a reference to exactly one object.
- The null character in a makes it be 5 characters long as a string but with space for much more. strcpy() won't overflow on any of these because it stops at the NUL. However, you can't do this explicit copying with pointers to string literals because string literals are read-only. --Tardis (talk) 16:03, 5 October 2010 (UTC)
- Because this is getting a bit complex, let me re-emphasize the main points: (1) the concept is valid; (2) the actual code shown by the OP won't work, or even compile; (3) the code that I showed above will work. Looie496 (talk) 17:43, 6 October 2010 (UTC)
How are my internet contributions sorted?
I'm a novice as far as computing and the internet go, but I have been posting to WP, Yahoo QA and IMBD for several years. For something to do, I put my user name, myles325, into google, and was surprised to see about 17 pages of references to myles325, mostly to me, but to some mysterious doppelganger who bears the same user name. I re-read some of my old contributions, mostly humorous ones, but now kept in strange sites that I never knew existed. And the final google pages consisted of some of my writings translated into German and a host of other languages.
What really puzzled me was how these particular pieces came to be immortalized, and not most of the stuff I wrote, which does not appear anywhere. How is it that the same 2 line quip I made on some subject back in 2007 is listed 7 times, 3 of them in garbled translations, but the vast majority of my writings does not? It all seems so random. How does this stuff get kept, and why does some material appear over and over again, while other stuff, much of it superior to the displayed material, never gets a mention? Myles325a (talk) 07:24, 5 October 2010 (UTC)
- Because it's not up to you. ¦ Reisio (talk) 11:43, 5 October 2010 (UTC)
Many sites mirror Wikipedia and other wikis, and often don't keep their mirror up to date. So say they mirrored Wikipedia in 2007, only content up to that date will be saved. Then, that mirror is turn is mirrored by other sites and crawled by google, so you have an out of date copy of the content being displayed in google search results.There's no order or reason behind it, it's just sites duplicating content. See also Wikipedia:Mirrors and forks 82.44.55.25 (talk) 14:04, 5 October 2010 (UTC)
- Myles325, you asked how your typing on the Internet is "sorted". See PageRank for Google's algorithm on the order in which search results are displayed; Bing and Ask.com and all the other search engines have their own variants. Your contributions aren't really collected in a single folder somewhere on Google's servers; rather, all the web pages that Google caches are jumbled around in some proprietary, secret order; but the important thing is PageRank's discerning of how many other pages on the Web point to each page. Comet Tuttle (talk) 16:56, 5 October 2010 (UTC)
- Also note that despite its popularity, Google is not the authoritative source for sorting content on the internet. They are just "the currently most popular, easy to use, public" web-page for sorting content. Anybody else, including yourself, may make a web-page or other publication and sort your contributions in any way they choose. Google in particular has no obligation to sort its search results based on what you want; if you want creative control, you should create your own web-page with a list of your works, and tell people who are looking for your works to use your page. Creating such a page may indirectly cause Google's automated search system to re-prioritize search results, if their system determines that your own page is the "authoritative listing" for all Myles325a-related queries. In this way, you can "help" Google sort your contributions according to your preferences in two ways: first, search engine optimization (which would entail structuring your contributions on the internet in such a way to "hint" to Google's algorithm); and second, by sponsored search - in other words, paying them for a contract to deliver search results in some particular order. Google's policy regarding sponsored results is clearly outlined here: Sponsored Links from Google. Google usually displays sponsored links in a different way than regular search query results (most obviously, if you use www.google.com in the United States, they actually place Sponsored Links in a separate div with a different color). But depending on how somebody performs a Google search (i.e., through a vendor web-site, or a Google-powered online shopping system, and so forth), it may not be clear that your query-results are sponsored results. Similar explanation applies to all other search portals and content aggregators. Nimur (talk) 21:47, 5 October 2010 (UTC)
OP myles325a back. Thanks, guys. Your answers were more thorough and pertinent than I could have reasonably expected. Full marks all around, even to the guy who simply noted: "It's not up to you". Myles325a (talk) 02:51, 6 October 2010 (UTC)
Free Hardsub Video Software
Is there any other free software that allows you to add subtitles on videos besides Windows Movie Maker and DivXLand Media Subtitler? —Preceding unsigned comment added by 219.75.98.33 (talk) 08:23, 5 October 2010 (UTC)
- http://aegisub.cellosoft.com/docs/Attaching_subtitles_to_video But this is quite a terrible thing to do, IMO. ¦ Reisio (talk) 11:46, 5 October 2010 (UTC)
Python shared reference
I'm learning python, from the excellent O'Reilly book by Mark Lutz. I am learning about in-place changes:
>>> L1 = [2,3,4] >>> L2=L1 >>> L1[0] = 24 >>> L1 [24,3,4] >>> L2 [24,3,4]
OK, I understand this. What I don't understand is why Lutz says "This behaviour is usually what you want". Why? Why would anyone bother to create two variables, L1 and L2, so that a change to L1 is reflected, possibly confusingly, in L2? Robinh (talk) 20:16, 5 October 2010 (UTC)
- Because you conceptually treat the list as an object, with multiple references to it. If you want a different object, you can explicitly create it by calling the list constructor (
L2=list(L1)
). Consider the opposite case: you always get a deep copy and need to explicitly call a reference operator if you want to refer to the same object. That would get tiresome very fast, and whenever you forget it, you waste plenty of time and memory. And we are not only talking about assignments, but also about parameter passing into functions and methods. --Stephan Schulz (talk) 20:35, 5 October 2010 (UTC)- Thanks for this. But I still don't see why anyone would want to create L2 at all. Why not just deal with L1 and dispense completely with L2? (ie, expunge L2 from all the code)? Robinh (talk) 20:41, 5 October 2010 (UTC)
- Consider this example:
# each of these people has a list of their favourite numbers
faves = [ ("alice", [1,2,3,4,5,6]),
("bob", [1,1,2,3,5,8]),
("carol", [2,3,5,7,11,13]),
("dave", [-1,-2,-3,-4,-5,-6]) ]
# print each person's third favourite number
for (name, numbers) in faves:
print "%s's third favourite number is %d" %(name,numbers[2])
- In it, as we iterate through faves, numbers is assigned to each of the lists of integers in turn. As with Lutz' example that you quote, its a shallow copy; merely an assignment of a reference (rather than a deep copy, which is the alternative Stephan posits). In this case, the shallow copy is just what we want; we just want numbers to be a temporary reference to the specific list we're very briefly talking about. -- Finlay McWalter ☻ Talk 20:55, 5 October 2010 (UTC)
- Incidentally, if you're thinking "but he's not actually assigning with the = operator", I've just used the nice python iterator syntax. That for loop is essentially the same as:
- In it, as we iterate through faves, numbers is assigned to each of the lists of integers in turn. As with Lutz' example that you quote, its a shallow copy; merely an assignment of a reference (rather than a deep copy, which is the alternative Stephan posits). In this case, the shallow copy is just what we want; we just want numbers to be a temporary reference to the specific list we're very briefly talking about. -- Finlay McWalter ☻ Talk 20:55, 5 October 2010 (UTC)
for x in range(0,len(faves)):
name = faves[x][0]
numbers = faves[x][1]
print "%s's third favourite number is %d" %(name,numbers[2])
- Our articles on this topic are Reference (computer science) and Pointer (computing). --Sean 21:05, 5 October 2010 (UTC)
- Thanks guys. It will take me some considerable time to digest this. Thanks again, Robinh (talk) 21:15, 5 October 2010 (UTC)
- Don't worry that you've found this idea challenging. This (understanding the difference between objects and names-for-objects) is one of the deep and important ideas in programming, and once you get it lots of stuff will just make sense. Incidentally the bloke above in the #Swapping 2 character arrays in C is in just the same place you are. -- Finlay McWalter ☻ Talk 21:57, 5 October 2010 (UTC)
- I kinda disagree with Lutz's assertion. This may be what you want; the behavior allows you do express some new things, but it does so at the cost of being confusing. I generally prefer to avoid behavior like this because it can be very hard to figure out what's going on. It's even possible to program without ever assigning or changing the value of anything, and Python provides the some of the tools necessary to make this practical: list comprehensions (which are really just filter and map in disguise) and anonymous functions. If working with shared state is confusing in some context, don't assume that you just need to think harder; try expressing the problem differently. Paul (Stansifer) 17:27, 6 October 2010 (UTC)
- Even with purely functional work, the distinction between a reference and an object persists: consider
eq
andequal
in Lisp (admittedly not pure). Referential transparency may make some comparisons of identity meaningless, but it's still reasonable to consider a list of things and see if it contains the same one multiple times or merely equivalent things. Of course, you can choose to do otherwise: Mathematica has no intrinsic concept of references, and implements all assignments as notional copies (probably really copy on write or so). And you can implement your own reference discipline by always referring to things through a dictionary (even if the dictionary never changes: defineeq
as andequal
as ). --Tardis (talk) 17:41, 6 October 2010 (UTC)
- Even with purely functional work, the distinction between a reference and an object persists: consider
(OP here). I have been pondering the answers above. How about "This behaviour is usually what you want, when you find yourself referring to the same mutable object using two different names (usually one short name for local use, and one long "real" name that occurs in a wider context)". Not as catchy, I know, but more helpful? Robinh (talk) 07:19, 7 October 2010 (UTC)
- I'd say that you could cut that down to "This behavior allows you to refer to the same mutable object from different objects." Having two names for something usually isn't useful, but sometimes you want to get to something from two different paths. For example, imagine that you're writing a simulation game involving a bunch of city-states, and you have objects representing the state of their diplomatic relationship. If events affecting only one city-state can cause diplomatic changes, you'll want both of them to have references to that one mutable object. It's a contrived example, but yesterday, actually, I speced out a design with someone, and the program we will write will be doing this kind of thing (it's a big search problem, and an optimization that turns out to be useful is for the search to have an idea of how interesting particular directions have been recently). Paul (Stansifer) 14:13, 7 October 2010 (UTC)
Aha. Light goes on over head:
>>> L1 = [2,3,4] >>> fish = [1,2,L1] >>> fosh = [3,4,L1] >>> fish[2][1] = 0 >>> fosh [3, 4, [2, 0, 4]] >>>
Brilliant! Thanks Paul and the others. Best wishes Robinh (talk) 18:28, 7 October 2010 (UTC)
Internet issues
What would cause one's internet connection to become incredibly unstable, given the router has not changed and the line has likewise not been altered? —Jeremy (v^_^v PC/SP is a show-trial!) 20:30, 5 October 2010 (UTC)
- Maintenance or infrastructure changes at the internet service provider level can cause performance degradation and outages. Nimur (talk) 21:32, 5 October 2010 (UTC)
- For better than a whole week? —Jeremy (v^_^v PC/SP is a show-trial!) 21:35, 5 October 2010 (UTC)
- It depends. What kind of instability? Do the lights on your modem change? Do you get any messages from your operating system?--Best Dog Ever (talk) 21:39, 5 October 2010 (UTC)
- MSN signs me out every 20 or so minutes; IRC lags for chunks of 10-15 min. or more, often resetting my connection; websites load intermittently, sometimes normally, sometimes not loading up at all. —Jeremy (v^_^v PC/SP is a show-trial!) 21:43, 5 October 2010 (UTC)
What kind of internet is it? Cable modem, ADSL, etc? 82.44.55.25 (talk) 21:51, 5 October 2010 (UTC)
- Cable. —Jeremy (v^_^v PC/SP is a show-trial!) 21:52, 5 October 2010 (UTC)
- Check your modems downstream and upstream SNR levels, they should be viewable in the congif page (usually http://192.168.100.1/ or http://192.168.100.2/) If they're outside of normal limits that can cause unstable internet 82.44.55.25 (talk) 22:03, 5 October 2010 (UTC)
- Downstream SNR (I assume that means Signal:Noise Ratio) is 37 dB. Nothing on Upstream. —Jeremy (v^_^v PC/SP is a show-trial!) 22:09, 5 October 2010 (UTC)
- Hello? —Jeremy (v^_^v PC/SP is a show-trial!) 00:13, 6 October 2010 (UTC)
- The downstream SNR should be 30 or more. So, 37 is good. Try connecting directly to your modem instead of the router and see if the problem stops. What happens to the lights on your modem when your connection starts acting up? I assume you connect to the router using a wire?--Best Dog Ever (talk) 01:08, 6 October 2010 (UTC)
- I do use a wire to connect to the router; it and the router, AFAIK, have not changed. The only thing different was that the router was down for ~ 3 hrs two Sundays ago, and that the problems started the immediate next day. I cannot connect directly to the modem because I have no access to the modem. —Jeremy (v^_^v PC/SP is a show-trial!) 01:38, 6 October 2010 (UTC)
- You should have wrote, "nothing I see or control has changed," because modems and routers can start dying out of the blue, in which case the only solution is to replace the modem or router. The downstream signal level may change when you're having troubles, then go back to normal in a few minutes. There are no moving parts inside those devices, so they don't break often, but they still do break. There could also be a problem with the cable to the router. So, you could try a different cable. Also, if you cannot access the router, perhaps you should talk to whoever is in charge there and ask them to connect your computer straight to the modem. Where is this happening, by the way? And if a direct connection to the modem doesn't solve it, you should call your ISP, because it could be an indication of a problem with the modem. It could also be an indication of a problem outside of your home with the ISP's equipment.--Best Dog Ever (talk) 01:49, 6 October 2010 (UTC)
- I would ask if not for the fact we are in the process of moving and will not be here in three weeks; those who do have access see that as the higher priority. As to where, I am in the extreme south of Everett, about three or four miles from the city boundary. —Jeremy (v^_^v PC/SP is a show-trial!) 02:30, 6 October 2010 (UTC)
- I suspect the router, too, for what it's worth. Out of the 8 or 10 consumer-grade routers I am responsible for, about 1 seems to "die" every year, and usually the "death" isn't a total outage, which would make it easier to diagnose, but is an annoying malfunction of some kind where the latency or throughput seems crippled. Comet Tuttle (talk) 22:18, 6 October 2010 (UTC)
- The situation here has changed a bit, and I have another question: Would resetting the router via the reset switch on it fix it? —Jeremy (v^_^v PC/SP is a show-trial!) 05:25, 7 October 2010 (UTC)
- I suspect the router, too, for what it's worth. Out of the 8 or 10 consumer-grade routers I am responsible for, about 1 seems to "die" every year, and usually the "death" isn't a total outage, which would make it easier to diagnose, but is an annoying malfunction of some kind where the latency or throughput seems crippled. Comet Tuttle (talk) 22:18, 6 October 2010 (UTC)
- I would ask if not for the fact we are in the process of moving and will not be here in three weeks; those who do have access see that as the higher priority. As to where, I am in the extreme south of Everett, about three or four miles from the city boundary. —Jeremy (v^_^v PC/SP is a show-trial!) 02:30, 6 October 2010 (UTC)
- You should have wrote, "nothing I see or control has changed," because modems and routers can start dying out of the blue, in which case the only solution is to replace the modem or router. The downstream signal level may change when you're having troubles, then go back to normal in a few minutes. There are no moving parts inside those devices, so they don't break often, but they still do break. There could also be a problem with the cable to the router. So, you could try a different cable. Also, if you cannot access the router, perhaps you should talk to whoever is in charge there and ask them to connect your computer straight to the modem. Where is this happening, by the way? And if a direct connection to the modem doesn't solve it, you should call your ISP, because it could be an indication of a problem with the modem. It could also be an indication of a problem outside of your home with the ISP's equipment.--Best Dog Ever (talk) 01:49, 6 October 2010 (UTC)
- I do use a wire to connect to the router; it and the router, AFAIK, have not changed. The only thing different was that the router was down for ~ 3 hrs two Sundays ago, and that the problems started the immediate next day. I cannot connect directly to the modem because I have no access to the modem. —Jeremy (v^_^v PC/SP is a show-trial!) 01:38, 6 October 2010 (UTC)
- The downstream SNR should be 30 or more. So, 37 is good. Try connecting directly to your modem instead of the router and see if the problem stops. What happens to the lights on your modem when your connection starts acting up? I assume you connect to the router using a wire?--Best Dog Ever (talk) 01:08, 6 October 2010 (UTC)
- Hello? —Jeremy (v^_^v PC/SP is a show-trial!) 00:13, 6 October 2010 (UTC)
- Downstream SNR (I assume that means Signal:Noise Ratio) is 37 dB. Nothing on Upstream. —Jeremy (v^_^v PC/SP is a show-trial!) 22:09, 5 October 2010 (UTC)
- Check your modems downstream and upstream SNR levels, they should be viewable in the congif page (usually http://192.168.100.1/ or http://192.168.100.2/) If they're outside of normal limits that can cause unstable internet 82.44.55.25 (talk) 22:03, 5 October 2010 (UTC)
- (RI) Hello? —Jeremy (v^_^v PC/SP is a show-trial!) 18:16, 7 October 2010 (UTC)
- Probably not. You haven't mentioned the manufacturer and model number of your router, but usually the "Reset" button will reset the router back to a default configuration. This may fix things if the router's firmware has some sort of bug in the firmware that causes it to suck more over time; but this seems unlikely. On the negative side, for many or most routers, the "Reset" button will reset all the passwords and settings, so it might mess up your whole network configuration. I'm afraid you're going to have to ask the IT people to fix the problem. (Note for future use of the Reference Desk: Typing "Hello?" doesn't make it more likely that volunteers will stop by to check the thread and follow up.) Comet Tuttle (talk) 18:41, 7 October 2010 (UTC)
- Which means I'm screwed for three weeks. Thanks. :/ —Jeremy (v^_^v PC/SP is a show-trial!) 18:43, 7 October 2010 (UTC)
- Probably not. You haven't mentioned the manufacturer and model number of your router, but usually the "Reset" button will reset the router back to a default configuration. This may fix things if the router's firmware has some sort of bug in the firmware that causes it to suck more over time; but this seems unlikely. On the negative side, for many or most routers, the "Reset" button will reset all the passwords and settings, so it might mess up your whole network configuration. I'm afraid you're going to have to ask the IT people to fix the problem. (Note for future use of the Reference Desk: Typing "Hello?" doesn't make it more likely that volunteers will stop by to check the thread and follow up.) Comet Tuttle (talk) 18:41, 7 October 2010 (UTC)
- Actually let me retract the "let the experts fix it" part for a second — if you now have access to the router, do you also have access to try disconnecting the router from the cable modem, and plugging your computer's Ethernet cable directly into the cable modem? Comet Tuttle (talk) 18:42, 7 October 2010 (UTC)
- I have access to the router, but not the modem. —Jeremy (v^_^v PC/SP is a show-trial!) 18:43, 7 October 2010 (UTC)
- Actually let me retract the "let the experts fix it" part for a second — if you now have access to the router, do you also have access to try disconnecting the router from the cable modem, and plugging your computer's Ethernet cable directly into the cable modem? Comet Tuttle (talk) 18:42, 7 October 2010 (UTC)
- In that case, if you are allowed to, you could check whether the router is the problem by (a) buying a cheap router and swapping the old router for the new one; or (b) unplugging both Ethernet cables from the router and plugging both the cables into a coupler like this one, so effectively your computer is connected directly to the cable modem. Comet Tuttle (talk) 21:27, 7 October 2010 (UTC)
Merging Myspace account with Wix website
How can i merge my myspace account with my wix website.thank you —Preceding unsigned comment added by 76.95.189.87 (talk) 23:48, 5 October 2010 (UTC)
- Wikipedia is not Myspace and is for a different purpose. You can cross link between the two pages if you like though. Graeme Bartlett (talk) 20:50, 6 October 2010 (UTC)
- It is probable the OP meant "Wix.com". They might find this tutorial helpful. Nimur (talk) 20:52, 6 October 2010 (UTC)
My topic may soon be deleted :(
My topic TheTechGame.com says that it will be deleted soon. i made this page as a page for members of TheTechGame.com to find out about history and so much more about TTG. i spent a while trying to do this and it says its gunna be deleted. is there anything i can do? —Preceding unsigned comment added by Tvise2 (talk • contribs) 23:51, 5 October 2010 (UTC)
- This page is not for help with Wikipedia en generale; see WP:Help desk instead. —Jeremy (v^_^v PC/SP is a show-trial!) 00:07, 6 October 2010 (UTC)
- Too late. It looks like it was speedy deleted as "Unambiguous advertising or promotion".
- You can ask User:Athaenara about it, But probably what it was missing was some assertion of it's importance and notability. APL (talk) 14:28, 6 October 2010 (UTC)
- You probably want to read WP:N to find out more about what is considered to be notable and what is not. --Tagishsimon (talk) 15:51, 6 October 2010 (UTC)
October 6
Internet domain seized
I came across this link on a forum, Movies Links.tv, and there is an interesting seizure notice. I have never seen a website seized by the US government (or any government for that matter) before. Is this a new thing we should be expecting now? My understanding is that the Combating Online Infringement and Counterfeits Act bill is still being proposed for hearing. I'm not sure what my question is, but I suppose it could be: Was the seizure of movies-links.tv a legal or ethical move on the part of the US government (despite however illegal and unethical the site may have originally been)? I'm not looking for opinions, I was hoping for some substantial explanation of what this website seizure was, and if we should expect more of it in the near future. thank you. Nimbuskindling (talk) 18:05, 6 October 2010 (UTC)
- I think you're in the wrong section; this is a reference desk about using computers, not for legal questions. —Jeremy (v^_^v PC/SP is a show-trial!) 18:09, 6 October 2010 (UTC)
- I don't see a problem with the question. The computer desk if for "Computing, information technology, electronics, software and hardware", and this question surely qualifies as that. 82.44.55.25 (talk) 18:21, 6 October 2010 (UTC)
- Reread the question: Was the seizure of movies-links.tv a legal or ethical move on the part of the US government (despite however illegal and unethical the site may have originally been)? That is explicitly a legal question. —Jeremy (v^_^v PC/SP is a show-trial!) 18:53, 6 October 2010 (UTC)
- A legal question about a computer related topic. Websites, domain names, servers etc all fall under the computer desk. Note that the question is not asking for legal advice, which would be against the guidelines. 82.44.55.25 (talk) 19:02, 6 October 2010 (UTC)
- Reread the question: Was the seizure of movies-links.tv a legal or ethical move on the part of the US government (despite however illegal and unethical the site may have originally been)? That is explicitly a legal question. —Jeremy (v^_^v PC/SP is a show-trial!) 18:53, 6 October 2010 (UTC)
- I don't see a problem with the question. The computer desk if for "Computing, information technology, electronics, software and hardware", and this question surely qualifies as that. 82.44.55.25 (talk) 18:21, 6 October 2010 (UTC)
- It's not that new. It happened to The iSONEWS a few years back. It's a bit of a silly show of force to confiscate a domain name, if you ask me. AS web-site is almost entirely independent of it's domain. The iSONEWS team just registered a new domain and kept on rolling.
- I notice that http://www.movies-links.tv.info is a valid domain. Perhaps it's run by the same people? APL (talk) 18:24, 6 October 2010 (UTC)
- It is impossible to evaluate on face-value whether that notice is legitimate. For all we know, the owner of the website might have put it up there as a statement, or publicity stunt, or so on. If you're particularly curious, you could presumably contact the U.S. Attorney's Office for the Southern District of New York: here is their web page, and ask them to verify whether they are responsible for this seizure. (Addendum - after edit-conflict, Looie496 seems to have provided a relevant corroborating link from the D.o.J.) Nimur (talk) 18:27, 6 October 2010 (UTC)
- You can find an explanation of the seizure in this document. Looie496 (talk) 18:27, 6 October 2010 (UTC)
Thanks to everyone for their answers. I definitely was not asking for legal advice, but I was merely curious what was going on. Looie496, the PDF answers any questions I may have had, and actually gives me several more. But that would be beyond the scope of objectivity. I really appreciate everyone's comments, thank you. Nimbuskindling (talk) 19:45, 6 October 2010 (UTC)
- The site was seized by U.S. Immigration and Customs Enforcement (ICE) as part of their “Operation In Our Sites”.Smallman12q (talk) 23:57, 6 October 2010 (UTC)
Makefile/library compilation issue
Hi. I'm working on a project that requires compiling C and Fortran source code (in $proj/src/core, into a static library, and then link driver routines (e.g. in $proj/src/serial to the library. I'm also trying to place all the object files in a $proj/obj directory, and Fortran module files in $proj/mod. I got that working all right, but for some reason, make is compiling everything all the time, even when no changes have been made to the sources.
The Makefile I'm using is the following, with $(INSTALL_DIR) being $proj above:
include ../../Makefile.in
#This is the src/core Makefile
OBJS= /* f90 object files */
CFILES= /* c object files */
LIBNAME=libcore.a
# Common compiler options for all target combinations
CFLAGS= $(CFLAGS_ALL)
FCFLAGS= $(FCFLAGS_ALL)
INCLUDES=$(HDF_INCLUDES) $(PARMETIS_INCLUDES)
LFLAGS=$(HDF_LIB) $(PARMETIS_LIB)
# Output path
INSTALL_DIR=$(shell pwd | sed -e 's/\/src\/core.*$///')
OBJPATH=$(INSTALL_DIR)/obj/core
MODPATH=$(INSTALL_DIR)/mod/core
LIBPATH=$(INSTALL_DIR)/lib
# Attach debugging compiler options for debug configurations
debug debug-nohdf: FCFLAGS+=$(FCFLAGS_DEBUG)
# Override INCLUDES AND LFLAGS and attach the NOHDF preprocessor directive
# for the nohdf configurations
nohdf debug-nohdf: INCLUDES=$(PARMETIS_INCLUDES)
nohdf debug-nohdf: FCFLAGS+=$(FCFLAGS_NOHDF)
nohdf debug-nohdf: LFLAGS=$(PARMETIS_LIB)
# Attach optimazation compiler options for opt configuration
opt: FCFLAGS+=$(FCFLAGS_OPT)
$(LIBNAME):$(CFILES) $(OBJS) Makefile
cd $(OBJPATH); $(AR) $(ARFLAGS) $(LIBPATH)/$(LIBNAME) $(OBJS) $(CFILES); $(RL) $(LIBPATH)/$(LIBNAME)
debug debug-nohdf nohdf opt: $(LIBNAME)
%.o : %.F90
$(F90) $(FCFLAGS) $(INCLUDES) $(MODFLAG)$(MODPATH) -c $*.F90 -o $(OBJPATH)/$*.o $(LFLAGS)
%.o : %.c
$(CC) $(CFLAGS) $(INCLUDES) -c $*.c -o $(OBJPATH)/$*.o $(LFLAGS)
clean:
-cd $(OBJPATH); rm *.o
-cd $(MODPATH); rm *.mod
-cd $(LIBPATH); rm $(LIBNAME)
Am I doing something that is clearly confusing Make? Titoxd(?!? - cool stuff) 21:20, 6 October 2010 (UTC)
- What command are you using to run make ? If you make libcore.a, do you get a different result than if you check the status for a specific file, e.g., make (specific_file).o? Nimur (talk) 21:28, 6 October 2010 (UTC)
- Also - this is probably the problem: your rule is actually for %.o but it creates a file called $(OBJPATH)/$*.o. Switch your rule to:
$(OBJPATH)/%.o : %.F90
$(F90) $(FCFLAGS) $(INCLUDES) $(MODFLAG)$(MODPATH) -c $*.F90 -o $(OBJPATH)/$*.o $(LFLAGS)
$(OBJPATH)/%.o : %.c
$(CC) $(CFLAGS) $(INCLUDES) -c $*.c -o $(OBJPATH)/$*.o $(LFLAGS)
- Technically, this means that your rule never creates the file it thinks it's defining (so even after compiling, ./somefile.o doesn't exist in the current directory). Consider using $@ for the output to guarantee that your rule actually creates the file that it's defining. Nimur (talk) 21:31, 6 October 2010 (UTC)
- I'm just using make and make debug as targets. Let me try the $(OBJPATH) fix. Where would I put the $@? (I'm relatively new with Makefiles) Titoxd(?!? - cool stuff) 21:35, 6 October 2010 (UTC)
- Technically, this means that your rule never creates the file it thinks it's defining (so even after compiling, ./somefile.o doesn't exist in the current directory). Consider using $@ for the output to guarantee that your rule actually creates the file that it's defining. Nimur (talk) 21:31, 6 October 2010 (UTC)
- Sorry, I should have been explicit:
$(OBJPATH)/%.o : %.F90
$(F90) $(FCFLAGS) $(INCLUDES) $(MODFLAG)$(MODPATH) -c $*.F90 -o $@ $(LFLAGS)
$(OBJPATH)/%.o : %.c
$(CC) $(CFLAGS) $(INCLUDES) -c $*.c -o $@ $(LFLAGS)
- This $@ expands to the rule target (in other words, the correctly and fully expanded version of $(OBJPATH)/%.o). By always using $@, you can guarantee that any rule that runs will successfully create the target it intended to create. In your case, it was a mismatch between the rule-name and the actual output file-name (rather, the location of the output file). So no rule was ever "satisfied," and required a re-build every time. Nimur (talk) 21:37, 6 October 2010 (UTC)
- (edit conflict) Hmm. If I add the OBJPATH to the rule, the $(LIBNAME) rule never sees $(OBJPATH)/somefile.o, since it is looking for somefile.o in the current directory. Should I replace $(LIBNAME) with
$(LIBNAME):$(OBJPATH)/$(CFILES) $(OBJPATH)/$(OBJS) Makefile
cd $(OBJPATH); $(AR) $(ARFLAGS) $(LIBPATH)/$(LIBNAME) $(OBJS) $(CFILES); $(RL) $(LIBPATH)/$(LIBNAME)
- or is there a less kludgy way of doing it? Titoxd(?!? - cool stuff) 21:39, 6 October 2010 (UTC)
- The less kludgey way is to define a SRCPATH, just like you have for your OBJPATH. Then, any dependency on a .c or .f90 file should be replaced with $(SRCDIR)/file.c or $(SRCDIR)/file.f90. Some people like to use the short variable names "S", "O", and "B", for "source", "object", and "build" directories, since these variables are used so often. Nimur (talk) 21:42, 6 October 2010 (UTC)
\r Ok, so what I have now is
include ../../Makefile.in
#This is the src/core Makefile
OBJS= /* f90 object files */
CFILES= /* c object files */
LIBNAME=libcore.a
# Common compiler options for all target combinations
CFLAGS= $(CFLAGS_ALL)
FCFLAGS= $(FCFLAGS_ALL)
INCLUDES=$(HDF_INCLUDES) $(PARMETIS_INCLUDES)
LFLAGS=$(HDF_LIB) $(PARMETIS_LIB)
# Output path
INSTALL_DIR=$(shell pwd | sed -e 's/\/src\/core.*$///')
SRCPATH=$(INSTALL_DIR)/src/core
OBJPATH=$(INSTALL_DIR)/obj/core
MODPATH=$(INSTALL_DIR)/mod/core
LIBPATH=$(INSTALL_DIR)/lib
# Attach debugging compiler options for debug configurations
debug debug-nohdf: FCFLAGS+=$(FCFLAGS_DEBUG)
# Override INCLUDES AND LFLAGS and attach the NOHDF preprocessor directive
# for the nohdf configurations
nohdf debug-nohdf: INCLUDES=$(PARMETIS_INCLUDES)
nohdf debug-nohdf: FCFLAGS+=$(FCFLAGS_NOHDF)
nohdf debug-nohdf: LFLAGS=$(PARMETIS_LIB)
# Attach optimazation compiler options for opt configuration
opt: FCFLAGS+=$(FCFLAGS_OPT)
$(LIBNAME):$(CFILES) $(OBJS) Makefile
#$(PROJ):$(CFILES) $(OBJS)
# $(F90) $(FCFLAGS) $(INCLUDES) -o $(PROJ) $(CFILES) $(OBJS) $(LFLAGS)
nohdf debug debug-nohdf opt opt-nohdf: $(LIBNAME)
cd $(OBJPATH); $(AR) $(ARFLAGS) $(LIBPATH)/$(LIBNAME) $(OBJS) $(CFILES); $(RL) $(LIBPATH)/$(LIBNAME)
$(OBJPATH)/%.o : %.F90
$(F90) $(FCFLAGS) $(INCLUDES) $(MODFLAG)$(MODPATH) -c $(SRCPATH)/$*.F90 -o $@ $(LFLAGS)
$(OBJPATH)/%.o : %.c
$(CC) $(CFLAGS) $(INCLUDES) -c $(SRCPATH)/$*.c -o $@ $(LFLAGS)
clean:
-rm $(LIBNAME);
-cd $(OBJPATH); rm *.o
-cd $(MODPATH); rm *.mod
-cd $(LIBPATH); rm $(LIBNAME)
- Now it dies while trying to link the second member of $OBJS (No rule to make target `file2.o', needed by `libcore.a'. Stop.) What did I screw up? Titoxd(?!? - cool stuff) 21:56, 6 October 2010 (UTC)
- Remember, you don't actually have a file called file2.o - you only have $(OBJDIR)/file2.o. So your dependencies need to be updated: libcore.a depends on $(OBJS), so your definition for that should be qualified.
OBJS= $(OBJDIR)/file1.o $(OBJDIR)/file2.o /* ... and so on */
- Nimur (talk) 22:06, 6 October 2010 (UTC)
- I see. I recall that there is a way of recursively prepending the fully qualified name for the dependencies. How would I go about doing that? Titoxd(?!? - cool stuff) 22:20, 6 October 2010 (UTC)
- I think you are correct; I can not recall off the top of my head what it is. These text-functions and string-replacement utilities are available in GNU Make; you can probably use them. Nimur (talk) 23:35, 6 October 2010 (UTC)
- It did: I just used this:
- I think you are correct; I can not recall off the top of my head what it is. These text-functions and string-replacement utilities are available in GNU Make; you can probably use them. Nimur (talk) 23:35, 6 October 2010 (UTC)
- I see. I recall that there is a way of recursively prepending the fully qualified name for the dependencies. How would I go about doing that? Titoxd(?!? - cool stuff) 22:20, 6 October 2010 (UTC)
- Nimur (talk) 22:06, 6 October 2010 (UTC)
# Add a prefix to F90 and C objects
OBJS:=$(patsubst %,$(OBJPATH)/%,$(OBJS))
CFILES:=$(patsubst %,$(OBJPATH)/%,$(CFILES))
- I also switched OBJS and CFILES from recursively expanded variables to simply expanded variables throughout (:= instead of =) and that did the trick. Titoxd(?!? - cool stuff) 02:32, 7 October 2010 (UTC)
- This may not be a useful comment, but your life would be vastly simplified if you could set up an environment that allows you to use GNU autotools instead of writing Makefiles. There is a significant learning curve, but once you are past it, writing Makefile.am's instead of Makefile's saves an infinite amount of time and head-scratching. Looie496 (talk) 03:08, 7 October 2010 (UTC)
- I thought about that, but I can't justify making Perl a prerequisite for compilation, when the program doesn't do anything with Perl. I've had nightmares with autotools in another project, so I'm also not too excited about using them. Titoxd(?!? - cool stuff) 11:07, 7 October 2010 (UTC)
Laptops?
So my PC's finally on its last legs, and my mum and da are getting me a laptop. This is both cause for rejoicing and confusion. I don't know much about why one PC is better than another. Which brings me to my question: Anyone willing to give me input on my choices? I'll mostly be using the PC for Web browsing (a ton of that) and word processing (also a ton of that), but I'll also stream the occasional movie/TV show off Netflix or Hulu. I'm getting it at Fry's, so I'm limited to their inventory. I only have a few hours before I lose my chance to pick a laptop up today, so here goes:
- Laptop number one is described as a "Toshiba S7040 17.3" notebook -- Powered by AMD Athlon II P340 Dual-core Processor with 4GB memory and 320GB Hard drive. It's called the Toshiba Satellite. I don't know what the heck AMD Athlon means, but I do want a dual-core processor. It'll cost me 530 bucks, not including tax
- Laptop number two is a Lenovo G560 15.6" notebook with Intel Pentium Dual Core processor P6100. It'll cost me 500 bucks, not including tax.
- Laptop number three is a Lenovo G550 15.6" notebook featuring an Intel Pentium Dual Core Processor T4500 with 4GB memory and 250GB hard drive. It'll cost me 515 bucks, not including tax.
Which one do I pick? --- cymru lass (hit me up)⁄(background check) 22:52, 6 October 2010 (UTC)
- Either 3 or 1, in my opinion Sir Stupidity (talk) 22:58, 6 October 2010 (UTC)
- One thing to consider: weight. Will you be hauling the thing around (school/college/work/friends)? Although the Fry's pages don't seem to give the weight, it's likely the Toshiba (being a bigger screen) (and thus a bigger roomier case) will weight more than the two smaller Lenovos. Having bought a large heavy laptop, I bitterly regretted that when I realised I'd spend an hour or so each day carrying the thing about. Conversely the bigger screen is, well, bigger, so probably a bit nicer to work on, and to play games and view DVDs. If you're not going to be moving the thing around, then the weight isn't an issue, and the big screen is a welcome thing - but if you'll be carrying it everywhere, a heavy laptop can feel like a curse. 87.112.51.188 (talk) 22:59, 6 October 2010 (UTC)
- I definitely won't be carrying it around. I'm much too clumsy for that sort of thing; I would probably break it. My friend's telling me to go with either 2 or 1. Both 2 and 1 have 320 GB hard drives, and I'm notorious for taking up a lot of hard drive So I guess it's more of a 1 vs 2 thing now. --- cymru lass (hit me up)⁄(background check) 23:12, 6 October 2010 (UTC)
- I had a Toshiba notebook for a while and liked it, for what the brand is worth. I've never had a Lenovo. Part of this will be the physical feel of the laptops, as 87 above wrote. Glad to see all your choices have 4GB RAM. If you want to look up CPU benchmarking you may have some luck at tomshardware.com or possibly anandtech. Comet Tuttle (talk) 23:19, 6 October 2010 (UTC)
- Both brands are respectable; the CPU issue is a non-issue. As you don't care about weight, the big screen is better. One word of warning: make sure you get an unopened one; if they only have ones that have been returned and restocked, simply don't buy (no matter how well they claim they've checked the return). 87.112.51.188 (talk) 23:33, 6 October 2010 (UTC)
- Agreed. Both brands are good. But I'd be worried about the speed of their hard drives -- only 5400 RPM. That'll slow them down more than the memory or CPU. You could just buy a 320 GB, 7200 RPM drive separately and put it into the laptop: [3]. Also, the Toshiba comes with the 64-bit version of Windows 7, meaning you'll need 64-bit drivers for any printers or peripherals. If they're old devices, 64-bit drivers may not be available.--Best Dog Ever (talk) 23:53, 6 October 2010 (UTC)
- Thanks for all your advice, guys I'm getting the Toshiba. --- cymru lass (hit me up)⁄(background check) 00:03, 7 October 2010 (UTC)
- Agreed. Both brands are good. But I'd be worried about the speed of their hard drives -- only 5400 RPM. That'll slow them down more than the memory or CPU. You could just buy a 320 GB, 7200 RPM drive separately and put it into the laptop: [3]. Also, the Toshiba comes with the 64-bit version of Windows 7, meaning you'll need 64-bit drivers for any printers or peripherals. If they're old devices, 64-bit drivers may not be available.--Best Dog Ever (talk) 23:53, 6 October 2010 (UTC)
October 7
Deceptive Cryptography
Hello, a teacher of mine told me about this scheme some time ago. He told us in class that there is a scheme where you have two keys and one is the real key and one is a fake key so that if you are captured for example and coerced, then you can divulge the fake key which will then reveal a fake image/plaintext getting you off the hook while revealing absolutely nothing about the actual true image/plaintext. Recently, I have been looking to do some reading about this but I can't seem to find anything relevant. Does anyone know what I am talking about? What is this type of a cryptographic scheme called? Any good websites/papers/books/articles? My background in math is pretty good but I don't know much about computer science. So any help would be appreciated. I think he called it deceptive cryptography or something. Thanks! 174.29.63.159 (talk) 06:43, 7 October 2010 (UTC)
- Our article, Deniable encryption, may be a decent starting point for further study. Regards,
decltype
(talk) 06:53, 7 October 2010 (UTC)- Yes; the key concept underlying this sort of thing is called steganography. Looie496 (talk) 07:05, 7 October 2010 (UTC)
- Well, steganography may or may not involve cryptography. The OP is specifically asking about a cryptographic scheme. But I agree that the two are related.
decltype
(talk) 11:30, 7 October 2010 (UTC)
- Well, steganography may or may not involve cryptography. The OP is specifically asking about a cryptographic scheme. But I agree that the two are related.
- Yes; the key concept underlying this sort of thing is called steganography. Looie496 (talk) 07:05, 7 October 2010 (UTC)
- TrueCrypt contains such a feature. It has inner and outer volumes, the inner one being the one you use to hide what you really want to hide. If you enter the password for the outer volume only, TrueCrypt will reveal the decoy contents - any attempt to write to this volume will destroy your hidden data, though. To safely access the decoy, you enter both the password for the inner and outer volume (that way, TrueCrypt knows about the location of the data belonging to the inner volume, and blocks accidental writes). -- 78.43.71.155 (talk) 11:46, 7 October 2010 (UTC)
- Whenever I've used this feature, you just need to enter the inner volume password, but that's a pretty minor point. 99.224.10.2 (talk) 11:58, 7 October 2010 (UTC)
- Its actually if you want to write to the outer volume (protecting the inner) that you need both passwords. If you only enter the inner volume password, you can write to it with no problems. If you only enter the outer volume password, it looks like a normal volume, and you can read and write to it just fine (for Deniability purposes). However, if you write to it (without having entered the second password), you run the risk of overwriting data on the inner volume. I guess a situation like this illustrates why both encryption and backup are important. Buddy431 (talk) 14:22, 7 October 2010 (UTC)
- You're right! I guess I shouldn't have only skimmed that comment. Sorry! 99.224.10.2 (talk) 19:36, 7 October 2010 (UTC)
Why isn't Thunderbird v3.14 working with Gmail?
I enabled imap and pop in my gmail account. I unlocked captcha. I entered my user ID and password correctly. But still Thunderbird says "Username or password invalid." What else could be the problem? Thanks. 20.137.18.50 (talk) 16:40, 7 October 2010 (UTC)
- Are you using your full username, like "kainaw@gmail.com" instead of just "kainaw"? -- kainaw™ 16:45, 7 October 2010 (UTC)
- Yes, I'm using my full username. 20.137.18.50 (talk) 16:49, 7 October 2010 (UTC)
- What are your server settings? -- kainaw™ 16:59, 7 October 2010 (UTC)
- Server Type: IMAP Mail Server
- Server Name: imap.googlemail.com
- Port: 993
- Connection security: SSL/TLS
- Authentication method: Normal password
- Check for new messages at startup: checked
- Check for new messages every: 10 minutes
- When I delete a message: Move it to trash folder
- Clean up ("Expunge") Inbox on Exit: unchecked
- Empty Trash on Exit: unchecked —Preceding unsigned comment added by 20.137.18.50 (talk) 17:04, 7 October 2010 (UTC)
- Those are my settings and GMail works just fine. -- kainaw™ 18:11, 7 October 2010 (UTC)
- As a longshot, is Thunderbird actually complaining about your GMail password, or about the "master password" to the Thunderbird password vault? Comet Tuttle (talk) 18:32, 7 October 2010 (UTC)
How to show a list of blogs from blogspot?
I know that http://someblog.blogspot.com/atom.xml?redirect=false&start-index=1&max-results=999 shows me all the post starting today (up to 999). However, how can I show, for example, the post 1 to 100 (from the beginning) or from 300 to 500? Or across a time range? I tried -1 in the hope that it would start counting in the beginning, but with no success...--Quest09 (talk) 17:25, 7 October 2010 (UTC)
Hard drive
I have 2 identical external hard drives, "iomega prestige desktop hard drive 1TB". When I connect them both to my Windows 7 computer via USB at the same time only one is given a drive letter, the other is inaccessible. In the eject tray both are listed as "Serial-ATA bridge" but only one has a drive letter. The drives both work fine when connected separately. What might be causing this problem and how do I fix it? 82.44.55.25 (talk) 19:18, 7 October 2010 (UTC)
- After connecting the second one, go to Computer, Manage, Disk Management, and right-click on the drive without a letter and assign an unused one. -- kainaw™ 19:21, 7 October 2010 (UTC)
- It says "The disk is offline because it has a signature collision with another disk that is online" and the change drive letter option is grayed out 82.44.55.25 (talk) 19:36, 7 October 2010 (UTC)
- this might help, but I can't vouch for the source. APL (talk) 19:54, 7 October 2010 (UTC)
- It says "The disk is offline because it has a signature collision with another disk that is online" and the change drive letter option is grayed out 82.44.55.25 (talk) 19:36, 7 October 2010 (UTC)
- Do your symptoms differ between situations where (a) you connect both drives to the computer and then turn its power on; and (b) you connect 1 drive to the computer and then turn its power on, and then connect the 2nd drive to the computer? Comet Tuttle (talk) 21:52, 7 October 2010 (UTC)
Password generators
Does using them result in having more secure passwords than coming up with your own? 24.189.87.160 (talk) 23:00, 7 October 2010 (UTC)
- I doubt there's any evidence for their producing more secure passwords. They're good at generating strong passwords, but strength is only one component of security; and strength can act against security if, for instance, the strong password is so unmemorable that one is forced to write down the password for the reason that one cannot remember it. --Tagishsimon (talk) 23:05, 7 October 2010 (UTC)
October 8
Macintosh SE mouse tutorial and games
I think it was the Mac SE that had a nifty (and, now, hilarious) tutorial program that taught you how to click, double-click, click and drag, and there were some games like these incredible mazes or other games including Hebrew Towers (or so I thought it was called, but I can't find anything by that name). A penguin rings a bell also, maybe the penguin was a part of the mazes. Is there anywhere I can find information on this early software that came with these early Macs? – Kerαunoςcopia◁galaxies 00:36, 8 October 2010 (UTC)
- I don't have any answers to your question, In fact, my observation is probably a red herring. But the first thing that 'hebrew towers' made me think of was that it might be a mis-remembering of the classic "Towers of Hanoi" game that has probably been implemented on every computing platform ever. APL (talk) 03:40, 8 October 2010 (UTC)
- Ah, that's the name of it. I figured I had the name wrong, but wrote it down anyway, just in case I wasn't. Towers of Hanoi is it. – Kerαunoςcopia◁galaxies 03:56, 8 October 2010 (UTC)
beginner
I'm a beginner to network programming. Can anyone suggest me a few good resources to start from scratch and get the hold of it, to make myself enable to develop application for windows particularly and for other operating systems too.Thanks in advance.--111.68.97.146 (talk) 06:44, 8 October 2010 (UTC)
Smart virus
My computer is attacked by a unique virus. I don't know what to do with that . Please help. When I visit www.google.com in my computer, some other website comes. In that website, it says 'Travel', 'Flight' etc etc. But in browser's address bar, it says www.google.com. One more thing.. This does not happen always. Sometimes, the actual google loads. Only some times that new page loads when i visit google.com. One more strange thing is that, this happens only with my broadband adsl connection. If I use my phone to connect, this strange new website does not come. Only the actual google comes if i browse using thethering my phone's connection. I also use Ad-aware anti virus. I run windows firewall. Automatic updates are on. Please help. —Preceding unsigned comment added by 218.248.84.85 (talk) 07:01, 8 October 2010 (UTC)
BOOTING A COMPUTER
I could not boot my computer. When I plug it, the green light on the mother board is on. (It means the power supply to mother board is ok.) But I could not switch on it. Why? Please help me to access any trouble shooting pages. Thank you. —Preceding unsigned comment added by 124.43.25.100 (talk) 07:28, 8 October 2010 (UTC)
ALARM ON COMPUTER
How can I set my computer (XP version) to ring at regular interval? (In other words, how can I set alarm?). There are two types. 1.) to stop after 3 or 4 beeps. 2.) to be stopped manually. This may be a simple thing for many. But I couldn’t. Pl. help me. Thank you.124.43.25.100 (talk) 07:41, 8 October 2010 (UTC)