Wikipedia:Reference desk/Computing
of the Wikipedia reference desk.
Main page: Help searching Wikipedia
How can I get my question answered?
- Select the section of the desk that best fits the general topic of your question (see the navigation column to the right).
- Post your question to only one section, providing a short header that gives the topic of your question.
- Type '~~~~' (that is, four tilde characters) at the end – this signs and dates your contribution so we know who wrote what and when.
- Don't post personal contact information – it will be removed. Any answers will be provided here.
- Please be as specific as possible, and include all relevant context – the usefulness of answers may depend on the context.
- Note:
- We don't answer (and may remove) questions that require medical diagnosis or legal advice.
- We don't answer requests for opinions, predictions or debate.
- We don't do your homework for you, though we'll help you past the stuck point.
- We don't conduct original research or provide a free source of ideas, but we'll help you find information you need.
How do I answer a question?
Main page: Wikipedia:Reference desk/Guidelines
- The best answers address the question directly, and back up facts with wikilinks and links to sources. Do not edit others' comments and do not give any medical or legal advice.
March 11
Locked down account, Mac OS X 10.5.8
I am ignorant about OS X, so bear with me. This is a question about Mac OS X 10.5.8. What I want to do is make an account that can log in, play media on iTunes from only one prearranged folder, and log out. I don't want it to be able to read anything but the one folder of media (and whatever else is necessary just to run iTunes), and I don't want it to be able to write on anything at all, not even the media folder. Is this even possible? What's the easiest way to do this? Can I do it just by making a Standard account with parental controls and then setting permissions? That is, can I set permissions even such that the account's Home folders are not writable by the account? --Atethnekos (Discussion, Contributions) 06:56, 11 March 2013 (UTC)
- You could certainly lock down the permissions on the media folder, and I'm not sure exactly how far parental controls go. But locking down the home directory may introduce some problems, as there's always going to be things it wants to write to, and I'm not sure without testing how it would respond. It sounds like you want more of a remote player... perhaps set up iTunes music sharing and play it that way from another device. Alternatively, I guess you could create a home directory on each startup that resides in ram, like a ramdisk or tmpfs (which is different in mac/bsd than it is in linux), and then any changes to it would revert on reboot.
- If you're not so concerned about the guest user writing files, and are worried about cpu integrity, ensure they don't have administrator access (i.e. they don't belong to the admin group, or any other critical ones), and change the permissions on the media folder/files to 755 and 644, or something along those lines. There may be more elegant solutions out there, but this seems like the naive approach. Shadowjams (talk) 17:37, 11 March 2013 (UTC)
- Thanks, ShJ. I thought of another possibility: Is there a way to set permissions so that the account can't read any removable media? If I could do that, then locking down write for even the home directory would be unnecessary, as there would be no way to add new media files. --Atethnekos (Discussion, Contributions) 20:21, 11 March 2013 (UTC)
- I'm going to betray my mac ignorance (even though I have one), but I'm not sure how it handles automounting. In some *nix distributions I see a specific group with mount privileges, so if you removed the guest account from that group it might work. The real test is to plug in a device and see what permissions it automounts it with (if it mounts it at all). It's certainly easy to restrict a device's permission at mount time, and I'm sure you can set those default options. The easiest way would be to create a group that can read those for all your users you want to read a usb key, then don't give it to your guest account and adjust the default permissions. So you'd do something like set the default automount permissions to gid stuff for your new group, and make sure "any" access wasn't allowed (0770 permissions) and ensure your guest account wasn't part of that group. I'm not sure, but it might be a dirty hack to just set permissions similarly on the /media folder and do the same group thing without messing with automount settings.
- Offhand I don't know exactly how you'd do that in osx but maybe someone else here does, and I may take a stab at it later. Shadowjams (talk) 21:03, 11 March 2013 (UTC)
- You've given me some good starting points to try stuff out. Even if I don't get an optimal solution, I'm sure I can put something together now. --Atethnekos (Discussion, Contributions) 23:14, 11 March 2013 (UTC)
- Offhand I don't know exactly how you'd do that in osx but maybe someone else here does, and I may take a stab at it later. Shadowjams (talk) 21:03, 11 March 2013 (UTC)
Substitution in Excel
Is there any way to do the equivalent of {{subst:}} in Microsoft Excel? -- Ypnypn (talk) 13:26, 11 March 2013 (UTC)
- Are you looking for Replace a formula with its result? — Sebastian 19:35, 11 March 2013 (UTC)
- Yes I was, thanks! -- Ypnypn (talk) 22:53, 11 March 2013 (UTC)
Led edge lit displays
Do all led edge lit displays have light leaking on the corners? Clover345 (talk) 15:29, 11 March 2013 (UTC)
- You can cover it with a black tape. 190.60.93.218 (talk) 15:53, 11 March 2013 (UTC)
- I meant light leaking onto the screen. Like if something darks on the screen, you can see some white light reflecting off it. — Preceding unsigned comment added by Clover345 (talk • contribs) 00:18, 12 March 2013 (UTC)
Unix: echo
This should be a simple question. Under Cygwin, I am trying to run the following shell script:
var1=a var2=b echo mycommand $var1 $var2
Expected output:
mycommand a b
Actual output:
bcommand a
Why is it putting the 'b' in front, instead of concatenating it? Thank you for your help! Undergeek2013 (talk) 15:39, 11 March 2013 (UTC)
- I think whatever editor you used for the script puts CRLF at the ends of lines (the Windows standard) instead of LF (the Unix standard). Any decent programmer's editor for Windows should have an option to use Unix line endings. -- BenRG (talk) 15:56, 11 March 2013 (UTC)
dos2unix file
for a quick fix. ¦ Reisio (talk) 16:07, 11 March 2013 (UTC)
- That's it! Thanks, the quick fix works. I'm now trying to see how to change this setting in Notepad++, preferably so it does that only for the extension '.sh'. Undergeek2013 (talk) 16:14, 11 March 2013 (UTC)
- You could probably tell it to use LF endings by default for new files, and preserve endings in existing files. ¦ Reisio (talk) 16:26, 11 March 2013 (UTC)
- Yes, I just found out how to do tell it to use LF endings here: http://stackoverflow.com/questions/8195839/choose-newline-character-in-notepad. According to http://superuser.com/questions/480104/notepads-pesky-eol-format-switching-how-to-remove-the-invisible-default, Notepad++ preserves the existing EOL characters. It's still not perfect, since I use Notepad++ also to create new files for Windows. But maybe I'll just use another editor for one of the two OSs. Thanks everyone for your answers, my question has been answered, I don't want to take any more of your time with this. Undergeek2013 (talk) 16:33, 11 March 2013 (UTC)
- A useful tool is the file command, which can detect the kind of line termination in a file. For files that end with the unix normal \n it'll say "ASCII text"; for those with the DOS \r\n it will say "ASCII text with CRLF line terminators". -- Finlay McWalterჷTalk 16:46, 11 March 2013 (UTC)
- Neat, thanks! Undergeek2013 (talk) 16:52, 11 March 2013 (UTC)
- You may want to use Unix newlines for all file types, since most Windows software can cope with it (Notepad is a notable exception). FWIW, you can change the EOL convention for the current file in Notepad++ with Edit → EOL Conversion, but you would need to remember to do that for every new file that needed CRLF endings. It's also possible to configure Cygwin to transparently convert line endings by using mount with the --text option, but it's probably a bad idea because a lot of Unix software assumes that text mode = binary mode. -- BenRG (talk) 18:38, 11 March 2013 (UTC)
Computer thinks external HD is a CD drive
I had one USB2 and two USB3 external drives on my computer (A Windows 8 system). Today I added a USB3 hub into one of the two USB3 ports and plugged one of the USB3 drives and a new USB3 external drive into the hub, all after unplugging the old USB2 drive. When I plugged the USB2 drive back in, it thinks it is a CD drive. (The three USB3 drives are all OK.) I tried unplugging it and plugging it back in - same thing. What is going wrong and can it be fixed? Bubba73 You talkin' to me? 23:03, 11 March 2013 (UTC)
- Well, I unplugged it and plugged it back in again, and this time it is right (and changed drive letters). Bubba73 You talkin' to me? 01:01, 12 March 2013 (UTC)Resolved
March 12
Del
How do I find Del and Tab on my Italian keyboard? Thank you.--Jeanne Boleyn (talk) 07:22, 12 March 2013 (UTC)
- Keyboard layout#Italian might be helpful. It appears the TAB key is in the US position. DEL is not in the main block but maybe bottom left of a block of 6 above the arrow keys or may be achievable on the key to the rightof the number pad zero. Try [1]. -- SGBailey (talk) 10:01, 12 March 2013 (UTC)
- If you're looking for ∇ (Del) - and not the "delete" key - you'll need an input method extension because most keyboards do not have a key for del. Nimur (talk) 15:36, 12 March 2013 (UTC)
- Ha! -- interesting interpretation...If you want native hardware ∇, I'd recommend FRONT-3 on a Space-cadet_keyboard ([2]) SemanticMantis (talk) 02:52, 13 March 2013 (UTC)
- If you're looking for ∇ (Del) - and not the "delete" key - you'll need an input method extension because most keyboards do not have a key for del. Nimur (talk) 15:36, 12 March 2013 (UTC)
- Another option is peck and see. I had a prototype keyboard once and all the letters came off the keys in no time flat. A good way to learn where all the keys are rather than looking for them. ;-) Dmcq (talk) 09:42, 13 March 2013 (UTC)
iPad bookmarking
How do I bookmark Safari web pages on my iPad please?85.211.205.123 (talk) 11:52, 12 March 2013 (UTC)
- Navigate to the page you wish to bookmark. Click the 'share' button (picture) then 'Bookmark'. Now edit the title and address of the bookmark (if required) and click 'save'. Your bookmark will then be found in the list under the bookmark icon in the main menu bar. - Cucumber Mike (talk) 13:09, 12 March 2013 (UTC)
Great stuff, thanks. What would we do without Wikipedia!?85.211.205.123 (talk) 19:17, 12 March 2013 (UTC)
- All sorts of silly things... - Cucumber Mike (talk) 19:46, 12 March 2013 (UTC)
- In Apple-speak, the button is called an "action button", although it does things like sharing. IBE (talk) 23:18, 12 March 2013 (UTC)
Windows Installer
Any thoughts on what might be causing this error message whenever I try to update iTunes? And how I can fix it? I'm assuming there's a program somewhere on my computer called "Windows Installer" which is broken, but that's pretty much where my grasp of the problem stops. AndyJones (talk) 21:09, 12 March 2013 (UTC)
- You could try uninstalling the existing version first, then installing the newer version with a somewhat fresher directory structure. ¦ Reisio (talk) 21:21, 12 March 2013 (UTC)
- Do you mean uninstall the installer? Or uninstall iTunes? Because if the latter, I'm worried that if my installer isn't working I won't be able to reinstall iTunes, leaving me without it altogether! AndyJones (talk) 22:09, 12 March 2013 (UTC)
- Windows Installer is reporting the problem; it's (probably) not the cause of it. Unfortunately, the error message is totally generic and unhelpful. There must be more details in a log somewhere, but I'm not sure where. You might have to enable logging. Or you could do as it suggests and ask Apple about it (or at least ask on an iTunes support board). -- BenRG (talk) 23:33, 12 March 2013 (UTC)
March 13
Windows file access questions
Hi, is there any way in Windows 7 to control access to files/folders on a per-application basis (i.e. allow one program access but not another)?
Also, has this changed in Windows 8? Do Windows 8 apps have only access to their own files like e.g. Android? What about traditional-style programs, such as MS Office, running on Windows 8? Do they work differently in respect of file access? 86.176.211.90 (talk) 03:01, 13 March 2013 (UTC)
- You would probably need to run each application as a separate user, and add an entry to the ACL for every file/folder you didn't want it to access, denying access to that user. Unfortunately, if the apps are actually malicious, you would probably need to run them on separate desktops (e.g. using fast user switching), since there are ways of elevating privileges by sending window messages to other windows on the same desktop (I don't know if any real-world malware does that, though).
- Sandboxie would also work, but you'd need to pay for it to isolate more than one application at a time, since the free version doesn't support simultaneously active sandboxes.
- I don't know anything about Metro/Modern apps. For normal Windows software I'm sure the security model hasn't changed in Windows 8, because that would break far too much stuff. -- BenRG (talk) 22:10, 15 March 2013 (UTC)
Update CSS filters
Please expand the expression-section in this article to include the css calc() feature of CSS3 (http://caniuse.com/calc).84.167.112.54 (talk) 03:13, 13 March 2013 (UTC)
- If you have managed to write something here then you know enough to try and edit the page yourself. The talk page for the article is the normal place to discuss changes to an article. Try and find a citation, some web page that isn't a blog would probably be best for this sort of thing. Dmcq (talk) 09:35, 13 March 2013 (UTC)
isolation transformer
i want to know the advantages of isolation transformer .......n what type of insulation is used to protect the isolation transformer ......and what will be the cost of that transformer ...... and also the applications of that transformer
101.63.138.240 (talk) 16:14, 13 March 2013 (UTC)
12/03/2013
Do all Windows OS employees theoretically start from nothing when hired w.r.t. code base knowledge?
Obviously, any new hire would of course only be hired because they had knowledge of operating system concepts and have strong C and C++ skills, but unlike Unix and Linux, where anyone can easily have much experience the actual kernel code in place and could hit the ground running if hired into an OS developer position, since Windows is closed source, do new hires at Microsoft to work in their operating system divisions who have never worked at Microsoft before, have to get internal training to get up to speed on the code base? Is it known if there are formal company classes for the OS code base that , or are such things as unknown to non-employees as the source code itself? 20.137.2.50 (talk) 18:28, 13 March 2013 (UTC)
- You can still read windows PE and kernel documentation. 181.50.189.108 (talk) 22:33, 13 March 2013 (UTC)
- You can take a look at job requirements for kernel layer software developers at Microsoft's Careers website. (Search, for example, using the single key-word "kernel"). For these sorts of jobs, Microsoft and other companies recruit experienced professionals who know a lot about low-level software; who have industry experience in C and C++, and who are good communicators and excellent programmers. That skill-set is independent of direct experience with a specific representation of low-level software. If you write low-level system software, you will very quickly become operating-system agnostic. Familiarity with APIs might help, but the ramp-up time on an API is usually just a few days to develop effective fluency. It is the problem-solving strategies and the software engineering methodology that requires years to develop; and those skills are portable between platforms. Nimur (talk) 01:47, 14 March 2013 (UTC)
Copy pasting without html markup
I find myself often copy/pasting text from/to form fields and websites. It seems that sometimes (always?), even though, both the copied and pasted text looks normal to me, in fact it contains html/css markup. This is quite annoying to me as I only care about the actual text, not about the markup. Is there a way to switch off this feature? I am using firefox and chrome (iceweasel/chromium) most of the time. I noticed that chrome has an option "paste as plain text" which is what I want, but could this be made permanent (e.g. bound to Ctrl-v )? Also, does this only happen with copying from form fields? bamse (talk) 20:42, 13 March 2013 (UTC)
- For Firefox, perhaps this addon will help you. -- Finlay McWalterჷTalk 22:13, 13 March 2013 (UTC)
- What I do, is to copy it to a text editor like notepad, and copy it again. — Preceding unsigned comment added by 181.50.189.108 (talk) 22:39, 13 March 2013 (UTC)
March 14
Sign language annotation for sound files
For File:Sextortionagent_interview.ogg I was wondering if the software supports a sign language annotation for the sound files, indicating what signing would be done if one used American Sign Language. I think that having sign language for audio files could be another way to add support for deaf users (some instructional videos and news broadcasts use sign language) WhisperToMe (talk) 08:01, 14 March 2013 (UTC)
- That seems unnecessarily complicated. I guess there could be better encouragement and support for linking to a transcript if it exists when a sound file is referred to, in this case there is a transcript at File:Sextortionagent_interview.ogg#Introduction and transcript (original English). The place to put an idea like that would be I'd guess WP:VPR. Dmcq (talk) 09:46, 14 March 2013 (UTC)
- Alright, I'll use the village pump. Yeah, there are some videos that use sign language instead of subtitles even though subtitles seem simpler... WhisperToMe (talk) 14:16, 14 March 2013 (UTC)
motion detection for computers
how would I go about setting up a program to detect motion through a web-cam or similar and use that to control the movement of my computer's mouse pointer? and would I need any more advanced hardware or would my current cheap, simple camera be good enough to interpret 2D gestures across the screen?
Kitutal (talk) 13:01, 14 March 2013 (UTC)
- Computer vision is not an easy problem, and there are no "cookbook" solutions. There aren't a lot of great software programs that work "out of the box," either.; though there are plenty of tools. You can make this problem a little bit less insurmountable by:
- using an existing high-level language like MATLAB, or a powerful API, like OpenCV, to abstract implementation details so you can focus on algorithms
- simplifying your scene - by using controlled scenes, good lighting, and high-quality cameras, or using standard tricks like brightly- and uniquely-colored targets with simple geometries.
- Here's a link to lecture notes from Introduction to Computer Vision at Stanford. A few years ago, some teams made a "Kinect"-style motion tracker for the class project. I'll see if I can dig up a video or paper. Nimur (talk) 14:58, 14 March 2013 (UTC)
- Are you asking about finding an existing program, or writing your own ? In either case, I'd be sure to have a sensitivity setting. For some applications, like turning on lights for 5 minutes when motion is detected, a low threshold is fine, while for other applications, like sounding an alarm, that would be bad. StuRat (talk) 15:38, 14 March 2013 (UTC)
- Another link, "Introduction to Computer Vision", which has more of its lecture-notes available to the general public. Nimur (talk) 17:29, 14 March 2013 (UTC)
- I was hoping for some existing software and/or hardware, otherwise I would need to look up some idea of how to go about creating the stuff myself, or so I can show friends what to do to help. I thought it best to rig up something simple that didn't work wonderfully and attempt to refine that through various methods, including better programming, better camera and the tricks mentioned above, rather than trying to do the whole thing perfectly first time around. Kitutal (talk) 12:06, 15 March 2013 (UTC)
casses
is there any computing classes on the shanill road belast 13 — Preceding unsigned comment added by 62.253.58.255 (talk) 15:40, 14 March 2013 (UTC)
- Belfast Metropolitan College has ICT classes which are held at various campuses around the city, including Chichester Avenue and Whiterock Road. -- Finlay McWalterჷTalk 15:49, 14 March 2013 (UTC)
Why can't you root iOS?
I have an Android and I have come to appreciate the great community involvement in the project in creating custom ROMs that are often much faster and feature packed than both Stock Android and various skins such as Touchwiz. If I understand correctly, the reason that there are no custom ROMs for iOS is because you can't root the devices? Is this purely a technical reason in the sense that developers have been unable to root the phone?
Would it be safe to say that if Apple opens up the phone and allows third party ROMs that there can be a lot of speed and performance improvements from third party devs like Android? Acceptable (talk) 16:15, 14 March 2013 (UTC)
- A fully jailbroken iOS device allows the user the same totality of control that a rooted Android phone does, so the premise of your question is false. As a practical matter, developing an alternate firmware to run on an iOS device is much harder than for Android, because much of the software on a typical Android phone is open source and so available for re-compilation and alteration, whereas essentially none of iOS is. Perverse as it may seem, it's possible to run Android on jailbroken iOS hardware: see e.g. http://www.idroidproject.org, although that port isn't complete yet. -- Finlay McWalterჷTalk 16:45, 14 March 2013 (UTC)
- Why can't developers just "hack" the non-open source software of iOS? My understanding of operating systems is limited, but is it not just a bunch of files? If it's because the OS prevents users from editing these files, can developers not just brute force or break the encryption or something? Or is this too technically challenging to do? I guess, in other words, if I bought an iPhone, isn't the code and all the files for the operating system already on my device? Acceptable (talk) 22:42, 14 March 2013 (UTC)
- Jailbreaking breaks the encryption. But iOS, and its associated apps, is chiefly written in Objective-C (with some C), a compiled language. So what's on the phone is a bunch of Mach-O format binary executables, where the readable Objective C code has been compiled into thoroughly unreadable machine code. Patching that is a hideously laborious process, and decompilers produce fairly horrible results that aren't much better. Beyond removing some of iOS's security features, it's not worth the bother exploring all its depths. -- Finlay McWalterჷTalk 22:54, 14 March 2013 (UTC)
- Oh I see, is this similar to Adobe Flash whereby the files that you edit on is the .FLA while the compiled version is the .SWF? Theoretically, would it be possible for an Apple engineer (who isn't afraid to be sued) to just load all the master files onto a USB and upload it on the Internet? Acceptable (talk) 22:59, 14 March 2013 (UTC)
- Yes, and yes. -- Finlay McWalterჷTalk 23:06, 14 March 2013 (UTC)
- I have a sneaking suspicion that even if the source code and tools and instructions necessary to engineer an operating system were all made available at no charge and with a fairly liberal license, very few people would actually use them. It probably wouldn't even light up the front pages of the rumor-mill websites if such material was surreptitiously leaked to the internet in a place nobody would look. This is probably because, while "jailbreaking" is frightfully exciting, actually programming at the lower levels of an operating systems is very boring. But, I don't know that much about programming iPhones; perhaps somebody might come along and correct me. Nimur (talk) 03:45, 15 March 2013 (UTC)
- Uh, okay. So the only specific page you linked describes how to build clang, which is a compiler. Which is a useful thing to have, I suppose, if you're going to try to recreate an entire operating system from scratch, but... -- BenRG (talk) 04:23, 15 March 2013 (UTC)
- I have a sneaking suspicion that even if the source code and tools and instructions necessary to engineer an operating system were all made available at no charge and with a fairly liberal license, very few people would actually use them. It probably wouldn't even light up the front pages of the rumor-mill websites if such material was surreptitiously leaked to the internet in a place nobody would look. This is probably because, while "jailbreaking" is frightfully exciting, actually programming at the lower levels of an operating systems is very boring. But, I don't know that much about programming iPhones; perhaps somebody might come along and correct me. Nimur (talk) 03:45, 15 March 2013 (UTC)
- Yes, and yes. -- Finlay McWalterჷTalk 23:06, 14 March 2013 (UTC)
- I think Nimur is trying to assert that because Apple has released the Darwin kernel source code, the fact there is only limited interest in this demonstrates most people have little interest in the source code. However many would suggest the more likely interpretation is that a kernel does not make an operating system and with the large number of *nix kernels out there (including the ones Darwin was partially based on), it's not particularly surprising that few people were interested in remaking an operating system from the what Apple released (when they felt like it) as OpenDarwin and PureDarwin have shown. In any case, I don't get the relevance of this the OP's question. The OP's question was not why doesn't someone make a new OS for iOS devices (which a operating system based solely on the Darwin kernel would be) but why don't people customise iOS (the existing OS) as much as Android. The fact they can't easily do so because Apple has not released the source code for the operating system remains true whatever bits Apple have released. In fact, AFAIK, the amount of source code available for the iOS builds are minimal (our own article says 'except for the ARM variant, which has not been released in any form separately from iOS'), not even close to the whole kernel, hardware support etc. The fact it's a fork of something that has been partially released isn't likely to help much. I strongly suspect the Android option FM mentioned is still potentially far easier then trying something with what Apple released. And there's no particular reason why they'd want to, few people think there's something particularly revolutionary about the Darwin kernel, it's all the interesting bits of iOS that Apple did not release that people care much more about. (Of course one of Nimur's assertations is probably correct, there is little interest in doing much low level programming of the operating system but as the OP's original question has shown. There is a fair amount of interest in customising it in various ways as the very large number of highly custom Android firmware mods have shown. In fact many of those cases where e.g. sometimes the developers have had to at least partially reimplement hardware support due to the company not releasing it has shown people are even willing to go down to the nitty gritty when necessary. But as I said earlier, people need a lot more then what Apple released to be able to do this.) Of course when Apple does release something that's useful (whether entirely their own work or not), people may use it as WebKit showed. Nil Einne (talk) 07:22, 15 March 2013 (UTC)
- Nil, have a paragraph break, on me: ¶. :-) StuRat (talk) 14:55, 15 March 2013 (UTC)
Windows 7 Shutdown Strategy
I'm looking for a way to use the shutting down of my laptop to enforce a solid sleep schedule. For a while, I was using a windows scheduled task to start up shutdown.exe /s on a five minute repeat for an hour. This was fine until I realized I the task could be disabled. I am currently trying out the 30 minute random delay, however that degree of variation is not ideal, and it would be better if it were narrower.
Ideally, I'd like to be able to have a scheduled log off time at night that can only be edited during the morning/day, though I don't know if windows or any other program would have that functionality. I also briefly considered setting up a "on task creation/modification" trigger to the task, which would likely prevent any changes to the task without getting the intended result, but I am wary of setting up scheduled tasks that I cannot change (such as a shutdown at log on task, I don't know how that would be bypassed). If anyone has experience with this sort of thing or any suggestions, I would greatly appreciate it. Thanks. Sazea (talk) 16:23, 14 March 2013 (UTC)
- I'm not entirely sure I understand what you're trying to achieve. It sounds like you're trying to set things up so that the computer will shut off at night (so you're not awake until 4am playing Skyrim or something), and you're worried that your 4am self will just disable the software your daytime self has installed? The trouble is that it's the same administrative permissions you need to install software like this as you need to uninstall or disable it. The best you can do is set yourself up as a non-admin account, setup the schedule as admin, and then have some other person change the admin password so that they know it and you don't. You're probably better off with some sleep-cycle management software, if this is a real problem for you (I know people who use SleepCycle on iOS, but I've no personal experience of it). -- Finlay McWalterჷTalk 16:54, 14 March 2013 (UTC)
- Computer solutions may not get at the root of the problem, which is why you aren't sleepy enough to want to go to sleep when you should. I suggest eliminating all caffeine after noon (or ideally eliminate it completely) and doing some heavy exercise about an hour before bedtime. Also, avoid computer games where you are penalized for signing off (say if competitors who stay online rank up and you don't). StuRat (talk) 17:16, 14 March 2013 (UTC)
why should we pass object of the class implemented from runnable to constructor of thread class?
Hi my doubt is in java. My doubt is on creating thread by implementing runnable interface. Please see the below programme.
- In below programme I have implemented the class countdowneven from Runnable.
- In main method I am passing the object of countdown even to constructor of thread class.
- Why should we pass the object of countdowneven to constructor of thread class?
- What operations will be performed by Thread class constructor on object of countdowneven?
.
class thread
{
public static void main(String args[ ])
{
Thread ce=new Thread (new countdowneven());
ce.start();
}
}
class countdowneven implements Runnable
{
public void run()
{
for(int i=10;i>1;i=i-2)
{
System.out.println(i);
}
}
}
Output:
10
8
6
4
2
— Preceding unsigned comment added by Phanihup (talk • contribs) 18:38, 14 March 2013 (UTC)
- We don't do homework for you, sorry. Those are clearly homework questions. Would you like to know more about Threads? If you're specifically wanting to figure out threads in java, I recomend reading the documentation in the java SDK i kan reed (talk) 19:12, 14 March 2013 (UTC)
Launching the wrong browser
Evert time I have tried to launch Google Chrome in about the last week, my laptop launches IE instead. This applies to all short-cuts, icons, files and lauching it directly from the C:// drive. I eventually got it to launch by running Chrome as an administrator. How can I fix this?--Gilderien Chat|List of good deeds 19:02, 14 March 2013 (UTC)
- How are you starting Chrome? If it's by clicking on a .html file, or entering a URL in the start box, then Windows will run the default browser. There should be an option in Chrome to make it check if it is the default. and if not, make it, it. Unfortunately, I don't use Chrome, so I don't know where the option is. CS Miller (talk) 21:10, 14 March 2013 (UTC)
- I'm clicking on the Chrome icon, and it is my default browser.--Gilderien Chat|List of good deeds 22:35, 14 March 2013 (UTC)
- There has been some suggestion on other sites that it is likely malware. This link recommends running malware bytes (www.malwarebytes.org/). Sazea (talk) 23:34, 15 March 2013 (UTC)
- Ok thank you. McAffee seems to have removed it when I ran a full and intensive scan, reporting 5 trojans as part of it. Not really sure how the writer would gain from writing that but anyway ... --Gilderien Chat|List of good deeds 23:49, 15 March 2013 (UTC)
- There has been some suggestion on other sites that it is likely malware. This link recommends running malware bytes (www.malwarebytes.org/). Sazea (talk) 23:34, 15 March 2013 (UTC)
- I'm clicking on the Chrome icon, and it is my default browser.--Gilderien Chat|List of good deeds 22:35, 14 March 2013 (UTC)
March 15
Modelling software
Hi,
I'm looking for some software to do basic modelling of intracellular processes. This is exactly what I want, but it crashes and the functions don't work, so I'm hoping there's something else out there you can point me too. I'd like to be able to define objects (maybe 10), and define interactions between these objects which occur if they happen to react with each other, generating new objects, which can then interact with more objects. Can anyone help?
Cheers
Aaadddaaammm (talk) 04:38, 15 March 2013 (UTC)
- Sounds a lot like Conway's Game of Life. You might want to search for versions of that.
- Also, what are your exact requirements. Do you need an animation as output ? If so, would ASCII text be OK, or do you need actual graphics ? What type of interactions would be allowed ? For example: one kills the other, one eats the other (then splits in two), both kill each other, they bind together, they bounce off each other, or they reproduce to make a third ? Also, what happens if three or more meet, and what does one alone do (change direction, grow and reproduce, change into a different type, die of old age, etc.) ? And how big should the grid be (and is it 2D or 3D) ? StuRat (talk) 04:43, 15 March 2013 (UTC)
- Um, Game of Life is about cellular automata. This has nothing to do with real-life, biological intracellular processes. I think the OP is pretty clear about what he wants the software to do — model actual biological processes. --Mr.98 (talk) 13:56, 15 March 2013 (UTC)
- Did you read the link he provided ? That seems a lot like the Game of Life, particularly that bit about each object moving "North, Northeast, East, Southeast, South, Southwest, West and Northwest". That doesn't sound like real biology. Either does defining 10 objects. You'd want thousands, at the least, to simulate a real system, and they'd need to move in 3D, along any vector, not just the 8 compass directions in a plane. StuRat (talk) 14:48, 15 March 2013 (UTC)
Thanks guys, you're right the thing I'm after is similar to the Game of Life, although more complex. GoL has only 2 states for each position - I'm looking for something with up to 10 states, and these states interact differently with each other. Specifically, I'd like A+B->A+B+C, and D+E->D. And in terms of output, I'm pretty flexible - graphical, data on component concentration vs time, whatever. Aaadddaaammm (talk) 01:27, 16 March 2013 (UTC)
- Sounds simple enough to write, if you can't find one already out there. To clarify, is this what you mean ?
- "A+B -> A+B+C" means when A and B are on adjacent grid squares, they reproduce, producing C on a third square adjacent to both A and B.
- "D+E -> D" means when D is on an adjacent square to E, D kills E.
- 1) What are the other rules ?
- 2) How many total organisms, of all 10 types, are allowed ?
- 3) What's the maximum grid size ?
- 4) Do you want organisms which hit the edge of the grid to disappear, bounce off, or wrap to the opposite edge ?
- 5) Do organisms only move 1 grid space per turn, in one of the 8 random compass directions, or can they move at variable speeds ?
- 6) Can a maximum of one organism occupy a given grid square at a time ? StuRat (talk) 03:55, 16 March 2013 (UTC)
Difficulty signing posts
Please be gentle. I can't work out why my posts show as "— Preceding unsigned comment added by Hayttom (talk • contribs)". I'm logged in. I conclude with four tildes. What am I doing wrongly? Your Username 12:28, 15 March 2013 (UTC) — Preceding unsigned comment added by Hayttom (talk • contribs)
- It looks like you have messed up your signature in your user preferences (see Preferences link at the top of any page) so it no longer points to your page. Also help type questions like this should go to one of the help pages, see help in the left column - in particular WP:Help desk. Dmcq (talk) 12:57, 15 March 2013 (UTC)
- Thanks for both points. Hayttom 13:20, 15 March 2013 (UTC)
Firefox redirecting despite two options set not to
I was fiddling around trying to view source for [3] and get immediately redirected to [4] despite having current Firefox advanced option "warn me when websites try to redirect or reload..." and having NoScript set to block meta redirects on untrusted sites. What trick are they using?
Extra credit: This particular newspaper seems to have gotten extremely aggressive about trying to get people to run their crummy scripts, and I'd welcome if someone chased down the "real" URL for this example that contains the actual text in its HTML source. (Mostly I want to know how to do it myself though) Wnt (talk) 16:32, 15 March 2013 (UTC)
- There is no source for the first URL: the server sends an HTTP 301 "moved permanently" response containing the second URL. So the browser is doing the only thing it can. -- Finlay McWalterჷTalk 16:39, 15 March 2013 (UTC)
- Doesn't this defeat the whole point of these options, which I thought was to warn you before you got sent to some site you don't trust? Wnt (talk) 18:43, 15 March 2013 (UTC)
- A "meta redirect" is a <meta> tag within the HTML source. Judging by the name of the NoScript option, it only blocks those. The Firefox option you set also only blocks those. The redirect you got came directly from the web server, not from a <meta> tag. I don't know why the options are set up that way, but it may be because anyone who can manipulate the web server responses can deliver arbitrary data to you anyway from the original URL, so blocking redirects wouldn't help. -- BenRG (talk) 19:15, 15 March 2013 (UTC)
- noscript selectively blocks JavaScript, Java, and Flash. They can cause a pseudo-redirect by change the DOM property window.location. As these aren't used in this case, this extension doesn't apply here either. -- Finlay McWalterჷTalk 01:03, 16 March 2013 (UTC)
- Re your extra credit: The second link you provided (the address after redirection) does contain the text of the short four-paragraph article in its source, but not the text of the comments.
- If you wanted the text of the article, it is indeed in the source. In addition, you can also go to the printable version (click the Print link which adds ?print=1 to the end of the address). This reduces the page to the article text and nothing else, which will make it much easier to see the article text in the source.
- If you wanted the source of the comments, I found them at the following address: http://echoapi.wpdigital.net/v1/search? [...long parameter list], but the content isn't HTML, I believe it's JSON data.
- To find this address, I started a small proxy server utility on my computer and turned on my browser's proxy setting to point to the proxy server. I cleared the browser cache (to ensure the browser had to reload everything), started the proxy server's log, the reloaded the page in the browser. From the proxy server log, I assembled every address the browser requested. Then I looked through the addresses and visited a few interesting ones until I found where the comments were loaded from.
- Can you explain more about why you wanted to "chase down the real URL that contains the actual text in its HTML source"? I can't tell if my information above is helpful for what you wanted to do. --Bavi H (talk) 02:32, 16 March 2013 (UTC)
Taking a UK phone to NZ
I wanted some unbiased advice! I have a mobile phone in the UK on the ‘3’ network. I would like to take the phone to New Zealand with me later this year. If I have the phone unlocked, will a SIM card bought in NZ work or will I have to set up ‘international roaming’ beforehand? I would ask customer services but I suspect they’ll tell me to do the most expensive option! Thanks a lot to anyone who can help! RichYPE (talk) 16:55, 15 March 2013 (UTC)
For the record, this is the SIM I am considering buying http://www.0044.co.uk/new-zealand/sim-card.htm
Once again thanks to anyone who can help! RichYPE (talk) 17:17, 15 March 2013 (UTC)
- You seem to be getting mixed up. 'Roaming' is what happens when you take your UK SIM abroad with you. If you are using an NZ SIM you will be treated as a domestic NZ user, and charged whatever price the network whose SIM you are using decide. There would be no roaming involved.
- Whilst the SIM you linked to should work fine, it seems a tad expensive at £19.99 with only $1 credit - a $20 NZ SIM would give you $20 credit. Personally, I would suggest waiting until you are in New Zealand and buying a $20 prepay (pay-as-you-go) SIM there, although you might want to research beforehand which plan is best for you, especially if you are planning on making calls back to the UK. A very brief Google search showed me three operators you might want to check out: Vodafone, 2degrees and TelecomNZ.
- However, DO make sure your phone is unlocked first, otherwise you won't be able to use any SIM other than your current one. Best thing to do is find a friend (in the UK) on another network and borrow their SIM. If you can make a call using it, your phone is unlocked. If you can't, take it down to one of those dodgy so-and-sos on the market and get it done for a tenner. - Cucumber Mike (talk) 18:26, 15 March 2013 (UTC)
- How long will you be visiting NZ ? One option is to bring your cell phone with you, but don't use it there, except for looking up phone numbers, etc. Instead, buy a local, basic prepaid cell phone when you arrive, and use that during your stay. I can't say what those cost in NZ, but here in Detroit that would cost about US$20 for 30 days/180 minutes. That sounds a lot easier and less risky than messing with SIM cards, to me. StuRat (talk) 08:43, 16 March 2013 (UTC)
Are there ways to make my browser automatically redirect a page?
For example, every time I go on the wikipedia.org page, make my browser automatically redirect to en.wikipedia.org. (I know I can just type 'en.' instead, but this is just an example). Kinkreet~♥moshi moshi♥~ 18:11, 15 March 2013 (UTC)
- What browser are you using? You can set up a keyword in Firefox, for example. So if you want to go to yahoo.com, you would set up a keyword for a bookmark of the Yahoo home page. The keyword would simply be yahoo and you wouldn't have to type the .com part. Or, using your example, you could use www.wikipedia.org as the keyword and it would go to en. This depends on you setting up several keywords for each bookmark though. Dismas|(talk) 18:47, 15 March 2013 (UTC)
Is it possible to record TV with the Elgato Game Capture HD device?
This device is usually used for recording Xbox 360 or PlayStation 3 gameplay, but I was wondering if I could use it to record HD television. Nicholasprado (talk) 18:32, 15 March 2013 (UTC)
- Without finding a reference I can't say for definite, but I'm going for an almost-certain 'No, you can't use it to record HD television'. The box has an HDMI input, but cannot decrypt HDCP - thus it can take the input from an XBox, but not from a cable decoder or similar. It apparently also has an S-Video port, so if you have a decoder with such an output, you could use that, but it won't be HD. If you only have HDMI-out on your device, but would like to use the S-Video port, you can get an HDMI S-Video converter, but they are expensive and you still won't get an HD signal. - Cucumber Mike (talk) 18:38, 15 March 2013 (UTC)
- Having said that, I just found this. So, if you can find something to do the decoding for you (an Apple TV in this case) then you can do what you're asking. - Cucumber Mike (talk) 18:40, 15 March 2013 (UTC)
Smartphone app notifications
If you log out of an app like facebook on a smartphone, will it still give you alerts and notifications like if you leave it logged in? Clover345 (talk) 19:22, 15 March 2013 (UTC)
Displaying only a specific string in a NET VIEW
In an attempt to view the list of printers from a server I remember one of my colleagues using NET VIEW and a specific command that only listed that strings he asked for. The command was something like " net view \\(server) find:"##" ", but now when I try it, it doesn't work. Unfortunately, said colleague is not present thus I can't ask him. Can anyone help? -- 143.85.199.242 (talk) 22:39, 15 March 2013 (UTC)
- You were almost there - if you put a pipe character between the net command, and the find command like this:
net view \\computername | find "string to search for"
- you may also wish to add a " /i" after the "find" to make the search case-insensitive. Cheers, davidprior t/c 22:49, 15 March 2013 (UTC)
- It worked! Thank you so much! -- 143.85.199.242 (talk) 22:57, 15 March 2013 (UTC)
March 16
USB2 drive faster on USB3 port
I've tested writing to a USB2 external hard drive while connected to a USB2 port and a USB3 port. It is about 16% faster on a USB3 port. Why is that? Bubba73 You talkin' to me?
- That's an interesting observation. What are you using for the benchmark? A significant difference between the USB2 and USB3 protocols is that the latter has a lot more pipes and slots; they're briefly described in this document. Obviously with a USB2 drive, that alone doesn't help, as the host controller has to fall back on the USB2 protocol. But it does mean that the driver can use more space (essentially more and/or longer queues) within the host controller itself; it may be that this is allowing it to use smart features like Native Command Queuing better, giving a higher effective throughput. A second, perhaps more prosaic, possibility is simply that the driver for the USB2 path is older and rather conservative, and in writing the USB3 driver (where they had to rewrite that pipe and slot stuff anyway) they did a smarter, more aggressive, job of scheduling the IO, producing the more efficient use you're seeing. -- Finlay McWalterჷTalk 02:55, 16 March 2013 (UTC)
- I wrote a program to test all of my drives. It writes 1MB blocks to a file repeatedly, for 15 seconds, then calculates the rate. Just out of curiosity, I switched the USB2 external HD to a USB3 port, and it was faster. I've switched back and forth and run it several times, and it is consistently about 16% faster when plugged into the USB3 port, compared to USB2. Bubba73 You talkin' to me? 04:18, 16 March 2013 (UTC)
- You're may be better off with a longer time (so much more data); particularly if the drives are configured for write-behind then you risk the results of the benchmark being confused by different caching behaviour throughout the USB3 stack. Ideally you wouldn't be writing to files either (in case the file system too has some confounding effect), but to the physical disk surface instead. That's trivial on Linux and BSD (and I guess on OS-X), and possible (but increasingly difficult) on Windows (note that this will destroy partitions and data on that disk). -- Finlay McWalterჷTalk 04:33, 16 March 2013 (UTC)
- It's not much different on Windows than on Linux. paths like \\?\Device\HarddiskVolume1 are the equivalent of /dev/hda1, and you can pass them to dd for Windows. Obviously you should be really careful if you do this on any OS. The "increasingly difficult" article seems to be about a mechanism to prevent writing to a disk region that's also mounted as a filesystem, which seems like a good idea to me. You should unmount any filesystems before clobbering them (by removing the drive letter in Disk Manager). -- BenRG (talk) 05:27, 16 March 2013 (UTC)
- What would the question mark in \\?\Device\HarddiskVolume1 typically need to be substituted with? --NorwegianBlue talk 09:51, 16 March 2013 (UTC)
- It's not much different on Windows than on Linux. paths like \\?\Device\HarddiskVolume1 are the equivalent of /dev/hda1, and you can pass them to dd for Windows. Obviously you should be really careful if you do this on any OS. The "increasingly difficult" article seems to be about a mechanism to prevent writing to a disk region that's also mounted as a filesystem, which seems like a good idea to me. You should unmount any filesystems before clobbering them (by removing the drive letter in Disk Manager). -- BenRG (talk) 05:27, 16 March 2013 (UTC)
- You're may be better off with a longer time (so much more data); particularly if the drives are configured for write-behind then you risk the results of the benchmark being confused by different caching behaviour throughout the USB3 stack. Ideally you wouldn't be writing to files either (in case the file system too has some confounding effect), but to the physical disk surface instead. That's trivial on Linux and BSD (and I guess on OS-X), and possible (but increasingly difficult) on Windows (note that this will destroy partitions and data on that disk). -- Finlay McWalterჷTalk 04:33, 16 March 2013 (UTC)
I checked my program for errors and found none. I reran it, testing for 300 seconds on each of USB2 and USB3. On USB3 it was 16.8% faster. Then I thought that maybe I should test the same size of file, so I did 1000MB, and USB3 was 16.0% faster. Bubba73 You talkin' to me? 16:18, 16 March 2013 (UTC)
- This implies that your file I/O bottleneck is not the speed limitation of the USB2.0 protocol, but is in fact an implementation-specific speed limitation somewhere else in your system. To prove this, calculate your data transfer speed, and determine if your USB drive is meeting the theoretical maximum data transfer speed for USB2.0 - 480 Mbits/sec. If you are not hitting this peak - why not? We can enumerate hundreds of reasons, ranging from software to hardware to signal-integrity problems. But it will all be speculation unless you can prove and isolate the root-cause for your drive operating below peak speed. Next, measure your USB2.0 drive connected to the USB3.0 port. Is it performing at the peak theoretical USB2.0 specification, or is it mysteriously outperforming its specification by operating in a non-standard way? We can enumerate hundreds more reasons that could be responsible, from vendor-specific protocol extensions to mislabeled marketing-ese. Prove this by collecting data using a USB protocol analyzer. Colleagues recommend the Beagle USB analyzer because it is cheap and easy, although I have no experience with it. If you have a large budget for this investigation, I recommend the USB analysis suite for your LeCroy scope. (It can also analyze USB3.0).
- From what we currently have, all we can say is that your USB3.0 port can yield higher performance - even at USB2.0 speeds - than your USB2.0 port. Your system may use a higher-performance software- or hardware- path to your USB3.0 port, even when it is communicating using the USB2.0 protocol. Nimur (talk) 18:12, 16 March 2013 (UTC)
- Are you using other USB devices on the same machine? My understanding is that frequently when there are multiple USB ports on a computer you effectively have the equivalent of a USB hub in your computer. So while you may have 5+ ports on the machine, they're all multiplexed into a single connection, so you don't actually get 5+ times the bandwidth. If you have other devices active, you'll never get the full USB2.0 data transfer rate, because the have to share. On the other hand, a USB3.0 system will by necessity have a higher bandwidth connection to the processor, so you'll be able to max out the 2.0 protocol bandwidth while still having room for the other devices attached to the computer, even if they're all USB2.0 -- 71.35.100.68 (talk) 19:20, 16 March 2013 (UTC)
Algorithms Hacking
I think Donald Knuth is the greatest living authority on Algorithms in this planet. I am curious to know that if the so called "Hackers" like Kevin Mitnick or Kevin Poulsen or others have greater knowledge than Donald Knuth. And if advanced Computer Science and Algorithms are necessary to be a security expert like Kevin Mitnick or Julian Assange. Solomon7968 (talk) 15:05, 16 March 2013 (UTC)
- Both Assange and Mitnick used subterfuge, primarily; they did not design algorithms to circumvent computer-security systems. I don't recall any interviews where either person specifically mentioned Knuth, but they both have espoused free software and its associated culture in numerous interviews. Nimur (talk) 15:31, 16 March 2013 (UTC)
My speestream is diconnecting alot, what can be the problem?
My speestream internet modem (some example pic of the modem I found: http://www.weeta.net/reseau/free-adsl-efficient-networks-speedstream-5200/images/speedstream-5200-1024-01.jpg) is diconnecting alot, what can be the problem? Right now he is disconnecting almost every 2 minutes, but some days it take 1.5 hours to disconnect.201.78.129.104 (talk) 16:41, 16 March 2013 (UTC)