Wikipedia:Reference desk/Archives/Computing/2015 June 19

= 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)

BTW, this is a PC running Windows 7. μηδείς (talk) 02:55, 19 June 2015 (UTC)
 * 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)


 * 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)


 * 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)


 * 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)


 * 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)
 * 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)
 * 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)

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)
 * They might be shortcuts. —SGA314 I am not available on weekends (talk) 13:35, 19 June 2015 (UTC)


 * pardon? --OOPMan (talk) 14:31, 19 June 2015 (UTC)


 * SGA314, do u know how to edit them with any editor by any chance?--Anubi dio cane (talk) 12:42, 20 June 2015 (UTC)
 * 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)
 * 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)


 * Try this:


 * Open Visual Studio.
 * Go to File &rarr; New Project
 * Expand Other Project Types.
 * Choose Visual Studio Solutions &rarr; Blank Solution and click OK
 * Right-click on your solution in the Solution Explorer and choose Add &rarr; Existing Web Site. &mdash;Best Dog Ever (talk) 09:57, 21 June 2015 (UTC)

Signed 16-bit wave file data format
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:

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: 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)

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


 * "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)


 * Looking at the documentation shows there are two squarewave generation methods, square and square-no alias. 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)

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)
 * 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)


 * 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)


 * 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)