Wikipedia:Reference desk/Archives/Computing/2010 September 27
Computing desk | ||
---|---|---|
< September 26 | << Aug | September | Oct >> | September 28 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
September 27
editLinksys WAP54G wireless access point help
editThis question concerns a Linksys WAP54G wireless access point. (Note that this is a simple access point, not a router.) I was attempting to set an access password (taking my leave from the legions of unsecured Linksys access points :-) ), but I ran into difficulties. I have two questions:
- I had temporarily made a direct wired ethernet connection between my Mac and the access point. I had succeeded in accessing the configuration screens at
http://192.168.1.245/
. Confused about what it wanted for WEP keys, I clicked a "Help" button. It tried to open a new browser window (also on192.168.1.245
, presumably to display the help in), but the connection timed out. After that, the main configuration screen was also displaying a "can't connect" message. After that, no matter what I did, I could never never connect to192.168.1.245
, no matter what I did. (I tried resetting the access point, and everything.) Is there anything else I could try? Did the thing break, just when I hit the Help link? - After giving up on setting a password, I reconnected everything the normal way, and went back to browsing the net wirelessly (and unsecuredly). I idly tried hitting
http://192.168.1.245/
again. To my dismay, it worked! And I was able to set a password, so my access point is now secured! But does this mean that anybody driving by could have taken control of my access point away from me, by setting passwords I didn't know? (Or did maybe the same thing that broke under #1 cause192.168.1.245
to be accessible wirelessly only as it wrongly became inaccessible wiredly?)
I'm glad to have finally secured the thing, but I'm bothered that its default security model might have been even worse (much worse!) than I had thought... —Steve Summit (talk) 04:08, 27 September 2010 (UTC)
- My Linksys router has a setting under Administration --> Management called, "Wireless Access Web" that lets you set whether people can administer the router wirelessly. I have it disabled. Check that to see if it's enabled. But if you were able to set the password wirelessly, then the answer to your question about wireless administration is obviously, "yes."
- As for a password, it sounds like you set a password for the web interface, but haven't set a WEP or WPA key for connecting to the network? Bad move. People can still use your wireless connection and therefore intercept the password needed to login into the AP. WEP and WPA encrypt wireless traffic and prevent unauthorized people from joining your network. My router, by default, is accessed using HTTP instead of HTTPS, meaning the password is sent in the clear if WPA or WEP are disabled. Also, preferably, set a WPA2 key (not WPA or WEP). WEP is weak. WPA is better, but WPA2 is the best.--Best Dog Ever (talk) 04:30, 27 September 2010 (UTC)
- Don't worry, I set both an admin and an access password. Thanks. (Still wondering about the suden lack of wired admin access, though.) —Steve Summit (talk) 12:05, 27 September 2010 (UTC)
How to Run Emacs Org Mode Commands From the Terminal?
editI have a file, foo.org. When I open it in emacs, I can run C-c C-e b and get an html exported file, foo.html. Is there anyway to do this without opening emacs? I'm imagining something from the shell that looks like this:
emacs -orgmode -export -html foo.org > foo.html
Thanks if anyone knows the answer —Preceding unsigned comment added by CGPGrey (talk • contribs) 08:36, 27 September 2010 (UTC)
- Short answer: Yes. It's Emacs! Longer answer: I know no simple way off-hand, but see the options
--batch
and--script
in the Manual. --Stephan Schulz (talk) 09:15, 27 September 2010 (UTC)
- Short answer: Yes. It's Emacs! Longer answer: I know no simple way off-hand, but see the options
- I've gotten closer with this bit of script:
emacs -batch --eval '(progn (find-file "test.org.txt") (org-export-as-html "test.org.html"))'
But I'm still running into problems. The output "test.html" is blank, every time. I there is a problem with the 'find-file' part. How do I tell 'find-file' exactly where the source file is? --CGPGrey (talk) 10:15, 27 September 2010 (UTC)
- I see two small problems: First, you export as" test.org.html", but you say "test.html" is empty. Secondly, I think it should be
--batch
(note two dashes). Moreover, do you possibly need to switch to orgmode? --Stephan Schulz (talk) 10:53, 27 September 2010 (UTC)
- I see two small problems: First, you export as" test.org.html", but you say "test.html" is empty. Secondly, I think it should be
- You were right about the single vs. double dash, thank you. The other bit was just my typo. Here's what happens now. I enter this command:
emacs --batch --eval '(progn (find-file "test.org") (org-export-as-html "test.html"))'
Emacs then spits out a .html file that looks like this:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
lang="en" xml:lang="en">
<head>
<title>test</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<meta name="generator" content="Org-mode"/>
<meta name="generated" content="2010-09-27 14:43:09 BST"/>
<meta name="author" content="Grey"/>
<style type="text/css">
<!--/*--><![CDATA[/*><!--*/
html { font-family: Times, serif; font-size: 12pt; }
.title { text-align: center; }
.todo { color: red; }
.done { color: green; }
.tag { background-color:lightblue; font-weight:normal }
.target { }
.timestamp { color: grey }
.timestamp-kwd { color: CadetBlue }
p.verse { margin-left: 3% }
pre {
border: 1pt solid #AEBDCC;
background-color: #F3F5F7;
padding: 5pt;
font-family: courier, monospace;
font-size: 90%;
overflow:auto;
}
table { border-collapse: collapse; }
td, th { vertical-align: top; }
dt { font-weight: bold; }
div.figure { padding: 0.5em; }
div.figure p { text-align: center; }
.linenr { font-size:smaller }
.code-highlighted {background-color:#ffff00;}
.org-info-js_info-navigation { border-style:none; }
#org-info-js_console-label { font-size:10px; font-weight:bold;
white-space:nowrap; }
.org-info-js_search-highlight {background-color:#ffff00; color:#000000;
font-weight:bold; }
/*]]>*/-->
</style>
<script type="text/javascript">
<!--/*--><![CDATA[/*><!--*/
function CodeHighlightOn(elem, id)
{
var target = document.getElementById(id);
if(null != target) {
elem.cacheClassElem = elem.className;
elem.cacheClassTarget = target.className;
target.className = "code-highlighted";
elem.className = "code-highlighted";
}
}
function CodeHighlightOff(elem, id)
{
var target = document.getElementById(id);
if(elem.cacheClassElem)
elem.className = elem.cacheClassElem;
if(elem.cacheClassTarget)
target.className = elem.cacheClassTarget;
}
/*]]>*/-->
</script>
</head><body>
<h1 class="title">test</h1>
<div id="postamble"><p class="author"> Author: Grey
<a href="mailto:grey@Cobalt.local"><grey@Cobalt.local></a>
</p>
<p class="date"> Date: 2010-09-27 14:43:09 BST</p>
<p>HTML generated by org-mode 6.21b in emacs 23</p>
</div></body>
</html>
That is what I would get if I was exporting to HTML a blank org mode file. It turns out that no matter what I write in the (find-file "test.org") I'll get an HTML file the same as above, even if the stated org file does not exist. So clearly, the "find-file" part of the above is not working, but I can't figure out how to fix it. --CGPGrey (talk) 13:47, 27 September 2010 (UTC)
- (-batch and --batch are equivalent, BTW.) If you write it like this, the file should be in the current directory, otherwise you have to specify the path. I don't have org mode installed to test it, but
emacs -batch -eval '(progn (find-file "test.txt") (write-file "test2.txt"))'
works as expected; you could try something like that to verify whether the problem is really with find-file.—Emil J. 13:54, 27 September 2010 (UTC)
tsql:sqlserver=plsql:oracle=?:mysql
editt.i.a. --217.194.34.103 (talk) 13:31, 27 September 2010 (UTC)
- It doesn't appear to have a name beyond "the extensions to, and subset of, SQL supported by MySQL". Not enough marketing types, I guess. --Sean 15:54, 27 September 2010 (UTC)
mac safari won't submit form
editI do not have a mac, so I cannot easily figure this out. This page looks like a perfectly legitimate form to me, but mac safari will not submit it. Clicking the submit appears to do nothing at all (from what I've been told). Is there anyone with mac safari that can try it and, hopefully, see why the submit button is being completely ignored? -- kainaw™ 17:35, 27 September 2010 (UTC)
- I tested it with Mobile Safari on an iPod touch, and that form has no submit box when viewed with it (it does in Firefox, so it does seem to be a browser issue). -- Finlay McWalter ☻ Talk 17:51, 27 September 2010 (UTC)
- I suspect it's a browser compatibility problem because it's using <button type="submit">Submit</button> rather than <input type="submit" value="Submit"> If that's your website then changing it to the latter should work regardless of the browser (with the same visual appearance) ZX81 talk 18:06, 27 September 2010 (UTC)
- I have searched and I cannot find any reference that Safari won't handle <button type='submit>. There is a cross-browser issue with <input type='submit'> in the css area. You can style a button, but you can't style input-submit separately from the general submit on all browsers. -- kainaw™ 18:08, 27 September 2010 (UTC)
- That's correct about the CSS styling, but the page in question isn't doing that hence my reply about it'll look exactly the same, but will work across all browsers (I don't know about Safari, but IE6 has problems with <button>) Given what Mr.98 has just written below though, moving the <form></form> and the initial <input> outside the
would probably fix the problem regardless of whether input/button is being used. ZX81 talk 18:27, 27 September 2010 (UTC)
- That's correct about the CSS styling, but the page in question isn't doing that hence my reply about it'll look exactly the same, but will work across all browsers (I don't know about Safari, but IE6 has problems with <button>) Given what Mr.98 has just written below though, moving the <form></form> and the initial <input> outside the
- Safari 5.02's error console throws the following when it loads the page:
*<form> cannot act as a container inside <table> without disrupting the table. The children of the <form> will be placed inside the <table> instead. contact.html:171
*<input> is not allowed inside <tbody>. Inserting <input> before the <table> instead. contact.html:173
- I don't know if that helps or not. It seems to submit on my Mac (the Submit button is there, and when I put in a nonsense name and no e-mail, it told me, after submitting, that it wanted an e-mail address, which I assume means it worked). --Mr.98 (talk) 18:18, 27 September 2010 (UTC)
- That was the problem. Placed the table inside the form instead of the form inside the table and it works now. -- kainaw™ 18:41, 27 September 2010 (UTC)
- I can confirm that Mobile Safari now sees the submit button and that it works okay. -- Finlay McWalter ☻ Talk 18:49, 27 September 2010 (UTC)
- Thanks. I will have to keep in mind that some browsers don't like forms inside of tables. -- kainaw™ 18:53, 27 September 2010 (UTC)
Loose lines in LaTeX
edit How (beyond \sloppy
, which is often insufficient) does one persuade LaTeX to allow lines looser than it normally would so as to avoid overfull hboxes? (That is, persuade it to break the line before the offending word and justify the remainder, even when the result risks making rivers, rather than break it after and produce an overlong line even at the tightest spacing.) --Tardis (talk) 17:58, 27 September 2010 (UTC)
- \sloppy works by setting \tolerance=9999, \emergencystretch=3em, and \hfuzz=\vfuzz=.5pt. You may try to make it even sloppier by manually setting bigger \emergencystretch. If you just need to tweak a particular piece of text by hand, you can insert \break at the desired break point.—Emil J. 18:07, 27 September 2010 (UTC)
- Whilst this doesn't directly address your problem, it will probably do the job. Iff you're using pdflatex (it doesn't work for dvilatex), type \usepackage{microtype} in the top-matter of your document. It subtly adjusts font widths and other parameters such as to improve the appearance and readability of your documents, usually alleviating all your overfull boxes.--Leon (talk) 18:09, 27 September 2010 (UTC)
- Interesting — looking forward to trying this.
- Now, what I have often wished for is a way to convince LaTeX to break before the long word and not justify the remainder. In other words, tell it that I would rather have the text not get to the right margin rather than go past it. I don't mean putting \\ at the end of particular lines — I mean telling the algorithm "prefer underfull hboxes to overfull ones, and don't go stretching them beyond reason". Is there any way to do that? --Trovatore (talk) 08:20, 28 September 2010 (UTC)
- The algorithm does prefer underfull lines to overfull ones, in fact, it treats all overfull lines as infinitely bad. "Stretching beyond reason" is what underfull means. What you describe is a sort of ragged right typesetting, whose basic form can be done in LaTeX with \raggedright. It works by making \rightskip infinitely stretchable; if it's too ragged for you, you can instead give this parameter small finite stretchability, such as
\rightskip=0pt plus 5pt
. However, I don't think there is a way to tell the algorithm to right-justify as usual when possible, and only rag lines that would be too bad otherwise.—Emil J. 11:35, 28 September 2010 (UTC)- That's too bad. That last thing is exactly what I was looking for. --Trovatore (talk) 17:39, 28 September 2010 (UTC)
- But wait, if ovrfull lines are infinitely bad, does that apply even to lines that contain an \mbox? It wasn't really a word that I wanted it to put on the next line, leaving the previous line ragged. It was something in an \mbox. I never did figure out how to do it. --Trovatore (talk) 17:40, 28 September 2010 (UTC)
- That doesn't make a difference, I'm afraid. The algorithm treats words and boxes pretty much the same (except that words can be hyphenated). However, the way you describe it it sounds like a one-off thing, why can't you use \\ then?—Emil J. 11:26, 29 September 2010 (UTC)
- Well, that particular example was years ago, but if I had changed text above that line, it might have become wrong. I wanted a solution robust against such change.
- But if boxes are the same, then I don't understand why it ran over the right margin, rather than putting the box on the next line even at the cost of absurdly stretching text in the current line. --Trovatore (talk) 17:58, 29 September 2010 (UTC)
- Because stretching text too absurdly will also make its badness infinite (or at least exceed the \tolerance), and then it's all equal to TeX (or rather, then the decision whether to prefer one intolerable solution to another will be based solely on minimizing the badness of other lines in the given paragraph).—Emil J. 18:36, 29 September 2010 (UTC)
- I see. Thanks for explaining that; I had wondered. --Trovatore (talk) 21:07, 29 September 2010 (UTC)
- Because stretching text too absurdly will also make its badness infinite (or at least exceed the \tolerance), and then it's all equal to TeX (or rather, then the decision whether to prefer one intolerable solution to another will be based solely on minimizing the badness of other lines in the given paragraph).—Emil J. 18:36, 29 September 2010 (UTC)
- That doesn't make a difference, I'm afraid. The algorithm treats words and boxes pretty much the same (except that words can be hyphenated). However, the way you describe it it sounds like a one-off thing, why can't you use \\ then?—Emil J. 11:26, 29 September 2010 (UTC)
- The algorithm does prefer underfull lines to overfull ones, in fact, it treats all overfull lines as infinitely bad. "Stretching beyond reason" is what underfull means. What you describe is a sort of ragged right typesetting, whose basic form can be done in LaTeX with \raggedright. It works by making \rightskip infinitely stretchable; if it's too ragged for you, you can instead give this parameter small finite stretchability, such as
- Unfortunately, I'm using normal LaTeX, with a long tradition of EPS figures. --Tardis (talk) 18:45, 27 September 2010 (UTC)
- If you ever want to switch (I effectively did a small couple of years ago), ImageMagick supports
convert Science.eps Science.pdf
and mostly works well. --Stephan Schulz (talk) 07:40, 28 September 2010 (UTC) - Chances are that your TeX distribution comes with epstopdf.—Emil J. 12:09, 28 September 2010 (UTC)
- If you ever want to switch (I effectively did a small couple of years ago), ImageMagick supports
- Ah, I was being silly --
\sloppy
was actually sufficient in this case, but I forgot to apply it to the\par
in question. Thanks anyway for its internal details that might be useful later. Also thanks for\break
; I had tried\newline
and just\\
, but they don't cause stretching. I wonder what the difference is between\linebreak
and just\break
? --Tardis (talk) 18:45, 27 September 2010 (UTC)- \newline and \\ basically do \hfil\break, so they will not right-justify the text, similarly to the end of paragraph. \linebreak is more or less a fancy LaTeX wrapper around \break (or actually around the \penalty primitive), the primary practical difference being that \break in vertical mode (i.e., outside paragraph) does a page break.—Emil J. 19:03, 27 September 2010 (UTC)
- Whilst this doesn't directly address your problem, it will probably do the job. Iff you're using pdflatex (it doesn't work for dvilatex), type \usepackage{microtype} in the top-matter of your document. It subtly adjusts font widths and other parameters such as to improve the appearance and readability of your documents, usually alleviating all your overfull boxes.--Leon (talk) 18:09, 27 September 2010 (UTC)
Safari Autofill data stealing
editDoes this:link removed currently work on Google Chrome? --Belchman (talk) 19:15, 27 September 2010 (UTC)
- I imagine you are trying to indicate the Safari autofill exploit? (The proof of concept site demonstrating it that you linked to was apparently too much for Ludwig2, and maybe he is right. Anyway it is linked to from the blog I mentioned; proceed at your own risk.) It sounds like it only works with Safari. Googling "Chrome autofill exploit" seems to indicate that it does not suffer from this bug. --Mr.98 (talk) 19:36, 27 September 2010 (UTC)
- It wasn't too much, but I thought it better to remove it until I'd had a chance to examine the code. do you disagree with that? --Ludwigs2 19:38, 27 September 2010 (UTC)
- Are you done examining it? It took me about ten seconds to find out that it's harmless. It doesn't send the data anywhere.--Best Dog Ever (talk) 20:15, 27 September 2010 (UTC)
- No. It doesn't. By the way, you can always test stuff like this in VMware Workstation or VirtualBox if it's too risky to try on your main system.--Best Dog Ever (talk) 20:11, 27 September 2010 (UTC)
- Yes, I'm done. thanks for asking. --Ludwigs2 20:20, 27 September 2010 (UTC)
Thanks to everyone but Ludwigs2, of course. --Belchman (talk) 21:09, 27 September 2010 (UTC)
- You need to apologize to Ludwigs2 for that, mate. Comet Tuttle (talk) 21:21, 27 September 2010 (UTC)
- Er.. what? That was in no way a personal attack. At all. He/she doesn't have to apologize for not thanking a user who didn't help answer their question 82.44.55.25 (talk) 22:48, 27 September 2010 (UTC)
- No apology needed, so long as he doesn't continue. I've warned him on his talk page. --Ludwigs2 21:27, 27 September 2010 (UTC)
Access 2007 and too many fields
editI have somewhere around 116-ish fields in a table. I went into design view to change some of them from integer to decimal (about 50 of them). Now that I want to leave design view, Access claims I have too many fields and it won't let me save. What's wrong? 138.192.58.227 (talk) 23:02, 27 September 2010 (UTC)
- Here are Access 2007's vital statistics. Maximum fields per table: 255. So the problem is somewhere else. --Tagishsimon (talk) 00:29, 28 September 2010 (UTC)
- The only other options it has for what could be causing the problem is too many locks (I have no locks) or a setting about indexing that I have not used. 184.97.159.46 (talk) 01:25, 28 September 2010 (UTC)
- Not a helpful answer, but: this sounds like exactly the kind of finicky and annoying buggy thing that Access is very prone to. It seems to get internally corrupted pretty easily in very subtle and strange ways. It may not have anything logical related to what you did. I know: this isn't helpful. But you may have to just close without saving, reopen it, and try again. I write this not as an anti-Access person, but as someone who has struggled with its deficiencies and inherent bugginess for over a decade. --Mr.98 (talk) 02:15, 28 September 2010 (UTC)
- Thanks for the suggestion. I ended up having to split it into a few different tables, which fixed it. I'm just not sure how. 184.97.159.46 (talk) 02:36, 28 September 2010 (UTC)
- That's pretty much how it goes with Access a lot of the time. I've been using it for ages, it's always been like this, from Access 97 through Access 2007. I don't expect it will change anytime soon... --Mr.98 (talk) 15:36, 28 September 2010 (UTC)