Wikipedia:Reference desk/Archives/Computing/2014 November 29
Computing desk | ||
---|---|---|
< November 28 | << Oct | November | Dec >> | November 30 > |
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. |
November 29
[edit]giving people permission to see my Google photos
[edit]Some time ago I signed up for a Google account to get Google Calendar and it seems this made me an automatic member of the worldwide Google club, which I am only realizing just now. I have used the Pictures gallery – I don’t even know what it’s called, but I get to it through Picassa, a very nice program. I point my family members to its albums, and all was fine until recently, when they started telling me they couldn't get to the latest one. They said when they went there Google demanded a username and password, which had not been the case before. Then when they tried, they said Google said I had to give them permission to get in.
I have looked why the heck and Monday through my Google+ Home, and I cannot find any instructions to do any such thing. Can anybody help? Thanks. --Halcatalyst (talk)
- I don't know if I understood correctly, but Google+ has a function called "share with your circles" (or something like that). --2.245.173.139 (talk) 04:46, 30 November 2014 (UTC)
Screenshot capture tool that supports Direct X
[edit]Hi,
I'm searching for a Windows 7 all-in-one screen capture program (preferably freeware, or relatively cheap) that in addition to the regular desktop screen, supports in-game screenshots (such as the ones of Direct X) HyperSnap can do this, but it's rather expensive. According to Google, many programs exist, but all of them seem to be shareware, and/or ridiculously expensive to boot. Matt714 (talk) 02:01, 29 November 2014 (UTC)
Starting Execution of Java Program
[edit]While reading about Java Programming I couldn't get why it states Java static main necessity reason is because "before you're program starts,there aren't any objects to send messages to" as said in slide 8 of static variables.
The reason why I couldn't get this is why do you need an object to execute a program. I think in C program they haven't invoked any object to perform execution of C program.
Also since machine language is a sequence of instructions why should we consider objects here when the Java bytecode is also almost an machine language.JUSTIN JOHNS (talk) 04:43, 29 November 2014 (UTC)
- @JUSTIN JOHNS: When a conventional procedural program (e.g. in C or COBOL) starts you have some main procedure call. That main procedure starts the program logic and the allocation of memory. All the Java main does is essentially the same except with Java the way you start things is by creating initial objects and trigger one of them by sending it a message. Ultimately of course the two are Turing equivalent; anything you can do with C you can do with Java and vice versa. The main difference with Java is just that Java requires you to constrain yourself to the object-oriented paradigm. The VM will do the memory allocation (and more importantly the de-allocation which causes so many errors in C programs) for you but essentially where a C program is setting up areas of memory and running procedures a Java program is setting up objects and having them send messages. Getting back to the "main" program I think what the presentation you were reading was getting at is sort of an explanation for OO purists; that in the very beginning you still need the Main procedure because you need something to initialize the initial objects. --MadScientistX11 (talk) 13:10, 29 November 2014 (UTC)
- It's not that you need an object to execute a program — it's that you would need an object to invoke a non-static main(). The JRE can't know how to (correctly) instantiate any arbitrary class to which you might attach main(), so it isn't defined to do so. One could instead define a constructor signature for an initial object, but it would be about the same as main()'s signature, and would typically require an additional class (rather than a mere method) to be defined for the purpose. --Tardis (talk) 23:58, 29 November 2014 (UTC)
Could you tell me the order of execution of Java program.Does it checks this order pertaining to the method or Classes?I would like to know whether Class or method is significant in Java or both.For example if we have two Classes A and B then whether it checks about Class A's definition or it only looks at Class A's method(also for Class B too).Also I would like to know what is the basic structure of a Java program because it's getting very confusing about how to write a Java program that not only gets compiled but executed to.Code is:
import java.io.*; class Start { public static void main(String args[]) { System.out.println("STARTING JAVA PROGRAM"); } finish f=new finish(); f.method(); } class Finish { public void method() { System.out.println("FINISHING JAVA PROGRAM"); } }
This doubt occured when I tried to execute this code and compiler says: error: <identifier> expected
Could anyone help me.JUSTIN JOHNS (talk) 07:11, 2 December 2014 (UTC)
- Per sentence:
- Java is an imperative language, so it executes top-to-bottom within each method (or other block like a static initialization block or the field initializations in a class).
- I don't understand "pertaining to the method or Classes".
- Certainly both are significant, and both can be "executed" — the static items in a class's definition are executed when the class is initialized, and the others when an instance is constructed, while methods are executed when called explicitly.
- Whatever "checks about" means, the whole class definition is considered, as just stated.
- The basic structure is covered in any number of Java tutorials (e.g., b:Java_Programming).
- Your example contains inconsistent capitalization of finish and also invalidly puts the statement f.method() at top-level in the class Start. You can make the code compile merely by (fixing the capitalization and) placing braces around that statement, but it will nonetheless be associated with creating an instance of Start, which (as discussed) doesn't happen when main() is invoked. Presumably you just want to move both lines involving f into main().
- Hope this helps. --Tardis (talk) 06:21, 3 December 2014 (UTC)
Thanks for suggesting the errors.When the command javac is executed,whether the static main method is invoked or does it start from the class definition attached to the static main method.Is there any rule in java that "a statement should be defined in a method for the class attached to static main method"?Or whether that rule applies to all classes in a java file.I think since the default access modifier of java is 'package access' there might be no need in constructing an object for any other class in java(For example:here for Class finish) because java's default package includes all the classes in a java file isn't it?So why should bother about constructing an object for another class when we can call any method directly due to package access(default) for any class.Could you help me.JUSTIN JOHNS (talk) 07:46, 3 December 2014 (UTC)
- (This is getting ridiculous — you're asking about all sorts of detailed, obscure concepts rather than just working through basic tutorials which will show you the conventional ways of writing simple programs.) But once more, per sentence:
- You're welcome. Please do what reading you can on your own.
- javac does not execute anything: compilation is separate. Execution notionally begins by invoking main(), but (as my JLS link says) the class will be initialized (first) because a call to one of its static methods is being made.
- Statements typically go in methods (in all classes); most methods have statements; most classes have methods. How many classes you write for a program depends on its complexity (and to some extent on style).
- The above is true regardless of how many classes/files there are.
- Every class in one file is in one package. However, access modifiers are irrelevant…
- …to the question of whether an object should be constructed. Constructing an object is necessary to use non-static fields/methods, which are (in most programs) the majority.
- As to why you should make objects (or, put differently, why you should use non-static fields/methods), that's a general question of object-oriented programming (as discussed also at the tutorial I linked). --Tardis (talk) 01:47, 4 December 2014 (UTC)
Is there a musical program that do this kind of thing?
[edit]Is there a musical program that do this kind of thing?
The user(s) would (with the program) select music playlists (m3u files as some example). Then the program would start to play all those playlists at random but the sound will not come out of the speaker (to make easier to imagine this, imagine when you are listening to a radio station X on a radio, all others radio stations Z, Y, W... are playing stuff but you dont hear them). After it the program would select a random playlist and turn it on, this means that what this random playlist is playing will be on the speakers. After X minutes, the program turn this playlist off (the playlist will continue to run but will not make sound on the speakers) select a new random playlist and make it on (the playlist will make sound on speakers)201.78.137.139 (talk) 10:29, 29 November 2014 (UTC)
- It would not be difficult to do in linux. Sound is a data stream. You can direct all but one sound stream to /dev/null (nothing) and one to your sound processor (eg: alsa). Then, change which gets directed to alsa every X minutes. 209.149.114.72 (talk) 20:40, 1 December 2014 (UTC)
Exchanging Wallpaper
[edit]Does anyone know how to change the 'Windows 7' 'startup' and or 'login' screen 'wallpaper'?
I use to be able to do it with 'Windows 98', that was long time ago (twelve years ago and I can't remember how I done. All I remember that I had to change a .bmp file to '.sys' or '.config' file). I'm assuming 'Windows XP' will have similar 'files' and 'folders' settings/layout. Since 'Windows 7's' setting/layout is different, I don't know what to do or where to look at...
(Russell.mo (talk) 14:56, 29 November 2014 (UTC))
- @Russell.mo: This does the trick the easy way. - NQ (talk) 17:29, 29 November 2014 (UTC)
- Thank you NQ -- (Russell.mo (talk) 18:32, 1 December 2014 (UTC))
- The software TuneUp Utilities has an option for it. Miss Bono [hello, hello!] 15:05, 2 December 2014 (UTC)
Unconventional boot routines on x86 platforms
[edit]Most Chromebooks are Intel-based or AMD-based devices and their startup sequences are less bloated and antiquated than other PCs, designed more like the setups of ARM-based smartphones and tablets that aren't limited to a first stage bootloader 512 bytes in size, lack an MBR, and have most of their initialization procedures residing in the software instead of the firmware like with BIOSes. How are manufacturers able to do this with x86 processors? Could I achieve a similar setup if I built a custom board? — Melab±1 ☎ 17:46, 29 November 2014 (UTC)
- The boot process is bloated because it supports a lot of different hardware. If you ship a standard hardware configuration and solder everything to the mainboard so the end user can't change it and remove support for everything else from the BIOS and OS kernel, you will probably get a faster boot. I don't see how ditching the 512-byte first-stage bootloader or the MBR is going to help. They are antiquated, but if they add time to the boot process, it's no more than a tiny fraction of a second. -- BenRG (talk) 19:34, 29 November 2014 (UTC)
- I don't see why the MBR comes in to it either. My current computer which is AMD based and uses bog standard off the shelf hardware and is over 1.5 years old uses UEFI (okay the motherboard is on the fancy side but most cheaper motherboards weren't any different in having UEFI). From what I recall reading, the majority of motherboards released during the past 1-2 years or possibly longer before my computer (i.e. 2.5-3.5 years now) so probably before the first Chromebook, came with UEFI. The UEFI on my motherboard`as with many others also supported legacy BIOS and MBR, and many people may have chosen to boot up with that for whatever reason (perhaps they don't want GPT disks although I think you can technically use MBR even with EFI, it's just commonly not recommended, perhaps their OS doesn't support UEFI, perhaps their OS does support UEFI but they couldn't work out how to use it), but it's not a requirement if the computer properly supports UEFI. Now the inclusion of all this legacy code may slow down the bootup process depending on how it's implemented as BenRG mentioned for other stuff, but that's a distinct point from this talk of first stage bootloaders, MBR etc. Nil Einne (talk) 13:51, 30 November 2014 (UTC)
- I've managed to refrain from replying to this thread for a few days (even though I have so much to say!), but... today I happened upon this recording from linux.conf.au 2012, and its title and its content both made me think of Melab-1's question. EFI and Linux: the future is here, and it's awful.
- Good luck, sir!
- Nimur (talk) 01:35, 2 December 2014 (UTC)
Could they go after terrorists, pedophiles and the like by crunching big data?
[edit]Even in the absence of explicit data (like cracked emails accounts), could machine learning find small traces on the behavior of certain criminals that betray them? In the same way that Google and Facebook target their ads to their users (and discover things like if a user is male or female or the probability that the latter is pregnant), could some analysis of big data catch criminals or at least come out with a list of "probably criminal (=> investigate further)"? --Senteni (talk) 17:52, 29 November 2014 (UTC)
- The security services already do this (see for example [1]). As for the details of what they do, and how effective it is, clearly they aren't going to tell... AndyTheGrump (talk) 18:08, 29 November 2014 (UTC)
The question is more about the technical/statistical aspects. Is it easier to deal with common stuff (like pregnancies, expectation is not 0) when you have machine learning and big data as a tool, than with uncommon stuff (like being the next spree killer, expectation is 0)?--Senteni (talk) 18:33, 29 November 2014 (UTC)
- There is no qualitative difference between the probability of finding a serial killer vs. that of finding a pregnant woman. For any particular member of the sample population the chances that any one of them is either is small. It's just a lot lower for finding a serial killer. But to my knowledge that doesn't make any difference with any of the algorithms or heuristics that these systems use. You are just testing out various hypotheses. Some of them are just improbable some of them are highly improbable. That will of course impact the certainty of any of your conclusions. So if you flag someone as a possible serial killer the chances of a false positive are much greater than when you flag someone as a possible pregnancy. But those things are all just part of the models. --MadScientistX11 (talk) 19:57, 29 November 2014 (UTC)
- No, there is a serious problem with false positives if the probabilities are very skewed. The chance that an unspecified person is a women is around 50%. The chance that she is pregnant is around 2% in industrialised countries (assuming 18 month of pregnancy over an 80 year life span. In that case, a method that is 99.9% correct will be useful. But in the case of terrorists or serial killers, where the fraction hopefully is less than 1 per million, such a method would produce about 1000 falsely accused people per one real target. Most people won't find that acceptable. This is a general problem, of course - it does not make data mining impossible, but make it much harder. --Stephan Schulz (talk) 20:50, 29 November 2014 (UTC)
- Surely Stephan Schulz means to say that it is more difficult to create a working method that yields 99.9% correctness when the population distribution is highly sparse and greatly deviates from a normal distribution. If a classification method did exist and it were 99.9% correct, it would (by definition) not produce a false positive ratio of a thousand-to-one, no matter how rare the actual detections are!
- We have an article - false positives and false negatives - that can help inform our use of this terminology. I think Stephen Schulz describes a method as "correct" when it is both very sensitive and very specific.
- "Big data" is sort of a pseudo-technical term that doesn't refer to any specific technique or theory. The OP might find more information about the methods of binary classification and statistical classification; List of fields of application of statistics; standards of quality in psychometrics; ... and so on.
- Nimur (talk) 00:47, 30 November 2014 (UTC)
- Not quite. I'm assuming a method that classifies 99.9% of al instances correctly, i.e. labels it with the correct label ("terrorist" or "not terrorist"). My implicit assumption is that the error rates is the same for both positive and negative instances - I probably should have stated that. If you apply the method to one million non-terrorists, it will (on average) label 1000 innocent people as terrorists. If you apply it to a group of a million which has one terrorist, it will, with high probability, correctly identify that one terrorist, but it will still misidentify, on average, 999.999 (or 1000 between friends...) innocents as terrorists. If false positives have low cost, such methods may be acceptable. But if they have a high cost (expensive follow-up investigations, lives disrupted, people going to prison innocently in the case of law enforcement, invasive follow-up procedures like biopsies or surgery in the case of cancer diagnosis), they are typically not acceptable. That's why such dragnet approaches are problematic, and one reason why e.g. mammographies are recommended only for certain groups of the population, not for all women. --Stephan Schulz (talk) 06:36, 30 November 2014 (UTC)
- Thanks for clarifying, I follow your explanation clearly now. Nimur (talk) 07:07, 30 November 2014 (UTC)
- If the method is equally accurate both ways(*), it could still be useful.
- Let's say some other analysis identified a person as a possible terrorist. They could check back, like, "Yes, their online patterns confirm that" and divide the false positive rate of the other method by 1000, or "No, their online patterns are clean, it's probably a false positive [of the other analysis]" .
- (*) By "accurate both ways", I mean that of 1000 terrorists run through the method, it'd identify about 999 correctly. Otherwise, we could just "identify" everybody as a non-terrorist and have a method that's gonna err in only 1 case per million, but that would be worse than useless in real life. 217.255.150.16 (talk) 08:58, 1 December 2014 (UTC)
- By the way, would a false positive be an "errorist" ? 217.255.150.16 (talk) 08:58, 1 December 2014 (UTC)
- Thanks for clarifying, I follow your explanation clearly now. Nimur (talk) 07:07, 30 November 2014 (UTC)
- Not quite. I'm assuming a method that classifies 99.9% of al instances correctly, i.e. labels it with the correct label ("terrorist" or "not terrorist"). My implicit assumption is that the error rates is the same for both positive and negative instances - I probably should have stated that. If you apply the method to one million non-terrorists, it will (on average) label 1000 innocent people as terrorists. If you apply it to a group of a million which has one terrorist, it will, with high probability, correctly identify that one terrorist, but it will still misidentify, on average, 999.999 (or 1000 between friends...) innocents as terrorists. If false positives have low cost, such methods may be acceptable. But if they have a high cost (expensive follow-up investigations, lives disrupted, people going to prison innocently in the case of law enforcement, invasive follow-up procedures like biopsies or surgery in the case of cancer diagnosis), they are typically not acceptable. That's why such dragnet approaches are problematic, and one reason why e.g. mammographies are recommended only for certain groups of the population, not for all women. --Stephan Schulz (talk) 06:36, 30 November 2014 (UTC)
- No, there is a serious problem with false positives if the probabilities are very skewed. The chance that an unspecified person is a women is around 50%. The chance that she is pregnant is around 2% in industrialised countries (assuming 18 month of pregnancy over an 80 year life span. In that case, a method that is 99.9% correct will be useful. But in the case of terrorists or serial killers, where the fraction hopefully is less than 1 per million, such a method would produce about 1000 falsely accused people per one real target. Most people won't find that acceptable. This is a general problem, of course - it does not make data mining impossible, but make it much harder. --Stephan Schulz (talk) 20:50, 29 November 2014 (UTC)