Wikipedia:Reference desk/Computing

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 70.49.171.136 (talk) at 19:18, 24 June 2015 (→‎What is URL Canonicalization?). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Welcome to the computing section
of the Wikipedia reference desk.
Select a section:
Want a faster answer?

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.
See also:


June 19

Can I install programs like my browsers, to my E Drive and run them from a shortcut on My C Drive?

My C drive is an SSI with 100GB of space (nominal) and only a few GB actually available. I have plenty of room on my E drive, an HDD. Can I install programs like adobe, firefox, chrome, etc., to my E drive, uninstall them from my C drive, and then run them from shortcuts on my desktop? Thanks. μηδείς (talk) 02:54, 19 June 2015 (UTC)[reply]

BTW, this is a PC running Windows 7. μηδείς (talk) 02:55, 19 June 2015 (UTC)[reply]

Generally - yes. There should be an option in the installer package for "Custon" or "Advanced" setup. You just need to change the drive letter in the installation path. You may even get a performance increase since you will be reducing harddrive contention. Certain core components will still be storeed on the C: drive. 196.213.35.146 (talk) 07:30, 19 June 2015 (UTC)[reply]
Yes, thanks, I do know how to do the advanced install and choose the target file. The big problem I am running into is that incessant updates are eating up space on my HDD, which has no files stored on it. I am glad to hear this might actually increase performance. μηδείς (talk) 18:03, 19 June 2015 (UTC)[reply]
One thing though - you will probably have to uninstall the existing the applications first - Windows doesn't handle software being installed twice very well, and you may run into problems if you try. AndyTheGrump (talk) 18:14, 19 June 2015 (UTC)[reply]
Thanks, Andy, I noticed just that factor when I tried installing safari on the e drive, and it asked me whether I wanted to uninstall or fix version on the c drive and gave me no other option. μηδείς (talk) 18:27, 20 June 2015 (UTC)[reply]
Did You use CCleaner or similar to flush caches and other unneccessary garbage from the system's drive/partition? You may repeat this by time and usage. --Hans Haase (有问题吗) 08:54, 21 June 2015 (UTC)[reply]
In a pinch, you can use a symbolic link, it makes programs "think" they are on the C drive but are really on the E drive. If you were willing to reinstall everything, you could symbolic link your whole program files directory to your large E drive (or wherever you create the link. There are tutorials online how to create symbolic links. It looks a lot more complicated than it is. Vespine (talk) 23:29, 21 June 2015 (UTC)[reply]
Here's another great tip that you can start using from now, create folders called c:\nProgram Files and c:\nProgram Files (x86) and link them to similar folders on your E drive, then when a program is installing you simply add the leading "n" to the default install location. Vespine (talk) 23:57, 21 June 2015 (UTC)[reply]

website in visualstudio

Hi Gent.s

if I copy my solution with all its files, when I open the new copy it still points to the old files on filesystem.. any hint?

Thanx in adv.

--OOPMan (talk) 11:35, 19 June 2015 (UTC)[reply]

They might be shortcuts. —SGA314 I am not available on weekends (talk) 13:35, 19 June 2015 (UTC)[reply]
pardon? --OOPMan (talk) 14:31, 19 June 2015 (UTC)[reply]
SGA314, do u know how to edit them with any editor by any chance?--Anubi dio cane (talk) 12:42, 20 June 2015 (UTC)[reply]
I'm not sure what you mean by "website" in this context. However, Visual Studio will only use Relative Paths when the Project File is in the same directory as the Solution File, or in a subdirectory thereof. The same is true for all files listed in the Project File, relative to the Project File's directory. If the Solution File contains a Project File outside its directory then an absolute path will be used. Again the same is true of files inside the Project File. LongHairedFop (talk) 15:22, 20 June 2015 (UTC)[reply]
Thank u everybody, with web site I don't mean web application or web api or whatelse, I just mean web site, a kind a solutions which does not contain real projects (i.e. csproj files) OOPMan (talk) 09:43, 21 June 2015 (UTC)[reply]
Try this:
  1. Open Visual Studio.
  2. Go to File → New Project
  3. Expand Other Project Types.
  4. Choose Visual Studio Solutions → Blank Solution and click OK
  5. Right-click on your solution in the Solution Explorer and choose Add → Existing Web Site.
    Best Dog Ever (talk) 09:57, 21 June 2015 (UTC)[reply]

Signed 16-bit wave file data format

Resolved

Hello everyone. I have exported the first 100 frames of a 440Hz square wave in a Signed 16-bit encoding. The sample rate is 44100 Hz. I used a 32-bit float for the audio track. I did this in Audacity. Here is the data that I have:

100 samples of singed 16-bit audio data
\xff\x7f
\xff\x7f
\xfe\x7f
\xff\x7f
\xfe\x7f
\xff\x7f
\xfd\x7f
\xfe\x7f
\xfe\x7f
\xfd\x7f
\xff\x7f
\xfd\x7f
\xff\x7f
\xfe\x7f
\xff\x7f
\xff\x7f
\xff\x7f
\xff\x7f
\xfe\x7f
\xfe\x7f
\xff\x7f
\xfd\x7f
\xff\x7f
\xfa\x7f
\xff\x7f
\xfc\x7f
\xff\x7f
\xff\x7f
\xfd\x7f
\xff\x7f
\xfe\x7f
\xfe\x7f
\xff\x7f
\xfe\x7f
\xff\x7f
\xfe\x7f
\xff\x7f
\xfe\x7f
\xff\x7f
\xfd\x7f
\xfe\x7f
\xff\x7f
\xfe\x7f
\xfe\x7f
\xff\x7f
\xfb\x7f
\xff\x7f
\xfc\x7f
\xff\x7f
\xff\x7f
\xfd\x7f
\x03\x80
\x00\x80
\x02\x80
\x00\x80
\x02\x80
\x01\x80
\x00\x80
\x02\x80
\x03\x80
\x00\x80
\x06\x80
\x00\x80
\x03\x80
\x00\x80
\x00\x80
\x03\x80
\x00\x80
\x03\x80
\x00\x80
\x03\x80
\x01\x80
\x03\x80
\x01\x80
\x01\x80
\x03\x80
\x00\x80
\x04\x80
\x00\x80
\x06\x80
\x00\x80
\x04\x80
\x00\x80
\x03\x80
\x00\x80
\x01\x80
\x01\x80
\x00\x80
\x02\x80
\x00\x80
\x01\x80
\x00\x80
\x00\x80
\x00\x80
\x03\x80
\x00\x80
\x05\x80
\x00\x80
\x03\x80
\x01\x80

Now I have determined that there are 200 bytes of data here but, I only exported 100 audio samples. Not 200. I therefore came to the conclusion that every 2 bytes equals 1 audio sample. I have also deduced that they are hexadecimal and how to combine the 2 bytes into one hex number. for the first 2 bytes I just take everything after the "\x" of the first byte and do the same for the second byte, and add them together in there respective order. Example: \x7f + \xff = 7fff. Now I have a few questions about these numbers. 1. why are there variations in the samples. If I export the same data, in a Signed 8-bit encoding, I just get 7f(which is equal to 127) for 50 frames and then 80(which is equal to 128) for another 50 frames. But when I use the 16 bit encoding, not every set of bytes in the first 50 frames are the same. For instance, the first 2 bytes are:

\xff\x7f

You would expect the next two to be \xff\x7f right? Wrong! the next byte is \xfe\x7f as you can see in the audio data I have above. This doesn't make sense so can some one please explain why its this way? And 2, am I right about the equivalence of 1 audio sample equaling 2 bytes and how to add the 2 bytes together? The reason I am asking is because I am trying to write my own square wave to a wav file. In the end, I want to be able to have a function that take an input frequency and an amplitude, and can write a square wave with that frequency and amplitude, to a wave file. And no, I do not have to write anything to the headers. I just have to write the audio data(python's wave modules does that for me).

Edit: I just read the data using python's wave module(originally I was just exporting with a headerless format and reading the data directly using pythons open function), and it reads the frames in increments of 2 bytes. Here is an example: \xff\x7f Thanks for your help in advance, —SGA314 I am not available on weekends (talk) 13:20, 19 June 2015 (UTC)[reply]

@Graeme Bartlett: Would you know the answer to my 2 questions? —SGA314 I am not available on weekends (talk) 16:33, 19 June 2015 (UTC)[reply]

"16-bit" means 2 bytes per sample. "Signed" means two's complement. The WAV format uses little endian numbers. So FF 7F is +32767 while 00 80 is -32768.
I don't know why the wave module gives you bytes instead of samples, but you can use the array module with the type 'h' to decode them for you. Instead of w.readframes(100), write array.array('h', w.readframes(100)). If you're using a big-endian machine (unlikely), you also need to call byteswap().
I don't know why the numbers are not all the same. It may be dithering noise from the conversion from 32-bit floating point to 16-bit integer formats. You can probably ignore it. -- BenRG (talk) 00:35, 20 June 2015 (UTC)[reply]
  • Looking at the documentation shows there are two squarewave generation methods, square and square-no alias.[1] Are you doing the latter? You are correct that two bytes is one sample, and you have the answer already given above me. If you are generating your own square wave you can make it constant at the upper part, and also the lower part. In the transition you may want to average the upper and lower value based on the timing of the transition compared to the sample. Graeme Bartlett (talk) 09:06, 21 June 2015 (UTC)[reply]

Greppable password protected files

I have a large collection of text files. I need to grep them on a regular basis. The size is getting too big, so I want to compress them. I know that I can gzip them and then use zgrep to grep them. Now, I am also worrying about security. I want to password protect them. I know that I can use tar to password protect them and then compress them or I can use gpg to password protect the gzipped files. However, if I use tar-then-gzip or if I use gzip-then-gpg, I cannot zgrep the files. I have to undo the password protect first. What options exist to compress and password protect files while still maintaining the ability to search them using regular expressions? 199.15.144.250 (talk) 13:41, 19 June 2015 (UTC)[reply]

Try 7-Zip. It may help, although I don't know if you could still be able to search through the files using regular expressions though. —SGA314 I am not available on weekends (talk) 13:56, 19 June 2015 (UTC)[reply]
Use an encrypted disk partition. For example, FileVault on OS X can encrypt a disk partition. When you wish to deny access, leave the disk encrypted (e.g., unmount it). Nimur (talk) 14:52, 19 June 2015 (UTC)[reply]
I like that suggestion. It is much better than having thousands of files all sharing the same password or, worse, memorizing thousands of passwords. 199.15.144.250 (talk) 15:12, 19 June 2015 (UTC)[reply]

June 20

Broken device driver

Last night, my computer presented a BSOD with "driver state power failure" and was unable to find any networks whatsoever, and despite a few restarts, the situation persisted without resolution until I performed a system restore that worked wonderfully. Not clear, though: how can a a driver break, anyway? Does some weirdness introduce bad code into the driver software, like a biological cell that makes a big mistake during DNA transcription? I initially feared some sort of damage to the hardware with which the driver works, but that wouldn't be fixable with a system restore. Nyttend (talk) 14:24, 20 June 2015 (UTC)[reply]

To quote Edsger Dijkstra, On the cruelty of really teaching computer science...:
We can't possibly know what tiny imperceptibly small change caused this dramatic user-visible problem unless we dive deep into the problem with a powerful toolkit of software debuggers, source code, specifications, and schematics. Nimur (talk) 14:33, 20 June 2015 (UTC)[reply]
I'm not asking for help on this specific incident; the problem's solved, so I don't care what caused it. My question is much more basic: how is it possible for drivers to become corrupted? Is it possible for the code itself to get changed, as if you went into a cell and tweaked its DNA? After all, in my experience, other programs (all the way from productivity stuff like Office to little games) don't get corrupted: documents can be corrupted, but I don't remember experiencing non-driver software that has its source code corrupted. Nyttend (talk) 14:39, 20 June 2015 (UTC)[reply]
Perhaps the source code was not corrupted at all. There are lots of places, other than the executable program file, where state can be saved. If saved state is invalid, the same program may behave differently. Of all of these places where state can be saved, some will be "reset" by a software system restore. Shall we begin enumerating all of these places? We can start with the obvious: those items stored in the file system on the hard drive: data files, configuration files, shared libraries,... the list of relevant files can be quite extensive. But if you think "state" ends with the file system, you underestimate the state-full-ness of a modern computer! What about other peripheral hardware with nonvolatile memory, like the GPU or the main logic board controller? Do these hardware devices save persistent state that survives reboots, but not "system restore"? We really do need more information: make, model, software configuration, and a thorough listing of every single peripheral. If you wanted to report a bug to Microsoft (for example), they would need a complete system profile before they would start to investigate the problem. And again, let me emphasize: a single changed bit can cause a program to fall down a totally different path in an "if" statement, provided that the correct bit is changed.
How would we find which bit got changed? We'd need a little bit of luck and a whole lot of tools that are not commonly available to mere mortals. When you see a "blue screen of death," that's the "user-friendly" version of a system error message. (This is a great irony!) A professional Windows driver-developer would know how to extract more information to find out exactly where the device-driver broke. If they had source-code for that driver, they could meaningfully investigate why the program terminated at that point, and caused the system to halt in an unrecoverable way. Without the code, we're searching for a proverbial needle in a haystack, and our haystack has billions of bits that all look exactly the same.
As a normal user, a "BSOD" (or a kernel panic on other systems) is a terrible thing to encounter. But for a device hardware programmer, a "BSOD" is a good thing! It means that the problem has produced enough information to debug, so long as we know how to debug it. Nimur (talk) 14:57, 20 June 2015 (UTC)[reply]
After reading the first part of your response (I editconflicted with your second and third paragraphs), I found the term State (computer science); is that what this means? Never heard of this before; I thought it was just the ordinary usage comparable to "condition", e.g. how the US president "shall from time to time give to the Congress Information on the State of the Union". Would your answer have been different if I had said only how can a driver break, anyway? Does some weirdness introduce bad code into the driver software, like a biological cell that makes a big mistake during DNA transcription? If so, what would you have said? Or should I take the basic answer as "The software didn't get corrupted, but there was a mistake in something it works with, and we can't tell what it was"? This specific situation is a well-documented problem, anyway. Nyttend (talk) 15:01, 20 June 2015 (UTC)[reply]
The software (probably) didn't get corrupted, but there was a mistake in something it works with, and we can't tell what it was (unless we get a lot more information). Nimur (talk) 20:02, 21 June 2015 (UTC)[reply]
(this is not Nimur) It is instructive to consider state in case of web applications. HTTP is (at the most basic level) stateless, you request a page, the page is served and the web server forgets you ever existed. State is the totality of things which are a certain way but could be different. Suppose you have a mail application running in your browser. You want your mails be sorted by date, so you click on the button on top of the date column. You've just created state! When you refresh the page, the mails are still sorted by date. This means this bit of information - how you want the mails sorted - must have been stored somewhere ("made persistent.") in the time between the requests. It could have been stored in the browser's cookies. The browser sends a cookie back to the server with every request. There could be a cookie for every such bit of information. What's more likely, however, is that the server created a unique identifier - the session id - that your browser remembers between requests and sends back to the webserver. This session id is the key into a database (which resides on the webserver) with all of your preferences for this session. The state got externalized!
Now suppose there are preferences which are mutually exclusive. You can't have mails sorted both by date and sender (because the sorting algrithm may not support sorting on more than one key, it is "unstable"). Suppose that through some unanticipated usage scenario you were able to affect both settings at the same time. These bits of information got out of sync with each other. At this point, which bit gets precedence (and which code path is taken) is more or less random (in the sense of "incidental"), depending on coding style, which bit is checked first etc. In a less trivial example, the so introduced inconsistencies would have the capacity to snowball and make the whole software system unusable - even permanenely so, because the corrupt, inconsistent state got stored somewhere and the only way to reset it is to reinstall the whole thing.
Good design will try to minimize the number of opportunities for inconsistencies to arise in the first place. In my example, this would be by storing the sorting order as one bit of information (which column) instead of several independent bits (a flag for each of the columns saying "sort by me".)
Hardware has state, too. The keyboard controller in your keyboard remembers a typematic rate (the rate at which keystrokes are autorepeated when the key is held down) and delay (the delay after which autorepeat kicks in). This is state. When the computer is turned off and on again, these things must be programmed into the keyboard again from your preferences which the operating system has stored. Asmrulz (talk) 16:35, 20 June 2015 (UTC)[reply]
Just as in biology, erros and inconsistencies are the more tragic and lethal the lower the level at which they occur. Consider an an RS trigger in some chip on your mainboard. It outputs a 1 when the S (for "set") line is pulsed high, and a 0, when the R (for "reset") line gets pulsed high. When both lines are low, the output doesn't change, there's a feedback loop which ensures this. This is state. What happens when both lines (S and R) are pulsed high at the same time due to some timing inaccuracies unaccounted for by the chip designer? It is undefined and there's no way to know, now one needs semiconductor physics to reason effectively about this. And there's also no way to program around such things. In everyday life, however, bugs are due to design and logic errors of the kind I mentioned, not because of flaky hardware Asmrulz (talk) 17:49, 20 June 2015 (UTC)[reply]
It might be worth adding, as the op noticed ( After all, in my experience, other programs (all the way from productivity stuff like Office to little games) don't get corrupted), this isn't an accident, it's because of Error handling, which is one area of computer science that has come a very, very long way. There used to be a time, when a computer had a single thread, when seemingly almost ANY error could completely hang your whole system. Over the years, with each iteration, operating systems have introduced multitasking and progressively have got better at error handling, to the point now where a lot of errors these days with applications like games or "office stuff" can be recovered from, sometimes even on the fly, in the back ground! You can go into the application event log on your computer and it would be very rare indeed to see absolutely NO errors there, but you probably aren't even aware of most of them because the computer does its thing. An application running in a 'thread' can typically at most crash its own thread, which the OS should be able to shut down, but even then it doesn't always work that way, it's certainly not unheard of an application like word crashing a computer. Just google word crashing computer. Driver crashes are harder to recover from but not impossible, and there advancements are also constantly being made. A article you might find interesting related to this is Watchdog timer. :) Vespine (talk) 01:55, 22 June 2015 (UTC)[reply]

The complexity of an infinite-resources computer

Hi there, I would like to know, whether complexity has any meaning if we assume a computer has infinite resources and abilities?
I'm talking about a machine that takes absolutely 0 time to run an algorithm, and has an infinite cache or memory space. — Preceding unsigned comment added by Exx8 (talkcontribs) 14:34, 20 June 2015 (UTC)[reply]

In December 2013, a different user asked about "universal algorithms" that could run on hypothetical types of computers, and received some good theoretical answers. What does it really mean to run in zero time? If you think hard about this question, and think about the definition of computing, you will recognize that "zero calculation time" contradicts the definition. Nimur (talk) 14:42, 20 June 2015 (UTC)[reply]
this is a totally different question.Exx8 (talk) — Preceding undated comment added 15:23, 20 June 2015 (UTC)[reply]
Well, the more complex an algorithm, the greater the chance of a bug. So, we might want to replace things like complex sorts with simpler bubble sorts. Of course, this makes no sense in the real world, where a large bubble sort is absurdly slow. StuRat (talk) 17:00, 20 June 2015 (UTC)[reply]
@StuRat: Note that computational complexity isn't the same thing as conceptual complexity. In computing, bubble sort has an average complexity of O(n2), greater than quicksort's average of O(n log n).
To answer the OP's question, I can think of one interesting implication complexity would have given a theoretically omnipotent machine. The problems in the complexity class RE have the property that while 'yes' cases can be verified in finite time, 'no' cases cannot. Given that there is no limit on the 'finite' amount of time the yes certificate may take, this property is not very useful for ordinary computers; for human purposes there is no difference between an infinite calculation and one that takes only a few billion years. In other words, despite the existence of a finite yes-certificate a normal computer cannot give us any useful information about the solutions to the vast majority of RE and co-RE problems. By contrast, your proposed infinite computer would make these problems easily solvable. Given an RE decision problem and an algorithm for producing its yes-certificate, the algorithm would halt instantly if the answer was yes and would continue to execute if the answer was no. (The opposite for co-RE). You would effectively produce a no-certificate, reducing these problems to a lower complexity class. —Noiratsi (talk) 13:34, 21 June 2015 (UTC)[reply]
Yes, both types of complexity are important in computing. In the theoretical case of an infinitely fast computer, only the conceptual complexity would then be an issue. StuRat (talk) 16:08, 22 June 2015 (UTC)[reply]
The answer to this lies in the Church–Turing thesis - which demonstrates that all currently known computing mechanisms are equivalent, except for time and storage capacity concerns. Since any existing computer can both simulate - and be simulated by - a Turing machine (assuming time and storage are not an issue), it follows that any computer can do what any other computer can do. The huge complexity of (say) a modern x86 class machine compared to (say) a minimal RISC machine is only needed for performance, ease of programming or compactness of programs - and none of those things matter if time and space are not an issue.
Some people will maintain one of the following three things:
  • The human brain is somehow "more" than a Turing machine -- but modern science suggests that brains are made of neurons - and neurons can be sufficiently simulated by a turning machine, so if time and space are no concern, then we can clearly simulate a human brain with a turing machine.
  • That quantum computers are somehow "more" than a Turing machine -- but, again, we can simulate (possibly VERY slowly) the operations of a quantum computer...so, again, it's nothing more than a turing machine.
  • That there is some hypothetical "hypercomputer" architecture that is somehow "more" than a turing machine - but if it's made of normal 'stuff' that physics equations exist for - then it too can be simulated by a turing machine.
So I'm 99% certain that (barring some kind of astounding future breakthrough in physics) the answer to your question is "NO!" - complexity is irrelevant if you have infinite speed and infinite storage." But it most certainly DOES matter if either of those things are finite...which, of course, they are in most practical applications.
It's worth noting that the finite speed of light means that there is a hard limit in speed/memory - the more memory you need, the larger the machine has to be, and given the speed of light limitation, the slower it will be.
SteveBaker (talk) 03:07, 22 June 2015 (UTC)[reply]
  • The answer, I think, is that complexity does still matter, but it applies to orders of infinity rather than finite numbers. With your conditions, any algorithm with a countably infinite number of steps can be executed in zero time. But it isn't clear what happens if you need to execute a procedure with an uncountably infinite number of steps and/or uncountably infinite cache size -- for example, if you need to apply a test to every real number between zero and one. Looie496 (talk) 14:53, 22 June 2015 (UTC)[reply]
Any algorithm that an infinitely-fast/infinite-memory turing machine can solve has be solved in a countably-infinite number of steps. So perhaps you could imagine an algorithm that required one to do something with every possible real number - which would be an uncountable infinity, for sure. But it's not something that a turing machine can solve because it operates by single (countable) operations of a tape full of 1's and 0's passing through the read/write head of the machine. So there are certainly tasks that would require more complexity than a turing machine can have.
But machines that can solve uncountable infinities kinds of problems can't exist if their storage systems have to be made from things like atoms, electrons and photons that are countable...even if we allow for an infinite amount of them.
So you need something that's logically more complex than a turing machine to work problems that involve uncountably infinite stuff. But such a machine can't be made of countable amounts of stuff because it it was, then a turing machine could emulate it.
I guess on some hyper-abstract mathematical level, that says that more complexity is possible - but in any physical sense, it's not. SteveBaker (talk) 16:25, 23 June 2015 (UTC)[reply]

Apple pay

Does Apple pay work with any contactless nfc receiver as long as Apple have a deal with your bank? Or does it require the store to have a deal with Apple too? 2001:268:D005:E529:B926:913F:AB27:B1C (talk) 22:43, 20 June 2015 (UTC)[reply]

Please see the first paragraph of our article on Apple Pay.--Shantavira|feed me 07:48, 21 June 2015 (UTC)[reply]
Then why did Apple have to strike a deal with Londons transportation system for it to work there despite it working with contactless cards already? 106.142.222.212 (talk) 08:52, 22 June 2015 (UTC)[reply]
And also why did Apple do deals with some vendors anyway? 2001:268:D005:E387:FA:DBE9:4AB2:7072 (talk) 09:20, 22 June 2015 (UTC)[reply]

June 21

Same ASCX control in two different ASP.NET web applications

I have run into a situation at work where I would need to use the same ASCX user control (with a declarative ASP.NET source page rather than a fully programmatic C# class) in two different ASP.NET web applications. Is it possible to share the control among them or do I have to copy-paste all the code? JIP | Talk 08:22, 21 June 2015 (UTC)[reply]

Turn on Mac, Install Updates, Then Shut Down (Automatically)

I'd like to have my Mac turn itself on (say, at midnight), download any updates, then turn itself off when it's done. I'd like it to download updates for other programs like Firefox or Flash Player as well, and update my MacPorts packages (which I do from the command line, and which requires admin privileges). I know it has the capabilities to do each of these things (i.e. turn itself on/off, check for updates, etc.), but I'm not sure how to put it all together in a task that runs by itself on a regular schedule. Do I use AppleScript, a shell script, something else? Thanks. OldTimeNESter (talk) 15:15, 21 June 2015 (UTC)[reply]

How Power Nap works on your Mac.
If you wanted to do some other task, you could write a custom launchd plist to define a job and set a schedule for it.
If you want to manually schedule a sleep or wake cycle, use Energy Saver preferences.
Nimur (talk) 18:08, 21 June 2015 (UTC)[reply]

Which Wi-Fi channel overlaps least with Bluetooth?

Which end of the Wi-Fi channel spectrum should I switch to in order to minimise interference with my Bluetooth headset when my router is between me and my PC (my Bluetooth device is class 1 with a good antenna)? --78.148.105.170 (talk) 23:50, 21 June 2015 (UTC)[reply]

Both WiFi and Bluetooth use the same frequency range. WiFi uses 1/3 of the available frequency range. So, you will have 3 choices, letting you choose which third to use. Some offer 5 or 6 choices - but it still uses 1/3 of the range with each choice. Bluetooth uses a tiny sliver of the range. But, you don't have any control over which sliver it uses. It will randomly pick a frequency and, if there is noise on it, it will jump to another frequency. So, you have no way to know what frequency your bluetooth will use. Even if you know what it is using right now, it can (and likely will) jump to another frequency in a short time. Therefore, any 1/3 of the frequency you choose for WiFi will likely be randomly chosen by Bluetooth 33% of the time - upon which Bluetooth will hopefully recognize noise and jump to another frequency. 199.15.144.250 (talk) 11:52, 22 June 2015 (UTC)[reply]
Okay, thanks very much for the informative answer, 199.15.144.250! :) 78.148.105.170 (talk) 13:38, 22 June 2015 (UTC)[reply]

June 22

When I am asked to unsubscribe from a junk/spam email list, are they simply using a deceptive way to get me to actually verify/confirm my email address?

I was not sure where to place this question, so I settled on this Computers Help Desk. I get a lot of junk/spam email in my email inbox (like everyone else does, I'm sure). Sometimes, at the bottom of the email, it will say: "If you wish to unsubscribe – or if you wish to be removed from our email mailing list – click here and enter your email address. You will then be removed from our email mailing list." (or some such wording). One part of me says: "Great, if I fill in this form, I will be removed from their mailing list. And I won't get junk/spam email from them anymore." Another part of me is skeptical and wonders if this is actually an underhanded and sneaky way for them to actually solicit (and confirm) valid email addresses (and make my junk/spam email problem even worse). I don't know much about junk/spam email. I imagine that "they" try out and test out all sorts of word/letter/number character combinations. Some are real email addresses, some are not. So, the method I just described is a good (or bad, depending on your perspective) way to filter out which email addresses are valid. No? Does anyone know how all this works? Thanks. Joseph A. Spadaro (talk)

Your suspicions are correct. If the vendor/retailer/organization is one that you recognize (e.g. Wal-mart, your local pet food store, Etsy, Kickstarter, etc.) then clicking on the unsubscribe link will work. If it's just spam that you did not sign up for, then clicking on those links does verify that they got a real person's email address. Dismas|(talk) 01:56, 22 June 2015 (UTC)[reply]

And, if you don't recognize the vendor, etc., then just add it to your spam file and forget about it. You will keep getting all this crap, however . . . just from different people! The joys of technology . . . 50.101.127.176 (talk) 02:40, 22 June 2015 (UTC)[reply]

Side note in the realm. Many email providers have tailored filters you can set (as a supplement to the program's internal spam filter). I got on some scam Indian drug company's radar a few years back and they and their associates/related company's they sold my email address to send me at least 30 emails a day of this shit. Almost all go directly into my trash folder because I have set my filters to recognize about 40 different words in the body of the email they just can't resist including, that I doubt any email I would actually want would ever contain. You can Google how to set spam filters for whatever email provider you have.--Fuhghettaboutit (talk) 13:53, 22 June 2015 (UTC)[reply]
I have made a distinction between what I call mainstream spam and what I call rogue spam. Mainstream spam is sent by reputable merchants under their own names. Rogue spam is sent by rogues, usually using false domains. The CAN-SPAM act requires bulk mailers to remove you from their mailing list on your request. Mainstream spammers will comply. (A few make it difficult, by using some sort of CAPTCHA, but most will comply readily.) Rogue spammers will not, and, in fact, responding to the Remove link is actually a way to confirm that you are a live mailing address. (Because of the way that spammers recycle mailing lists, a lot of their mailing addresses are dead.) Unless you know who the bulk mailer is and that they are reputable, it is probably a device to get you to confirm your email address. This hasn't changed much in nearly two decades. The rogue spammers either don't comply with the CAN-SPAM requirement to allow you to request removal, or they aren't subject to it at all. (They aren't subject to it if they are outside the United States.) Don't request removal of your name from spam unless you know who the merchant is. Robert McClenon (talk) 20:39, 22 June 2015 (UTC)[reply]

Suddenly have almost no space on my hard drive!

I went away for the weekend but forgot to shut my computer down. Tonight when I got back I saw that I went from 100GB of space available on my drive to 45 GB! How do I determine what got downloaded and when so I can clean up some space? 50.101.127.176 (talk) 01:44, 22 June 2015 (UTC)[reply]

Try WinDirStat. After it runs for a few minutes, it gill give you a visual presentation of how your disk space has been consumed. With a little exploring, you should be able to find the culprit. Other disk space analyzers are listed at the bottom of our WinDirStat page. -- Tom N talk/contrib 03:36, 22 June 2015 (UTC)[reply]
Something ate up 55GB while he was away. Is there an easy way to show recent new files? Bubba73 You talkin' to me? 03:38, 23 June 2015 (UTC)[reply]
I just list folders and files in order of date modified, though there might be a better way. Dbfirs 08:12, 23 June 2015 (UTC)[reply]

First stay offline and clear some caches manually: Run %TEMP% to enter the temporary files folder. Use Shift+Del to bypass the trashcan when deleting files. Run %APPDATA% delete the folder macromedia when not designing flash files yourself. If not enough space and using Firefox at any time, leave the Roaming folder, and change to the folder Local. Delete the folder Mozilla. Never delete this one in the Roaming folder when not willing to loose history, bookmarks, addons and other settings. Run chkdisk to test for filesystem problems. Backup Your data first before fixing with chkdsk /f. Use CCleaner to drop caches and useless garbage on the drive. When using several user profiles on the computer, each user needs to run CCleaner. Check the folders windows\catroot and windows\catroot2. Look for Microsoft KB articles only to do troubleshootung with contents of these folders. Then search for any file inside the users folder. Sort by date. Check what was changed or created. --Hans Haase (有问题吗) 12:12, 23 June 2015 (UTC)[reply]

Why is Bing so shit compared to Google?

huh? — Preceding unsigned comment added by Le petit fromage (talkcontribs) 13:32, 22 June 2015‎

I would venture to say they have better Web_crawlers and indexing than the other search providers. Here is a link to explain how search engines work - Google just does it better. http://www.google.com/insidesearch/howsearchworks/crawling-indexing.html "When it comes down to it, searching the web without Google is like straining sewage with your teeth." http://ars.userfriendly.org/cartoons/?id=20140607 196.213.35.146 (talk) 14:24, 22 June 2015 (UTC)[reply]
I think the problem is user-preference and brand identity. Search quality is very subjective. In a study conducted in 2013, when the formatted HTML is made to look like Google's web page, people preferred Bing's algorithmic search results by a factor of 2 to 1 over Google's algorithmic search results in a double-blind experiment. Many web users have been conditioned to look for Google styles and branding, to the exclusion of actually reading the content of the web-page they're reading. This is why Google hires research psychologists to study all the data they collect, including the fonts you see on their page. When you use a search engine and participate in "big data," you are proverbially a rat in a maze, and your responses and preferences are being studied.
Personally, I avoid using web search engines whenever possible. I find that knowing good web resources (by reading extensively) results in dramatically superior information quality, compared to having a computer spit commercialized algorithmic results at me. Nimur (talk) 14:53, 22 June 2015 (UTC)[reply]
I don't have much faith in your Bing link/reference. I call Promotion_(marketing) on that one. 41.6.60.241 (talk) 18:04, 22 June 2015 (UTC)[reply]
Any study that challenges your assumptions, which is funded by and published by the commercial entity it benefits, should cause serious skepticism (see e.g. Tobacco advertising and how every toothpaste brand is recommended by [x] out of [x+1] dentists). In fact the Bing study, sponsored by Bing, was a sample size of only 1000 people but in the ads they combined it with their "bing it on" campaign inviting users to choose which they prefer. Millions of people participated in that one ... but they didn't release the results -- they just advertised the "millions" along with the results of the study of 1000 (and who knows how many sets of 1000 they had to test before finding one with favorable results). See: Freakonomics and Network World for a couple stories about this. — Rhododendrites talk \\ 19:22, 22 June 2015 (UTC)[reply]
While that is a fair rebuttal - I won't pretend the Bing study was funded by an impartial observer - it does not in se invalidate the result. It does suggest that we should study the issue in greater depth. In fact, one of the articles I linked to earlier already was the rebuttal to your rebuttal: Challenging the Challenge to the Bing It On Challenge. Nimur (talk) 20:16, 22 June 2015 (UTC)[reply]
Justifying your point... According to research like this... The universe of results that a search engine will spit out is actually very very small. There is a lot of technical stuff in that paper and similar ones that demonstrate that the top 10 search results are shown between 20% and 30% of the time. In my opinion, that means that the general public is being directed to the top 10 sites at least 20% of the time. Therefore, the search engine isn't really helping you search for anything. It has a very small set of sites that it emphasizes and it is using your query to try and direct you to one of those sites. 199.15.144.250 (talk) 16:06, 22 June 2015 (UTC)[reply]
By the time anybody had heard of Bing, Google was already a household name and, since it worked very well, what motivation is there to switch? Add to that the historical ethos of Microsoft and Google, with the latter being viewed largely positively whereas the former was the "evil empire" of technology in the 90s-early 00s. The harder question is what Bing would have had to do in order to overtake Google. The more answerable question is how Google rose to prominence when it was newer. e.g. this article and others (tl;dr - it provided noticeably better search results). — Rhododendrites talk \\ 16:37, 22 June 2015 (UTC)[reply]

Loop Problem In Python 3.4

Resolved

Hello everyone. I am now able to successfully write a Square wave to a wav file at any frequency I want. However, I am having a Problem with the main loop. When I write the data to the file, I first get the amount of samples that I will keep the output high, and keep the output low. For example, Lets say that I have a Frequency of 220Hz. I will use the formula of: Freq or 220 / (8.8 * (pow(Freq or 220 / 440.0, 2.0))) = 100(I have to round up to 100) So this means that for 100 samples, I have to write the High byte which is \xff7f. Then at sample 101 I start to write low bytes which is \x0080 for another 100 frames. This pattern will continue until the main loop is finished. Now the problem is the code I have misses one of the samples in the transition from Low to High. For example, In the pattern I described above for 220Hz, my setup will write 100 audio samples for the first part(High to Low) but the next part screws up. It writes low samples from 101 to 201 not 200 like its supposed to. Its only supposed to write 100 samples for the low, not 101. Here is the code I have for the loop. Whats wrong?

    counter = 0
    Max = 100 #This is calibrated for a test frequency of 220 Hz
	for i in range(44100):
		if counter == Max + 1:
			if High == True:
				High = False
			else:
				High = True
			counter = 0

		if High == True:
			File.writeframes(HighSample)
		elif High == False:
			File.writeframes(LowSample)
		counter += 1

Thanks for your help in advance, —SGA314 I am not available on weekends (talk) 16:05, 22 June 2015 (UTC)[reply]

Your count is from 0 to 100, that is 101 iterations. Change "Max + 1" to just "Max" or set your counter to 1 instead of 0 when you set the value both times. 199.15.144.250 (talk) 16:14, 22 June 2015 (UTC)[reply]
@StuRat:You were right. I never though of it that way. I tried to follow both of 250's suggestions but that made it worse but then I set the counter = 0 line to counter = 1 and it works. I don't quite understand you explanation of why this works, but It does make partial sense. Thank you very much. Now I have a perfectly working home built, Square wave generator. Thanks, —SGA314 I am not available on weekends (talk) 16:28, 22 June 2015 (UTC)[reply]
(I had said to reset the counter to 1, while leaving the initialization at 0, but reverted myself when I saw there was already an answer, not noticing that the previous answer mistakenly said to change the initialization to 1.) StuRat (talk) 16:44, 22 June 2015 (UTC)[reply]
See off-by-one error. Gandalf61 (talk) 16:31, 22 June 2015 (UTC)[reply]
Also, you'll want to learn about dithering, or else your sampling (in the time domain) will cause slight frequency errors for any wave whose frequency is not an exact integer factor of the sampling frequency. Nimur (talk) 16:51, 22 June 2015 (UTC)[reply]
Resolved

StuRat (talk) 16:56, 22 June 2015 (UTC)[reply]

How to detect keyboard key presses in python 3.4?

Resolved

Hello again. Now that I have finished my square wave generator, I am now going to build a synthesizer that will detect keyboard presses, synthesize a square wave, and play it back from memory. I know how to synthesize audio and write/play it back from memory but I don't know how to detect keyboard key presses. Does anyone know how to do this in python 3.4? Thanks for your help in advance, Sorry for the endless questions and thank you all for your patience, —SGA314 I am not available on weekends (talk) 17:30, 22 June 2015 (UTC)[reply]

Are you on Windows? Are you running in a window (not command-line)? The keyboard is part of the environment, so we need to know your environment to give a correct answer. 199.15.144.250 (talk) 18:45, 22 June 2015 (UTC)[reply]
I am running a commandline python console on Windows 7. —SGA314 I am not available on weekends (talk) 19:51, 22 June 2015 (UTC)[reply]
If you just need key-down events, and just letters/numbers/symbols and not special keys, you can use msvcrt.getwch(). If you need more than that, you may have to call ReadConsoleInput via ctypes. -- BenRG (talk) 05:47, 23 June 2015 (UTC)[reply]
I don't need to read special keys, so i will just use msvcrt.getwch(). Here is what i wrote using that function:
while True:
	Key = msvcrt.getwch()
	print(Key)
	# Check if the CTRL+Q key has been pressed
	if Key == "\x11":
		break

Thanks for your help, —SGA314 I am not available on weekends (talk) 12:42, 23 June 2015 (UTC)[reply]

June 23

How to install old versions of “Subway Surfers” on BlueStacks App Player

The widely popular game Subway Surfers is frequently updated, as you probably know; they do a different city every month, I think.

Do you know of a place where I can find .apk files for past cities that are compatible with BlueStacks App Player.

(N.B.: I am only interest on .apk files that work with the emulator, not on Android phones and tablets, which I do not have.) —24.228.117.156 (talk) 03:13, 23 June 2015 (UTC)[reply]

winsound help in python 3.4?

Resolved

Hello. In my last post I said that I knew how to play a sound in python. Well I was mistaken. My method won't work. Here is what I am trying to do. First, I write the data to my wav file and patch the headers. Since I have used a BytesIO stream for the wave.open(f) instead of a file, I now set the BytesIO stream's position to 0 and write all the data to a string. Finally, I call "winsound.PlaySound(data, winsound.SND_MEMORY)" using the SND_MEMORY flag. Now every time I do this, it gives me an error saying, "RuntimeError: Failed to play sound." If I try to load an actual wav file into a FileIO stream and read all the data into a string, it still gives me the same error. And you have to put the data in a string because it will error out if it has anything other than a string for the data argument. What am I doing wrong? Thanks for your help in advance, —SGA314 I am not available on weekends (talk) 12:56, 23 June 2015 (UTC)[reply]

This seems to be a bug in the winsound module. You can work around it by using ctypes.windll.winmm.PlaySoundA instead of winsound.PlaySound (and passing it a bytes, not a str). -- BenRG (talk) 07:53, 24 June 2015 (UTC)[reply]
It works. Thank you so much. I had to get the arguments right but I did get it. Here is what I did for the arguments:
ctypes.windll.winmm.PlaySoundA(data, c_uint32(0), c_uint32(winsound.SND_MEMORY ))
Thanks for all of your help, —SGA314 I am not available on weekends (talk) 13:59, 24 June 2015 (UTC)[reply]

Splatoon on PC

Why is Splatoon not on PC? — Preceding unsigned comment added by CdotHonline (talkcontribs) 19:14, 23 June 2015 (UTC)[reply]

Because the developers made it for Wii U. Why? When they were developing the game, they decided that it wasn't something that they wanted to invest their time in. Will they possibly port it to PC in the future? Maybe. Nobody knows the future. Should you pick up every game for the Wii U at the store and ask "Why isn't this on PC!?"? No. You should learn that developers often choose a specific platform for their game and develop for that platform. 199.15.144.250 (talk) 20:06, 23 June 2015 (UTC)[reply]

June 24

Can the Internet be interrupted by the government to broadcast emergency announcements?

In the same way TV and radio broadcastings are interrupted to send active alerts, in cases of inclement weather, natural disasters, or any emergency. The Internet has become the main medium of communication for many, taking the place that TV and radio were occupying in the past. It should be the medium of choice for important messages.--Yppieyei (talk) 13:19, 24 June 2015 (UTC)[reply]

The internet is not under the direct control of any single entity. It is not a broadcast medium. It is a request/response medium. So, no. With the current design and structure, the government cannot force a message to appear all over the internet... unless they post it on Facebook as an animated GIF with Deadpool riding Pinky Pie while making some statement like "There's a threat of severe thunderstorms with tornadoes over Oklahoma from 6pm to 10pm. Share if you love God. Like if you love your Mom. Ignore this if your are evil and want everyone to die, you scumbag!" 199.15.144.250 (talk) 13:52, 24 June 2015 (UTC)[reply]
Cell phone networks aren't broadcast networks either, but there are systems in place to send emergency alerts (such as Wireless Emergency Alerts in the US). The Internet protocol supports multicast which can in principle be used to efficiently send a packet to every Internet-connected machine (though with no guarantee of delivery). There could in principle be an RFC defining an IP-based emergency alert system. There just happens not to be. It has nothing to do with the design of the Internet. -- BenRG (talk) 18:26, 24 June 2015 (UTC)[reply]
That is not correct. Cell phone networks *ARE* broadcast networks. To function, your phone is always listening to the cell tower. Your computer is not always listening to the Internet. It only listens on a specific port to get an answer to a specific request and then it hangs up. 199.15.144.250 (talk) 18:40, 24 June 2015 (UTC)[reply]
Which government ? Which country ? Don't forget that the internet is a global infrastructure, not local or national. Can you think of any situation that would need a message to be broadcast to every person with an internet connection anywhere in the world ? Gandalf61 (talk) 13:54, 24 June 2015 (UTC)[reply]
That could be done in principle, because it is possible for internet service providers to intercept web browser requests and return any information they want to. But setting up a system would mean getting all ISPs to cooperate, in the same way that the Emergency Alert System requires all radio broadcasters to install and maintain the necessary equipment. I'm pretty sure no such system currently exists. Probably the most useful thing the government could do, if it felt such a system to be necessary, would be to ask for cooperation from Google and other search engines, so that they could return an emergency warning along with their search result. In fact such a system already exists, in the form of Google Public Alerts. Looie496 (talk) 14:35, 24 June 2015 (UTC)[reply]
Yes, it is theoretically possible, depending on the country, although the mechanism would be quite different than it is for broadcast media.
Look at this map (the site uses old data, but illustrates the point).
In the United States, it would be particularly difficult as it has far more ISPs than other countries (fewer now than in 2003, I imagine, but still more than anywhere else). On the other hand, many countries have only one, two, or three. In such a case it would be easier for a government to set up infrastructural interventions (which is why the Great firewall of China is possible).
The other way it could be done is on the level of personal computers or local networks. Take for example (using China again), Green Dam Youth Escort. The plan was to require any computer sold in China to have this content-control software on it that would monitor Internet traffic. Assuming an Internet connection, it would be pretty straightforward for there to be a centralized location that could send messages using such software (or other preloaded software). — Rhododendrites talk \\ 14:50, 24 June 2015 (UTC)[reply]
The question was about the Internet, not the Web. I interpret that as popping up a message on the desktops of Internet-connected machines even if they're using a word processor at the time. It would certainly be possible to do that, if there were a standard for it, and legislation forcing vendors to implement it.
Implementing an emergency alert system by spoofing web pages is a terrible idea, and I would hope no country would seriously consider an alert system that worked that way. -- BenRG (talk) 18:26, 24 June 2015 (UTC)[reply]
If you want to pop a message up on a desktop based on an Internet-based message, you *MUST* have a program running on the desktop that is always listening for the message. That means that you have to force everyone to install the alert client software (which must be programmed to run on a multitude of different desktop systems). Then, you have to have them constantly listening on the network - which computers do not normally do. The Internet is TCP/IP-based. It is designed to make a connection, send a request, get a response, and then hang up. It is not designed to listen forever and ever. So, you have three huge obstacles: 1) The software you want doesn't exist. 2) People won't want to install it and most will remove it if it comes on the machine. 3) Computers aren't designed to use the Internet in that way. Of note: There is one way in which this has already been developed and is in use: Bot networks. In a bot network, computer users ignorantly install the client on their computer. The client connects to the server and listens and listens and listens - forever. Then, the server sends a message to the client. The message causes the client to send out tons of spam or do a DOS attack on a server or something like that. So, in one way, you could ask: Why doesn't the government force everyone to join the Federal Bot Network or go to prison? 199.15.144.250 (talk) 18:49, 24 June 2015 (UTC)[reply]

What is URL Canonicalization?

I want to know what is URL Cannonicalization? — Preceding unsigned comment added by Genelia.Abraham (talkcontribs) 13:34, 24 June 2015 (UTC)[reply]

It's a way of changing website addresses - mostly removing funny-characters - so they're more consistent. See URL normalization. 82.152.145.136 (talk) 13:58, 24 June 2015 (UTC)[reply]

It is more commonly called URL normalization. The purpose is to normalize the URL so you can compare two URLs to see if they are the same. Imagine if I tried to impress you by giving you links to twenty different sites, but with URL Canonicalizatin, you normalize them and find out that they all point to the same page. 199.15.144.250 (talk) 13:57, 24 June 2015 (UTC)[reply]
See canonicalization. The basic concept is that when there are different ways to write something, but the meaning is the same, one particular version is chosen as "canonical". In math, 5/2, 10/4, , 2.5, and 2.5000 are all representations of the same number and are precisely equivalent (see note), but unless someone is trying to make a specific point they will use only one of those forms, the one they consider canonical (although I think different people will disagree as to which one that is). (Note: in science and engineering, forms like 2.5000 have a different meaning as they indicate that more significant digits are known. In math, numbers are presumed to be exact.) --70.49.171.136 (talk) 19:18, 24 June 2015 (UTC)[reply]

wordpress theme

1) I want a wordpress theme with home page which only contain different category widget with link to different article, just like apuzz.com ?123.238.96.132 (talk) 17:44, 24 June 2015 (UTC) — Preceding unsigned comment added by 123.238.96.132 (talk) 17:36, 24 June 2015 (UTC)[reply]

2) how to get good backlink for website for free ??123.238.96.132 (talk) 17:44, 24 June 2015 (UTC) — Preceding unsigned comment added by 123.238.96.132 (talk) 17:38, 24 June 2015 (UTC)[reply]

3) is it worth learning bootstrap ?123.238.96.132 (talk) 17:44, 24 June 2015 (UTC) — Preceding unsigned comment added by 123.238.96.132 (talk) 17:39, 24 June 2015 (UTC)[reply]

I added numbers to your Q's StuRat (talk) 19:11, 24 June 2015 (UTC)[reply]