Jump to content

Wikipedia:Reference desk/Archives/Computing/2013 December 6

From Wikipedia, the free encyclopedia
Computing desk
< December 5 << Nov | December | Jan >> December 7 >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


December 6

[edit]

Computers without CD drives?

[edit]

I've just learned that I need to buy a new computer, so I'm looking around at different websites and in different stores. To my surprise, Best Buy has lots of laptops (link, though it may not be persistent) marked "Note: DVD/CD drive not included", including some with higher-than-average prices. Why would anyone make a computer without a CD drive today? These definitely aren't used 1990s laptops. Nyttend backup (talk) 02:06, 6 December 2013 (UTC)[reply]

Laptops can be thinner and lighter without an optical drive, and many can get by without the drive. See for example the Google search laptop without optical drive. You can connect an external optical drive to a USB port when you need it, or you may be able to use an internal optical drive on another computer and copy what you need to the laptop, for example via a USB flash drive. PrimeHunter (talk) 03:16, 6 December 2013 (UTC)[reply]
Most, if not all, PC software is available as a download. I still buy retail games and software, so I prefer the drive, but I certainly don't need one since everything I want is available elsewhere. Mingmingla (talk) 03:27, 6 December 2013 (UTC)[reply]
I concur with PrimeHunter and Mingmingla. I can't remember the last time I used an optical drive on my laptop. Games I get from Steam. As far as I can tell, having a CD drive is like having a floppy drive, or a brick in your rucksack. Dja1979 (talk) 05:25, 6 December 2013 (UTC)[reply]
The options are wide open these days: You can download movies and software from the Internet. You can use a USB memory stick. You can buy an external DVD drive that plugs into the USB port. All of those things are cheap and easy these days - so the DVD drive is heading the way of the floppy drive. Omitting it saves money, makes the laptop lighter and thinner, improves reliability, makes it more splash-resistant. An external USB writeable DVD drive can be purchased for $26 (eg here) and this one costs $30 and has BluRay support too! So it's hardly a big deal to add an optical drive afterwards if you need it. Better still, your external USB drive will still be useful into the distant future. SteveBaker (talk) 06:47, 6 December 2013 (UTC)[reply]
In this frightening modern world, how is an OS usually installed? If I bought Windows 8, would I get a disk, or what?  Card Zero  (talk) 11:42, 6 December 2013 (UTC)[reply]
I did mine entirely over the internet. I backed up to USB, then downloaded Win 8 straight onto teh hard drive and ran the update from there. Never went to a shop, never saw a disc. Mingmingla (talk) 23:06, 6 December 2013 (UTC)[reply]
The standard procedure for new computers is for the operating system to be cloned as an image onto the hard drive, along with all the necessary drivers. This is done with permission (usually) from Microsoft (I don't know Apple's procedures) with a unique identifier if the computer is to be sold, and "cab" files are sometimes included (for additional drivers etc) if the computer is unlikely to have internet access. Updates and extra drivers are usually downloaded by the purchaser from Microsoft's website or Apple etc). If you buy an operating system, you still usually get a CD, though you might just get a unique identifier to activate a download over the internet. The CD is not essential. For a computer with a wiped hard drive, it is possible to boot an OS from a flash drive (see Windows Preinstallation Environment), and download a better or updated OS over the internet. I remember (in the old days) installing Windows from floppies (and later from CDs) on a series of computers, but it was a very time-consuming process. Not something that modern retailers want to be bothered with. Dbfirs 12:38, 6 December 2013 (UTC)[reply]
For Windows, the best advice would probably be to buy that $26 external USB DVD drive and boot from that. For Linux, you make a bootable USB memory stick with a simple version of Linux on it - boot from that, then it pulls in the rest of the OS over the web and installs it onto the hard drive. Easy! Most laptops have a hidden disk partition with a backed up version of Windows on it to restore from in the event of catastrophic problems. SteveBaker (talk) 16:36, 6 December 2013 (UTC)[reply]
Given an ISO file of the install media (which Microsoft offers as a download if you buy Windows online), you can use this Microsoft tool [1] to make a bootable DVD disc or USB drive. Katie R (talk) 20:44, 6 December 2013 (UTC)[reply]

declare a dynamic array of characters n of size 100 [in C]

[edit]

what the hell does that mean? i did

char n[ 100 ];

but this was wrong, obviously. this was a question on a test on C programming. i dont know the correct answer, do i need to malloc something? or do:

#define SIZE 100
char n[ SIZE ];

???Pop8888888 (talk) 02:15, 6 December 2013 (UTC)[reply]

That's not dynamic. Here's how to declare a dynamic array:
char *n = malloc (100 * sizeof (char));
"sizeof (char)" could be omitted since it is equal to 1, but I include it because it's good practice. Looie496 (talk) 02:21, 6 December 2013 (UTC)[reply]
thank you! Pop8888888 (talk) 02:37, 6 December 2013 (UTC)[reply]
I added a space between "*" and "sizeof" for clarity. It works either way, but it does look a bit confusing without the space (the first * is the pointer symbol in C, but the second * is the ordinary multiplication symbol). - ¡Ouch! (hurt me / more pain) 06:32, 9 December 2013 (UTC)[reply]

Creating decks in a game of War in Java

[edit]

I have a Card class and a Deck class. Each card has a suit and a rank. Now I'm trying to make the game of War play out on my computer. I'm rather new to Java and I have a few lines of code that are each different but Eclipse isn't throwing up a warning or error on any of the lines. They're all slightly different and I'm not sure what I'm doing right/wrong with each. Could you explain, please? The lines are:

Deck playerTwo = Deck;

Deck playerOneDiscard = new Deck[52];

Deck[] playerTwoDiscard = new Deck[52];

Thanks, Dismas|(talk) 08:38, 6 December 2013 (UTC)[reply]

In the first line, you are using the class name itself as an expression. That's a syntax error. In the second line, you are assigning an expression of type Deck[] to a variable of type Deck, which is incompatible. The third line is OK. The variable playerTwoDiscard now refers to an array of 52 Deck object references, all of which are so far null. To actually create the Deck objects, you need to call the class's constructor, like so: Deck myDeck = new Deck();, or call a constructor with parameters if you have one. JIP | Talk 10:49, 6 December 2013 (UTC)[reply]
Thank you. Any idea why Eclipse isn't showing any warnings or errors for the first two? Dismas|(talk) 11:12, 6 December 2013 (UTC)[reply]

"Old timey" audio filter

[edit]

What filter is likely used for the Wright Brothers' parts in this video? 75.75.42.89 (talk) 09:50, 6 December 2013 (UTC)[reply]

The voices sound tinny because they have been band-pass filtered with a narrow spectrum. The exact parameters and type of filter are nearly impossible to guess, but it might be common to use 300Hz to 3000Hz with soft roll-off. Other "old timey" effects include adding noise: white noise, popcorn noise (to simulate record scratches), and periodic hums and clicks to simulate a phonograph turntable. To be honest, I didn't watch the video long enough to hear any of those effects. Nimur (talk) 15:43, 6 December 2013 (UTC)[reply]

PC Power supply unit problem.

[edit]

Some pc here was not turning on and the fan of Power supply unit (Lets call is PSU1) and it was not working.

So I decided to get a working Power supply unit that is being used on another pc (lets call PSU2) and put on this new one to test, to see if the problem was the PSU1. The working Power supply unit didnt worked on this new pc.

I decided to get the PSU1 and test it on another pc, to see if it would work there and it didnt worked (so there IS a problem with PSU1).

Anyway what can be the problem with pc1, the working PSU2 dont work there, dont even turn on the fans.

201.78.196.29 (talk) 12:34, 6 December 2013 (UTC)[reply]

It's possible that when PSU1 failed it produced a power surge that damaged things inside the computer. If that happened, there's a good chance that your computer is now a worthless piece of junk. But I wouldn't rule out other possibilities. Looie496 (talk) 16:02, 6 December 2013 (UTC)[reply]
Forgot to add that when I connect PSU2, and conect the network cable, the network lights start to blink.201.78.196.29 (talk) 17:45, 6 December 2013 (UTC)[reply]

can any programming languages brute-force code?

[edit]

Let's say you don't know what expression you want, you just know what asserts it should pass, i.e. you know how you want your expression to behave logically, but don't know how to write it. For simple boolean expressions and the like (no loops and such) couldn't a programming language just brute-force the suitable expression? Do any do this?

Example.

// given integers a return its absolute value

toreturn = ? // compiler or language will brute-force an expression to put here based on the following.

assert (toreturn == a or toreturn == a * -1) and toreturn >= 0

And that's it. This is a childish example of where someone might have a brainfart and have no idea how to calculate the absolute value of an integer, they just know what it looks like: it's positive, and either the original integer or its opposite. (Obviously the answer is simple: you have to multiply by -1 if the input < 0).

Brute-forcing the expression that makes the assert true for all integers is simple - there just aren't that many combinations of expresions, and the IDE/language/compiler should be able to discover the "expression" that makes the given asserts true, at least if it's a dual or quad-core 3 ghz computer also with a GPU, that can try billions of variations quite quickly.

Do any languages or IDE's do this? 212.96.61.236 (talk) 16:00, 6 December 2013 (UTC)[reply]

Not at that level. There are declarative programming languages in which a program is basically a set of assertions about the result, but as far as I know none of them can handle the example you give. Looie496 (talk) 16:11, 6 December 2013 (UTC)[reply]
The problem is that unless you're very careful with your "assert", there could easily be an infinite number of ways to do what you ask. Perhaps in your specific case, it's fairly obvious what you want - but in most cases, your "assert" is likely to be under-constrained. I think that a language like Prolog comes closest to what you want...but I don't think it does exactly that.
SteveBaker (talk) 16:45, 6 December 2013 (UTC)[reply]
There's also genetic programming and evolutionary programming where, given the limitations on what you want it to do, you "evolve" a program to meet those criteria. The drawback is that it can take quite a while to find a program that will meet your criteria, the one you get is unlikely to be very robust outside of the exact conditions for which you've tested, and you're going to be limited in the complexity of the program which you're able to make. -- 162.238.241.136 (talk) 16:42, 7 December 2013 (UTC)[reply]
Yes, evolutionary programming solutions can be rather fragile. I remember hearing about one evolved program, designed on a field programmable gate array which stopped functioning when an "orphan" set of gates were removed (i.e. the gates were not connected to anything else, and were assumed to be a relic from earlier iterations). It turned out that the entire solution relied on inductance effects between the components, including ones that weren't connected to the rest of the system. Equisetum (talk | contributions) 21:01, 8 December 2013 (UTC)[reply]
The trouble with evolved/genetic programs is that you don't know how they work inside - so unless you test them exhaustively, you'll never know whether they are correct. So in the example above, you might test that it gets the correct answer for numbers between -100 and +100 - but how do you know that it'll get the right answer if a=1000 or something?
There are many stories about such systems going wrong - my favorite is of the Japanese subway system that had problems when the station platforms got too full of people. So they installed a set of gates that would shut off access to the platform when it got too full - for safety reasons. They used a "neural network" (which you train in an evolutionary kind of way) and a bunch of cameras to look at the platform and shut the gates when needed. To train the system, they showed it thousands of photographs of the platform when it was full and when it was empty. The system seemed to work just great - they put it into service - then weirdly, on some particular day it closed the gates when there were just a couple of people on the platform....and this happened to occur on a public holiday when almost nobody was travelling. What they discovered after long investigation was that the neural network was ignoring the people on the platform and instead looking at a clock that happened to be inside the field of view of the camera. It was shutting the gates periodically at rush-hour on the same times of day every day, regardless of the number of people there! This story may be nothing more than geek urban legend - but it's a classic example of how an evolved software solution may converge on a highly undesirable answer without you ever knowing it.
SteveBaker (talk) 23:35, 9 December 2013 (UTC)[reply]

What is a complete definition of the Digital World? (the one we live and experience through our computers and devices)

[edit]

I am looking for a definition for what the Digital World is. Not the Information Age nor the Digital Revolution and certainly not the Digital World that refers to the one on Digimon animated series. How can someone define the Digital World? Azwvn (talk) 17:48, 6 December 2013 (UTC)[reply]

This is just one of those phrases that journalists use when they mean "computers and networks and stuff". It doesn't mean anything much really, and you're as qualified as anyone to define it yourself. -- Finlay McWalterTalk 20:53, 6 December 2013 (UTC)[reply]

Internet Explorer 11

[edit]

Well, I just allowed my Windows 7 to install IE 11. A popup came in, I clicked OK and here we are. I went into "Turn Windows Features On or Off" and verified that the IE definitely is version 11. The darn thing is my desktop gadgets disappeared and nothing I have tried to do helped to restore them so far. There is a subsection: Control Panel==>Programs==>Desktop Gadgets. None of those links works in fact, like: "Restore Desktop Gadgets Installed with Windows, etc"

Any thoughts? I want my clock and temperature displayed.

Thanks, AboutFace_222601:7:7680:626:292D:653A:79EF:947C (talk) 19:04, 6 December 2013 (UTC)[reply]

Well, the gadgets somehow came back after I rebooted the machine. They have a changed appearance now, appear semi-transparent in red color. Thanks, -AboutFace_222601:7:7680:626:CC14:6991:8170:36EF (talk) 17:07, 7 December 2013 (UTC)[reply]

May be helpful to remind you that gadgets were discontinued some time ago due to all the security vulnerabilities and Microsoft no longer officially support them. There was a talk at one point of MS potentially releasing a Windows update to disable them altogether. Nanonic (talk) 22:14, 8 December 2013 (UTC)[reply]
I was getting an error from the pipe in that link so I've removed it. I hope that's OK with Nanonic. (I don't usually edit other people's replies.) Dbfirs 12:47, 9 December 2013 (UTC)[reply]

Intel retail package

[edit]
Hi!!!!
a fast q and please feel free to DON’T send me to do a Google search
I need to know if this cpu option comes with the water cooler included
http://www.newegg.com/Product/Product.aspx?Item=N82E16819116939
thanks!!! Iskánder Vigoa Pérez (talk) 21:06, 6 December 2013 (UTC)[reply]
I'm not aware that any Intel retail packaged CPU comes with a water cooler included. Also does "Cooling Device : Cooling device not included - Processor Only" mean something different when you're too lazy to do an internet search? Nil Einne (talk) 21:29, 6 December 2013 (UTC)[reply]
Some of our questioners live in countries where useful search engines are blocked (Cuba, for example). This user self-identifies as Cuban...so that's almost certainly the reason we're asked not to suggest Google. Irrespective of that, WP:AGF and please don't call our OPs lazy. SteveBaker (talk) 03:58, 7 December 2013 (UTC)[reply]
I'm well aware where the editor lives having interacted with them several times before, including in some cases having provided search engine results (amongst other things). Since the editor had never before expressed any problems using search engines that I was aware of including the plenty of times I had interacted with them or read their comments asking for help, and since the editor has been on wikipedia, the RD and from many of their previous comments I think the internet a long time, and since their comments have generally suggested a decent command of English, and since they have asked about a lot of high end hardware suggesting they may not face the restrictions some others in Cuba may face, I AGFed they understood how their comment is likely to be interpreted. And that they would have made a simpler and quicker comment explaining the problem if they had such problems. I found something (a reply to someone else Wikipedia:Reference desk/Archives/Entertainment/2013 October 7#Trying to get to you) suggesting I may not be totally correct and the editor may have some problems with at least one internet search engine.
I therefore apologise for my mistake. However I do still believe that if you have problems with internet search engines, it's far better and clearer to actually offer a simple explaination like "Because of government censorship, I have problems with internet search engines" or even simply "I cannot access many internet search engines" rather than a comment like "a fast q and please feel free to DON’T send me to do a Google search" which will generally be interpreted to mean, I can't be bothered to search myself. Particularly since plenty of people will not know or bother to check where the person asking comes from and if you've rarely expressed such problems before (in any fashion even in the IMO rathed flawed fashion used here), there's no reason why people should think it's the case no matter where you live particularly given the circumstances outlined earlier. And the other obvious circumstance namely the only reason I was replying was because I had found the answer and it was on the page they linked to (and again I am of course assuming that they're not linking to a page they can't even access without at least commenting on that fact), which therefore very strongly suggests they missed it perhaps because they didn't look carefully enough.
I actually consider if I had made the assumption you made, considering my knowledge at the time and my intepretation of what all this means, it would be a worst assumption. Since I would be assuming someone failed to offer a simple explaination which their command of English suggests they were capable, and instead said something which it seemed likely considering their history they knew would likely be intepreted in a different way, and I was making that assumption all because of where they lived and despite amply evidence their circumstances may not be typical etc etc. (Alternative assumptions like assuming the person didn't appreciate how their comment would be intepreted or that their command of English wasn't up to it carrier with it their only problems.)
In other words, while I will apologise for my mistake and the offence cause by it but I will not apologise for my IMO correct application of AGF as I was trying to avoid worse possible offence and assumptions I consider more bad.
As for calling someone lazy, I've already explained my reasoning here. I would also note in a more normal circumstance, it's not always clear what's the correct AGF. (Particularly since AGF is ultimately supposed to be about assuming people are trying to improve the encyclopaedia.)
For example, in the more ordinary case where someone seeks help for something which is easily found with a simple search but does not ask not to be directed to search engines, being lazy may seem a bit of a rude assumption. But is it definitely more rude than assuming someone lacks the skill to make what's often a rather simple search? In this day an age, it could easily be more rude to make the later assumption. In fact for me personally I would find it more offensive for someone to suggest I lack the skill to use a simple search than that I was simply lazy.
Note also that the assumption in such a case definitely matters. If someone lacks the skills to use a simple search engine, then offering advice such a possible search string would likely be a good answer. If someone is simply too lazy, then it's unlikely the search string is what they want. A direct answer or a link to an answer is far more likely to be wanted in that case. In both cases of course, you could simply choose not to answer (but this doesn't change the fact how you answer if you answer will depend on which assumption you make). You don't necessarily have to mention what your assumption was, but often it's an important part of why you are answering in the way you did and helps to clarify your answer an aide people in responding further if they want to follow up.
I admit on wikipedia, the culture here means it's somewhat inadvisable to use the term 'lazy'. Better to say something like 'couldn't be bothered'. Which basically means the same thing, but is a way of saying it that comes across as less of a personal attack since you're describing what happened rather then what it means (which is wise sometimes, isn't really necessary in a case like this IMO but is still best carried out to avoid unnecessary controversy).
So I'll probably be more careful about my wording in the future, but I'm not going to stop WP:AGF in the way I do. I would note in this case, as I've already explained, my AGF may have been incorrect (but as I've said I still consider my assumption the most in tune with AGF), but despite the slightly poor wording, the actual result (even if in the end I provided the clarification not the OP) demonstrates the utility of making clear my assumptions.
Nil Einne (talk) 12:13, 7 December 2013 (UTC)[reply]
Thanks for the explanation - we all know you're not the kind of person to be generally nasty to our OP's. However, I do believe the thing about it being difficult to get to search engines in Cuba because MsBono (who frequently posts on the Misc page) has explained that she cannot reach any search engines from within Cuba either. I'm not sure of the details of the restrictions there - but there are definitely issues. It's unfortunate that this results in us having to field questions that a simple Google search would answer - but I'm not sure what we can do about that. Fortunately, there aren't many Cubans in the WP:RD audience - so it's not a huge burden to answer these kinds of questions directly. While I agree that it would have been clearer for our OP to explain why they couldn't do a Google search themselves, we should WP:AGF and assume that there is a good reason. SteveBaker (talk) 22:19, 9 December 2013 (UTC)[reply]