Is this the right sillcock for an outdoor spigot?

Question: We just had a plumber out to replace some leaky outdoor spigots. I thought the replacement looked a bit small, but I figured he was the professional and maybe those were just the new way of doing things. Later on, we had another person come out for something unrelated and they pointed out that the spigot is meant for indoor use, not outdoor. Is that right? The plumber wasn't cheap, so if that's the case I want to call them back out to fix the work and install the correct type of sillcock.
Answer: Those appear to be hose bibbs, NOT sillcocks. A sillcock is distinguished by having the valve at the end of a long stem INSIDE the house. That requires (in every one I've ever met) the valve handle to be oriented straight out from the wall. The angled handle position is a dead giveaway that these are NOT sillcocks, and will freeze unless they are shut off from inside the house and drained before winter.
Of course, even a sillcock will freeze if you leave a hose attached to it, so that it can't drain.
Comment: No, they are not specific to indoors or outdoors OTHER than the freezing problem - and perhaps lifetime of the plastic handles in the sunshine. And plenty of sillcocks have plastic handles that age poorly, too.
Comment: Thank you. I really don't know much about plumbing (obviously, lol). Due to the way my house is configured, there isn't space for the long stem of a frost-proof sillcock. We will be winterizing these when things start to get colder by turning off the water to the bibb, draining it, and adding a little insulation cap over top of it.  That being said, is the current hose bibb installed meant for exterior use? I was told by someone else that the ones installed are for things inside the house, like hooking up a washing machine.
Answer: This appears to be a ball valve, quarter turn or 90 deg on/off. To comply with code for an outside faucet in most jurisdictions it would need to have a back-flow preventer screwed on between the valve and the hose.
I installed ball valves like this on our two outside faucets because I thought I would never again have to replace seats and washer seals.
When I turned the water back on after installing them I found them very stiff! My wife could not turn them bare handed and even I had trouble. When I had manipulated them in the big box store where I got them they were easy to turn. The ones I bought were described as garden valves made in Italy so I thought they would be good for this use. We can't turn them barehanded, but they do work acceptably with a wrench I made for them.
Our two outside faucets are on hard copper tubing coming vertically out of the ground 18" from the foundation, not horizontally from the wall. To protect from freezing in winter, I insulate the tubing and valve with foam wrap, cover that with sheet insulation and cover that with a large bucket.
If you are in a cold climate, you will need to cover this with an insulated box 1' square or even 2' square to prevent freezing. Of course, if you have a shutoff valve upstream of this in a heated space and water in the valve and line drains, then this won't be necessary. But it means that the faucet cannot be used in winter.
When I bought these two valves I got the screw on backflow preventers and have them in place, but the city code may actually require outside faucets to have an integral backflow preventer. Right now I could remove the backflow preventer and use the faucet without it.
Also ball valves function best as full on or full off valves (shut-off or cut-off valves). They are not very good for fine control of flow, that is, they are not good as "metering valves". If I had known this I would not have used these, but we are going to keep them.
I am surprised a professional plumber would install such valves.


How will God punish a person who deserts his wife?

Question: If a husband intentionally deserts his wife by listening to wrong and misleading people, then how will GOD punish him?
Answer: God does not have to personally execute punishments. For that very purpose in the netherworld he has appointed Yama. And on the earth he appointed the Kings. God punishes through the Kings here as Kings represent the Gods on earth.

Manu Smriti 9.303. Let the king emulate the energetic action of Indra,
  of the Sun, of the Wind, of Yama, of Varuna, of the Moon, of the Fire,
  and of the Earth
Manu Smriti 9.308. As (a sinner) is seen bound with ropes by Varuna,
  even so let him punish the wicked; that is his office in which he
  resembles Varuna.

Unless the wife is guilty of a minor sin the wife must not be abandoned. A minor sin is called an Upapataka (which causes loss of caste) as opposed to a major sin which is called a Mahapataka.
The King can  punish such guilty husbands by imposing fines on them.

Manu Smriti 8.389. Neither a mother, nor a father, nor a wife, nor a
  son shall be cast off; he who casts them off, unless guilty of a crime
  causing loss of caste, shall be fined six hundred (panas)

And casting off any relatives without sufficient reasons is also mentioned by Manu as an Upapataka.

Manu Smriti 11.62. Living as a Vratya, casting off a relative,
  teaching (the Veda) for wages, learning (the Veda) from a paid
  teacher, and selling goods which one ought not to sell, are all minor
  offences.

As per Vishnu Smriti, abandoning one's wife falls under "fourth degree  crimes".

(Abandoning) one's holy fire, or one's father, mother, son, or wife;
Thus have the crimes in the fourth degree been enumerated.

Vishnu Smriti, Chapter XXXVII.

And,  another chapter of the same Smriti says that offenders guilty of such fourth degree crimes are re-born as aquatic animals in the next births.

Minor offenders enter the bodies of birds.
Criminals in the fourth degree enter the bodies of aquatic animals.

Vishnu Smriti, Chapter XLIV.

And, as per the Daksha Smriti, the husband guilty of such crimes gets reborn as barren woman in the next birth.

He, who renounces, in youth, a wife who is free from any fault and is
  not degraded, will attain, after death, to womanhood and become
  barren.
Daksha Smriti, Chapter 4, Verse 17.

But, there are also prescribed penances or prayaschittas by performing which one gets relieved of one's sin in the current birth only.
Answer: Before you get answer to this it is important to understand whether GOD punishes somebody for a wrong act done or is it something else.
I will explain it to you clearly. Everything in this world works on a Law. For good actions you perform, you get good returns. For bad actions, you get bad returns. If you help somebody, you will get blessing in return from that person and that will be added to your fortune and will be responsible for your Good Luck in life. Similarly, if you hurt somebody, you will create a Bad Luck for you yourself. This can also be called as the universal LAW OF KARMA. God has nothing to do about it. He won't punish anybody being the most loving, most caring and most obedient father of the Humanity. All the scriptures which we read has his teachings about what kind of actions one perform, what are good actions, what are bad actions and why one should not perform any sins. The reason is everything in this world happens according to Law of Karma. If you open a school in this life, in next life you will be a highly educated person. If you open a hospital in this life, you will get good health in the next life. Similarly, if you kill many people in this life, probably you will have a very bad life in your next birth and so on. Everything is based on Law of Karma.
So, now coming to your question: If a husband intentionally deserts his wife by listening to wrong and misleading people, then how will GOD punish him?
The answer is clear that if the husband knows that what he is doing is wrong but still does it intentionally, then definitely in his next life he will be in misery of some kind for this wrong action he does in this life. There can't be a definite answer but you can guess that in his next life either his family members will not love him or desert him, or nobody will respect him or like him in his next life and he will crave for love and respect from people in his next life. But most important thing to understand is GOD has nothing to do here in his destiny, nor GOD is punishing him here. It's just Law of Karma. Every Action has equal and opposite Reaction. This is true not only for Physics but for the Life Actions as well.
So to learn from this, we should be very cautious about our actions we perform in our life. Even a small hurt or anger or greed or ego you show others can be a reason for your misery in your current life or next life or many coming lives. So love and respect everyone with heart. Be generous towards even those who do bad to you.
Source of this Knowledge: The Hindu scripture "Gita"
Comment: Welcome To Hinduism SE! Pls.Cite sources in your answer.
Comment: Hi, I have added the source in the message. I got this knowledge from GITA. I don't learn shlok's, I understand their real meaning and use them in my life. I hope this make sense.
Comment: I am agree with your answer. God is nothing to do with punishment. It's karma only.


Can network admin detect port scan on a certain host?

Question: Say, my laptop is connected to a large WiFi network with many other users. If a port scan is run on my IP by somebody else on the same WiFi network, is it possible for the network admin (or anybody) to find out, or is it only my system that can detect this?
Answer: Any one with sufficient access to the network traffic can detect this, All you need is the capability to see all traffic and how its routed (to what TCP Port and IP).
The trick is to detect the 'unusual' signature of a port scan over the rest of the traffic (like sequential trying of random ports / specific well-known ports). This can be quite tricky for automation but is usually easy to do for a human.
As to specific who can detect it that is :

everyone in between you and the attacker that can see enough network traffic.
the attacker. obviously
you (the target) since your machine receives all these requests.

As a rule of thumb: Nothing within a network is anonymous / untraceable from within the confines of that network.
Comment: That is a different question all together. you can ask that if you like, but narrow the scope a bit when you do.
Comment: @BobBob Not *very* evident (as in: not actively persued by many admins, not possible per se retroactively, not done by any default settings). In fact it might require the network admin to log more of his users traffic than he is allowed to per data protection. A *firewall* somewhere in-between might note (and counteract) a port scan, but your scenario "large WiFi" network does not sound much like something very firewall-y
Comment: Thank you for the clear answer. How would the attacker cover his tracks to avoid being recognised? I've read about proxychains using the Tor network, etc. Does masking your IP actually help?
Comment: Ok thank you. Also, coming back to my original question, is it very evident to the network admin or does he have to actively look to find out?


Examples of general purpose algorithms that have benefited from running on a GPU?

Question: I am looking for examples of general purpose algorithms (meaning non-graphics related) that have been proven to run an order of magnitude faster on a GPU than on a CPU. I will use these examples to think creatively about other algorithms that I could implement on a GPU.
Comment: String concatenation, sleep sort
Answer: A few things immediately come to mind:
A specialized Bitcoin client was written to use the GPU to perform the cryptographic hashes. The GPU client generally performs more than 10x better than the SMP CPU client on a typical 4-core system. Bitcoin depends on the computation of large numbers of unrelated cryptographic hashes, which can be computed in parallel.
The Folding@Home project offers a GPU client for their molecular dynamics simulations. These computations are performed on the individual bonds between atoms in various environments and conditions. The math is relatively simple, but must be computed billions of times for each bond to simulate mere nanoseconds of activity.
The popular "toy" example used by proponents of GPU computing is the n-body problem.
What these things have in common is that they are embarrassingly parallel. That is, the problem can be decomposed into a small number of discrete computations that are performed many times over a large data set. That is the kind of computation that the GPU is good at.
Complex computations that are dependent on the results of previous computations are not well-suited to the GPU.
Comment: Multiple BOINC clients have GPU support.  SETI@Home is another.
Comment: Indeed. There are many such projects, but I didn't want to make this a comprehensive list of projects - just to point out what they have in common.
Answer: Video and audio transcoding is a great example. It's the conversion from one file format to another. An example is MPEG-2 to H.264.
Note video transcoding is not related to 3D graphics. You cannot encode a video using a vertex and pixel shader.
Comment: @kiamlaluno Transcoding a video isn't related to graphics, and audio transcoding most certinly isn't. It's the conversion from one file format to another. An example is MPEG-2 to H.264. It doesn't require the display of graphics to perform.
Comment: @kiamlaluno: Video transcoding is not related to 3D graphics. You cannot encode a video using a vertex and pixel shader.
Comment: The OP is asking for non-graphics related examples.
Answer: Mining Bitcoins using a GPU has become very popular.

...peer-to-peer, electronic cash system. Bitcoin creation and transfer is based on an open source cryptographic protocol and is not managed by any central authority. Each bitcoin is subdivided down to eight decimal places, forming 100 million smaller units called satoshis. Bitcoins can be transferred through a computer or smartphone without an intermediate financial institution.
The processing of bitcoin transactions is secured by servers called Bitcoin miners. These servers communicate over an internet-based network and confirm transactions by adding them to a ledger which is updated and archived periodically. In addition to archiving transactions each new ledger update creates some newly-minted bitcoins...

Another application is in financial markets for real-time trading using models such as Black-Scholes.

...A key requirement for utilizing options is calculating their fair value. Finding ways of efficiently solving this pricing problem has been an active field of research for more than thirty years, and it continues to be a focus of modern financial engineering. As more computation has been applied to finance-related problems, finding efficient ways to implement these algorithms on modern architectures has become more important.
This chapter describes how options can be priced efficiently using the GPU. We perform our evaluations using two different pricing models: the Black-Scholes model and lattice models. Both of these approaches map well to the GPU, and both are substantially faster on the GPU than on modern CPUs. Although both also have straightforward mappings to the GPU, implementing lattice models requires additional work because of interdependencies in the calculations...
Answer: Conway's Game of Life is a good academic example.

...The universe of the Game of Life is an infinite two-dimensional orthogonal grid of square cells, each of which is in one of two possible states, alive or dead. Every cell interacts with its eight neighbours, which are the cells that are horizontally, vertically, or diagonally adjacent. At each step in time, the following transitions occur:

Any live cell with fewer than two live neighbours dies, as if caused by under-population.
Any live cell with two or three live neighbours lives on to the next generation.
Any live cell with more than three live neighbours dies, as if by overcrowding.
Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.

The initial pattern constitutes the seed of the system. The first generation is created by applying the above rules simultaneously to every cell in the seed—births and deaths occur simultaneously, and the discrete moment at which this happens is sometimes called a tick (in other words, each generation is a pure function of the preceding one). The rules continue to be applied repeatedly to create further generations...
Answer: Problems that require a lot of math that can be done in concurrently. Where I used to work we wanted to play with GPU's to add/subtract/multiply 2 matrixes to work out genetic corrleation. The first time I heard of GPU's was that they were being used by a finacial software house to do some of their modelling (monte carlo and so forth). The would be usefull in code breaking.
GPU's probably wont help much with your more regular programming problems where a couple of CPU cores are enough because most regular programs only need to run a few concurrent process. (migh be different with memory/disk that is very much faster than we currently have)
Answer: Maybe I'm being very Math/Science/Engineering compute specific but one that comes to mind is the FFT algorithm.
I've seen this FFT benchmark thrown around before, and although it is a few years old I think it was well done for what it is: http://www.sharcnet.ca/~merz/CUDA_benchFFT


Business Intelligence reporting with mySql

Question: Are there any good open source projects for Business Intelligence reporting in mySql or is there a commercial option that is not too expensive? Am in a 5 man shop so spending a lot of $$$ is not an easy option
Answer: Pentaho is a good option...
http://www.pentaho.com/
It's opensource, I have a friend that sells BI and use this solution to delivery and he likes it a lot
There is also JasperSoft but I didn't heard anything about it
http://www.jaspersoft.com/
Answer: You might as well have a look to icCube; there's a community edition that might be enough for your needs; otherwise the enterprise edition are quite affordable compared to the major actors of the market.
Comment: Affiliations with recommended products should be disclosed in the post. http://stackoverflow.com/help/behavior
Answer: Then you have InfoBright which is a MySQL fork. They have their own columnar oriented storage engine which is optimized for BI/DW type of queries. Having the same SQL syntax and index free tables it could be an interesting choice for a MySQL shop. There is a crippled community version free of charge.
Answer: There is Eclipse-plugin based, BIRT. We have just started using it and so far it seems good. We are using the community edition and my knowledge on other versions is limited. Otherwise, Pentaho is a great option.
Answer: I'm going to confirm the Pentaho Choice. There's a Pentaho Business Suite that you can buy,
but you are free to get all the tools for free.
I use Pentaho Data Integration to data pump raw data from our database in France, all the way to mauritius in Africa. PDI handles the file transfer with ssh then performs the loading with all the business logic in it and finally remove files that have been loaded successfully from the production server.
I've tried a bit the reporting tool it's a very complete product.
All it takes is time and effort to learn. The community online is very active and the developers answer on the forum Directly (I know the PDI project leader does)


How to hide Firebase API in Vanilla JavaScript?

Question: Hope you're having a good day.
I was working on a project where I am making a user input form with HTML, JavaScript but when I inspect using Google Chrome, the front-end codes are showing up. All of my firebase Realtime Database API, Key, everything is there, visible.
I was wondering, if I make a login/sign up page using firebase and JavaScript, someone will be able to steal this database API and create their own HTML form, submit information and then they come back to my site and directly login with what they have, right?
Is there possibly any way (without React.js .env method) to prevent users from stealing my firebase API codes?
Answer: I did it on my own. If you're looking for the solution, I just kept the API KEY in my php code, then called it inside my Javascript code, that's it.


Stress-Energy Content

Question: I think that the Einstein Field Equation relates the pseudo metric to the the distribution of matter-energy as represented by the stress-energy tensor. Are the stress entries in the stress-energy tensor restricted to the tidal forces on a (falling or orbiting) test blob, or do they include other mechanical stresses such as pressure in a stationary spherical gas cloud in equilibrium?
Answer: The stress-energy tensor is a stand-in for whatever forces you want to account for. For example, electromagnetic waves carry energy (as well as momentum, angular momentum, etc.) and you can choose to include these energies in the stress-energy tensor if you wish. Please see the Wikipedia article about the stress-energy tensor for E&M: https://en.wikipedia.org/wiki/Electromagnetic_stress%E2%80%93energy_tensor

Stress-Energy Content


Conversion to Dalvik format failed with error 1 - Exporting APK

Question: I want to export an apk for the project but each time i export i got an error saying Conversion to Dalvik format failed with error 1.
I faced this error before while working on same project and when i get it I go to the project folder and delete jars from folder classes inside folder bin
but in Exporting APK It doesn't work
Can anyone help me ?
Comment: [Have you tried this](http://www.google.com/search?q=Conversion+to+Dalvik+format+failed+with+error+1+-+Exporting+APK&ie=utf-8&oe=utf-8&aq=t)
Comment: I tried but I am using MAC not windows
Comment: [Have a look at this video tutorial](http://www.youtube.com/watch?v=4JXGbvgJnSc)
Comment: It didn't help I know how to export and import but I don't know how to fix that error
Answer: Generally my experience with 'Conversion to Dalvik format failed with error 1' is that you need to do a project clean (if you use eclipse them from menu Project -> Clean ... ) this usually fixes the problem. Also right click on the project you want to export then Properties -> Android Tools -> Fix Project properties.
If this doesn't help you then with terminal go to the project path
cd /home/username/your_project_path

then
rm -fr bin/*

Note: you may need to restart eclipse or at least select the project and refresh it (F5).
Hope this will help you, if still doesn't , please let me know
Comment: I am gonna help you with something special in my case. I create a folder called libs inside project and import jars using file system then right click on this folder and configure build path then " Add Jars" not "Add External Jars"
Comment: This always lead to 2 copies of JARS one copy inside folder called libs in the project and other copy inside folder classes inside folder bin in the project
Comment: still getting same error because of 2 copies of JAR files.
can you help to have only 1 copy
Comment: remove all the jar files, then add them from start, and why do not you try add external jars ? with out creating folders by your own
Answer: I solved this problem

Go to Project » Properties » Java Build Path » Libraries and remove
all except the "Android X.Y". click OK.
Go to Project » Clean » Clean projects selected below » select your
project and click OK.

That should work.
If you have a JAR file located somewhere in your project folders and THEN added it as a Java Path Library. It does not show up under the Package Explorer, so you don't notice it, but it does get counted twice, causing Dalvik error 1.
Answer: You guys don't have to remove libraries at all.
Yes, the problem is caused by the libraries.
BUT!!!
What if you need the libraries to build? It doesn't make sense.
I had a same problem, and finally got the solution.
Add exceptions in the "proguard-project.txt" file having proguard config.
like this
-dontwarn android.support.**

That's it.
1) check what you have libraries on the project.
check package name! not file name!
see the list below "Android Dependencies".
when you click "*.jar",
you can see the package names in the jar file.
Assuming that
you have "aaa.jar".
the jar have "org.jdesktop.application", "org.jdesktop.swingworker"
(Project) > Android Dependencies > aaa.jar > org.jdesktop.application
                                           > org.jdesktop.swingworker

2) just add like below
-dontwarn org.jdesktop.**

into the (Project) > proguard-project.txt file.


reading a json object in jsp

Question: i have a JSON object passed to the jsp page. it is passed as a string. now i have to parse this string and retrieve the values that are passed through the JSON object.  so that i can print the values in the same jsp.
Answer: There's lots of resources, including libraries & plugins for various technologies/frameworks on json.org.
Answer: With tons of JSON parsers, it comes down to how you want to deal with data in JSON. My personal favorite from the lot is Jackson, but many others work well for simple cases too, including the "reference implementation" (aka JSON.org parser).
(I assume you want a Java parser, given reference to jsp)
Answer: My preferred solution to this problem involves using a JSON parser that provides an output that implements the java.util.Map and java.util.List interface. This allows for simple parsing of the JSON structure in the JSP Expression language.
Here is an example using JSON4J provided with Apache Wink. The sample imports JSON data from a URL, parses it in a java scriptlet and browses the resulting structure.
<c:import var="dataJson" url="http://localhost/request.json"/>
<%
String json = (String)pageContext.getAttribute("dataJson");
pageContext.setAttribute("parsedJSON", org.apache.commons.json.JSON.parse(json));
%>
Fetch the name of the node at index 1 : ${parsedJSON.node[1].name}

To make this clean, it would be preferable to create a JSTL tag to do the parsing and avoid java scriplet.
<c:import var="dataJson" url="http://localhost/request.json"/>
<json:parse json="${dataJson}" var="parsedJSON" />
Fetch the name of the node at index 1 : ${parsedJSON.node[1].name}

reading a json object in jsp


Premiere Pro CS6 preview problem: other application shows through

Question: Sorry if this is the wrong place to ask this question, but, I'm having a issue with Premiere Pro CS6 from Creative Cloud.  Whenever I put footage in the timeline this happens: .  The file's encoding is fine and it happens with every file.  I'm running it on a MacBook Pro Retina.  Does anyone have any ideas on how I could try and get Premiere working?
Comment: You might also get knowledgeable answers on superuser from people who know the Mac display libraries well if my suggestions don't work.
Answer: It looks like a problem with the playback engine.  I would try updating your video card drivers and/or making sure the playback engine (in the project/ project settings/general menu) is set to Mercury Playback Engine Software Only.  If that doesn't work, I'd try uninstalling and re-installing Premiere.
I don't know what can cause it on Mac OS, but on Windows seeing something from another application through a portion of a window is generally a sign of a graphics driver being misconfigured or misused by the software in question.
Comment: That fixed it! Wow, thanks so much.  I would have never thought of that!
Comment: @SamBaumgarten out of curiosity, which one of the suggestions fixed it?
Comment: Changing the playback engine :)


Why not issue all the Bitcoins at once

Question: What is the point of mining the Bitcoin and thus issuing new Bitcoins over the span of some time versus simply issuing all 21 million coins at once?
Comment: Ask yourself this .... if they were all issued at once, who would they be issued to?
Comment: If they were all issued to you, they would be worthless. A currency's value comes from its being useful as a medium for multipe parties.
Comment: That was a bad joke.
Comment: Would be great if it was me.
Answer: In a way, all bitcoins were issued with the genesis block: The total number was fixed and the distribution schedule defined with the rules put in place then. However, distributing them over a longer period of time allows for the bitcoins to be spread out more, creates incentives for miners to contribute work to the Bitcoin network and probably also helped fewer of them getting lost during the emergence of Bitcoin when many people just tried it briefly and likely didn't properly store their coins.
Comment: Good points....

Why not issue all the Bitcoins at once


Which variables of motion are kept constant in a centrifuge?

Question: Which circular motion variables are kept constant in a centrifuge? My thinking so far is that magnitude of centripetal acceleration is constant and it follows that centripetal force is also constant. Are tangential velocity and radius constant as well?
Comment: If the substances to separate move out- or inward, their tangential velocity and the radius of their path are *not* constant, though they might not change a lot depending on the geometry of the setup. In this case, also the centripetal force (which depends on the radius) is subject to change. I would assume that except for the acceleration and deceleration at the beginning and end of the centrifugation, the angular velocity should be constant, but it is of course totally possible to build a centrifuge which varies this, too.
Comment: Why does this matter, i.e. what is it relevant for which variables may or may not be constant in a centrifuge?
Answer: The centrifuge starts up, and quickly attains maximum angular velocity, $\omega$, and stays there. There is zero angular acceleration, $\alpha$, while running. It runs for awhile at constant speed, sometimes for hours. Then it is turned-off and quickly decelerated to a stop and the test tubes are removed.
This provides constant radial acceleration due to the angular velocity. When something is spinning at a constant speed, the centripetal force needed to hold the object in its circular path stays constant. This force pushes radially inward. The result is that things within the object, inside it, experience a centrifugal force pushing them radially outward.
The test tube is angled to be nearly horizontal with the open end at lower radius so that the centrifugal force pushes everything to the bottom of the tube. It's basically like putting the tube in a very high gravity. Substances with higher density will be forced toward the bottom even harder, much harder, than under gravity, and they will displace the stuff with low density. When you take it out, the highest density substance will be on the bottom, and the next highest density above that, etc, with the low-density substances on the top of the tube. In addition to high apparent gravity (centrifugal force) to make the dense stuff nestle its way to the bottom, you have the added benefit that centrifugal force is always higher at higher radii, so the bottom of the tube has slightly higher apparent gravity than the top (the bottom is at a higher radius). This helps a little too. Force $F$, velocity $v$, acceleration $a$, radius $r$, and angular velocity $\omega$, we have (remember angular acceleration $\alpha$ is zero during the bulk of the run):
$$ v= \omega r \text{ , } a= \frac{v^2}{r} = \omega^2 r$$
$$ \implies F = ma = \frac{mv^2}{r}= m \omega^2 r$$
So for example if the radius is 1/4 meter, and $\omega$ is just five revolutions per second, or $10 \pi$ radians per second, we have:
$$\omega = 10 \pi  \text{ , } a=\frac{100 \pi^2}{4} = 250\frac{m}{s^2} =25g$$
$F$ and $a$ point radially. $v$ points tangentially. And technically the $\omega$ vector points along the axis by the right hand rule. With constant $\omega$, the magnitude of the velocity is constant, but the velocity vector keeps changing direction. A changing velocity vector is achieved via acceleration. The vector keeps bending inward toward the center which is the radial inward acceleration.
Comment: .. @AlBrown, consider two masses in circular motion along paths with radius $r$ and $R$. ($R\gt r$). Both have the same angular velocity. That means both rotates keeping aligned. Shouldn't centripetal acceleration of mass on track with radius $R$ greater than that of the other?
Comment: @ACB Just seeing your comment for some reason. Hmm. Yes that's correct. That's what was meant by, "In addition to high apparent gravity (centrifugal force) to make the dense stuff nestle its way to the bottom, you have the added benefit that centrifugal force is always higher at higher radii, so the bottom of the tube has slightly higher apparent gravity than the top (the bottom is at a higher radius). This helps a little too." There is a gradient to the apparent gravity.
Comment: so its safe to say that all the particles in the test tube, regardless of mass, are experiencing a constant centripetal acceleration? I thought if the centrifuge provides a constant centripetal force, then decreasing mass means increasing Ac whilst increasing mass means decreasing Ac.
Comment: @yug All particles at a given radius experience the same centripetal acceleration, $a$. $~$ So by $F=ma$, the heavier particles experience higher force. This makes denser particles get pushed to the bottom harder. That's why the dense stuff ends up on the bottom. Did that answer the question?


How to solve the issue that a remote Terminal screen is messed up when using `expect`? (usually after a resizing)

Question: Using expect and password auto-login to remote with ssh, when resizing the window, stty size report old size. Cause commands like vim and less mess up.
Answer: after a long time of search and test, finally find out it's expect that cause the issue, by default expect will not forward WINCH signal, this can fix by trap command like this
trap {
 #fetch rows and cols from controlling terminal
 #note  [] is tcl way of call and here the stty is expect's not system's which not support "stty rows" to query rows
 set rows [stty rows]
 set cols [stty columns]
 #send "echo size changed to $rows $cols\r"
 #according to the man page, the variable spawn_out(slave,name) is set to the name of the pty slave device
 stty rows $rows columns $cols < $spawn_out(slave,name)
} WINCH

after add this at begining of my expect file, every thing works fine.
thanks Anish Sneh from https://askubuntu.com/a/672919/1384831
want to answer at How to solve the issue that a Terminal screen is messed up? (usually after a resizing) but it is protected, so post a new question. wish it will save some others time.
Comment: many people (at least me) don't realize it's expect's problem, that question is so hot and is the first search result of "remote shell resize issue" from google. I have tried all answers there without any luck and almost give up. recently, in some cases, I use `ssh` directly without `expect` and finally realize it's expect's issue.
Comment: Your issue and your answer are specific to `expect`. The other question does not mention `expect` at all. IMO in such case asking a separate question is justified.


How to make my logo spin showing the front side on both sides?

Question: I have got most of the steps complete but I need help with a few. I made an svg of our haunts mummy logo so the when it rotates it will be 3D. I cant figure out how to put the mummy png onto the svg object and have it rotate showing what is on the front on the backside as well. The image shown is the svg of the mummy. All i want to do is add the actual mummy logo onto this and have it rotating showing this side when it rotates to the back as well.
Comment: you want to spin with png image or you want to insert image on the svg not clear
Comment: Could you show some pictures?
Comment: It depends a lot on your object, and how you want to do this... your imported svg could become a flat object with a single face whiich,  if textured with an image, will show it on both sides... for an example try importing the image with "images as planes" bundled addon...
Comment: Scaling one axis from one to zero and back will also give the appearance of rotation.
Answer: it seems you want to show the same image on front and back (we don't know if as in a coin, ie the same exact image on both sides, or as a photographic film, ie the backside looks reversed ).
This is also a multiple question, as different steps are needed. So I will just drive you through what you need to learn to do.
Since you import a svg you get a curve object: it must be converted to mesh object first (alt+c), then add a face. If it needs depth, you can extrude that face (and so you get two faces, one on each side).
then you must assign the image to the face(s). This can be done in a number of ways (uvmap, different materials...) and it also can depend on the rendering engine used...
Lastly you need the rotation. This is done adding a few (rotation) keyframes at different frames, enough for one full turn. by default you get an "eased" movement (starts and stops slowly) but you can later edit animation curves to make it constantly rotating, without "easing", if you wish so...
As you see, you have different (simple) tasks to learn. As there are already many answers for these tasks, look for them with the search tool...
edit: I noticed you added an example image but it seems not symmetrical, so it won't be possible to show the exact image on both sides, apparently. To explain better, I created an example with a (even more) asymmetrical mummy image and imported svg curve, like this:

here

the svg has been converted (ALTC) to mesh, and rotated 90°over X
then selecting all vertices I created a face (F).
then I extruded it over Y (EY) a bit to give it depth.
then in edit mode, ortho mode, I created a UVmap (U project from view, bounds) for the face
then I created a simple material, shadeless.
added a texture (the mummy .png) and used the UV mapping method, specifying the UVmap created at point 4. This makes the .png fit perfectly the object face.
lastly I animated a full turnaround with using keyframes, then gave linear extrapolation.

If you wish to learn, try asking here about each of the above points that you don't understand (maybe try before because it could be really simple) just by referring to manual or other examples
Comment: Thank you this will help although how do i add the faces. Also i dont want the backside to look reversed i want it to show the front on both sides.
Comment: Is it possible that you could email me and walk me through this step by step I am still new to blender and 3D. I know how to keyframe and such byt this part is just beating me.
Comment: sorry but assistance by mail is not possible and even a full tutorial here is offtopic.There's a help page suggesting resources for beginners here https://blender.meta.stackexchange.com/questions/40/beginners-reference. Try stuff linked there. Btw, you add a face selecting vertices and pressing "F".
Comment: Since it seems you are an absolute beginner, I suggest you to follow some basic tutorial on the web and/or searching this site for answers to basic questions, like "how do I add a face?", or - if you don't find similar issues (I doubt) - post your own questions, but keep one question for one topic (so, post multiple questions if needed).
Comment: I just edited the answer, to add an animation sample of what you could easily do.
Answer: If i understood the question you want to spin 2 different png images.
Add a circle or any shape with 2 faces.
Add 1 image at front and other image at back with 2 different material applied to it.
With the circle selected Add animation to it.
Animation
With the circle selected add 1st key frame with rotation Pressing "I" key Rotation of 90 Repeat the process adding the key frame untill it make a complete rotation.
Maybe this is the final result with 2 images spinning


Can I negotiate my rent if it is a German company but they want me to relocate to another country?

Question: Can I ask the German company to help me with expenses of housing to be able to move if they need me in another country in Europe?
Comment: We do not know what your company is like or what kind of policies they have. Why not ask HR and see if they have something in place?
Comment: Not enough knowledge for a full answer but generally yes, if you're in a foreign country you get something to compensate for your expenses. I would consider rent such an expense. Unless of course you move to another country permanently, in which case you would need to renegotiate your contract with completely new pay, enough to cover your living expenses in that country.
Comment: Normally, you can expect your rent overseas to be paid, plus removals, plus a per diem for the first few months. I know form experience as a freelancer that my home tax office won't let me deduct foreign rent unless I also have a home in my home country. Your company _might_ take the same attitude; e.,g not pay overseas rent if you live with parents at home, but I doubt it. You should be fine to have those costs covered. ***BUT***, why not just ask HR?
Comment: Are you relocating to another location, or is this a temporary assignment? Is it expected that you would need to keep your German home in addition to housing in the new location, or are you just moving completely?
Comment: I am moving completely
Answer: Companies handle business trip expenses in one of the following ways :

The company provides the housing / ticket / food

You have nothing to do. This is legally considered tax free.

The company refund the expense

In this case, you should keep all justificative documents and get refunded back by your company for your expenses.

The company gives you a package for this expense

If you take your own car, your expenses are legally covered by 0.30€ per kilometer.
Food can be also covered by a package based on the length of your stay. This is free of taxes, again.
And if in doubt of how the company will handle a fee, the best thing might be just to ask them.

In case you are moving permanently, this is different. You need to renegociate your contract with the new location, including if appliable a different pay and other benefits the company might provide for relocation (company policy here, nothing legally granted).
In all cases, if the conditions aren't favorable, you can always decline a permanent relocation offer as any other renegociation of your contract.
Comment: The way I read the question, I thought the OP was relocating to another country, not just a business trip.
Comment: You might be right, i'll make a proper edit with the case
Answer: In addition to other answers, you also need to check your cost of living elsewhere. For example, if you move to London you might be in for a shock.
If you ask your company what they are paying and you don't fully agree, update your question here.


SVG as graphics template?

Question: I need to create graphics for documentation, e.g. different functions of soft-keys or pin assignments for embedded systems with different firmware. My first thought was to use an SVG template, i.e. comfortably create the basic graphic with e.g. Inkscape and then use some XML library to set/replace respective strings for labels automatically. The SVG then can be embedded or rendered to any other format required.
I would like to know other ideas, or if there is some sort of standard method of doing this.
Answer: SVG is just XML, hence is fairly easy to generate.
You can easily generate SVG using XSLT: http://www.carto.net/papers/svg/samples/xslt/
Many programming languages provide efficient APIs for manipulating XML, which can also be applied to generate SVG. For example, I have had good success using Python and the lxml library.

SVG as graphics template?


Run Sharepoint Audit Log Reports for User Group

Question: Cannot find a way to run audit log reports for user groups. There is User picker in Custom Report wich allows selection of Groups also. But errors (with "User Not Found" message) when you run the report with Group selection.
Is there anyway to run Audit report on Sharepoint 2013 server for specific User Group?
Thanks in advance for any information.
Answer: I don't think it's possible to run audit log report for specific user group in the SharePoint 2013 server.


Fitting an exponential distribution to data and finding third quartile problem

Question: I have a data-set with range of 0 to 1. I'm fitting a distribution to it in MATLAB using fitdist(Data_set, 'exponential'). I want find third quartile with log(4)/λ . When I calculate this, the result is 4.28738As i mentioned my data set range is between 0 and 1. why this value is bigger than maximum of my data range? How can i solve this problem? I think this is from tail o exponential distribution.
Answer:
I have a data-set with range of 0 to 1.

The exponential distribution seems not to be the right model since this distribution has support on the positive real line. This is, you are fitting a model that assigns positive probability to sets of values that are unreasonable in your context.
The most popular distributions with support on $(0,1)$ are the Beta distribution and the Kumaraswamy distribution. If you fit one of these, then you will get a quartile in the right range.
http://en.wikipedia.org/wiki/Beta_distribution
http://en.wikipedia.org/wiki/Kumaraswamy_distribution
fitdist(Data_set, 'Beta')
betainv(P,A,B)

Comment: Thank you for answer. I searched for quartiles of beta distribution but i didn't find something like exponential distribution. How can I calculate quartiles using `a` and `b` parameters of beta distribution?
Comment: @user2991243 For the beta distribution the quantile function is, unfortunately, not available in closed-form. However, you can approximate it numerically using  MATLAB.
Comment: How can I run this code? I think this isn't for MATLAB ! thanks.
Comment: @user2991243 I think I just found it: it is [betainv](http://www.mathworks.co.uk/help/stats/betainv.html).
Comment: Can you prepare some sample code for using it in your main answer? thanks.


DataSet v/s Database

Question: While designing applications it is a very good practice to have all the business logic in one place. So why then we sometimes have the business logic in stored procs? Can we fetch all data from the DB and store it in a DataSet and then process it? What would be the performance of the app in this scenario?
Answer:
So why then we sometimes have the business logic in stored procs?

because sometime you need to do some processing before returning the data to the client, it would be wasteful to return a bunch of rows when you only need a subset. Some complex things are also easier to do in a stored proc when you have to involve temp tables  or linked servers for example
Comment: This is especially important in cases where you only want to work with aggregated data in the business logic.
Answer: Think of this basic example and it should answer your question:

If you had a database with GB's of
  data across a bunch of tables and you
  wanted to just get a simple customer
  record and join their orders, would it
  make sense to bring back to the client
  app or web server a GB of data to just
  get the 1KB you are actually looking
  for?

You want to minimize the amount of data being passed across to your application layer.  You also want to let the processing of that data be done in the fastest possible place.  Storing it in a dataset will not give you indexes and full text search options etc.  There is a reason we use databases for storing and retrieving data or else simple flat file that we load at startup into memory would be all that is needed.  If your app and data is small then this could be an alternative but in most cases it's not.
Answer:
So why then we sometimes have the
  business logic in stored procs?

I guess the processing should be done, where it is more meaningful.
For example, if your application has some process for which it needs less input from application & more from database, it is better done at database level.
It also depends on things you are trying to do & support for such things at database level.
example: usage of regular expressions or mathematical functions.

Can we fetch all data from the DB and
  store it in a DataSet and then process
  it? What would be the performance of
  the app in this scenario?

I don't think it makes sense to have all the data from DB into application memory.
The answer depends on how much is the data? does it change often? how does your application behave, if the data changes in the database?
In general, if you have some kind of static data, it is ok to have it in application memory & not otherwise.
Answer:
So why then we sometimes have the business logic in stored procs?

Another important reason is security. You might want to monitor access (especially write access) to data by implementing code in stored procedures. This way all access to data is tunneled through a stored procedure and suspicious access can be prevented
Answer: Both patterns exist.
If you need to do serious math and string manipulation or matrix math, you might end up pulling a good deal of the db into memory.
If you doing work that has a solution that can be solved with join and where clauses, then SQL is the appropriate place for that, even if one could make a philosophical argument that it could be categorized as business logic.  Moving that set based logic into a middle tier would likely lead to the re-inventing of the relational database in the middle tier and it wouldn't be done well!
When the number of rows is very small (and always will be), then it doesn't really matter.  SQL is a rather impoverished programming language compared to C# or java when it comes to unit testing, tooling support, etc, so if you have 100 rows in your database (and never will have much more!), then by all means, feel free to put those into some in memory data structure-- although even there, a database will still be more efficient and less buggy in areas like sorting.

DataSet v/s Database


Work required to change an object's speed in different reference frames

Question: Let $\vec s$, $\vec v$, $\vec a$ and $\vec F$ be displacement, velocity, acceleration, and force functions of time $t$. With respect to a absolute reference frame, such that $\vec v = \vec 0$ at $t = 0$, we can derive the kinetic energy of a particle of mass $m$ as below:
$$
\begin{align}
E_k & = \int \vec F \cdot \vec {ds} \\
  & = \int \vec F \cdot \vec v\; dt \\
  & = \int m \vec a \cdot \vec v\; dt \\
  & = m\int \vec a \cdot \vec v\; dt \\
\end{align}
$$
solving the integral:
$$
\begin{align}
\int \vec a \cdot \vec v\; dt\; & = \vec v\;\cdot\int \vec a\;dt\; - \int\left(\vec v\,'\;\cdot \int \vec a\;dt\right)\; dt \\
 & = \vec v\; \cdot \vec v\;- \int \vec a \cdot \vec v\; dt \\
\implies \int \vec a \cdot \vec v\; dt\;& = \frac {\vec v \cdot \vec v}{2} \\
\end{align}
$$
Thus:
$$
E_k = \frac {m\;(\vec v \cdot \vec v)}{2}
$$
now let us say at some $\Delta E_k$ is the change in kinetic energy as velocity changes from $\vec v_1$ at $t_1$ to $\vec v_2$ at $t_2$ (that is $\vec v(t_2) = \vec v_2$).
Integrating from $t_1$ to $t_2$ we get what we expect:
$$
\begin{align}
\Delta E_k & = \int_{t_1}^{t_2} \vec F \cdot \vec {ds} \\
& = m \int_{t_1}^{t_2} \vec a \cdot \vec v\; dt \\
& = m \left[\frac {(\vec v_2 \cdot \vec v_2)}{2} - \frac {(\vec v_1 \cdot \vec v_1)}{2}\right] \\ \\
\Delta E_k & = \frac {m\; \left(\vec v_2 \cdot \vec v_2 - \vec v_1 \cdot \vec v_1\right)}{2} \\
\end{align}
$$
So far so good, now I try to get the same answer using a different line of reasoning. Let us shift to a inertial frame with velocity $\vec v_1$ with respect to the absolute reference frame above. Now $\vec v_2$ is equal to $\vec v_2 - \vec v_1$ in this new frame of reference and at $t = t_1$ velocity is $\vec 0$. So $\Delta E_k$ is:
$$
\begin{align}
\Delta E_k & = \frac {m\;(\vec v_2 - \vec v_1) \cdot (\vec v_2 - \vec v_1)}{2} \\
& = \frac {m\;(\vec v_2 \cdot \vec v_2 + \vec v_1 \cdot \vec v_1 - 2\vec v_1 \vec v_2)}{2} \\
\end{align}
$$
this is obviously not equal to:
$$
\frac {m\; \left(\vec v_2 \cdot \vec v_2 - \vec v_1 \cdot \vec v_1\right)}{2}
$$
where did I go wrong here? What am I missing? Here is a similar question, but there we have a plane of some mass $M$ to account for energy difference.
Comment: What is an "absolute reference frame"?
Comment: According to the link "Even within the context of Newtonian mechanics, the modern view is that absolute space is unnecessary. Instead, the notion of inertial frame of reference has taken precedence," Why are you applying a concept which appears to be non mainstream physics?
Comment: @BobD basically a reference frame that is arbitrarily selected to represent some global inertial frame. [link](https://en.wikipedia.org/wiki/Absolute_space_and_time)
Comment: I put that link to give an idea only, "absolute frame" in the context of this problem it is a sort of global intertial frame, no different from other frames other than the idea that we chose it to be global aka "absolute". *This choice is arbitrary*. Also I don't think this affects the question.
Comment: So it's just a preferred (for the purpose of observation) inertial reference?
Answer: The simple answer is, that energy depends on the system you are in. In your second frame the work done to get a mass from 0 to  v (which is seen from outside as v2) is less than the work you do  on the first frame of reference. So you have to change your integral in the new system since you would not know about v1.
same with potential energy , E=mgh sometimes you use the door of your room as h=0  sometimes the tabletop or any other hight, so you do not even change your frame of reference.
Answer: When you change between two reference frames that are in relative uniform motion, the absolute value of the kinetic energy and the value of the work of a force may change (and thus the difference of the kinetic energy between two states of the system), but the theorem of the kinetic energy holds in both reference frames, as you may expect since classical physics is invariant to Galilean transformations.
Computations in your example.
Maybe you forgot to change the coordinates in the work integral.
$\displaystyle W = \int_{1}^{2} \mathbf{F} \cdot \mathbf{v} \, dt = \dfrac{1}{2} m |\mathbf{v}_2|^2 - \dfrac{1}{2} m |\mathbf{v}_1|^2 = \Delta K$
The second observer measures velocities $\tilde{\mathbf{v}} = \mathbf{v} - \mathbf{v}_0$, and accelerations $\tilde{\mathbf{a}} = \mathbf{a}$
$\displaystyle \tilde{W} = \int_{1}^{2} \mathbf{F} \cdot \tilde{\mathbf{v}} \, dt = \int_{1}^{2} m \tilde{\mathbf{a}} \cdot \tilde{\mathbf{v}} \, dt = \dfrac{1}{2} m |\tilde{\mathbf{v}}_2|^2 - \dfrac{1}{2} m |\tilde{\mathbf{v}}_1|^2 = \Delta \tilde{K}$
The difference between the work evaluated by the two observers is
$\displaystyle W - \tilde{W} = \int_{1}^{2} \mathbf{F} \cdot \mathbf{v}_0 \, dt = \int_{1}^{2} m \mathbf{a} \cdot \mathbf{v}_0 \, dt = m ( \mathbf{v}_2 - \mathbf{v}_1) \cdot \mathbf{v}_0 = m ( \tilde{\mathbf{v}}_2 - \tilde{\mathbf{v}}_1) \cdot \mathbf{v}_0 = m \Delta \mathbf{v} \cdot \mathbf{v}_0$,
and the same holds for the difference of the kinetic energy difference, that reads
$\Delta K - \Delta \tilde{K} = \dfrac{1}{2} m |\mathbf{v}_2|^2 - \dfrac{1}{2} m |\mathbf{v}_1|^2 - \dfrac{1}{2} m |\tilde{\mathbf{v}}_2|^2 + \dfrac{1}{2} m |\tilde{\mathbf{v}}_1|^2 =$
$\qquad \qquad \quad = \dfrac{1}{2}m(|\tilde{\mathbf{v}}_2|^2 + |{\mathbf{v}}_0|^2 + 2\tilde{\mathbf{v}_2} \cdot \mathbf{v}_0 - |\tilde{\mathbf{v}}_1|^2 - |{\mathbf{v}}_0|^2 - 2\tilde{\mathbf{v}_1} \cdot \mathbf{v}_0 - |\tilde{\mathbf{v}}_2|^2 + |\tilde{\mathbf{v}}_1|^2) = $
$\qquad \qquad \quad = m (\tilde{\mathbf{v}}_2 - \tilde{\mathbf{v}}_1) \cdot \mathbf{v}_0 = m \Delta \mathbf{v} \cdot \mathbf{v}_0$.


Use XML Based Sitemap and/or Static Page Sitemap?

Question: I have a question about which sitemap to use - XML based that is sent to Google Search Console or static HTML based sitemap that is added to the website footer.
If you search "dump trucks for sale", you will find this result in the third position:
https://www.commercialtrucktrader.com/Dump/trucks-for-sale?category=Dump%20Truck%7C2000609
Our website uses faceted navigation to filter inventory results, like the Commercial Truck Trader website example I posted regarding a search query.
I see the Commercial Truck Trader website has a sitemap link added to their footer. This is a static HTML based sitemap that can help the user navigate parts of the website.
Do you think the search query "dump trucks for sale" is showing the Commercial Truck Trader website in the third position on a serp from using a static HTML based sitemap that is added to the website footer, or from an XML based sitemap that is sent to Google?
Answer: Sitemaps have little to no effect on SEO whether they are XML or HTML.  Sitemaps can help get Googlebot to crawl all your pages but they don't usually help Google decide to index the content, or rank the content better.   See The Sitemap Paradox.
HTML sitemaps were once popular for SEO, but have since been largely supplanted by XML sitemaps.  When I've had HTML sitemaps on sites I found that users rarely click on them, and when a user does get to them, they rarely find what they are looking for and click to another page.   Furthermore, HTML sitemaps pages are low quality. Search engines are not likely to index those pages, nor do they pass much link juice through.   These days, HTML sitemaps are more likely to hurt SEO than help it.   XML sitemaps don't have the usability problems of HTML sitemaps.  So while the are unlikely to help SEO much, XML sitemaps won't hurt your SEO either.
It is difficult to divine exactly why a specific page is ranking the way it is for a specific query.   It usually boils down to a combination of the top ranking factors:

Reputation:  The site and page have external links and other signals that Google uses to judge the site as reputable.
Authority: Google recognizes the site and its authors as experts in their niche.
Relevancy:  The page uses the search words or synonyms the right amount (not too much, not too little)

There are hundreds of signals that go into Google's ranking algorithm, so figuring out which one are dominant in any specific case is pretty close to impossible.   However, the use of sitemaps is unlikely to be a ranking signal that makes much of a difference.


NTFS compression and RSync

Question: I currently have a hard drive that I backup using RSync. I do weekly; monthly snapshots. I would like to compress some of my hard drive using NTFS compression. How would that affect my future snapshots? I am not clear if my future snapshots would use hard links the same way or it will create an entire new backup.
Answer: When a filesystem provides compression it is usually intended to be transparent, so that there should be no difference between the original file and a compressed version, apart from some meta-data such as the actual number of physical blocks used. This would seem to be the case with Linux NTFS-3g.
By default rsync only compares timestamps and sizes of files to decide if they are unchanged.
Note, only new (i.e. different) files will be compressed.
Answer: Do you really need to use NTFS compression?
Maybe will be better to compress with .tar.tgz using --rsyncable option. It will only send the differences of .tar.gz and will save network bandwidth.
If you really need more compress level, you can use gzip -9. And if you really need save more space, you can use rdiff-backupt to save only the differences (you have to preserve original file to recover). I do not recommend rdiff-backup because if you lose original file you will be in trouble.

NTFS compression and RSync


How to load pages which are not intregrated in ACL of cakePHP

Question: I have implemented ACL using cakeDC plugin.
Basically i want to make an app where everyone can view all pages. Only register people can view admin panel. Currently My app loading Login page initially and after login i can view the content as i have add the bellow code into App controller.
class AppController extends Controller
{
    public function initialize()
    {
        parent::initialize();

        $this->loadComponent('RequestHandler', [
            'enableBeforeRedirect' => false,
        ]);
        $this->loadComponent('Flash');

        $this->loadComponent('Acl', [
            'className' => 'Acl.Acl'
        ]);
        $this->loadComponent('CakeDC/Users.UsersAuth');
     }
}

Now only one path is excepted int the routes.php
$routes->connect('/', ['controller' => 'Articles', 'action' => 'index']);
My question is how can i load other Pages, Action,methods before ACL occurs?
Answer: In your Controller you make a function like this. This function can't include in ACL
public function beforeFilter() {

    $this->Auth->allow('controller' => 'Articles', 'action' => 'index']);

}


Ubuntu 18.04 running slow

Question: I've shifted to Ubuntu 18.04 LTS from 12.04 LTS recently. It runs unusually slow.
Slow boot, logout and power-off processes; window selection/move a couple of seconds after click in it/mouse movement; occasional freezes, slow site loading, need to click on 'Next' button and not taking the command by Enter key after password on more than one site... are some of the symptoms.
What could be wrong?
18.04 LTS, GNOME 3.28.2, 64-bit, Pentium(R) Dual-Core, CPU firstname.lastname@example.com GHz x 2, CPU1 at around 24%, CPU2 at around 30%, Memory 83%, SWAP 46%. Thanks for participating.
Comment: How much RAM your PC has? It seems that in idle state you memory is occupied by 83%.
Comment: CPU is definitely higher then I would expect for an idle system, 46% swap is a sign of not enough memory. Have you checked `top` to see what is using cpu and memory?
Comment: > Gravemind RAM 4GB
Comment: > Eelke 'top' ??  12.04 was much faster though!
Answer: For such old hardware from my personal experience on about 60 similar machines I can recommend to use normal traditional and fast desktop called MATE DE.

You can install it with sudo apt install ubuntu-mate-desktop^ and then select its session from login screen.
And of course consider to buy more RAM.
Removing some Snap applications may save some boot time too.
Answer: I realise this is an old thread but I recently had the laptop slow to the point of being unusable after a two stage dist. upgrade, 14.04>16.04>18.04. 16.04 was OK but 18.04 was too slow.
The condensed story...the giveaway was continuous noise from the HD and an app called baloo_file-extr which I'd never seen before. A few searches told me it was kde/dolphin related, strange, I'd never installed dolphin on this machine. They probably come in via other kde apps such as digikam. I completely removed both dolphin and baloo freeing 65mb. It took a reboot but now performance is back to what I expected.
I hope this helps someone else.
Another lesson learned, after considering the amount of time to complete each upgrade, and the cruft remaining, I should have "bit the bullet" and done a clean install of 18.04 and take the opportunity to reconsider what apps I really needed to install.

Ubuntu 18.04 running slow


Unable to load Landsat 8 images to ArcMap Mosaic

Question: I work in 10.7.1 and have an issue loading Landsat 8 TIFs to a new Mosaic.  I used the New>Mosaic Dataset.  I set the geodatabase as the output location, name the mosaic dataset, give it the coordinate system and choose a product definiton of Landsat_8BANDS.  Seems to work. I then use the option in the catalog to 'Add Rasters'.  I have a download location where all my TIFF images are stored and selected the XML file....fails to load...no rasters found....then I tried the workspace option and that failsed. I then selected the 7 bands of interest from the pile of files from Earth Explorer.  That fails.  One error message was 8004250. I also get 80042019. Looked all over for how to load mosaics with Landsat 8 OLI images....
Answer: It might be because the product definition of 8 bands doesn't match the number of bands (7) you want to add. Try choosing that product definition then deleting the one band you aren't using so the number of bands match.
You could also try using the Mosaic to New Raster tool instead, where you don't have to create an empty mosaic before adding the rasters.
Comment: Thanks. I decided to use the combine bands tool worked well. I still need to use mosaic though so I will keep trying. Found a great way to save space on ndvis in the process.


equality of functions between sets

Question: Denote $E$ and $F$ to be sets and $f:E\longrightarrow F$ a function and $\Gamma=\{(x,y)\in E\times F| y=f(x)\}$. I read that two functions are equal if and only if the have the same $E$, the same $F$, and the same $\Gamma$. I thought that equality of two functions does not depend on the set $F$, we can just take any set containing the image of $f$ and we still have the same function. Can we say that two functions are equal if and only if they have the same domain and the same graph (without mentionning the set $F$)?
Answer: It depends on convention. Some just take a function to be a set of ordered pairs such that no two distinct ordered pairs have the same first component. In that regard, a function is its graph, to a certain extent, so functions are indeed equal if and only if they have the same (domain and) graph.
For some, the codomain is a characteristic of the function itself--so, for example, surjectivity becomes a property inherent to a given function (as injectivity always is)--and in such cases, all three must match to have equality.

equality of functions between sets


Ever looming shadow

Question: If I'm not mistaken the reason the moon eclipses the sun is because the ratio of distance to size, in regards to the moon and sun, is 1:1. And is it not also true that the reason we only ever see one side of thre moon is due to the fact that the moon is tidally locked to the earth? Now, given the above two are correct, would it then not be possible to have a configuration of moon, star, and exoplanet such that there would be a permanent eclipse on said planet?
Comment: do you mean the Lagrange points?
Comment: @AdrianHoward Essentially yes lol
Answer: The coincidence of moon and sun is not perfect, and due to the varying distances of earth observers to the moon, often the moon is smaller than the sun.
  https://skycalendar.com/tutorial/angulardiameter.html
The coincidence of their visual size is not necessary for there to be eclipses, the earth is visually far larger than the sun when seen from the moon, and creates eclipses on the moon, for instance. To get eclipses, the planetoids must be equal to or larger in subtended angle than their star.
Tidal lock between planetoids is not critical to your question, but you are inferring from that -- that a planetoid pair rotation could be slowed to the point that it locks to its orbital year.  The answer is no -- for the planetoid orbital period to match is stellar orbital period, the two radii would have to be roughly equal.  This would require, among other things, for the stellar object to be a neutron star or back hole, so not really any radiation to "shadow".
But also, at a radius where the centroid of the two is at equal distance to the stellar object as the separation between the planetoids, then the actual orbital distance between the planetoids and the stellar object would be 3x.  The cg of the closer of the pair would be at 1/2 the radius of the joint cg, and the further would be at 1.5X the radius of the joint cg.   A 3x difference in planetoid orbital distance would require them to be orbiting at significantly different velocities to avoid orbital decay, breaking their orbital coupling to each other.

Ever looming shadow


Firewall get slow download some CSS and JS files

Question: Our company website is hosted on our infrastructure and external user can access it OK.
However, when I try to access from our intranet, some CSS and JS files always take exactly 2 minutes to download, blocking site load until completely download, and it happens always with the same files. Even I add the entire URL of them in the firewall's whitelist, this behavior is the same.
If I access the file, and I could reproduce this scenario (see this image).
What do I need to setup in the firewall to resolve this problem?
Answer: Some tips for faster loading CSS/JS

Wherever possible try to load your JS files just before your closing  tag. This makes it so the page can start displaying before your JS finishes loading.
Use async JS loading. If the JS is a file that takes a very long time or is a big download it might be a candidate for loading async instead. Here's some info on how to use optimizely to do asynchronous JS loading. If that JS is needed right away you still have to solve that issue but at least you could use async in the meantime while you work out the details.
Put public assets in your root web directory
Minify your CSS and JS code where applicable
Serve assets over a CDN (Content Delivery Network) so the files load from someone else's servers, which most typically is faster and more reliable. If you're using a common library asset like jQuery, you can find them already uploaded to a CDN and freely usable. Just insert something like this just before your closing  tag... . Here's where I got that CDN link info.

Also, here at least one StackOverflow question that might be helpful.


How do I use the 32-bit version of Internet Explorer 11 on a 64-bit OS?

Question: I need to run the 32 bit version of Windows Internet Explorer 11 for a specific app. But my OS is 64 bit. How do I specifically do this? Is it even possible? Thank you!
Answer: Your OS, being a 64-bit system, is able to install and execute both 32-bit and 64-bit applications.
By default, Internet Explorer is executed using its 32-bit version.
Usually, the paths of Internet Explorer are:

32-bit: C:\Program Files (x86)\Internet Explorer\iexplore.exe
64-bit: C:\Program Files\Internet Explorer\iexplore.exe
Answer: IE 11 is 64 bit framework, on Windows 7 64 bit if you dont enable Enhanced Protection Mode in Advanced Settings>Security it will always run in 32 bit mode
Comment: @DavidPostill: doesn't work for me.  Unless that setting is changed, choosing "Internet Explorer (64-bit)" launches 32-bit IE.  (Actually both a 64-bit process and a 32-bit process are running, but it seems to be the 32-bit one that I'm actually interacting with.  For example, without turning on that option, I couldn't use the 64-bit Java plugin.)
Comment: ... and if I *do* turn on that setting, I get the 64-bit IE even if I launch the 32-bit one.
Answer: Win 7 uses the 32-bit version of IE by default. However, if you want to be absolutely sure, just create a shortcut and add C:\Program Files (x86)\Internet Explorer\iexplore.exe as the program to call.
Answer: If you've executed "C:\Program Files (x86)\Internet Explorer\iexplore.exe" and still don't see 32-bit iexplore process in task manager, check your IE plugins.
In my case there was iMacros 64-bit plugin installed.
Somehow it prevented IE32 from running end started IE64 instead.
After uninstalling the 64-bit plugin I was able to start IE32.


What is the difference between ISO and DMG images?

Question: What is the difference between .iso files and .dmg files? Why are they used differently?
Comment: https://en.wikipedia.org/wiki/.iso
Comment: https://en.wikipedia.org/wiki/.dmg
Comment: Please ask different questions in different posts. Either ask about the differences of the formats *or* how to mount them in a Windows VM — those are two entirely different things. I removed the second part since your current answers just relate to the first question.
Comment: point taken. will do
Answer: ISO files are files containing a disk with a ISO 9660 filesystem. This is a filesystem optimised for read only access on a slow disc. (Specifically it was designed for a CDROM).
ISO files are limited in quite a few ways. E.g:
You can not write to an ISO filesystem. (You can create a new FS though)
You could not create directories more than 8 levels deep.
You could only use file names following the DOS 8.3 standard.
Note that not all ISO files follow this behaviour. Many programs allow you to write file names with a length of 32 characters, which will work in many cases, but not all. (e.g. a disk with such filenames will fail to work with DOS). There are also several extentions to ISO 9660, including the Rock ridge  and the Joliet extensions.

DMG files are disk images.  They are treated by OS/X as real disks. You can read and write to these.
Comment: That is because OS/X understands how a ISO file works. For windows you would need some software which understands loop-back and iso9660. or you could just use a program such as Deamon tools, alcohol 52% or Magic disk.
Comment: ok, so say i have a .iso i want to mount on my Windows VM, how would i do that? in OSX i can just double click it, but windows XP doesn't even recognize the file type.
Answer: An ISO is a bit-for-bit image of an ISO-9660 (CD-ROM) disk. You can write it directly to a CD and use it directly.  A DMG is typically the Universal Disk Image format, kind of like an image of a hard disk partition. They have different layouts, but are similar in that they hold an image of a file system with files accessible after mounting by the operating system.


Are there any uses of the empty tuple in Python?

Question: Is there any other purpose (besides being there because it needs to be) the empty tuple may have? Or: what would you use the empty tuple for? If anything. I just can't find an answer (well, a positive answer as in: "yes, there is"), please help me out with getting this question out of my head. "for testing if another tuple is empty" is not an acceptable answer since we should use 'not' operator for this.
Comment: other than making the python tuple definition mathematically correct. Well, almost.
Comment: "any other purpose"? Other than what?
Answer: Here's when.
<code>def tuple_of_primes_less_than( n ):
    if n <= 2: return ()
    else:
        x, p = set( range(2,n) ), 2
        while p <= max(x):
            for k in range(2,int(2+math.sqrt(p))):
                x.discard(k*p)
            p += 1
        return tuple( sorted( x ) )
</code>
Comment: clearly not. your question should be "why wasn't obvious?" I guess I got tricked by both its immutability and emptiness :)
Comment: Bad example. Collections of objects of the same type should be lists. See, for example, [**this great answer**](http://stackoverflow.com/a/1708603/241039) (it's what I found now, but I remember seeing the same thoughts in a reputable source).
Comment: @adiru: wasn't that obvious **before** you asked the question?
Comment: now that I act as a consumer of your function code, it's obvious.
Comment: I have to agree with @oleh-prypin. You want to have all primes, so if there are no primes, you return a list of size 0.
Answer: You might want to store the arguments to a function as a tuple, without knowing the structure of the function in advance. If it happens that the function you need to store the parameters for takes no parameters, you will need to store an empty tuple.
This is just one among many examples of why it's generally better not to question the existence of edge cases, just because we can't think of a use for them. The need to support the edge case invariably crops up before long.
Comment: I'm not questioning its existence, the empty tuple is mathematically correct. I'm just wondering how different people may have used it.
Comment: "might want to store the arguments to a function as a tuple"?  They **are** a tuple.  `*args` **is** a tuple that may be empty.
Comment: @Lennart: "Edge" doesn't imply infrequency. I just means that it's at the outer edge of some range. This kind of situation gets a special name because often such cases cause breakdowns in algorithms or the underlying mathematics; e.g., computing the average of a list of numbers is fine until the list is empty; thus, the *edge case* `len(L) == 0` causes problems when you want an average.
Comment: @S.Lott: The point of interest is the fact that you might want to store them, not the fact that they are a tuple (which I already knew). But now that you mention it, the fact that function arguments are passed as a tuple is — on its own — a case of sometimes needing a zero-length tuple.
Comment: Marcelo is right. Think of an apply() with args parameter being required instead of optional. You'd use an empty tuple.
Comment: This is not even an edge case. I use empty tuples quite a lot.
Comment: @Marcelo: +1 for the example and for the advise. @Lennart: I made it an edge case because of how I built my question, although you must be right :)
Comment: For the use case that you describe, why not use an empty list instead? Something to do with pickling those arguments, or somesuch?
Comment: @eksorto: I wouldn't use a list because function parameters are passed as tuples to [`apply`](http://docs.python.org/library/functions.html#apply). Storing them as a list is unnecessary and inefficient.
Answer: Tuples represent arbitrary sequences of values.  When you need to describe an empty sequence of values, you can use an empty tuple.
Comment: @adirau: That's like asking when you need an empty list or an empty string. Or a string with the contents "Floprzy". :)
Comment: probably, yes. or better, allow me to rephrase: "that's like asking when you need an empty immutable object" and leave the mutable ones outside of the question


How to detect incoming call is a forwarded call?

Question: I want to know if the incoming call is a forwarded call when my Nexus 5 is ringing. Is it possible?
Answer: Check out Forwarded Call Alert Free ROOT. It also has a paid version, and an XDA thread.
There may also be other apps that can do this that I may not be aware of.
Comment: Doesn't work on my N5


How do I spawn the Truffle?

Question:
I don't know how to spawn him. How do I do it?
Answer: As per the wiki, Truffle requires a vacant house built in an above-ground surface mushroom biome before he will move in. The world also has to be in hardmode (i.e., the Wall of Flesh must be defeated).
A mushroom biome can be artifically created by collecting a bunch of mud and placing it wherever you want the biome to be. Then take some blue mushroom seeds (found in natural mushroom caves underground) and plant them in the mud you just placed. It might take some time, but after a while the mushroom grass will spread to the rest of the mud and the biome will be complete. You can tell when the biome is finished when the screen darkens near the area and the music changes.
Comment: In addition to the world darkening, the background will change to a mushroom theme.

How do I spawn the Truffle?


ATMEL Xmega ADC Input impedance

Question: I need to read a 0-6V buffered analog signal from a sensor with the ATXMega256A3BU ADC. With an external voltage reference I can measure voltage level up to about 3V. I'm going to realize a voltage divider but I need some help in finding the correct equivalent resistance of the voltage divider ( R1||R2 ) that is the voltage divider output inpedence.
Atmel says that in the worst case the ADC input resistance Rchannel is 4.5k and the S&H capacitor Csample is 5 pF.
Answer: The ADC characteristics can be found in the datasheet

There is a specific application note from Atmel for Xmega ADC Using the Atmel AVR XMEGA ADC.
If you refer to section 1.8 there is an explanation of how the output impedance of the circuit that feeds the ADC affects the conversion speed:

The lower the sampling frequency the higher output impedance you can use for the  divider. If you want to use a universal value that can work for a wide range of sampling frequencies then you can go for about 1k or so.
Comment: Thanks, I need to observe a slow signal so is not a problem to have a low sample rate. I don't know if there are critical values for the input impedance of the ADC. On the application note i read that an high impedance input can afflict the measure because of the high time of charge. With a low impedance we have a higher power consumption. But what values are considered high or low?
Comment: And.. You suggested me a voltage divider with two 1k resistors or a voltage divider with R1||R2 of about 1k? The source impedance is R1||R2.
Comment: @Maicol The x axis of the graph is the output impedance of the divider and as you can see for about 1k (1E+3) you can use up to 2000ksamples and get correct results (proper charge of the S&H capacitor) but if you don't need that high frequency you can go with much higher impedance. If you set the impedance to 100k then you can go up to 100ksamples.
Comment: can you confirm me that in a voltage divider the output impedance is R1||R2? Thanks for your patience!
Comment: @Maicol Yes, the impedance is R1||R2

ATMEL Xmega ADC Input impedance


Travelling outside the US, have an H1B valid for another 2 years, but passport expires in 5.5 half months when I'm back

Question: I have a French passport with a valid H1B visa stamped and work in the US. The H1B is valid until 2025. I'm flying for work from the US to France on October 1st, and when I fly back my passport will have slightly below 6 months of validity -- 170 days instead of 180 days. It's also tough to get a new passport on time for October 1st. Will I be denied reentry into the US on October 5th?
Answer: The 6-month rule does not apply to citizens of France. See this PDF.
Comment: Whilst this is true, the OP's I-94 expiry date will most likely be linked to the passport expiry data, which could cause all sorts of other issues...
Comment: Thank you leaderboard . @Doc That's true and that was already the case (I94 end date) since my H1B has a three validity. Canada gives visa free entry to French citizens (on ETA) and so going up and down is quite easy.
Answer: A nonimmigrant is inadmissible under 8 USC 1182(a)(7)(B)(i)(I) unless they have a passport valid until 6 months after the end of their period of admission. What this means in practice is that for people with passports from countries not on the "6-month club", their passport must be valid for at least 6 months at the time of entry, and the admit-until date on their I-94 will be no later than 6 months before their passport expires. For people with passports from countries on the 6-month club, their passport must be valid for any length at the time of entry, and the admit-until date on their I-94 will be no later than their passport expiration date.
Since you are using a French passport, and France is in the 6-month club, you can enter the US with a passport of less than 6 months of validity left. However, note that you will be admitted on your I-94 to no later than your passport expiration date. If you wish to stay longer than that, either 1) your employer would have to file another I-129 for H1b extension, or 2) you would have to leave and re-enter the US on a new passport (you would not need to get a new visa on the new passport, since a valid US visa in an expired passport can be used in combination with a valid passport from the same country).
This is as far as the US government is concerned. It is possible that the airline and/or originating country may have stricter requirements for passport validity.
Comment: Thanks, seems the right answer indeed. I'll simply go up and down to Canada since I live just 4 hours  from the Canadian border. Entry into Canada is visa free (using ETA) for French passport holders.
Comment: @goingaround: If you go to Canada by land, you don't even need eTA


How can I make wp default gallery responsive?

Question: I want my WP default gallery to go from 4 columns on computer screens down to 2 on mobile devices.
Comment: Have you tried inspecting the element and using a mobile styling such as float:left;width:50%; for the individual columns?
Answer: You can try using css to control the visual layout.
I have tested on my dev server and this was successful.
<code> @media only screen and ( max-width: 320px ) {
      .gallery-item {float:left;width:50% !important;}
 }
</code>
what we have done is set the column to 50% the total container width when viewing on devices smaller then 320px. You can adjust this as you see fit.
Simply drop this styling into your themes css via your theme options page. If you do not have one you can also add it to the themes css stylesheet if you have admin access through Appearance > Editor.
Try it out and hope it helps.
Comment: awesome to hear. happy to help.
Answer: The secret to a responsive gallery is to not specify a column number.  This will make it display gallery items until the items spill to the next line.  Make sure gallery items are set to "display: inline-block."


How to Access a Shared Google Calendar

Question: I have installed both gnome-calendar and evolution and can access my google calendar from both. My wife has shared her google calendar with me and I can see it on my calendar when I access it in a web browser. But I cannot find how to access my wife's shared calendar in either gnome-calendar or evolution. Can anyone help me access my wife's shared calendar in either of these apps? P.S.: this is all triggered by the fact that the lightning extension for thunderbird is no longer available, so I am trying to find a usable alternative.
Answer: Found a way to get lightning back in thunderbird here, so I don't need gnome-calendar or evolution!!!

How to Access a Shared Google Calendar


Hinfinty Controller for TWO wheeled self balanicng robot

Question: I'm trying to implement a H-infinity controller in a TWO-WHEELED-SELF-BALANCING-ROBOT, already implemented LQR for the same in gazebo, where the control input was torque(used this selfbalancing robot gazebo model) , But when it comes to H-infinity i have two inputs to give to the system, one control input and another is disturbance input, Any ideas on how to give the disturbance input?
Comment: Can you please elaborate on your issue: What equation/algorithm you want to apply?
Normally you have to find a model of your plant for controller synthesis, having exogenous inputs (like disturbances) and the manipulated variables u. Don't expect that you find this "disturbance input" to the gazebo model. But maybe I just don't understand your question.
Answer: It seems you can use the nudge service where you can specify the force to apply and the duration of the nudge.


How can I see the Minecraft user names using NBTEditor?

Question: How can I find out the usernames if the player section just shows the UUIDs of the players, as seen in the picture below?
Is there any solution for decoding this?
Comment: Idk if this helps but if you look at any of the ones without "server_" at the front it has the Microsoft Account ID as `msa`, which I think might be the same as your XUID (not sure though)
Comment: It should also be noted that there would be no direct way to "decode" them, as it is a completely random ID. Let's say my name is "Bob" and my UUID was "29983..." it isn't like there's some converter that converts "Bob" to that UUID. It's a random code that is merely associated with the name in the case of XUIDs. But a UUID is always random and never correlates to a string. You would have to find what is associated with what.
Answer: I have an idea, but it is pretty tedious...
What I did was used scoreboard values, and using the scoreboard ID's to find the players ID's (that way you know like this play has "thismuch'money'" you can think, Oh, So-and-so has that much money!) then go to the players part in MCC, (just click on the subfolder called "players" and a list will come up. Scroll down until you find players that actually have health and hunger, and it will show on one of them the ID that you found with the scoreboard.
Or, if you know whats in their inventories you could look throught those, but thats even more time wastful......
Answer: Those codes (I am referring to the text after player_ or player_server_) are the UUIDs (unique identifiers) of the players.
On Bedrock Edition there seems to be no easy way of getting usernames from UUIDs, at least at the time of writing this answer.
On Java Edition, every Minecraft player has a different UUID which is a randomly generated string. This means that players can change their names multiple times easily.
To get the username of a player in Java Edition from the UUID I would recommend using NameMC (https://namemc.com/).
Comment: Why would the Java Edition UUID be needed? This is for bedrock


Dilemma on work done by gas in isothermal contraction

Question: Consider an ideal gas inside a cylinder undergoing reversible isothermal contraction. Now if we consider the forces acting on the gas inside the cylinder the force acting is $P_{ext}\cdot A$, however the gas inside the cylinder will also exert a force on the external gas equal to $P_{int}\cdot A$. Now as per Newton's third law there should be an equal and opposite force acting on the gas inside the cylinder which is equal to $P_{int}\cdot A$, now since it is reversible $P_{int}=P_{ext}$, therefore total force acting on the gas inside the cylinder is $2P_{ext}$.  But when we consider the work done on the gas we take only $P_{ext}$ and not $2P_{ext}$, why is that?
Comment: you are looking the wrong the force which internal gas exert $P_{int}.A$ on the external gas is only the reaction of external force $P_{ext}.A$
Answer: In thermodynamics, you always consider the work performed by one system on another. In your example, the external gas performs work on the internal gas (and of course you can always change your perspective so that the internal gas does the opposite of this work on the external gas). In considering the work performed by the external gas on the internal gas, the relevant quantities are $P_{ext}$ together with any losses to friction. Assuming constant $P_{ext}$, if the piston is moved a distance $\Delta x$ then the external gas will perform work $P_{ext}A\Delta x$ on the piston, and (depending on friction) some fraction of the energy will be transferred through the piston to system 2. Note also that the net work performed on the piston between the two systems is zero in the [isostatic]&&[reversible] limit (i.e. where $P_{ext}\approx P_{int}$).
Here are some other questions that may be useful to think about:

When $P_{ext}\neq P_{int}$ (i.e. the expansion is irreversible), where does the extra energy go?
How does the work done by the external gas on the internal gas change when a constant friction force is accounted for in the piston? What if there is no mechanical friction, but the piston has a large mass? (assume that any motion of the piston is slow enough for equilibrium to be maintained throughout)


Why is a kittel worn by Shat"z for Tal and Geshem?

Question: Besides looking for a source of the minhag of shat"z to wear a kittel for Tal and Geshem (I couldn't find it, and I have limited internet access where I am, now) what is the reason for it?
Comment: Probably because the nusach is incredibly similar to Ne'ilah. FWIW, MMA says that the sha"tz shouldn't wear a sargenes or kittel for those tefillot (man does it feel weird to type in Sepharadit, but that's what I've used for most of my MY posts, so I'll coninue)
Comment: @NoachMiFrankfurt "Probably because the nusach is incredibly similar to Ne'ilah. " In my ear, indeed it is similar, though, I can't quite appreciate that reason alone as being the reason. But, when I took *chazzanut* classes at Belz School (part of YU), one of the chazzanim who is also an expert on the history of tefilla was adamant about stating that one should not compare the Nusach of Neilah to Tal / Geshem or vice versa, knowing that many *chazzanim* make this "mistake". He said that the origin of the nuscha'ot are markedly different and convey different themes and emotions.
Answer: I asked my shul's chazzan about this. I received what I, personally, consider a "partial" answer, so I'll relay it, for now, and hope to add more as I discover more.
Geshem is given to us "conditionally" and at the time of Succot, we are "judged" for our worthiness for rain. Judges wear robes, so the kittel is similar to the robe that the judges wear.
The chazzan didn't explain Tal. So, this requires a bit more research.
Comment: If I remember correctly, judges in a _beit din_ indeed wear robes (they're not naked), but it's not a _kittel._
Answer: The נטעי גבריאל here provides the start of an answer albeit without any firm conclusions.
Whilst he only writes that some have the custom to do so (with a footnote that concludes that the reasoning behind the practise is somewhat vague) he adds that others do not do so citing from מנהגי וורמיישא possibly suggesting that it was a regional custom that spread.
However, I think it is more likely to be like some of the earlier comments that as it is a time of judgement we treat it in a similar fashion to Yom Kippur and the chazzan resultantly 'dresses' accordingly. In his last point he writes:

והמנהג לנגן הקדיש לפני תפילת מוסף בניגון המיוחד כעין ימים נוראים
And the custom is to sing the Kadish before the Mussaf service in the specific tune of that of the Days of Awe.

So it would seem that since this part of the service represents the request / judgement for Rain etc. we mimic the practise of Yom Kippur and it is therefore fitting that the person leading the service wears a kittel.


micro ros agent connectivity issue

Question: I'm working with an ESP32 module running Micro-ROS, and I need to connect it to a PC using Micro-ROS Agent. I've tried changing the agent IP from dynamic to static and disabling any firewalls that might be blocking the connection. The module successfully connects to Wi-Fi, ruling out any Wi-Fi issues, but it still isn't recognized by the Micro-ROS Agent. Any insights or suggestions would be greatly appreciated.
Answer: you could check for the firewall first. You need to enable udp first

micro ros agent connectivity issue