Wikipedia:Reference desk/Archives/Computing/2008 November 11
Computing desk | ||
---|---|---|
< November 10 | << Oct | November | Dec >> | November 12 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
November 11
[edit]Hacking into my hotmail account
[edit]I lost the password and secret question answer for my hotmail account and I don't have an alternative email to send the password to. How can I hack into my email? --124.254.77.148 (talk) 02:29, 11 November 2008 (UTC)
- Sorry, can not answer that even if it is your own. Some one may know, but I doubt they will tell you. Rgoodermote 02:35, 11 November 2008 (UTC)
- Just create a new account altogether. Take this as a lesson, try to remember your password and make sure secret question is hard to forget (but not easy to crack). And create an alternative account just to be safe. --Crackthewhip775 (talk) 07:21, 11 November 2008 (UTC)
- A similar thing happened to me a long time ago. Here are some alternatives:
- Just create a new account altogether. Take this as a lesson, try to remember your password and make sure secret question is hard to forget (but not easy to crack). And create an alternative account just to be safe. --Crackthewhip775 (talk) 07:21, 11 November 2008 (UTC)
1) If the username of your email account is not your real name, you can make your password to be your real name (provided you remain annonymous when sending emails). 2) If your username is your real name, make a secret question such as your grandma's middle name (or some other name which would be impossible to guess unless the person trying to hack into your account knew you really well). Then you can choose any password. Until you get used to this password, you always know the answer to your secret question so you can't 'lose' your account.
However, it is important to change you password every 72 days or so for security reasons.
Topology Expert (talk) 07:29, 11 November 2008 (UTC)
- I am not sure I believe that changing your password every 72 days is neccessarily a good idea. Changing your password is good if you can you pick a unique secure password every time. My problem with forcing people to change the password at short intervals is that people will resort to picking easy passwords or writing it down somewhere which is no good because the people around you could find it. (who I would suspect would be more likely than anyone else to have a reason to want to get into your account) As long as your computer security is good (i.e. no keyloggers etc) pick a more-than-ten character password with upper and lowercase letters with no dictionary included words, special characters, and numbers not all at the end, and just stick with it. As an example 3I.L1i4k1e5P9i2e --> I Like Pie minus the spaces alternating with 3.141592 (It's faster to type than it looks because you can type ILikePie first and then go back and type in the number skipping a space every time.) 152.16.15.23 (talk) 19:33, 11 November 2008 (UTC)
- I like that idea (I will have to try something similar).
- But do not actually make the example password your real password (since it's already in public view). --Crackthewhip775 (talk) 19:57, 11 November 2008 (UTC)
- I actually came across that warning in some "what's a good password" guide somewhere (think it was Google). It sounded funny at the time, but I guess there are people who need to be told, just as there are people who need to be told "password" is not a good password Nil Einne (talk) 12:34, 12 November 2008 (UTC)
- A fairly simple way to make a really good easy to remember password is to get two words you can remember and merge them, making one uppercase and one lowercase, then append your house number or the day of your birthday to the end. For instance WAFFLE, turnip, 25, which would make WtAuFrFnLiEp25. Appending a symbol to the end makes it even harder while still being rather easy to remmeber! 88.211.96.3 (talk) 13:21, 12 November 2008 (UTC)
Take a 2x2 matrix that you can remember very well (equivalent to a four digit number that you know very well). Use the Hill cipher against a 'simple password' and encode it into a more complicated password. In this case changing your password every 72 days is not a problem. Keep the same 'simple password' (which should be a good enough password on its own that you can remember) and change your 'encoding matrix' each time. This should last for quite a while...
Topology Expert (talk) 13:26, 12 November 2008 (UTC)
- I take that back. I have now learned there is a way of doing it without doing something illegal. Rgoodermote 00:09, 14 November 2008 (UTC)
SQL Help
[edit]Does anyone know what the syntax is for a CHECK clause in SQL? I found information about ranges (e.g., less than value x), but I need a CHECK clause (or any type of statement, really) that limits an attribute to five choices. For example, in the following statement, I create a table with an attribute named LetterGrade that can only hold the values A, B, C, D, and F. Here's what I have so far:
CREATE TABLE "Roster" (
"LetterGrade" VARCHAR(1) NOT NULL CONSTRAINT "LetterGrade_Chk" CHECK (
In case you were wondering, it's not a homework question. Thank you for any help.--Account created to post on Reference Desk (talk) 02:39, 11 November 2008 (UTC)
- Try something like:
... CHECK ( LetterGrade IN ('A','B','C','D','F') )
- Check your documentation for the IN operator. You will find that it can also be used with a subquery that obtains a list of allowed values from another table. For example:
... CHECK ( LetterGrade IN (SELECT Letter FROM AllowedLetterGradeValue) )
- By the way, it's usually not necessary to put double quotes around identifiers such as table and column names. They are only needed if the identifier contains special characters or matches certain language keywords. -- Tcncv (talk) 03:00, 11 November 2008 (UTC)
- OK. Thank you, Tcncv!--Account created to post on Reference Desk (talk) 03:33, 11 November 2008 (UTC)
- Also, depending on the RDBMS you're using, you could avoid the explicit CHECK constraint entirely by declaring the column as an enumerated type. For example, in MySQL you could write:
LetterGrade ENUM ('A','B','C','D','F') NOT NULL
- For details, see [1] and/or the manual for your RDBMS of choice. —Ilmari Karonen (talk) 15:21, 11 November 2008 (UTC)
Omitting multicharacter postfix in a regular expression
[edit]I cannot figure out how to build a regular expression that omits a multicharacter postfix.
As an example, I would like to match exactly those strings that start with "error" and do not end with any of " not found", " expected", " handled", but matches all other occurances of "error". I would like to make a regular expression like error [^( not found)^( expected)^( handled)]. This does not work, because [] matches a single character.
Is there any way to do this with a regular expression?
Best regards
Søren 212.130.46.190 (talk) 10:46, 11 November 2008 (UTC)
- Just break it up into multiple matches, each separated with a |. The problem you will run into is that RegEx is not designed to look for something that is NOT there. Your better bet is to look for anything that matches what you don't want and ignore those. For example, if I were using PHP with preg_match, it returns "true" if I get a match. So, I can say:
if(preg_match("/^error.*/", $mystring) && !preg_match("/not found$|expected$|handled$/", $mystring)) ...
- Then, the "if" logically matches every line where I didn't get what I wanted. Notice that I had to match error first, to only get those lines, then remove the lines I didn't want. -- kainaw™ 15:26, 11 November 2008 (UTC)
- (edit conflict) This is called a negative look-ahead assertion. The exact syntax depends on the kind of regular expressions you're using — it's not a standard feature. In PCRE syntax (which is what PHP's
preg_match()
uses), you'd write "error(?! not found| expected| handled)
". —Ilmari Karonen (talk) 15:26, 11 November 2008 (UTC)
Thank you for your answers, quite interesting. I think I will just settle for an easy variation of this approach: replace "(error not found)|(error expected)|(error handled)" with "", and search for "error". (I am using notepad++ to search, so I can't use your method directly).
Best regards
Søren212.130.46.190 (talk) 15:53, 11 November 2008 (UTC)
Win XP: Sorting documents by page count
[edit]I have abou 60 word documents collected in a folder and I want to sort them by page count. I applied 'details' view to the folder and even found a 'pages' option, but it attributes only 1 page to each document which is inaccurate (so I'm guessing it means something else, maybe page files per object). Is there any easy way to do what I'm trying for without going in and counting the page numbers document by document? --Shaggorama (talk) 16:04, 11 November 2008 (UTC)
- The Windows shell can't do this natively. I found an article that does it with a VB script. You'll have to open Microsoft Script Editor and paste it in. Change C:/Scripts to the folder where your docs are (obviously adding an interface for this would be good), save, and then execute the script. Superm401 - Talk 04:24, 14 November 2008 (UTC)
audio electronics
[edit]plz help i want some good (free)book or some comprehensive article on audio electronics,i mean about sound physics its implementation in electrical components and then their responses in circuits.it means a-z material on sound devices 116.71.180.15 (talk) 16:48, 11 November 2008 (UTC)
- Not a book but maybe a start [2]--GreenSpigot (talk) 02:23, 17 November 2008 (UTC)
robots
[edit]i have searched a lot of robot sites but each of them have incomplete materials,is their any web that contains robotic projects with complete reports of concepts,devices being used,schematics,pictures. 116.71.180.15 (talk) 16:51, 11 November 2008 (UTC)
AVG deleted user32.dll!
[edit]Hi, I'm trying to restore user32.dll after AVG's last update considered it a trojan and deleted it. (You might guess that now Windows won't boot at all, and that I'm very pissed off right now; you'd be right.) The problem is that I followed the instructions to fix the problem here (under "False positive "user32.dll" (DB: 270.9.0/1777)") but it still won't boot up correctly. I don't know what I might be doing wrong. After the expand command, it says "file expanded", so it means it worked! My first guess is that I'm not selecting the right "windows installation" when it asks. I put 1, but is that correct?? Please help soon!! :( 190.157.120.42 (talk) 16:53, 11 November 2008 (UTC)
UPDATE (:P): I just noticed that the blue screen which said "can't find user32.dll..." now says "can't find winsrv". Now I guess I have to fix that, but how?? I tried doing the same as with user32.dll, assuming that winsrv is a dll too... but nothing. 190.157.120.42 (talk) 17:05, 11 November 2008 (UTC)
NEW UPDATE: I tried using the iso disc that they offered as an alternative but still nothing. It's been 4 hours. Please help. 190.157.120.42 (talk) 18:34, 11 November 2008 (UTC)
- A lot of people had this problem. Try looking here: http://tech.slashdot.org/article.pl?sid=08/11/10/2319209 for help. They link to the fix and their may be helpful discussion below the story. 152.16.15.23 (talk) 19:15, 11 November 2008 (UTC)
- Do you have "T.V. Media"? [3] --wj32 t/c 06:23, 12 November 2008 (UTC)
css bug fixes for ie6 and 7
[edit]Hi I am relatively new to css and was going to buy a second book dealing with layouts...it kept going on about bugs in ie6, is this book irrelevant now with the advent of ie7?
any excellent sites on layouts that you know of?
thx. —Preceding unsigned comment added by 78.144.35.166 (talk) 16:58, 11 November 2008 (UTC)
- Huge numbers of people still use IE6—depending on what your audience is, how accurate your page must be, etc., that may or may not matter (at least 50% of the IE traffic that my sites get is still IE6, and IE in general makes up about 60% of all the browsers my site gets; I am not sure how representative that is but I get a fair number of random hits so that shouldn't be too far off the norm. Firefox for me is in 2nd place with about 22%). That being said, one should not, as a rule, bend over backwards to implement quirks to account for one bad browser. But sometimes it matter. I recently was working on a project that must look good on IE6 as well as IE7, Firefox, etc. (it has to be genuinely cross-platform in an environment where it is not appropriate for me to demand that my audience all use updated browsers), and was running into severe problems due to the fact that IE6 uses a non-standard box model for measuring widths (so sometimes my text boxes would be aligned, but often not in IE6). What I ended up doing was re-writing the code in a way that worked on all of them—there is often more than one way to get the same result, and sometimes one of the ways is more universally compatible than others. This approach is much more sane than making all sorts of special stylesheets and rules that are only implemented in one browser or another. If you are just making a personal site and don't really care about it looking bad for people in some browsers, then you can afford to not worry about it and take a stronger stand about people using standards-compliant browsers. If not—look for a workaround. But again, you ought not try and bend over backwards for IE6 with hacks and fixes—they often make the page very hard to maintain and can have their own unpredictable effects in browsers that are actually standards-compliant. --140.247.248.117 (talk) 17:45, 11 November 2008 (UTC)
- All the above, and the fact that IE7 is still far from standards-compliant. If you're interested there's some good info here, and a list of all the IE positioning bugs on positioniseverything.net. PretzelsTalk! 18:03, 11 November 2008 (UTC)
Torrent help needed
[edit]Yo, so I'm working on the article Skinner's Room which is undergoing a GA review, but I haven't got access to the text of the story itself, which is very difficult to come by in physical form. However, a pdf of the text is listed as part of this torrent. I have a fried laptop and can't run torrent services except for from internet cafes. Is there someone with good torrent-fu who can tell me whether it would be plausible to download this torrent within say, one hour, at a standard European internet cafe? The torrent size is 32.34mb. Any help very much appreciated, the skomorokh 17:29, 11 November 2008 (UTC)
- If you want the entire torrent it is well seeded. Should take a few minutes. But the story you want is 17.6KB, you can just select the single file from the torrent...the first piece you get would be the entire story. Should take a few seconds. ;) Louis Waweru Talk 17:40, 11 November 2008 (UTC)
- Splendid! Follow-up question: what's the smallest (in mb) torrent client that would do the job? the skomorokh 18:01, 11 November 2008 (UTC)
- That would be μTorrent. There are browser based clients in case you can't install things at the café...but I can't recommend one. Louis Waweru Talk 18:10, 11 November 2008 (UTC)
- Ha! I tried Bitlet, which asked for the "metafile" and rejected the url above as input. the skomorokh 18:22, 11 November 2008 (UTC)
- You have to actually download the
.torrent
file, and then open it with the client. The download link is on that page, or you can change /det in the url to /get. Louis Waweru Talk 18:45, 11 November 2008 (UTC)- Ah, the url change fixed it. It's gone ahead and taken on the whole 32mb, though, at an average speed of about 100b/s (!). Thanks for your patience and assistance! 208kb out of 32.34mb, the skomorokh 19:13, 11 November 2008 (UTC)
- You have to actually download the
- Ha! I tried Bitlet, which asked for the "metafile" and rejected the url above as input. the skomorokh 18:22, 11 November 2008 (UTC)
- That would be μTorrent. There are browser based clients in case you can't install things at the café...but I can't recommend one. Louis Waweru Talk 18:10, 11 November 2008 (UTC)
- Splendid! Follow-up question: what's the smallest (in mb) torrent client that would do the job? the skomorokh 18:01, 11 November 2008 (UTC)
- A client with an even smaller size would be imageshack's online service.[4] Mac Davis (talk) 22:35, 12 November 2008 (UTC)
Troublesome issue with a shell script
[edit]Greetings! In the following shell script, assume $2 is the name of a text file with each line within it containing the names of processes, and $1 is the name of a user on the local machine to email if the process is running.
tmp3=$(less $2) echo $tmp3 for check in $tmp3 do result=$(ps -C $check | wc -l | LANG=C sed 's/\([0-9]*\).*/\1/') if [ $result -gt 1 ]; then echo "Process is running!" > /dev/tty message=echo $check is currently running'!' echo $message | mail -s $message $1 fi done
Now, the issue I am having is with result=$(ps -C $check | wc -l | LANG=C sed 's/\([0-9]*\).*/\1/'). I am certain the command itself (that is, without a variable in the mix) works as intended, which returns a single number, then enters the if statement if there is more than one line detected in the process list.
However, upon trying to run it, the shell is stating there is a syntax error somewhere, and I just cannot see it. The complete error is below
[kes@fluffy stuff]$ ./shellScript 2 test.txt ps ls init gnome-terminal syslogd ./shellScript: line 16: syntax error near unexpected token `result=$(ps -C $check | wc -l | LANG=C sed 's/\([0-9]*\).*/\1/')' ./shellScript: line 16: ` result=$(ps -C $check | wc -l | LANG=C sed 's/\([0-9]*\).*/\1/')'
Any suggestions on how to overcome this confusing issue would be greatly appreciated. Thanks!
Sincerely, Kesiana. 137.155.37.5 (talk) 18:02, 11 November 2008 (UTC)
- The "for loop" syntax goes "for i in a b c; do body; done". Those semicolons can be replaced by newlines, but you don't have either. Also, you should use cat rather than less. --Sean 18:12, 11 November 2008 (UTC)
Joomla, LAN, and WAN
[edit]HI,
I've setup a small portal using joomla on our lan (on a windows machine running AMP), whose computer name is \\server
when i set it up, the $mos config live site became: http://server/
It's been working well, but now i want to be able to access this outside our LAN, so i did the necessary port-forwarding on our router, and using a proxy, i can see the page, but the css / links are broken (I checked the source, and all references seem absolute. ie: css is linked as <link href="http://server/templates/madeyourweb/css/template_css.css" rel="stylesheet" type="text/css" />) so the page looks jumbled up.
Does any one know of a workaround to get our portal to show on both LAN and WAN?
TIA (ps, I've already posted on the Joomla Forums, but i know wp:rd/c peeps tend to be very sharp and quick) PrinzPH (talk) 18:35, 11 November 2008 (UTC)
- Well, why are the links absolute and pointing to "server"? Who or what was used to create the page? Either change them to relative links, or change the absolute links to use the external IP address or external hostname (if one exists). --71.106.183.17 (talk) 20:55, 11 November 2008 (UTC)
Checking E-mail with Public WiFi
[edit]Is it safe to check one's email, hence entering a username and password, across a public wifi, such as one at a the side of a highway or a restaurant? Can a hacker potentially sniff out the password that I am sending across the web? Acceptable (talk) 21:52, 11 November 2008 (UTC)
- It's generally not safe. Some traffic send over HTTPS should still be secure, but usually that is only used for the first sending of a password (and sometimes not even then). But anything else... it's not safe unless you are using a VPN. Even if you are using encrypted WiFi (e.g. WPA or WEP, the latter being extremely easy to crack incidentally), there's a chance the the router operator could be sniffing your packets before sending them on. With a VPN though everything is encrypted—no one can see your traffic. But otherwise, you're basically just sending things out in a way that anyone can see them. --98.217.8.46 (talk) 22:14, 11 November 2008 (UTC)
- Yeah use a VPN if you have one; because I don't have a VPN account but have many SSH accounts, I tend to use SSH's dynamic port forwarding, which allows me to set my Internet applications to tunnel their traffic through the SSH connection. Many email systems these days have secure access though. I know that all the university email accounts I've seen have full HTTPS webmail interfaces, and they require SSL to be used with IMAP and SMTP when used with local email clients. Gmail has an option (Settings -> General -> Browser connection) that allows you to have it always use HTTPS. --128.97.244.146 (talk) 23:54, 11 November 2008 (UTC)
- IMHO as long as your entire session is sent over HTTPS. (For example, GMail allows it. Go to settings.) Kushal (talk) 03:42, 12 November 2008 (UTC)
- Frankly I don't understand why there are still email systems that don't use HTTPS. There would be a big fuss if a bank's online banking website didn't use HTTPS. Yet there are hundreds of times more personal information in my email account than anything you can access on my bank account (they partially hide all the numbers and stuff anyway). --71.106.183.17 (talk) 07:49, 12 November 2008 (UTC)
- Wow. First things first. Security is important, but lets not be too crazy. Anytime you connect your computer to a network or the internet, it carries a potential risk of being hacked. It is (logically) likely that hackers will prey on public/unclosed networks more than private/secured networks - so the above is perhaps sound from a 'protection' perspective..the question is now - is that the only perspective? Ultimately - is it more important that you check your email (and open yourself up to a slightly increased chance of being hacked) on these public networks/less secure areas, or can your email checking wait until you are at a more secure network? Personally I would consider the slight increase in risk as worth it for the effort-saving gain of being able to do X now, rather than waiting. That doesn't mean there isn't a risk, just that you have to weigh risk against reward. ny156uk (talk) 15:31, 12 November 2008 (UTC)