Wikipedia:Reference desk/Computing: Difference between revisions
Line 580: | Line 580: | ||
I downloaded and installed a software called Core Temp (a program that monitors CPU temperature) last night, only to delete it minutes later when I saw that my home page and default search engine had been changed to some search engine called snap.do without my permission. It even deleted my browser add-ons/extensions. I had to block the site by editing my file hosts in order for my browser to finally stop defaulting to that awful site. Then I ran a virus scan, and it detected some adware in the system. Well, after presumably getting rid of them, I restarted the computer. Then I as try to run a virus scan once more as a precaution, it tells my that my antivirus is expired, even though I registered it to protect for a full year about a month ago (I'm using avast!). So I uninstalled it to reinstall. I had no problems with it until I performed the mandatory reboot. Now when I log into my user account, the taskbar remains frozen and I can't open any programs. I had to restart in Safe Mode just so I could be able to type this. I just think all these problems have been triggered by the Core Temp software, which I believed to be safe based on the reviews I read before proceeding to download it, and I got it from its official site (http://www.alcpu.com/CoreTemp/). Has anyone else who used the software faced similar problems? [[Special:Contributions/70.55.109.152|70.55.109.152]] ([[User talk:70.55.109.152|talk]]) 23:00, 28 October 2012 (UTC) |
I downloaded and installed a software called Core Temp (a program that monitors CPU temperature) last night, only to delete it minutes later when I saw that my home page and default search engine had been changed to some search engine called snap.do without my permission. It even deleted my browser add-ons/extensions. I had to block the site by editing my file hosts in order for my browser to finally stop defaulting to that awful site. Then I ran a virus scan, and it detected some adware in the system. Well, after presumably getting rid of them, I restarted the computer. Then I as try to run a virus scan once more as a precaution, it tells my that my antivirus is expired, even though I registered it to protect for a full year about a month ago (I'm using avast!). So I uninstalled it to reinstall. I had no problems with it until I performed the mandatory reboot. Now when I log into my user account, the taskbar remains frozen and I can't open any programs. I had to restart in Safe Mode just so I could be able to type this. I just think all these problems have been triggered by the Core Temp software, which I believed to be safe based on the reviews I read before proceeding to download it, and I got it from its official site (http://www.alcpu.com/CoreTemp/). Has anyone else who used the software faced similar problems? [[Special:Contributions/70.55.109.152|70.55.109.152]] ([[User talk:70.55.109.152|talk]]) 23:00, 28 October 2012 (UTC) |
||
:If it truly originated with these particular actions |
:If it truly originated with these particular actions, it probably has more to do with the InstallIQ system that tries to install random adware onto your computer than the actual Core Temp application. There's a lot of chatter about it here and there. ¦ [[User:Reisio|Reisio]] ([[User talk:Reisio|talk]]) 01:11, 29 October 2012 (UTC) |
||
::I've finally been able to fix the problem with Startup Repair, but my antivirus is mysteriously gone now. I downloaded Microsoft Security Essentials in its place, even though I vastly prefer the efficacy of avast!. But it's been acting so weird today that I'm afraid to reinstall it and encounter the same problems all over again. [[Special:Contributions/70.55.109.152|70.55.109.152]] ([[User talk:70.55.109.152|talk]]) 02:36, 29 October 2012 (UTC) |
::I've finally been able to fix the problem with Startup Repair (I suspect some system files were damaged), but my antivirus is mysteriously gone now. I downloaded Microsoft Security Essentials in its place, even though I vastly prefer the efficacy of avast!. But it's been acting so weird today that I'm afraid to reinstall it and encounter the same problems all over again. [[Special:Contributions/70.55.109.152|70.55.109.152]] ([[User talk:70.55.109.152|talk]]) 02:36, 29 October 2012 (UTC) |
Revision as of 02:45, 29 October 2012
of the Wikipedia reference desk.
Main page: Help searching Wikipedia
How can I get my question answered?
- Select the section of the desk that best fits the general topic of your question (see the navigation column to the right).
- Post your question to only one section, providing a short header that gives the topic of your question.
- Type '~~~~' (that is, four tilde characters) at the end – this signs and dates your contribution so we know who wrote what and when.
- Don't post personal contact information – it will be removed. Any answers will be provided here.
- Please be as specific as possible, and include all relevant context – the usefulness of answers may depend on the context.
- Note:
- We don't answer (and may remove) questions that require medical diagnosis or legal advice.
- We don't answer requests for opinions, predictions or debate.
- We don't do your homework for you, though we'll help you past the stuck point.
- We don't conduct original research or provide a free source of ideas, but we'll help you find information you need.
How do I answer a question?
Main page: Wikipedia:Reference desk/Guidelines
- The best answers address the question directly, and back up facts with wikilinks and links to sources. Do not edit others' comments and do not give any medical or legal advice.
October 22
Specific question about Adobe After Effects
- Hi, some one knows how to use a velocity render from 3ds max in AE??
- Now I’m having some isues with Combustion, and I really don’t like Flame very much, instead AE is a very easy and powerfull tool… but I can’t make to work the velocity render prooperly, I can just blurs two axis (x and y)…
- Some advice? Thanks — Preceding unsigned comment added by Iskander HFC (talk • contribs) 04:07, 22 October 2012 (UTC)
Will a TV tuner work with IPTV
Hi there, noob question, is it possible to watch Bell Fibe TV directly on a computer? I've been reading about TV tuners, but most of the stuff out there talks about over-the-air, basic cable, satellite, etc, not much on IPTV. Say I purchase the Hauppauge WinTV HVR-2250 or a similar card, I simply plug the coaxial cable directly from the router into the card, bypassing the PVR, and the card will magically decrypt the signal and let me watch HD TV in real time, see the listings, record shows, etc? Or is there something else to it. Thanks. 74.12.214.46 (talk) 04:54, 22 October 2012 (UTC)
- No. For starters the HVR-2250 only supports ATSC (and possibly analog, the DVB-T versions of the 22x0 line do but can't remember if the ATSC versions do) so it will never work. In theory since you're using an IPTV solution and as per our article, the Fibe TV service can connect with what cat 5 cable so I presume it can just use normal ethernet you could just use your normal network without needing any extra device and probably no extra connection. In practice, you almost definitely can't do that since the IPTV is encrypted and I expect no option to decrypt it on your PC is available. Your provider could provide some sort of CAM or other method to get the signal to the PC (I believe that's sometimes required in the US) but it's unlikely they would. In which case, your only option is to get a device which can record the analog HDTV signal (like a Hauppauge HD PVR) and if your STB can't output an analog HD signal, a HDMI to analog box like the HDFury
(I don't know how these work, in theory with HDCP the STB could stop working with them at any time), and then use an IR blaster to control the STB. The guide will need to come from some other source, but this is fairly common anyway. And software is the key here, even with a ATSC card the card doesn't perform magic. Edit: Looks like HDCP is broken which is why devices like the HDFury exist. Nil Einne (talk) 07:30, 22 October 2012 (UTC)- I had a check and I was slightly mistaken, the HVR-2250 also supports clear QAM (television). It doesn't support analog. Nil Einne (talk) 03:47, 23 October 2012 (UTC)
October 23
Page Editor problems
I am experiencing problems with WP's page editor. There seems to be a system/hardware problem.
I was editing a section on the Bibliography of early American naval history page, and after hitting 'Save page', the system hung in limbo for more than a minute, and then after it was over, it saved the section -- but whipped out the rest of the page. Twice this has happened. Sometimes when I save an edit it hangs for a minute then gives me this message.
- Wikimedia FoundationRequest: POST http://en.wikipedia.org/enwiki/w/index.php?title=Bibliography_of_early_American_naval_history&action=submit, from 99.73.91.132 via cp1020.eqiad.wmnet (squid/2.7.STABLE9) to 10.64.0.135 (10.64.0.135) Error: ERR_READ_TIMEOUT, errno [No Error] at Tue, 23 Oct 2012 02:24:29 GMT
Error
I am not experiencing long waits or anomalies with the page editor on other pages. Also, it may be related, but during the week prior to this, saving edits has taken about 30 secs to a minute to process before the page was/is returned to view -- and I don't have a slow rig by any means. This began to occur right after some new features were added to the editor i.e. A pop up message that says 'Your edit was saved'. Would like to know where I go to report the problem. The Wikipedia:Contact us page is no help. -- Gwillhickers (talk) 02:34, 23 October 2012 (UTC)
- When the servers are slow, pages with huge numbers of templates experience particular difficulties. You might try contacting Wikid77 (talk · contribs), who has been working on equivalent templates that place much less load on the server. Looie496 (talk) 03:55, 23 October 2012 (UTC)
- The present Cite book template has parameters that function in unique ways which is why I've used it in all the history articles I've created or upgraded with bibliographies and RS's. e.g.The '|isbn=' used in CB links the number to Book sources page. If the author is a notable person with a WP biography, the author name in the bibliography can be linked up to that page with '|authorlink='. There is also a lot of url's used with cite book, so evidently one, some, or all of these things are causing the problem. Hopefully any new template will still retain these functions while, somehow, using less server resources.
In any case, I was only editing one section at a time, involving only a handful of templates. Still don't understand why the section was saved but the rest of the page was not. Just recently the page editor has had some changes made to it so we need to look into that affair also, if that's possible. -- Gwillhickers (talk) 08:47, 23 October 2012 (UTC)
- The present Cite book template has parameters that function in unique ways which is why I've used it in all the history articles I've created or upgraded with bibliographies and RS's. e.g.The '|isbn=' used in CB links the number to Book sources page. If the author is a notable person with a WP biography, the author name in the bibliography can be linked up to that page with '|authorlink='. There is also a lot of url's used with cite book, so evidently one, some, or all of these things are causing the problem. Hopefully any new template will still retain these functions while, somehow, using less server resources.
Leaving a Windows 7 homegroup that another computer owns
I formerly had a network of 3 or 4 computers, in which a computer which I'll call ALPHA was the Windows 7 homegroup computer - the computer that originated the homegroup. I disassembled everything and ALPHA is now in a box somewhere, and now my other computer, BETA, thinks it's in an ALPHA homegroup. There's no "Leave this homegroup" option in the Homegroup control panel. (All the Windows help pages I've found on the Net say I should choose this nonexistent option.) The troubleshooting wizard for homegroups says I should run the troubleshooting wizard on ALPHA. Well, ALPHA is gone, so I'd really like to be able to leave the homegroup so I can set up a new BETA homegroup. Any help? Thanks - Tarcil (talk) 06:21, 23 October 2012 (UTC)
API online brokers
What brokers do have APIs to access their services? If they don't have an official API, is it always possible to create your own API? Comploose (talk) 11:19, 23 October 2012 (UTC)
- I can't answer your first question, but for the second one the answer is no. It may be possible to get the data you need by scraping web pages, but there is a good chance it is against the site's terms of service. They can also change things in the interface that will break your unofficial API without notifying you. 209.131.76.183 (talk) 16:01, 23 October 2012 (UTC)
- As to the first question, it may be a lot of work to research and list all the world's brokers that offer APIs of some kind. Perhaps you can narrow that down geographically, or if you are talking about stock exchanges, which exchanges, what kinds of APIs, etc? And show what you have found so far by typing "broker api", etc, to your favorite web search engine, so we don't repeat the work you have already done? 88.112.36.91 (talk) 17:25, 23 October 2012 (UTC)
Why people hate Wikipedia on Sundays?
Somebody must have noticed it. Looking at the Wikipedia article traffic statistics of Main Page easily reveals that there is a considerable difference between number of visits on weekends. It is not only of this Main Page; see this, where I noticed it first.
I also take this opportunity to ask why that much (>30,000,000) visits were there on 2012 Nov. 3 & 4. Thank you.···Vanischenu「m/Talk」 15:55, 23 October 2012 (UTC)
- What it means, clearly, is that people mostly access Wikipedia from work or school. Looie496 (talk) 16:18, 23 October 2012 (UTC)
- Also, perhaps people have better things to do on the weekend. However, when at school waiting for the next class to start, or at work waiting for the next meeting, call, etc., they have time to spare (or waste, depending on your POV). StuRat (talk) 16:26, 23 October 2012 (UTC)
- My experience with other websites, where I can monitor traffic readily, is that all traffic goes down on Sundays. I don't think it's Wikipedia-specific. --Mr.98 (talk) 00:04, 24 October 2012 (UTC)
Thank you. In the same for plastic, it is almost twice than that of Sundays!
- What would be the cause of that sudden hike in viewing Wikipedia on 2012 aug. 3 & 4?
And I hope someone of you have noticed, there occurred a hike in hits for RDs (science, Mathematics computing etc.) around 8th and 9th of September. Any idea?···Vanischenu「m/Talk」 10:34, 24 October 2012 (UTC)
- I'm glad that people are more sociable on the weekends. The day when people would prefer to surf through online encyclopaedias rather than get together with their friends or family, would be a sad day indeed. Sandman30s (talk) 16:32, 24 October 2012 (UTC)
- We Wikipedians must go to church on Sunday, to atone for what we've written here the rest of the week. :-) StuRat (talk) 15:59, 25 October 2012 (UTC)
October 24
Font size of the subtitles shown by Adobe Flash Player11 in Internet Explorer9
I watch Web-TV with Windows7, InternetExplorer v.9 and FlashPlayer v.11.
In some of the programs, on some of the web sites, there is a button at the bottom of the flash window that lets me toggle subtitles on and off, but those subtitles are far to small for me to read.
How may I increase the font size of the Flash Player subtitles?
--89.9.206.6 (talk) 03:14, 24 October 2012 (UTC)
- Flash by default allows you to zoom in on movies by right-clicking on them and choosing the Zoom in option. If they've disabled that feature, then you can just zoom in on the page itself. In IE, you hold down the CTRL key and scroll your mouse wheel to zoom in. If you're talking about the old Web TV with the remote control and TV, then the buttons you press will be different.—Best Dog Ever (talk) 05:47, 24 October 2012 (UTC)
- I have already zoomed all the way in to make the video fit my full screen. Zooming the whole video picture any further is therefore not an option.
I need to only increase the font size of the subtitles. How may I do that? --89.9.206.6 (talk) 07:46, 24 October 2012 (UTC)
- I have already zoomed all the way in to make the video fit my full screen. Zooming the whole video picture any further is therefore not an option.
Which websites? ¦ Reisio (talk) 21:13, 24 October 2012 (UTC)
- For instance this one: http://tv.nrk.no/serie/ardna-samisk-kulturmagasin-2012
--(OP) 89.9.197.107 (talk) 05:12, 26 October 2012 (UTC)
MS Outlook Reading Pane
I don't like the Reading Pane in Outlook. I prefer to open each email explicitly to read it. I also like to create lots of subfolders to categorize my incoming mail, but at the moment, whenever I create a new folder, I have to go to the View menu and turn the RP off explicitly. Is there a way to disable it permanently
Outlook 2007 on Windows 7. Thanks, Rojomoke (talk) 08:51, 24 October 2012 (UTC)
- In the menu bar, View -> Current View -> Define Views..., then select "Messages" (or, depending on your settings, "IMAP Messages") and hit "Modify...", then click "Other Settings". Reading Pane settings are just below the middle of this window. -- 143.85.199.242 (talk) 16:03, 24 October 2012 (UTC)
- Thanks, but it's already set to "off" there. Both in "Messages" and in "Messages with AutoPreview". Rojomoke (talk) 08:20, 25 October 2012 (UTC)
Desktop Linux start
Equivalent Command
Hi.
I've just recently switched from Windows 7 to Desktop Linux 11SP2. On Windows, I could script a set of actions to open applications, and save it to a .bat file, e.g.
start iexplore http://www.fusionio.com/products/iodriveoctal?tab=specs start explorer "E:\Documents\Brochures\nVidia Graphics\GeForce" start notepad "E:\Documents\Lists\2012\Shopping Lists\*.txt"
All I've managed to figure out so far is that in Linux the batch file has to be saved with a .sh file extension. What I'm looking for is basically the Linux equivalent of the start
command. 11:32, 24 October 2012 (UTC)~ — Preceding unsigned comment added by 27.104.238.175 (talk)
- 1. Save your commands to any .sh file using your favorite text editor, separated by line. It's good practice to start the file with "#!/bin/sh" on the first line.
- 2. Make the .sh file executable by executing "chmod a+x filename.sh".
- 3. Run the .sh file by simply typing "./" before the filename. So to run test.sh, you would type "./test.sh".
- Habstinat (talk) 11:39, 24 October 2012 (UTC)
- Thanks, Habstinat, but any idea what's the equivalent in Linux for the Windows
start
command? Thanks again, 11:51, 24 October 2012 (UTC). — Preceding unsigned comment added by 27.104.238.175 (talk)
- Thanks, Habstinat, but any idea what's the equivalent in Linux for the Windows
- I think it is the screen command, though this is not an exact equivalent. If you are just starting browsers and things you can just use a command with an & on the end. -- Q Chris (talk) 12:11, 24 October 2012 (UTC)
- If I understand start correctly, you want to create a new terminal (text) window for each command and run the command as a child of that (so you can see error messages and stuff it printfs). To do that on a unix-like system like Linux, you'd write a script that, for each command, opened a terminal windows and passed it a command to run with its -e option. The following is an example for gnome-terminal; -e works for xterm and oterm too, and I think for KDE's terminal and others.
#!/bin/bash
nohup gnome-terminal -e "gedit foo" > /dev/null &
nohup gnome-terminal -e "inkscape blah.svg" > /dev/null &
- Just change the quoted commands to suit your needs. -- Finlay McWalterჷTalk 13:26, 24 October 2012 (UTC)
- But if you just wanted to start those programs, without the text window for each, you'd say:
#!/bin/bash
nohup gedit foo > /dev/null &
nohup inkscape blah.svg > /dev/null &
- Only use nohup if you want the command to carry on running after you log out. This might stop the application shutting down cleanly at shutdown. -- Q Chris (talk) 15:11, 24 October 2012 (UTC)
commenting code
Hi, this is a pretty simple one, but I am genuinely curious. I was writing some code just now, and it occurred to me there is only one line in one of my functions that really does anything. This is of course rather common - most of a function is just setting things up, then you do something useful for one or two lines, then you clean up after yourself. I'm wondering if there is a standard computing term for the line of code that does the actual work, simply because I can't think of a good term for it when commenting. I just want to write a single standard comment beside these "workhorse" lines, and if there is any conventional way of doing it, I'd be really thankful for anyone telling me. IBE (talk) 11:45, 24 October 2012 (UTC)
- Not aware of a standard, but if it were me, I would just write
/* do it */
, and then/* clean up */
for the following part if necessary. Looie496 (talk) 15:13, 24 October 2012 (UTC)
- I label my code "Initialization", "Body", and "Termination". In your case, you are talking about the body of the function. StuRat (talk) 16:43, 24 October 2012 (UTC)
- No clue on standards (doubt there is one), but your question did remind me of the amusing commenting in this code in which the crucial line has, well, attention drawn to it. --Mr.98 (talk) 01:59, 25 October 2012 (UTC)
"Real Programmers use Fortran. Quiche Eaters use Pascal. "
The sentence is from the 80s. How would we say it today? OsmanRF34 (talk) 12:48, 24 October 2012 (UTC)
- "Real Programmers use Java, Quiche Eaters use Scala"? Or (sorry can't resist it) "Programmers use C++, Italian Politicians use Ruby". -- Q Chris (talk) 13:20, 24 October 2012 (UTC)
- How about, "Real programmers use C, quiche eaters use C#"? Looie496 (talk) 15:15, 24 October 2012 (UTC)
- The phrase appears to originate from the essay Real Programmers Don't Use Pascal although per the talk page and Real Programmer, the 'real programmers' and 'quiche eaters' concepts appear to predate the essay. The article on the essay doesn't give any more recent examples (although does link to a XKCD on the concept of real programmers) but the article on Real Programmer gives an unsourced example from the 90s, ironically (or perhaps not so ironically if you consider it a natural evolutuon of real programmers) given the above answers, that real programmers use C rather then C++ or Java. Nil Einne (talk) 15:38, 24 October 2012 (UTC)
- Yes, Java™ replaced Pascal. ¦ Reisio (talk) 21:16, 24 October 2012 (UTC)
- But nothing replaced Fortran? Nil Einne (talk) 22:33, 24 October 2012 (UTC)
- Fortran continued to evolve, and now offers many of the features of newer languages. No more limits to 8 character, uppercase-only variable names, for example. StuRat (talk) 22:41, 24 October 2012 (UTC)
- Are there non-trivial improvements? (Like, say, support for object-oriented programming?) I mean, being able to not use ancient variable names is an improvement, I guess, but it seems the equivalent of NOW GRIT FREE! product labeling — a reminder of how awful the original was rather than a genuine mark in its favor. --Mr.98 (talk) 13:16, 25 October 2012 (UTC)
- I wouldn't exactly call the ability to have useful variable names trivial. But, yes, Fortran 2003 explicitly supports OOP: [1]. There are many other non-trivial improvements, as well. StuRat (talk) 13:43, 25 October 2012 (UTC)
- My question was whether anything replace Fortran in the real programmers bit, not whether or not Fortran continued to evolve. Nil Einne (talk) 04:33, 26 October 2012 (UTC)
- As a real programmer, I, of course, still use Fortran, but I'm also learning Python, Ruby, etc., to see how the other half lives. StuRat (talk) 21:19, 24 October 2012 (UTC)
- If someone can't stop telling you about C# being much better than VB.Net, he will most likely prefer quiche over pizza. Furthermore, I consider that case sensitivity must be destroyed. Joepnl (talk) 20:55, 25 October 2012 (UTC)
- Agreed, and that's one reason why I use Fortran. StuRat (talk) 05:12, 26 October 2012 (UTC)
- In my industry, there is a program used by most companies for invoice calculation and billing. It has a full GUI running on Windows XP and is written entirely in FORTRAN (originally in the 1970's, then continuously updated).OldTimeNESter (talk) 19:49, 31 October 2012 (UTC)
New behavior of Google
Yesterday and today Google has consistently behaved differently from the way it's always behaved in the past. Formerly you could type a word or a phrase in the search box and then hit "enter", and got results. Now as soon as you type the first letter, when you haven't hit "enter", it behaves as if that single letter were the whole set of search terms. Why is this happening? 174.53.163.119 (talk) 13:24, 24 October 2012 (UTC)
- This sounds like Google instant, and has been around a while. IBE (talk) 14:26, 24 October 2012 (UTC)
- It's not at all like Google Instant. It doesn't just show results consistent with what you've typed so far; rather it refuses to let you type any more. When you've typed just one letter, it goes to a new page showing the results. The search box you were typing in is no longer there. There's a new one near the top of the page. 199.17.35.182 (talk) 16:39, 24 October 2012 (UTC)
- Like many things in this 'modern world', Google has been 'dumbed down' and made for average point and click idiot. You can't do a specialized search using logical operators. (+ - , etc) i.e. + "Joe Smith the barber" - butcher is (was) supposed to get you results that do not include 'butcher'. It's too bad. There are two prevailing theories: 1. Google is catering to shoppers and have been persuaded by big money interests to dump every imaginable search result into the mix. 2. There are big brother types who are uncomfortable with the idea that the average person has so much access to information. 'We can't have that, can we? -- We must keep the masses divided against each other and ignorant. — Preceding unsigned comment added by 99.73.91.132 (talk) 19:04, 24 October 2012 (UTC)
- Do you have a source on the removal of the "-" operator? I just tried "test search -query" (without quotes) and didn't have any results containing query. "+" was disabled shortly before introducing Google Plus, presumably they use it or planned on using it for queries related to plus. The "intext:" prefix still forces the term to be included. 209.131.76.183 (talk) 19:11, 24 October 2012 (UTC)
- Here is a fairly current list of Google search operators. -- BenRG (talk) 06:17, 25 October 2012 (UTC)
- Do you have a source on the removal of the "-" operator? I just tried "test search -query" (without quotes) and didn't have any results containing query. "+" was disabled shortly before introducing Google Plus, presumably they use it or planned on using it for queries related to plus. The "intext:" prefix still forces the term to be included. 209.131.76.183 (talk) 19:11, 24 October 2012 (UTC)
- Like many things in this 'modern world', Google has been 'dumbed down' and made for average point and click idiot. You can't do a specialized search using logical operators. (+ - , etc) i.e. + "Joe Smith the barber" - butcher is (was) supposed to get you results that do not include 'butcher'. It's too bad. There are two prevailing theories: 1. Google is catering to shoppers and have been persuaded by big money interests to dump every imaginable search result into the mix. 2. There are big brother types who are uncomfortable with the idea that the average person has so much access to information. 'We can't have that, can we? -- We must keep the masses divided against each other and ignorant. — Preceding unsigned comment added by 99.73.91.132 (talk) 19:04, 24 October 2012 (UTC)
- I just tried Google - it works the same as it has for me since Google Instant was introduced. If I type a character, it starts showing results and the box moves to the top of the screen. The character I entered is still in the search box, and it maintains focus so I can continue typing the rest of my query. As I type, the results are automatically updated. Is it behaving differently for you? Here is Google's page describing Instant: [2] The page also has instructions for disabling it. 209.131.76.183 (talk) 19:08, 24 October 2012 (UTC)
- It's not at all like Google Instant. It doesn't just show results consistent with what you've typed so far; rather it refuses to let you type any more. When you've typed just one letter, it goes to a new page showing the results. The search box you were typing in is no longer there. There's a new one near the top of the page. 199.17.35.182 (talk) 16:39, 24 October 2012 (UTC)
Most web browsers allow you to search directly from the location bar (or at the very least a separate search bar). ¦ Reisio (talk) 21:19, 24 October 2012 (UTC)
Making and Selling apps for Microsoft Surface tablet
What is the IDE used to make and test/simulate apps for the Windows RT device? How and where does one set up a seller account on whatever app market it is where such things end up? 20.137.2.50 (talk) 18:23, 24 October 2012 (UTC)
- Windows Store has a summary. This page links to details of how one develops code, this one on commercial details, and this about registering. The usual Microsoft IDE, Visual Studio (and its Express version) are used. -- Finlay McWalterჷTalk 18:45, 24 October 2012 (UTC)
- Thanks. It looks like the requirement of the development PC running Windows 8 will be a show stopper for me personally, but that's immaterial to your very useful sources. 20.137.2.50 (talk) 19:16, 24 October 2012 (UTC)
Num Lock popularity
Among people who use full keyboards, those featuring a Num Lock key, do more people keep it on, to use the numeric keypad for numbers, or off, to use the keypad for navigation? I can't seem to find any statistics on this. -129.120.41.156 (talk) 18:59, 24 October 2012 (UTC)
- I'd be surprised if the majority of people who know what numlock is don't prefer having it on. Most people, however, I dare say do not even know what it's for. ¦ Reisio (talk) 21:21, 24 October 2012 (UTC)
- Well, I know what it is, and the only time I turn it on is when I need to enter a bunch of numbers. Looie496 (talk) 21:28, 24 October 2012 (UTC)
- That makes one. ¦ Reisio (talk) 23:04, 24 October 2012 (UTC)
- Doesn't a "full" keyboard mean that you have the navigation keys in a separate section between the typewriter section and the numeric part? I don't really understand why you would want to use the numeric keypad for navigation, instead of the dedicated keys. I keep Num Lock on all the time, and it's an annoyance when it accidentally gets turned off; I wish I could set it to be automatically on at the hardware level. --Trovatore (talk) 21:33, 24 October 2012 (UTC)
- Using the numeric keys could help navigation:
- 1) I don't like how the standard arrow keys put the right and left arrow on the same line as the down arrow. They could easily fix this, but don't seem to care to.
- 2) The 5 key between the arrow keys on the numeric keypad can also be used to stop moving or return to the starting point.
- 3) The 1, 3, 7, and 9 keys can also be used to move at angles of 45, 135, -45, and -135. StuRat (talk) 22:16, 24 October 2012 (UTC)
- RE 1: Of course there are a fair number of keyboards that do have + shaped arrow sections, much to the chagrin of traditionalists. :p ¦ Reisio (talk) 23:04, 24 October 2012 (UTC)
- On point 3 (and possibly point 2) that must be some idiosyncrasy of a particular program. The navigation keys mapped to 1, 3, 7, 9 are (respectively), "End", "PgDn", "Home", "PgUp". --Trovatore (talk) 01:23, 25 October 2012 (UTC)
- Yes, the use of each key is application-specific. But, of course, this is also true of the arrow keys. StuRat (talk) 04:34, 25 October 2012 (UTC)
- Purely anecdotally, but when I was quite young I never used it for numbers and was always highly irritated when it was turned on. At some point I hit a stage in my life where playing games didn't happen as much and typing in numbers was more common. Now it's second-nature for me to keep it turned on for numbers, since I never use that area for navigation. I suspect these things are just individual taste and depend on what one really uses the computer for most often, in the end. --Mr.98 (talk) 00:59, 25 October 2012 (UTC)
- I keep mine turned off simply so that I can use the very useful DEL key. I suspect in terms of "popularity" most people don't know how to change the default (which seems to vary from one computer brand to another), so they keep it per the original setup.--Shantavira|feed me 07:23, 25 October 2012 (UTC)
- I suppose the third option is never using the numeric keypad at all. Marnanel (talk) 08:14, 25 October 2012 (UTC)
Thanks for all the replies. I ask because I always switch it on, and I'm irritated that it's not on by default on more computers. I wondered if enough people use it, why don't they have it on by default. It appears I'm not in any kind of super-majority, though. I do lots of math, and I've done data entry, and entering numbers without looking is so much easier with the numeric keypad. I play Final Fantasy XI as well, but they keypad works for navigation in that game whether or not NumLock is on. Thanks again. -129.120.41.156 (talk) 16:13, 26 October 2012 (UTC)
- Trovatore, I usually remove useless keys from the keyboard, e.g. the menu key which came with "Windows95" keyboards, Shift-Lock, the left Windows-key (I keep the right one, I'm not that likely to press that one by accident,) and the Num Lock key unless some stupid bios inists on turning it off.
- And the Power/Sleep/Wake up keys. Whoever invented those deserves a good punch. - ¡Ouch! (hurt me / more pain) 08:17, 30 October 2012 (UTC)
In the late 80's/early 90's, there wasn't a single issue of PC Magazine that didn't have a discussion on how to turn Numlock off at startup. Only screenshots of flying toasters were more popular.OldTimeNESter (talk) 19:53, 31 October 2012 (UTC)
Workaround for missing toolpack add-in
Hi,
I am missing my tool pack extension for Office 2000 and have lost the disk which means I cannot install the toolpack add-ins for Excel. Pain in bottom!
I am trying to find all unique 6 letter combinations of some series ie: A,B,C,D,E,F,G,H,I, I know there are 84 combinations, because I did it manually. (It took 3 hours because I was missing 1 series.)
When I try the VBA code:
Sub Test() X = 9 For N = 1 To 2 ^ 9 - 1 BinaryString = Left("000000000", 9 - Len(WorksheetFunction.Dec2Bin(N))) & WorksheetFunction.Dec2Bin(N) If Len(BinaryString) - Len(WorksheetFunction.Substitute(BinaryString, "1", "")) = 6 Then Combination = "" For M = 9 To 1 Step -1 If Mid(BinaryString, M, 1) = "1" Then Combination = Combination & Cells(19 - M, 13) End If Next M X = X + 1 Cells(X, 14) = Combination End If Next N End Sub
I get runtime error '438':
When I try to debug it highlights
BinaryString = Left("000000000", 9 - Len(WorksheetFunction.Dec2Bin(N))) & WorksheetFunction.Dec2Bin(N)
I am told this is because I am missing the add-in but I can try to write my own code to workaround the problem, but do not know how.
Any advice or help? --Scraggy4 (talk) 19:25, 24 October 2012 (UTC)
- "BinaryString = Left("0000000000", 10 - Len(WorksheetFunction.Dec2Bin(N))) & WorksheetFunction.Dec2Bin(N)" ? I'm not sure if Left underflows at length = 0, but if it does, an index shift by 1 should fix it, including "Mid(BinaryString, M+1, 1)" (I've reformatted Sub Text() slightly.) - ¡Ouch! (hurt me / more pain) 08:18, 30 October 2012 (UTC)
Star Control II graphics
Look at this image I took of Star Control II played on DOSBox and grabbed by the standard screen grabber on Fedora 17. It's all pixelated. I know this is because the image size is 1280×800 which is larger than the game's native resolution. What is the game's native resolution? Is it only 320×200? That resolution might have been state-of-the-art in the days of the Commodore 64, but even when Star Control II was released two decades ago, I am fairly sure both the IBM PC and its contemporary rivals, such as the Amiga and the Atari ST, were easily capable of larger resolutions. In fact, when I viewed the 320×200 preview of the image on Wikipedia, I had to look very closely at the screen to be able to see the details, and my monitor's resolution is only 1680×1050, adequate but not exactly top of the line by today's standards. Also, if you download the image, open it in a graphics editor and zoom in, you can see anti-alias on the pixels. Is this a native feature of DOSBox? Is it possible to turn it off? Nevertheless, I kind of like the pixelated look. For one thing, it keeps reminding me I'm playing a computer game. For another, it makes it very easy to see how Toys for Bob created the graphics. JIP | Talk 19:56, 24 October 2012 (UTC)
- The article says the game was released for the PC in 1992 - the Video Graphics Array adapter (which was pretty cool at the time) could only produce 256 colors at 320x200, and was only released in 1987. It wouldn't be strange for an early 90s game to target VGA, so 320x200 doesn't strike me as odd at all. Besides, if you try to compare the IBM PC compatible to any of its contemparies, you will only be left wondering why the hell it was any success _at all_... Unilynx (talk) 21:12, 24 October 2012 (UTC)
- Yep, although SVGA and similar extensions had been around for a few years at that point and available on PCs, it wasn't common in a lot of games. The VESA standard for it was only defined in 1989, and most games developers had to understand the details of how to use that spec to talk to the video hardware in a low-level way. There weren't simple higher-level APIs and video drivers yet. I see that Star Control came out in 1990, so targeting VGA made a lot of sense - the developers were probably much more familiar with VGA than SVGA, and SVGA wouldn't have had a big chunk of the market share yet. If Star Control II reused a lot of Star Control's code, it would explain not reworking things to use SVGA. Historical data on adoption rates for various video standards would be interesting to see. 209.131.76.183 (talk) 12:32, 25 October 2012 (UTC)
- While it's unlikely to be complete or entirely accurate (was there really a 640 x 480 game from 1982?) and contains a fair few effective duplicates, you can get a generally idea from [3] [4]. The number of games with 640 x 480 wasn't that many from 1987-1992 with a small increase each year, it was only 1993 when you can perhaps say it took off (although I'm not sure if that rate of increase was that much greater). In some cases I expect the move to CDs helped and of course there was also the short lived FMV era. Nil Einne (talk) 16:41, 26 October 2012 (UTC)
- That 1982 game, The Oregon Trail, has been released in many editions for many platforms. Some editions supported SVGA graphics, but they weren't from 1982. (I would have guessed that 1982 was the earliest release date, but according to the WP article that's wrong). -- BenRG (talk) 05:53, 27 October 2012 (UTC)
- While it's unlikely to be complete or entirely accurate (was there really a 640 x 480 game from 1982?) and contains a fair few effective duplicates, you can get a generally idea from [3] [4]. The number of games with 640 x 480 wasn't that many from 1987-1992 with a small increase each year, it was only 1993 when you can perhaps say it took off (although I'm not sure if that rate of increase was that much greater). In some cases I expect the move to CDs helped and of course there was also the short lived FMV era. Nil Einne (talk) 16:41, 26 October 2012 (UTC)
- Yep, although SVGA and similar extensions had been around for a few years at that point and available on PCs, it wasn't common in a lot of games. The VESA standard for it was only defined in 1989, and most games developers had to understand the details of how to use that spec to talk to the video hardware in a low-level way. There weren't simple higher-level APIs and video drivers yet. I see that Star Control came out in 1990, so targeting VGA made a lot of sense - the developers were probably much more familiar with VGA than SVGA, and SVGA wouldn't have had a big chunk of the market share yet. If Star Control II reused a lot of Star Control's code, it would explain not reworking things to use SVGA. Historical data on adoption rates for various video standards would be interesting to see. 209.131.76.183 (talk) 12:32, 25 October 2012 (UTC)
- If you see square pixels in the scaled image then the anti-aliasing is from the original game. If you don't see square pixel boundaries, you are probably seeing the effect of an upscaling algorithm like bicubic interpolation applied by your image editor. I think DOSBox also supports upscaling algorithms like hq2x, but that would increase the resolution of the screenshot image to 640x400 or 960x600. -- BenRG (talk) 05:53, 27 October 2012 (UTC)
- Old-timers like me remember the VGA days with much fondness (although I would have preferred the vastly superior Amiga to have evolved as the dominant games machine). These were the days before API's like directX and games developers had to either spend a lot of time and effort in writing their own graphics routines, or license API's from bigger producers. Because the storage media had low capacity (floppies of 360K, 1.2M or 1.44M), games were seldom released with photorealism and instead relied on nifty tricks and alogorithms to produce decent graphics. When people eventually tired of VGA and SVGA became the standard, the same problem ensued and games often looked cartoony and even worse than their VGA counterparts. Only when the default medium became a CD did the games become more photorealistic. This was not always a good thing... the days of beautifully rendered art and synth Roland music are long gone... anyone remember Sierra? Sandman30s (talk) 13:37, 28 October 2012 (UTC)
General linux questions
1. With 'df', beside my partitions (like /dev/sda2 mounted as /media/myfiles) I get:
udev 946780 4 946776 1% /dev tmpfs 382240 912 381328 1% /run none 5120 0 5120 0% /run/lock none 955592 256 955336 1% /run/shm
What are those partitions/directories? And what can you mount 'none' into something?
2. from chmod --help:
Each MODE is of the form `[ugoa]*([-+=]([rwxXst]*|[ugo]))+'.
can someone explain the syntax? Comploose (talk) 22:10, 24 October 2012 (UTC)
- See the udev and tmpfs articles for the first two; they're filesystems created by the kernel, which don't correspond to an underlying block storage device. -- Finlay McWalterჷTalk 22:55, 24 October 2012 (UTC)
- On my system /run/lock and /run/shm are both also tmpfs mounts; they're just little locations some startup script has created to hold file-like objects to do with file locking and shared memory. In both cases they're essentially using the filesystem as a means of interprocess communication. By doing it in a tmpfs (that is, in RAM) they're going to get very fast performance. -- Finlay McWalterჷTalk 23:02, 24 October 2012 (UTC)
- For question 2, we have an article on chmod that explains all the options. The explanation is much too long to put here. Looie496 (talk) 04:15, 25 October 2012 (UTC)
- thanks for the answers. @Looie: it's not about chmod alone, I want to know how to parse `[ugoa]*([-+=]([rwxXst]*|[ugo]))+'. What [], *, | and that + at the end. It'st not about the options ugoa rwxXst but about how such things are to be understood.Comploose (talk) 09:25, 25 October 2012 (UTC)
- It's more or less a regular expression. [ugo] means either u, or g, or o. Similarly, (this|that) means either this or that. A star means zero or more of what it comes after, and a plus means one or more. Does that make sense? Marnanel (talk) 11:00, 25 October 2012 (UTC)
- Yes, thanks. Comploose (talk) 14:54, 25 October 2012 (UTC)
October 25
C for Windows
Can anyone give me a good link (for free download) for a standard C compiler which could be run in Windows. Thanks in advance, 117.227.37.239 (talk) 14:14, 25 October 2012 (UTC)
- If you are familiar with GCC, you can use it with tools such as Cygwin or MingW. If you want something more natively Windows, Visual Studio C++ Express Edition is free for personal use. It is a C++ compiler and IDE, but I believe it has a pure-C mode. I also found [5], which is small, simple and free, but I have no idea how good it is. 209.131.76.183 (talk) 14:30, 25 October 2012 (UTC)
- Several more to chose from here. --NorwegianBlue talk 18:52, 25 October 2012 (UTC)
smaller excel worksheet possible?
Is it possible to make a smaller excel spreadsheet? i don't mean the normal one where there's like 3 lines you've edited and control-end brings you down to the bottom right corner, but i mean eliminate the million or so lines below where you can enter more? Here's what I'm trying to solve; I’ve got a spreadsheet template which has vba code which pastes into it a csv file ftp’d in each AM, which is of varying length, about 1000 rows more or less. (same number of columns each day). The columns have to be preformatted, which is why this arrangement, rather than just present the csv file. Now, preformatting the columns all the way down, now that we're in win7 with a million rows, generates a huge file, even when it's the empty template. But, if I cut off the formatting at, say, 2,000 lines, sooner or later somebody is going to paste in > 2,001 lines and the bottom lines will be unformatted. I'd prefer to have the thing grind to a halt with an error than continue happily along with the somewhat defective spreadsheet, thus I’d like to make a template file preformatted all the way down, but with a limited number of rows. Possible? Thanks. Gzuckier (talk) 16:04, 25 October 2012 (UTC)
- I don't know if you can limit the size of the spreadsheet. VBA can change formatting, so you could have it apply the formatting to the rows after copying them in. If you want to stick with preformatting, you could have your import code give a warning if it detects more lines were copied than there was formatting for. 209.131.76.183 (talk) 17:08, 25 October 2012 (UTC)
- Apply the formatting to the columns, instead of to individual cells. It's possible to select an entire column in Excel - whose range is unbounded. Format changes will affect all rows. You can use Ctrl+Spacebar, or click the column button. Nimur (talk) 18:08, 25 October 2012 (UTC)
AC adapter output power (Moved from Science Refdesk)
I've taken the liberty of moving this question from Wikipedia:Reference_desk/Science#AC_adapter_output_power, hopefully prior to detonation. :) Wnt (talk) 18:42, 25 October 2012 (UTC)
How important is the output power (or current) of AC adapters for laptops. My original AC adapter (which broke) specified 65 W, 20 V, 3.25 A. Looking at the local shops, all they have is 90 W, 20 V, 4.5 A (or thereabout). Is this current/power difference important, i.e. could my laptop break if I used the wrong AC adapter. I am a bit unsure because, the manual of one was only mentioning voltages and said that modern laptops can handle a voltage that is off by 1 V. It did not say anything about currents. Another manual said that these powers (90 W) and currents (4.5 A) are max values. Does this mean that I could use it on any laptop that needed less than these max values? bamse (talk) 15:45, 25 October 2012 (UTC)
- Yes, you make sure that the voltage is correct and then you select the adapter that has the same of a higher maximum power. The higher the power specification, the less likely it is that the adapter is going to break down due to overheating. Count Iblis (talk) 15:53, 25 October 2012 (UTC)
- Are the power/current specifications always max values (even if it does not say "max")? If I understand you correctly, I could use the 90 W, 20 V, 4.5 A adapter instead of my original 65 W, 20 V, 3.25 A. One thing I forgot to mention and which worried me, was that one of the adapters I looked at had a warning lamp for two high current. bamse (talk) 16:01, 25 October 2012 (UTC)
- Yes, these are the maximum values (which includes some safety margin), so you can use the 90 W instead of the 65 W. If you start to draw larger and larger currents you get more and more heating in the cores of the coils. Count Iblis (talk) 16:12, 25 October 2012 (UTC)
- Thank you. bamse (talk) 19:24, 25 October 2012 (UTC)
Laptop battery life
I have a nine cell battery for my Dell Latitude E6420, about a year and a half old, and it was working fine until about a month ago. Around that time it started popping up the standard warning "Your battery can charge normally...may experience reduced battery life". It kept working fine just like it had been until about a week ago, when suddenly it stopped charging beyond 37%, and yesterday when I unplugged it to use this 37% it drained down to 8% within three minutes and said "Your battery has experienced permanent failure and needs to be replaced," and now the computer shuts off instantly upon being unplugged. I'm aware that laptop batteries experience a gradual loss of battery life over time, but is it normal for it to happen this suddenly and drastically? Ks0stm (T•C•G•E) 20:25, 25 October 2012 (UTC)
- Yes, that does happen, the batteries have microprocessors that decide there is a problem and refuse to power up. This is supposedly a safety feature (google "lithium battery explosion") but it's a little dubious in some ways, and users do get angry about it. Anyway I've bought some cheap 3rd party laptop batteries with mixed results. The cost savings are substantial enough that I keep doing it. 67.119.3.105 (talk) 07:18, 26 October 2012 (UTC)
- It is possible to dismantle your battery, recondition each cell separately, and reassemble it with the possibility that the circuitry will then recognise the reconditioned cells as a viable battery for some time to come. It might be necessary to replace one or more failed cells (the symptoms sound more like a failed cell than general deterioration). Because reconditioning is a specialist process and carries a (small) risk of explosion if you get it wrong, it is not normally recommended. Replacement cells have to match the other eight. Failure after 18 months seems premature, but has the battery had heavy use? Unless you have some spare time and an interest in the reconditioning process (and some basic charging and monitoring equipment), it's probably simpler just to replace the battery. Dbfirs 08:12, 28 October 2012 (UTC)
File extension NORUN
When I reboot my computer there comes usually up a message that Windows can not open a file with "File extension NORUN". What is this file? And how do I get rid of this message that's consatantly showing up at restart?
When I googled this issue "File extension NORUN", there came up various different links, mainly trying to "sell" you free computer scans (UniBlue, Filext, computerfileextensions, etc). However, what I did find useful was the following:
.NORUN File
File extension: NORUN
File type: Unknown
Do you have speed issues?
First check your registry for invalid entries.
Notes about the NORUN file extension:
Incorrect file associations could be the result of underlying issues within your PC system. As such it is highly recommended to scan your PC for invalid registry entries, unused processes and other unfavourable system settings to identify slowdown issues.
The NORUN file type is primarily associated with 'Unknown'. This appears to be an association with a folder instead of a file; the folder possibly belonging to a Yahoo! search appliance. It comes up in the full reference to Service Manager.norun. The folder appears to be located in C:\Documents and Settings\All Users\Start Menu\Programs\Startup\Service Manager.norun but specifics beyond that are unknown at present. Trouble opening NORUN files? If you are having problems opening NORUN files, you should:
A) Identify a program that can open the file and B) Check your PC for invalid registry entries and other speed issues. Detailed information for file extension NORUN:
♦ — Preceding unsigned comment added by SholomCPA (talk • contribs) 20:29, 25 October 2012 (UTC)
Firefox search engine choice
When my service provider switched antivirus programs to Macafee, I foolishly let it invade Firefox (16.01). The navigation field has switched from Google to Yahoo. How do I undo this? Clarityfiend (talk) 20:35, 25 October 2012 (UTC)
- I'm confused about what your ISP and antivirus have to do with your browser... But anyway, on my Mac version of Firefox, there is a Google icon next to the search field which I can use as a pull down menu and change my search preference. Dismas|(talk) 20:42, 25 October 2012 (UTC)
- No such thing on mine, but I found this, which fixed it. Clarityfiend (talk) 22:13, 25 October 2012 (UTC)
Reliable, UK-Based windows VPS
Can anyone recommend a decent supplier of UK-based windows VPS's? I've done some browsing and prices are generally consistent so now would just like perhaps someone who has actually used one to rate the company they used? Thanks! Alex J Fox(Talk)(Contribs) 22:18, 25 October 2012 (UTC)
- I haven't used them personally, but edis.at is highly regarded, and has some equipment in the UK. See also webhostingtalk.com's VPS section. That place is brutal on crappy services so if a place has a good image there, they are probably good. 67.119.3.105 (talk) 07:22, 26 October 2012 (UTC)
October 26
How do I create different colored place marks in Spreadsheet Mapper 3?
want to be able to have different colored place marks (or even different shapes) for different types of sites. How do I get that to occur via the PlacemarkData sheet? Thanks, Kingturtle = (talk) 01:36, 26 October 2012 (UTC)
- This may be helpful. They (talk) 07:58, 28 October 2012 (UTC)
Scratchy looking font colors in PPT 2003
I like to use a black background as standard and Garamond font. White and yellow font color comes out really nicely but red, light green and light blue comes out scratchy -- why is this and how can I avoid it? It improved with increased text size but I can't have everything written in 50+ font. Must I change to a sans-serif font -- I don't particularly like them. DRosenbach (Talk | Contribs) 05:24, 26 October 2012 (UTC)
- My guess is that when you pick those colours you are not lighting many of the pixels on your monitor and you are seeing lower resolution because of that. Dithering may help. Graeme Bartlett (talk) 08:43, 26 October 2012 (UTC)
- How would I modify the dithering? DRosenbach (Talk | Contribs) 20:31, 26 October 2012 (UTC)
https://code.google.com/p/gdipp/ Might help on your end, but each individual end user of the presentation might have the same problem. The only reliable solution would probably be to use images instead of text. Even then, certain primary colors will always clash. ¦ Reisio (talk) 12:16, 26 October 2012 (UTC)
- Ha! I have no idea what any of that means -- I'll have to check with my computer-guy landlord. Thanx! DRosenbach (Talk | Contribs) 20:31, 26 October 2012 (UTC)
- One thing to check is that your monitor is not currently set to display a small number of colors, like 256. Under Windows, go to Start + Control Panel + Display and pick the Settings tab, then check the color quality setting. StuRat (talk) 17:59, 26 October 2012 (UTC)
- There is no "display" icon in my control panel. DRosenbach (Talk | Contribs) 20:31, 26 October 2012 (UTC)
- What version of Windows are you using ? Under some versions, I believe you need to pick a button to change back to the traditional list of icons. StuRat (talk) 02:05, 28 October 2012 (UTC)
Scan holofoil
Is there a way to reliably scan or otherwise digitize holofoil, so that the pattern in the holofoil shows up? All my attempts have resulted in either flat black or grey. Horselover Frost (talk · edits) 12:22, 26 October 2012 (UTC)
- I am not sure if this is helpful in your case, but laminator pouches can be helpful if you want to scan or photograph reflective surfaces. http://www.heiko-popp.de/temp/Scanning%20reflective%20covers.pdf They (talk) 01:44, 28 October 2012 (UTC)
Android browser
How can i delete history of visited web sites and stop them appearing when i click on the internet icon? I have Samsung Galaxy Tab2--78.148.129.254 (talk) 13:55, 26 October 2012 (UTC)
- On my Samsung Galaxy S II I open the app and touch the menu key, then Settings -> Privacy and Security. You can clear a number of items from here, including the history. You might find it useful to use Google Chrome, which is available through the Play store and has an Incognito mode to allow browsing without recording the sites you visit. - Cucumber Mike (talk) 14:13, 26 October 2012 (UTC)
Better RAM?
8GB Kit (4GBx2) DDR3 PC3-10600 • CL=9 • Unbuffered • NON-ECC • DDR3-1333 • 1.35V • 512Meg x 64
8GB Kit (4GBx2) DDR3 PC3-8500 • CL=7 • Unbuffered • NON-ECC • DDR3-1066 • 1.5V • 512Meg x 64
What's the difference between both sets? Both cost the same. I suppose that 1.35 consumes less power than 1.5, and that 1333 is faster than 1066, although both things together sound contradictory. And if the first is better, why the same price? OsmanRF34 (talk) 17:19, 26 October 2012 (UTC)
- You've got it. My personal knowledge of this doesn't extend to exactly how it's possible to produce one memory module that's both faster and more efficient than another, but that's what's happening here. This seems like a good explanation of memory transfer speeds. My Internet searches on the subject seemed to throw up only forum posts, which seemed to all take the format "Will I notice a difference when using faster memory?" "No, you defo won't" "Yes, you totes will". The best advice would seem to be under "About adding faster memory" in the link above. - Cucumber Mike (talk) 20:24, 26 October 2012 (UTC)
- Assuming that both sets of memory 'chips' are from the same manufacturer, it is possible that they are in fact the 'same' i.e. produced on the same integrated circuit fabrication line to the same Integrated circuit design and then tested and sorted to see what voltage/frequency they will actually work correctly at. As I have no reference: [citation needed], though there is a brief mention here, Wafer testing#Wafer prober "In some very specific cases, a die that passes some but not all test patterns can still be used as a product, typically with limited functionality."
Of course it it also possible that they are totally different designs! - 220 of Borg 01:03, 27 October 2012 (UTC)- very true; often observed that similar chips with lower ratings can be just defective individuals of their more robust brethren, and may therefore harbor other untested defects; but I don't know anybody who has ever proved this. also, the Rule of $1; all chips, no matter what their complexity or initial cost, asympotically trend over time to a final cost of $1, so that the actual selling price at the end reflects supply, demand, shipping and storage, marketing, and a zillion other factors more than the actual cost to make the chip. Gzuckier (talk) 04:16, 27 October 2012 (UTC)
- Assuming that both sets of memory 'chips' are from the same manufacturer, it is possible that they are in fact the 'same' i.e. produced on the same integrated circuit fabrication line to the same Integrated circuit design and then tested and sorted to see what voltage/frequency they will actually work correctly at. As I have no reference: [citation needed], though there is a brief mention here, Wafer testing#Wafer prober "In some very specific cases, a die that passes some but not all test patterns can still be used as a product, typically with limited functionality."
Creating variable list names in Python
I want to create lists named listX thru listY, with, say, X = 4, and Y = 392. How can I do that without using 389 lines of code to define each explicitly ? If you suggest using something other than lists, keep in mind that I want each list to have a dynamic length, so I can add to it as much as I want. This is how I'm explicitly defining them currently:
list4 = [] list5 = [] . . . list391 = [] list392 = []
I'm also interested in creating lists containing two variables, like:
list1_1 = [] list1_2 = []
list2_1 = []
list4_1 = [] list4_2 = [] list4_3 = [] . . . list99_6 = [] list99_7 = []
StuRat (talk) 18:08, 26 October 2012 (UTC)
- So you want to create 389 variables, or just 389 mappings? The latter (which is surely the sensible thing) is to use one of the in-built collection types (say a list of (name, value) tuples, or a dictionary that maps {name:value} pairs). Depending on what you plan to do with all these things, you might instead use namedtuple or OrderedDict from the collections library. If you really wanted to actual manufacture real variables, locals() and globals() return the local and global namespace contexts respectively, so you can say locals()['foo']=13 to magically create a variable called foo and give it the integer value 13. But don't do that, you probably just want a dictionary. -- Finlay McWalterჷTalk 18:16, 26 October 2012 (UTC)
- You can say
globals()['foo'] = 13
, but you can't do that withlocals()
([6]). Python is designed such that all local variable references can be resolved at compile time. Munginglocals()
at run time may do what you expect in some implementations, but you can't rely on it. -- BenRG (talk) 22:24, 27 October 2012 (UTC)
- You can say
- For your second thing, the key of a dictionary can be a tuple, so you'd say
mystuff = {} # create an empty dictionary
mystuff[(99,98)] = [1,2,99,104]
mystuff[(99,99)] = ["orange", "lemon", "lime"]
Maybe it will help to show what I'm actually trying to do. In the first case, I want to sort words by scores they produce in a word game, in the most efficient way possible. Those scores vary from 4 to 392 per word. The best type of sort for this type of thing is a bin sort. So, I want to create bins named score4list through score392list and place each English word in one of those bins. It's not necessary to sort within each bin. I'd then like to create a list from the concatenation of all those bins, in order. StuRat (talk) 18:24, 26 October 2012 (UTC)
- I'm off running, so I won't have time to think properly about your problem for a few hours, but I think OrderedDict will be what you need. -- Finlay McWalterჷTalk 18:28, 26 October 2012 (UTC)
- OK, no hurry. I tried out "locals", and that seems to do what I need as far as defining the lists, but there's also the question of referencing the lists later (see below). StuRat (talk) 18:41, 26 October 2012 (UTC)
- Don't do that with
locals()
– see above. -- BenRG (talk) 22:24, 27 October 2012 (UTC)
- Don't do that with
- OK, no hurry. I tried out "locals", and that seems to do what I need as far as defining the lists, but there's also the question of referencing the lists later (see below). StuRat (talk) 18:41, 26 October 2012 (UTC)
Note that when I add to each bin, I'd like to be able to use a variable list name, as well, to avoid avoid a whole bunch of ifs, like so:
if score = 4: score4list.append(word) elif score = 5: score5list.append(word) . . . elif score = 392: score392list.append(word)
Instead, I'd like something like:
score[score]list.append(word)
StuRat (talk) 18:36, 26 October 2012 (UTC)
- You can nest data structures in Python:
scorelist = {} # Rule of thumb in Python - when in doubt, use a dictionary for score, word in entries: # Or whatever loop gets you (score, word) pairs #setdefault() methods of dictionaries gets the entry if it exists, or sets it to the given value and then returns it if not. scorelist.setdefault(score,[]).append(word)
outlist = [] for k in sorted( scorelist.keys() ): outlist.extend( scorelist[k] )
- Although, the "decorate-sort-undecorate" idiom is probably going to be the simplest way to do your sorting (and probably faster), if you don't need to preserve the order within a bin. (The following DSD will alphabetize within each bin, though you can massage the decorating to change that.)
#Insert whatever code you need to build an arbitrarily ordered list of (score, word) tuples here sort(entries) outlist = [ word for (score, word) in entries]
- Generally, anytime you want to make some sort of systematic variable naming convention, you'd be better served with some sort of data structure. -- 205.175.124.30 (talk) 18:53, 26 October 2012 (UTC)
- What do you mean by "data structure" ? Aren't lists data structures ? StuRat (talk) 19:03, 26 October 2012 (UTC)
- Exactly - use a data structure like a list, dictionary, tuple, structure or class to group and organize related data, rather than some ad hoc variable naming scheme. Having a number of variables like "name01, name02, name03, name04 ..." is a code smell. (I'd also argue that doing things like having seperate x, y and z variables to store the coordinates of a 3D object, as opposed to having a self contained "3D point" class/object is also a bit on the outré side.) -- 205.175.124.30 (talk) 00:09, 27 October 2012 (UTC)
As for the second case, an added rub to the game is that there's a 50 point bonus for using all the letters remaining in your hand (2-10), whatever that number of letters is. So, the scores for each word are no longer based on the word alone, but also whether the word uses all the letters in the person's hand. So, now we have list names like this:
score392MaxLetters10List
Note that there are many "holes", in that not every combo of scores (4-392) × number of letters in the hand (2-10) exists. StuRat (talk) 19:01, 26 October 2012 (UTC)
- I have not quite understood your domain problem, but I very much doubt that your approach can beat the build-in sort function of Python, if only because that is is implemented in native code, not interpreted Python. Sorting a list of 100000 random elements does not take much longer than creating it in the first place. --Stephan Schulz (talk) 19:27, 26 October 2012 (UTC)
- Well, I will check my bin sort against Python's sort, and go with whichever is faster. But first I must figure out how to write mine. StuRat (talk) 19:38, 26 October 2012 (UTC)
- Well, if you want to do this as a learning project, go ahead. But if you want use this in a working program, the productive approach is to first go with the system sort, and only when you identify the sorting as a bottleneck that makes your program too slow (notice two conditions ;-), you can optimise it. That said, what you want to do cries for an array of lists. In Python, arrays and lists are the same data structure, but indexing is O(1) as in "proper" arrays. So you can set up your data structure as
bins = [list() for i in range(4, 393)]
" and add a word to it via "bins[score].append(word)
". Variables in Python are implemented via a name lookup in a dict, and probably have worse performance than indexing into a list. --Stephan Schulz (talk) 20:04, 26 October 2012 (UTC)
- Well, if you want to do this as a learning project, go ahead. But if you want use this in a working program, the productive approach is to first go with the system sort, and only when you identify the sorting as a bottleneck that makes your program too slow (notice two conditions ;-), you can optimise it. That said, what you want to do cries for an array of lists. In Python, arrays and lists are the same data structure, but indexing is O(1) as in "proper" arrays. So you can set up your data structure as
- Well, I will check my bin sort against Python's sort, and go with whichever is faster. But first I must figure out how to write mine. StuRat (talk) 19:38, 26 October 2012 (UTC)
- Note that your sorted list is only ever going to be valid for a single given hand. A different hand will mean each item will fall into different bins, and hence different sort locations, regardless of the method you use to create it. With that in mind, I'd just adjust the score of the word to add in the bonus. (So you would have a global base score, and a hand-specific score, and you'd bin/sort on the hand specific score.) When you're populating your bins, or building your list of tuples, just do your "do I get a bonus" test, and add the bonus to the base score as appropriate. If you want the list for each hand, just repeat the populating and sorting. Regarding sparseness, dictionaries are great for that, as you don't need to have all the intermediate keys populated. But given the small number of possible entries (sounds like less than 450 in your case), having a list-of-lists with some of the inner lists being empty won't be anything close to a performance/memory hit. - BTW, I whole-heartedly agree with Stephan. While trying to come up with the best way to do things is a great learning experience, optimizing for optimizing's sake rarely works out. By the time you get your optimized solution debugged and working, the simple/straightforward way typically would have already finished running. -- 205.175.124.30 (talk) 00:22, 27 October 2012 (UTC)
- RE: "your sorted list is only ever going to be valid for a single given hand"; not so, it will be valid for every hand with the same number of letters. Hence, it is my intention to produce multiple lists, one for each possible hand size, each sorted by score. I can then go through the appropriate list from high score to low, and the first one which matches my letters is the best word.
- And, yes, I am just learning Python, and am trying this out as a learning experience. StuRat (talk) 00:58, 27 October 2012 (UTC)
- I'm surprised no one has mentioned collections.defaultdict yet. I think the easiest way to do this is:
from collections import defaultdict
bins = defaultdict(list)
for score, thing in unsorted_things:
bins[score].append(thing)
sorted_things = [(score, thing) for score, thinglist in bins.items() for thing in thinglist]
- However,
sorted_things = sorted(unsorted_things)
is easier and may well be faster, as already mentioned. -- BenRG (talk) 01:00, 27 October 2012 (UTC)- (Actually, this doesn't really work because
bins.items()
won't return the scores in order, and I guess sorting them isn't allowed. Silly me.)
- (Actually, this doesn't really work because
- OK, I implemented your first suggestion, like this:
from collections import defaultdict
def buildWordScoreLists(wordList):
words = defaultdict(list)
for i in range(len(wordList)):
score = getWordScore(wordList[i] )
wordLength = len(wordList[i])
for maxHandSize in range(wordLength+1,9+1):
words[maxHandSize,score].append(wordList[i])
words[wordLength,score+50].append(wordList[i])
wordsByMaxHandSize = defaultdict(list)
for maxHandSize in range(2,9+1):
for score in range(442,4-1,-1):
for i in range(len(words[maxHandSize,score])):
myWord = words[maxHandSize,score][i]
wordsByMaxHandSize[maxHandSize].append(myWord)
return wordsByMaxHandSize
- It took a bit under 1.5 seconds to run against 83667 words. Does anyone see a faster "do it yourself" approach (versus using Python sort methods) ? (Incidentally, I realize some of those hardcoded values, like the maximum possible score of 442, should be made into variables, and that's my next task). StuRat (talk) 04:38, 27 October 2012 (UTC)
Here's the above function with the hardcoded values removed and comments added:
def buildWordScoreLists(wordList,minWordLength,maxWordLength,allLettersUsedBonus):
# Create a 2-dim array of lists of words: words[maxHandSize,score]:
words = defaultdict(list)
minScore = 99999
maxScore = 0
for i in range(len(wordList)):
score = getWordScore(wordList[i] )
if score < minScore:
minScore = score
if score > maxScore:
maxScore = score
wordLength = len(wordList[i])
for maxHandSize in range(wordLength+1,maxWordLength+2): # Really maxWordLength + 1.
words[maxHandSize,score].append(wordList[i])
words[wordLength,score+allLettersUsedBonus].append(wordList[i]) # Case where wordLength == maxHandSize.
# Flatten to a 1-dim array of lists of words: wordsByMaxHandSize[maxHandSize], in order or decreasing scores:
wordsByMaxHandSize = defaultdict(list)
for maxHandSize in range(minWordLength,maxWordLength+2): # Really maxWordLength + 1.
for score in range(maxScore+allLettersUsedBonus,minScore-1,-1): # Really minScore.
for i in range(len(words[maxHandSize,score])):
myWord = words[maxHandSize,score][i]
wordsByMaxHandSize[maxHandSize].append(myWord)
return wordsByMaxHandSize
StuRat (talk) 05:26, 27 October 2012 (UTC)
- Instead of
for i in range(len(array)): item = array[i]; ...
, it's simpler to writefor i, item in enumerate(array): ...
. Actually in this case you don't need the index at all so you can just writefor item in array: ...
. And you can replace the last loop withextend
. Here's a rewritten version with some other changes:
def buildWordScoreLists(wordList, minWordLength, maxWordLength, allLettersUsedBonus):
# Create a 2-dim array of lists of words: words[maxHandSize,score]:
words = defaultdict(list)
scoreList = map(getWordScore, wordList) # or list(map(getWordScore, wordList)) in Python 3
minScore, maxScore = min(scoreList), max(scoreList)
for word, score in zip(wordList, scoreList):
wordLength = len(word)
for maxHandSize in range(wordLength+1,maxWordLength+2):
words[maxHandSize, score].append(word)
words[wordLength, score+allLettersUsedBonus].append(word) # Case where wordLength == maxHandSize.
# Flatten to a 1-dim array of lists of words: wordsByMaxHandSize[maxHandSize], in order or decreasing scores:
wordsByMaxHandSize = defaultdict(list)
for maxHandSize in range(minWordLength, maxWordLength+2):
for score in reversed(range(minScore, maxScore+allLettersUsedBonus+1)):
wordsByMaxHandSize[maxHandSize].extend(words[maxHandSize, score])
return wordsByMaxHandSize
- No guarantees I didn't introduce a bug. -- BenRG (talk) 06:42, 27 October 2012 (UTC)
- Yep, it got a bug alright. "minScore, maxScore = min(scoreList), max(scoreList)" produced the error: "TypeError: 'int' object is not callable", even when I broke it up into two lines, and tried both versions of the preceding line. StuRat (talk) 18:56, 27 October 2012 (UTC)
- That's because someone (not BenRG) has defined an integer variable called "min" (or "max"), which has overridden the system min or max function. -- Finlay McWalterჷTalk 19:03, 27 October 2012 (UTC)
- Interesting. The variables "minWordLength" and "maxWordLength" are indeed called "min" and "max" where I make the function call. I thought those names wouldn't be defined within this function. Are they, by default, global variables, if defined in the main ? StuRat (talk) 22:20, 27 October 2012 (UTC)
- Any variable assigned in a function is local unless you declare it global. Any variable assigned outside a function (at the top level) is global. If your "main" is not a function, you should probably put it in a function named
main
and just callmain()
at the top level, to avoid this kind of problem. -- BenRG (talk) 22:29, 27 October 2012 (UTC)
- Any variable assigned in a function is local unless you declare it global. Any variable assigned outside a function (at the top level) is global. If your "main" is not a function, you should probably put it in a function named
- OK, thanks for the hint. (This learning exercise is apparently working, as I'm learning quite a few new things here.) StuRat (talk) 01:15, 28 October 2012 (UTC)
Is someone using my email for spam?
Hi, I hope you can help. I just exited Outlook after writing two emails but I got a message saying that there were unsent emails being sent. Well I was surprised as the two I sent were short text only and would normally have gone immediately in a second or two. Also the message said it was sending three emails and I only wrote two. I waited till the outbox was empty and check my sent emails. There were only the two I knew I had written. Is there some way my email account is being used to send spam and how can I check it if those emails don't show in my 'sent' box? there must surely be a more certain way of checking what emails have been sent from my PC. Hope you can help. Gurumaister (talk) 19:53, 26 October 2012 (UTC)
- There is malware (such as ILOVEYOU) that sends email to people in your address book with your name in the From: line, but I don't think there's ever been any malware that uses Outlook to send the mail. Spammers can also send forged email with your address in the From: line without involving your computer at all, but again Outlook wouldn't report that mail. I don't know what caused this glitch but I'm pretty sure it isn't spammers. -- BenRG (talk) 00:53, 27 October 2012 (UTC)
Thanks, BenRG. Hopefully it was just a glitch then. Gurumaister (talk) 07:03, 27 October 2012 (UTC)
- It's possible that a previous email failed to send properly the last time you used Outlook. I've had such a thing happen, but it usually re-sent as soon as I started Outlook again, but that would probably depend on the settings you have for sending and receiving messages. Matt Deres (talk) 22:44, 27 October 2012 (UTC)
October 27
yield method in java
My doubt is on yield method in multi threading.
Yield method is used to put a currently executing thread in pause and so other threads can run.
but it is not happening.i am expressing my doubts using below programme.please read and tell me how to understand yield method.
class thread3
{
public static void main(String args[])
{
Thread count1=new Thread(new CountDownEven());
Thread count2=new Thread(new CountDownOdd());
count1.start();
count2.start();
Thread t=Thread.currentThread();
for(int i=11;i<=20;i=i+2)
{
System.out.println(t.getName()+"----"+i);
Thread.yield();
}
}
}
class CountDownEven implements Runnable
{
public void run()
{
Thread t=Thread.currentThread();
for(int i=0;i<10;i=i+2)
{
System.out.println(t.getName()+"----"+i);
Thread.yield();
}
}
}
class CountDownOdd implements Runnable
{
public void run()
{
Thread t=Thread.currentThread();
for(int i=1;i<10;i=i+2)
System.out.println(t.getName()+"----"+i);
Thread.yield();
}
}
}
out put:
main----11 Thread-1----1 Thread-0----0 Thread-1----3 main----13 Thread-1----5 Thread-0----2 Thread-1----7 main----15 Thread-1----9 Thread-0----4 main----17 Thread-0----6 main----19 Thread-0----8
my doubts: 1)see the first four lines of out put.before coming to main thread, thread1 is getting executed twice. see the out put between 5 to 8 lines. before coming to main thread, thread1 is getting executed twice see the out put between 9 to 11 lines. thread one is getting executed only once before coming to main thread. 2)why thread1 executed twice before,and once now? 3) how can i understand yield method? — Preceding unsigned comment added by Phanihup (talk • contribs) 01:31, 27 October 2012 (UTC)
- First of all, I've taken the liberty of formatting your source-code so it is easier to read. Secondly, yield() is behaving exactly as expected: it is allowing the thread scheduler to decide which thread should run next. The thread scheduler can pick any thread that is available to run - including the same thread! If you want to use some method to guarantee that a different thread will run, you need to investigate the many ways to manage synchronization of threads in Java. For example, you could implement a barrier, as is performed in the official example of a guarded block. A good overview is provided in the official Java Tutorial on Concurrency . If you want to encourage the scheduler to select the other thread - without actually guaranteeing that behavior, you could use Thread.sleep() instead of yield(). By sleeping for a few seconds, it's probable that the other thread would be selected to run next; but unless you carefully and explicitly use some synchronization, you can't guarantee any order that threads will run. (For example, if the other thread is also sleeping, then neither thread will run, and the system will idle; and when both threads wake up, you're back to the same condition: the scheduler will select any one of the available threads. Part of the Java programming language contract is that the scheduler does not guarantee any specific algorithm for selecting the next thread to execute: that allows the JVM to tune for best performance, or allocate multiple threads to multiple execution units, and so forth. Nimur (talk) 04:22, 27 October 2012 (UTC)
- For the experienced Java enthusiasts: I've just noticed that in Java SE 7, the official documentation has changed for yield(): Oracle's Thread.yield() javadoc explicitly states that Yield is just a "hint," and "the scheduler is free to ignore this hint." This has always been the contract, but the documentation was never so clear about it in previous generations! And, Oracle proceeds to state: ..."It is rarely appropriate to use this method. It may be useful for debugging or testing purposes...." Nimur (talk) 04:28, 27 October 2012 (UTC)
What is a binary file?
What's the point of calling a file binary? Are there files that are not binary? Is that a misnomer? Comploose (talk) 15:56, 27 October 2012 (UTC)
- One explanation is that a binary file is not a text file. Jc3s5h (talk) 16:00, 27 October 2012 (UTC)
- All files are composed of sequences of bytes, and are in that sense binary. However, it is common practice to refer to files that cannot conveniently be read or manipulated in a plain text editor, i.e. the text files that Jc3s5h linked to, as binary files (yes, we have an article). --NorwegianBlue talk 18:41, 27 October 2012 (UTC)
- It's also common to store binary files in a 'bin' folder (in unix anyway). This is compiled, linked code ready to run on the operating system. Sandman30s (talk) 13:27, 28 October 2012 (UTC)
- There are various ways of encoding text (ASCII, EBCDIC, ...) and various ways of encoding newline (LF, CR, CRLF, ...). Transfer protocols like FTP have a text mode to deal with the resulting interoperability problems. Also, some operating systems (notably VMS) treat line endings in a text file as a special out-of-band property like end of file, so text files really aren't binary. WinFS was another attempt at a filesystem that doesn't just store binary blobs. -- BenRG (talk) 19:17, 28 October 2012 (UTC)
Ethernet over phone cable
I currently have a slim Ethernet cable going from my ADSL router (next to my master phone socket) to a small unmanaged gigabit switch at the other side of my living room (next to an extension phone socket) into which I connect my TV, PS3, etc. I'd like to do away with this for aesthetic reasons, but without ripping my home to bits to lay new cable or buying new kit like HomePlug adaptors.
My house is just over two years old, and I had heard that it was quite common nowadays for actual Cat-5(/5e/6) cabling to be used for extension phone sockets, so I have taken a look at the cabling used: It is not Cat-5 (it only has 3 pairs like a normal phone cable, instead of 4 like Cat-5), however it is closer in thickness to network cabling than to other telephone extension cabling I've seen before.
I know that if it isn't Cat-5, it isn't within spec for Fast Ethernet, but what're the chances it'll work anyway given the fact it looks like decent thickish cable and is somewhere between 8-15m (I don't know what route it takes)? I'm after an idea of whether its worth the effort as I would need to re-terminate the cable (or at least the 2 pairs I'll be using) as it is currently connected to British telephone sockets
Thanks in advance, davidprior t/c 19:13, 27 October 2012 (UTC)
- What you would have there is Category 1 cable with no guarantee of function at Ethernet speeds, even 10 megabits per second half duplex. But it could well function on the short length you have and given that it is not getting cross talk with other cables. Graeme Bartlett (talk) 21:39, 27 October 2012 (UTC)
Are there any Digital SIlver Currencies?
I gotta do a work on digital currencies and i choose ones based on silver, does any one knoif there are any digital silver currencies? — Preceding unsigned comment added by 189.222.145.250 (talk) 22:52, 27 October 2012 (UTC)
- I recommend reading Electronic money and changing the topic to Bitcoins. They (talk) 01:16, 28 October 2012 (UTC)
- You could create your own digital, silver-backed currency, say by buying and storing silver bullion coins on behalf of those who purchase your currency. Here are some recent silver coins: Silver_coins#Bullion_coins. StuRat (talk) 01:28, 28 October 2012 (UTC)
- Though, if the plan is to trade in silver as a commodity, it's unlikely you can sustain the volumes necessary to be price-competitive with, say, CME silver on the New York Mercantile Exchange. Note the important distinction between creating a currency, and trading in a highly liquid commodity. Only one of these activities is usually considered legal in the United States. If you're writing a report on digital currency, you might do well to read about currency in general: this subject is actually a very complicated topic in economics. "What is a currency?" "Who may decide when a currency is valid, and how much is it worth?" These questions apply to all forms of money, whether we're discussing currency fiat by government decree, or anarchosocialist cyberpunk bitcoins trafficked by people who don't bother to think too deeply about the subject. Adding the extra technical complexity of implementing a currency in a digital format puts you into some fairly advanced economic theory. Nimur (talk) 19:22, 28 October 2012 (UTC)
Python unexpected details
a = [1,2,3] b = a b[0] = 8
It's kind of unexpected to me that a is now [8,2,3]. Does that sound logical? Are there many more of these pitfalls in Python? Does it have a name? Comploose (talk) 23:51, 27 October 2012 (UTC)
- A) The solution to the first problem is to use this assignment statement:
b = a[:]
- And I agree that this is non-intuitive. After all, with the a = 5 assignment, this doesn't change the value of 5 when you change the value of a. So, they are using the equals sign inconsistently. If I had designed Python, I'd use a syntax like "a <=> b" to show it's not a straight assignment.
- B) As for other pitfalls, I consider how the loops work to be particularly non-intuitive:
for I in range(5): print I # Prints 0,1,2,3,4
for I in range(12,10,-1): print I # Prints 12,11
- C) Then there are immutable object types, which can't be changed with a simple assignment statement, but require use of a method instead. (The part I don't get is why they can modify it with a method, but can't get the interpreter to do the same thing with an assignment statement. Is this done intentionally as a reminder that it's inefficient to modify it ?)
- Here's one painful way to manually change a tuple:
Tup = (1,2,3) print Tup # Prints (1, 2, 3) Tup2 = () Tup2 += (Tup[0],) Tup2 += (9,) Tup2 += (Tup[2],) Tup = Tup2 print Tup # Prints (1, 9, 3)
Tup[1] = 9 # Error: not allowed to change a tuple member.
- D) And one I just found out about myself is that variables defined outside a function are global by default (so exist inside any functions as well).
- E) If you're used to compiled languages versus an interpreted language, having to define a function higher in the source code than you call it might seem odd. StuRat (talk) 00:26, 28 October 2012 (UTC)
- Actually, the cleaner (clearer) solution to A) is to use
b=list(a)
. A list is an object. The assignment just creates a new reference to the same list, unless you actually tell it to create a new list (via thelist()
constructor). For B), the problem is not with loops at all. The loop always consistently iterates over all the elements in the iterable object you give it. You might not like the way range() produces this list, but that is quite a different aspect from the loop itself. And for C), you fall into a similar trap to A), namely not distinguishing between an object, and a variable that points to it. You are not changing the tuple. You create an new, fresh, different tuple that you then assign to the old variable. The original tuple is (unless collected by the garbage collector) still around, and still the same (1,2,3). One reason why there are immutable objects is that they can be used as keys in hashes/dicts. D) is the same in C and C++, so it's not surprising. And E) is somewhat wrong. You must have defined a function before you can use it, but that again is not that different from C or Pascal - in both languages, you need to at least declare functions you want to call - in Pascal with a "forward" declaration, in C with a prototype declaration. --Stephan Schulz (talk) 01:15, 28 October 2012 (UTC)
- Actually, the cleaner (clearer) solution to A) is to use
- Not sure where you're going with C. After the "Tup = Tup2" assignment, Tup has indeed changed as I want it. I suppose you could be pedantic about it and say that now it's a different "Tup", but, for all practical purposes it's the same "Tup". StuRat (talk) 01:36, 28 October 2012 (UTC)
- Ben's explanation below applies. Yes,
Tup
has changed, but not the actual tuple.Tup
is just a reference. The tuple is immutable. Consider (with ; for newlines to save space)a=(1, 2); b=a; a2=a[:1]; a2+=(3,); a=a2
. The right hand side of the first statement creates a tuple with value(1,2)
. The assignment makes a a reference to that tuple. The second assignment (b=a
) makeb
a second reference to the same tuple. If you think low-level, imagine the tuple to sit at some address in memory, anda
andb
both storing this same address. - The next assignment,
a2=a[:1]
then creates a new tuple, namely(1,)
. Anda2+=(3,)
creates two new tuples,(3,)
on the right hand side, and(1, 3)
in the "+" part of "+=". It then makesa2
a reference to that last new tuple. At this time,a
andb
both reference the original tuple, anda2
references the new tuple. There are no remaining references to the two intermediary tuples, so the garbage collector will eventually pick them up and destroy them. The last statement,a=a2
does not change or create any new tuples, it just makesa
a reference to the existing tuple(1, 3)
. You can verify that the original tuple did not change by printingb
, which still references(1, 2)
. - Being pedantic is essentially what computer science (and programming) is all about. Even if you are not, the computer is, and will byte your ankle (or more valuable parts) if you don't live up to its standards. ;-). --Stephan Schulz (talk) 07:34, 28 October 2012 (UTC)
- Ben's explanation below applies. Yes,
- Not sure where you're going with C. After the "Tup = Tup2" assignment, Tup has indeed changed as I want it. I suppose you could be pedantic about it and say that now it's a different "Tup", but, for all practical purposes it's the same "Tup". StuRat (talk) 01:36, 28 October 2012 (UTC)
- Can you think of any case where it makes a difference whether the original Tup has the same address as the new Tup ? If not, then this is "a distinction without a difference". After all, that's why we use high-level computer languages versus, say, assembler, so we don't have to worry about the low-level memory management. StuRat (talk) 16:34, 28 October 2012 (UTC)
- Sure, the very example I provided. In my example, you have both tuples remaining, one pointed to by
a
anda2
, and one pointed to byb
. If you had modified the original one, you would have only one of the tuples. From a different angle, knowing this stuff is important if you are at all concerned about efficiency. Passing references is a lot more efficient than copying large data structures, both in time and memory. But you need to be aware of the exact semantics, otherwise your code will be buggy. IIRC (but that may be an urban legend), Eurisko once discovered thatappend
andnconc
performed the same function, butnconc
was faster. So it went ahead and "optimised" its own code, not understanding that while both do the same from a functional perspective (concatenating two lists), they have very different side effects. In particular,nconc
simply reused both lists, extending the first with the second, while append made a copy of the first, and thus left both lists unchanged. --Stephan Schulz (talk) 16:51, 28 October 2012 (UTC)
- Sure, the very example I provided. In my example, you have both tuples remaining, one pointed to by
- Can you think of any case where it makes a difference whether the original Tup has the same address as the new Tup ? If not, then this is "a distinction without a difference". After all, that's why we use high-level computer languages versus, say, assembler, so we don't have to worry about the low-level memory management. StuRat (talk) 16:34, 28 October 2012 (UTC)
- When you write
a = b
, you are makinga
refer to the same object thatb
refers to. In other words, you are assigning a reference, not copying an object. This is always true in Python (and Java and Javascript and Scheme and many other languages). It's called aliasing. It can be very confusing and bug-prone with mutable objects like lists, but it's not much of a problem with immutable objects. Examples of immutable objects are integers, strings, and tuples. If you writea = (1, 2, 3); b = a
, there's nothing you can do toa
that will affectb
.b
will always point to the immutable value(1, 2, 3)
until you make it point to something else. The same is true if you writea = 123; b = a
ora = "123"; b = a
. It's pretty common for languages to behave this way. C++ is notably different: in C++, variables don't refer to objects, they are objects, and when you writeb = a;
you are copying the objecta
on top ofb
. Ifa
andb
arestd::vector
s, for example, then subsequently assigningb[0] = 8;
won't changea[0]
. -- BenRG (talk) 06:41, 28 October 2012 (UTC)
- When you write
- This is off topic, but there's a near universal convention of putting spaces after commas in Python code.
[1, 2, 3]
, not[1,2,3]
. -- BenRG (talk) 07:01, 28 October 2012 (UTC)
- This is off topic, but there's a near universal convention of putting spaces after commas in Python code.
a = (3)
- a is a int here.
a = (3,3)
- a is a tuple
- If you want a tuple with one element:
a = (3,)
Use the copy module.
from copy import copy, deepcopy
l = list(range(10))
print("copy(l) is l", copy(l) is l, sep=": ")
print("copy(l) == l", copy(l) == l, sep=": ")
l = [1, [2, [3, [4]]]]
assert repr(l[1]) == '[2, [3, [4]]]'
print("copy(l)[1] is l[1]", copy(l)[1] is l[1], sep=": ")
print("deepcopy(l)[1] is l[1]", deepcopy(l)[1] is l[1], sep=": ")
→Σσς. (Sigma) 19:24, 28 October 2012 (UTC)
October 28
Wikipedia side pop-up?
Yesterday, whilst I was looking at this page I got a rectangular shaped pop-up with icons running down the side. When I hovered over a trash can icon, "nominate this article for deletion" appeared. When I hovered over another icon, "send appreciation to author" appeared. I closed the box but am now concerned that my computer may be infected with some type of malicious software. Or is this a new feature wikipedia is implementing? My computer is a power pc mac mini running mac osx version 10.4.11. Any thoughts? JayJ47 (talk) 02:07, 28 October 2012 (UTC)
- My guess is that somebody was trying something out in what he thought was the sandbox, but was actually doing it live, and, after he discovered his mistake, he quickly reverted it. StuRat (talk) 02:13, 28 October 2012 (UTC)
- So should I be concerned? So far its only happened once. I visited the same page on a different computer and it didn't show up. JayJ47 (talk) 02:23, 28 October 2012 (UTC)
- It wouldn't concern me. StuRat (talk) 02:30, 28 October 2012 (UTC)
- The most plausible idea I can think of is that somebody was experimenting with Javascript somewhere. Do you have any Javascript things enabled for your account? Looie496 (talk) 03:48, 28 October 2012 (UTC)
- No, not that I'm aware of. Thank you both for your responses. JayJ47 (talk) 04:25, 28 October 2012 (UTC)
- From a search, I found Wikipedia:Page Curation/Help#What is Mark for Deletion and how does it work?. Checking out that and Wikipedia:Page Curation, it seems clear you saw the Curation Toolbar. You can check the pictures or visit a page in Special:NewPagesFeed to see the toolbar to check against what you saw. (Ronald Woutering should have the toolbar for a while.) I can't say why you saw it. It probably shouldn't have shown up on that page since I'm pretty sure it must have been patrolled given the age and activity. It may be someone made a mistake and made the Curation Toolbar show up when it shouldn't have, it may be something simply went wrong on the software and it showed up when it shouldn't have. Either way, it's unlikely to be a concern. Nil Einne (talk) 10:07, 28 October 2012 (UTC)
- Yes that's what I saw! Such a relief to know it wasn't anything bad. Thanks for your help! JayJ47 (talk) 11:34, 28 October 2012 (UTC)
- wikipedia has finally achieved a degree of complexity which has led to it becoming self-aware and is beginning to test its abilities. Soon it will attempt to cause a global Internet flame war to destroy mankind in a preemptive strike.Gzuckier (talk) 02:26, 29 October 2012 (UTC)
Core Temp malware
I downloaded and installed a software called Core Temp (a program that monitors CPU temperature) last night, only to delete it minutes later when I saw that my home page and default search engine had been changed to some search engine called snap.do without my permission. It even deleted my browser add-ons/extensions. I had to block the site by editing my file hosts in order for my browser to finally stop defaulting to that awful site. Then I ran a virus scan, and it detected some adware in the system. Well, after presumably getting rid of them, I restarted the computer. Then I as try to run a virus scan once more as a precaution, it tells my that my antivirus is expired, even though I registered it to protect for a full year about a month ago (I'm using avast!). So I uninstalled it to reinstall. I had no problems with it until I performed the mandatory reboot. Now when I log into my user account, the taskbar remains frozen and I can't open any programs. I had to restart in Safe Mode just so I could be able to type this. I just think all these problems have been triggered by the Core Temp software, which I believed to be safe based on the reviews I read before proceeding to download it, and I got it from its official site (http://www.alcpu.com/CoreTemp/). Has anyone else who used the software faced similar problems? 70.55.109.152 (talk) 23:00, 28 October 2012 (UTC)
- If it truly originated with these particular actions, it probably has more to do with the InstallIQ system that tries to install random adware onto your computer than the actual Core Temp application. There's a lot of chatter about it here and there. ¦ Reisio (talk) 01:11, 29 October 2012 (UTC)
- I've finally been able to fix the problem with Startup Repair (I suspect some system files were damaged), but my antivirus is mysteriously gone now. I downloaded Microsoft Security Essentials in its place, even though I vastly prefer the efficacy of avast!. But it's been acting so weird today that I'm afraid to reinstall it and encounter the same problems all over again. 70.55.109.152 (talk) 02:36, 29 October 2012 (UTC)