Wikipedia:Reference desk/Archives/Computing/2012 June 20
Computing desk | ||
---|---|---|
< June 19 | << May | June | Jul >> | June 21 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
June 20
[edit]inetrnet service
[edit]does inter service needs any change to be made
- Well my internet service certainly needs some improvement, but are you asking about the internet in general? Dbfirs 07:42, 20 June 2012 (UTC)
- Yes:
- 1) Faster
- 2) Less monitoring of my traffic
- 3) Less government intervention
- Other than that, it's perfect.
- Zzubnik (talk) 09:55, 20 June 2012 (UTC)
- 1) Perhaps it could be more secure, so hackers can't take down the Internet whenever they please.
- 2) It is currently largely controlled by the US (which created it as DARPA Net) and everyone else worries about that. (That the US could cut them off as part of a boycott, etc.) StuRat (talk) 16:29, 20 June 2012 (UTC)
- That may very cute if they tried. I can see the headlines now: "Gamblers and pedophiles join in violent protests against anything USA around the world. For the common good of restoring the internet."--Canoe1967 (talk) 19:45, 20 June 2012 (UTC)
- I doubt if it would be used lightly. Perhaps against China, if they invaded Taiwan, for example. StuRat (talk) 19:51, 20 June 2012 (UTC)
Bypass VPN for most traffic?
[edit]Is it possible to have a VPN connection to my work servers from home which would only enable me to access my files, and not putting all the rest of my traffic through the VPN? Otherwise I have to connect to VPN when I need to use it and then disconnect to play games or enjoy adult material 129.215.47.59 (talk) 13:41, 20 June 2012 (UTC)
- It depends on the VPN server - some allow it, some don't - Ask your work IT if they allow Split tunneling on the VPN. Avicennasis @ 03:37, 2 Tamuz 5772 / 03:37, 22 June 2012 (UTC)
Optical zoom gives better depth of field ?
[edit]When using my digital camera, will I get a better depth of field (have more of the scene in focus), if I position the camera far away, and put it on maximum optical zoom (avoiding digital zoom, as always) ? If so, why isn't this always done ? Does the optical zoom introduce some other distortions ? StuRat (talk) 18:31, 20 June 2012 (UTC)
- You are correct: for many lenses, it is possible to achieve a longer depth of field (in terms of maximum region in focus, measured in meters-distance-from-camera) by positioning that depth of field close to infinity and then zooming in to the region of interest. Why is this not always done? Because for many lenses, it is easier to set the aperture size, selectively controlling the depth of field without affecting field of view. When you "zoom with your feet," you affect both depth of field and field of view, meaning that the ultimate perspective of the shot is very different, with artistic consequences. This phenomenon its most widely known in the form of a "dolly zoom". Nimur (talk) 18:57, 20 June 2012 (UTC)
- As a side note. That is why those old Brownie cameras took better pictures than many 35mm SLRs. They only had a single lens so no focus and infinite depth of field, combined with 120mm film. Someone should try making a single element lense for a digital camera?--Canoe1967 (talk) 19:09, 20 June 2012 (UTC)
- Why do you say that a greater depth of field is better? Depth of field, which is related to aperture, should be a choice, not a goal. Hayttom (talk) 19:14, 20 June 2012 (UTC)
- I didn't mean to say it was better, just that the pictures were always in focus and a large format negative made really nice prints and therefore later scans.--Canoe1967 (talk) 19:38, 20 June 2012 (UTC)
- Having a single lens doesn't give you infinite depth of field. It gives you the same depth of field as a focusable camera that happens to be focused at the same distance (with the same aperture). -- BenRG (talk) 21:36, 20 June 2012 (UTC)
- I am confused. I remember from optics in physics class that a single lens was always in focus past its minimum focal distance to infinity. Am I wrong about this?--Canoe1967 (talk) 12:56, 21 June 2012 (UTC)
- You mean beyond the hyperfocal distance? Yes, you've got the concept right, but that's not the same as infinite depth of field. You're conveniently forgetting about half of the plane not beyond the hyperfocal distance. A (hypothetical) imaging optic with infinite depth of field would have every object in focus - even objects very close to the camera. Nimur (talk) 01:31, 22 June 2012 (UTC)
- The angular diameter of the circle of confusion at infinity is the arcsine of (the diameter of the aperture / the distance to the focal plane), which is presumably a few arc minutes for the Brownie, so it's not terribly out of focus. But the main thing is that this is independent of the design of the lens system. You should be able to get the same results by focusing your SLR at 4 meters or whatever the Brownie's fixed focus distance was. -- BenRG (talk) 02:06, 22 June 2012 (UTC)
- On a side note II: I don't believe there's a "better depth of field." Sometimes you want the background to be blurred and sometimes you want it to be seen. OsmanRF34 (talk) 19:29, 20 June 2012 (UTC)
- I rarely want the background (or foreground) to be blurred, and, if I did, I could do that to the digital image on my computer. This also gives me the option of blurring things at any depth, after the fact, like say an ex-g/f. :-) StuRat (talk) 19:47, 20 June 2012 (UTC)
- In the long run it'll save time to pick g/f's that are blurry already. :p ¦ Reisio (talk) 21:26, 20 June 2012 (UTC)
- They are all blurry when I first spot them across the bar, it's only when I sober up and get a good look that I run for the door. :-) StuRat (talk) 05:19, 23 June 2012 (UTC)
- It's very common to use depth of field to call attention to the intended subject of a shot (examples: File:Alhambra_wall_detail.jpg, File:Matryoshka_dolls_in_Budapest.jpg, File:Mating_Grasshoppers-2.jpg). You could blur it afterwards, or apply a stained-glass effect and surround it with a fake sparkly picture frame, but a lot of photographers like the idea that their effects are produced by purely optical means.
- If you want to see what shooting everything from far away with a telephoto lens looks like, watch Ran, which was shot almost entirely that way. When characters walk toward or away from the screen they don't seem to change size at all. There's a pretty good use of both dolly zoom and depth of field in The Incredibles in the scene where Edna offers Helen the tracking device and says "Do you want to find out?". -- BenRG (talk) 21:36, 20 June 2012 (UTC)
- Also, of course, it's often impossible to get further away from your subject and still be able to see it, in an enclosed room for example. FiggyBee (talk) 03:36, 21 June 2012 (UTC)
- Specifically in Portrait photography relatively narrow depth of field is a desirable trait Portrait_photography#Lenses. Vespine (talk) 05:32, 21 June 2012 (UTC)
- Shouldn't there be a Wikiphotography forum? Jim.henderson (talk) 12:32, 21 June 2012 (UTC)
- It seems we have created one here. Digital cameras are far more popular now and there are many questions about them it seems. Wikipedia has many articles including comparsions to each other/film cameras and features, sensor and lens types, etc. I think there are enough wise editors in this forum that can answer most of them or link to more detailed pages that can answer them.--Canoe1967 (talk) 12:56, 21 June 2012 (UTC)
What web-framework should I learn?
[edit]It seems that each person recommends the web framework he's using or the web framework that uses the same programming language that he knows. So, which is secure by default, scalable, reliable, and so on. I know there's a list here, but I need more feedback to make up my mind. I suppose not all there are stable or maintained regularly or useful for general purposes. OsmanRF34 (talk) 18:52, 20 June 2012 (UTC)
- Most languages have a clear frontrunner, so choosing the one for your language of choice is pretty straightforward. Do you know more than one language well? Do you want help deciding which language is least awful? :p You could also 1) not use a framework, or 2) make your own which will be perfect for your own needs. ¦ Reisio (talk) 21:27, 20 June 2012 (UTC)
- I want to know, independent of starting point, what frameworks could deliver more. OsmanRF34 (talk) 23:48, 20 June 2012 (UTC)
- I get the impression that a pretty decent web framework exists for every major language. The productivity differences between languages are (1) probably vast, (2) depend on the programmer, (3) depend on the application, and (4) are incredibly subjective. It's not really possible to abstract over that. Paul (Stansifer) 17:07, 22 June 2012 (UTC)
- OK, the answers seems to go into the direction "it depends" or "it's difficult to answer." So, let me reformulate: if I want to build a facebook-like site, a youtube-like site, or a banking system, what web framework would I use? Disregard which programming language I know or what is easier. OsmanRF34 (talk) 22:23, 22 June 2012 (UTC)
try. ... catch (final) in Java
[edit]I just had a look at the article Java (programming language), and noticed this method in an example:
public void showDialog() {
/*
* "try" makes sure nothing goes wrong. If something does,
* the interpreter skips to "catch" to see what it should do.
*/
try {
/*
* The code below brings up a JOptionPane, which is a dialog box
* The String returned by the "showInputDialog()" method is converted into
* an integer, making the program treat it as a number instead of a word.
* After that, this method calls a second method, calculate() that will
* display either "Even" or "Odd."
*/
this.input = Integer.parseInt(JOptionPane.showInputDialog("Please enter a number."));
this.calculate();
} catch (final NumberFormatException e) {
/*
* Getting in the catch block means that there was a problem with the format of
* the number. Probably some letters were typed in instead of a number.
*/
System.err.println("ERROR: Invalid input. Please type in a numerical value.");
}
}
What does the final
in catch (final NumberFormatException e)
do? How is it different from catch (NumberFormatException e)
? JIP | Talk 19:39, 20 June 2012 (UTC)
- This StackOverflow discussion should help. Unfortunately the link to the Sun blog which showed the multi-catch-throw pattern which motivated that died in the Oracle transition. -- Finlay McWalterჷTalk 20:44, 20 June 2012 (UTC)
How do I get a big (5000 rows) html table from a webpage into LibreOffice Calc?
[edit]![](http://upload.wikimedia.org/wikipedia/en/thumb/f/fb/Yes_check.svg/20px-Yes_check.svg.png)
I use LibreOffice 3.5.4.2, Firefox 13.0.1 and Windows7.
I want to import a complete html table (about 5000 rows and 10 columns) from a web page into a LibreOffice Calc spreadsheet.
Some of the cells are empty.
I need the data to be divided into cells exactly the same way in Calc as they were in the html (preferably keeping the various fonts as well).
Is it possible?
--Seren-dipper (talk) 21:23, 20 June 2012 (UTC)
- It’d be pretty simple with a little preprocessing, but the simplest tools for that are Unix tools… which are available for Windows, but if you’re unfamiliar with them it might take some hand holding.
What’s your end game, a spreadsheet showing different font faces? (I’m not sure what else would make it worth it to keep the fonts.) How is the HTML file not sufficient? ¦ Reisio (talk) 21:34, 20 June 2012 (UTC)
- Does this do it? I don't use LibreCalc personally (in Excel you can actually just copy and paste them, depending on the browser). --Mr.98 (talk) 21:53, 20 June 2012 (UTC)
- @Mr.98 : Yes! That link gave me exactly what I needed! Thank you! :-) :-)
(Choosing: Insert -> Link to External Data
opens the External Data dialog where you enter the URL of the HTML document. After clicking "OK" one has to click the tree-dots-button to the right of the url, and voila!).
@Reisio : My table is kind of a dictionary with the headwords in the first column. The HTML is not sufficient because I need to extract shorter lists (subsets) out of the long one, depending on tags and conditions given in some of its columns. Web browsers do not do this, but Excel, Calc etc. are good at it. Thank you for your reply! :-)
--Seren-dipper (talk) 23:04, 20 June 2012 (UTC)
- @Mr.98 : Yes! That link gave me exactly what I needed! Thank you! :-) :-)