Delete Post With No Traffic?

Question: My site has over 8k posts, some of which are outdated. To keep site maintainable and tidy, I want to delete all post with no traffic. Can this be done?
Is there any plugin for this purpose? Or any way?
Thanks in advance,
Answer: First, you need a list of all available URIs. You may use my plugin T5 All URIs for that. Just activate and go to your blog on /alluris/. There is also a link to the file in your plugin list after activation.

Then you need your log files, ideally one file with all requests from a long period (one year?). Run a grep for each line from all-uris over your log file and create a third list with all missing URIs – URIs which were never called during the time the log file represents. This may take a while … be patient. :D
And then you can review the deletion candidates. Still a lot of work. But it is worth the time.
Answer: I did it this way. Opened Google analytics and Moved around 20 worthy posts manually to a new username, then delete all psots by admin, then moved worthy posts back.
But f you have hundreds of worthy posts, then we need plugin.. someone need to create. But it should works like a counter first to gather views statistics..
Comment: Welcome to WordPress StackExchange! . . . Could you please detail this Google Analytics method? . . . And, if you haven't, please take a look at this [Stack FAQ](http://wordpress.stackexchange.com/faq) ;)
Answer: I seriously doubt there is a plugin out there that can do this for you. I did have a quick Google search, but you're going to have to manually do it or write your own plugin. Keep in mind a plugin of this calibre will need to store metrics of a post like views, with the ability to have different views for different days and then set an interval for the plugin to check for unpopular posts and then delete them.
I'm sure there would be a way you could create a plugin that uses Google Analytics data as well, but regardless of choice there would be a bit of work involved.
Comment: I also, did google. Same for input anyways. I have no talent to create such a plugin.
Answer: Just an idea... but you could store the number of views as meta data. I believe there are several plug-ins that do this (for instance WP-PostViews. Though I can't recommend it as I haven't used it.
You (or someone) could use a plug-in like that as a basis for your own. The only difference being that you run a WP-Cron job every X number of days/weeks/months and check which posts have had less than Y hits.
The hooked function that searches for posts with fewer than Y views and deletes them, and resets the counters for the rest of the posts.
That said, that would be a lot of database work.
I'd recommend searching for some of the questions we have on plug-in development and cron jobs.
Answer: In Google Analytics you can easily create a list of the 500 most popular posts by view for the past year and save this as a CSV file.
But by manipulating the URL you can get the list to be 5000, 10000 lines.
You can then match this is @Toschos T5 URI plugin and its probably a matter of just comparing the two lists.
Answer: This is what I would do instead, I would use screamming frog connected to the google analytics api then you can export a excel with all your urls and the views on it. Select the less visited url and create a xml with them, then you can use the plugin mass wordpress delete to upload the xml file with all the urls to delete.

Delete Post With No Traffic?


QEMU-KVM Libvirt Java Binding Error: Forbidden for read only access

Question: so I'm currently doing my thesis and a part of it is to communicate with KVM (Kernel Based Virtual Machine). I was already able to establish a connection through the use of the libvirt Java Binding. The virtual machine i created in KVM (centostest) is already up and running, however i want to shut it down but i got the following errors:
libvir: Domain error : operation virDomainShutdown forbidden for read only access
org.libvirt.LibvirtException: operation virDomainShutdown forbidden for read only access
    at org.libvirt.ErrorHandler.processError(ErrorHandler.java:33)
    at org.libvirt.Connect.processError(Connect.java:1322)
    at org.libvirt.Domain.processError(Domain.java:830)
    at org.libvirt.Domain.shutdown(Domain.java:972)
    at Main.testkvm(Main.java:31)
    at Main.main(Main.java:16)
Below is a portion of the code:
Connect conn;
    try {
        conn = new Connect("qemu:///system", true);
        Domain testDomain = conn.domainLookupByName("centostest");
        testDomain.shutdown();

    } catch (LibvirtException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

Any suggestions?
Answer: You are using read-only connection. Try this:
conn = new Connect("qemu:///system", false);


How do I measure the voltage coming out of a USB port?

Question: If I attach a USB cable to a USB port, and then strip the wire at the end, then how do I connect a multimeter to it to measure the voltage?
Comment: it is 100mA without asking, not 50.
Comment: Just to make sure awakeFromNib is clear, the 100mA limit has nothing to do with measuring the voltage with a multimeter since the multimeter will not load the circuit much. The only case that this does come into play is if he connects a large load, such as a 10 ohm resistor, across the vbus and ground pins. Doesn't sound like this is what he is asking about though.
Comment: Remember that drawing any more than 50 mA before asking for more (if you do at all) is a violation of the spec and potentially damaging to the bus (and all other devices on it). With the USB Charging Specification, devices are also able to draw up to 1.8 A from a USB port (if allowed).
Comment: How do you get past the 100mA limit?
Comment: As part of the enumeration, you negotiate how much power is needed.
Answer: The standard pin numbers and colours in a USB cable are shown below.
<code>Pin Number   Cable Colour   Function
     1          Red         VBUS (5 volts)
     2          White       D-
     3          Green       D+
     4          Black       Ground
</code>
If there is no device connected to the USB port then the maximum current that the port can support may be quite low.  Once a device has enumerated itself on the port then it can negotiate for up to 500mA from the host controller.
To measure the voltage then you either touch the meter probes onto the stripped ends of the wires or, if your cable end is a large connector, then touch the probes (without shorting them together) onto pins 1 and 4 of the connector.  The power pins on the USB connector are easy to identify as they are longer than the data pins.  This is so that they mate first and ensures that the power is connected before the data.
Comment: I had a bad experience with this approach. I checked one of the USB ports of a computer at work. I probed pins 1 and 4 with a multimeter in DC mode. The PC's fan started spinning fast, then blue screen of death. Fortunately the mobo was not damaged. But I still don't understand what went wrong. Never repeated the experiment again.
Comment: Downvoting, becuase the pins on a "large" USB connector (ie, USB A) of *either* gender are quite close to an exposed and often grounded shield; it's really not easy to probe them *both* while being *sure* you cannot slip and short to the shield.
Comment: Ok, so how do I hook up my multimeter to the wires to verify the voltage that I am getting.
Comment: Added a measurement technique to the answer.
Comment: (Years later, hey, I'm here) I wonder if "Mister Smith" shorted something out.  I repurposed a dead phone charging cable by cutting off the phone end and stripping the wires back to make my USB measurements using my multimeter.


How to determine Minimal Detectable Effect for AB Test with Click-through Rate as success metric?

Question: I am conducting an AB test on my site. I want to decide what is considered a good MDE (Minimal Detectable Effect) when it comes to click-through rate. I can understand you can choose MDE when your main success metric is revenue since you can just look at the cost of the experiment and calculate what the minimal change is to see an increase in ROI. Not sure how to determine this for click-through rate though. Anyone have experience with this?
Answer: There are tools to help you calculate this where you can define success however you like and it would test the significance of the result, but I would suggest trying to understand whether it is really meaningful to test click-through rate because if it doesn't actually match to an actual conversion then it could lead your research and testing down the wrong path.


Contract cannot receive ETH if they don't have 'payable'?

Question: I am curious about situation when there is no 'payable' in the contract. If a contract doesn't have 'payable', then is this mean that the contract cannot receive eth or crypto?
Answer: That is not exactly true. The keyword payable when used in the function of a contract allows the function to receive Ethers. In this way, the contract receives Ethers too. But this is not the only way to send Ethers to a contract.
Imagine there is no function with the keyword payable. For such cases, you add a receive function in the contract. The only work of a receive function is to receive Ethers. Use it like this:
// Receive Function
receive() external payable {}

Answer: The selfdestruct function is able to send funds to another contract, no matter if it has any payable function. This can in fact be used to attack the contract by altering its accounting.
https://solidity-by-example.org/hacks/self-destruct/


Back Door Roth Conversion eligibility

Question: I would like to make back door Roth contributions, but I have 2 old SEP IRA annuities ( non-qualified) and I am currently drawing $5,000/year on a third small annuity that will continue until I am 69.5. Would this affect the ability to do a back door Roth conversion? I am currently 63 and plan to work 7-9 more years.  Can I do a back door Roth with this "baggage?" Do the annuities need to be rolled over to my 403(b)? I also have a 457, both of which are being maximally funded each year. I have a separate, traditional IRA which I plan to rollover into my 403(b) prior to the Roth conversion if I am able to do it. Thanks
Answer: The existing Traditional IRA is certainly a sticking point with regard to back-door Roth conversion since all your Traditional IRA accounts are lumped together into one, regardless of who the custodian is or what the investment is. So do check whether your 403(b) plan accepts rollovers from Traditional IRAs; they may have some restrictions. IRA annuities are a big can of worms; even Publication 590b throws up its hands and says "Read the regulations" to figure it all out, and presumably SEP IRA annuities are worse.  SEP IRAs are treated in Publication 560.
Comment: Thanks. I do plan on rolling over the traditional IRA into my 403(b) if the annuities are not problematic, but I'm not holding my breath. I will look at the publications you suggested. Thanks.

Back Door Roth Conversion eligibility


Controlling the snake in a snake game with the mouse

Question: I am trying to implement a snake game in C# using the WPF forms. Well I know to implement the snake game, where the snake is controlled by the keyboard. But how would I do it, if I wanted to control the snake using a mouse rather than a keyboard?
Comment: That depends a lot on how you want to control the snake with the mouse. Should it turn gradually as you move the mouse left/right, should it stand still until you click somewhere and then use pathfinding to reach that point, should it always try to get to the mouse the most direct path it can or possibly even have buttons you click to alter the direction? Until you decide how you want the mouse to control the snake we cannot really help you with the code of how to control the snake with the mouse.
Comment: well there is no usage of buttons in this game, the snake should follow the path of the mouse, in the direction the mouse cursor has been moved.
Answer: On your gamefield element add a MouseMove event handler, in this handler add:
var pos = Mouse.GetPosition(e.MouseDevice.DirectlyOver);
worm.Target = new Vector(pos.X, pos.Y);

And in an appropriate spot in the worm class (such as an update method, or called from the Target/Position setters):
var delta = new Vector(Target.X - Position.X, Target.Y - Position.Y);
if (Math.Abs(delta.Y) > Math.Abs(delta.X))
{
    if (delta.Y < 0)
        this.Direction = Direction.Up;
    else
        this.Direction = Direction.Down;
}
else
{
    if (delta.X < 0)
        this.Direction = Direction.Left;
    else
        this.Direction = Direction.Right;
}

With this logic it would try to close in the longest orthogonal distance (x or y) first, and then go zigzag to the cursor when the distance is the same in both x and y, other options would be to use a line drawing algorithm to make it go more smoothly towards the cursor.
There is a few other things to consider as well, such as what do we do if the worm reaches the mouse, does it stop, or do we allow it to first pass the cursor and then double back thus hitting itself?
Comment: You could also add checks to ensure you could move along the axis with the smallest delta and if not then move along the other one.


Is it possible to say "I take myself with a grain of salt?"

Question: Does the phrase  "I take myself with a grain of salt?" mean "I think about myself sceptically"? Or it doesn't? Either the first phrase have no sense at all?
Answer: It means exactly that and you can use it, but it's not normal to use'I' in this expression. However, that's the beauty of English! If you change a 'normal' expression slightly, you add humour, emphasis or emotion. This device is used by creative writers all the time.
You might use this when talking to some friends about the new exercise program you have decided to begin.
"I'm going to start running everyday in the morning. However, I take myself with a grain of salt."
Most English speakers would 'get it'.
I hope that helps.
Comment: Yes, it's an ironical use of the term "take that with a pinch of salt", which is the British form.


Hadoop Hive: How to allow regular user continuously write data and create tables in warehouse directory?

Question: I am running Hadoop 188.8.131.52.0.6.0-101 on a single node.
I am trying to run Java MRD program that writes data to an existing Hive table from Eclipse under regular user. I get exception:
org.apache.hadoop.security.AccessControlException: Permission denied: user=dev, access=WRITE, inode="/apps/hive/warehouse/testids":hdfs:hdfs:drwxr-xr-x

This happens because regular user has no write permission to warehouse directory, only hdfs user does:
drwxr-xr-x   - hdfs hdfs          0 2014-03-06 16:08 /apps/hive/warehouse/testids
drwxr-xr-x   - hdfs hdfs          0 2014-03-05 12:07 /apps/hive/warehouse/test

To circumvent this I change permissions on warehouse directory, so everybody now have write permissions:
[hdfs@localhost wks]$ hadoop fs -chmod -R a+w /apps/hive/warehouse
[hdfs@localhost wks]$ hadoop fs -ls /apps/hive/warehouse
drwxrwxrwx   - hdfs hdfs          0 2014-03-06 16:08 /apps/hive/warehouse/testids
drwxrwxrwx   - hdfs hdfs          0 2014-03-05 12:07 /apps/hive/warehouse/test

This helps to some extent, and MRD program can now write as a regular user to warehouse directory, but only once. When trying to write data into the same table second time I get:
ERROR security.UserGroupInformation: PriviledgedActionException as:dev (auth:SIMPLE) cause:org.apache.hcatalog.common.HCatException : 2003 : Non-partitioned table already contains data : default.testids

Now, if I delete output table and create it anew in hive shell, I again get default permissions that do not allow regular user to write data into this table:
[hdfs@localhost wks]$ hadoop fs -ls /apps/hive/warehouse
drwxr-xr-x   - hdfs hdfs          0 2014-03-11 12:19 /apps/hive/warehouse/testids
drwxrwxrwx   - hdfs hdfs          0 2014-03-05 12:07 /apps/hive/warehouse/test

Please advise on Hive correct configuration steps that will allow a program run as a regular user do the following operations in Hive warehouse:

Programmatically create / delete / rename Hive tables?
Programmatically read / write data from Hive tables?

Many thanks!
Answer: You can configure for hdfs-site.xml such as:
<property>
  <name>dfs.permissions</name>
  <value>false</value>
</property>

This configure will disable permissions on HDFS. So, a regular user can do the operations on HDFS.
I hope this solve will help you.
Answer: If you maintain the table from outside Hive, then declare the table as external:

An EXTERNAL table points to any HDFS location for its storage, rather than being stored in a folder specified by the configuration property hive.metastore.warehouse.dir.

A Hive administrator can create the table and it can point it toward your own user owned HDFS storage location and you grant Hive permission to read from there.
As a general comment, there are no ways for an unprivileged user to do an unauthorized privileged action. Any such way is technically an exploit and you should never rely on it: even if is possible today, it will likely be closed soon. Hive Authorization (and HCatalog authorization) is orthogonal to HDFS authorization.
Your application is also incorrect, irrelevant of authorization issues. You are trying to write 'twice' in the same table which means your application does not handle partitions correctly. Start from An Introduction to Hive's Partitioning.


SQL Server create cron job without SQL Server Agent

Question: I'm creating a cron job on SQL Server. As per my knowledge, the only way possible to create a job is through SQL Server Agent. However, the services(listed on services.msc) of VM assigned to me do not contain SQL Server Agent. Also, I don't have sysadmin access to the database. So, can anyone please help me understand how I can create a cron job without SQL Server Agent?
Comment: Possible dup of [this question](https://stackoverflow.com/questions/7195503/setting-up-a-cron-job-in-windows).
Comment: It's slightly different, in my case, I'm not able to access SQL Server Agent and also I don't have Admin access to the database
Comment: You said you do not have SQL Server Agent. In that case, the answer is the same - just use Task Scheduler. Of course, you will need an account with whatever database permissions you need.
Answer: There is something fishy here. You say that that there's no Agent service. That shouldn't be possible. Agent is always installed (even on Express Edition, but disabled). So we have two options:

There really is no agent. If that is the case you have a botched installation. I would migrate off of this machine onto a healthy machine ASAP.

There is an agent. Then it is only a matter of having a sysadmin allowing you to create jobs. I.e., you don't have to be a sysadmin to create jobs. All you need is to have a user in msdb and that user being a member of any of the SQLAgent roles. More info here:

https://learn.microsoft.com/en-us/sql/ssms/agent/sql-server-agent-fixed-database-roles?view=sql-server-ver15


Does intermittent opioid abuse have a long-term negative effect on health?

Question: If somebody were to take 20mg of an opioid (for example, hydrocodone) twice a week every week, would there be any negative long-term effects?
Comment: As phrased, this is not an acceptable question for this site as it does not identify a specific notable claim to be challenged.  Please read http://meta.skeptics.stackexchange.com/questions/1505/welcome-to-new-users
Comment: Do you want to know about "abuse" or long term usage for a medical condition?
Comment: I would normally close this, but it managed to get a good answer despite its flaws...
Comment: @Oddthinking - Is that a good enough reason to not close a question that would otherwise have been closed? (Question currently has 3 close votes)
Comment: @Jamiec: I figure the motivation for closing is to stop people wasting their time researching flawed questions that are likely to change. Happy for longer discussion on meta, if warranted.
Comment: @Oddthinking Researching this, the idea seems popular with the "druggie" crowd. Do you all edit titles here? It needs to say "sporadic Vicodin abuse." Abuse of other opioids is much more dangerous.
Comment: @Jamiec In defense of the question, some people have drug seeking behavior because they have untreated pain but are afraid of going to doctor. I think I will add to it try to make it clearer why people can't do that or use recreationally.
Answer: Low dosages of opioids is unlikely to have long-term negative health effects when taken responsibly and prescribes by a doctor. If the drug is abused however, dependence may occur and abuse is associated with irresponsible usage which can be very dangerous. Dependence usually results in usages of higher dosages, which have long term negative side-effects.
Prevalence of side effects of prolonged low or moderate dose opioid therapy with concomitant benzodiazepine and/or antidepressant therapy in chronic non-cancer pain.

Moderate or low dose opioid therapy in conjunction with or without benzodiazepines, antidepressants, or in combinations are associated with minor side effects

"Low dose" usually means 100mg of morphine which equals 17mg of hydrocodone/day (At this actual "low dose" I believe the results do get much more disputable. At this dosage, higher death rates are observable in most large studies)
Opioids in the management of chronic non-cancer pain: an update of American Society of the Interventional Pain Physicians' (ASIPP) Guidelines.

best action may differ depending on circumstances or patients' or societal values.

(According to Duffy's Rehab)

"If you're taking Vicodin for the right reasons and in the right way, then your chances of being addicted to Vicodin (or any other prescription medication) are extremely low—less than 10%.
The risk of addiction is often influenced by other factors, such as

<code>Genetics
Family history
Environmental factors
Past history of drug abuse
</code>

However, if an individual is taking Vicodin non-medically or is deliberately misusing it, the chances of addiction are significantly higher.

The dosage doesn't matter. The reason is that drug dependence also depends on psychological dependence. Breaking the habit of use is the hardest for most users. For example, nicotine is removes from the body in three days, but smokers struggle with psychological addiction for months or even years. According to Wikipedia:

"They are similar in that addiction is a physiological "craving" for something and psychological dependence is a "need" for a particular substance because it causes enjoyable mental affects. A person becomes dependent on something to help alleviate specific emotions.

Drugs abuse and sometimes therapy with a counselor is needed treat the underlying reasons someone might be trying to alleviate emotions with a drug. The biggest harm to your long-term health from drug abuse is mental and emotional. It will harm relationships and emotional and spiritual fulfillment.
Now, there is also some evidence that this dosage does not cause tolerance/physical dependence , even in long-term (9 years), recreational users of Vicodine (1-2 times per week), atleast according to this study.

There was little information on the direct acute effects of oxycodone and hydrocodone in this population, and therefore, a pilot study was completed to help guide the choice of safe, tolerable, and equipotent doses of oxycodone, hydrocodone and hydromorphone for use in the current study. In all respects, the pilot data collected were identical in nature and scope to that collected in the present study except: 1) doses were administered in ascending order for safety purposes, and 2) there were a greater number of test conditions (17 total, five doses each of oxycodone, hydrocodone and hydromorphone, placebo and an active practice condition) and a wider range of test doses (oxycodone [5 mg – 50 mg], hydrocodone [7.5 mg – 60 mg], and hydromorphone [2.5 mg – 35 mg]. Results showed that oxycodone (5 mg) and hydromorphone (2 and 5 mg) were inactive in sporadic opioid users.

In other words, small therapeutic dosages were still effective for Vicodin abusers. The reason appears that these users were mostly women and elderly who did not use strong street drugs or crush or snort the medication, as opposed to the other groups of users. (For abusers of opiods, this may serve as a huge warning however, that dependence is likely to result in switching or mixing their usage with a different opioid or mixing with other drugs-Zanax, Heroin,ect- to get a "better high," placing them into the high-risk "oxycodone" group)
Hydrocodone abuse and dependence is an enormous public health issue, which suggests that many, many people are not so resistant to dependence and for those people it most certainly tragic. Abusing opioids is like playing Russian Roulette. 27,000 people became dependent on Vicodin in 2009, based on the figures who either required treatment from a doctor or ended up in the emergency room due to abuse or overdose.
Here is a presentation by WHO on its guidelines for pain management.

If taking meds 10 days or longer on regular bases withdrawal symptoms may occur, wean off meds slowly.
Withdrawal results in hypertension, nausea, vomiting, body aches, diarrhea, anxiety, tremors, tachycardia, diaphoresis, abdominal pain

If you are abusing a medication, it would always be possible to be unable to access the drug. Also if the user has a legitimate need, especially if the user fails to recognize their drug use is a problem, they may have difficulty obtaining pain management.
If dependence becomes problem and large dosages start being used:

adverse consequences including hormonal and immune system effects

Therapeutic opioids: a ten-year perspective on the complexities and complications of the escalating use, abuse, and nonmedical use of opioids.
http://www.ncbi.nlm.nih.gov/pubmed/18443641
Vicodin can also of course cause death and liver damage if you take too much and mix it with alcohol and other drugs. It can increase your risk of a car accident or injury, too, no matter who you are or why you are taking it. Like almost all medications, Vicodin has rare severe side effects, such as death, and should not be taken by people with certain health condition. It should always be prescribed by doctor to ensure benefits outweigh the risks.
Comment: The big risk to your liver from Vicodin comes, of course, from the added Tylenol (acetaminophen). And at least in the US our every-so-caring overlords encourage doctors to prescribe strong painkillers that have been so adulterated. Because they're looking out for us. Or something.
Comment: @Alice *"The risk from Vicodin to your liver is only if you abuse [it]"* In the US, the Tylenol is there by policy in an attempt to dissuade abuse by killing abusers (Vicodin is a schedule III drug rather than schedule II *because* it has Tylenol in it). Nor is this the first time the US government has gotten into that business: they did it during alcohol prohibition too, adding poisonous solvents to industrial alcohols). Worse still, doctors prescribe it without warning warning the patients of the risks *and* many people don't know which OTC drugs have Tylenol and overdose in ignorance.
Comment: @dmckee Or because Paracetamol is a non-opiate, non-NSAID, probably-COX-2-inhibitor analgesic which has a synergistic effect with opiates, allowing for a smaller dose of addictive painkiller to effectively treat pain as if it was a much larger dose. The risk from Vicodin to your liver is only if you abuse the Vicodin; if you find yourself using too much Vicodin, your pain may not be adequately treate, and a different pain treatment plan may be more effective. However, as with any treatment, using the smallest dose of medication is usually desired, as it reduces the chance of side effects.


What's the meaning of Hogwarts motto?

Question: The motto for Hogwarts is "Draco Dormiens Nunquam Titillandus", or, "Never tickle a sleeping dragon".
This seems like quite obvious advice and rather silly as a school motto.  Is it essentially an inside joke that J. K. Rowling made up for those that would actually translate it?  Or does it have any particular meaning beyond the literal?  Is it possible she used it as a hint or tip-off that Draco might be more dangerous than we thought (and maybe later changed her mind on that?)
Has she ever indicated there to be more than just the literal meaning for this phrase?
Comment: Well the Hogwarts School Song is "Hogwarts, Hogwarts, Hoggy Warty Hogwarts..." Never tickle a sleeping dragon sounds pretty cool compared to *that*! :D
Comment: Many things in the first Harry Potter book are quite silly compared with the later books.
Comment: In Kanon's *Los Alamos*, the scientists refer several times to tickling the tail of the dragon (based on a real "tickling the tail of the sleeping dragon" comment by Feynman I believe). I can't think how that would be related (Hogwarts: magic's Manhattan Project!) but it's a fun coincidence.
Comment: It is just downright funny, as I do Latin at school I could easily translate it. It is also something the founders would do.
Comment: @mikeazo: Well, that's the kind of thing I wanted to know, which is why I asked.  Apparently there's no evidence of that.
Comment: I think Rowling mentions this motto in an interview, but I can't remember what she said about it.
Comment: Are you sure it is *never tickle a sleeping dragon* and not *never tickle a sleeping Draco (Malfoy)*. Perhaps some foreshadowing? :)
Answer: I think it's a Wizarding-world equivalent of the English idiom "let sleeping dogs lie" (though I like the Hebrew equivalent better, which translates as "Don't wake the demons from their nap").
But beyond that, I feel it's a hint that while Hogwarts seems like an innocent enough place - only a school for children, after all - it's from this school, and at this school, that the greatest challenges to Voldemort emerged, and where the biggest battles were fought.
Comment: It's the equivalent of the English phrase "let sleeping dogs lie" (לא להעיר שדים מרבצם), not of the Hogwarts motto.
Comment: Both versions are extant, but we're veering way, way off-topic here. :-)
Comment: I read the Harry Potter series in Hebrew and I'm wondering where you got that "equivalent" because that isn't a Hebrew phrase or the Hogwarts motto in the Hebrew translations.
Comment: That's interesting, I always thought it was דובים and not שדים but I guess it doesn't make much of a difference (:
Comment: @LordVoldemort: Username/question fit for the win.  Plus, my name actually is דוב
Answer: Word of God
The motto is deliberately practical advice.

Ailsa Floyd for the Times Educational Supplement in Scotland - How did you think up the motto "Never tickle sleeping dragons", which appears under the crest? Is there a story about it?
JK Rowling: You know the way that most school slogans are thing like persevere and nobility, charity and fidelity or something, it just amused me to give an entirely practical piece of advice for the Hogwarts school motto.
Then a friend of mine who is a professor of classics - my Latin was not up to the job, I did not think it should be cod Latin, it is good enough for cod Latin spells, that is they used to be a mixture of Latin and other things. When it came to a proper Latin slogan for the school I wanted it to be right, I went to him and asked him to translate. I think he really enjoyed it, he rang me up and said, "I think I found the exactly right word, 'Titillandus'", that was how that was dreamt up.
(source: Edinburgh "cub reporter" press conference, ITV, 16 July 2005)

Is it an "obvious advice"?
Not really, since it's an advice regularly disregarded by many students.
Consider every single thing Harry did (tackling, in some semblence of order: a fully grown mountain troll, Fluffy, Voldemort, Aragog and his offspring, Whomping Willow, basilisk, Tom Riddle's diary, Sirius Black, a gazillion Dementors, a dragon, mermaids and Grindylows, monsters in a maze, Voldemort again... and I'm only up to book 4 and going from memory. Bold ones he tackled voluntarily).
Now consider every single thing the Marauders did.
Still think it's trivial, obvious, useless advice, either literally or metaphorically? :)
Bonus pedantry: technically, Latin translation is "a sleeping dragon must never be tickled", though the difference isn't semantically meaningful.
Comment: @AncalagonTheBlack *Cornish pixies :-)
Comment: It is sort of an explanation. It seems to me to be along the lines of putting up "don't drink and drive" signs outside bars. True, it's obvious, but it's also rather needed.
Comment: I like this, but as a comment. This doesn't really explain why Rowling included the motto.
Comment: You missed off IRISH PIXIES!!!!
Answer: AFAIK, she has not ever mentioned the reason behind this. Ask her on twitter, that worked for me when I found an 'inside joke' in Inheritance.
It's probably just a wizardification of "let sleeping dogs lie". There are other such wizardifications:

"Hold your hippogriffs" ("Hold your horses")
"Time is galleons" ("Time is money")
"No room to swing a kneazle" ("no room to swing a cat")
and more.
Answer: I'd assume it means don't mess with Hogwarts. Hogwarts IS a sleeping dragon, and when it wakes up it puts up a damned good fight. Consider the battle between experienced Death Eaters, werewolves, and giants, versus teachers, some 15- to 17-year olds, house elves, and a handful of experienced fighters along with the Hogwarts defenses. Winner? Hogwarts. Don't mess with the dragon that is Hogwarts. The statues themselves will beat you back.
Answer: Like many details from Hogwarts, it just adds flavour and... a pinch of humour.
Comment: This answer is barely an answer, if at all.
Answer: The literal meaning is obvious, but the message that I take from this is, I think, quite genuinely good advice, and it doesn't seem to have been picked up on. To me, the point is that there's a distinction to be drawn between bravery and stupidity. There's nothing smart about doing something obviously dangerous, like tickling a sleeping dragon, because it's probably gonna work out disadvantageously for you.
Perhaps less philosophically interestingly, it could also simply be a warning against causing trouble unnecessarily, against opening up a can of worms, or stirring up a hornet's nest.
To me, assuming the first interpretation, the Muggle parallels would be things like (thank you english.stackexchange):

Don't play with fire (quite apt, actually)
The trouble with grabbing a tiger by the tail is that sooner or later you have to let go.

Or my personal favourite:

Fools rush in where angels fear to tread.
Answer: It's a reference to CS. Lewis' comment on "steal[ing] past watchful dragons", when he spoke about writing Christian-themed literature in a story that is not explicitly Christian, which is what Rowling has done in the Potter series.
Comment: In what sense is Harry Potter Christian-themed? Where does C.S. Lewis say this?
Answer: It could refer to Dumbledore as he was known to be the great defeater of Grindlewald even though Grindelwald had the Elder wand. Dumbledore was also known to have been over 100 years old and had obtained a lot of knowledge and experience meaning that he could be a massively dangerous wizard that would obliterate any enemies if provoked.
Answer: It clearly means not to mess with Hogwarts as a whole. If you combine all the house mascots you get a winged scaily griffin that eats and takes what it wants when it wants, and that's a pretty fierce dragon if you ask me!

What’s the meaning of Hogwarts motto?


The idiomatic way of saying stealing time

Question: What is the idiomatic way of saying 'stealing time', if someone is so busy and he wants to work on something by sneaking to it?
Comment: Idiomatically, we just say we'll ***make*** time [to do something, even though we're very busy with other things]. More extreme metaphoric usages like ***steal*** or ***pinch*** aren't in common use.
Comment: How about 'to skive off' - which is used in British English, but is almost slang.
Answer: One can actually say "I managed to steal a few precious moments / minutes / hours with my family."

"To my delight, before the graduation ceremony began, I was able to
steal a few minutes with an old friend."

...........

To "steal" time in this way is to be able to assign, set aside, or
reserve that time for a particular reason or activity. The presumption
is that there other demands for this time.

[bibliolept; WordReference.com
So "I was able to steal a few a few short hours away from my job to ..." (usually used in a past time-frame).
Comment: "I am stealing time from my job to answer stack exchange queries" or  "I will be able to steal away early tomorrow' would be normal idiomatic usage, so I am not sure that it is  correct to say it is usually used usually in a past time frame.
Comment: @AndyM - But *usually* doesn't mean *only*.  Your examples demonstrate why *only* would have been incorrect.  To disprove *usually* you'd need to show frequency of use data.
Comment: It's usually used conversationally, and a past time-frame disarms the word 'steal' somewhat (no obvious ill consequences).
Comment: Google Ngram suggests that 'Steal an hour'  is twice as common as 'Stole an hour', which suggests that past case is less common usage. Not proof, but equally no evidence has been offered for the past case being more common. Interestingly suggests that the all forms of the phrase were more common in the 1800s and have declined since.
Comment: I've checked the obvious ngrams. Most of the recent returns for 'steal an hour' seem to be old-fashioned, and/or non-present  ('they'd arrive at the same time all unbidden to steal an hour or two'), and/or modal constructions ('Even then , whenever she could steal an hour or two') .... // Raw Google hits: "I will steal an hour" -"from days gone by": about 5 hits // "I stole an hour" -"from days gone by" :1270000 hits. This again doesn't **prove** the claim above. But the metaphhorical use of 'steal' here has a literary flavour, this most commonly associated with a past time-frame.
Answer: On the sly

on the sly
PHRASE INFORMAL
DEFINITIONS
1 done secretly, especially because you know you should not be doing
it
I'm supposed to be on a diet, but I still have the odd candy bar on
the sly.

Macmillan : on the sly
https://www.macmillandictionary.com/us/dictionary/american/on-the-sly

And on the sly, she focused on the interesting stuff. She made her bones as a news and feature writer, editor, and translator, especially of literature. Font screams in her sleep, disturbed by eerie nightmares.

from the about the author section of Silvia font's Musings on the Dark.


Best way to remove index.php from URLs

Question: What is the best way to remove index.php from URLs, without making too many modifications to the Magento core structure and native behavior?
Answer: The best way is to do it at an apache or nginx level in the vhost configuration. No need to change Magento codebase for this.
If you use apache, usually this is part of magento .htaccess, check this section:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

If you use nginx, make sure to add this to your vhost configuration:
location / {
    try_files $uri $uri/ /index.php?$query_string;
}

After changing the nginx vhost file, you need to reload nginx configuration.
Comment: Is there any danger in doing this? Would there be any situations in which some urls would be inacessible or broken? Thanks!
Comment: Not really, at least I can't think of any good reason. Besides this is the default behaviour. The rewrite is just "hiding" the index.php part in the url. So if properly configured it should be fine
Comment: The Nginx part, is it an "and" or an "or", depending if Nginx is installed? Thanks!
Comment: Yes, it's and "or". If you use apache, then make sure you have your .htaccess in place and that is configured properly. If your are using nginx, then make the changes in the vhost file. One or the other. Not both
Comment: I'm trying with this approach. But, this approach cannot remove like hostname.com/index.php/blahblah.html. It's work in hostname.com/index.php
Answer: On apache use the .htaccess, best copy it to your VHost config.
On nginx you need something similiar.
Beside this you need to turn on:
System > Config > General > Web
    > Search Engines Optimization > Use Web Server Rewrites > YES

Best way to remove index.php from URLs


In Maze Runner, why do runners wear these leather vests/belts over their clothing?

Question: Is it just for the looks or is there some other reason for it?
Comment: A regular belt stops your trousers from falling down. Logic then dictates that in the world of the Maze Runner, these belts stop their shirts from falling up.
Answer: It appears the straps are used to hold stuff onto them, in the picture you included the guy on the right has what appears to be a knife handle above his left shoulder. You can actually see that clearer in the below picture and the straps also have a bag at the bottom of them.

Also in this next picture you can see that the straps have a bag on them covering the whole of the back.
Answer: An interview with the film's costume designer identifies their use and function.

Q. It is reported that the leather holsters and breast plates were custom made for the film. What were the main considerations related to making these?
Simonetta Mariano: As for their hand made harnesses, they are timeless. I have designed these particular pieces for practical reasons as well as because it looks so cool! The runners needed at all time to have their hands and feet free for climbing, grabbing things, run and defending/escaping them self against the Grievers. Their harnesses served to hold and carry whichever accessories, water, map, and tools they needed without being a burden or in their way.
During fittings the harnesses were the very first things each boys wanted to put on… It was quite funny… They felt like they were wearing some sort or armour or chest plate. It was some sort of a competition of who was wearing the cooler stuff. They all wanted more but Wess kept it simple.
THE MAZE RUNNER COSTUME DESIGN (INTERVIEW WITH SIMONETTA MARIANO)
Answer: In the book, leather only appears in the form of a loop with which Ben is tied to a pole and forced into banishment. There is also no mention of vests or belts. When the Runners go out into the Maze, they carry backpacks full of supplies:

Minho continued talking. "Here's a backpack, water bottles, lunch pack, some shorts and T-shirts, other stuff."

From the lack of these contraptions in the book, I would assume that they have replaced the backbacks in the movie as part of the visual design. They have no other purpose than to look cool (or stupid, depending on your tastes).
Comment: `They have no other purpose than to look cool`: Except as I point out in my answer they are backpacks...


Moving Smartphone Camera around three.js Object

Question: I  have a simple rectangle which I have placed on my camera preview. I want to simulate an AR effect. When my camera moves, I don't want the rectangle to move with it, but to stay fixed in position. I know that I have to access the gyroscope of my smartphone, but I don't know how this works and how I have to connect these coordinates to the 3D camera. I program with Angular.
const scene = new THREE.Scene();
    const camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );
    const renderer = new THREE.WebGLRenderer({ alpha: true } );
    renderer.setSize( window.innerWidth, window.innerHeight );
    document.body.appendChild( renderer.domElement );
    const geometry = new THREE.BoxGeometry( 1, 1, 1 );
    const material = new THREE.MeshBasicMaterial( { color: 0x00ff00 } );
    const cube = new THREE.Mesh( geometry, material );
    scene.add( cube );
    camera.position.z = 5;
    const animate = () => {
            cube.rotation.x += 0.01;
            cube.rotation.y += 0.01;
            renderer.render( scene, camera );
};
animate();

I know that my animation is messed up, but this is not imporant. It is important for me to get the rotation trough moving the camera.
Answer: I think you have to enable the XR in the renderer first.
renderer.xr.enabled = true;
I would suggest you look into the example called webxr_ar_hittest in this Github repository.


Script always gets a 302 response when pulling random pages from Wikipedia

Question: I can pull a any page from wikipedia with
import httplib
conn = httplib.HTTPConnection("en.wikipedia.org")
conn.debuglevel = 1
conn.request("GET","/wiki/Normal_Distribution",headers={'User-Agent':'Python httplib'})
r1 = conn.getresponse()
r1.read()

The normal response will be
reply: 'HTTP/1.0 200 OK\r\n'
header: Date: Sun, 03 Apr 2011 23:49:36 GMT
header: Server: Apache
header: Cache-Control: private, s-maxage=0, max-age=0, must-revalidate
header: Content-Language: en
header: Vary: Accept-Encoding,Cookie
header: Last-Modified: Sun, 03 Apr 2011 17:23:50 GMT
header: Content-Length: 263638
header: Content-Type: text/html; charset=UTF-8
header: Age: 1280309
header: X-Cache: HIT from sq77.wikimedia.org
header: X-Cache-Lookup: HIT from sq77.wikimedia.org:3128
header: X-Cache: MISS from sq66.wikimedia.org
header: X-Cache-Lookup: MISS from sq66.wikimedia.org:80
header: Connection: close

But if I try to pull a random page with /wiki/Special:Random I get a 302 response and an empty page
reply: 'HTTP/1.0 302 Moved Temporarily\r\n'
header: Date: Mon, 18 Apr 2011 19:25:52 GMT
header: Server: Apache
header: Cache-Control: private, s-maxage=0, max-age=0, must-revalidate
header: Vary: Accept-Encoding,Cookie
header: Expires: Thu, 01 Jan 1970 00:00:00 GMT
header: Location: http://en.wikipedia.org/wiki/Tuticorin_Port_Trust
header: Content-Length: 0
header: Content-Type: text/html; charset=utf-8
header: X-Cache: MISS from sq60.wikimedia.org
header: X-Cache-Lookup: MISS from sq60.wikimedia.org:3128
header: X-Cache: MISS from sq62.wikimedia.org
header: X-Cache-Lookup: MISS from sq62.wikimedia.org:80
header: Connection: close

How do I get a non-empty random page?
Answer: The 302 is a redirect.  It's telling you where to go in the following line:
header: Location: http://en.wikipedia.org/wiki/tuticorin_port_trust

You just need to follow the redirect.
Answer: When you're redirected the response object is going to have a code of 302 and the geturl() method will report the redirect URL.  Python's standard HTTP libraries make it non-trivial to handled redirects by default. Do yourself a favor, don't hassle with this stuff and use the 3rd party mechanize library, which is a drop-in replacement for urllib2.
Using mechanize, your code would look like this:
import httplib
import mechanize

host = 'en.wikipedia.org'
path = '/wiki/Special:Random'
url = 'http://' + host + path # We have to pass a http:// url

# It still uses httplib.HTTPConnection, so we can debug
httplib.HTTPConnection.debuglevel = 1

request = mechanize.Request(url, headers={'User-Agent': 'Python-mechanize'})
response = mechanize.urlopen(request)

print response.code
# => 200
print response.geturl()
# => 'http://en.wikipedia.org/wiki/Faliszowice,_Lesser_Poland_Voivodeship'
data = response.read()

Answer: HTTP code 302 means you are being redirected. If you look at the Location header, you will see where you should make your new request. Then you can make the request to that URL and you'll hopefully get a 200 on that page.
To clarify: You are being requested to retry the request elsewhere. That's why your client needs to make another request when it receives a 302. Wikipedia's random page apparently works by choosing a random page in its database, then returning a 302 response with the new page as the Location field. If you look at other 302 responses, I'm sure you'll see a different page in the Location field.
Answer: Look at the location header:

header: Location: http://en.wikipedia.org/wiki/Tuticorin_Port_Trust

It says you should redirected to that page. Read that header and do another request to that page.


Which layer of OSI model does end-to-end encryption and decryption happen in a network? Why?

Question: I thought it happens at Layer 6, but some resources state that it happens at either Layer 3 or 4.
Answer: Encryption can happen at any of the levels of the OSI model.  TLS happens at something like the session or transport level.  Quantum Crytography isn't exactly encryption, but would be at the physical level.  PGP in an email would be at the application level.
Remember that the OSI model is just one model, and largely represents an idea of separation of concerns and layering.  TCP/IP doesn't map entirely to the OSI model, and encryption doesn't really fit within the model at all.
Speaking from a "separation of concerns" perspective, where you put encryption depends entirely on what you're trying to do.  If you had to put encryption in a "place", you might say that it lives outside of the OSI model.
Answer: In my personal opinion, the layers are a bit fuzzy. In my mind there's physical, ethernet, IP, TCP, TLS, and finally some protocol like http. Or physical, ethernet, IP and finally ICMP, for example.
Which OSI layers those are exactly? Who cares.
TLS is called Transport Layer Security, but in my mind the transport layer is TCP/UDP. Googling, most people seem to put it on layer 6 indeed, but layer 5 is still hanging in between there with few concrete examples of what might run there.
Let's take another example: physical, Ethernet, IP, TCP, Tor, TLS, XMPP, PGP. That's 8 things, but we only have 7 layers to fit this in. Arguably XMPP and PGP both live in layer 7, so we can have multiple protocols per layer I guess? And Tor might be a fair example of layer 5 (examples for layer 5 include some things Tor does/has, like logical ports), but Tor does encryption just like TLS and PGP do in layers 6 and 7, respectively.
So layers are a fuzzy concept. If you're being asked this on a test, go for layer 6. Otherwise, why does it matter?
Answer: It depends on the protocol used. TLS is used for application level end-to-end encryption so it is somewhere at levels 5..7 (the distinction between these levels is blurry). Protocols like IPSec or OpenVPN instead work at the level of IP protocol, i.e. network layer which is layer 3. But there are also VPN technologies which do a VPN at the data link layer, i.e. layer 2.
Answer: It doesn't happen anywhere... because OSI doesn't actually happen anywhere.
OSI was always a theoretical model, and TCP/IP does not use OSI. Besides, arguing about "which layer" something happens at is pointless; it is much more important to understand how the layers interact, and what kind of protection would work best at each layer.
E.g you could get TLS on top of TCP; or IPsec on between TCP and IP; or WPA2 underneath IP. I am sure there are other options to consider too...


Classification based on a large number of independent continuous variables

Question: What machine learning algorithm would be the most optimal to use for a classification problem with a small number of classes? In my case, only two. The sample size is also rather small (<100), but the number of predictors is huge (~10 000). All the predictors are continuous floats and (practically) independent of each other. I tried random forest, but this isn't very accurate with continuous predictors. The only algorithm I can think of is multiple linear regression. Are there any algorithms that would be more optimal in this case? By optimal I mean high sensitivity and specificity. Computational performance is secondary. Would also be nice if it were already implemented in an existing Python or R library.
Answer: If you try to fit 100 data points with 10000 parameters all at once you will be in deep trouble since you have more variables than constraints!  You might want to try doing a first pass where you loop through all of your 10000 variables in a 1 parameters model and seeing which variables, considered individual in a one parameter model, give you the best correlation.  From that, you could take the top 3 or so and see if that improves your result.  This will fall apart if you data is highly correlated but may give you some insight into which parameters to keep and which to discard.
Comment: That's a good suggestion! I do have to trim down the set of classifiers. But I'm still not sure what method I should use. The samples in my case aren't exactly data points but individual patients. I need to be able to classify patients into either a normal(0) or diseased(1) category which are two discreet categories. I tried linear regression, but there's the problem of cutoff - from which value I should consider the patient to be in the 1 (diseased) category.
Comment: Yes, the million dollar question that I don't think you can answer without an indepth understanding of your particular problem.  My strategy is to start simple and go more complicated as needed.  Thus, I would start with just a simple one parameter logistic regression model and score by minimizing the number of false positive and false negative values.  You can then identify some likely predictors and then try something more complicated like a decision tree or PLS algorithm.


Water purification procedure that does not involve a flocculant of any kind?

Question: I have read about "electroflocculation" that uses less flocculant/alum, but is there a method – no matter how expensive or impractical – that uses no flocculant at all?
Answer: This of course depends on the scale and intent of the purification/treatment process, but flocculation is but one step in the water treatment process. So, I'm not sure whether you are asking if you can purify water without flocculation, or if you can get flocculation/aggregation to occur without the addition of floccing agents.
The simplest answer to water purification, on a small scale, is filtration and distillation. Flocculation serves to remove solid particles from the water which contribute to turbidity, but which may also include pathogens that are of real concern to human safety. On larger scales (household to community), incredibly effective methods for removing these types of contaminants include various forms of filtration. Some of the first successful water treatment plants on a large scale used sand filtration, and fast and slow sand filters are still used widely today. There are many commercially available drinking water filters for the removal of sediment, microbes and chemicals which are highly effective. Of course, on an industrial scale, filters of this nature would require frequent changing, and this is where sediment removal via flocculation is most effective in reducing costs. You could Google 'water purification in developing worlds' for a range of water purification methods that do not involve flocculation.
On the other hand, inducing flocculation without the addition of flocculant again depends on nature of the contaminant you wish to remove. The biofuel industries are pursuing this goal, developing methods of harvesting valuable microalgae stocks. Autoflocculation (or bioflocculation) of microalgae is known to occur as a function of pH, which can be controlled by restricting CO2 levels. Again a Google search on 'microalgae autoflocculation' will give you many hits. Another method is the light induced autoflocculation of microalgae. There is an interesting post on ResearchGate that may be of some interest to you if you are focused on flocculation of microalgae (if not, then ignore!)
Answer: Sure.  We could imagine, for instance, that a strong electrical field (anode/cathode pair) and a special stirring, would cause the migration of all non-H2O molecules to nucleate together and/or adhere to walls and be removed from solution.
Flocculants just start this process going, and are used in context to other processes, as @long mentions.


Is it meaningful to work on convergencies, integration, etc. on the Zariski topology?

Question: Since I have studied analysis as well as algebra recently, I am familiar to work on integrablities, and such concepts when I look at topologies. Currently, I am studying algebraic geometry, and I want to ask If it is meaningful to work on such concepts on the Zariski topology. I have searched quite a lot, and I have heard that the Zariski topology is meaningful as being a "topology", rather than being a set which sufficies the axioms of being a topology. Is there a understandable example which views the Zariski topology as a "topology", and is it meaningful to work on convergency, integration, etc. of some algebraic geometrical objects which includes the Zariski topoloogy?
Comment: The Zariski topology isn't Hausdorff, so convergence doesn't behave reasonably. You need a measure to talk about integration.
Comment: The Zariski topology isn't there to talk about convergence, but to talk about *sheaf theory*. This is seen as a natural generalization of sheaf theory as used in complex analysis, as are more exotic generalizations like the étale topology (which isn't a topology in the classical sense).
Comment: Another one from MSE which seems (at least to me) to formulate the question more clearly: http://math.stackexchange.com/questions/53852/is-there-a-way-of-working-with-the-zariski-topology-in-terms-of-convergence-limi?lastactivity
Comment: See also meta: http://meta.mathoverflow.net/questions/1650/why-was-this-question-closed. Maybe OP can clarify what is meant by: *the Zariski topology is meaningful as being a "topology", rather than being a set which sufficies the axioms of being a topology. Is there a understandable example which views the Zariski topology as a "topology"*. What is the notion of topology here that is significantly different from a set equipped with a topology?
Comment: [Possibly relevant question on math.SE](http://math.stackexchange.com/questions/299765/what-does-the-topology-on-operatornamespecr-tells-us-about-r)
Comment: As for integration (which is more "measure theory" rather than "topology", as pointed out by @QiaochuYuan) You may look for Motivic Integration.
Answer: I've decided to expand my comment into an answer.
The point is what do you think a topology is for. If you think that a topology is for talking about convergence of sequences, then no the Zariski topology doesn't do anything for you in that regard. However I contend that in geometry (even differential geometry) people don't use a topology because of convergence issues, but to speak of local properties. That is you may want to say e.g. that a function is 0 not only at a point, but also in a neighbourood of that point. Or you may want to say that you can define an object locally and then try to patch it up to a global object. The Zariski topology gives you exactly this.
This is what I mean, loosely speaking, when I say that the Zariski topology is there to do sheaf theory. One could argue that the whole purpose of sheaf theory is to bridge the gap between local and global properties. If your only experience so far comes through a differentiable setting (for instance multivariable calculus) you may not appreciate how hard these questions are in general. This is because in a differentiable setting you have partitions of unity, which roughly speaking, tell you that the sheaf theory is trivial. However in an algebraic (or complex analytic) setting you do not have that luxury anymore.
As a final note, working in algebraic geometry people noticed that they don't really need a topology on the underlying set to do sheaf theory (that is, to speak about local properties), but that there is a more abstract notion of a Grothendieck topology that does the trick. So when people speak about the "étale topology" or the "fppf topology" as a refinement of the Zariski topology, they don't mean a genuine topological space but one of these more abstract generalizations.
EDIT: as requested in the comment, let me put here a proof that the cohomology of $C^\infty$-modules is trivial. To be precise what I'll prove is the following: if $0\to \mathcal{F}'\to \mathcal{F}\to \mathcal{F}''\to 0$ is a short exact sequence of sheaves of $C^\infty$ modules then for every open set $U$ the sequence
$$ 0\to \mathcal{F}'(U) \to \mathcal{F}(U)\to \mathcal{F}''(U)\to 0$$
is exact. In fact, by general results, the only thing needed to prove is the surjection of the last map. Take a section $s''\in \mathcal{F}''(U)$. Since the sequence of sheaves is exact we may find a cover $\{U_i\}_i$ of $U$ and sections $s_i\in \mathcal{F}(U_i)$ such that the image of $s_i$ in $\mathcal{F}''(U_i)$ is $s|_{U_i}$. Let now $\psi_i\in C^\infty(U)$ a partition of unity associated with the cover. I claim that the expression
$$ s = \sum_i \psi_i s_i$$
makes sense as an element of $\mathcal{F}(U)$. In fact this expression makes sense locally around every point of $U$ (since locally only a finite number of $\psi_i$ are nonzero) and the sheaf property says that these patch to give us a global section. Then it is easy to check that the image of $s$ in $\mathcal{F}''(U)$ coincides with $s''$ locally around any point, and so by the sheaf property, must coincide globally.
Comment: I've added an explanation in the answer.
Comment: @oxeimon 'sheaf theory on real manifolds are trivial' - depends what sort of sheaves you are interested in. Sheaves of continuous or smooth real-valued functions, alright. Analytic functions, or perhaps more 'interesting' sheaves valued in other things (e.g. germs of functions to Lie groups), not so trivial.
Comment: I've seen many people refer to partitions of unity as a way of doing exactly what you describe, but I've never seen a "partitions of unity argument", as such. Can you outline an example of such an argument showing that sheaf theory on, say, real manifolds are trivial?
Answer: As the comments have said, the Zariski topology is not hausdorff, and hence is not metrizable, which means you can't talk about convergence. For example, the Zariski topology of any algebraic curve is just the cofinite topology!
Though, the real thing is that the Zariski topology doesn't exist for doing analysis. Generally, classic algebro-geometric spaces come in two types - the characteristic 0 type (varieties over a field of characteristic 0), and the positive characteristic type (varieties over a characteristic p field). You can consider the analytic properties of any characteristic 0 space by looking at the corresponding analytification, as described by Serre's GAGA theorems (e.g. http://en.wikipedia.org/wiki/GAGA#GAGA). These are "analytic spaces", which are the equivalent of complex manifolds with singularities. Positive characteristic spaces (for example, varieties over a finite field), generally only have finitely many points, so it doesn't make much sense to do analysis on it.
However, I think you can still talk about integration by looking at functionals on the space of differential forms, which can be defined in any characteristic! (after all, integration is just a way of assigning a number to a differential form). I know this is one way of defining the Jacobian variety in the characteristic 0 case, and I suspect this also makes sense in characteristic $p$.
If you're interested in integration in characteristic $p$, perhaps you should read about coleman integrals, which aren't really characteristic $p$, but at least it's $p$-adic! See for example:
$p$-adic integrals and Cauchy's theorem
or just google "coleman integral" or "p-adic integral".
Comment: The notion of convergence makes sense in any topological space (metrizability is irrelevant), so "you can't talk about convergence" seems a bit extreme to me.  Of course, I agree that the notion of convergence is rarely used when thinking about / working with the Zariski topology.
Comment: obvious remark: what you certainly cannot do is speak of "the limit" of a sequence but just of "a limit". this kind of kills any ordinary calculus you might like to perform.


How do I know if a PS Vita game is compatible with the PS TV?

Question: I know that some Vita games are not compatible with the PS TV.  How do I know if a PS Vita game is compatible with the PS TV (also called PS Vita TV)?
Answer: If you have the case, US PS Vita games that came out after the PS TV's release will usually have a "Compatible with PS TV" label in the top left. For older games, you won't know until you try them.
Answer: Here is a UK-list and a US-list. I'm linking to the pages via Archive.org so you may also want to check the actual live pages below for any additional updates, although they are highly unlikely at this point.
https://www.vitaplayer.co.uk/list-of-playstation-tv-compatible-games/
https://www.pushsquare.com/forums/ps_vita/a_master_list_of_games_that_are_compatible_with_pstv
Answer: The most complete US list (last updated April 2019) is on Reviews 2 Go. Here is the
Archive.org mirror.


New baseboard on old wood floors

Question: We are getting our floors refinished and I would like to replace the baseboard + shoe moulding with baseboard only. The problem is the original wood floor installation used shoe, so right now, shoe is needed to cover up the gaps. My installer said easiest thing is just to use shoe again, but was wondering if that's the only option possible, or if there's some kind of thicker baseboard that could help us here. I think just another 1/4" or 1/2" of baseboard width could help us here.
Comment: There are baseboard moulding that have a thicker shoe like bottom on them, if thick enough to cover is a question.  Would go to local building supply store and see what they have.  Take measurements of widest gaps, don't guess.
Comment: How thick is the door trim?
Comment: How thick as the original base?
Comment: Original base = 1/2" thick
Comment: How about the door trim? how thick is that? If the base is thicker than that I will look odd, IMHO.
Answer:
My installer said easiest thing is just to use shoe again.

Yes, I would absolutely do this.
What do you have against shoe molding anyways? If you're concerned about a perceived "loss of floor space" then wouldn't you have the same result with thicker baseboards?

Imagine for a moment that you were able to hide the flooring under the baseboards. Okay, so take a wild guess at what will happen if you ever need to refinish the flooring or replace it with new flooring; you'll end up in the same exact situation.
If you're honestly thinking "well I'll just remove the baseboard if that ever happens". Well then you're dealing not only with a floor project but will likely have to re-paint the walls.
Comment: The look of a baseboard over a wood floor is much better, I think, than the look of shoe molding. Just looks cleaner/crisper, and is what I should've done originally. Hope others dont make the same mistake!
Answer: Usually the door trim is thicker than the base so it ends nicely at the doors. If you need thicker base, you could add plinth blocks at the bottoms of the door trim, that is how it was done "back in the day".
You could locate or custom order base that is 1" thick but rabbeted at the top to a thinner perhaps 3/4" at the top so a standard top mold will have a better proportion with the base.
Tip: Sometimes when I ran base in a home with no shoe and the flooring was too short of the wall by a fraction, I would cut little pieces of shim to keep the bottom of the base rolled out a little more than the top just so it covered the gap at the floor, but not so much that it was detectable that there was a curve in the base overall.

New baseboard on old wood floors


On the group homology

Question: Let $G$ be a group satisfying
$H_1(G;\mathbb{Z})$ is free abelian group and $H_i(G;\mathbb{Z})=0$ for $i\geq 2$.
Is it true that $G$ is free group?
Answer: Perfect, locally free groups exist. Such a thing has vanishing $H_1(G,\mathbb Z)$, has $H_p(G,M)=0$ for all $p\geq2$ and all $M$, and is not free.
A. J. Berrick constructs an explicit example here. If you prefer an example where $H_1(G,\mathbb Z)$ is free and non-zero, just consider the free product of a perfect, locally free group with a non-trivial free group.
Answer: Groups with $H_i(G;\mathbb{Z})=0$ for all $i>0$ are called acyclic groups.  There are lots of them.  As Mariano Suarez-Alvarez says, any perfect locally-free group is acyclic.  There are also finitely-presented examples.  The Higman group $G=\langle a,b,c,d\,\,:\,\,a^b=a^2,\,b^c=b^2,\, c^d=c^2,\, d^a=d^2\rangle$ is an example.  These groups play a vital role in the proof of the Kan-Thurston theorem: see for example the article `The topology of discrete groups' by Baumslag, Dyer and Heller (J Pure Appl Alg 16 (1980) 1-47) which discusses the Higman group.

On the group homology


BGE mouse over doesn't work. How to fix it?

Question: My Mouse Over sensor doesn't work when I try to use it for a cube, although it works very good when used for other objects.
First I wasn't sure if it maybe was due to the fact that I changed the Physics settings to "No Collision" in the physics tab, but after changing it back to "Static" it didn't work either. What can I do? Do you need the file?
Comment: ¿Could you provide your blend file? or images of your logic editor and maybe scripts that you are using, i just made a test following the steps that you describe and the Mouse over sensor work normally.
Answer: Yes the object can not be set to No Collision, Occluder and Sensor also do not work.
The mouse sensor will detect any static, dynamic, rigid body, soft body, and character objects.
To make testing easier enable the mouse pointer in the game.

Then set up just a Mouse sensor, set to Mouse Over, and some actuator like Visibility, or End Object just to test the mouse interaction. Put that on the default cube.


AutoCAD Map 3D does not show panels and icons?

Question: I have some problems with autocad 2014, 3D map, this not show me de icons on the top, I use windows 10.
Comment: What icons would you like to see? I see you have the ribbon and the pulldown menu bar.
Comment: Open button, new window from the top
Answer: Sounds like you are missing you quick access toolbar.

If you open your Custom User Interface (type CUI at the command line) and set the current workspace to "current" even if it is already current, that should help. See other ways you could try to get it back here:
You can also click on the small triangle to the right of the big blue"A" in the upper left corner of the image for to the same menus.


How to configure two routers to be connected with each other?

Question: I have configured a network environment, as below screenshot. Now I want the laptop n5 to connect to n10. When I run the traceroute command, it shows that the n5 can only reach to router n8. How can I let the router n8 connect to the router n1?
Answer: You either need to run a routing protocol between the two routers so that they can share routes, or you need to put static routes on each router pointing to the other router for routes on the other router.
Static routes don't scale. Using a routing protocol can automatically share routes.
You will probably learn RIP first. Something like this on each router:
<code>router rip
 version 2
 no auto-summary
 network 10.0.0.0
</code>
Comment: thanks for reply. I know the RIP principle. Do you know how to configure it on core network-emulator?
Comment: No, I don't. What I gave you was for Cisco routers, so if the emulator emulates those, that will work. RIP, OSPF, etc should all work for you. You can also do it with static routes, but if you grow your network, that will become a pain.
Comment: @ZhaoYi, also, the key to using RIP is that you run version 2 and disable the auto summary, otherwise both routers will think they know all about the `10.0.0.0/8` network, but you have it chopped up.


Why we use Dual supply Emitter Bias in Transistor

Question: As i am studying about DC Biasing of transistor, i am just able to fully understand only Base Bias after that i am stuck at Emitter Bias which is also called Dual Supply Emitter bias where we apply voltage Vee to emitter, Now my question is, In Emitter bias we know Ic become independent of Beta when Base voltage become zero, it means as it gets independent of Beta so its operating point will be stable.. and the problem is solved.. than why we move to other bias conditions like Collector feedback bias or voltage divider bias etc etc why we dont end the game at Emitter bias after studying Base Bias. Thankyou.
Comment: Write up the details of your question using schematics and equations. It works lots better in getting your point across than bits of English tossed together.
Answer: With an BJT transistor in a linear circuit, you need to make the collector current (Ic) not depend on the HFE (used to be called Beta) of the transistor.
The usual method is to make some resistor on the emitter have a lot more voltage drop than the Vbe (Base to Emitter) of the transistor.
This can be done by having a positive and negative supply voltage and keeping the Base near zero volts.  Life, however, often doesn't give you two supply voltages. In that case, setting the base at some voltage part way between the positive and negative supplies is much easier than having to make a new power supply circuit. This is the two resistor voltage divider in many designs.
Sometimes you may find your self designing in a case where adding one more component will be objected to by management.  A resistor from the collector to the base of a BJT takes fewer parts than the voltage divider.
Sometimes the supply voltage you have is much too low for a normal design.  In this cases, you must get very creative about biasing of the transistors.
Comment: Put some schematics in. There's no point answering a wall of text with a wall of text, **especially** where the subject of the question is the difference between different circuit topologies. Use the board's schematic editor, it's the diode/resistor button in the edit toolbar when you edit your answer.
Answer: It can be shown - as far as DC bias point stability against tolerances and temperatur changes is concerned - that the best bias method is to use

a resistive voltage divider at the base node for providing a bias voltage Vb as "stiff" as possible. For this purpose the resistor niveau should be as low as possible - depending on some limits set by allowed DC power consumption as well as input resistance of the whole circuit. In this case, the "unknown" value of the base current (due to large beta-tolerances) plays a minor role only.

an additional resistor Re in the emitter path for providing negative DC feedback. In this case, any unwanted increase of the collector current will increase the voltage Ve at the emitter node (npn case) and, thus, reduce Vbe=Vb-Ve. Hence, this effect will counteract the Ic increase up to a certain degree.


Where do I put the standards for adjustable shelves?

Question: Is there a standard distance or formula for where to put standards for adjustable shelves?
http://www.rockler.com/zinc-shelf-standards-select-length
Comment: In short: no. Depends on the material you're using and the expected load of the shelf. Graphus' answer is pretty comprehensive, and I recommend using the sagulator linked there.
Answer: There are no set distances for shelf standards, the reason being that how close together you want or need them to be depends on various factors, including:

Shelf material
Shelf thickness
The expected load on the shelf
The distribution of the load

Material
For an equivalent thickness particleboard/chipboard sags more readily than oak, pine sags more readily than plywood and so forth.
Thickness
Thicker material resist sagging more than thinner material.
Weight
Heavy power tools or numerous hardcover reference books will obviously tend to cause sagging more than a few softcover books or some knick-knacks.
Distribution
This is under-appreciated as a factor in how you mount, and subsequently load, shelves. General advice to help prevent shelves from bowing includes not mounting the brackets right at the ends (although this is sometimes unavoidable and with some shelf material it's fine, especially if the loads are going to be light) and not positioning heavy items in the centre of a shelf as this exerts the greatest bending force.
Distribution of the load across the width of a shelf, or putting the heaviest items right over the supports can often be advised. Another method that's not as commonly recommended is for when the brackets are not mounted right at the ends of a shelf, and here you can put heavy items on each end (outboard of the brackets) which can counterbalance the tendency towards sagging from a heavy load in the middle, within reason.
You may need more specifics than can be provided here so visit one of the go-to resources online, the Sagulator, if you need to calculate how much sagging you can expect for your chosen shelf material.
You might also like to read Shelving Spans for Bookcases on the Woodsmith etips site, and this PDF from the Composite Panel Associations, a technical bulletin on the use of particleboard and MDF for shelving.
Comment: And here I was about to link to the sagulator. I think it's in half the answers on this site :D
Answer: Those standards that you linked to are usually placed in pairs at both (in) sides of the case. I've never used them as I just drill a line of holes to hold shelf pins. It's the same idea, just cheaper once you've got the drilling jig.
I space a line of holes approx. 1.5 - 2 inches in from the front edge and from the back, so I would say you could also space the standards similarly. It's what I would do if I used them.
There is no prescribed distance, but if you put them to close together, the shelf may tilt depending on placement of the load. To far apart - to close to the front/back edges - may not look as nice. It's a bit of a judgement call.
Answer: If you want a rule, AWS (Architectural Woodwork Standards) is probably the best thing you can reference.
According to them (section 10, available for purchase), "Center Line of rests shall not exceed a minimum of 1" (25.4mm) to a maximum of 3" (76.2mm) from the front and back of the interior cabinet body." - AWS 2009 Section 10, 188.8.131.52.19.
In addition "The dimension between the center line of the rests shall not be less than 60% of the shelf's depth." and have "Three supports at each end of shelves over 29-3/4" (756mm) deep."
Answer: Not that I know of. I did do a little research but found nothing. So I assume there is nothing with it. Besides that I do think there is no such thing. My bookshelf has a spacing of 3/4 in. While the product you have on this website shows 1/2. So in the end I would go off of your like or convenience. The norm for shelf distance is about 12-15". But again, it is all off your liking


How did these holes form in the rock?

Question: I've been trying to figure out how these holes formed in the rock. These pictures were taken in Quebec, Canada on  small lake in cottage country. The strange thing is that they are almost both identical. There are no signs of tools used and the lake is very small with not many boats.
Comment: what type of rock is it? please update your question with more details about the area.
Answer: At first glance I'd say this looks like a granite but its hard to tell from the photos, certainly the rock looks to be a fairly massive (lacking structure). Looking it bit closer I'm now thinking it may be a coarse sandstone/conglomerate, judging by the large clasts that appear to be weathering out between the caves.
In either case, both sandstones and granites tend to weather 'spheroidally' into nice rounded shapes. My suspicion is that the rock has some compostional / structural susceptibility to surface weathering where these caves have been formed, perhaps exacerbated by being close to the waterline.
Its quite hard to tell without a proper look around though.

How did these holes form in the rock?


Linking online accounts with OTB real names in database

Question: I have just started to get back into chess from a long time away. I have joined my local club and started to compete. I have been playing around with SCID vs PC and wonder if you can link your opponent's online names under their real names, since I have been playing some people online and OTB. I am also considering investing in Chessbase, so if this is a feature available on there or any other chess database please let me know.
Comment: Isn't anonymity the whole point of online names? ;-)
Comment: Yes but if they tell you there name. I have joined my local club and know a number of the members online names.
Comment: depends on the site. I collect my chess.com games and for each game i use an api call to try and collect the players name if they have it. I also store that data so i dont need to call each and every game i have with that player. So yes it can be done...but only if the other party is willing to have their name known.
Comment: Thanks @David i haded thought of using and API
Answer: The feature you are describing is not built into either SCID or Chessbase natively. You can quickly rename players in a database, or alternatively automate through scripting.
I use the following API endpoints for chess.com to collect that information.
https://www.chess.com/news/view/published-data-api#pubapi-endpoint-player


Looking for app to fill credit card info on form after swipe from a card reader

Question: I'd like to swipe a credit card on my iPad and have it autopopulate form fields on a web page. Does anyone know of an an app and card reader that do this? I found a few for desktops like SmartSwipe, but I'm having trouble finding something similar for iPad.
Answer: They clearly exist, but not necessarily free; I googled a bit and found
http://idtechproducts.com/component/content/article/438-mobile-readers/125-imag-pro-mobile-magstripe-reader.html
Assuming you already have a card reader, have you tried contacting its manufacturer to see if they have any recommendations?  Most iOS app/reader combos will be full POS or transactional systems, like Square.
Comment: There are plenty of card readers and apps, but they all seem to deposit directly into an account or require you to use the form in the app. I want to simulate typing on the keyboard on a form on a specific web page.


I want to learn a real microcontroller with STM32F4. Which library should I use (HAL, SPL, or CMSIS)?

Question: From what I know, ST will stop to develop Standard Peripheral Libraries (SPL) for the next generations of STM32. And HAL is not ideal for people who want to understand well about STM32 and microcontrollers. Can you suggest me which one is the best to use (for learning and working in the future)?
Comment: Note: ST is working on a replacement for SPL called "Low Layer" which is to be compatible with HAL. They recently informed me in their "Wish List" that they are thinking of a tool to port SPL to "Low Layer" ... we'll see.
Comment: From Keil: "The Cortex Microcontroller Software Interface Standard (CMSIS) is a vendor-independent hardware abstraction layer for the Cortex®-M processor series and defines generic tool interfaces." ... this deals with core-specific interfaces and is compatible with SPL. I assume it to also be compatible with HAL, but will not say for sure because I do not currently use HAL.
Answer: If you really want to learn a specific microcontroller, ditch the vendor provided libraries (which are often bug ridden anyway), and work from the datasheet to set registers up yourself.
You're best to structure your code so the libraries aren't integrated into your application. Keep hardware access to a thin interface layer which you can easily swap out if you change silicon vendor without having to make changes throughout your code base.
Comment: Definitely agree with ditching the vendor provided libraries.  I had nothing but headaches when trying to use Microchip's libraries on a PIC32MX, and that's also why I won't touch TI's ARM MCUs.  With TI, you *WILL* use their libraries and OS, and you *WILL* like it.  Side note: I would keep the ARM CMIS libraries until getting the peripherals in place.  The documentation on just the Cortex M3 is about as thick as some of the chunkier micros.
Answer: If your goal is to understand in detail how the microcontroller works, then just use the register declaration file (stm32fxxx.h) and work directly with the hardware. It is not that difficult, and for some peripherals I would argue it can be much simpler, as the ST libraries add a lot of framework code that few people really need. Once you've learnt how to configure and use each peripheral you will probably want to use a library to do the boiler plate work, but at that point you'll have the knowledge to be able to decide if you want to roll your own, or use one of ST's offerings (and importantly debug those libraries if you end up using them).
Also note that CMSIS is a bit different from the other sort of 'hardware abstraction' libraries you might be looking at. Essentially, it is a very lightweight vendor independent software layer defined by ARM for managing core CPU support functions (interrupts, fpu, memory etc). The reason they created this is that in the early days of ARM microcontrollers, ARM only supplied the core CPU. These were not initially developed for single chip microcontroller work, so they had a very simple interrupt handling scheme - basically just a  mechanism for saving CPU state and branching to a single vector on the assertion of the IRQ line. If you wanted to have different interrupt sources, then the chip vendor had to add an interrupt handler peripheral. The problem was that each vendor started developing their own interrupt handling systems, and this meant that code could not be ported so easily between chips.
When ARM released the Cortex-M line - specifically targeted at microcontroller applications - they built in some of these more common support peripherals with the CPU core IP. To provided access to these peripherals they also defined the CMSIS.
In practice you will almost always use the CMSIS libraries in your projects, but you should be able to see from the source code that much of it is really just register definitions, and it is very lightweight.
Comment: I found CMSIS really useful for clean, (almost) self-documenting code. A particular vendor set of libraries was so opaque, I gave up trying to use it at all, apart from digging deep through the source to see what trickery they had used (for DMA in particular); there was an amusing error in the CMSIS definitions that caused a hard crash when the clock source was changed.
Answer: I agree with most of the others; you should just get the documentation from ST and start using it. It is as easy to program the peripherals directly as it is to use a vendor-provided library. There is no other choice if you want to learn about the microcontroller.
If you just want to learn how to call some APIs then try the libraries.
As far as working in this field now and in the future, try them all. From directly accessing the peripherals, not even using someone else's header files make your own. All the way to and through whatever libraries, soon to be obsolete or brand new, that you can get your hands on. Experience the RTOS approach; take a working FreeRTOS or whatever they have ported or  someone has ported and try that.
From one manager to the next or one employer to the next or one project to the next you may have to be switching from truly baremetal to calling APIs and back. You may have to dig into the vendor or other supplied code and examine it side by side with the documentation to find out what it is or isn't doing for you to work through a problem.
But you should be able to go from scratch (granted examining documentation and other folks examples), boot the Cortex-M, configure the GPIO(s) tied to LEDs, burn time in loops, and make the LED(s) blink on and off. From there decide if you want to continue into timers and the UART and then interrupts or SPI or I²C or PWM other paths within what is available on that chip. Or repeat the experiences with libraries.
Answer: It is very difficult for you NOT to use CMSIS these days.
SPL is being discontinued for future development.
HAL / Cube is the future if you want to stay with ST's libraries.
You have other non-ST solutions, however.
People often talk about how buggy the ST libraries are and my experience with those claims suggest they are more of a user problem than a code problem. At least with thee "very buggy" SPL. The known problem there is the I²C code for some chips, most often unknown to many people, or known as a hardware problem.
Another example was in the unofficial release of SPL 3.5.
Most of user problems with SPL have been due to inability to understand how the code works and linking the code to the hardware.
I used OEM libraries often and have found them to be generally of very high quality, certainly better than most code produced by "experts".
So I would suggest that you plunge into it and see if it works for you. Overhead is fairly minimal. And if you structure your code right switching back to your own code from the library is easy.


add object at specific location with python?

Question: This might be a really stupid question-I'm working in bpy right now and want to add a plane at a specific location...I know that How to add an object at a specific posistion in Blender Game Engine works for bge but am not sure if it'll work in bpy...
Answer: The tooltip of the Add > Mesh > Plane menu path shows this information, press Ctrl+C to copy it to clipboard.
Tooltip

All of these menu items trigger operators and take several optional arguments, location=(x,y,z) included. The same applies to the other items in the Curve, Surface Metaball etc., menus.
Docs
The total list can be found in several locations, in the docs
Blender's Python Console
use the auto complete feature (ctrl+space) in the Blender python console after typing bpy.ops.mesh.primitive_

The arguments to the bpy.ops.* can be found doing auto completion too

Info Panel
You can see the history of most of the code which has been triggered in the UI, in the Info panel if you drag it down
Comment: "CTRL-C on a ToolTip" to copy the datapath or the Python function is a great TIP..works with SHIFT-CTRL-C on fields with values and checkboxes in all other windows
Answer: bpy.ops.mesh.primitive_plane_add(location=(x,y,z))

does the trick
Comment: will you please add more to this answer, to make it more useful for future viewers.


Optocoupler delay off MOSFET solenoid

Question: This is to trigger a 12v solenoid (acting as a laser shutter) with 5v (JP2) thru an optocoupler.
The problem is 5v line have bit fast interruptions on a laser show, so I'd like to add a bit of delay OFF (say 0,5sec) in order the shutter remains active (energised) when this fast OFF interruptions happens (you know, to avoid click-click shutter open-close noise)
So I think I need to put a capacitor and maybe resistor+capacitor, but sorry, I don't know where on this circuit...could you help me please?
Many thanks

maybe this one?
Comment: Why not get rid of the "fast interruptions", instead? It sounds like your shutter controller is bad.
Comment: The "fast" interruption is something current in laser show (when beam are momentary off), I can't avoid them. This is why people add a bit of "delay off" on solenoid circuits (acting as a laser shutter). A manual E-stop is also there to cut 12V if necessary.
Answer: The biggest problem with your circuit is that it works backwards from what you want. With 5 volts applied to the optoisolator, the OI will turn on, and the MOSFET gate will be pulled low, and the MOSFET will turn off. So the shutter coil will not be energized when 5 volts is present. Is this a problem? I'll assume not.
Then, for a 0.5 second delay, your proposed circuit won't work - both the resistor and the capacitor are too small. A 10k resistor and a 100 to 200 uF will probably do what you want. Just be aware that the delay will vary from MOSFET to MOSFET, over about a 2:1 range.

Optocoupler delay off MOSFET solenoid


Get username or org in HTML page uploaded to SP 2013

Question: I created a HTML page and uploaded it to a list and it's working fine. My question is if I want a button to appear only to a specific organization or usernames only can that be done?
Answer: Im not really sure how you are using that HTML page, but here's what i did for SharePoint online.
I wont share the entire code since it might be different for SP2013, but i hope you get the point.
You need to load all the needed js files from sharepoint, what i used was

After you load those you will need to get the user by doing something like this ->
SP.SOD.executeFunc('sp.js', 'SP.ClientContext', getCurrentUser);

function getCurrentUser() {
    var splitUserName = _spPageContextInfo.userDisplayName.split(" ");
    firstNameUser = splitUserName[0];
    firstNameTrimmed = $.trim(firstNameUser);
    $(".userNameField").text(firstNameTrimmed);
    getCurrentUserWithDetails();
}

I'm retrieving the user display name (first name) and appending it to a div on my page.
You can also check if the user is in any SP Group in SPO by using something like this ->
getCurrentUserWithDetails()
    .done(function(data)
    {
        var groupNames = ['GROUPNAME'];
        //determine wether current user is a memeber of group(s)
        var userGroups = data.d.Groups.results;
        foundGroups = userGroups.filter(function(g){ return groupNames.indexOf(g.LoginName) > -1});
        if(foundGroups.length == 0) {
            $(".hideMenuUser").hide();
        } else {
            $(".hideMenuUser").show();
        }
    })

What im doing is checking if the user is in that group and if not i'll simply hide some menu buttons from him.
Comment: I created a normal HTML file and uploaded it to pages library in sp 2013 online. Will I be able to use this file sp.js? I want to give certain users an admin view to edit some content but the content is only inside html not sp.  Sorry, I'm new to sp.
Comment: sp.js should be present in other version of SharePoint aswell (not only online). The approach above loads the users and you can then hide/show content on the page based on information that you receive from sharepoint. If you want onyl certain people to be able to EDIT the HTML page you should look into permissions for that file/library. Basically you'll need to create a sharepoint group which has full access and set the library to follow those permissions. For the rest of the users it will be "Read" permissions only.


Are there any proofs of the necessity of a mind-independent "reality"?

Question: Are there any classic proofs of the necessity of a mind-independent "reality," along the lines of Anselm's proof of God?
Comment: Does Cartesian Circle count? Clear and distinct perceptions indicate existence of reality because God exists and is not a deceiver. God exists and is not a deceiver because Descartes has a clear and distinct perceptions of him. https://en.wikipedia.org/wiki/Cartesian_circle Ontological argument is itself fallacious, but in a more subtle way http://philosophy.stackexchange.com/questions/24484/is-there-a-suppressed-premise-in-anselms-ontological-argument/24487#24487
Comment: A Treatise Concerning the Principles of Human Knowledge by Berkeley does come up with a long string of proofs which should adequately answer your query.
Comment: A fortiori every proof for the existence of god is a proof for mind independent reality, so long as you can exclude the possibility that you are god.
Comment: I'd suggest making the second part into a question of it's own - I don't know the answer, but it seems more suited to the site that way.
Comment: Thanks, I deleted my reference query about Kant's noumena. What remains may be too broad, but I'll try fishing for a bit. I guess I was picturing answers post-Kantian "turn" to a subject-centered ontology. But by that time, I suppose we don't have curt "proofs" in the Anselm style, at least not on the Continental side.
Comment: @NelsonAlexander link to anselm would be great :)
Comment: it's not a deductive argument but the no miracles one, is mint... and i think it explicitly concludes that theories are about a "mind independent" reality
Comment: Actually, a famous paper by Moore seems to exactly that, but is not terribly convincing.
Comment: If there were no possible mind-independent realities then everyone would be a solipsist ...
Comment: But would every "one" be a solipsist or would "we" with minds be solipsistic? The accusation of solipsism is too convenient a simplification of the problem of "other minds" and much else.
Comment: I asked a question very like this one on the Buddhist site, something to the effect "Is Reality Consensual or Individual" if I recall correctly. Can we find a way to leave God out of it though? That is what really interests me.
Answer: There are no popular theories pertaining to the "necessity" of an external world. Bishop Berkeley tries to prove the necessity of an entirely mind-dependant world, but direct realists have only refuted their opposition, and not made any solid attempt to defend reality.
The only way to have necessary existence of reality is to invoke God as Descartes does when asserting his own existence, and invoking the non-natural opens a theory to more problems than it solves.
Answer: You might be interested in Paul Boghossian's Fear of Knowledge. As I recall, though, I did not find his argument for an objectively existing reality (I will use "OER") convincing.
I will point out that the moment one talks about other people (or, for that matter, tables or chairs) he is assuming that there is an OER. If he wants to avoid that assumption, then he has to talk about his own other-people-ish sensory qualia (or about his own table-ish sensory qualia or his own chair-ish sensory qualia). I will also point out that to say that science has the virtue of its hypotheses' being testable once again presupposes OER. Thinking of yourself as interacting with other people (or with tables or chairs) presupposes that you accept that there is an OER (as well as that you derive reasonably reliable information about it, presumably via physical senses). Unless you are willing to restrict yourself to talking about only your own sensory qualia, it is a practical necessity to assume that there is an objectively existing reality of which you gain reasonably reliable information via some informational connection (presumably, physical senses). And to see other people as having moral value, or thinking that they ought to be so treated despite morality's not being objective, requires thinking of them as existing beyond your own mentality--and therefore requires assuming that there is an OER of which you somehow gain reasonably reliable information.