Jump to content

Wikipedia:Reference desk/Computing

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 209.149.113.66 (talk) at 14:42, 16 September 2015 (→‎problems with two browsers). 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:


September 10

Image extraction

Is this extractable for download in full resolution (click for zoom)? Neither Dezoomify nor page info in Firefox help. The image seems to be above 2 megapixels. Brandmeistertalk 20:46, 10 September 2015 (UTC)[reply]

I should mention that the picture (although very tasteful and artistic) is decidedly NSFW. Tevildo (talk) 21:34, 10 September 2015 (UTC)[reply]
I stitched the tiles together "by hand" (with a custom Python script) and uploaded the result to File:George Hare - Victory of Faith.jpg. I had to crop out the frame because they're not allowed on Commons. -- BenRG (talk) 22:40, 10 September 2015 (UTC)[reply]
On further experimentation, dezoomify 1.4 will grab the image if you pass the image base URL explicitly, like this:
       dezoomify.py -b http://content.ngv.vic.gov.au/col-images/zooms/Fd100542/ out.jpg
That URL can be found by using Chrome or Firefox's inspector, or by looking for the line var url = '...'; in www.ngv.vic.gov.au/explore/collection/work/4011/. You could fix dezoomify.py by adding something like the following to the image_path_regexes list:
       (r"var url = '(https?://[-\w.]+/col-images/zooms/\w+)/';", 1),
Then the following command line will work:
       dezoomify.py http://www.ngv.vic.gov.au/explore/collection/work/4011/ out.jpg
-- BenRG (talk) 00:40, 11 September 2015 (UTC)[reply]
My stitching revealed that the full-sized image is slightly larger, at 3,238 x 1979 pixels. Brandmeistertalk 13:56, 11 September 2015 (UTC)[reply]
I assume you are stitching together screenshots of the web interface. I get that size too at maximum zoom, but it is just the image I uploaded scaled by around 5/3 horizontally and vertically. There is no more detail, just more pixels. -- BenRG (talk) 19:18, 11 September 2015 (UTC)[reply]

September 11

What does the following base64 encoded PNG image look like?

What does the following base64 encoded PNG image look like?

Extended content
   iVBORw0KGgoAAAANSUhEUgAAAtAAAAOQCAIAAACfGtETAAAAA3NCSVQFBgUzC42AAAAgAElEQVR4
   nOzdT0gcW//v+/Lch0s90D9oZy0YSGfWwUDaWYsZxIxOixvUWTcGEp1phETPyI78SHSmCbh1Zkcw
   tDNb2EFnaQfZGO7vgCUkxFlKSEAHh2vBE9hyOeAd1D4+5arutv/U31XvFz9+PF3J1pW9jX56re/6
   fjsuLy8VAAAAN/03vxcAAADkR+AAAACuI3AAAADXETgAAIDrCBwAAMB1BA4AAOA6AgcAAHAdgQMA
   ALiOwAEAAFxH4AAAAK4jcAAAANcROAAAgOsIHAAAwHUEDgAA4DoCBwAAcB2BAwAAuI7AAQAAXEfg
   AAAAriNwAAAA1xE4AACA6wgcAADAdQQOAADgOgIHAABwHYEDAAC4jsABAABcR+AAAACuI3AAAADX
   ETgAAIDrCBwAAMB1BA4AAOA6AgcAAHAdgQMAALiOwAEAAFxH4AAAAK4jcAAAANcROAAAgOsIHAAA
   wHUEDgAA4DoCBwAAcN0//F4AAADO0I608/Nz839X9ivm/xh4ONDZ2Zm+n/ZvXVAURem4vLz0ew0A
   ANRjGMahdmj+/6uX5i/pJ/rZz7NGPkiqJxWPxwceDiSTyeTtZG+6Nx6Pu7dmCAgcAICgMLcozP+v
   n+i6rjeeJ1qgxtT0/fToyOjAwwG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1vEfNzOdUtwoTjydsD+nhSgijsDRhEaiRqY/M/tiljuuCLj847z9kIX3322qM0l87uXcwqsF75cE
   BAeBoyGNRA2uuSJcqs7y4KJmy/QTfXBosOrd17BMDwdcReC4wY1Rg2uuCK/iRnF

I tried various online tools [1][2][3] to convert it, but those tools all show a half-cut-off version of the original image. My own code, however, manages to both encode and decode it fine. Now I'm kinda stuck since I'm not sure whether it's my own code that's broken or it's the online services that's broken.

Here's the Java code I used to encode it and decode it:

               mBitmap = // image from somewhere
               ByteArrayOutputStream bao1 = new ByteArrayOutputStream();
               mBitmap.compress(Bitmap.CompressFormat.PNG, 10, bao1);
               byte[] ba11 = bao1.toByteArray();
               result = Base64.encodeToString(ba11, Base64.DEFAULT);
               byte[] decodedString = Base64.decode(result, Base64.DEFAULT);
               Bitmap decodedByte = BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length);

My other car is a cadr (talk) 13:35, 11 September 2015 (UTC)[reply]

The last line is 63 symbols long, but Base64 text must be a multiple of 4 symbols long. It can't be fixed by adding = because the final F ends with a 1 bit. If I decode the rest, I get a truncated PNG file (it ends halfway through an IDAT chunk). Something is truncating your Base64 output to about 4000 characters. -- BenRG (talk) 18:51, 11 September 2015 (UTC)[reply]
Thank you very much!! My other car is a cadr (talk) 04:23, 12 September 2015 (UTC)[reply]
BTW, since you said your own code produced the complete output this may be a useful time to consider good testings practices. I presume either your code was flawed and wasn't taking the correct input, or you weren't feeding it the correct input. A good way to try and avoid the former is to make sure you test different inputs. For example, if you purposely cut off the BASE64 output and your code was still producing the exact same output, there must be something wrong with your code. For the later, remember to always output what you are testing to a file yourself after you've used it for testing elsewhere so that you can be fairly certain you are testing the same data. (If you're testing locally then just make sure you always use the same file, altho making a copy can be useful to reduce the possibility of mistakes.) Nil Einne (talk) 16:25, 12 September 2015 (UTC)[reply]
Resolved

September 12

How to repeat a word 'x' times...?

Hi, I need to repeat a specific word 'x' times to use in Typography. I've searched online for such word generators, but couldn't find any. Can anyone suggest some..?--Joseph 09:32, 12 September 2015 (UTC)[reply]

You can do this in many scripting languages and mathematical software, for example, in AlgoSim (www.algosim.se), see example.
Perhaps the simplest way is to use your web browser. Create a file named strdup.html with the following contents:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>String duplication</title>
</head>

<body>

<div id="divResult"></div>

<script>
var str = prompt("Enter string to duplicate:");
var num = prompt("Enter number of iterations:");
var result = "";
for (i=0; i<num; i++) {
  result = result + str;
}
document.getElementById("divResult").innerHTML = result;
</script>

</body>
</html>

Now, open this file in your favourite web browser.
--Andreas Rejbrand (talk) 10:45, 12 September 2015 (UTC)[reply]
Thanks a lot Andreas. It worked.--Joseph 11:00, 12 September 2015 (UTC)[reply]

 Done

Does it have to be a repetition of the same word? Normally, if you just need a dummy text to fill a layout, you would be using some lorem ipsum type of text. There are lots of generators online for this type of text.--YX-1000A (talk) 23:43, 12 September 2015 (UTC)[reply]

Photo stitching program

I'm looking for a free automatic panoramic photos stitching tool which stitches several photos into one. My OS is Windows XP 32-bit. What I have here are several overlapping photos I took of a lake from out of a train as it was passing by the lake. --80.187.98.23 (talk) 11:04, 12 September 2015 (UTC)[reply]

Hugin is very good, but it doesn't like sets with large overlap. You will need to use the older 2013.0 release, as newer ones use an API that XP doesn't support. LongHairedFop (talk) 12:14, 12 September 2015 (UTC)[reply]
I use - Panorama photo stitcher quite a lot. It is not very intuitive but Hugin has a lot of other very usful tools. So, I think it is work persevering with the initial step learning curve.--Aspro (talk) 12:15, 12 September 2015 (UTC)[reply]
Another thought is, as you're using Windows, it is worth upgrading it to work like a modern computer by installing a Virtual machine on it, so that you can take advantage of faster running Linux based free applications like Fotoxx. Photo stiching is dead easy on this. It dead easy to instal to. It has a lot of other free tools as well.--Aspro (talk) 12:49, 12 September 2015 (UTC)[reply]

Increasing the Probability of Some Measurement - Quantum Computation

Assuming I have some qubit ,, that I want to know whether it is a superposition of the vectors and , or just . What can I do to increase the probability to measure if indeed is a supeposition of and , and to measure else? 176.106.227.214 (talk) 17:30, 12 September 2015 (UTC)[reply]

If you think the qubit is in the state , you can apply the gate , which will take that to . Then measuring in the computational basis will return 0 with probability 1 if it was indeed in that state. -- BenRG (talk) 08:00, 13 September 2015 (UTC)[reply]
How can I get this gate from the "standard" set of universal gates (CNOT, Hadamrd, and )? (by the way, I need to do this efficient. That is, using as less "standard" quantum gates as possible). 185.32.179.23 (talk) 10:47, 13 September 2015 (UTC)[reply]

More formally, I look for a quantum circuit that uses the gates CNOT, Hadamrd, and only, and uses these gates as less as possible and satisfies that on input , if , then the output is in probability . Else, the output is in probability . 185.32.179.145 (talk) 12:53, 13 September 2015 (UTC)[reply]

If you expect to need to find efficient quantum circuits with these 3 gates often, it might be worth investing some time to write a computer program to enumerate all possible circuits with 1,2,3... gates, test each one for the property you want, and return the first one that passes the test. About your current question, I worry about the requirement "and to measure else", which BenRG didn't address. I think it makes increasing the probability to measure impossible. Egnau (talk) 15:09, 13 September 2015 (UTC)[reply]
As Egnau suggested, that can't be done. A single-qubit state can be represented by a point on the Bloch sphere, with as the north pole and as the south pole. The states with are the entire sphere except the south pole. The states that will measure as with probability >0.5 are the states north of the equator. Single-qubit gates are rigid rotations of the sphere. There's no rigid rotation that will move all points except the south pole north of the equator.
Also, is a π/4 rotation around the polar axis, and the Hadamard gate is a 180° rotation around an axis inclined at 45° to the polar axis. It is probably possible to approximate any rotation of the sphere to arbitrary precision with combinations of those two operations, but the approximation will be long and ugly in most cases. It makes more sense to design for a quantum computer with a less awkward set of fundamental gates (such as R(φ) for arbitrary φ). -- BenRG (talk) 17:27, 13 September 2015 (UTC)[reply]
What happens if we add another input qubit . So now, we're looking for a rotation of in Bloch Sphere such that after the rotation value will be as described above, and we don't care what will be the value of . Is it possible? What transformation can do it? Thank you! 176.106.227.44 (talk) 07:30, 16 September 2015 (UTC)[reply]

Software documentation of libraries, DLLs and such as a source of bugs

Is software documentation of libraries, or the lack thereof, a common source of bugs on the software built using those libraries?

Is software documentation necessarily defective, since it's written in natural languages, which are less well-defined than formal languages? However, can this defectiveness cause defective software? --YX-1000A (talk) 23:20, 12 September 2015 (UTC)[reply]


September 13

Wired problem in win 10

Don't know what is the right terminology in English to use in Google so I ask here:

In folders with much images, I can't navigate with right and left arrows between images --- If I do, it navigated randomly and not logically as I had with windows 7. This problem damages my work, please help, — Preceding unsigned comment added by Ben-Yeudith (talkcontribs) 02:01, 13 September 2015 (UTC)[reply]

I'll bet it's not random, but in some order like by file creation date. Of course, that doesn't actually solve the problem. StuRat (talk) 23:28, 13 September 2015 (UTC)[reply]

what is the reason why the games in the PSN store are so expensive?

the companies don´t need to publish and press any blu-ray and print a booklet and a dvd cover and it is not necessary to hold and keep them in any store or hall waiting for real customers... but the psn games in the PSN store are every time more expensive. --Motorolakzrz (talk) 03:16, 13 September 2015 (UTC)[reply]

Copied from an answer above: Because people pay for it? Costs do not matter. You pay the market price no matter what it takes to produce something.--YX-1000A (talk) 03:52, 13 September 2015 (UTC)[reply]
If you had perfect competition, then the price should indeed be driven down close to the production cost (or even below, in certain circumstances, like a price war). So, the high prices imply a lack of competition, perhaps for legal reasons like copyrights. StuRat (talk) 23:39, 13 September 2015 (UTC)[reply]
The cost of bulk duplicating a DVD, with a nice case and a cover picture for 10,000+ quantities is about $0.25 - the cost of offering a download is not zero, but it's certainly less than $0.25.
The other $30, $40, $50...whatever is the cost of employing several hundred developers for several years - paying for some of the cost of console manufacture (consoles are sold at a loss, which is made up from game sales) - paying to license the console toolkit and whatever "middleware" is used. Typically there are costs to license music, pay voice actors, you name it. There is also the hidden cost of paying for the games you made that were flops and made a loss.
Overall, only a very tiny percentage is the cost of making the physical disk - so you wouldn't expect a whole lot of difference between the two prices.
SteveBaker (talk) 04:28, 13 September 2015 (UTC)[reply]
One reason for the price difference is that some stores choose to take a hit on their margin in order to sell a product cheaper than others and enable them to make money by moving large volumes of stock. - X201 (talk) 06:02, 13 September 2015 (UTC)[reply]
That may be the reason some of the time - but definitely not always: last week, I wanted to buy a complete set of StarWars movies. Amazon.com charge $89.99 to stream all six movies online - or $87.99 for physical DVD's with free shipping - both have 9 hours(!) of bonuses, etc. So it's a similar pricing deal. But in this case, Amazon is hardly competing against itself! It's hard to see why they'd prefer me to buy the physical disks. Clearly it's cheaper to stream than to manufacture physical disks and pay shipping, but the price doesn't reflect that. Perhaps their concern is that in selling me the online version (which I can watch as many times as I want) - they are signing up to give me a potentially unlimited amount of bandwidth if I wanted to watch those same movies over and over. Maybe shipping the physical disks really is cheaper? SteveBaker (talk) 06:43, 13 September 2015 (UTC)[reply]
To someone who has enough junk in their lives, $90 to stream might sound better than $88 for a bunch of discs with a bunch of mediocre cast interviews. Remember also that the price for the retail discs are set as part of a market; if one retailer is selling discs for $89, you probably want to sell for $88 or less if you want to get a bunch of sales (obviously price-setting is more complex than "always must beat your competitor", but that's an okay start for this discussion), whereas the online streaming price is negotiated between Amazon and the rightsholder; they don't get to set the price themselves. Wholesale discs are always significantly cheaper than their MSRP because retailers need to make money on the margins to pay for the costs of storing them, displaying them in a storefront, etc, so retail discs probably cost Amazon less (before the costs of warehousing, fulfillment, etc) than the digital rights, as well. 97.90.151.30 (talk) 09:48, 13 September 2015 (UTC)[reply]

To your star wars problem I would guess that George Lucas is the reason. He isn´t allowing amazon to sell the streams less than your 89,99. On the DVD layers he has no rights any more, amazon could resell them for 1 cent if they want without having problems, but selling the stream for 1 cent would make Lucas angry...--Motorolakzrz (talk) 07:27, 13 September 2015 (UTC)[reply]

Discrete Fourier Transform Trouble

I need to do a 2-D Fourier Transform on a unit sphere. It has two components, the first one is a standard Fourier Transform. The input 2-D image (function) is experimental, therefore I need to use Discrete Fourier Transform. There are many published algorithms for Fast Discrete Fourier Transform (FFT) and even C and Fortran codes. I tested several and found them performing admirably. When I use the Inverse Transform I restore the original image (function) on all parallels (theta angles). It is not where my problem lies.

When I add the second component (Orthogonal Polynomials) something happens and I cannot restore the original 2-D function. So, I decided to try not FFT but direct DFT coded from a formula. I got a very strange result. The formulas for DFT are:

Forward Transform:

(1)

Inverse Transform:

(2)

To demonstrate the problem I am going to use Wikipedia's Blackman-Harris Window. The Fortran code for the function is:

REAL*8 function blackmanHarrisWindow (k, N)
  REAL*8 :: PI
  integer*4 :: k,N,N1
  PI = 3.1415926535897932384626433832795
  N1 = N-1HERE
  blackmanHarrisWindow = 0.35875-0.48829*cos(2.0*PI*k/N1)+0.14128*cos(4.0* & 
                         PI*k/N1)+0.01168*cos(6.0*PI*k/N1)
end function 

I however found that the graphic generated by this code, posted on MediaFire, BlackMan-Harris-Original.png file (HERE) (In Camera folder) is more reminiscent of the next listed Flat Top Window.

GFortran code to handle the transform is here:

program main
  use librow_fft_mod    
  DOUBLE COMPLEX, DIMENSION (:), POINTER :: Input, Output
  REAL*8 :: xx, blackmanHarrisWindow
  integer :: NN = 1024, jj=1, sv, ii
  ALLOCATE (Input(NN),Output(NN))
  do while (jj < NN)                
    xx = blackmanHarrisWindow (jj,NN)
    Input(jj) = CMPLX (xx,0.0D0)     
    jj = jj + 1
  enddo
  call fourierStraight (NN,Input,Output)  
  Input(:) = CMPLX(0.0D0,0.0D0)
  call fourierBack (NN,Output,input)
end program main

librow_fft_mod is an interface file for dummy arrays Input and Output.

The code for Forward and Inverse DFT follows:

subroutine fourierStraight (NN,Input,Output)
! a subroutine to calculate Fourier Transform without invoking the algorithm of FFT
! http://www.robots.ox.ac.uk/~sjrob/Teaching/SP/l7.pdf    pg 85
  integer*4, intent (in) :: NN
  DOUBLE COMPLEX, DIMENSION (:), Intent (IN), POINTER :: Input
  DOUBLE COMPLEX, DIMENSION (:), Intent (OUT), POINTER :: Output
  integer*4 :: kk,ll
  DOUBLE COMPLEX :: res
  real*8 ::  pi2 = 6.28318530718
  Output(:) = DCMPLX (0.0D0,0.0D0)
  do ll = 0,NN-1
    res = DCMPLX (0.0D0,0.0D0)
    do kk = 0,ll
      res = res + real (Input(kk+1)) * DCMPLX (DCOS (kk * pi2/NN), - DSIN (kk * pi2/NN))
    enddo
    Output(ll+1) = res
  enddo 
end subroutine fourierStraight
subroutine fourierBack (NN,Input,Output)
! http://www.robots.ox.ac.uk/~sjrob/Teaching/SP/l7.pdf     pg 86
! not FFT - straight calculations.
  integer*4, intent (in) :: NN
  DOUBLE COMPLEX, DIMENSION (:), Intent (IN), POINTER :: Input
  DOUBLE COMPLEX, DIMENSION (:), Intent (OUT), POINTER :: Output
  integer*4 :: kk,ll
  DOUBLE COMPLEX :: res
  real*8 :: pi2 = 6.28318530718
  Output(:) = DCMPLX (0.0D0,0.0D0) 
  do ll = 0,NN-1
    res = DCMPLX (0.0D0,0.0D0)
    do kk = 0,ll
      res = res + Input(kk+1) * DCMPLX (DCOS (kk * pi2/NN), DSIN (kk * pi2/NN))
    enddo
    Output(ll+1) = res/NN
  enddo
end subroutine fourierBack

You can see that the restored function differs from the original. It is again HERE, Blackman-Harris-Restoration.png. (In Camera folder)

If you compare the code for both functions with the original formulas you can see that I dropped one multiplier, the factor n which in the code is represented by integer (Fortran is case insensitive and it necessitated the substitution). If you include this factor in the formula the restored function appears to be very bizarre. The image is HERE (File3.png In Camera folder)

The code for the changed function looks like this (for Forward Transfer):

do kk = 0,ll
  res = res + real (Input(kk+1)) * DCMPLX (DCOS (ll*kk * pi2/NN), - DSIN (ll*kk * pi2/NN))
enddo

Similarly for the Inverse transfer the multiplier is added.

WHAT AM I DOING WRONG?

I am posting here because I know StuRat, for instance, does GFortran coding and he gave me the original push 2 or 3 year ago when I started using it. So, I hope to find some help here. All calculations are done under Ubuntu 14.04 operating system. Thanks. --AboutFace 22 (talk) 21:21, 13 September 2015 (UTC)[reply]

I don't think a real*8 (8 bytes) will store PI to the precision you've defined. I suggest you print it out to see what precision has been lost. Would that loss of precision be a potential source of the problem ? StuRat (talk) 22:52, 13 September 2015 (UTC)[reply]

You are correct. The precision is lost, I mean real*8 gets its 14 digits I think, that's it, but this is plenty for the computations at hand. Even single precision would be sufficient. --AboutFace 22 (talk) 23:00, 13 September 2015 (UTC)[reply]

OK, then on to debugging. Do you have an example of some test data where you know what the correct transform should be ? If so, hopefully you could compare the results step by step with what you get, and determine where the difference originates. StuRat (talk) 23:18, 13 September 2015 (UTC)[reply]

Well, the code is elementary. I hoped that someone would take a fresh look, yourself including. Not much of debugging is needed here, I think. — Preceding unsigned comment added by AboutFace 22 (talkcontribs) 00:05, 14 September 2015 (UTC)[reply]

@AboutFace 22: I haven't checked Fortran syntax issues or looked at the Mediafire files you uploaded, which I couldn't access, but in terms of the math: your kk loops should run from 0 to NN-1, and not from 0 to ll-1. And you need to restore the "n"-multiplier (ll in your code) in the term, else you are not computing the DFT (ditto for inverse). Abecedare (talk) 14:26, 14 September 2015 (UTC)[reply]

@Abecedare, thank you for the comment. I did not realize the files I uploaded are not really accessible by anyone else. Kind of a bummer. I will be able to think about what you said in about 6 hours, now at work. It seems you are correct. I've felt it was something really silly I missed. --AboutFace 22 (talk) 16:42, 14 September 2015 (UTC)[reply]

@Abecedare, thank you much. Now it works perfectly well. I wonder how I missed it. --AboutFace 22 (talk) 00:32, 15 September 2015 (UTC)[reply]

Avprobe: Peculiar piping?

I am trying to grep the output of avprobe, but something like

avprobe file.mp4 | grep <keyword>

is not working. I know that I could do

avprobe file.mp4 &>> file.txt && grep <keyword> file.txt

but I wonder whether this can be simplified. I also want to know why the firs option does not work.--Scicurious (talk) 21:52, 13 September 2015 (UTC)[reply]

Try
    avprobe file.mp4 2>&1 | grep keyword
-- Finlay McWalterTalk 22:38, 13 September 2015 (UTC)[reply]
Thanks, that worked. But why does the program send the juicy information of the mp4 to stderr? stdout is just "# avprobe output." stderr gets the information about type of media, duration, sampling, frames, bit-rate, ... .--Scicurious (talk) 02:32, 14 September 2015 (UTC)[reply]
Yes, I think the program is wrong to send that info to stderr rather than stdout. avprobe is a pretty thin skin over libav, and (because of its nature as a streaming library) they may have adopted the standard that stdout is for actual media streams and stderr for all printing. -- Finlay McWalterTalk 08:20, 14 September 2015 (UTC)[reply]

Windows 10 memory hogging

I have a PC, a Hewlett Packard laptop ENVY series computer. It came with a 930 gigabyte hard drive and 8 gigs of ram. When I got it at about the end of 2012, it came with Windows 8. I went through a number of upgrades and I had about 100 gigabytes in use then, that is, about 830 gigabytes free. I recently upgraded to Windows 10, which is where my problems started. After I upgraded, which took about 45 minutes, it seemed successfully and at that point the computer had 715 gigs free; the computer seemed to be working with windows 10 okay. I let the computer go to sleep, and didn't come back to it for about 3 days. When I "woke" it, I saw that my disk drive said it was almost entirely full – there was a warning in the screen that said "Let's click on storage to see what is taking up so much space". I checked and the entire hard drive was full, except for a few megabytes (I think it was about 5). I have restarted multiple times, no difference. It seems impossible for Windows 10 to actually be taking up this much space. Any ideas what might be going on?--108.54.167.196 (talk) 23:19, 13 September 2015 (UTC)[reply]

Just to clarify, there's not actually a problem with the RAM/memory being full, is there ? It's just disk space that's full, correct ? I would look for a huge recently created file, or maybe thousands of small files recently created. The name(s) of that file(s) might be a clue.StuRat (talk) 23:22, 13 September 2015 (UTC)[reply]
Yes, that is correct: 8 gigs off ram are still listed as free. What would be the most exedient way to do that? I'm sorry but I'm not the most experienced.--108.54.167.196 (talk) 23:28, 13 September 2015 (UTC)[reply]
A visual representation (like a pie chart) of the space taken up by each folder would help. I'm not sure if Windows 10 offers that option. Ideally, you could compare a snapshot before and after and see which folder got bigger, then repeat the experiment looking at sub-folders in that folder, etc. I'm assuming here that you have some way to go back before the space was eaten up. Did you try emptying all the temp folders ? StuRat (talk) 23:45, 13 September 2015 (UTC)[reply]
I agree. WinDirStat is a good program for finding out what folders/files are large. But the question is why it happened in the first place - it may happen again if you clean up the files.. (This isn't normal.) Bubba73 You talkin' to me? 00:01, 14 September 2015 (UTC)[reply]
Yes, it will happen again, and that will help them track down the folder(s) and file name(s). Once they know that, then we might be able to figure out what's creating those files and disable it or fix it. StuRat (talk) 16:29, 14 September 2015 (UTC)[reply]

September 14

Is steganography cryptography too?

Does the term cryptography includes all hiding of information, including steganography? At least, analyzing the roots of the words, the logical consequence would be that everything written and hidden is cryptography. Is there any other hiding of information that's not cryptographic?--3dcaddy (talk) 02:02, 14 September 2015 (UTC)[reply]

Our article Steganography makes a distinction between steganography and just cryptography, treating them as separate. But your question is semantic, I don't think it would be wrong to study steganography as part of cryptography discipline. Vespine (talk) 06:57, 14 September 2015 (UTC)[reply]
It was a semantic question, i.e., a question about the meaning of a word. That doesn't mean there's no right answer. The cryptography article cites RFC 2828, which says that cryptography doesn't include steganography, but cryptology may include both. I think that's consistent with the way professionals use the words. -- BenRG (talk) 17:24, 14 September 2015 (UTC)[reply]
For future reference, RFC 4949 (2007) superseded RFC 2828 (2000); (but for these specific terms, both documents are nearly identical). Nimur (talk) 21:08, 14 September 2015 (UTC)[reply]
As mentioned above, it is a semantic argument. To nit-pick the semantics, cryptography isn't just about hiding information. It is about hiding it so that it can be revealed by someone who knows how to reveal it. If it is just a matter of hiding it, then writing a note on a sheet of paper and then burning the paper would hide it. There is no known method to get the information back. So, it is not cryptography. 199.15.144.250 (talk) 11:47, 14 September 2015 (UTC)[reply]

2602:304:AB3C:2979:3131:A9BF:551A:572F (talk) 02:31, 14 September 2015 (UTC)I am looking to possibly test some new drivers for a fiber optic cable for a data transfer card attached to a PCIe port. Any suggestions for cables or anything else?[reply]

I can't actually work out what you are asking. You are testing drivers for a fiber optic cable? or testing the card? Does the card already have a connector? That would seem to limit what cable you can use? Then in the heading you say "for audio" but in the question you say for "data transfer"? Have you seen our Optical_fiber_connector article? Does that help? Vespine (talk) 04:22, 15 September 2015 (UTC)[reply]
See also S/PDIF if it is audio. --Hans Haase (有问题吗) 16:52, 15 September 2015 (UTC)[reply]
To me, the main advantage of fiber optics is that the signal degrades less over long distances. So, if you are just talking about speaker wires, the distance there is too little for it to matter. Indeed, the signal degradation from converting the electrical signal to light, then back to electrical at the speakers, is likely to be greater. A possible exception might be something like a building public address system, where the wires do cover long distances. StuRat (talk) 16:58, 15 September 2015 (UTC)[reply]
Just to be pedantic, in the digital domain, the signal should not degrade at all in conversion from "electrical signal to light". Unless your audio source is analogue, such as a vinyl record or cassette tape in which case it needs to pass through an ADC. In the case of a sound card, the signal source is digital so the conversion from electricity to light is bit accurate. Where you can get degradation is at the DAC which indeed you should optimally only go through ONCE on the way to the speakers. i.e. you wouldn't take the ANALOGUE output of the sound card and convert it back to digital again to transmit it some further distance (if you can help it), far better would be transmitting the digital signal as far as you need to in the 1st place. Vespine (talk) 23:29, 15 September 2015 (UTC)[reply]

Installing stunnel on DD-WRT

I followed this guide[4] to install DD-WRT on my router. Is there some way to install stunnel in DD-WRT? My other car is a cadr (talk) 13:07, 14 September 2015 (UTC)[reply]


September 15

problems with two browsers

In both cases I have the latest version of the browser, which I installed after the problems occurred, but the problems persisted.

1. The first issue is probably virus-caused. In Chrome only (not Firefox), when I typed in en.wikipedia.org, a red screen came up screaming I was going to a page with malware! It was clearly malware itself, and it wouldn't let me cancel it, so I stopped Chrome using Task Manager. Note that I could load other pages into Chrome, but when I tried en.wikipedia.org again I got yet a DIFFERENT warning screen. One was trying to emulate the old Windows blue screens. Trying again, I got redirected to various (what I think of as) adware sites. I didn't click on any of them but kept on using Task Manager. I trying re-downloading Chrome but the same thing keeps happening. Any ideas?

2. With Firefox I think I may have received an automatic update that hides the upper control lines unless you pass the cursor over them. Is it true that Firefox now works like this? I could live with that, but it also hides the system tray below, thus keeping me from other programs I'm running. No amount of probing and clicking in the lower part of the screen has allowed me to see the system tray. Is that normal? I can get around using ALT-ESC, but that is obviously not acceptable.

3. Also, earlier, Firefox lost my saved tabs and apologetically offered to restore them. This has happened before and the tabs were restored without problem, but now it is unable to do it. Could Firefox be corrupted? If so,is there anything I can do?

Can you help? Thanks, --Halcatalyst (talk) 00:52, 15 September 2015 (UTC)[reply]

I numbered your problems. Number 2 is probably Firefox being in full-screen mode. Try pressing F11. For number 1, I would try deleting your Chrome profile if there's nothing in it that you care about saving (stored passwords, browser history, etc.). On Vista and above, press Win+R to bring up the Run dialog, type "%LOCALAPPDATA%\Google\Chrome", and delete the "User Data" folder. -- BenRG (talk) 17:41, 15 September 2015 (UTC)[reply]
Firefox works now, but Chrome still delivers the malware. --Halcatalyst (talk) 03:55, 16 September 2015 (UTC)[reply]
Given what is happening with Chrome, is it safe for me to run? --Halcatalyst (talk) 12:48, 16 September 2015 (UTC)[reply]
You need to find the malware that is acting as a Chrome plugin and remove it. Chrome isn't the malware, so reinstalling that won't help. You've installed malware separately that is working with Chrome. 209.149.113.66 (talk) 14:41, 16 September 2015 (UTC)[reply]

Image difference between photographing instead of scanning

Can the recipient of some images notice whether they were scanned or photographed? He expects scanned images of some documents.

The photos would be taken placing the documents below a glass plate and the camera attached to a tripod. --Scicurious (talk) 08:04, 15 September 2015 (UTC)[reply]

I can only guess but I think reflections off the glass plate could reveal that the image was not created using a scanner. The plane of the document would also have to be parallel to the plane of the light-collecting element of the camera to prevent the document from appearing tapered. Bus stop (talk) 08:18, 15 September 2015 (UTC)[reply]
He should be able to tell the difference simple by looking at the EXIF incorporated into the image file. The recipient may well have asked for scanned images just as a convenient turn of phase, so just ask if photographed copies are acceptable -as that is all you can supply. Remember that you may have to crop and reduce the image to a size suitable for emailing.--Aspro (talk) 13:38, 15 September 2015 (UTC)[reply]
"Not photographed" commonly means "we won't accept a photo from your phone." Technically, a scan is a very slow progressive photograph. There is no reason a scanner couldn't just snap a single photo. It just isn't how they are designed. 209.149.113.66 (talk) 14:50, 15 September 2015 (UTC)[reply]
A digital camera of 2 Mega pixels can take a readable picure of a letter or DIN A4 size paper when fitting zoom or distance to small borders on the picture. Scanners for home usage might be slower. In history Germany enforced the scanners to be slower that needed by law due an controversal argumentation about copyright. While the flat scanner returns a proper and consistant image in measure and brightness, the camera does anything. When trying to process OCR form cameras picture, it may fail due light conditions. --Hans Haase (有问题吗) 16:49, 15 September 2015 (UTC)[reply]

Underscore as (not) a word separator

Is there any technical or historical background why underscore is treated like a letter but not as a typographic symbol and word separator? E.g. foo-bar, foo.bar, foo&bar, foo!bar, foo"bar etc. are two words but foo_bar is always one.--Lüboslóv Yęzýkin (talk) 11:32, 15 September 2015 (UTC)[reply]

Not always two words: foo-bar is a single word e.g. for LISP programming language (see spinal-case / kebab-case in Letter case#Special case styles) and foo.bar is a single word e.g. for XQuery. --CiaPan (talk) 12:44, 15 September 2015 (UTC)[reply]
Treated by what? It depends which application and operation you're using. If you open the edit window on this section and move the cursor forward word by word (CTRL->) you will find ALL those symbols are treated as word separators.--Shantavira|feed me 13:12, 15 September 2015 (UTC)[reply]
Treated by their respective interpreters/compilers. --CiaPan (talk) 13:46, 15 September 2015 (UTC)[reply]
I think you have it backwards. In English, the hyphen is used in compound words, but not the underscore. StuRat (talk) 13:42, 15 September 2015 (UTC)[reply]
This is the computing desk so I assume the poster has computing in mind, especially Identifier#In computer languages. foobar examples is also mainly used in computing. PrimeHunter (talk) 13:53, 15 September 2015 (UTC)[reply]
Well, in the 1970s when I was using COBOL, hyphens were used within identifiers, in keeping with the idea that the syntax of the language would resemble English. We didn't have underscores on our keypunches anyway (see Asmrulz's item below). You would write things like SUBTRACT CUSTOMER-DISCOUNT FROM COST GIVING FINAL-COST. The hyphen was also used as a minus sign if you used the COMPUTE keyword, but in this case you had to set it off with spaces: COMPUTE COST - CUSTOMER-DISCOUNT. (I forget whether you used GIVING or the = sign with COMPUTE in order to tell it where to store the result.) --65.95.178.150 (talk) 00:04, 16 September 2015 (UTC)[reply]
Just an observation: in MATLAB, '-' is reserved for subtraction, so "foo-bar" is interpreted as the difference between two variables, while "foo_bar" is a single name. I have no ref, but this seems to be a reasonable approach and good technical reason: many (most? all?) of your other examples have prior restricted use in at least some contexts, while '_' was still fairly free. When designing a new language/parser, etc., my understanding is that some Operator_overloading is tolerable, but most people agree it's best to avoid it when possible. SemanticMantis (talk) 14:38, 15 September 2015 (UTC)[reply]
Ken Thompson used regular expressions before and during development of Unix. His personal taste is to make compound words using underscores, not camel-case. So, when we used the "word character" option in regex, he included the underscore. In his use, the underscore was part of a word. Regular expressions, in common use, are descendant from Ken Thompson's implementation. The two main variations we see are POSIX (Thompson's format) and Perl - which also treats _ as a word character. 209.149.113.66 (talk) 14:39, 15 September 2015 (UTC)[reply]
"The common punched-card character sets of the early 1960s had no lower-case letters and no special character that would be adequate as a word separator in identifiers.[citation needed] IBM's EBCDIC character-coding system, introduced in 1964 at the same time as the IBM System/360 computer series, uses 8 bits per byte. A modest increase in the character set size over earlier character sets added a few punctuation characters, including the underscore, which IBM referred to as the break character, but not lower case (later editions of EBCDIC added lower case). IBM's report on NPL (the early name of what is now called PL/I) leaves the character set undefined, but specifically mentions the break character, and gives RATE_OF_PAY as an example identifier.[1]"
I'd speculate the underscore was chosen as an intra-word separator simply because it looks like a blank without being a blank and (due to its recent history) without having the cognitive baggage as carried by the dash and other punctuation (or, as has been mentioned, some prior use, e.g. "-" as the minus operator, "." to access struct members, "&" for bitwise and, etc) Asmrulz (talk) 21:05, 15 September 2015 (UTC)[reply]

Troubleshooting an LCD Display

I have a DCM16433 16x4 LCD display that, for the life of me, I cannot interface with my Arduino. Right now, I have removed the Arduino from the equation, to see if the LCD works by itself. I have it wired to +5 DCV and ground, and the contrast pin wired to a 10k pot. When I turn on the power, I get nothing "onscreen", no matter what position the pot is in. I swapped the LCD out for another one, and I saw the underscore character onscreen, which means it works. Is there anything else I can do to verify the LCD just doesn't work before I order another one? My only concern is that the LCD I swapped in is hooked up to a 3-pin serial controller (+5, ground, and data), while the one that isn't working is on a 14-pin board. I feel like I'm missing something--in my experience, components are very rarely just bad; but I don't know what else to check. OldTimeNESter (talk) 23:13, 15 September 2015 (UTC)[reply]

'Air' and or 'space' weather simulatiors and designing softwares

What's the best software(s) to create things like this?

Simulation of air flow/fly testing is desirable for bike(s), car(s), plane(s), building(s) and spaceship(s). Can someone help me please? I'm looking for something/a software(s) i.e. extremely good, with which I can stick by as I don't ever wish to worry or change it in my lifetime after learning it, just wish to update it to a newer version... -- Space Ghost (talk) 07:20, 16 September 2015 (UTC)[reply]

There are many pieces of software to fit all budgets. Search for "Computational Fluid Dynamics". You will find open source, affordable, and extremely expensive softwares; choose one which suits your needs. Autodesk have CFD software with a free trial. This might work for you. 217.158.236.14 (talk) 09:53, 16 September 2015 (UTC)[reply]

Why Wikipedia uses paid SSL certificates

Wikipedia uses GlobalSign certificates that costs a lot. Why it doesn't use the free certificates of StartSSL? Hunsu (talk) 09:48, 16 September 2015 (UTC)[reply]

It is all about security. You also assume that Wikimedia didn't negotiate a deal with GlobalSign. The lesson is that even on the internet, you get what you pay for. Want an example, Google for GoDaddy nightmares and you'll have a day full of anecdotes to read. Now, try Network Solutions. Hmmm - mostly just user idiocy, not Network Solutions providing poor service. 209.149.113.66 (talk) 12:15, 16 September 2015 (UTC)[reply]
StartCom suggests the free certificates offered are very limited and unlikely to be suitable for the Wikimedia Foundation. Also why do you say GlobalSign certificates cost a lot? Their website [5] says may be $2,297 for 3 years for a simple set up. The WMF probably has more complicated needs but even $25k is frankly chump change to the WMF.

P.S. To be clear, I'm not suggesting the WMF does, or should, just waste money. But you have to consider that when you're a large foundation with operating budgets in excess of $50 million, supporting quite a few different domains most with many unique subdomains what may seem like a lot to an individual may not seem quite so much. And other stuff like support, feature set, bundled services (does the WMF get their certificates and domain management from the same company?), support, past experiences etc will likely significantly come in to play. Note also it's likely this sort of stuff is mostly managed by paid staff, probably higher level ones since it's important. So wasting many hours on it isn't cheap, not to mention the negative effect on the people they're trying to reach caused by any problems.

Nil Einne (talk) 14:27, 16 September 2015 (UTC)[reply]

Mail list display in online Outlook 365

So my work uses the online version of Outlook 365 as their mailing program. Recently, the line spacing on the mail list (to the left of the reading pane) has gotten much bigger, meaning I can only see 10 or so mails, even on my 23" monitor. I can't seem to change the line spacing in any of the display option, and google is failing me. Help? 131.251.254.154 (talk) 10:00, 16 September 2015 (UTC)[reply]

Using it also and have had this problem. Try the following . . .
  • On the left, click a particular folder or sub-folder (e.g. Inbox)
  • At the top, go to VIEW
  • At top left, click Change View
  • You're probably currently in the first of 3 choices, "compact"
  • Change this to the second choice, "single"
You'll probably have to do this separately for each folder and sub-folder. Hope this works/helps {The poster formerly known as 87.81.230.195} 185.74.232.130 (talk) 13:57, 16 September 2015 (UTC)[reply]