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.
April 12
Does any programming language have a "control" class?
Hi, I'm designing an app in ios/objective c, and have found that one of the big nuisances is working out when I've initialised things or not. The app involves play and record functions, and graphing to go with them, so you get all sorts of problems working out when you've "zeroed out" something, such as deleting a sound file, or redrawing the graph. Finally, I've set up a "control" function to direct the play, and I'm thinking of turning it into a full class. Does anyone know whether such a thing exists already in ios/objective c (or any other language, for that matter)? Such a class, to be useful, would have something like boolean markers for different objects, that could be set as part of certain methods, according to whether the object is viable (properly initialised) or not. I know it would be tricky, because the class would have to interact carefully with other classes, and much of the work would be done manually (you would have to consciously remind yourself to set the flags etc), but it strikes me as possible, in principle, and potentially very useful. IBE (talk) 02:37, 12 April 2013 (UTC)
- In C-like languages, one trivial way to do it is to allocate/free the various objects when constructing/destructing them (to borrow the C++ terminology) and use the nullity (or not) of pointers to them as your flags. (This is very common: most programming does not emphasize the possibility of allocated but uninitialized objects. Some languages (like Java and Python) preclude the possibility more or less (respectively) absolutely.) If for some reason dynamic memory allocation is out, you would write a bunch of methods: e.g., getA() that creates the A if it doesn't exist and returns it, tryA() that returns a pointer to the A (even if it's not a pointer from malloc) or null if there is no A, and killA() that destroys the A if there is one currently. If other code uses just those methods, and doesn't maintain a pointer to A across any event that might result in a call to killA(), you'll be assured that the A is not used uninitialized. In C++, we might write a sort of smart pointer (a template class) that would use new/delete (or placement new and manual destructor calls in the no-allocate scenario) to implement these methods for any class, and then your control object could simply contain a number of these smart pointers. --Tardis (talk) 03:07, 12 April 2013 (UTC)
- Thanks - this is pointing me in the right direction, although I was already using this to some extent. I can incorporate some of these tricks, although the only way I can do things at the moment is to partly initialise things, and complete them later. I need to set up the sound data, then the view, and for some reason I can't quite recall, it is impractical to fix up the data in one go, then do the graph. It's largely because I didn't know much obj-c when I started the app, so learning on the job is a pain, and you can't structure your code if you don't know when "viewDidLayoutSubviews" is called. You can look that up, but the docs are a pain if you know nothing at all - great reference, very bad textbook. But I can do stuff like "getA()" that creates it if it doesn't exist, I think. More ideas welcome IBE (talk) 03:19, 12 April 2013 (UTC)
- This is why you should always have properties on the outside instead of variables. For instance, there are many reasons a graph needs redrawing: the property Scale is changed, AddValue(X,Y) was called, or LineThickness was changed. Or you just got the event SizeChanged. These things would all set GraphIsDirty to true, to be used later. I can imagine a language in which you can add that fact to the definition of a property or method (like "AddValue (X,Y) <sets GraphIsDirty>") but in most case explicitly defining the boolean yourself would probably be more clear and would allow for more subtle control. For instance, changing the property LineThickness could only set the GraphIsDirty boolean when the new Value is not the same as CurrentLineThickness to avoid unnecessary recalculating the graph. Adding checks like "WeKnowWhatFileToPlay = true" instead of "FileName !="" " when you receive "PlayClicked" are almost free in terms of programming time, code readability and computing power. IMHO, only in very rare circumstances (like an operation that will run thousands of times per second or of which millions of instances will exist) you could consider skipping those checks or rely on pointers not being null. Joepnl (talk) 00:21, 17 April 2013 (UTC)
Page Break Comlumns in Tables for Word 2007
I have a table with only one cell in it (making it essentially a box), and I would like to make the text inside the box/table into two columns - but, I do not want a two-column table. I want the text inside the box to be arranged into two columns (one left-oriented and the other right-oriented) like it would be when using the 'columns' button in the ribbon, as if the surrounding box/table were not there. What I have been doing (to no avail) is attempting to put a page break inside the box and then I click the 'columns' button in the ribbon, but the entire box/table then gets stuck in the left column - because the page break is appearing outside and above it. Can anyone help here? KägeTorä - (影虎) (TALK) 08:51, 12 April 2013 (UTC)
- Do you absolutely have to have only the one cell? Personally, I would split the cell in two, but set up the borders so only the outer border is visible. It should still look the same, but you'd be able to get the effect you're after. - Cucumber Mike (talk) 09:24, 12 April 2013 (UTC)
- I have just experimented with that, and it seems to work. I suppose I will have to go with that. Thanks. KägeTorä - (影虎) (TALK) 09:31, 12 April 2013 (UTC)
Firefox broken after reset plugin.disable_full_page_plugin_for_types
Firefox opens my PDF files inside the broswer which I wanted to stop. I found something in the Firefox help database that said to reset about plugin.disable_full_page_plugin_for_types. So in about:config I right click on that thing and clicked reset. I then exited the browser. I then started the browser again. Firefox said it was checking my plugins for compatibility. Now Firefox is all wrong. My session didn't restore. The option to restore it is greyed out. Also my back and forward buttons no longer work. Please help!
I can't link to the instructions because there's something wrong with my address bar. The contents of the address bar do not change while I move from one page to another. You can find the instructions by Googling the line: Find the preference plugin.disable_full_page_plugin_for_types and, if it is present, right-click on it and select reset.
When I try to start Zotero I get error:
Alert
There was an error starting Zotero.
2.97.27.107 (talk) 11:25, 12 April 2013 (UTC)
- Backup your profile directory, uninstall Firefox, delete your profile directory and any system (“program files”) directories/files related to Firefox, reinstall Firefox, restore data from profile directory backup as you please. ¦ Reisio (talk) 18:03, 12 April 2013 (UTC)
what are my options for fouling up a PC with a bunch of &#*($$ in a "private" mode?
So I got a laptop with a pretty pristine windows 7 installation on it. I'd like to try installing a bunch of random development tools on it, completely mess with it, but when I'm bored I want to lose all these, same as closing a bunch of tabs in private mode in a browser.
in my experience after all this stuff to turn it into a dev machine, when I don't want it anymore it's still full of $%#@. what are my options here? It's not really powerful enough to do it all in a VM, I'm afraid. 91.120.48.242 (talk) 14:02, 12 April 2013 (UTC)
- If VM isn't an option, you could partition the hard drive and install a "testing" OS where you play around, and a "healthy" OS that you keep nice/ functional. If you're willing to use Unix/Linux, you could create a "testing" user, and only do experimental things in that user's space. Or you could only install things once you are fairly certain that you understand how to uninstall them and clean out any debris :) Some additional related concepts are discussed at sandbox_(software development) and sandbox_(computer security). SemanticMantis (talk) 14:45, 12 April 2013 (UTC)
- Alternately, create an unprivileged new user account for your toolkit, and log in as that user. Never allow that user account to do anything that requires administrator privileges. The OS will do a great job enforcing that the user cannot modify the system! Unfortunately, some "development tools" like debuggers often require superuser (administrator) privileges to run; but others (like the Java compiler and SDK, or the Python interpreter) can run entirely in user-space, and can be installed and run without ever requiring administrator privileges. When you are done, delete the user-account, and the system will not be modified. Nimur (talk) 14:46, 12 April 2013 (UTC)
- I wouldn't assume that a VM needs an especially powerful machine. With modern processors, the VM works pretty much the same as the host machine. The only issue would be getting an OS to install on the VM. Depending on the development you want to do, a Linux variant might well be suitable.--Phil Holmes (talk) 16:01, 12 April 2013 (UTC)
- Wouldn't it be possible to do this using System Restore? Looie496 (talk) 16:20, 12 April 2013 (UTC)
- If you really want to start over completely from scratch after you're done, then reinstalling the O/S is one way to go, although rather time consuming.
- There are Linux implementations which allow you to keep the O/S on a separate device from the applications and data. For example, you could have the O/S on a memory stick, and all the apps on the hard drive. This allows you to simply wipe the hard drive partition in order to reset to just the O/S. I'm not aware of any implementation of Windows 7 that allows you to do that, though. StuRat (talk) 19:20, 12 April 2013 (UTC)
only 1 USB port works on desktop
Hi everyone, only 1 USB port of my parents' computer seems to work. This is a problem as they would like to have 2 functioning ports, i.e. one for a USB mouse and one for a dongle in order to access the internet. Both the dongle and the mouse will work in the functioning port, but neither work in any of the other ports. I have spoken to a couple of friends about this, and they suggested this may be something to with the number of USB1 and USB2 ports and suggested I needed a USB splitter. The mouse and the dongle are several years younger than the desktop. The desktop is quite old now, bought in approx 2005, it was bought and is being used in the UK.
The computer is 'manufactured and supported by emachines' and there is the code E3016. It is running on Windows XP, home edition version 2002 service pack 3.
Do you think a USB splitter would help in my case? Apologies if I have not provided enough info, I will post more if required! Thanks, RichYPE (talk) 14:41, 12 April 2013 (UTC)
- I think a usb hub is very likely to solve the problem, and probably the least expensive option. Amazon has several models in the $7-$20 range, which isn't much to risk for a potentially easy fix. SemanticMantis (talk) 14:48, 12 April 2013 (UTC)
- Can you report what you see in the Device manager? Are those ports shown as working or as problematic? Ruslik_Zero 19:01, 12 April 2013 (UTC)
I've just opened device manager, There are 6 ports, this is what I see for each of the ports: 1. HUAWEI mobile connect (this is my dongle I'm guessing) 2. Standard enhanced PCI to USB host controller 3. Standard openHCD USB host controller 4. Unkown device 5. USB root Hub 6. USB root hub
At the time of writing, the only thing plugged into any of the ports is my mouse.
I hope I have provided an adequate elaboration for you Ruslik. Thanks RichYPE (talk) 19:14, 12 April 2013 (UTC)
- might be worthwhile opening the case to see if any wires are just loose. Gzuckier (talk) 01:36, 13 April 2013 (UTC)
Problem with Skype
Few days ago, when logging into Skype, it updated automatically to the version 6.3.60.105. After that the video calls have worked poorly, and my contacts haven't been able to see my video well. I have never had this kind of problem before and for example video calls on Facebook work normally, so the problem shouldn't be my computer. Does someone have a solution for this? 84.251.121.188 (talk) 17:18, 12 April 2013 (UTC)
- Downgrade, disable automatic updates. ¦ Reisio (talk) 18:10, 12 April 2013 (UTC)
- Reisio, because Skype is a network-enabled program that depends on a client-server model, that is probably not a functional solution. You are assuming that the previous client-version is compatible with the current network and servers.
- 84.251.121.188, consider asking at the Skype community-forums, and if your problem is not yet known, the developers will instruct you on how to file a bug-report against Skype. Nimur (talk) 19:36, 12 April 2013 (UTC)
- Not assuming, no. ¦ Reisio (talk) 22:26, 12 April 2013 (UTC)
How Can You Do A Free Reverse E-mail
I been going through reverse E-mail. Sites and had no luck. They all charge for me to look up this persons. Other E-mail accounts. I have 1 of his E-mail accounts however he does not use that one. So I to do a reverse E-mail look up. But I cant pay for it right now. Is there a way to do it for free. My question.
- You could ask him for an email address he uses. ¦ Reisio (talk) 22:23, 12 April 2013 (UTC)
- Didn't you ask this a few weeks ago? Perhaps if you told us what your final goal is, we could help you get there by other means. Dismas|(talk) 02:03, 13 April 2013 (UTC)
- You had best check with your lawyer about the legality of such an activity. As I recall, you were told this 10 or 11 days ago when you brought the same subject up. ←Baseball Bugs What's up, Doc? carrots→ 02:54, 13 April 2013 (UTC)
- I'm going to raise this matter at WP:ANI, as I think we could put ourselves into a questionable situation if we pursue this. ←Baseball Bugs What's up, Doc? carrots→ 21:02, 13 April 2013 (UTC)
- The answer seems to be that any such service, free or otherwise, is only legal if it has obtained and accumulated publicly-available e-mail addresses. So at any price, legally, you're only going to get a subset of possibilities. And the point was made that since the data accumulation effort requires work, why would anyone want to give it away? ←Baseball Bugs What's up, Doc? carrots→ 14:48, 14 April 2013 (UTC)
- I'm going to raise this matter at WP:ANI, as I think we could put ourselves into a questionable situation if we pursue this. ←Baseball Bugs What's up, Doc? carrots→ 21:02, 13 April 2013 (UTC)
Chess: computer against human + computer
Would it make a difference if a human helped a group of computers in a chess game against another group of computers? I don't mean whether letting the human be a kind of manager who chooses a computer good at openings and another good at endings at the appropriate moment would be beneficial, but could the human add something of value to the game strength? OsmanRF34 (talk) 23:31, 12 April 2013 (UTC)
- As in Advanced Chess? I don’t see how, unless a human noticed a blatant flaw in something to do with a computer (that is, unless it came down to something not particularly related to chess theory). ¦ Reisio (talk) 23:57, 12 April 2013 (UTC)
- People can (sometimes) see things that the chess engines don't. Bubba73 You talkin' to me? 04:13, 13 April 2013 (UTC)
- Such as? Chess engines have been designed by (a myriad of) people. ¦ Reisio (talk) 04:55, 13 April 2013 (UTC)
- I had a position in a tournament game about a year and a half ago that I could see was a win. Houdini 2.0C, 64-bit version, running on a quad-core hyperthreaded i7 doesn't see the win. See Horizon effect. Bubba73 You talkin' to me? 05:04, 13 April 2013 (UTC)
- I could see how that might happen in Go or other games (for the time being), that have a great many more possible moves, but not Chess, not without inferior hardware or software. Would you consider Houdini 2.0c with that hardware to have been state of the art? (Or even just the software.) Ignoring that, do you think you could have won two out of three games against such a box? Would you have gone against the engine’s suggestion? I took Osman’s question as one posed against ideal situations. ¦ Reisio (talk) 05:36, 13 April 2013 (UTC)
- As a chess player and ref-desker, I agree with Reisio's interpretation of the question, but I agree nonetheless with Bubba's claim. It is all the more true in Go, but sufficiently true in chess, for a grandmaster to be more adept at certain situations, and to be capable of outwitting a computer. "State of the art" and "ideal" situation must apply to the choice of computer and the selection of the human, and grandmasters are in a class of their own at understanding what is really building in a position. Hikaru Nakamura won this classic game against Rybka by knowing the computer's specific weaknesses. For a human/computer team, you would need the human to get practice at working with the computer, and you would need a long time limit (to allow the human to go back and forth between the computers suggestions and his own thoughts), but having the option of the human would be an advantage. IBE (talk) 08:54, 13 April 2013 (UTC)
- By knowing them ahead of time, or just figuring them out? To me the former would be a “blatant flaw…not particularly related to chess theory”. Not to draw out a conversation well farther than could possibly matter… :p ¦ Reisio (talk) 11:11, 13 April 2013 (UTC)
- Ok, I get we don't want to go on in detail, but you can look at the game I linked, where Nakamura makes one of the strongest engines look utterly stupid. For whatever reason, humans can still sometimes outwit computers, so a human/computer combo would be able to avoid a defeat like the one Nakamura inflicted. IBE (talk) 12:37, 13 April 2013 (UTC)
- Certainly and I agree, but there’s winning and there’s winning two out of three; there’s beating an opponent and actually being (statistically) superior to that opponent. ¦ Reisio (talk) 12:43, 13 April 2013 (UTC)
- Good point - that's why I say the human would have to spend time playing with the computer, since at first he might not know when to trust the computer and when not to. But with time, the human-computer combo would get better, although the advantage over a pure computer might be small. I still believe, based on what I've seen as a chess dilettante, computer dilettante, and chess computer dilettante, that computers on their own can be corrected, albeit carefully. IBE (talk) 13:55, 13 April 2013 (UTC)
- Note: as Reisio pointed out above, yes, I mean ideal situation, not any situation when the computer/program is substandard. So, I simply don't see how the human is not completely deprecated in chess (at the moment of playing). Even giving the human some DBs and time, could he correct the computer? OsmanRF34 (talk) 12:21, 13 April 2013 (UTC)
- An infinite amount of time and a sound mind, maybe. :p The way I look at it, though, is that if you’re simply programmatically recalling the best possible move in whatever situation you find yourself in based on study of whatever, you aren’t really proving much except that you have a good memory. To me this makes even a lot of professional human chess participants impressive demonstrators of memory, but not necessarily strategy or logic. ¦ Reisio (talk) 12:49, 13 April 2013 (UTC)
- Properly speaking, if the human is using DBs and looking into the position, he is doing research. That's (more or less) how you build chess computers in the first place. A human looks at the errors they make, and works out improvements. Admittedly you are talking about a different situation, where you do this while a game is in progress, but with a lot of info and time, you are doing something quite similar. Computers make mistakes that humans can detect, but the mistakes are subtle. Humans make mistakes that computers punish much less subtly. IBE (talk) 13:55, 13 April 2013 (UTC)
- On the other hand, if you and a computer were playing against a human grandmaster, you might be able to help the computer beat him. For example, if you knew a particular weakness of the grandmaster, and the computer gave you a range of equivalent moves to choose from, you could pick those moves which steer the computer towards his weakness. (In theory, the computer could analyze the opponent directly, by reviewing all his past games for weaknesses, but I'm not aware of any programs that do that.) StuRat (talk) 15:58, 13 April 2013 (UTC)
- That was more or less how Deep Blue beat Kasparov - it was programmed for him specifically. Not quite the same, since it didn't analyse his games on its own, but not unrelated. IBE (talk) 10:07, 14 April 2013 (UTC)
April 13
can't copy WMA files
I'm trying to copy files from one computer to another over my Windows home network. All types of files seem to be working except *.WMA files. When I try to copy them, it says that I need to be an administrator. I am an admin. When I've gotten this type of message before (about admin), I tell it to do it anyway and it works. Other types of files, including *.WMV, work. What could be the problem? Bubba73 You talkin' to me? 03:09, 13 April 2013 (UTC)
- PS - and I can play back the WMA files over the network - I just can't save them to my computer. Bubba73 You talkin' to me? 03:36, 13 April 2013 (UTC)
- Could probably reboot into safe mode as a one-off solution. ¦ Reisio (talk) 03:55, 13 April 2013 (UTC)
- I want to do it repeatedly. Bubba73 You talkin' to me? 04:12, 13 April 2013 (UTC)
- It might be worthwhile to look at the "Properties" of one of those files, to see if something is setting them to an elevated level of security. Where did your WMA files come from in the first place? Looie496 (talk) 04:39, 13 April 2013 (UTC)
- These particular ones were recorded by my daughter using a microphone. Bubba73 You talkin' to me? 04:46, 13 April 2013 (UTC)
- They were marked "read only", but taking that off didn't help. Bubba73 You talkin' to me? 04:58, 13 April 2013 (UTC)
- http://webchat.freenode.net/?channels=##windows would be my first stop, although this time of day is probably not the best. ¦ Reisio (talk) 05:39, 13 April 2013 (UTC)
- This seems a little odd for files your daughter recorded herself, but one of the things that is special about the WMA format is that it supports DRM. If your files have DRM activated, then clicking on Properties->Details should show a line that says "Protected Yes". (I'm really just guessing here, I'm afraid.) Looie496 (talk) 05:40, 13 April 2013 (UTC)
- She recorded them for a language class she is taking. I'll have to check on the "protected" and if I can copy within the same folder (she is using her computer right now). Bubba73 You talkin' to me? 14:44, 13 April 2013 (UTC)
- Are you able to copy them within their current directory? If so, maybe rename the copy to .txt or something. Or, create a zip file containing the copied wma file, then copy the zip file. ←Baseball Bugs What's up, Doc? carrots→ 06:59, 13 April 2013 (UTC)
- The properties/details say not protected. It did make a copy of the file in the same folder with no problem. Then I tried copying the copy over the network from her computer to my computer and it worked! Then I tried copying the original file, but it still had the same problem. Bubba73 You talkin' to me? 16:35, 13 April 2013 (UTC)
- Very strange. But at least now you have a workaround. ←Baseball Bugs What's up, Doc? carrots→ 16:50, 13 April 2013 (UTC)
- The properties/details say not protected. It did make a copy of the file in the same folder with no problem. Then I tried copying the copy over the network from her computer to my computer and it worked! Then I tried copying the original file, but it still had the same problem. Bubba73 You talkin' to me? 16:35, 13 April 2013 (UTC)
- Well, not exactly. I'm trying to do two things with my daughter's files: (1) keep them synchronized between my computer, her computer, and her thumb drive (which she takes to school) - so when she works on a file, she is working on the latest version of it and it gets copied to the other computers. (2) Get a current copy of all of her files to my computer so they get backed up (online, etc). Bubba73 You talkin' to me? 20:31, 13 April 2013 (UTC)
- ... Because I can't copy or rename them on her computer from my computer. I have to be on her computer to do it. The idea is that I can sync the files from my computer. Bubba73 You talkin' to me? 23:31, 16 April 2013 (UTC)
Yahoo! loading problems
For quite some time now, I've been getting connection problems every time I load up Yahoo!. Basically, the website will either not load, or will load very slowly, and when it does load, it doesn't load properly. At first, it was only the main portal that didn't load, but now, even Yahoo! Answers isn't loading. At first, I thought it was a problem with my browser or computer, so I cleared my cookies, and although it does load a bit it still doesn't load properly. I've also tried other connections and other computers, and the same problem occurs. Is there a problem with the website? For reference, I use Yahoo! Philippines. Narutolovehinata5 tccsdnew 04:14, 13 April 2013 (UTC)
- Have you tried computers using other ISPs? Or just calling your ISP. ¦ Reisio (talk) 04:51, 13 April 2013 (UTC)
How to download a video from YouTube?
I want to download a video (based on Mass-Energy Equivalence) from YouTube, but I have no downloading software installed in my computer. Then, how can I download that video from YouTube? 106.216.108.36 (talk) 06:22, 13 April 2013 (UTC)
request to send me the email addresses
Hello, I want the email addresses of all the companies mentioned in the link under.
http://en.wikipedia.org/wiki/List_of_companies_of_Bangladesh
Can you provide me the email addresses? It would be very helpful for me
I hope that you will be kind enough to provide me the email addresses.
Thanks — Preceding unsigned comment added by Naimash (talk • contribs) 13:08, 13 April 2013 (UTC)
- Sure thing. ¦ Reisio (talk) 13:26, 13 April 2013 (UTC)
- I expect Reisio is busy following links from the list to each company's website (at the end of each article) to glean a list of e-mail addresses to save you the time and effort, but you might get the list more quickly by doing this yourself. Dbfirs 15:36, 13 April 2013 (UTC)
How do I compare two LibreOffice Writer documents?
I have two .odt files saved from LibreOffice-Writer 3.5 under Windows7.
The LibreOffice function:
Edit->Compare documents
marks big blocks of text as changed while, in fact the files are almost identical (the difference is only a few characters or some font effect bold italic etc.)
Is there some no cost solution that will help me spot exactly what has changd?
-- 46.15.140.5 (talk) 14:07, 13 April 2013 (UTC)
- I doubt there is (that is also as “user friendly” as LibreOffice). Use a markup language next time, such as LaTeX, and it’ll be quite simple. ¦ Reisio (talk) 14:52, 13 April 2013 (UTC)
- If you just want to see what text has changed (and therefore disregard formatting changes), you could try converting the files to .txt and comparing the two text files. This shows you how to do it in Linux, but I think only the first program (odt2txt) works under Windows. For the comparison part you'll need something like windiff.exe. - Cucumber Mike (talk) 15:51, 13 April 2013 (UTC)
- There is a utility called DeltaXML ODT Compare that is designed to do that job. You can download it at http://extensions.openoffice.org/en/project/DeltaXMLODTCompare, but whether it will work for you is more than I can say. Looie496 (talk) 16:20, 13 April 2013 (UTC)
True Manhattan distance ?
I wasn't sure whether to post this Q here or at the Math Desk. I posted there, but here's a link: Wikipedia:Reference_desk/Mathematics#True_Manhattan_distance_.3F. I have some psuedocode for an efficient way to find this, and I'm wondering if I should post to that article or somewhere else. StuRat (talk) 15:46, 13 April 2013 (UTC)
- The usual algorithms for shortest path are already here. (Otherwise I fear WP:OR applies...) --Tardis (talk) 17:13, 13 April 2013 (UTC)
Bitcoin
I've read the Bitcoin article, and have read news reports on it, but I still don't understand what it is. Can somebody give me a simple explanation in words of one syllable? RNealK (talk) 18:07, 13 April 2013 (UTC)
- Home made crowd sourced scrip with no real worth (no real store will take it). It is backed by math no one in the crowd knows. Is that monosyllabic enough? If not, we have simple:bitcoin. Nimur (talk) 18:18, 13 April 2013 (UTC)
- cash you can't spend. 178.48.114.143 (talk) 18:32, 13 April 2013 (UTC)
The goal was to create a "virtual" currency, a currency that would exist only online but could still be used to buy and sell things. The people who created it disliked the fact that existing currencies could be manipulated by entities like the Federal Reserve and Bank of England. They wanted to create a currency that would be totally immune to manipulation and therefore extremely stable in value. Basically they yearn for the good old days of the gold standard, and want to reproduce that situation, but with "virtual gold". They thought if they could do that they would get a currency that is extremely stable and reliable, which would therefore drive out other currencies. The actual result, though, is that their currency has been extremely unstable, with the "exchange rate" spiking or plummeting over the course of days. Looie496 (talk) 18:38, 13 April 2013 (UTC)
- To do justice to the original question, though, we need to distinguish between these two sub-questions: "what is bitcoin?" ...And "how does the bitcoin technology ecosystem work?" The first question is straightforward: it is a currency intended to use technology to eliminate dependence on a central authority (motivated by a political agenda, as Looie496 explained). The latter question requires some technical detail, because bitcoin relies on some complicated work to guarantee consistency without depending on a central authority. Nimur (talk) 18:45, 13 April 2013 (UTC)
- I'm not surprised that a poorly traded asset is also highly volatile. That's like penny stocks.
- I don't know whether no store will take it. Apparently, some online stores claim to take, or at least, they claim to be stores. Anyway, it's a non-governmental currency that anyone is allowed to print (or mine digitally), but apparently takes time to be generated, so no risk of hyperinflation here. There is no way of knowing whether someone somewhere can generate it in great amounts, so it could be a complete rip-off. Indeed, although some users might be serious about it (due to anarchistic ideological reasons), bitcoin is said to be plagues with scams and other illegal schemes.
- As any currency, it has no real value per se, and its only as much worth as the products and services people are willing to hand you in exchange. OsmanRF34 (talk) 18:55, 13 April 2013 (UTC)
- That's not entirely a fair assessment. Actual real legal currency has actual real legal value - even if it is, economically, value induced by fiat. Legal tender means that the government will back you up when you try to exchange currency for goods and services - this is the upside of fiat currency that anarcho-bitcoin radicals fail to understand. If your landlord comes around demanding rent, and you pay in U.S. dollars or your local legal tender, your local, state, and federal governments will defend you - militantly, if necessary - if your landlord tries to forcefully evict you. If you pay in bitcoins, and your landlord comes around demanding rent in legal currency, you may find yourself on the opposite side of the fiat. Nimur (talk) 19:06, 13 April 2013 (UTC)
- "Legal tender" status of money is widely misunderstood, and this is another example of that. What you contract with someone in, whether it be exchanges of dollars, euros, goods, or just promises (you'll mow my lawn if I paint your fence), that's all contract law. The courts will indeed help you enforce a contract if you specify you're going to pay it in bitcoins or whatever other medium of exchange. Legal tender, at least in the U.S., works in most cases as a default (of course you can't pay your taxes or a fine in bitconis), and practically speaking it's rarely relevant. Shadowjams (talk) 20:00, 13 April 2013 (UTC)
- I agree that not being legal tender makes bitcoins a quite different kind of currency, more akin to collectible articles of unknown value than to the dollar or yen. But what's the relationship between fiat currency to legal tender? If we had gold backed currencies, they would also be legal tender. I am not fan of the golden standard, but under this aspect, it would provide the same legal enforcement (and additionally, you would be able to convert it to gold at a fixed rate). OsmanRF34 (talk) 19:46, 13 April 2013 (UTC)
- Currency backed by bullion is also fiat currency, despite the superficial appearance of "inherent value" in certain soft metals. Somebody (e.g., the government) is decreeing and enforcing a conversion-ratio between bullion and currency-units. Furthermore, the choice of which type of bullion in reserve is also made and enforced by decree. In this sense, it is even more invasive monetary policy compared to a modern fractional-reserve-banking system (wherein the only "decree" is a nationalized interest-rate that applies to certain transactions), because a bullion-reserve-backed-currency does not permit the market to revalue the price of bullion. Nimur (talk) 20:05, 13 April 2013 (UTC)
- That's not entirely a fair assessment. Actual real legal currency has actual real legal value - even if it is, economically, value induced by fiat. Legal tender means that the government will back you up when you try to exchange currency for goods and services - this is the upside of fiat currency that anarcho-bitcoin radicals fail to understand. If your landlord comes around demanding rent, and you pay in U.S. dollars or your local legal tender, your local, state, and federal governments will defend you - militantly, if necessary - if your landlord tries to forcefully evict you. If you pay in bitcoins, and your landlord comes around demanding rent in legal currency, you may find yourself on the opposite side of the fiat. Nimur (talk) 19:06, 13 April 2013 (UTC)
- (ec) One should be careful, though, with that sort of example. (For now, I'll leave aside all the special legal bric-a-brac that complicates residential landlord-tenant contracts.) With something like a rental agreement, payments and amounts are almost always denominated in dollars (or whatever the appropriate local currency is, I'm going to use 'dollars' for the rest of this post for convenience's sake)—you must pay in dollars because that's what you explicitly agreed to do. Legal tender is legal tender for settling financial obligations only. In principle, there's nothing to prevent you signing a rental agreement that specifies some other in kind or currency exchange: pounds sterling, ounces of gold, shares of IBM stock, paintings by Salvador Dali, time on your sailboat, Bitcoins, or just about anything else. Generally speaking, breaches of such a contract by either party are just as open to redress in court – backed, as necessary, by government-controlled force – as breaches involving agreements denominated solely in dollars. Equitable remedies in such cases will often be granted in dollars as a convenient measure of value (when the contract terms originally specified some other reasonably fungible good), but courts can and do demand specific performance when appropriate.
- As well, your statement of the applicability of legal tender is a bit overbroad. In the United States, for instance, there is no federal – and often no state or local – requirement that any business accept U.S. dollars offered for goods and services; the actual situation is much more nuanced. (See the relevant sections of legal tender and invitation to treat, to begin with.) Your local convenience store can refuse to accept high-denomination banknotes out of a fear of counterfeits—even though the U.S. hundred says "This note is legal tender" right next to Ben Franklin's face. For that matter, your local convenience store could insist on pricing and payment exclusively in euros, Bitcoins, or jelly beans, though it probably wouldn't be a successful business move. TenOfAllTrades(talk) 20:18, 13 April 2013 (UTC)
- All fair points. To enlighten myself, I read what the U.S. Treasury website has to say on the topic of "legal tender." According to the Treasury website's interpretation of Section 31 U.S.C. 5103, there is a distinction between a general business transaction (where any payment arrangement can be made), and debts tendered to a creditor - where U.S. dollars are legally acceptable. I am not a lawyer, and most of the legal-ese I read recreationally are CFRs, which are written more specifically than United States Code; so I defer on interpretation of these nuances to the more appropriate legal experts. Nimur (talk) 20:26, 13 April 2013 (UTC)
- Thanks, everybody. It's used quite a bit on Silk Road, isn't it? RNealK (talk) 01:27, 14 April 2013 (UTC)
- Silk Road marketplace has an annual transaction volume of 14 million USD worth of bitcoins. The world economy has a GDP of 70 trillion USD, at least 14 of which is actually in USD. --140.180.240.67 (talk) 06:48, 14 April 2013 (UTC)
- According to Silk Road (marketplace), yes, bitcoin is used a lot there, since it claims to provide anonymity. This might be useful since "Most sellers on the site (...) offer products such as heroin, LSD, and cannabis." I doubt however that bitcoin is as anonymous as cash. And I wouldn't compare the 14 million to the world economy, but to the US$321.6 billion turn-around of illegal drug trade OsmanRF34 (talk) 13:32, 14 April 2013 (UTC)
Power indicator on my computer disappeared
I'm using an HP Pavilion dv6 laptop running Windows 7 and recently the power indicator for my battery disappeared. Changing my power options doesn't cause it to reappear and if I go to "Turn system icons on or off" the power icon is set to off, but it is the only option that can't be toggled. Does anybody have any idea what's up? My computer ran through an update the other day and I'm assuming that's what got rid of it. Ryan Vesey 21:54, 13 April 2013 (UTC)
- Instal Linux on it. Then, the operating system wont just do things that mystify you. You should own your computer not Microsoft.--Aspro (talk) 22:24, 13 April 2013 (UTC)
- Installing Linux is not a catch-all solution to all problems that appear in a PC running Windows. OsmanRF34 (talk) 00:53, 14 April 2013 (UTC)
- That's nuts. The exact same thing happened to me yesterday on my Toshiba laptop. It's back now after I restarted the thing. You didn't happen to download something that came with an attachment called Delta Search Babylon or the like did you? I think that's what happened to me. It's some type of malware that takes over your internet and also, apparently, part of your computer. It's gone now, thankfully, but I can only surmise that it caused the problem. Go Phightins! 22:59, 13 April 2013 (UTC)
- It's surprising I didn't think of restarting, that restored it immediately. Interestingly, right after posting the above question, I went and downloaded some malware like an idiot so I've been getting rid of that. I should be all good now. Ryan Vesey 01:01, 14 April 2013 (UTC)
- That makes Aspro's suggestion above even funnier. That should serve as a lesson for all Linux enthusiast: "Do not replace Windows for Linux, when a re-start will suffice." OsmanRF34 (talk) 13:23, 14 April 2013 (UTC)
- I might as well say: why depend on a monolithic OS that you have to power down and restart in the first place? As the OP mentions, he then had to sort out a malware problem. Linux 2 Microsoft 0. If you find sorting out these peccadilloes is better that getting your computer to work as a reliable tool, then I too find that both funny but sad. --Aspro (talk) 19:29, 14 April 2013 (UTC)
- That makes Aspro's suggestion above even funnier. That should serve as a lesson for all Linux enthusiast: "Do not replace Windows for Linux, when a re-start will suffice." OsmanRF34 (talk) 13:23, 14 April 2013 (UTC)
- Also see the Virtual MCSE, which probably would have solved this problem. --Stephan Schulz (talk) 14:35, 14 April 2013 (UTC)
I definitely prefer Linux to Microsoft, but saying "Just install Linux" is no way to troubleshoot! Maybe he prefers Windows, maybe he is required to, or whatever other reasons, but that's terrible advice. It's like responding to "Hey, I want to paint my car blue, but the paint doesn't stick. Help?" with "What on earth are you doing green is objectively superior to blue paint it green instead." Unless someone is using Windows 3.1 voluntarily, I think it makes more sense to address their problem than to tell them to switch their personal preferences. BlueBattery (talk) 02:11, 15 April 2013 (UTC)
- Understand where you coming from BB. This is where I'm coming from: Trouble shoot or effective trouble shoot? Life is sort. The are only 24 hours in a day. Less than 9,000 in a year. When Gus Grissom, Ed White and Roger Chaffee perished in the 1st Apollo capsule fire, NASA choose not to just 'trouble shoot', then sit back and wait for the next disaster to happen – instead they had the whole capsule redesigned [1]. If the OP 'needs' as you say to run Microsoft then do it in a VM. I've noticed too, that Microsoft have removed their claim that the TCO (Total Cost of Ownership) is less with Windows because the maintenance costs are lower. When motor cars first hit the roads, one had to take out the big ends every 500 miles and recast (then scrape) the the white metal bearings and change plugs, contact breakers etc.. Today, a car has a warranty for oodles of miles and most people can afford them. I really can't see the fascination of wanting to keep keep fiddling with a traction engine to keep it as you main means of transport. So I don't have a problem with suggesting to others that they be better off in the long term, to cut their losses now and move on to more reliable software.Aspro (talk) 18:04, 15 April 2013 (UTC)
- Back to answering the OP's question... I had something similar happen where some standard notification icons just disappeared. When I eventually found the control, it was greyed-out. I had to delve around in the registry to get them to come back. IIRC, I found help on Microsoft's site. Thuis is maybe not the exact page I used, but this sounds relevant: http://support.microsoft.com/kb/945011/en-us Astronaut (talk) 17:09, 16 April 2013 (UTC)
- It could be that Windows has decided to hide the icon. Assuming you are using Windows Vista or Windows 7, then :-
- To the right of the taskbar icons is two uparrows. Click on this, and a list of icons appears.
- If the power icon is there, then it has been set to autohide.
- To fix this :- click on "customize" on the list that has just appeared.
- A dialog box listing all the icons will appear.
- Select the drop-down menu to the right of the Power icon, and change to "Show icon and notifications".
- Ok the dialogbox, and the power icon should be back in the taskbar.
- CS Miller (talk) 20:36, 18 April 2013 (UTC)
April 14
bar codes
i was wondering if a carefully crafted bar code can be used to exploit a scanner. thanks, 70.114.248.114 (talk) 00:16, 14 April 2013 (UTC)
- Exploit to do what? OsmanRF34 (talk) 00:48, 14 April 2013 (UTC)
- It is conceivable that a badly designed program could mishandle input data and it could cause some exploit. It's a very small amount of data though (relatively; even QR codes are not especially large) so they would need to boostrap larger code to do much interesting. I am sure there have been examples of this (I seem to remember hearing some) but they're exceedingly rare.
- If you mean exploit in other ways though, like lower the price, that's a different question. Most basic UPC barcodes only contain a SKU number, and the relevant data is in a database. There have been UPC swapping scams though. Shadowjams (talk) 00:55, 14 April 2013 (UTC)
Why is malware combined with useful downloads?
I recently downloaded some malware while downloading something I actually needed. In this case, it was a program that takes over my search called "Delta Toolbar". I'm usually good with checking every time I'm installing something to see if it's asking me to install whatever program it wants to use to give me extra search bars or overhaul my search what have you, but it does always seem to be related to searching. Is this how those legitimate downloads are able to make money since they're free? Ryan Vesey 01:09, 14 April 2013 (UTC)
- That's what I would guess. I was converting a file type last night online, and apparently had to download an "installer" to convert the file and, in a weaker moment, did not notice that I was downloading something else with the installer. I got this stupid Delta Search thing too, so I assume it has something to do with money. Google it and you will read all kinds of things about it. It took me a half hour to get everything from it off my computer and then I had to uninstall and reinstall Chrome to remove all of the crap it added to that. Go Phightins! 01:16, 14 April 2013 (UTC)
- The toolbar developers pay third parties to bundle them with their products ("pay-per-install"). They make the money back through advertising displayed on the search results page and/or tracking the web sites you visit and selling that information.
- Sometimes it's the author of the other product who bundles the toolbar to get some extra revenue, but in this case you will always, I think, be given the option to not install it. (PDFCreator is an example of an open-source product that does this.) However, there are also scammy web sites that redistribute legitimate software from other sites with an adware-installing wrapper. So you should avoid downloading even well-known freeware from random sites. Get it from the official site mentioned in the Wikipedia article, if possible.
- (Incidentally, another scam you've probably noticed is ads that appear on software download pages that look like "download" buttons, but actually download something entirely different. If you don't have an ad blocker, it can be hard to find the real download button even on the official download page. So be careful out there.) -- BenRG 02:53, 14 April 2013 (UTC)
- I'm almost positive I had the opportunity to stop this one. I opened the install window, and started pressing next like a madman. I was glancing at the windows, but not well enough and I realized I hadn't unchecked a bit of malware. I clicked cancel on the next window hoping I could start over; however, it considered cancel to mean "no, I don't want to install this second bit of malware, go ahead and install everything else now". There was no option to stop the download at that point, even task manager didn't take care of it so I got to watch as my computer installed the malware, it was frustrating to say the least. I do most of my downloading from CNET, but it can get really frustrating because once you click download, it confuses you by throwing up 1000 things with download buttons. Ryan Vesey 03:05, 14 April 2013 (UTC)
- You have to be careful about where you are downloading from. Even with legit services, they like to trick you into downloading something else - usually a browser add-on or a program to "scan" your computer for errors. Bubba73 You talkin' to me? 03:22, 14 April 2013 (UTC)
- So I realized I hadn't downloaded what I wanted to at all so I took another look. The download was through adf.ly, which requires you to stare at an ad for 5 seconds and the download link is in the upper right hand corner. There is a much larger download button in the center (the ad) and I went for that one. On another note, a couple years ago I had a popup tell me that my computer had 5 viruses and that I should download a new program to get rid of them. It was a trojan and within a week the computer wouldn't even start. Ryan Vesey 03:33, 14 April 2013 (UTC)
- You have to be careful about where you are downloading from. Even with legit services, they like to trick you into downloading something else - usually a browser add-on or a program to "scan" your computer for errors. Bubba73 You talkin' to me? 03:22, 14 April 2013 (UTC)
- Yes, a couple of I've fallen for that trick of the large download button in the center when the one you want is smaller and in the corner. Now I always try to watch for that. Bubba73 You talkin' to me? 04:06, 14 April 2013 (UTC)
- It is very annoying this crossing the line tat is done on both sides and it just makes for a worse time for all. Personally I consider that I should have a look at somebody's ads if that's the price a person wants me to pay for something, but then you have people with ad blockers who ruin their revenue stream. So then the ads get mean and nasty in their tricks getting people to do things they have not and do not want to agree with. So users have to avoid and be careful of the whole business and treat all ads as malware in the offing. In the end the only winners are large corporations like Microsoft or Apple where people have a good idea what they're getting and just pay the money rather than bothering with all the worry, people without much money are fed viruses. Dmcq (talk) 10:34, 14 April 2013 (UTC)
- Even if you download Adobe Reader directly from Adobe, it tries to get you to install McAfee (defaulting to do it), IIRC. Bubba73 You talkin' to me? 17:47, 14 April 2013 (UTC)
bootstrapping/changing ip address
1: my router is configured to have a dynamic ip, but whenever the lease is up, it does not change. what causes this, and how do i change it manually (if i can)?
2: if someone can give me a short example of python code that bootstraps more complex code, that would be great. thank you, 70.114.248.114 (talk) 03:53, 14 April 2013 (UTC)
- Are you losing connectivity to your ISP? As I understand it the lease should never expire as long as you remain connected (assuming the DHCP server is working properly). Looie496 (talk) 04:02, 14 April 2013 (UTC)
- You don't generally change addresses when a (DHCP or apartment) lease expires. ISPs use dynamic IPs so that they don't have to pay for IP addresses for people who aren't connected; they have no reason to move you as long as you are connected. If you stay disconnected for long enough the ISP will assign the address to someone else and then you'll get a new one, but I couldn't tell you how long it would take (minutes/hours?).
- I don't understand your second question. What kind of bootstrapping do you want? -- BenRG 04:51, 14 April 2013 (UTC)
- Note that, as a general rule, ISPs use RADIUS to allocate IP addresses, not DHCP. There's no concept of a "lease". That said, the solution of turning the box that interfaces to your ISP (normally a DSL or cable modem, rather than a straight router) off for a while would get a new IP address.--Phil Holmes (talk) 10:53, 14 April 2013 (UTC)
so, if you have a dynamic ip, it does not change at regular intervals? but only when disconnected for some time? 70.114.248.114 (talk) 00:20, 15 April 2013 (UTC) also, how does an ip scrambler work? 70.114.248.114 (talk) 00:21, 15 April 2013 (UTC)
- My IP address changes at random, sometimes in the middle of editing, but this is because I have an intermittent internet connection via a long chain of microwave links, and sometimes this can be very frustrating (though not a problem in Wikipedia because I always edit from my account). Most people's IP addresses are fairly static as explained above. Why would you want to keep changing IP addresses? I trust you are not aiming to avoid blocks. (That's genuine trust, not a snide comment — I've no reason to think that any of your edits have been vandalism.) Dbfirs 07:11, 15 April 2013 (UTC)
thanks for the trust (we need more of that in this world). since some sites use permanent ip blocks, i just wanna be able to change mine in case i find a site that blocked the last person to have my ip. thanks all for the info, 70.114.248.114 (talk) 21:15, 15 April 2013 (UTC)
emacs descent into wordprocessorhood
I've got a new version of emacs (23.2.1) on one of my computers, and it's behaving differently when long lines are wrapped. Control-N and control-P are moving between display lines, not actual lines. That is, if I've got a narrow window containing two lines of text:
The quick brown fox \ jumps over the lazy dog
where the cursor is under the q of "quick" and the first line is wrapped, control-N moves to the s of "jumps".
That is, it moves to another position on the same line. That's not what control-N is supposed to do! This may be fine for the word processor crowd, but I've been using emacs for (lemme see) 33 years now, and my fingers and lower spinal cord are pretty used to it working the old way.
Presumably there's a mode flag to turn this ghastly new behavior off -- anybody know what it is? —Steve Summit (talk) 12:29, 14 April 2013 (UTC)
- You'd never have this problem with vi Rojomoke (talk) 12:32, 14 April 2013 (UTC)
- Har har. (I'd just have all those other problems!)
- Anyway, if I'd just done a google search, I could have answered my own question.
- From http://www.gnu.org/software/emacs/manual/html_node/emacs/Moving-Point.html:
- "When a line of text in the buffer is longer than the width of the window [...]
- For convenience,
C-n
andC-p
move point by screen lines, as do the equivalent keys<down>
and<up>
. You can force these commands to move according to logical lines [...] by setting the variableline-move-visual
tonil
[.]"
- "For convenience". Feh. At least you can turn it off. —Steve Summit (talk) 12:37, 14 April 2013 (UTC)
- Yes, I think Mark Twain had it right: "It comes fully equipped with all the modern inconveniences." StuRat (talk) 22:30, 15 April 2013 (UTC)
TELESONIC DVD PLAYER TL-2000
Dear friends, From where can I download the USER MANUAL of the TELESONIC DVD PLAYER TL-2000. Thank you very much.175.157.168.56 (talk) 15:33, 14 April 2013 (UTC)
- Unfortunately Telesonic is a Chinese company that is involved in a great many things and has no unified web site, so this question is very difficult. It might not be possible. Looie496 (talk) 15:51, 14 April 2013 (UTC)
wikEd Bug Report Submission Help
Hello; I'm in the middle of compiling a bug report about a current incompatibility that wikEd seems to have with MathJax when this is executed via the 'Preview' function. Could any of you guys tell me at which piece of JavaScript I should point Safari 5.0.6's Web Inspector/Error Console to get the entries that I need to submit for this bug report?
Thanks,
— RandomDSdevel (talk) 21:53, 14 April 2013 (UTC)
- Um…hello, anybody home? —RandomDSdevel (talk) 19:31, 15 April 2013 (UTC)
- Nobody who knows the answer, apparently. Looie496 (talk) 20:44, 15 April 2013 (UTC)
- Okay, never mind; I think that I figured it out…I've just never used Safari's debugger before and was confused when it selected one of the extensions that I had enabled instead of some web page code when I started to debug and check for errors. I think, though, that it wants me to step through everything on its list. In that case, should I check the Web Inspector's 'Resources' tab to see what piece of JavaScript gets loaded first and go from there?
- Nobody who knows the answer, apparently. Looie496 (talk) 20:44, 15 April 2013 (UTC)
April 15
message notification
when someone leaves a message on my talk page, and i get a notification when i go to any page, does the server know it's me from my ip, or cookies? if ip, given that my router uses nat, would anyone in my house get my notification when they go to this site? if so, how can i fix that? thank you, 70.114.248.114 (talk) 05:26, 15 April 2013 (UTC)
- Wikipedia recognises you via your user name, which is made (semi-)persistent via cookies. You'll get the same orange bar if you go to an internet cafe and log in from there, and you won't get the orange bar if you log out but stay connected from your home computer. Other users of the same subnet connecting via the same NATed router won't get the message bar. If someone uses your account on your machine, then they likely will. --Stephan Schulz (talk) 05:39, 15 April 2013 (UTC)
- Since the OP is an IP, the question may refer to messages on the IP's talk page. My understanding is that those are associated with the IP address, not with cookies. To avoid having other people with the same IP address see them, the simplest solution is to register an account. Looie496 (talk) 06:53, 15 April 2013 (UTC)
- (ec) I don't think they have a user name. Yes it is based on your IP. So if someone from your house or anywhere ends up using the same IP they will see the orange bar. To avoid that you would need to register an account. CambridgeBayWeather (talk) 06:55, 15 April 2013 (UTC)
- (edit conflict) ... but if you edit as an anonymous IP then anyone reading Wikipedia from the same IP address will get your messages, even if they are using a computer hundreds of miles away, and you might get messages intended for another editor. This is why creating a user name is recommended (and is the fix you need). If you are the only editor with the IP address 70.114.248.114 then there will be no problem, but if you have a changing IP address (even from the same computer at the same physical address), then you will miss messages intended for you, and other people will get your messages. Dbfirs 06:56, 15 April 2013 (UTC)
thank you all. 70.114.248.114 (talk) 21:11, 15 April 2013 (UTC)
What causes viewDidLayoutSubviews to fire?
Hi all, I'm doing an ios app, and can't work out exactly when the viewDidLayoutSubviews method is meant to execute. I can log it (using NSLog) but I can't figure out exactly when it is supposed to go off. I know some things that always make it fire, and some things that never do, but other than that, it seems to have a logic all of its own. When I update a display about 100 times, it fires once, just for good measure. If I try to deliberately update 1000 times, it does nothing. I've read the docs, but I've only found this, and it doesn't say anything much. IBE (talk) 13:19, 15 April 2013 (UTC)
- Well, that says "When a view’s bounds change, the view adjusts the position of its subviews.". So, when exactly does a view's bounds change ? StuRat (talk) 22:28, 15 April 2013 (UTC)
- Yes, but that's the 64-thousand bit question: what exactly causes that? It seems to all happen rather haphazardly. I think if you are drawing something, and it gets a bit out of kilter, it thinks something has gone wrong, eg. if it rounds a floating point number wrongly, or something like that, but I don't know exactly what. At any rate, the practical problem is more or less solved by simply not using the viewDidLayoutSubviews except at startup. Still curious if anyone knows, but when googling through stackoverflow doesn't help, usually it means the technical knowledge isn't easily accessible on the web. Not to knock the expertise here, but it's a boffin's question IBE (talk) 08:16, 17 April 2013 (UTC)
Regular expression help
I'm looking for the RegEx pattern that can parse out years from bibliographic references in HTML.
Basically, I have a bunch of HTML that looks sort of like this:
<BR><BR><DT>Lastname, Firstname.<I> Title.</I> Publisher, etc., 1998. <DD>Summary here.
Repeat for many instances on any given page.
What I want is to extract the year and nothing else. There may be years in the summary that I don't want; just the years after the DT tag and before the DD tag.
Extra bonus: some of these have been added in through dumb OCR so instead of starting with a 1, they start with a lower-case L. So ideally it should also grab l998 as well in the above example. But otherwise I think it is pretty reliably in that format.
Sometimes there are more than one date in the citation. Is it possible to have one query that pulls out just the first date, but another that grabs all of the dates?
Easy way to do it with a RegEx, or not? It's OK if it is multiple queries if that is easier; there are no real performance issues, I just suck at RegEx. Thanks. --Mr.98 (talk) 14:54, 15 April 2013 (UTC)
- RegEx's don't extract things, they simply match or don't match. It's not too hard to come up with a RegEx that will match entries that have a year in them, but if you want to extract the year, you need to specify what system you are using. Looie496 (talk) 15:19, 15 April 2013 (UTC)
- I'm doing this in PHP. --Mr.98 (talk) 15:43, 15 April 2013 (UTC)
- Well, there are various ways to make this more sophisticated, but I think you should be able to use something like
<DT>[.]*(19[0-9][0-9]|l9[0-9][0-9]|20[0-1][0-9])[.]*<DD>
- which will allow you to extract the year alone as $1. Warning: it usually takes me a dozen tries when I try to do something like this. Looie496 (talk) 17:50, 15 April 2013 (UTC)
- How about skipping dates in title?
- <DT>Doe, John.<I> European economy in 1945 – 1980.</I> Publisher, etc., 1998. <DD>Summary here.
- CiaPan (talk) 08:23, 16 April 2013 (UTC)
- How about skipping dates in title?
- And what about other OCR errors such as uppercase-O for zero, lowercase-g for 9, uppercase-B for 8, and so on? You might be better off on some massive editing session, using an editor capable of block select mode, Reg-ex searching (and replacing), creating short keyboard macro sequences, and handling however many lines there are in the file. You can use these features to delete as much of the HTML as possible, leaving you with a single column of publisher and year information - and just one line for each reference. Astronaut (talk) 16:55, 16 April 2013 (UTC)
Registration
I am trying to register a new product I have just purchased.
Unfortunately I am unable to overtype serial no. on the
one you have already printed on slip, how can I register.
Donald Mathieson — Preceding unsigned comment added by 86.112.78.164 (talk) 15:26, 15 April 2013 (UTC)
- I'm afraid you are in the wrong place. You were probably trying to contact some corporation, but this is Wikipedia, an online encyclopedia. Looie496 (talk) 15:42, 15 April 2013 (UTC)
Transferring a large file to an external drive
I'm trying to copy a file that is over 6GB in size to an external drive, and Windows XP keeps saying there's not enough free space. Both the main hard drive and the external hard drive have enough free space, so my best guess is because the file size exceeds the size of the RAM. Otherwise, I'm completely at a loss. Is there anyway around this? Could Linux transfer the file? 166.193.101.13 (talk) 17:15, 15 April 2013 (UTC)
- Reformat the external drive to a modern format like ext3 (after switching to Linux of course), and the problem will go away. Hcobb (talk) 17:25, 15 April 2013 (UTC)
- I'm guessing the drive is formatted as FAT32, which has a file size limit of 4GB. XP ships with a utility creatively named "convert" which converts FAT32 volumes to NTFS. From a command prompt run convert q: /fs:ntfs where q: should be replaced by the appropriate drive letter. This will preserve all your data. There's no way to convert back, and you may have problems accessing the drive from OSes other than Windows or Linux. -- BenRG 18:29, 15 April 2013 (UTC)
- Alternatively, split the file into two or more parts (under Linux, with
split
, and reassemble them withcat
- this should work under CygWin, too). --Stephan Schulz (talk) 18:54, 15 April 2013 (UTC)
- Alternatively, split the file into two or more parts (under Linux, with
- The simplest route for you would probably be to use an archive manager such as 7-Zip to split the file into 4GB volumes. You could also in the same process compress (with 7-Zip’s “ultra” 7z/LZMA2 compression), which can under certain situations make 8GB of data into 4 or less (although merely storing the data in 4GB volumes will take less time than storing and compressing).
The more worthwhile long term action would probably be to switch the drive FS to NTFS (as already mentioned), but it depends on how much data you already have on the drive / what capacity the drive is. ¦ Reisio (talk) 20:02, 15 April 2013 (UTC)
- The simplest route for you would probably be to use an archive manager such as 7-Zip to split the file into 4GB volumes. You could also in the same process compress (with 7-Zip’s “ultra” 7z/LZMA2 compression), which can under certain situations make 8GB of data into 4 or less (although merely storing the data in 4GB volumes will take less time than storing and compressing).
- The trouble with the first two suggestions is they require reformatting the OP's external drive, which would destroy whatever is currently stored on it. And converting it to ext3 would then make it unreadable from Windows XP. Astronaut (talk) 16:40, 16 April 2013 (UTC)
- Windows XP supports NTFS. One of the suggestions is to use the convert to make it NTFS. The BenRG says that this will preserve the data. To be safe, copy the contents of the external drive to another drive before doing the conversion. That sounds like the best thing to me. Bubba73 You talkin' to me? 17:11, 16 April 2013 (UTC)
- This is about the process. Bubba73 You talkin' to me? 17:44, 16 April 2013 (UTC)
advertisement filtering
On a router (mips R3000 big endian) running Linux as its OS (the rootfs is in ext2).I want to block all requests that lead to an add so their are no advertisement on web pages for all devices connected to the router. I don't want to blacklist sites, just advertising content.
I have blacklists that can be converted in any format.
Which program I may use. How I can do this.2A02:8422:1191:6E00:56E6:FCFF:FEDB:2BBA (talk) 20:33, 15 April 2013 (UTC)
- i don't know to much about router blacklists, but if you can have the router drop requests for files with keywords in the title, like "ad" or "buy", that would get rid of some ads. 70.114.248.114 (talk) 21:20, 15 April 2013 (UTC)
- You don't need a router for this; you need a proxy server - which you can often run on the same hardware as the router. squid is the most widely-used free software implementation. Here is the Squid FAQ on implementing an ACL blacklist. You can find numerous other tutorials on the web, including many that provide pre-fabricated content- and domain- blacklists. Nimur (talk) 21:24, 15 April 2013 (UTC)
You didn't answer to the questions.But I'll explain.
In France free as blocked all google's adverts (including AdWords) during some days. As most websites use google services it was nearly meaning blocking all adds.
They used a firmware update and all user's who dowloaded saw all adds gone (for the devices connected to the freebox).They were connected to internet as usual and as they do outside home.
One of the main advantage is blocking adds on totally locked embedded devices (where you can't install anything and you don't have even the right to specify a proxy).You could load pages that couldn't load (because of the ram used by adds).
I want to block all adverts free blocked + non google's ones. I want also that the pages get the same rendering free give to face the lost of the adds.
Now I don't use free as internet provider I don't have a freebox, I don't how they did, and theirs boxes probably run a custom OS.
But I have a router running linux 2.6.30 that you use like a PC (you can do things like installing a web server). It is like a PC except there is no screen and only 1.2 MB of ram is free when the system is running
I log into using ssh or telnet. Routing is configured with an init script and the firewall is done using the iptables command.
The lists are similar to the Easy-list you can find with addblock except they contains lots of more adds. But if there is an alternative solution I am ready to use it, blacklisting was just a suggestion.2A02:8422:1191:6E00:56E6:FCFF:FEDB:2BBA (talk) 23:37, 15 April 2013 (UTC)
- Configure your router to route through your proxy server, and use your proxy server to block, black-list, or replace undesired advertisement content - either per-URL or per-HTML-element. Squid can do both. Then, any devices whose connection is routed through the router will have all their traffic proxied (and therefore, scrubbed of undesired content). Nimur (talk) 00:57, 16 April 2013 (UTC)
You are right, but some computer needs direct access to internet due to some special services. This is the reason I don't have any proxy.
But it may be possible to exclude the machine by mac address, in this case there is not the expected result. In the meant time I don't think the router is enough powerful for squid optimizations.2A02:8422:1191:6E00:56E6:FCFF:FEDB:2BBA (talk) — Preceding unsigned comment added by 62.39.140.158 (talk) 06:59, 16 April 2013 (UTC)
Rant unrelated to helping answer the question |
---|
The following discussion has been closed. Please do not modify it. |
Google Chrome - is there away to stop websites overriding keyboard shortcutsI'm used to using certain kayboard shortcuts in Google Chrome - for instance Alt-D to get to the address-bar. Some websites (incl YouTube and Google Drive) take over this shortcut for something else, so it no longer takes me to the address-bar. Is there a way to prevent them doing this (preferably I'd like to be able to select it at individual shortcut level, as it's mainly Alt-D that annoys me)? Thanks, davidprior t/c 07:28, 16 April 2013 (UTC)
Most resilient data compression?At their default compression settings, which common data compression format has the most error correction: ZIP, 7Z, RAR, TAR + GZ, TAR + BZ2? --108.84.189.25 (talk) 21:53, 15 April 2013 (UTC)
April 16WikiCreole to HTML converterCan someone suggest me a WikiCreole to HTML converter? --Tito Dutta (contact) 12:37, 16 April 2013 (UTC)
April 17Arduino clock codingI'm trying to get a clock working on an Arduino Uno. I've double checked everything but I can't find what I've got wrong. The code I'm using is taken directly from here. For whatever reason though, the hours and minutes displays just count up to 23 and then reset to 00. They increment once per second. And the seconds display is constantly at 00. I have no idea what could be causing this odd behavior. Can anyone tell me what I'm doing wrong? Dismas|(talk) 02:46, 17 April 2013 (UTC)
For installing Microsoft Security Essentials' latest update, what IS error 0x8004FF80?I googled it to find unreplied-to topics about the code. Nothing gets me closer to figuring out how to get around the error so that I can successfully install the update. I have a gut feeling that some malware caused me to no longer be able to find MSE in the first place, so when I went to download it and got the error, apparently the malware is preventing me from updating. Then it seems the malware cuts out all results showing viable solutions, but at least it can't prevent me from asking you on this refdesk. Thank you for your help. --70.179.161.230 (talk) 10:38, 17 April 2013 (UTC)
|