Wikipedia:Reference desk/Archives/Computing/2011 October 8
Computing desk | ||
---|---|---|
< October 7 | << Sep | October | Nov >> | October 9 > |
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. |
October 8
editPerl gurus read on ...
editHaving just written my first Perl script the other day, I was browsing a few Perl pages and came across the Obfuscated code page on Perlmonks. One of the scripts caught my eye, with the line
- print "\u\c*\c5\c3\c4\c`\c!\c.\c/\c4\c(\c%\c2 \u\c0\c%\c2\c,\c`\c(\c!c\c+\c%\c2\cJ"
Now I soon figured out what \u meant, and after a little bit of thought, what \c* and so on meant. But what type of character *is* \c* ? The only references I could find was that \cX was a control character - in this case it would be CTRL+*. But \c* is of course, the letter "j". Where can I find a good explanation of why the above script works? 121.44.154.221 (talk) 00:17, 8 October 2011 (UTC)
- This weird behavior is documented in this perlop footnote, which also mentions that it's deprecated and slated to be removed. -- BenRG (talk) 04:37, 8 October 2011 (UTC)
- If you're looking for an explanation of the behavior, you can see from BenRG's link that "... the value is derived by inverting the 7th bit (0x40)." This makes some sense if you take a look at the ASCII code table (take a look at the first or second table in the article, and compare them with the third). As the first 32 control codes mostly don't have keys on a typical keyboard, there needed to be a way of entering them on early computers, and one simple way was to have a special "control" key which simply inverted the most significant (7th) ASCII bit of the character which otherwise would be produced. That's why ^H is backspace and ^J is line feed. (Note that most modern computers use the control keys for purposes other than entering control codes.) I believe it started with strictly the uppercase letters, but when computers started to be used with default-lowercase typing, the lower case equivalents were typically special-cased to make things simpler. From there it's a simple implementation quirk to have some of the punctuation characters map to lower case letters by inverting their 7th ASCII bit. -- 174.24.217.108 (talk) 18:47, 8 October 2011 (UTC)
Web site listing US cities for travelers to avoid
editI believe the US federal gov has a web site with nations for US travelers to avoid, due to violence against foreigners, arbitrary arrests, etc. So, is there such a site with the same info for US cities, counties, and states to avoid, such as Tenaha, Texas ? StuRat (talk) 00:36, 8 October 2011 (UTC)
- The article doesn't really say you have to avoid it, unless you are Afro-American or Latino. (why would someone want to go there anyway?) Regarding your question, I know there are google maps mash-ups of criminality hot spots for cities that you might want to visit. Quest09 (talk) 00:44, 8 October 2011 (UTC)
- Right, but locals killing locals isn't relevant, I want to know about those who target visitors. StuRat (talk) 00:55, 8 October 2011 (UTC)
- I'm not aware many criminals only target locals. The risk of being the victim of a crime, even if you aren't targetted as a visitor, is of course something many travel advisories do consider. Nil Einne (talk) 03:56, 8 October 2011 (UTC)
- A gang war and/or war for dominance by drug dealers will tend to only target the other gangs or dealers. Yes, outsiders could be hit in the cross-fire, but are generally safer than if they are specifically being targeted. StuRat (talk) 21:49, 8 October 2011 (UTC)
- But that's a rather different thing from locals killing locals. That's certain locals killing certain other locals. If you're local who isn't part of the war, your risk is going to be about the same as a visitor per unit time (the local obviously is going to be in the area for far longer then the visitor). In fact in some cases it may be higher for the visitor since they have less experience or knowledge in what to avoid etc. (In some cases it may be less because if the visitor is obviously a visitor to the people involved they may take greater care to avoid that person out of fears it will lead to a harsher crack down whereas they may believe an innocent local victim is not going to lead to the same thing.) In any case, unless you have some evidence to the contrary, I'm sticking with Quest09's assumption that most crime hotspots aren't just indicative of a gang war or war for dominance but wider problems of a lack of order and a higher risk of crime for all people who may be in that area, visitors or locals. And even in the case of gang wars etc, in some cases (whether in the US or not), the problems are severe enough that they do pose a clear risk to visitors.
- And as I said, these are therefore things most travel advisories consider because the risk of people being the victim of a crime is relevant even if you weren't specifically targeted. For most visitor's POVs it's not going to matter if you weren't specifically targeted as a visitor.
- Note that if you are going to ignore anything that isn't targeted at visitors you logically should ignore things like harsh drug laws, harsh laws on consensual sexual behaviour between adults, harsh laws on alcohol and even most likely a large amount of the terrorism in places like Iraq, Afghanistan and Pakistan. In the case of the laws, most of these aren't targeted at locals, indeed in many cases the authorities are willing to turn something of a blind eye for visitors breaking the laws in some circumstances. In the case of Iraq and Afghanistan while there is some targeting of visitors, a large percentage of the attacks are not targeted at visitors and are a big part of what make them dangerous places.
- Nil Einne (talk) 01:39, 9 October 2011 (UTC)Nil Einne (talk) 13:04, 9 October 2011 (UTC)
- The State Department has a list of travel warnings for specific places. There have been cases of other nations issuing similar warnings for the United States — Mexico famously issued warnings against traveling to Arizona after they passed their extremely harsh immigration laws that essentially gave police a carte blanch in harassing anyone who looked Latino. If you Google "travel warnings to the United States" you can find comparable warnings from other countries. Australia's list is pretty interesting: warning about terrorism, crime, harsh drug laws, immigration checks (including Arizona in particular), and weather. The UK also warns about Arizona. Presumably if you Google the right terms in other languages you'll get their pages too... --Mr.98 (talk) 01:27, 8 October 2011 (UTC)
- I don't believe you'll get more specific advise than that. Equally, I don't believe any city in the US has to be avoided independently of what you are, for all strangers, including all Americans from out of town, unless maybe some lost village run by a sect. Wikiweek (talk) 01:34, 8 October 2011 (UTC)
- ...or unless you have faith in statistics and a concern for your well being. ¦ Reisio (talk) 16:34, 8 October 2011 (UTC)
- In my country (Poland), such warnings (and in general interesting stuff about other countries) are found on the website of our Ministry of Foreign Affairs. --Ouro (blah blah) 17:35, 8 October 2011 (UTC)
- Trivia: A couple of decades ago, Mediagenic published worldwide travel guide software for the Macintosh that warned non-Americans that when traveling to America they might get fined for "jaywalking". (Quotes in the original.) Comet Tuttle (talk) 18:55, 8 October 2011 (UTC)
- Um, it's true, though, depending on where you are. And how well known is the term outside of North America? --Mr.98 (talk) 20:16, 8 October 2011 (UTC)
- You would make it a lot easier on us, StuRat, if you'd give us an accurate image of yourself. μηδείς (talk) 19:18, 8 October 2011 (UTC)
- yes, but this picture would need several details. Being homosexual could be OK in SFB, but a nightmare in Topeka,_KS... Quest09 (talk) 19:24, 8 October 2011 (UTC)
- This isn't for me, per se. I'm more interested in knowing if there is a need for such a web site, which I could possibly host, where people could rate various areas for hostility towards visitors. Incidentally, could such a site be sued, provided they only serve as a forum and don't post opinions of their own ? The objectives would be to help travelers, hopefully encourage hostile areas to reform themselves, and perhaps make some ad revenue in the process. StuRat (talk) 21:53, 8 October 2011 (UTC)
- Well, so long as your project requires no basis in reality, why not just get started? As a native New Yorker, I have never witnessed hostility (impatience at traffic-blocking gawkers maybe) to tourists as such, neither in my home town nor anywhere from Galveston, Texas to Manchester, New Hampshire (nor Munich to Ponce, PR, for that matter). Only in Canada was I ever asked whether I was a Protestant or Catholic before I entered an occupied swimming pool. And even then I have the sense to dive in laughing, without giving the bigotte an answer. Let her exit whatever her prejudice. This thread is yet another anti-American fantasy circle jerk with no basis in a desire for aid from the reference desk. Thats fine. We're used to it.μηδείς (talk) 02:30, 9 October 2011 (UTC)
- I would think it would be best to do this on a case by case basis, StuRat. Just look at the city being travelled to. Ask locals (should be some on the intertubes somewhere) about the attitudes people have there; look up things like crime rates and also read local papers to get an idea of how they think there. I don't think there are sites telling people to avoid places like SE Washington D.C. for instance (though you really should; seriously). Sir William Matthew Flinders Petrie | Say Shalom! 11 Tishrei 5772 06:52, 9 October 2011 (UTC)
objective of using spam mail detection technology
editspam mails are junk emails. send from a single source to different receiver randomly. — Preceding unsigned comment added by MeWIKIfreak (talk • contribs) 17:08, 8 October 2011 (UTC)
- Do you have a question for the Reference Desk about E-mail spam? This is a place where people can ask questions, and volunteers find answers with references. Comet Tuttle (talk) 18:16, 8 October 2011 (UTC)
- Judging by his heading I think he didn't finish writing what he wanted to ask. Though he didn't come back to correct this mistake. Sir William Matthew Flinders Petrie | Say Shalom! 11 Tishrei 5772 06:34, 9 October 2011 (UTC)
- It may simply be the question was in the header (an annoying but but occasional problem) and the paragraph was some explaination of the question in case we didn't know what spam was (although I'm not sure how we could hope to answer the question if we didn't know what spam was). If the question is "objective of using spam mail detection technology" then the answer is to stop people from receiving or having to deal with spam personally since spam is nearly always unwelcome and without any automated detection may lead to a substanially amount of time being needed to deal with it. Nil Einne (talk) 13:10, 9 October 2011 (UTC)