How do I remove old computers from the Network folder in Windows 7?

Question: Question is in the title, I had some friends visit and attach their PC's to my network. Ever since then, even long after the PC's were no longer attached, I am still getting entries for their PC's showing up in my Network folder of Windows Explorer, even after I refresh the view. How can I clear these out?

Answer notes: To aid the search of others later, it turns out that the second half of harrymc's answer was the correct part. I went in to my router (THOMSON TG585v7) firmware and found a list of computers under Home > Home Network > Devices screen. Hitting Configure on this screen let me delete old computers off the list and as soon as I did that, they no longer showed up in the Network folder.
Answer: Another thing to try is clearing the DNS cache:
Open the command prompt in administrator mode and type ipconfig /flushdns and reboot.
If it's your router that remembers these ghosts, it might have a configuration screen
that will let you get rid of them·
Otherwise, reloading factory settings might do it, but which I caution against.
You might try to reboot your router if haven't done so already, then reboot your computer.
If all else fails, the ghosts will not stay there forever.
Just wait thru the timeout period, which might be something like 30-60 days.
Answer: You should be able to just right click on the entry in the Network view and pick Delete.
Comment: There is no Delete option on the computers in network view. Only Open, Open in New Window, Connect with Remote Desktop and Create Shortcut.
Answer: This may not work, but it's worth a go until someone with more knowledge comes along:
Go into the Network and Sharing Center, and click Change advanced sharing settings.  From there, drop down Home or Work (assuming that's what you're using), and then change the Network discovery option to off.  Save the changes and then have a look to see if those computers disappeared.  Make sure to hit refresh or F5.
If they did go away, you could probably turn network discovery back on.
Like I said, it may not work, so don't get mad at me...  ;)
Comment: Nope, all still there. :/
Answer: I had the same problem with Windows 7. To remove the old network computer names, you will need to re-register the DNS names.
Open a Command Prompt and type:
ipconfig /registerdns


What is a real world application of Madam Curie's life work?

Question: As in the title. I know she was working with radioactive atoms and she made huge progress in the field of physics. But where would you find the application of her discoveries in our world? Is it just used in theoretical physics or does it have any meaning to us mortals?
Comment: Are you looking for real-world applications of radioactivity (in which case it's a fairly easy question to answer), or do you mean something else?
Comment: I want to know how does her work help us in real life, not just the application of radioactivity.
Answer: Marie Curie helped to understand the nature of radioactivity, which evidently has subtantial concrete consequences in the production of nuclear energy for instance, but also in the medical applications like X-ray radiography. She was a pioneer in the treatment of cancer using radioactivity.
Comment: +1: Adding to the last sentence: they went waaaay too far in the early 1900s with medical radiation therapy: it was a wonder cure for back pain for example - mainly because it destroyed nerves, along with everything else!


Is open ldap a good solution to a centralized way to authenticate users on a web site?

Question: Is open ldap a good solution to a centralized way to authenticate users on a web site?
Was it build in the web in mind?
Answer: If you're doing an internally facing site, or a site with a closed userbase, then openLDAP would be perfectly fine. I do something similar with my own intranet sites (though I use Apache authenticated against AD).
For public sites, I agree with Chopper3. Allow a local authentication if you want, but definitely allow OpenID (or even use the Twitter/Facebook/whatever centralized accounting).
Answer: OpenLDAP is not a way to authenticate users; it's a way to store data in a directory.
You can definitely use it to store information about the users of your website, including the credentials they use to authenticate themselves.
However, you're still going to have to work on the authentication bit seperately. As Chopper3 suggests, OpenID is a nice way to do this: there's a small amount of complexity in the setup, but the signing process for users becomes much nicer because they don't have to remember yet another password.
Comment: OpenID would have been my natural choice, alas, this investigation is for a closed userbase and not to be freely available over the web. While writing this, I assume I can implement an openID server just for my organization...will go and research that.
Comment: b.t.w "However, you're still going to have to work on the authentication bit seperately" I am using PHP, we have a library for everything :-)
Answer: How about OpenID :)
Answer: OpenDS works pretty well for me.  It is free, installs very quickly and simply, and has a GUI for management. http://www.opends.org


What's the explanation of this Yalkut (if there is any)?

Question: I was reading this article and in the first sentence it references a Yalkut Shimoni that states that "Jael, Hagar, Asenath, Zipporah, Shiphrah, Puah, the daughter of Pharaoh, Rahab and Ruth were among the devout women converts". This medrash makes absolutely no sense to me because how would Hagar be considered a convert since Yaakov wasn't even born yet and seemingly even before Sinai someone who "joined" the bnei yisroel would be a convert on some level but before yaakov there was no Jewish tribe  and the Gemara in Sotah 11b tells us that Shifra and Puah, were Yocheved and either Miriam or Elisheva. This could be one of those medrashim but I was trying to seek some help if anyone can help me get some more info on this.
Comment: "... _how would Hagar be considered a convert since Yaakov wasn't even born yet_ ..." It could be Hagar was a convert in the same sense that it is said "_Abraham would convert the men, and Sarah would convert the women_" in [Rashi on Bereishit 12:5 s.v. "אשר עשו בחרן"](https://www.chabad.org/library/bible_cdo/aid/8176/showrashi/true#v5) (based on [Bereishit Rabbah 39:14](https://www.sefaria.org.il/Bereishit_Rabbah.39.14?lang=bi&lang2=he)).
Comment: What does Hagar have to with Yaakov? I don't understand your question with her.
Comment: As Rashi said there, conversions were taking place even in Avraham's time. You need to explain what Yaakov has to do with this, when there clearly were conversions before his time.
Comment: What @TamirEvan states in his comment is correct. Avraham and Sarah were teaching people the true faith that was given to Adam HaRishon. This teaching was lost gradually from the generation of Enosh onward as recounted in the Torah and elsewhere. This idea is also expressed in Mishnah Torah, Laws of Foreign Worship and the Customs of the Nations, Chapter 1, Law 1 and 2. The conversion was from idol worship to the true, correct, original faith.
Answer: The Yalkut is here.
Hagar might be considered "convert", either before Yaakov was born or afterwards -  especially if you take the Midrash that says that Ktura is Hagar as a simple fact.
About Shifra anf Puah, sometimes Midrashim have conflicts, so it's not much of a big deal.
I agree, assuming that they were converts raises questions, since they have Hebrew names, and the verse says clearly that they were "Hebrew"
שמות א פס טו
וַיֹּ֙אמֶר֙ מֶ֣לֶךְ מִצְרַ֔יִם לַֽמְיַלְּדֹ֖ת הָֽעִבְרִיֹּ֑ת אֲשֶׁ֨ר שֵׁ֤ם הָֽאַחַת֙ שִׁפְרָ֔ה וְשֵׁ֥ם הַשֵּׁנִ֖ית פּוּעָֽה׃
Shmot 1:15
The king of Egypt spoke to the Hebrew midwives, one of whom was named Shiphrah and the other Puah;
My guess, that this a Midrashic answer to hidden question - "Why Pharaoh didn't punished the midwives for their failure?". Answer: because they were actually Egyptian citizens, secretly converted.
Comment: I think some mefarshim say מילדות העבריות means "midwives of the Jews" but not that they were actually Jewish
Comment: https://www.sefaria.org/Bekhor_Shor%2C_Exodus.1.15.1 leaves the possibility open though he doesn't like it.  https://www.sefaria.org/Shadal_on_Exodus.1.15.1 actually accepts it
Comment: @Heshy Interesting. who?
Comment: @Heshy Thank you. I'm not sure that the Shadal accepts it 100%, I think he leaves this option open.
Comment: [Torah Sheleimah § 166](https://hebrewbooks.org/pdfpager.aspx?req=51451&pgnum=51) @Heshy
Answer: In the Midrash Tadshe, chapter 21 authored by the Tanna, Pinchas ben Yair, he brings this quote and the Eishel Avraham commentary helps explain each convert.
The Eishel Avraham in note 20 says:

הגר היתה בת פרעה שהיה בימי אברהם כדאיתא בב"ר פ' מ"ה
Hagar was the daughter of Paroah who was in the days of Avraham, like it says in Bereishis Rabbah 45

The Midrash over there relates that when Paroah took Sarah and found out the truth of her identity, he gave his daughter to them as he reasoned it is better that she be a servant in this house (i.e. in the house of Avraham and Sarah) rather than a lady (i.e. a well-respected noble) in another house. Seeing that she (Sarah) could not conceive, the midrash goes on to say (45:3) that Sarah gave Hagar to Avraham as a wife saying "Fortunate are you to be united with this holy man!".
As was discussed already in the comments by @Tamirevan - Rashi explains that they were actively involved in converting the masses. Based on this, it would be fair to deduce that Avraham would not have married Hagar without first ensuring that she was converted.
As far as Shifrah and Puah, the Eishel Avraham on the following page writes that the author of the Midrash Tadshe does not hold like the Gemara in Sotah and Shemos Rabbah 1 that says that Shifrah and Puah were really Yocheved and Miriam. Rather he wants to say that they were indeed converts. It writes there:

פליג על מה דאיתא בסוטא י"א ובשמ"ר פ"א ששפרה ופועה שפרה זו יוכבד ופועה זו מרים כי לדעת רפנ"י גוירות מן הגוים היו
He argues on that which is brought in Sotah 11 and Shemos Rabbah 1, that Shifrah and Puah - that Shifrah, this is Yocheved, and Puah - this is Miriam, because according to the opinion of Rav Pinchas ben Yair they were converts from the non-Jews.


Why attacks against Muslims are termed as Islamophobia but it is not Kaffirphobia when Muslims attack others?

Question: I believe instead of Islamophobia there should be a general resolution in the UN to discourage attacks against other faiths because there are many incidents where Muslims have attacked people of other religions or non-muslims living in a muslim country have received hate crime and death threat. Just recently in Pakistan, multiple churches were destroyed by fanatic Muslims in Jaranwala. Why shouldnt these attacks be termed as Kaffirphobia if attacks on Muslims can be termed as Islamophobia?
Comment: This is a rant, not a question on Islamic teachings.
Comment: @UmH No this is not. I am asking why don't muslims condemn general atrocities against people of other faiths instead of just condemning islamophobia.
Answer: The term "Islamophobia" and the concept of addressing religious discrimination are not meant to diminish or ignore the suffering or attacks experienced by people of other faiths. Let me clarify a few key points:
1. Islamophobia and Religious Discrimination:
Islamophobia specifically refers to the irrational fear, hatred, or prejudice against Islam and Muslims. It is a term used to address discrimination and bias against Muslims due to their religious beliefs. It does not inherently imply that attacks against people of other faiths are less important or should be ignored. The term is used to highlight a particular issue, just as terms like "antisemitism" or "anti-Christian sentiments" are used to address discrimination against Jewish or Christian communities.
2. Universal Human Rights:
The United Nations Universal Declaration of Human Rights and various international conventions protect the rights and freedoms of people of all religions and beliefs. These documents condemn discrimination, hatred, and violence against any religious or ethnic group. There is no need for a separate term like "Kaffirphobia" to address attacks against non-Muslims, as such attacks are already covered under broader international human rights frameworks.
3. Addressing Discrimination as a Whole:
The goal should be to promote religious tolerance and respect for all faiths and beliefs, not to create terms that single out one group or another. It is important to work towards a world where people of all religions can coexist peacefully and without fear of discrimination or violence.
4. Local and International Response:
Incidents like the destruction of churches in Pakistan or attacks on religious minorities anywhere in the world should be condemned and addressed by both local authorities and the international community. This can involve legal actions against perpetrators, raising awareness of religious freedom, and promoting interfaith dialogue and understanding.
In summary, while addressing specific issues like Islamophobia is important, the broader goal should be to promote religious tolerance, respect, and the protection of human rights for all individuals, regardless of their religious beliefs. Discrimination and violence against any religious group should be condemned and addressed through existing international frameworks for human rights and religious freedom.
Comment: Was this written by ChatGPT?


Do messages sent to and by Slackbot in a DM count towards a free team's message limit?

Question: If users use slackbot heavily, but only in DMs, will this use up the 10,000 message limit for a free team?
Answer: Yes, as far as I know every message counts in every channel, including message from Slackbot and including messages in DMs. If you need an official answer you may want to sent a mail to the Slack team though.
One way to mitigate the problem is to have a bot that constantly deletes older messages from channels which are no longer relevant.


ArcMap calculate distance (from and to) from a points shape to the lines shape table

Question: I am trying to calculate the From and To fields in the line table.
I have got a points shape and i have got a line shape. ( see for example the figure bellow.)
The points( in red ) intersect with lines.
My plan is to get the distance from points for the begin and end of the each line segment. I have tried spatialjoin but it gives only the distance but not giving +/- form the points location. I need to update each line with the 'ID'of the point + begin and end distance from that 'ID'point ( see the figure : in table i have updated 2 records manually). I think i am clear about what i want to do.
What i have done is just measured the distance with measuring tool and updated the fields manually.
I have more than 500 line segemnts.
I think there must be a better way than this.
I am working with ArcMap 10.6
figure ( it's an example) :
Answer: This might solve it.
Run Feature Vertices To Points with the following parameters: in_features: your lines, out_featureclass: path to a fc with name like 'pts_start', point_location: 'START'
Run Generate Near Table in_features: your points, and near_features 'pts_end', out_table to 'pts_end_dist'
I think all the data you need to get the END point data is spread across the 4 datasets.  Then it's a matter of joining the data (with the Add Join tool or the layer context menu) and running a Calculate Field to create a single value and put it into your field named 'TO'.
If that works, repeat for the FROM value.
Comment: Thanks for trying to solve the issue. I tried your solution but its not producing the desired results to me. Genearate Near Table gives the distances(start_pts and end_pts) but not gives the + or - from the points ( red in figure ). For example for start_pts line 4 ( green line in figure ), i am getting distance from point "ZCA2". But instead i want to get from "ZBA1" .


Disk storage in a Java EE application

Question: I have Java EE app in which I want to small little amount of data to disk, eg just user/passwords.
I dont want to go through the hassle of integrating with a full db for this little amount of data.
Is there a standard way to access the file system and a standard folder where web applications can store their data on disk, other than using a database?
Note:
I am not using EJBs. It's a web application using Servlets.
Answer: You could consider using the preferences API to store this data - it's available on Java EE as well.
Comment: but which path/file to store the properties to?
Comment: @pdeva: The preferences API abstracts that away, you only have to decide whether the preferences are systemwide or specific to the current OS user, and choose a package for them. IIRC it will be stored in the registry on Windows and in a hidden file in the user's home directory on Linux. But that's not your concern anymore - exactly what you want.
Answer: Use a simple Java based database, like HSqlDB or h2. The setup won't be that complicated compared to a heavyweight DB. The key advantage this will give you is managing concurrent updates, which you would have to code yourself if you use direct file access.
Comment: Another good point - concurrency and required synchronization +1
Answer: File access has always been a controversial activity within EJB-based applications because of the restrictions placed upon bean providers by the EJB specification. The part of the specification relevant here is under the section entitled Programming Restrictions, and it states the following about accessing the filing system.

An enterprise bean must not use the
  java.io package to attempt to access
  files and directories in the file
  system.

This is a fairly specific statement, and is followed up by a short explanation of why this is the case.

The file system APIs are not
  well-suited for business components to
  access data. Business components
  should use a resource manager API,
  such as JDBC, to store data.

While this explanation highlights a key reason for not using file I/O, I think that there is much more to this. However, although this is a well known restriction, actually finding more information on this is a time consuming task. So, in the quest for knowledge, I did some digging and came up with the following reasons why file I/O is "a bad thing"TM.
The WORA mantra of Java and J2EE means that there might not actually be a filing system to access. I've seen various comments saying that the J2EE server might be running on some device that doesn't have a filing system, or the application server doesn't have access to the filing because it's deployed in, for example, a database server. Although this is a valid reason, I don't think that this applies to most projects.
Access to files isn't transactional. Yes, typically, files aren't transational resources and when building enterprise systems, you usually want to be sure that some information has been correctly and accurately stored, hence the use of relational databases and the like.
Accessing file systems is a potential security hole. If we look at how other resources (e.g. JDBC DataSources, JMS Topics, etc) are accessed, it's usually through JNDI. To ensure that only authorised parties can access these, we typically have such resources protected by some sort of authentication mechanism, be it a username/password combination, or an SSL certificate. The problem with filing systems is that they are much more open and it's harder to control access. One solution is to lock file access via the operating system, and another is to use the Java security model to restrict access to only a specific part of the disk. If you are going to access the filing system from your business components, then locking down access will help to make the system more secure and resilient to attacks.
So then, how are we supposed to access files from EJB? Many people advocate the use of an intermediary Java class to wrap up the file access, believing that the EJB specification only disallows access from the bean class itself. Is this true? I'm not convined because all the same reasons apply. The specification itself presents an answer, and that answer is to use a resource manager so that we can treat file access as a secure, transactional, pooled resource. One such implementation is a J2EE Connector Architecture (JCA) adapter that you write, deploy and configure to access your filing system. In fact, some vendors have already built JCA adapters that access flat files and these are particularly useful if you have to access the outputs of legacy, mainframe systems.
Of course, many types of file access can be worked around. For example, configuration information can be placed in LDAP, JNDI, a database, or even properties files delivered inside your JAR files that get loaded as a resource through the classloader. In those circumstances where accessing files is a requirement, then other solutions include loading the file through the servlet container, having it sent to the EJB tier via messaging, downloading the file from a webserver through a socket connection and so on.
These are all workarounds for the programming restriction but at the end of the day I think you have to be pragmatic. Many projects do utilise file access from within the EJB tier and their solutions work. Although the EJB specification imposes a restriction, in reality many vendors choose not to enforce this, meaning that using the java.io package for accessing files is possible. Whatever solution you come up with, you should ideally keep the specification in mind. It's there to help you build portable and upgradable applications, but pragmatism should be employed. Hopefully a future version of the EJB specification will address this issue in more detail and this controversy will become a thing of the past.
Credit for above goes to: Simon Brown
In addition it is never a good idea to keep passwords on your site. Most security references tell you it is OK to keep a hash of a password that you can check against. If somebody breaks into your site, then he could retrieve all the passwords for all users.
Comment: also, the Java EE server may run on multiple computer, who have separate filesystems.   So if a two part user interaction runs part 1 on node A, and part 2 on node B, node B cannot see file system changes done on node A.
Answer:
Is there a standard way to access the file system and a standard folder where web applications can store their data on disk, other than using a database?

There's the java.io.File API, but the Servlet or the Java EE specifications do not provide a standard directory where you may persist files for a lengthy duration. At the very best, the javax.servlet.context.tempdir attribute may be used to locate the location of the temporary files directory, from the ServletContext.
The rationale for not supporting standard file directories is due to the inability to predict whether the container would be able to access a file system in the first place. Your container might be running off an embedded device in the first place to begin with, that might rely on a SAN or another remote file system for persisting files.
In addition, using the File API in EJBs is frowned upon, due to the non-transactional nature of file systems, so there is no similar concept of working directories and files.

Disk storage in a Java EE application


Can I change my name through the usercache in .minecraft?

Question: Can I change my name through the usercache file in .minecraft?
Comment: Names are checked every time you log into MC, so no.
Answer: I think that you can change your real Minecraft name(not server nick) on the Minecraft official website itself. I shortened my name that way.
Answer: I know this is a bit old but i just wanted to say this for anyone that sees this.  you can change your username in single player only if you want. to do that do into %appdata% -> .minecraft -> usernamecache and change all of the text that has your username to any username you want (ex: Notch) then do that same thing in usercache. after that you should be good to go BUT it will only work in singleplayer


Is that possible to see the list of Price Book Entries?

Question: Is that possible to see the list of Price Book Entries? Does Salesforce have any standard functionality to display it? I tried to find a one but I ended with PriceBook and Products. Any thoughts please.
Comment: It's just a junction object. You can query for data. Ui would have to be built as no standard Ui for just that
Answer: This can be accomplished using an OOB report type: Price Books with Products
As you can see below, the available fields are the junction record: "Price Information" (the PBE) and the two parents: "Price Book Information" and "Product Information"
Comment: Thanks @cropredy. Now i understand there are several ways to accomplish this and your solutions are great. thanks again.
Comment: This is the wrong answer. You cannot see Price Book Entries with this Standard Report Type. You simply just need to create your own custom report type with Primary Object = Price Book Entry
Answer: This can also be done using the Price Books Tab as shown below
Answer: You can query for the pricebookentries in developer console -> query editor to see the list. But there is no standard tab available for this object.
Select id, pricebook2id, product2id from priceBookEntry


PHP on OSX 10.10

Question: How do I install/allow php to run on Yosemite? I've read a lot about doing stuff through terminal, but none of the 'tutorials' are thorough, they just tell me to do 'sudo....' I've tried it, and still, I cannot get php files to work (I'm making a website and I need a php file).
Comment: FWIW... 1. PHP is already installed under OS X 10.10.  2. Following the directions in [Installing Apache, PHP, and MySQL on Mac OS X Yosemite](http://jason.pureconcepts.net/2014/11/install-apache-php-mysql-mac-os-x-yosemite/) (link posted by Alistair McMillan) for just editing the `httpd.conf`, creating the `phpinfo.php` file and restarting Apache I was able to bring up [http://localhost/phpinfo.php](http://localhost/phpinfo.php) page just fine.  So the direction do work although I did not `sudo su -`, just used `sudo` in front of the various necessary commands.
Comment: I assume you've used instructions [like this](http://jason.pureconcepts.net/2014/11/install-apache-php-mysql-mac-os-x-yosemite/) then? Can you tell us exactly how far you've got and where you are stuck?
Comment: Yes, exactly! I got to the part where I have to edit the httpd.conf file, and I deleted the '#' they talked about, and restarted apachectl. Yet it's still not working. I think I might have messed something with the httpd file, and now I'm trying to reset that as well, but cannot @AlistairMcMillan
Comment: You can run `apachectl configtest` in the Terminal to tell you if the conf file is okay.
Comment: I did that, and there are no errors in my httpd file anymore, but I still cannot access http://localhost, and my php code is not running still, even after uncommenting the "LoadModule php5" and restarting apache @AlistairMcMillan
Comment: Well I tried that as well, I couldn't create the phpinfo file. What lines did you have to use sudo for? @user3439894
Answer: If you are not very familiar with the command line and config files (and it appears that you are not) then get Apple's Server app (US$20 at the app store). PHP then becomes a check-the-box setup option, as does local DNS (also essential).
The only common web-related app you will actually need to install via the command line is mysql. There is a package installer on Oracle's website.
Comment: I've installed Server, and enabled PHP and DNS, now I have to install MySQL before any php code will work?
Comment: @Mahmud Assamaray, You should be able to test PHP is functioning without first installing MySQL, that is tests that do not require MySQL be installed!  Read my comment to you in your OP.
Answer: Or you could just use MAMP which is an installable and easily removable installation of Apache, MySQL and PHP entirely separate from that which is installed with and in the operating system.
I like it because it is simple and if I mess something up in my tinkering I just trash the MAMP folder and reinstall.
It is free (though they do offer a commercial, supported, edition) and works just as well as the components that come with Mac O/S.
I have no interest in the company, I've just used it quite a bit in the past. Developing websites and even hosting them.
Answer: To run PHP files, you need PHP interpreter (basically php command).
You can install PHP using Homebrew using the following Terminal command:
brew install php56

If you don't have Homebrew yet, install via:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Then use Apache, php-fpm or php built-in server (e.g. php -S localhost:8888) to run the site.
Or to run standalone files, run them directly, e.g.
php file.php

Comment: Why php is installed on plain OSX? (Yes there are reasons but they need explaining here and for the OPs lack of knowledge how is this better)

PHP on OSX 10.10


How should a family with young children apply for UK visas?

Question: We are sponsoring a family to visit us in UK as friends from Madagascar for two weeks. They have a 6 year old and a 16 month old.
Do the kids need their own visas, and are they the standard visitor visa or a special child visa?
Also, when I try and apply on the website I can only apply for one person so how do I apply for all the individuals in the family?
I have looked on the Immigration website and can't find the answers I need.
Answer: There is no minimum age threshold where a child can be exempt from the requirements.  Malagasy people are visa nationals and so each child must have an entry clearance in their own passport.
In the pre 9/11 era, children could travel with an amendment in their parent's passport, but it is no longer allowed.  As a knock-on effect to requiring separate passports for dependents, the UK decided that every entry clearance needed to attract the same fee.  And yes, there is a type of group application, but tour operators are required to have a qualification and it's basically irrelevant for you.
Applying as a Family
For your question about using the system...  You would first complete the application for the primary (in most cases the father) and indicate in Part 9 that they are the primary.  Write down their GWF number.  Then proceed to make a fresh application for the other adults (presumably the mother). Put the primary's GWF number in Part 9 of each application and write down the other adult's GWF numbers.  You should have all the adult's GWF numbers before starting the children's applications.
When you start with the children, write the names and GWF numbers for the parents in Part 7 of the application and make an additional note in Part 9.  If they are relying upon your evidence for finance, make the appropriate note.  There is no need to copy the same stuff over and over. This procedure is not taken from the rules, it is best practices only and reflects the way a qualified solicitor would do it.  You can select a different procedure and get a comparable effect.
Children under 18
For your question about finding things on the net, you can read the guidance and note that there is separate guidance for children under 18.  Those two things are all you really need.  Beyond that, there are not many up-to-date narratives or FAQ's on the net and trying to use them is not always beneficial.
Practical advice: try to fill out the applications in one session when everyone in your country is asleep. That way you have a better chance of getting their biometric appointments at the same time.  If the system splits up the appointments, send the whole family to the first appointment anyway.
Misc Tips

All applicants attract the same fee (regardless of age).
Applicants should include marriage certificates and birth
certificates.
If you already have a valid UK visa, you can (and should) be the
primary. In this case use your entry clearance number instead of GWF number.
Children need their own login and password.
Multiple email addresses may be required.
If different appointments get scheduled for family members, they
should all show up at the primary's appointment and be processed
together. As a matter of policy, families should not be separated at any stage of the process.
The primary submits one set of evidence. Payments should be separate.
Practical advice part 2: take extra care in your cover letter to
assure that you will be in the arrivals area to meet the children and
you will arrange for their safe transportation to your residence.
It is fundamentally critical that the application contains child
care information.
Comment: you've previously observed that there can be problems where the visa application appears to be "owned" by a person other than the applicant (although I presume that doesn't apply to children). Could there be problems here if the visa applications is carried out mostly or entirely by the host family?
Comment: When I start getting into somebody trying to own the application, it's usually about a male being so overly dominant and possessive in the process such that the applicant (usually female) isn't doing her part. He calls it 'my application' when he's actually just the sponsor. ECO's are sensitive to that aspect because it's apparently linked to domestic abuse, domestic violence, etc. It happens all the time.  Read this! http://travel.stackexchange.com/questions/24540/how-to-intentionally-get-denied-entry-to-the-us-without-getting-into-trouble
Comment: @CMaster if ECO's are sensitive to something, then YOU have to be sensitive about it too :)


Double summation involving partition of a number n as a condition

Question: I am dealing with the expression: $$b_n=\sum_{m=2}^{\lfloor\frac{n}{3}\rfloor}\left\{(-1)^m\frac{l_m}{m+1}\sum_{i_1+i_2+...+i_m=n}a_{i_1}a_{i_2}...a_{i_m}\right\}$$
The $i_k\geq3$, for any $k$. Perhaps integer partition of $n$ into $m$ parts can be considered as $m$ varies. All I need to do is, to simplify the term to analyse how $b_n$ behaves. So how do I put this in Mathematica?
Thank you for your efforts.
Comment: Those are again some complicated summations, but I'm not going deep into it.. All I need to know is whether b_n assumes any zero value for some n. That's why this question is asked.
Comment: What are the $a_i$?
Answer: The $i_k\ge 3$ restriction means $b_n$ is $0$ for $n<6$ (why?).
With that,
<code>Table[Sum[(-1)^m l[m]/(m + 1) Sum[Product[a[i], {i, id}],
                                  {id, IntegerPartitions[n, {m}, Range[3, n]]}],
          {m, 2, Quotient[n, 3]}],
      {n, 6, 9}]
   {1/3 a[3]^2 l[2], 1/3 a[3] a[4] l[2], 1/3 (a[4]^2 + a[3] a[5]) l[2],
    1/3 (a[4] a[5] + a[3] a[6]) l[2] - 1/4 a[3]^3 l[3]}
</code>
Comment: b_n is 0 for n<6 according to the requirement of a set of calculations. Also, how do I write this expression if we do not ignore that the partition is same if the order is changed? For example: [1,1,2] is not same as [1,2,1] is not same as [2,1,1]. Then how do I count all such possibilities in the summation involving a_{i_k}s?
Comment: @J.M., would you mind addressing the above commented problem?
Comment: That's a different question altogether; since you already asked another question, I don't have to remind you to ask a new one.


secure flash update

Question: The default method for updating flash is through Adobe's unsecured http portal, which seems to be a serious security concern, given the access that flash has on a user's machine.  Can anyone recommend a secure way to update flash?
Comment: Isn't [get.adobe.com](https://get.adobe.com/flashplayer) accessible through https? If you get redirected to `http://get.adobe.com/fr/flashplayer` (or any other url) because your browser settings show you speak a language other than english, you can just simply add the `s` to `http` after the redirection. It's weird by adobe, but it works.
Comment: This almost works ... sometimes I get redirected to the insecure page, but sometimes I can connect to https (though firefox flags the page as not fully secure).

The bigger question is why Adobe would send people to the insecure page by default.
Answer: When you go to http://get.adobe.com/flashplayer/, it will forward you to  http://get.adobe.com/**/flashplayer/ where ** is the two-letter code of the preferred language according to your browsers headers. You can then change this from http to https to get the encrypted version, which will have a https link to the latest flash installer.
By the way: When you use the highly recommendable HTTPS Everywhere browser addon, you get to the country-specific https-site automatically.
Answer: Why does the Adobe download site need to use SSL? Do you need the flash update to be encrypted? SSL doesn't make a site secure. You can download all kinds of malware and exploited content from an SSL connection, it's just that other people won't be able to see it.
If there is no sensitive information to be obtained by downloading a flash player update from Adobe then i see no reason to worry. If you are looking for the little icon that means the site is using SSL, it really isn't foolproof. Never click on a link that takes you to a site for a Flash Player update, always type www.adobe.com in manually. There are too many fake update notices on the Internet to trust a link to take you to the correct site.
Comment: I think what the author is actually afraid of are man-in-the-middle attacks which change the file in transit. TLS would prevent that.

secure flash update


Does "tre eble" mean "probable"?

Question: I have found the structure tre eble meaning probable according to one definition of Reta Vortaro. Is this use of tre eble correct? As I understand it now, tre eble means that something is very likely to be a possibility, not that the possibility is very likely to happen.
Answer: My sense is that tre eble is an odd thing to say, and that tre verŝajne makes more sense. However, there are two references to it in Tekstaro (in the same work), and this link seems to suggest that it's OK.
http://bertilow.com/pmeg/gramatiko/kvantaj_vortoj/grado_kvanto.html
The argument seems to be that rejecting tre eble would require rejecting kiel eble plej.
Answer: If you want to say that something is probable or likely to happen you should say ĝi probable okazos or ĝi verŝajne okazos.
Ĝi eble okazos means that it is ebla, ne neebla, not impossible: ĝi povas okazi, tia okazo ne estas neebla, ĝia probablo ne egalas al nulo.
Tre eble is just emphasizing that it is possible, not saying much about the likelihood of such a thing happening, just that the probability is definitely not equal to 0. But in everyday language you don't pay much attention to such logical thinking and it is quite possible (= tre eble?) that tre eble is used where (most) likely would be appropriate.

Does "tre eble" mean "probable"?


Prove that if $\phi'(x) = \phi(x)$ and $\phi(0)=0$, then $\phi(x)\equiv 0$. Use this to prove the identity $e^{a+b} = e^a e^b$.

Question: I am given the following. hint Consider $f(x)=e^{-x} \phi(x)$.
I am unsure how to approach this problem.
Comment: Differentiate $f(x)$.
Comment: Now use that $\phi'(x) = \phi(x)$.
Comment: @DanielFischer so $f'(x)=-e^{-x}\phi(x) + \phi '(x)e^{-x}$. Not seeing anything yet
Comment: An update, the second part of my question is answered here using some other approaches. http://math.stackexchange.com/questions/356752/show-that-eab-ea-eb
Answer: If
$$
\phi'(t)=\phi(t),
$$
then
$$
\mathrm{e}^{-t}\big(\phi'(t)-\phi(t)\big)=0.
$$
But
$$
0=\mathrm{e}^{-t}\big(\phi'(t)-\phi(t)\big)=\left(\mathrm{e}^{-t}\phi(t)\right)'
$$
and thus $\mathrm{e}^{-t}\phi(t)$ is a constant function, i.e.,
$$
\mathrm{e}^{-t}\phi(t)=\mathrm{e}^{-0}\phi(0)=0.
$$
Thus $\phi(t)=0$, for all $t$.
Then consider $\varphi(t)=\mathrm{e}^{a+t}-\mathrm{e}^a\mathrm{e}^t$. Clearly, $\varphi(0)=0$ and $\varphi'(t)=\varphi(t)$, and hence $\varphi(t)=0$.
Answer: Note that $f'(x)=0$ for all values of $x$ by construction.  Hence $f(x)$ is constant.  Given that $\phi(0)=0$ it must be true that $f(x)=0$ for all values of $x$ and hence that $\phi(x)=0$ for all values of $x$.
Comment: Then take $\phi(x)=e^{a+x}-e^a e^x$ for the second part of the question.
Comment: I see, forgot to use the hypothesis part of the question
Answer: If we carefully observe the answers given here, it will be found that the answers make use of three crucially important properties of $f(x) = e^{x}$:
1) $f'(x) = f(x)$
2) $f(0) = 1$
3) $f(x) \neq 0$ for all $x$
and then using these properties it is proven that $f(x + y) = f(x)f(y)$.
Justification of existence of a function $f(x)$ with the above properties is effectively equivalent to development of theory of exponential and logarithmic functions.

It is of interest to prove the result without using the properties of function $f(x) = e^{x}$. We proceed to provide such a solution as follows.
Case 1: Let us suppose that there is a constant $a$ such that $\phi(a) = k > 0$ and consider the function $\psi(x) = \phi(x + a)$. Clearly $\psi'(x) = \psi(x)$ and $\psi(0) = \phi(a) = k > 0$. We now claim that $\psi(x) > 0$ for all $x$. This will lead to a contradiction because $\psi(-a) = \phi(0) = 0$.
To establish our claim let's first consider positive values of $x$. If $\psi(x)$ vanishes for some positive $x$ then by continuity of $\psi(x)$ there is a least such positive value of $x$ for which $\psi(x) = 0$. Let this value be called $b$. Thus we have $\psi(b) = 0$ and $\psi(x) \neq 0$ for $x \in [0, b)$. Then by mean value theorem we have $\psi'(c) = (\psi(b) - \psi(0))/b = -k/b < 0$ for some $c \in (0, b)$. Clearly then $\psi(c) = \psi'(c) < 0$. Now $\psi(0) = k > 0, \psi(c) < 0$ and hence by intermediate value theorem $\psi(x)$ vanishes at least once in $(0, c) \subset (0, b)$ and this contradicts that $b$ is the least positive value of $x$ for which $\psi(x) = 0$. It follows that $\psi(x) \neq 0$ for all $x > 0$. Since $\psi(0) = k > 0$ it follows that $\psi(x) > 0$ for all $x > 0$ (if $\psi(x) < 0$ then by IVT $\psi(x)$ would vanish somewhere in between).
Now consider the function $h(x) = \psi(-x)\psi(x)$. Clearly $$h'(x) = \psi'(x)\psi(-x) - \psi(x)\psi'(-x) = \psi(x)\psi(-x) - \psi(x)\psi(-x) = 0$$ so that $h(x)$ is constant and hence $\psi(x)\psi(-x) = h(x) = h(0) = \psi(0)\psi(0) = k^{2} > 0$. It follows that $\psi(-x)$ has same sign as that $\psi(x)$. It now follows $\psi(x) > 0$ for all $x$.
We have thus completed case 1.
Case 2: Let us now suppose that there is some constant $a$ for which $\phi(a) = k < 0$. In this case proceeding as before we can show that the function $\psi(x) = \phi(x + a)$ is such that $\psi(x) < 0$ for all $x$ and this contradicts the fact that $\psi(-a) = \phi(0) = 0$.
Since both the cases are ruled out we are left with the only alternative that $\phi(x) = 0$ for all $x$.
Summing it up, we can see that if there is a function $\phi(x)$ which satisfies $\phi'(x) = \phi(x)$ for all $x$ then $\phi(x)$ is of constant sign for all $x$ i.e. either $\phi(x)$ is identically zero for all $x$ or $\phi(x)$ is positive for all $x$ or $\phi(x)$ is negative for all $x$.
The simple constraint $\phi'(x) = \phi(x)$ thus controls the behavior of the function $\phi(x)$ in a very strong way (and fortunately for us, in a very positive way leading to theory of exponential and logarithmic functions).

Note that the reasoning in case 1 above also shows that a function $f(x)$ satisfying $f'(x) = f(x)$ and $f(0) = 1$ is such that $f'(x) = f(x) > 0$ for all $x$. Thus $f(x)$ is strictly increasing and positive and hence admits an inverse $g(x)$ which is also strictly increasing and then $g(1) = 0$ and by rule of derivative of inverse functions $g'(x) = 1/x$ so that $g(x) = \int_{1}^{x}(1/t)\, dt$ and then it is easy to show that $g(xy) = g(x) + g(y)$ and this relation leads to $f(x + y) = f(x)f(y)$ and thereby it justifies the existence of $f(x) = e^{x}$ as well as the property $e^{x + y} = e^{x}e^{y}$ is also established.
Update: There is another approach which is simpler than the one used above. We are to prove that if $\phi'(x) = \phi(x)$ for all $x$ and $\phi(0) = 0$ then $\phi(x) = 0$ for all $x$. Let us suppose for example that $\phi(a) \neq 0$ and consider the function $\psi(x) = \phi(a + x)\phi(a - x)$. Clearly we have $$\psi'(x) = \phi'(a + x)\phi(a - x) - \phi(a + x)\phi'(a - x) = \phi(a + x)\phi(a - x) - \phi(a + x)\phi(a - x) = 0$$ so that $\psi(x)$ is a constant function and hence $\psi(x) = \psi(0) = \phi^{2}(a) > 0$. It follows that $\phi(a + x)\phi(a - x) > 0$. Putting $x = a$ in this equation we get $\phi(2a)\phi(0) > 0$ which is contrary to the fact that $\phi(0) = 0$.
What we have established so far is that if a function $\phi(x)$ satisfies $\phi'(x) = \phi(x)$ for all $x$ and is such that it takes a non-zero value at some point then it does not vanish for any value of $x$. Then by continuity $\phi(x)$ is of constant sign. Thus if we assume $\phi'(x) = \phi(x)$ and $\phi(x)$ not identically zero then we can define another function $f(x) = \phi(x)/\phi(0)$. Then $f'(x) = f(x), f(0) = 1$ and $f(x) > 0$ for all $x$. If $y$ is a constant and we define $g(x) = f(x + y)/f(x)$ then $$g'(x) = \frac{f(x)f'(x + y) - f(x + y)f'(x)}{\{f(x)\}^{2}} = \frac{f(x)f(x + y) - f(x + y)f(x)}{\{f(x)\}^{2}} = 0$$ so that $g(x)$ is a constant and hence $g(x) = g(0) = f(y)$. We thus have $f(x + y) = f(x)g(x) = f(x)f(y)$ so that the functional equation of $f(x)$ is proved.


How do they know what the frequency of Solfeggio notes

Question: It is hard to find information on how modern day people selling solfeggio tuning forks and the like know which exact frequencies to use.
I liked this article below but as I have just joined I apparently couldn't comment as yet ?
Does anyone have an answer for this?
I have searched the net but it is just a given that certain frequencies align with certain notes when there is no way to measure what pitches 11th century monks were singing.
How did musicians do "absolute" tuning in the Middle Ages?
Comment: Welcome! It's not clear to me whether your question is "How do modern folks calibrate tuning devices," or "how did people standardize tuning in earlier times," and you'll note you've gotten answers along both lines. The latter question seems thoroughly covered by the linked question (short version, they didn't). Maybe you'd like more details about exactly how modern devices are tested? I suggest using the "edit" button to refine your question. (This comment section, here, is for talking *about* a question, but doesn't really count as the question itself.)
Comment: The premise of the question seems to be that "people selling solfeggio tuning forks" have a goal of reflecting the practice of medieval monks.  Where does that idea come from?
Answer: TL;DR: 11th-Century monks did not sing according to a standardized reference pitch.

In 1955, the International Organization for Standardization adopted 440Hz as A4. Prior to that, there was an ongoing process of standardization, and, prior to that, there was essentially no agreement. (For more, see What is the origin of the notation A4, B3, F5, etc. (i.e. ))
The tuning fork itself was invented in 1711 (Source).
Before then ... Wikipedia summarizes the lack of consistency in reference pitch:

Until the 19th century, there was no coordinated effort to standardize musical pitch, and the levels across Europe varied widely. Pitches did not just vary from place to place, or over time—pitch levels could vary even within the same city. The pitch used for an English cathedral organ in the 17th century, for example, could be as much as five semitones lower than that used for a domestic keyboard instrument in the same city.

Even within one church, the pitch used could vary over time because of the way organs were tuned. Generally, the end of an organ pipe would be hammered inwards to a cone, or flared outwards, to raise or lower the pitch. When the pipe ends became frayed by this constant process they were all trimmed down, thus raising the overall pitch of the organ.

The oldest extant pipe organs are from the 1400s (Wikipedia), so even those would have nothing to say about the 11th century.
Comment: Pipe organs from the 1400s also have very little to say about the 15th century as most of them have been altered.
Answer: A modern tuning fork is calibrated against a known pitch, such as a tuner of some sort.
Back in the day, exact tuning didn't seem to be that important, as orchestras and bands were parochial - they didn't travel far, so an orchestra from one place could easily have a different tuning from that of another, even in the same country.
It didn't really matter much, as long as all the players were in tune with each other. As far as standardisation is concerned, that came much later, when there was far more movement between venues for musos, but even then, it would be the local organ that had to be the datum point - it would be set at whatever the maker felt was the 'correct' pitch. Even now, that 'correct' pitch varies from place to place in the world!


Raster update error when saving heatmap in QGIS

Question: I am using QGIS and I recently added a delimited layer and all my coordinates appear fine , however when I add a heatmap I get the error "Raster update error: Could not open the created raster for updating. The heatmap was not generated."
I am confident that I have added me heatmap correctly by specifying a valid output path and saving as .tiff as I previously done in the past but for some reason now I am getting this error . After some research some indicated that it might be bug  or something wrong with the plugin
Answer: It appears to be some sort of bug because after closing down and restarting QGIS the heatmap plugin now works perfectly again .


Is there an addon or a trick to prevent objects from being placed inside of each other?

Question: I was trying to make a big cluster of balloons but it toke to much time to place every balloon in a random position without them intercepting. Is there anyting that can prevent this, like an addon that prevents objects or vertex groups of objects from intercepting?
Comment: Do you mean in the final animation, or while you're editing the scene?  I don't think there is a limit distance constraint for groups. I agree with @HybridLizard, simulation will be the way to go, if it's a large group of balloons. Alternatively, you could use balloon as particle, and set the particles to no-intersect.
Answer: You can use Rigid Body simulation, maybe combined with some forces to distribute balloons. That may take some time and experiments to make it right.

You can automate that by mass copying rigid body properties from one balloon to others. Please check Blender docs to know more about Rigid Bodies and Force Fields.
You can automate your work by writing small python script. Please note that a lot of commands you need can be taken from the console.

Depending on how "big" number of balloons you want using a particle system for instancing balloons can be quite good solution. To make balloons more diverse, there can be made several versions of them and grouped. Then you just need to use that group for instancing and adjust settings like number, size variation, etc. Unfortunately Blender currently does not directly support Rigid Bodies for Particle System instances so they need to be converted to objects first.


Find projectile Initial Velocity given max range, gravity, and height

Question: So I've been trying to work out how to reverse a formula I found and worked on. I have thoroughly tested these formulas at desmos.com/calculator and have a realistic physics simulation playing in real-time over and over. It works EXACTLY as I need it to, however, I noticed that given an Initial Velocity, Gravity, and Launch Height, I can calculate the maximum distance of the projectile by first finding the angle (theta) that produces the longest shot from height y0 using this formula
, then using this formula to calculate the maximum range of the projectile.
I was wondering how I could reverse this so that given a Range, Gravity, and Height, you can find the Initial Velocity needed to reach it. I tried for about 3 hours to do it myself, manipulating the formulas and embedding the angle formula into the distance one and then simplifying it a LOT, but got stuck right at the end.
Answer: That maximum range formula doesn't make sense. If it's being fired at an elevation and velocity greater than 0, and the angle is 0, according to the formula, the projectile would have a maximum range of 0. Try finding a different formula.


Didn't mark that I had a checking account for direct deposit on tax filing, will I have my returns rejected?

Question: I submitted by taxes electronically through TurboTax and I realized that when I submitted my bank info in order to receive my returns via direct deposit, I didn't mark that it was a checking account and it has a blank in that area. My other info is correct, so I was wondering if they will reject my filing, or will they accept it but without that info, I will get a check instead.
Comment: If deposit fails, you should receive a check. Surprising that TurboTax allowed submitting a return with empty account type field.
Comment: What country are you asking about?
Comment: United States of america
Comment: @void_ptr Welcome to money.SE! On this site, we [avoid answering questions in the comments](https://money.meta.stackexchange.com/q/2298/10997).
Answer: According to this page from the IRS, if the bank refuses the deposit due to an error on the tax return, the IRS will mail a check to your address.

Scenario:

You omit a digit in the account or routing number of an account and the number doesn't pass the IRS's validation check. In this case, the IRS will send you a paper check for the entire refund instead of a direct deposit.

You incorrectly enter an account or routing number and the number passes the validation check but your designated financial institution rejects and returns the deposit to the IRS. The IRS will issue a paper check for that portion of your refund once received.
Comment: So I assume this would include my scenario?
Comment: @Asking I would assume that, yes. You did get the account numbers right, so either the bank will accept the deposit or not. If the bank refuses the deposit, the IRS won't know why; they'll just assume that you typed the account number incorrectly and mail you a check. Or because you left the account type blank, the info will fail the IRS validation requirements and they'll mail you a check without even trying to deposit.
Comment: Alright, I guess I'll wait and see


Do you capitalize the names of governments in a story?

Question: I know that names of countries, states, cities, and counties are always capitalized, but what about governments and organizations? In my novella there are basically 2 sections of space, and each have their own names. So in dialogue and in description do the names of factions, governments, and organizations need to be capitalized, or do I leave it uncapitalized?
Comment: Hi Abram. This question is probably suited better for English Language SE. It's borderline, so others might correct me here, but I believe it is more  a general grammar question than a question about how to write with grammar.
Answer: Proper names get capitalized. Generic names don't.

Federal Bureau of Sparkly Vampires
Department of Redundancy Department
Imperial Dogwalkers Consortium
The Sacred Order of Turnip Twaddlers
The Church of Saint Spock the Pointy-Eared
The United Provinces of Cumberbatch
the Hiddlestoners Rebellion
Judean People's Front (not to be confused with the People's Front of Judea)

but

the Cumberbatchian government
the rebels
cat lovers of the Empire
tautologists
those who twaddle turnips
hobbyist turnip-twaddlers
Comment: Yes. 'The Syndicate' in this context is referring to a specific organization, and as such is a proper noun. '*A* syndicate,' referring to perhaps a type of organization, would not be capitalized. As for the space, as long as you are referring to a specific name of an area, it is proper and capitalized. Simply saying 'their territory' or something similar is not proper, and is not capitalized. Similarly, 'the Syndicate's lands' is not capitalized, but the specific name of those lands is: 'Gahooza, province of the Syndicate.'
Comment: Stylistically, if you haven't done so, I would give proper names to your space regions: the *Neutral Zone*, *Orion's Nebula*, the *Delta Quadrant*, rather than *demilitarized zone*, *giant nebula* and the like
Comment: Is it considered a proper name if one of factions is referred to as The Syndicate? Also, what about the areas of space these two factions control? Would they be capitalized as well?
Comment: I've thought about that, just not sure how I want to go about it until I do a little more world building. Like there's the area of space beyond those borders that they would refer to as Cvil Order, or Syndicate space, and then there are regions within those borders.


How to set up a RTC clock in Ubuntu Core?

Question: I have a Raspberry Pi 3 that register data in time, so I need an RTC clock
I've attached dtoverlay=i2c-rtc,ds3231 to config.txt.
hwclock.service would be perfect, but it is masked, and I can't unmask it.
hwclock -s works fine, but when I try to execute from a confined snap I get this (time-control is connected):
ed10vi86@localhost:~$ sudo hwclock.hwclock-test -s --debug
hwclock from util-linux 2.27.1
Using the /dev interface to the clock.
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
/dev/rtc does not have interrupt functions. Waiting in loop for time from /dev/rtc to change
...got clock tick
Time read from Hardware Clock: 2017/06/29 10:49:54
Hw clock time : 2017/06/29 10:49:54 = 1498733394 seconds since 1969
Time since last adjustment is 1498733394 seconds
Calculated Hardware Clock drift is 0.000000 seconds
Calling settimeofday:
    tv.tv_sec = 1498733394, tv.tv_usec = 0
    tz.tz_minuteswest = -120
/snap/hwclock/x1/hwclock-test: line 2:  1656 Bad system call         hwclock $@

And snappy-debug.security scanlog:
= Seccomp =
Time: Jun 29 12:49:54
Log: auid=1000 uid=0 gid=0 ses=1 pid=1656 comm="hwclock" exe="/sbin/hwclock" sig=31 arch=40000028 79(settimeofday) compat=0 ip=0x76f0c246 code=0x0
Syscall: settimeofday

Works fine in devmode
Answer: I know this is kind of a delayed response, but I figured I'd share my solution. It seems that you can "recreate" the hwclock service and get the desired result, as follows:
In order to unmask a service, the corresponding definition file needs to be present in /etc/systemd/system. Luckily, in Ubuntu Core this directory is mapped to /writable/system-data/etc/systemd/system - so in that writable directory you can create a file called hwclock.service with the following contents (tweaked if desired):
[Unit]
Description=Hardware clock synchronization
[Service]
Type=oneshot
ExecStart=/sbin/hwclock --hctosys --utc --adjfile=/writable/system-data/etc/adjtime
ExecStop=/sbin/hwclock --systohc --utc --adjfile=/writable/system-data/etc/adjtime
[Install]
WantedBy=multi-user.target

Then you can unmask and enable the service as normal:
sudo systemctl unmask hwclock
sudo systemctl enable hwclock


What is the difference between compare() and compareTo()?

Question: What is the difference between compare() and compareTo() methods in Java? Do those methods give the same answer?
Comment: Which compare Class methode you mean?
Comment: for detailed explanation of the uses of both compare() and compareTo(): http://sysdotoutdotprint.com/index.php/2017/03/28/comparable-vs-comparator/
Comment: @mel3kings Can you please update the link in your comment? It currently provides no information towards this question.
Answer: From JavaNotes:

a.compareTo(b):
Comparable interface : Compares values and returns an int which tells if the values compare less than, equal, or greater than.
If your class objects have a natural order, implement the Comparable<T> interface and define this method. All Java classes that have a natural ordering implement Comparable<T> - Example: String, wrapper classes, BigInteger
compare(a, b):
Comparator interface :  Compares values of two objects. This is implemented as part of the Comparator<T> interface, and the typical use is to define one or more small utility classes that implement this, to pass to methods such as sort() or for use by sorting data structures such as TreeMap and TreeSet. You might want to create a Comparator object for the following:

Multiple comparisons. To provide several different ways to sort something. For example, you might want to sort a Person class by name, ID, age, height, ... You would define a Comparator for each of these to pass to the sort() method.
System class To provide comparison methods for classes that you have no control over. For example, you could define a Comparator for Strings that compared them by length.
Strategy pattern To implement a Strategy pattern, which is a situation where you want to represent an algorithm as an object that you can pass as a parameter, save in a data structure, etc.

If your class objects have one natural sorting order, you may not need compare().

Summary from http://www.digizol.com/2008/07/java-sorting-comparator-vs-comparable.html
Comparable
A comparable object is capable of comparing itself with another object.
Comparator
A comparator object is capable of comparing two different objects. The class is not comparing its instances, but some other class's instances.

Use case contexts:
Comparable interface
The equals method and == and != operators test for equality/inequality, but do not provide a way to test for relative values.
Some classes (eg, String and other classes with a natural ordering) implement the Comparable<T> interface, which defines a compareTo() method.
You will want to implement Comparable<T> in your class if you want to use it with Collections.sort() or Arrays.sort() methods.
Defining a Comparator object
You can create Comparators to sort any arbitrary way for any class.
For example, the String class defines the CASE_INSENSITIVE_ORDER comparator.

The difference between the two approaches can be linked to the notion of:
Ordered Collection:
When a Collection is ordered, it means you can iterate in the collection in a specific (not-random) order (a Hashtable is not ordered).
A Collection with a natural order is not just ordered, but sorted. Defining a natural order can be difficult! (as in natural String order).

Another difference, pointed out by HaveAGuess in the comments:

Comparable is in the implementation and not visible from the interface, so when you sort you don't really know what is going to happen.
Comparator gives you reassurance that the ordering will be well defined.
Comment: Since this answer is exhaustive, here's something that annoys me about Comparable you might like to add: It is in the implementation and not visible from the interface, so when you sort you dont really know what is going to happen. Using a comparator gives you reassurance that the ordering will be well defined
Comment: @VedantKekan Thank you. I have restored 2 links in this answer.
Comment: @HaveAGuess good point. I have included your comment in the answer for more visibility.
Comment: objects have a natural order, what does natural order mean here? Is a string data member for eg name in employee class has natural order??
Comment: @NarendraJaggi See https://en.wikipedia.org/wiki/Enumeration. An order which facilitates enumeration. "Natural" in the sense that a given well-ordering on the index set provides a unique way to list the next element given a partial enumeration
Answer: compareTo() is from the Comparable interface.
compare() is from the Comparator interface.
Both methods do the same thing, but each interface is used in a slightly different context.
The Comparable interface is used to impose a natural ordering on the objects of the implementing class. The compareTo() method is called the natural comparison method. The Comparator interface is used to impose a total ordering on the objects of the implementing class. For more information, see the links for exactly when to use each interface.
Comment: can u give some examples?Both methods give same answers?
Comment: I don't know why 'Comparable' is for natural ordering? We can customize it, can't we?
Answer: Similarities:

Both are custom ways to compare two objects.
Both return an int describing the relationship between two objects.

Differences:
The method compare() is a method that you are obligated to implement if you implement the Comparator interface.  It allows you to pass two objects into the method and it returns an int describing their relationship.
Comparator comp = new MyComparator();
int result = comp.compare(object1, object2);

The method compareTo() is a method that you are obligated to implement if you implement the Comparable interface.  It allows an object to be compared to objects of similar type.
String s = "hi";
int result = s.compareTo("bye");

Summary:
Basically, these are two different ways to compare references.
Answer: The methods do not have to give the same answers. That depends on which objects/classes you call them.
If you are implementing your own classes which you know you want to compare at some stage, you may have them implement the Comparable interface and implement the compareTo() method accordingly.
If you are using some classes from an API which do not implement the Comparable interface, but you still want to compare them. I.e. for sorting. You may create your own class which implements the Comparator interface and in its compare() method you implement the logic.
Answer: Using Comparator, we can have n number of comparison logic written for a class.
E.g.
For a Car Class
We can have a Comparator class to compare based on car model number. We can also have a Comparator class to compare based on car model year.
Car Class
public class Car  {

    int modelNo;

    int modelYear;

    public int getModelNo() {
        return modelNo;
    }

    public void setModelNo(int modelNo) {
        this.modelNo = modelNo;
    }

    public int getModelYear() {
        return modelYear;
    }

    public void setModelYear(int modelYear) {
        this.modelYear = modelYear;
    }

}

Comparator #1 based on Model No
public class CarModelNoCompartor implements Comparator<Car>{

    public int compare(Car o1, Car o2) {

        return o1.getModelNo() - o2.getModelNo();
    }

}

Comparator #2 based on Model Year
public class CarModelYearComparator implements Comparator<Car> {

    public int compare(Car o1, Car o2) {

        return o1.getModelYear() - o2.getModelYear();
    }

}

But this is not possible with the case of Comparable interface.
In case of Comparable interface, we can have only one logic in compareTo() method.
Answer: Comparable interface contains a method called compareTo(obj) which takes only one argument and it compares itself with another instance or objects of the same class.
Comparator interface contains a method called compare(obj1,obj2) which takes two arguments and it compares the value of two objects from the same or different classes.
Answer: compareTo(T object)

comes from the java.lang.Comparable interface, implemented to compare this object with another to give a negative int value for this object being less than, 0 for equals, or positive value for greater than the other. This is the more convenient compare method, but must be implemented in every class you want to compare.
compare(T obj1, T obj2)

comes from the java.util.Comparator interface, implemented in a separate class that compares another class's objects to give a negative int value for the first object being less than, 0 for equals, or positive value for greater than the second object. It is needed when you cannot make a class implement compareTo() because it is not modifiable. It is also used when you want different ways to compare objects, not just one (such as by name or age).
Answer: The relationship of the object having this method and its collaborators is different.
compareTo() is a method of the interface Comparable, so it is used to compare THIS instance to another one.
compare() is a method of the interface Comparator, so it is used to compare two different instances of another class with each other.
If you will, implementing Comparable means that instances of the class can be easily compared.
Implementing Comparator means, that instances are suited to compare different objects (of other classes).
Answer: compareTo() is called on one object, to compare it to another object.
compare() is called on some object to compare two other objects.
The difference is where the logic that does actual comparison is defined.
Comment: Not what I'd call a fantastic answer, but I don't think it deserves a downvote.
Comment: Agreed, personally I reserve downvotes for wrong or misleading answers. This one is definitely correct.
Comment: So where are those 'friendly' people who downvoted me? This is my second correct answer that was downvoted because someone missed the point. Either the point of downvoting or the point of my answer. Life's so cruel.. ;-)
Answer: The main difference is in the use of the interfaces:
Comparable (which has compareTo()) requires the objects to be compared (in order to use a TreeMap, or to sort a list) to implement that interface. But what if the class does not implement Comparable and you can't change it because it's part of a 3rd party library? Then you have to implement a Comparator, which is a bit less convenient to use.
Answer: One more point:

Comparable is used to define a default ordering for objects within a class
Comparator is used to define a custom ordering to be passed to a method.

comparator-vs-comparable
Answer: When you want to sort a List which include the Object Foo, the Foo class has to implement the Comparable interface, because the sort methode of the List is using this methode.
When you want to write a Util class which compares two other classes you can implement the Comparator class.
Answer: Employee Table
Name, DoB, Salary
Tomas , 2/10/1982, 300
Daniel , 3/11/1990, 400
Kwame , 2/10/1998, 520
The Comparable interface allows you to sort a
list of objects eg Employees with reference to one primary field – for
instance, you could sort by name or by salary with the CompareTo() method
emp1.getName().compareTo(emp2.getName())

A more flexible interface for such requirements is provided by
the Comparator interface, whose only method is compare()
public interface Comparator<Employee> {
 int compare(Employee obj1, Employee obj2);
}

Sample code
public class NameComparator implements Comparator<Employee> {

public int compare(Employee e1, Employee e2) {
     // some conditions here
        return e1.getName().compareTo(e2.getName()); // returns 1 since (T)omas > (D)an
    return e1.getSalary().compareTo(e2.getSalary()); // returns -1 since 400 > 300
}

}
Answer: There is a technical aspect that should be emphasized, too. Say you need comparison behavior parameterization from a client class, and you are wondering whether to use Comparable or Comparator for a method like this:
class Pokemon {
    int healthPoints;
    int attackDamage;
    public void battle (Comparable<Pokemon> comparable, Pokemon opponent) {
        if (comparable.compareTo(opponent) > 0) { //comparable needs to, but cannot, access this.healthPoints for example
            System.out.println("battle won");
        } else {
            System.out.println("battle lost");
        }
    }
}

comparable would a lambda or an object, and there is no way for comparable to access the fields of this Pokemon. (In a lambda, this refers to the outer class instance in the lambda's scope, as defined in the program text.) So this doesn't fly, and we have to use a Comparator with two arguments.
Answer: Use Comparable interface for sorting on the basis of more than one value like age,name,dept_name...
For one value use Comparator interface
Answer: Important Answar
String name;
int roll;

public int compare(Object obj1,Object obj2) { // For Comparator interface
    return obj1.compareTo(obj1);
}

public int compareTo(Object obj1) { // For Comparable Interface
    return obj1.compareTo(obj);
}

Here in return obj1.compareTo(obj1) or return obj1.compareTo(obj) statement
only take Object; primitive is not allowed.
For Example
name.compareTo(obj1.getName()) // Correct Statement.

But
roll.compareTo(obj1.getRoll())
// Wrong Statement Compile Time Error Because roll
// is not an Object Type, it is primitive type.

name is String Object so it worked.
If you want to sort roll number of student than use below code.
public int compareTo(Object obj1) { // For Comparable Interface
    Student s = (Student) obj1;
    return rollno - s.getRollno();
}

or
public int compare(Object obj1,Object obj2) { // For Comparator interface
    Student s1 = (Student) obj1;
    Student s2 = (Student) obj2;
    return s1.getRollno() - s2.getRollno();
}


How to install gcloud in a Docker container on 19.10?

Question: I have a Docker container as 19.10 as both the host and guest, and I tried to install gcloud:
# Add the Cloud SDK distribution URI as a package source
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list

# Fix the zany problem of user apt not being able to access a file from curl
# https://askubuntu.com/questions/908800/what-does-this-synaptic-error-message-mean
RUN chown -R _apt:root /var/lib/apt/lists

# Import the Google Cloud Platform public key
RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add -

# Update the package list and install the Cloud SDK
RUN apt update && apt install -qy google-cloud-sdk

I get the following error:
Step 7/8 : RUN apt update && apt install -qy google-cloud-sdk
 ---> Running in c1e06f8c1130

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Get:1 http://packages.cloud.google.com/apt cloud-sdk InRelease [6343 B]
Get:2 http://packages.cloud.google.com/apt cloud-sdk/main amd64 Packages [108 kB]
Hit:3 http://archive.ubuntu.com/ubuntu eoan InRelease
Fetched 114 kB in 1s (185 kB/s)
Reading package lists...
Building dependency tree...
Reading state information...
All packages are up to date.
W: Download is performed unsandboxed as root as file '/var/lib/apt/lists/partial/archive.ubuntu.com_ubuntu_dists_eoan_InRelease' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 google-cloud-sdk : Depends: python2.7 but it is not installable
                    Recommends: python-crcmod but it is not installable
E: Unable to correct problems, you have held broken packages.
The command '/bin/sh -c apt update && apt install -qy google-cloud-sdk' returned a non-zero code: 100
make: *** [Makefile:4: build] Error 100

How do I fix this?
Answer: Manually installing Python2.7 solved the issue. But since Python2.7 wasn't in the default repos on this image, I had to add them.
Adding the following lines before attempting to install gcloud solved my issue:
RUN echo "deb http://us.archive.ubuntu.com/ubuntu/ eoan universe" | tee -a /etc/apt/sources.list.d/python27.list

# Fix the zany problem of user apt not being able to access a file from curl
# https://askubuntu.com/questions/908800/what-does-this-synaptic-error-message-mean
RUN chown -R _apt:root /var/lib/apt/lists

RUN apt update

RUN apt install -qy curl git screen vim gnupg python2.7


After an earthquake in California, everything to the east is gone

Question: Definitely published before 1980. City on west coast experiences massive earthquake. A survivor, who I think lives in the mountains above the city, (LA, San Fran?) comes out of his house when the quake has ended and expects to see that the Pacific Ocean has dropped/disappeared, but all is well. He walks back to his house and instead looks east, and everything is gone.
Answer: I believe you are thinking of the short story "A Slight Miscalculation" by Ben Bova.
A description of the story is at:
MathFiction
"This is a story of a mathematician who found a way to predict earthquakes. He finds out that there will be a major earthquake in California (where he lives). After checking this prediction using CalTech's computer he notices that his own results is slightly different from the computer's. While he tries to figure out the reason of this discrepancy, other people are leaving the California in a great hurry. Being obsessed with the problem, he does not notice the panic, ignoring the fact that he might be in danger himself. Finally the earthquake begins exactly at the predicted time and date. After it is over, mathematician notices that the computer's version was correct : the rest of USA lays beneath the sea... "
You can find it in an anthology at:
ISFDB
The ending lines of the story read:

 Beyond the parking lot, where the eucalyptus trees used to be, was the edge of a cliff, where still-steaming rocks and raw earth tumbled down to a foaming sea. Nathan staggered to the cliff's edge and looked out across the water, eastward. Somehow he knew that the nearest land was Europe. "Son of a bitch," he said with unaccustomed vehemence. "The computer was right after all."


Why do my questions on the etymology of idioms get closed, yet this one was accepted?: What is the origin of "out of sight" or "outa sight" i?

Question: Every question I have asked about the etymology of an idiom gets pulled.  Yet I found this one that stayed up. It's espcially irritating because sometimes before my question gets closed, I have recieved useful respsonses.  I don't post a question unless I have researched all the etymology I can find online.
Comment: Total guess, but probably because they violate site policies. It's also quite common for people to claim they have researched etymology but not document their research in the question - the requirement is not just to do the research but to describe in the question what research you have done. And (not criticising "out of sight" specifically) some questions which remain up are bad questions, especially if they're older from when the rules were different. But you seem to think we're psychic, which makes me suspect you thought we were able to read your mind and tell if you did research.
Comment: What is "this one which stayed up"? Please [edit] to include links. As for being a published author, congratulations! But the community didn't know that, and even that accolade doesn't mean that you have actually done any research. At least say where you looked. As it stands, the question here is so vague that I'm not sure it can be answered: please do make it more specific.
Comment: I understand the concern for random questions, but I'm a published historian, and when I have an etymological question, StackExchange is the only place to go for expert opinions. I participate in several historical listservs and I have no problem with unserious questions--I just scroll past them. In the past, I have gotten a standard reason for closing the question about "a reasonable assumption of systematicity, by situating themselves within a historical context of language..."  I don't see any of that "systematicity" or "context" in the "out of sight" question.
Comment: Heartspring said, "You should link the questions and ask this on [Meta]."  How do I do that?
Comment: Do you in fact post your research? 'Collins Dictionary, AHD, M-W and the Online Etymological Dictionary do not help' (if true) is valid. // I've checked and can only find one (other)  question that you've posted. It contains references and has been answered and upvoted. If you've deleted closed questions, 'Why have my questions on ... been closed?' is hardly a fair question to put before the community.
Comment: Well, since the questions have been deleted they can't be linked easily- you can, however, paste their content into blockquotes. As for meta-migration, we've already moved it here.
Answer: No question of yours asked on our main site has been "pulled" — whatever you meant by that. Certainly not even one has yet been deleted.  You have to date asked exactly three questions on English Language and Usage, which I list here prefixed by the precise timestamp at which you posted them and ordered oldest to youngest:

2023-04-25 13:55:57Z What is the etymology of the expression "spit bath"?
2023-10-12 14:48:20Z Why do my questions on the etymology of idioms get closed, yet this one was accepted?: What is the origin of "out of sight" or "outa sight" i?
2023-10-12 16:14:22Z What is the recent etymology of the American expression "mosey''?

Your second question was correctly migrated here to our meta site where it should have been posted, and migration automatically locks the original on the site of origin; it will eventually be deleted by routine system clean-up services in the fullness of time.
The other two questions you have asked are both still available for interactions.
Although some members of our site may quibble a bit with the notion that an idiomatic expression comprising multiple words can have an "etymology" rather than an origin or history, that really doesn't influence whether someone deleted your questions from the site. No one has done that.
Comment: The closed question was asked on [Linguistics](https://linguistics.stackexchange.com/q/47675/22150).


Do you have to install disc games to play them on an Xbox 360?

Question: I want to buy all of the Halo games for the 360 on disc, but do I need free space to install them? I've never had an Xbox before.
Comment: You don't necessarily need to install any arbitrary 360 game. Some games require some degree of installation. I'd have to check each of the games in question specifically.
Comment: The only game I remember you having to install was GTA V.  I'm sure there are others, but the rest ran off disc.  You _can_ install the games optionally to improve their performance.
Comment: It depends on the game; Loading times will be increased; No Halo game on the 360 required it
Comment: I heard that Halo 3 used to copy its data from DVD to HDD, which became a problem when MS implemented the install system, since the game would then copy data from HDD to HDD. Halo 3 was one of the few games, where it was recommended it should *not* be installed.
Answer: You don't, in general, have to install disc games to play them on an Xbox 360, although it will often make the load times faster.
Some games do require installation, but the Halo games are not among those. Indeed, Halo 3 should not be installed, because it's optimized to run faster from the disc.
You do, however, need to have a little free space on your hard drive in order to create save data.
Answer: Yes, you will need disk space to save game data on your Console.
The best thing to do is get rid of data you don't need anymore, or go through the games one at a time. If the console comes up with a 'no free space' error it should give you an option to delete some data.


What use is Reflection in .NET?

Question:
Possible Duplicates:
When do you use reflection? Patterns/anti-patterns
What exactly is Reflection and when is it a good approach?

What is the need for reflection in .NET? What are the situations where it comes in handy?
Comment: Duplicate: http://stackoverflow.com/questions/429962/when-do-you-use-reflection-patterns-anti-patterns
...
...
...
...
Also: http://stackoverflow.com/questions/864332/what-exactly-is-reflection-and-when-is-it-a-good-approach
Comment: It comes handy when nothing else works. Just like javascript in web world. :)
Answer: Let's say you're writing a basic serialization routine, that will serialize any object to XML. How would you make it generic enough, so that it can work for any object? If you have a class where you know all the properties, then you can easily write a "ToXml()" function, where you manually write out all the properties to XML. What if you want to extend this though to ANY object? In that case, you need to reflect over the properties at runtime, and write them out to the XML.
There are many more uses for it, that's the first one that came to mind.
Answer: There are many uses for reflection.  The .NET Framework uses it for serialization and for data binding, it can also be used for creating tools that examine your code like Reflector, FxCop and NUnit as well as ORM database frameworks.  It has a wide variety of uses at runtime from logging specific things about an object to Dependency Injection Frameworks. It can also be used to dynamically execute methods or set properties at runtime as is done with custom attributes.  It can also be used in higher level programming such as metaprogramming and self-modifying code.
Answer: I think the Wikipedia article on reflection is pretty good:

In computer science, reflection is the
  process by which a computer program
  can observe and modify its own
  structure and behavior. The
  programming paradigm driven by
  reflection is called reflective
  programming. It is a particular kind
  of metaprogramming.
In many computer architectures,
  program instructions are stored as
  data - hence the distinction between
  instruction and data is merely a
  matter of how the information is
  treated by the computer and
  programming language. Normally,
  'instructions' are 'executed' and
  'data' is 'processed'; however, in
  some languages, programs can also
  treat instructions as data and
  therefore make reflective
  modifications. Reflection is most
  commonly used in high-level virtual
  machine programming languages like
  Smalltalk and scripting languages, and
  less commonly used in manifestly typed
  and/or statically typed programming
  languages such as Java and C.

Reflection allows you to get information about the type of an object at execution time.  This can be helpful in many situations including (but limited to) serialization and object-relational mappings.
Answer: It's used for metaprogramming, which is when you're coding about code itself rather than the usual business problems
Answer: It can also be very useful when testing your application, e.g. unit tests or other types of test frameworks. By using reflection you could for example create an xml file (or some other input data file in suitable format) and have your program analyze it and call methods that are defined in the file. This is how Fitnesse work.
Answer: Reflection is used when you don't know at compile time which time your object is or what action to do or on what property...
You can use reflection to find all object of Type X in a given Assembly, or invoke some method by it's name (fetched from a db, or config file...), same thing for setting a property.... things like that (these are the case where we used it)

What use is Reflection in .NET?


How can I use different facebook account to sign in a game on iphone?

Question: I used a facebook account to sign in a game on my iphone ( the game is "top eleven"). Now I want to change the account and use another one because I have more friends in 2nd account.
Already used 2nd account's username and password in setting but didn't work, even deleted facebook app and installed it again and signed in with 2nd one but when I open the game it runs with 1st one.
how can I solve this problem ?
thanks
Comment: Doesn't this depend almost entirely on the app in question being named? We can all speculate about  His, but it's really up to the app developer how the leverage a federated log in.
Answer: It's because you are also signed in on Facebook in Safari browser.
iPhone first looks for Facebook login in safari before looking for it in the Facebook app.
Log out of Facebook in Safari browser.
The game will then use your Facebook app to determine which account to use for login
Comment: Far from obvious, but it worked!! :)
Answer: You need to change the Facebook login in the app itself. There should be Settings somewhere within the game, and the option to "Log Out" of Facebook. Once you have logged out, you will need to link it to your 2nd Facebook account by logging into it - again - within the app itself.
Answer: Or you have to delete the app, install it again and sign in with your Facebook Account.


Why can't we define a top level class as private?

Question: Why does Java not allow a top level class to be declared as private? Is there any other reason other than "We can't access a private class"?
Comment: Do you mean we can we NOT define a top level class as private?
Comment: Subject of [MSO 396686](https://meta.stackoverflow.com/questions/396686) (2020-04-16).
Answer: A top-level class as private would be completely useless because nothing would have access to it.
Comment: @stevebot i guess that is called `Protected`
Comment: @MuhammadBabar Actually, `Protected` is not a legal modifier for classes. In order for a class to be "scoped" to its package only, you would simply not specify any modifier (as opposed to `Public`)
Comment: Not necessarily true. The access level above a class is a package. The class could be scoped to the package only, denying access to other packages.
Comment: @stevebot Class can't be private nor protected. AND same package classes can't access private methods and variables.
Answer: Java doesn't allow a top level class to be private. Only 'public' or 'package'.
Answer: I believe a better question would be:

What would it mean for a top level class to be private?

If you think in terms of access levels, the level above class is package. In fact you can have package private top level classes in Java! Taking from the Oracle (formerly Sun) Java tutorials:

If a class has no modifier (the default, also known as package-private), it is visible only within its own package (packages are named groups of related classes — you will learn about them in a later lesson.)

Depending on the answer to the question I asked, this might fit with your definition of a "top level private class".
Answer: Private classes are allowed, but only as inner or nested classes. If you have a private inner or nested class, then access is restricted to the scope of that outer class.
If you have a private class on its own as a top-level class, then you can't get access to it from anywhere. So it does not make sense to have a top level private class.
Answer: In theory, you could instantiate and call methods on a private top-level class (if such a thing were allowed by the language ... which it isn't!), but you would have to use reflection to do this.  Sensibly (IMO) Sun decided that private top-level classes were not a good thing to support at the language level.
Actually, it is possible that the JVM might support top-level private "classes" created by bytecode magic.  But it is not a useful thing to do.

UPDATE - In fact, the current JVM spec makes it clear that the ACC_PRIVATE bit of the access flags word for a class is "reserved for future use", and that Java implementations should treat it as unset.  Thus, the above speculation is moot for any JVM that strictly implements the current specification.
Answer: We can not declare an outer class as private. More precisely, we can not use the private access specifier with an outer class. As soon as you try to use the private access specifier with a class you will get a message in Eclipse as the error that only public, final, and abstract can be used as an access modifier with a class.
Making a class private does not make any sense as we can not access the code of its class from the outside.
Answer: There would be no way to access that class or its members.
Answer: This needs a simple understanding of why it is not required to declare classes as private in Java.
If your class is itself a standalone program/software (which is highly unlikely) then you would have already defined it in a project and a package specific for it. So adding the private keyword is redundant to it.
If that's not the case then default access is then it means your program/software depends on different classes to run. If we are declaring one class among them as private (in case if we could) then we are restricting its accessibility by other classes, etc. which isn't of any use. It simply means that the class declared as private by us isn't of any use for the code to run. Which again renders it useless.
If you mean package level access then for default access we don't need to declare any keyword before it.
Answer: As we already know, a field defined in a class using the private keyword can only be accessible within the same class and is not visible to the outside world.
So what will happen if we will define a class private? Will that class only be accessible within the entity in which it is defined which in our case is its package?
Let's consider the below example of class A
package com.example;
class A {
    private int a = 10;

    // We can access a private field by creating object of same class inside the same class
    // But really nobody creates an object of a class inside the same class
    public void usePrivateField(){
        A objA =  new A();
        System.out.println(objA.a);
    }
}

Field 'a' is declared as private inside 'A' class and because of it, the 'a' field becomes private to class 'A' and can only be accessed within 'A'. Now let's assume we are allowed to declare class 'A' as private, so in this case class 'A' will become private to package 'com.example' and will not be accessible from outside of the package.
So defining private access to the class will make it accessible inside the same package which the default keyword already does for us. Therefore there isn't any benefit of defining a class private; it will only make things ambiguous.
You can read more in my article Why an outer Java class can't be private or protected.
Answer: You cannot define a top level class private (or anything else besides public). You will get a compilation error.
Something.java:6: error: modifier private not allowed here
private class Something {
        ^
1 error

You have only two options, public or no access modifier at all. By omitting public you, implicitly, limit class access to within the package (aka: package-private).


How do I run a Tor relay under TAILS 0.23 distro?

Question: I'm running TAILS 0.23 off a usb stick. The Vidalia control panel does NOT have the "Setup Relaying" button.  How can I start a Tor relay?
Answer: TAILS is not designed to host a server, and that for security reasons. If you want to safely and securely run a Tor relay you should use Tor-ramdisk


Performance of non-numeric indexes

Question: If I use a nvarchar(n) column as a clustered index on a SQL Server database, am I going to suffer a significant performance hit compared to a numeric (int) index? Also how does the performance of compound indexes compare?
Answer: Sql doesn't really care whether your index is numerical or not but there are some things you need to consider depending on what is in the column and how you are using the table.
Generally you want to keep your indexes as small as possible so nvarchar(4000) (upto 8000 bytes) would really suck but a varchar(3) (upto 3 bytes) would be smaller than int (4 bytes).  Also you want to (where possible) have your index insert inserted into the end of the index this keeps the index from fragmenting and causing you performance issues.
Compound indexes can greatly improve performance if the queries you are running against the table only contain the columns in the index.  This means that the actual table is never even touched as the index satisfies the query.
see Sql server index basics for an overview on indexes.
It might be more helpful if you gave more specific details about the table itself and how you want to use it?
Comment: Damn, I wanted to add that reference. +1
Comment: The maximum numeric length set for NVARCHAR is 4000. THere is however "NVARCHAR(MAX)" but a numerical length is allowed to 4000 and below not over 4000.
Answer: Colin,
nvarchar uses double the space of a varchar column. If nvarchar column is the only index on the table then the hit may NOT be that much but if you have non-clustered Indexes also on that table then yes, you will have a performance hit. Its because the clustered index is included in all rows for the non-clustered indexes also and your non clustered indexes will be very wide. On the other hand, int column occupies only 4 bytes and has a big range to store values from -2,147,483,648 through 2,147,483,647 and tend to be narrow. For 4 bytes, a nvarchar column can only store atmost the space used of a varchar(2) as it uses double the space of a varchar column. Do you see how much space are you wasting?
Answer: Almost certainly yes.
Narrow, numeric and strictly monotonic makes a good clustered key. nvarchar is none of these.
Each non-clustered index entry refers to the clustered index so you'll also bloat NC indexes too.
This is before collation/comparison issues.
Answer: I think it also depends on the size of your table. For smaller tables I doubt you'd notice a difference but for larger ones, say 1 million rows and beyond, you may see a slight slowdown with nvarchar. I'd say it is also dependent on what the field actually contains..i.e., are they emails, etc.
Answer: When talking about indexes, you have to split "performance" into two topics.
On insert, updates, and deletes, the index will slow your db down - more so with clustered indexes than non-clustered because it may have to move data around in underlying data store. Here I agree with John that the sequential int will perform better than the nvarchar.
But if you need to query on the nvarchar field anyway, a clustered index on this field will do more to speed up your reads.
So the answer to your question really depends on whether you are worried about performance on inserts or reads.

Performance of non-numeric indexes