How to track orbit of an exoplanet?

Question: I was wondering if there is an established method to keep track of the orbit of an exoplanet assuming we know a - the semi-major axis of the orbit, e - the eccentricity of the orbit, and i - the inclination of the orbit. Can we track its position once a month?
Comment: What do you mean by "track".  Do you mean visually observe, or do you mean create a mathematical model that describes the orbit?
Comment: @James K I mean the seconf
Answer: To describe the position of an orbiting body you need 6 numbers.  There are different ways to do this:
You can give the position $(x,y,z)$ and velocity $(\dot x, \dot y, \dot z)$.  At a given time $t_0$, and then use Newtons laws to work out the position of the planet at any time in the future.
You can give the orbital parameters:

Eccentricity (the shape of the ellipse)
semi-major axis (the *size of the ellipse)
(inclination, Longitude of ascending node, argument of periapsis) The 3d position of the ellipse.  These depend on the particular choice of reference frame.  For exoplanets it is common to take the reference plane to be the the plane through the star and perpendicular to the line of sight from Earth. This means that many exoplanets have an inclination of about 90 degrees.
Mean anomaly at epoch (The position of the planet on the ellipse at time $t_0$)

And then use Keplers laws to work out the position of the planet at any time in the future.
So we can track them theoretically.
However determining these six values from observations is not easy, and in many cases we don't know all six at all well.  If we can detect a transit we know that the inclination is close to 90, and we might be able to combind transit observations with radial motion observations to get some limits on the other values.  Nevertheless, these six values can't be simply measured from the data.
For most exoplanets they can't be directly imaged (they are too close to the glare of the star, and to dim to be seen) There are a few exoplanets that can be tracked They are usually very large, warm planets that are far from their star.
cf. Transformation of Orbit Elements, State and Coordinates of Satellites in Two-Body Motion
Comment: https://onlinelibrary.wiley.com/doi/pdf/10.1002/9781118542200.app1  The "hard" part is finding the position of the planet on the ellipse in the plane relative to the periapsis.  The "easy" part is then rotating that ellipse to your coordinate system, that is basically a rotation in three dimensions, so is "ordinary" trigonometry, rather than weird things like the Kepler equation.
Comment: For most known exoplanets we do have one point of tracking per orbit... so maybe not directly as the OP ask, but still. The other parameters might follow from RV measurements
Comment: @James K Thanks! Any references on where to find a mathematical description that includes the inclination? All I found up t this point imply mpotion in a plane

How to track orbit of an exoplanet?


measuring power drawn from an inverter

Question: what could be the cause of this? The output power i get from my calculation after measuring AC current with a clamp meter and multiplying by 220v is not always close to the amount of load plugged
Comment: Is your loads pure 220V or are they a mix of 110V and 220V.   Also you may want to look at the wiki for AC Power, not every thing is pure values.
Comment: Get a Kill-a-Watt which is a $20 voltage measuring device,  and measure **each** of your loads individually.  Look closely at Watts, VA and power factor, As Ecnerwal discusses.
Answer: Welcome to Power Factor. Amps times volts only equals watts for loads that have a power factor of 1.0, such as a pure resistive heater or incandescent light.
Typical loads such as motors LED or florescent lights and most computer power supplies (though some newer ones are well-adjusted and may hit 0.99) have current that is somewhat out of phase with voltage. Some items are actually rated in VA (volt-amperes) rather than Watts, and that commonly reflects a non-unity power factor.
You may also have the simpler situation where you are reading a label with the maximum load and the actual load may be less than the maximum; or the "maximum load" may ignore a starting surge for a motor that may briefly be much higher than the label states for running load.
Comment: Note that with electronic loads, their low PF isn't just a function of I and V being out of phase -- without PFC, they draw *spikes* of current, leading to their low effective PF despite the spikes being in phase with the mains voltage waveform.
Answer: What kind of load? Many devices, motors in particular, draw different amounts of power when starting vs. once they are rumning, and circuits have to be rated for the higher number. Many others cycle between different modes: most household appliances would be examples of that. And if course circuits are rated for maximum permitted draw, so adding up the circuit breakers should result in z larger number than what is actually being used.

measuring power drawn from an inverter


How can I write a fictional mythology diary?

Question: I have always been interested in Irish mythology, especially Fionn Mac Cumhaill. I also like to write in journals. Is there a way of combining the two? In other words, say, for example, the life of Fionn Mac Cumhaill, but in diary or journal form. I also noticed that there are no dates in mythology. So how can I overcome this?
Comment: Appropriate events can always lead to people marking the years passed since a certain event. The Greeks besieging Troy, for instance, were aware of the time they were spending there. You could count in winters, or years of a monarch's reign. You only need a solid motivation for writing, which was not so commonplace. There I can't help, because I know nothing about Irish mythology.
Comment: Perhaps you could introduce a secondary character who idolises Fionn and believes in him from the start, trying to write down everything?
Answer: Ludi's comments are on the button. Every civilisation has it's own calendar. The calendar consists of the time passed since a significant event. 'Time' is measured by the number of occurrences of a recurring event.
Your time is measured as the number of times the Earth has revolved around the sun. However, it could be measure using any arbitrary method. Today's date could be stated as 1.800.452 - the number of time Old Faithful has erupted since Independence Day.
Examine some children's concept of time:
"We are going to Disneyland next Thursday."
"How many sleeps is that?"
"Nine."

So, to answer your question. Create any concept of time you wish. Some fictional civilisations have a concept of time which has no anchor. Events occur in the 'now', in the 'before' or in the 'after'.
Answer: One of the most common forms of dating in the pre-Christian era was by regnal dating. That is, events were recorded as occurring in such and such a year in the reign of king X. (For that matter, Christian era dating is actually regnal dating based on the reign of Christ as king.) The use of regnal dating would seem completely appropriate to the material in this case.
Answer: As @Ludi mentions on a comment, the big question is the motivation for writing a journal of one's adventures.
Correct me if I'm wrong but Fionn Mac Cumhaill is a warrior who leads a group known as the Fianna. Their adventures (for lack of a better word) comprise the Fenian cycle which is supposedly written down by the poet Oisín, who happens to be Fionn's son.
Looking at the setting above, it seems to me that the writing of a chronicle would probably be the best way of uniting mythology and 'journal', since some chronicles detail events day by day, just like a journal. Of course that requires eventful days.
If the writer is Fionn's son (or an assistant commanded by him), the motivation would be to transmit the glory of his father / lineage. Moreover, although some chroniclers were dry and boring, there were also chroniclers that brought events to life almost cynematicaly (I'm thinking of the Portuguese Fernão Lopes, 14th century, whom I know best).

EDIT
As for dates (sorry, I overlooked that question), I'd suggest going with months and days of the week. Avoid mentioning years altogether. It is easy to just reference that it was the time when King X ruled over Xland, or that something happened a decade after King Y's coronation / marriage / etc.
Comment: You are right about Fionn. He was indeed a warrior :) There are many legends told about one of the most famous one is the Salmon of Knowledge. Where he gained knowledge from burning his finger on the salmon.


Explaining raising dough

Question: I bought dough containers and would like to know a couple things: When I mix the dough do I put it in the refrigerator right away and can I seal it with the lid on or do I use seran wrap? When I take the dough out how long does the dough have to sit at room temperature? Do I shar it first?
Comment: You should follow the directions on the recipe you're making... There's no one answer to this for all types of bread.
Answer: Your question isn't as clear as it could be, but I'll try to answer what I think you're asking. You've bought a container specifically for making bread dough in and you have questions about it, right?
You asked if you should put your dough in the fridge right after making it. The answer is, it depends on what you're making. You can make bread where the bread never sees the inside of the refrigerator. What happens in this process is you're mixing together flour and water for your bread. The way you get your rise is with yeast. Yeast is a living organism. It feeds off of the bread dough and creates gases. These are trapped in the dough, creating small pockets which you see as rise.
There are different ways to achieve this. You have sourdough where you keep a single strain of yeast alive indefinitely. You leave these out on the counter when you're staring them or reviving them to make bread. However, you can store them in the refrigerator to retard their growth. Otherwise, you'd have to add new dough/feed every day. The other way is to add instant or active yeast, which come in a convenient package. These all work the same way, it's just about storage, speed, or flavor as to which you choose to use.
There are two reasons you could put your dough in the refrigerator. One is to slow the yeasts activity and cause a slower rise. It could be because of timing or it could be because of flavor. I have a pizza dough recipe and because of the families work schedule, I have to make the dough and leave it in the fridge for almost 24hrs, instead of the 4-6hrs it calls for. I've had the chance to make it both ways. When I stick it in the fridge for a few hours, it's a really good crust. However, when I leave it in for 24hrs, it has a sour quality reminiscent of sourdough. That's because as yeast uses up it's food source, it begins to produce alcohol. This is fermenting, similar to when making beer or wine. In those cases also, yeast feed on the sugars in the mash and turn it into alcohol.
So it's up to you and your recipe as to how long to refrigerate if at all. As for wrapping it, you should cover the dough whether you put it in the fridge or not. The reason is simply because you don't want it to dry out. You can either use a damp towel, saran wrap, the lid for the container (loose, not snapped on tight), or anything else you could use in the same way.
Just an FYI, as I mentioned in the previous paragraph, you shouldn't put anything tight fitting on your container and you should have a container at least twice the volume as your dough. You can eyeball that. The reason is that your dough will expand (rise) and if your container isn't big enough, you're going to end up with a sticky mess all over the place. I think you could imagine what would happen if you had a tight fitting or even a locked on lid on your container and the pressure built up as the yeast turned the sugars into gases. You're not going to have a good time.
When you bring dough out of the fridge you want let it warm up a little. If you're making something like sourdough, then you want to bring it out a minimum of 12hrs ahead of time and feed it. You'll wait till it's doubling in size before using it. With other dough's, it might not be long of a wait at all. Your recipe should tell you and after you make a few breads, you'll get an idea of how long it needs to come out of the fridge before use.
I hope this answered all your questions or at least helped you narrow it down for your next question.

Explaining raising dough


Are there any names a Pope can't choose?

Question: Now beyond the obvious - such as the fact that you can't select the name and monicker of a real Pope in the past, are there any specific regulations on the naming system?
Answer: Are there any names a Pope can't choose?
Although a pope is free to choose any papal of his desire, there would seem logic that any name chosen by a pope should not not be foreign to the Catholic Faith.
The basic rules for choosing a baptismal name would seem to apply here.
Canon Law states that names foreign to Christianity are not to be given to infants.

Can. 855 Parents, sponsors, and the pastor are to take care that a name foreign to Christian sensibility is not given.

Foreign names here simply means offensive to the Catholic Church, the dignity of the child and Christianity in general.
I guess Lucifer would be out of the question!
Pope John II (532-535) was the first pope to change his name, it was due to the fact that his given name
Mercury was that of a pagan Roman god and thus he was trying to avoid a scandal.
The pope Pelagius I (556-561) and Pope Pelagius II (579-590), on the other hand, both kept their given names which did not seem to either Pontiff to be a source of scandal considering the fact that the Church had just went through the Pelagian Heresy a century before! This heresy is named after its original heretic Pelagius (c.360-418).
Another way of looking at this is ask ourselves a rather simple question. For example: Should a pope change his given name if it were Apollinaris in light of the Apollinarism Heresy?
Yet the Church has both a St. Apollinaris (1st or 2nd Century) who predates Apollinarism and a St. Pelagius (912-984), who postdates Pelagianism.
There seems to be a distinction between the names of pagan gods and those of heretics. A close look at a list of Christian heresies shows us that several of the instigators of certain heresies had Christian names in one form or another. Even the names of Anti-Popes have not deterred the popes from using a particular papal name.
Comment: thanks for not just saying "Hitler" :)
Comment: @LukeHill - or "Damian"
Answer: According to the Catholic Answers article What are the criteria for a pope in choosing his new name?:

There are no official criteria, but a pope usually chooses to honor a predecessor or someone he admires.

As for restrictions, there are none, but

it is an unwritten custom that popes do not choose the name Peter. It is generally considered a matter of prudential judgment for popes not to invite comparisons between themselves and the pope Christ himself chose.

For more background, please see a parish article How do Popes Choose Their Names?

There is no canon law requiring that someone take a different name upon becoming pope, although it has become tradition since Pope John II (died 535) who chose John because his name was Mercurius (after the Roman God Mercury).

Reasons behind the names have varied: more Italian sounding names (Pope Gregory V), honoring the Second Vatican Council (Pope John Paul I and Pope John Paul II), appealing to Saint for protection and to signify peacemaker (Pope Benedict XVI), to honor a saint (Pope Francis), etc.

Are there any names a Pope can’t choose?


Is it okay to use stainless steel in oven?

Question:
Its stainless steel dish so can I put it in the oven at 250c/482f ?
Comment: What is this pan meant for? Does it have a handle? If so, is the handle likely to be oven-safe? I have cookie sheets made out of stainless steel, and they (obviously) work just fine in the oven, so I wouldn't be overly concerned about the metal.
Answer: When you ask "can I put it in the oven?" you're actually not asking a whole question. Can you put it in the oven? Of course you can. Will anything happen to it and your food that you don't like? Ah, that is the other half, right? What might happen?

the pan might warp (if it is thin)
the food might scorch or burn (again, more likely if the pan is thin)
the pan might stain (especially if there are areas of it that have only oil on them - for example if you're roasting a piece of meat)
the food might stick to the pan and not come out well

If the pan is thick, and not a lot of it will be empty and exposed, then it should be fine. Another thing to consider is how you're going to get it out again after cooking. I don't see any handles.
Comment: If the dish is not meant for oven-safety, could it have a coating on it that will be affected by the high-heat of the oven?
Comment: that seems unlikely. A non-stick pan, sure. but a stainless steel pan, I doubt it.
Answer: Only if you are cooking something in it. That's a pretty high temp and your stainless is going to get stained.
Comment: This answer seems a little too brief. Are you saying that 480F is hot enough to damage the stainless steel and that baking food in it would prevent this? (I presume moist food/steam keeping the temps down?)
Comment: Sort of...having food in the dish will keep its temp lower...however at that heat, the stainless is likely to develop a brown stain you can't get rid of.


Can't connect to VNC server

Question: Hoping your collective brain power can assist me...
tl;dr - Ubuntu server seems to have several ports open none can be seen by the outside (LAN) world - WTF is going on?
Longer:
I have a headless 17.04 server to which I'd like to connect using VNC, but I'm struggling at the moment. I'm using two clients - both Windows 10, one using RealVNC, one using TightVNC.
I've set up TightVNC server on my Ubuntu machine, mostly following the instructions at https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-16-04, intending to run Xfce as a desktop:
$ sudo apt install xfce4 xfce4-goodies tightvncserver

I've changed the xstartup file to:
#!/bin/bash
xrdb $HOME/.Xresources
startxfce4 &

And granted executable privilege.
If I start the server using tightvncserver I get:
New 'X' desktop is numbersix:1

Starting applications specified in /home/adam/.vnc/xstartup
Log file is /home/adam/.vnc/numbersix:1.log

nmap localhost gives:
Starting Nmap 7.40 ( https://nmap.org ) at 2017-11-09 21:05 GMT
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000076s latency).
Other addresses for localhost (not scanned): ::1
Not shown: 986 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
53/tcp   open  domain
80/tcp   open  http
111/tcp  open  rpcbind
139/tcp  open  netbios-ssn
445/tcp  open  microsoft-ds
631/tcp  open  ipp
5901/tcp open  vnc-1
6001/tcp open  X11:1
8000/tcp open  http-alt
8001/tcp open  vcom-tunnel
8010/tcp open  xmpp
8080/tcp open  http-proxy
9091/tcp open  xmltec-xmlmail

nmap 192.168.1.6 gives the same result.
I set the server as a systemd service - created /etc/systemd/system/vncserver@.service with this content:
[Unit]
Description=Start TightVNC server at startup
After=syslog.target network.target

[Service]
Type=forking
User=adam
PAMName=login
PIDFile=/home/adam/.vnc/%H:%i.pid
ExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1
ExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x800 :%i
ExecStop=/usr/bin/vncserver -kill :%i

[Install]
WantedBy=multi-user.target

Then started the service with
$ sudo systemctl daemon-reload
$ sudo systemctl enable firstname.lastname@example.com
$ sudo systemctl start vncserver@1

All seems to work. sudo systemctl status vncserver@1 gives:
● email@example.com - Start TightVNC server at startup
   Loaded: loaded (/etc/systemd/system/vncserver@.service; enabled; vendor preset: enabled)
   Active: active (running) since Thu 2017-11-09 21:38:13 GMT; 6s ago
  Process: 3924 ExecStart=/usr/bin/vncserver -depth 24 -geometry 1280x800 :1 (code=exited, status=0/SUCCESS)
  Process: 3916 ExecStartPre=/usr/bin/vncserver -kill :1 > /dev/null 2>&1 (code=exited, status=2)
 Main PID: 3937 (Xtightvnc)
    Tasks: 0 (limit: 4915)
   CGroup: /email@example.com
           ‣ 3937 Xtightvnc :1 -desktop X -auth /home/adam/.Xauthority -geometry
1280x800 -depth 24 -rfbwait 120000 -rfbauth /h

Nov 09 21:38:12 numbersix systemd[1]: Starting Start TightVNC server at startup...
Nov 09 21:38:12 numbersix systemd[3916]: pam_unix(login:session): session opened for user adam by (uid=0)
Nov 09 21:38:12 numbersix systemd[3924]: pam_unix(login:session): session opened for user adam by (uid=0)
Nov 09 21:38:13 numbersix systemd[1]: Started Start TightVNC server at startup.

telnet localhost 5901 seems to connect OK:
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
RFB 003.008

And sudo netstat -nlpt | grep :59 gives:
tcp        0      0 0.0.0.0:5901            0.0.0.0:*               LISTEN      3937/Xtightvnc

But, telnet numbersix 5901 and telnet 192.168.1.6 (from Windows) fail with:
Could not open connection to the host, on port 5901: Connect failed

And neither RealVNC nor TightVNC will connect (using hostname or IP). Ping works on both Windows hosts with IP or hostname. Also couldn't connect from Ubuntu laptop. Again, can ping. I can ssh without issues. sudo nmap numbersix from the Ubuntu laptop gives:
Starting Nmap 7.01 ( https://nmap.org ) at 2017-11-10 12:50 GMT
Nmap scan report for numbersix (192.168.1.6)
Host is up (0.0032s latency).
Not shown: 997 filtered ports
PORT     STATE SERVICE
22/tcp   open  ssh
8000/tcp open  http-alt
8001/tcp open  vcom-tunnel
MAC Address: 60:45:CB:64:2B:C8 (Unknown)

Nmap done: 1 IP address (1 host up) scanned in 12.85 seconds

The INPUT, FORWARD and OUTPUT chains from sudo iptables -L on the server are:
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     udp  --  anywhere             anywhere             udp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:domain
ACCEPT     udp  --  anywhere             anywhere             udp dpt:bootps
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:bootps
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
ACCEPT     all  --  anywhere             anywhere
INPUT_direct  all  --  anywhere             anywhere
INPUT_ZONES_SOURCE  all  --  anywhere             anywhere
INPUT_ZONES  all  --  anywhere             anywhere
DROP       all  --  anywhere             anywhere             ctstate INVALID
REJECT     all  --  anywhere             anywhere             reject-with icmp-host-prohibited

Chain FORWARD (policy DROP)
target     prot opt source               destination
ACCEPT     all  --  anywhere             192.168.122.0/24     ctstate RELATED,ESTABLISHED
ACCEPT     all  --  192.168.122.0/24     anywhere
ACCEPT     all  --  anywhere             anywhere
REJECT     all  --  anywhere             anywhere             reject-with icmp-port-unreachable
REJECT     all  --  anywhere             anywhere             reject-with icmp-port-unreachable
DOCKER-USER  all  --  anywhere             anywhere
DOCKER-ISOLATION  all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
DOCKER     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere             ctstate RELATED,ESTABLISHED
ACCEPT     all  --  anywhere             anywhere
FORWARD_direct  all  --  anywhere             anywhere
FORWARD_IN_ZONES_SOURCE  all  --  anywhere             anywhere
FORWARD_IN_ZONES  all  --  anywhere             anywhere
FORWARD_OUT_ZONES_SOURCE  all  --  anywhere             anywhere
FORWARD_OUT_ZONES  all  --  anywhere             anywhere
DROP       all  --  anywhere             anywhere             ctstate INVALID
REJECT     all  --  anywhere             anywhere             reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     udp  --  anywhere             anywhere             udp dpt:bootpc
OUTPUT_direct  all  --  anywhere             anywhere

So I think that suggests that iptables is blocking nothing...
Can anyone help me diagnose the problem, please?
Comment: I *think* that `nmap localhost` says `open` provided the service is listening on the loopback interface - it doesn't tell you that it's listening on the *external* interface. So what does `telnet localhost 5901` say - or, looked at the other way, what does `sudo netstat -nlpt | grep :59` show in the `Local Address` field?
Comment: Thanks - the results look fine to me. Are you sure you don't have an outbound rule in your Windows firewall that is blocking the connection? Have you tried telnet from Windows using the IP address? FWIW you're probably going to want to tunnel the connection over SSH anyway if you're using it over a public network, so it may not be worth banging your head against this.
Comment: Hi steeldriver - I'll add some more detail to the post, but:
- no, not sure, but I can't access it from a xenial laptop either, and that doesn't have anything in iptables;
- telnet using the ip address from Windows and xenial all fail with similar errors;
- nmap from xenial shows only ports 22, 8000 and 8001 open;
- iptables on the server indicate that the ports are open;
- for the moment, I'm only looking to access on LAN;
- honestly, the issue is less about VNC and more about 'what the foxtrot-uniform-charlie-kilo is going on with my server'!
I'm astounded sometimes how little I know.
Answer: The answer lay in my failure to understand iptables - and particularly what the output from sudo iptables -L meant...
When I instead ran sudo iptables -S, I was presented with a much fuller description of each rule, and it was obvious then that there wasn't a suitable INPUT rule that was allowing tcp traffic on 5901 (or any of the other ports I was looking at) through. Then the final INPUT rule, which was essentially rejecting everything that didn't match a rule, was collecting this traffic and rejecting it. The rule that I thought should have been ACCEPTing the traffic applied only to the lo interface (loopback).
I ran this:
sudo iptables -I INPUT 7 -s 192.168.1.0/24 -i enp37s0 -j ACCEPT
That's basically inserting a rule at line 7 of the INPUT chain, and telling it to ACCEPT any traffic from the 192.168.1.0/24 subnet arriving on the ethernet port.
The next challenge is getting iptables-persistent to actually work on reboot!!

Can't connect to VNC server


Will a Core Data NSInMemoryStoreType store store the entire graph in memory and therefore be severely constrained by system memory?

Question: This might seem like an obvious question, but my Googling hasn't given me a definitive response - obviously the idea of a Core Data NSInMemoryStoreType store is to store the entire graph in memory so it would seem logical to assume that this is going to place a severe constraint on the number of objects which can be stored at any one time - is this the case? Or does this store implement some kind of intelligent disk caching method to overcome this?
(And if anyone has any anecdotal evidence of the kind of capacity this gives on iOS devices, preferably iPhone 4S upwards, that would also be welcome).
Answer: Given that there is an alternative, NSBinaryStoreType, where the data is documented to be stored on disk, and given the name, I would say it is safe to assume that NSInMemoryStoreType is strictly in-memory.
This Apple doc says that there is "No backing required" for an in-memory store, but does not explicitly say that none is ever used.  It also notes that SQLite "does not require that the entire object graph reside in memory", implying that some other type of store does, but again it is not explicit.
See this thread where Bill Bumgarner, presumably the Bill Bumgarner that manages the iOS runtime team, talks about how you might use this type of store.
As for the limit, some answers are in ios app maximum memory budget, but you should think about the effect your program will have on the user's overall experience.  If you claim all the RAM then iOS will kill their other processes, resulting in loss of context as they switch back and forth.  Also iOS will kill your app any time they switch away to do Twitter or email, if it was using all the RAM.  So try to stay in the low tens of megabytes, regardless of how much is apparently available, unless your app is so truly amazing that nobody would ever switch away.
Comment: Yes, that is *the* Bill Bumgarner.
Comment: Thanks for the memory budget link - it's certainly common sense not to force processes to be killed on switching.
Comment: It doesn't look like anyone has any links to documentation specifically stating that it does not use any other backing, so I think I will simply accept your answer because you gave more details. But if anyone can link to docs then I would prefer that as an answer.
Answer: It stores everything in memory. You are right, it limits severely the amount of data that you can hold. It is up to the developer to decide when this is appropriate and when it isn't.
Comment: Thanks - do you have any official links just to confirm this?
Comment: It is in Apple's documentation.  In Memory stores are in memory only.  There is no file on disk created nor should there be.
Comment: Please post the link; I couldn't find it.


Global optimality of a convex but non-smooth function

Question: I have a question. The answer may be too obvious but I cannot be sure about the right answer. Let say that we have a convex but non-smooth function which is defined as $f : \mathbb R^2 → \mathbb R$. For a point in $\mathbb R^2$, if we know that the function increases for the directions $(1,0)$, $(-1,0)$, $(0,1)$ and $(0,-1)$, can we sure about that this point is local optimum (because of the convexity it will be also global optimum)?
Thank you in advance.
Answer: No. Consider for instance $f(x,y) = x^2 + y^2 + 10|y-x|$ at, say, $(1,1)$.


What is the standard way to organize Qt code?

Question: I want to know what is the standard way to organize Qt code using Qt Creator? I have this question because I am a Qt beginner & learn Qt following a c++ based tutorial i.e. Qt addressbook tutorial. Code is split very nice in that tutorial in header files & cpp files. But when I tried to build same app using Qt Creator, its quite different. I mean like there is even no declaration of controls nether in header file nor cpp file. They just dump everything to a ui file.
Answer: Here's what I do:
Generate the code from Qt Creator. This gives you a class with some name like Ui::MyDialog. Then, create a class that derives from Ui::MyDialog. Create the slots you need for the dialog in the derived class.
In the constructor, call the setupUi() method, and then connect the slots to the signals in the dialog's widgets. Elsewhere in your program (in the main() function, maybe) construct the derived class and then call its show() method.
I notice that Qt Creator doesn't show you the code it generates from your dialog's UI file. It might be instructive to use Qt Designer to see the C++ code it produces. This might give you a better idea of what to do with Creator.
A good book for learning Qt is C++ GUI Programming with Qt 4 by Blanchette and Summerfield: http://www.amazon.com/gp/product/0132354160/ref=ase_trolltech/. If you're interested in Qt, I highly recommend this.
Comment: "Then, create a class that derives from Ui::MyDialog". That's so Qt3 :) Better make the Ui::MyDialog a private member.
Answer: Although GUI IDE environments seem to encourage you to mix GUI code with program logic, you do not need to do this. You can use the GUI designer to lay out your GUI and in the wrapper class, connect the signals and slots of your widgets as needed for GUI logic and emit custom signals so that program logic in another class can act on it without mixing the two.


No water coming out of the kitchen faucet. Only a couple drops when cold or hot water is turned on

Question: We had a hard freeze here in Louisiana last week. We are back to warmer temperatures outside now 71•degrees. All my faucets and showers are able to run water except for my kitchen sink faucet. My dishwasher even works. Just one single drip of water every 5 seconds out of my kitchen sink faucet. What could be the problem?
Comment: Sink pipes might just be in a cold spot that is not heating up as fast.  Would leave the taps open to keep dripping, the drips will speed up opening the pipes.
Comment: I've had the tabs open for two days thinking the same thing but no change so far. I have a pull out type of faucet. I know it's probably something so simple It is driving me crazy lol. But thank you.
Answer: If your dishwasher works and it's next to the sink, that's great!   It means the water is almost there.
I'd wager the freezing and thawing of pipes dislodged some sediment and it's clogging up the screen and aerator on the tip of your faucet.   Unscrew it to see if water comes out.
Be careful not to drop the parts down the drain.


"The complex version of Nash's theorem is not true"

Question: The title quote is from p.221 of the 2010 book,
The Shape of Inner Space: String Theory and the Geometry of the Universe's Hidden Dimensions
by Shing-Tung Yau and Steve Nadis. "Nash's theorem" here refers to the Nash embedding theorem
(discussed in an earlier MO question: "Nash embedding theorem for 2D manifolds").
I would appreciate any pointer to literature that explains where and why embedding fails.
This is well-known in the right circles, but I am having difficulty locating sources.  Thanks!
Answer: The failure is actually more profound than you might guess at first glance:
There are conformal metrics on the Poincare disk that cannot (even locally) be isometrically induced by embedding in $\mathbb{C}^n$ by any holomorphic mapping.  For example, there is no complex curve in $\mathbb{C}^n$ for which the induced metric has either curvature that is positive somewhere or constant negative curvature.
You can get around the positivity problem by looking for complex curves in $\mathbb{P}^n$ (with the Fubini-Study metric, say), but even there, there are no complex curves with constant negative curvature.
More generally, for any Kahler metric $g$ on an $n$-dimensional complex manifold $M$, there always exist many metrics on the Poincare disk that cannot be isometrically induced on the disk via a holomorphic embedding into $M$.
This should not be surprising if you are willing to be a little heuristic:  Holomorphic mappings of a disk into an $n$-dimensional complex manifold essentially depend on choosing $n$ holomorphic functions of one complex variable and each such holomorphic function essentially depends on choosing two (analytic) real functions of a single real variable.  However, the conformal metrics on the disk depend essentially on one (positive) smooth function of two variables, which is too much `generality' for any finite number of functions of a single variable to provide.
Comment: I am quite willing to be more than a little heuristic under such brilliant guidance, Robert! Thanks for so much enlightenment in so few lines.
Comment: i really like the hueristic argument too!
Answer: Using the maximum modulus principle you can show that $\mathbb{C}^n$ doesn't have any compact complex submanifolds of positive dimension. It follows that lots of complex manifolds, such as complex grassmannians and projective spaces for example, do not embed into $\mathbb{C}^n$.
Comment: Nitpick: Stein manifolds are those that admit a proper embedding into $\mathbb C^n$. An open subset of $\mathbb C^n$ is not necessarily Stein.
Comment: Moreover, Nash theorem is about isometric embedding...
Comment: jvp & diverietti: Thanks for the comments. I've removed my remark about Stein manifolds.
Answer: As Faisal says, there is no hope to have a general Nash-type theorem for all complex manifold, when the ambient space considered for the (isometric) embedding is some $\mathbb C^N$: no compact complex manifold of positive dimension could admit it. On the other hand there are a lot of compact complex manifold of positive dimension.
Restricting the attention to the compact case then, one may guess if there is a natural analogous of the Nash embedding theorem.
For instance, one may wonder if given any compact hermitian manifold $(X,\omega)$ one can embed it isometrically into some projective space, endowed with its natural Fubini-Study metric.
It turns out that there are several restrictions both of analytic and geometrical nature. For instance, the starting metric $\omega$ must then be a Kähler form (as a restriction of the Fubini-Study Kähler form). It then gives a nonzero cohomology class in $H^{1,1}(X,\mathbb R)\subset H^2(X,\mathbb R)$. Moreover, being the Fubini-Study metric the Chern curvature form of the (anti)tautological line bundle, its cohomology class must be integral, that is in the image $H^{1,1}(X,\mathbb Z)$ in $H^{1,1}(X,\mathbb R)$ of the natural inclusion $H^2(X,\mathbb Z)\subset H^{2}(X,\mathbb R)$.
The celebrated Kodaira's embedding theorem states that the converse is in fact true:
Let $X$ be a compact complex manifold of dimension $\dim X=n$ possessing an integral $(1,1)$-cohomology class $[\omega]\in H^{1,1}(X,\mathbb Z)$ such that $[\omega]$ can be represented by a closed positive smooth $(1,1)$-form $\omega$. Then, there is an embedding $\iota\colon X\hookrightarrow \mathbb P^N$ to some complex projective space (and a posteriori $X$ is indeed algebraic by Chow's theorem).
This embedding is obtained as follow. Given $[\omega]$, there exists a holomorphic hermitian line bundle $L\to X$ with hermitian metric $h$ such that $c_1(L)=[\omega]$ and moreover the Chern curvature form is such that $\frac i{2\pi}\Theta(L,h)=\omega$. Then, for all $m\in\mathbb N$, one considers the holomorphic map
$$
\begin{aligned}
\varphi_{|L^{\otimes m}|}\colon & X\setminus\operatorname{Bs}(L^{\otimes m})\to\mathbb
P(H^0(X,L^{\otimes m})^*) \\
& x\mapsto\{\sigma\in H^0(X,L^{\otimes m})\mid \sigma(x)=0\},
\end{aligned}
$$
where $\operatorname{Bs}(L^{\otimes m})$ is the set of points of $X$ where all sections in $H^0(X,L^{\otimes m})$ vanish simultaneously. What can be shown is in fact that for all sufficiently big $m$, one has that $\operatorname{Bs}(L^{\otimes m})=\emptyset$ and $\varphi_{|L^{\otimes m}|}$ is an immersive homeomorphism onto its image. Moreover, denoting by $\mathcal O(1)$ the (anti)tautological line bundle on $\mathbb P(H^0(X,L^{\otimes m})^*)$, one has that
$$
\varphi_{|L^{\otimes m}|}^*\mathcal O(1)\simeq L^{\otimes m}.
$$
Now, $H^0(X,L^{\otimes m})$ has a natural inner product, namely the $L^2$-product given by
$$
\langle\langle\sigma,\tau{}\rangle\rangle_{L^2}=\int_X\langle\sigma(x),\tau(x)\rangle_{h^{\otimes m}}\frac{\omega^{n}}{n!},
$$
and thus we have a corresponding Fubini-Studi metric on $\mathbb P(H^0(X,L^{\otimes m})^*)$; call it $\omega_{FS}$. Then, $\varphi_{|L^{\otimes m}|}^*\omega_{FS}$ lies in the same cohomology class of $c_1(L^{\otimes m})=m\cdot c_1(L)$. In particular, $\omega$ and $\frac 1m\varphi_{|L^{\otimes m}|}^*\omega_{FS}$ are cohomologous and since $X$ is Kähler by the $\partial\bar\partial$-lemma we have that
$$
\omega-\frac 1m\varphi_{|L^{\otimes m}|}^*\omega_{FS}=\frac i{2\pi}\partial\bar\partial f
$$
for some globally defined smooth function $f\colon X\to\mathbb R$. This means that the new hermitian metric $\tilde h=he^{f}$ on $L$ has Chern curvature equal to $\frac 1m\varphi_{|L^{\otimes m}|}^*\omega_{FS}$ and with this new metric $\varphi_{|L^{\otimes m}|}$ becomes (after rescaling by the factor $m$) an isometric embedding (of course this is almost tautological: the only point here is that we modify the original metric just by rescaling the hermitian metric on the line bundle whose curvature was our original metric).
Note that we didn't obtain an isometric embedding for the original metric. The best you can do we the original metric is to approximate it in the $C^2$-topology by the sequence of metrics $(\frac 1m\varphi_{|L^{\otimes m}|}^*\omega_{FS})_{m\in\mathbb N}$ by a result contained in the PhD thesis of G. Tian (please see the answer below by Joel Fine for more on that) (the convergence is now known to be in the $C^\infty$ topology on the space of symmetric covariant $2$-tensors, cf. the comment of Joel Fine here below).
Remark also that not any compact Kähler manifold admits such a cohomology class, thus the theorem "really give a criterion". For instance a generic compact complex torus of complex dimension greater than or equal to two is a compact Kähler manifold (with its natural flat metric) which does not admit any embedding in some projective space.
Turing to the literature, regarding the compact case there are several wonderful books in the literature. I'll give you two or three names, which are my favorites.
(1) J.-P. Demailly, "Complex Analytic and Differential Geometry",
(2) C. Voisin, "Théorie de Hodge et géométrie algébrique complexe".
(3) R. O. Wells Jr., "Differential analysis on complex manifolds".
For the non-compact case, there are also plenty of books of course. If you want to know more on the theory of Stein manifolds (precisely the analytic close submanifold of some $\mathbb C^N$), then for example
(4) L. Hörmander, "An introduction to complex analysis in several variables".
would do the job, at least for an introduction.
[edited after comments by Joel Fine and Robert Bryant]
Comment: I think this version of your answer is much better! Just one small technical point: the convergence of the sequence you mention is in fact in the C-infinity topology. Tian originally proved C^2 convergence but this has subsequently been improved. (I guess this extension is due to Ruan, but I'm a little hazy on the exact history. There is also important work of Zelditch and Catlin on this.)
Comment: @diverletti:  You need to look up a statement of the Kodaira embedding theorem.  It does not say what you think it does.  I stand by my claim that there is NO holomorphic curve (compact or not) in $\mathbb{CP}^n$ such that the Fubini-Study metric induces a metric (i.e., a positive (1,1)-form) of constant negative curvature on the curve.  (It is a old theorem of Calabi, not mine.)  As Joel points out below, the Kodaira embedding theorem is not about isometric embeddings.
Comment: @diverletti:  Check your statement of the Kodaira embedding theorem.  The embedding $\iota:X\hookrightarrow\mathbb{P}^N$ that pulls back the Fubini-Study $(1,1)$-form to be the given form is NOT holomorphic in general; it's only symplectic.  The Kodaira embedding theorem is about the space of sections of `positive' bundles, and you don't mention this.  If $X$ is a Riemann surface of genus $g>1$ and $\omega$ is the positive integral $(1,1)$-form that has constant negative curvature, there is NO holomorphic embedding into $\mathbb{P}^N$ that induces an integral multiple of $\omega$.
Comment: yeah... undoubtedly better... or, at least, correct! :) thanks!
Comment: Dear Robert, I think that my statement is definitely true. You just make some confusion. The Kähler metrics I consider, being integral, are already seen as curvature forms of some line bundle (whose first Chern class is represented by the given Kähler form and, as such is positive, so that the line bundle itself is, by definition, positive). Your counterexample is not true because of the following reason: you consider the Kähler metric as a metric on the tangent bundle (which, in the case of Riemann surfaces is incidentally a line bundle, too) and then you take the curvature (to be continued)
Comment: which, in the cases your consider, cannot -of course- be positive. Thus, it does not satisfy the hypotheses of my statement since being a (1,1)-form not positive it cannot be a Kähler form.
What your example says, instead, is that if you normalize your Kähler form in such a way that its total volume is for instance one, then you will find a (ample) hermitian line bundle on X whose curvature is exactly your form.
Comment: Ok, I think we both are making some confusion... I'll edit my answer in the afternoon!
Interesting discussion, anyway.
Answer: This is not so much an answer to the original question, more an addition to the answer of diverietti and part of the answer Robert Bryant. Both mention the following analogue of Nash's embedding problem:
Given a Kähler manifold $(X, \omega)$, is there a projective embedding $X \to \mathbb{CP}^n$ for which the Fubini-Study metric pulls back to give $\omega$?
As Robert says, taken literally the answer is no. However, there is a beautiful theorem of Tian which says that the answer is yes, provided one is willing to let $n$, the dimension of the projective space, tend to infinity.
More precisely, let $L \to X$ be a positive holomorphic line bundle on $X$. This means there is a Hermitian metric $h$ in $L$ whose curvature is a Kähler form $\omega$ in $c_1(L)$. (Moreover, all Kähler forms in $c_1(L)$ arise this way.) With this metric $h$ and the volume form $\omega^n$ you can define an $L^2$-inner-product on the space of holomorphic sections of $L^k$, where $k$ is a large integer. Let $s_0, \ldots , s_n$ be an orthonormal basis of holomorphic sections (where $n$ depends on $k$ roughly $n \sim k^m$ where $m$ is the dimension of $X$). Then (for large $k$) the map
$$
f_k(x) = [s_0(x) : \cdots : s_n(x) ]
$$
defines an embedding to $\mathbb{CP}^n$ which has the following property: if we restrict the Fubini-Study metric from projective space to $X$ via the map $f_k$, rescale by $1/k$ (to keep the total volume fixed) and then take the limit as $k \to \infty$ we get the original metric $\omega$.
Comment: Joel, I am not sure I can understand completely your answer. For Kodaira's embedding theorem already follows that if you rescale the restriction of the Fubini-Study metric by one over the power of the line bundle you need to embed it, then it is the original metric.
When does the $L^2$ metric come into the picture? Which is exactely the theorem of Tian you are talking to?
Comment: Kodaira's theorem tells you that for sufficiently large $k$, the map $f_k$ gives you an embedding for any choice of basis of hol sections of $L^k$ whatsoever. If you pull back the cohomology class of the Fubini-Study metric and divide by 1/k then you get the first Chern class of L. But Kodaira's theorem says nothing at all about the pull back of the actual metric itself. To get a well defined metric via an embedding, you must specify the basis (at least up to the action of the unitary group). That's where you need the $L^2$ inner-product. Continued...
Comment: ... If you want to recover the original metric you started with, you use an $L^2$-orthonormal basis of sections for each $k$, pull back the metric, rescale by $1/k$ and then take a limit as $k \to \infty$. This gives you a sequence of Kähler metrics on $X$ converging to the one you first thought of. This is proved by Tian in his article "On a set of polarized Kähler metrics on algebraic manifolds." J. Differential Geom. 32 (1990).
Answer: In his 1952 Annals paper, Calabi characterised those Kähler manifolds $(X,\omega)$ which admit an isometric embedding into a complex space form. Here, a complex space form is a Kähler manifold of constant holomorphic sectional curvature which is complete with respect to the metric, hence either complex Euclidean space, complex hyperbolic space or complex projective space.
Here, we describe the case of a Kähler manifold $(X,\omega)$ admitting an isometric embedding into complex Euclidean space $\mathbb{C}^N$ for some $N$, as requested.
Firstly, the Kähler form $\omega$ has to be real-analytic.
Associated to a real-analytic Kähler manifold $(X,\omega)$, Calabi introduced a diastasis function $D_\omega$ (coming from the Greek word for distance) in order to describe his characterization. This function $D_\omega$ is a partially defined on on $X\times X$ and is given locally as follows: Let a point $u \in X$ be given and choose a local real-analytic Kähler potential $\Phi : U \to \mathbb{R}$ defined in an open neighbourhood $U$ of $u$ in $X$ (i.e. $\sqrt{-1} \partial\bar{\partial} \Phi = \omega$ on $U$). Let $\tilde{\Phi} : U \times \overline{U} \to \mathbb{C}$ denote a polarization of $\Phi$ (i.e. $\tilde{\Phi}$ is a holomorphic function on $U \times \overline{U}$ satisfying $\tilde{\Phi}(x, \overline{x}) = \Phi(x)$ for all $x\in U$, where $\overline{U}$ is the conjugate complex manifold of $U$). Calabi defined
$$D_\omega(x , y) := \tilde{\Phi}(x, \bar{x}) + \tilde{\Phi}(y, \bar{y}) - \tilde{\Phi}(x, \bar{y}) - \tilde{\Phi}(y, \bar{x}) \quad {\text{for }} (x,y)\in U\times U,$$
and showed that the right-hand side is independent of the choice of Kähler potential $\Phi$.
The diastasis function detects isometries, in the sense that a holomorphic map $f : (X, \omega) \to (X^\prime, \omega^\prime) $ between real-analytic Kähler manifolds is an local isometry near a point $x \in X$ if and only if
$$D_{\omega^\prime}(f(x), f(y)) = D_\omega (x, y) \quad \text{for all } y\in U$$
in some open neighbourhood $U$ of $x$ in $X$.
Since the diastasis of the flat metric $\omega_0 $on $\mathbb{C}^N$ from the origin is given by
$$D_{\omega_0}(z, 0) = |z_1|^2 + \cdots + |z_N|^2 \quad \text{for } z\in \mathbb{C}^N,$$
this leads to the following result.

Theorem [Calabi]. A real-analytic Kähler manifold $(X,\omega)$ admits an local isometric map near a point $x \in X$ to complex Euclidean space $\mathbb{C}^N$ if and only if there exists local holomorphic functions $f_1,\ldots, f_N$ defined near $x$ such that
  $$D_\omega(x, y) = |f_1(y)|^2 + \cdots + |f_N(y)|^2.$$
  for points $y$ in some open neighbourhood of $x$.

Regarding embedding (i.e. injective immersion), which is a global question, other than checking the above criterion at some point $x\in X$, there is an added condition, namely that the diastasis function $D_\omega$ extends to a total function on $X\times X$ such that $D_\omega (x, y) \ge 0$ for all $(x, y)\in X\times X$ and equality holds if and only if $x = y$. This added condition ensures injectivity.
Finally, one should note the perhaps surprising observation that if a (connected) real-analytic Kähler manifold $(X,\omega)$  admits an local isometric map near a point $x \in X$ to some complex Euclidean space $\mathbb{C}^N$, then it admits a local isometric map near every point $x \in X$ to $\mathbb{C}^N$, as Calabi showed. This explains why to check the existing of an embedding, it is sufficient to check the sum of squares condition in the highlighted block at some point $x\in X$ plus the global positive-valued extension condition on the diastasis function $D_\omega$.


Can static friction sometimes exceed its supposed maximum value?

Question: Consider a front-wheel drive car that is speeding up on a circular track of radius $R$. The static friction force has a radial component and a tangential component. At some point the speed will become too high for the car to stay on this circular trajectory. At that point the radial component of the friction force will be $\mu_s N$, where $\mu_s$ is the coefficient of static friction and $N$ the normal force. But since the friction force also has a tangential component, the total friction force will be greater than $\mu_s N$. QED.
Answer:
At that point the radial component of the friction force will be $\mu_sN$

This is your mistake.
As long as the car is not slipping, the radial component of the friction force will be given by $F_r = \frac{mv^2}{R}$. However, the total friction force must be less than or equal to $\mu_sN$ in magnitude, not just the radial component. Since the car is speeding up and the only forces acting on it are gravity, normal and friction, where gravity and normal cancel out, the net force on the car is equal to the force of friction. Thus we have: $$\vec F_f = m\vec a = \mu_sN \hat a$$
From this, we can see that the radial component of friction will instead be given by $\mu_sN\frac{a_r}{a}$ where $a_r$ is the radial component of acceleration and $a$ is the magnitude of the total acceleration. An interesting consequence of this is that the maximum speed possible before you start to slip is lower if you're speeding up than if your speed is constant.
Comment: I get your point, and it is a natural objection to my "proof". However, notice that if we accept that it is the _total_ friction force which is equal to μ _N_ , this has practical implications. For example, suppose you are driving your anti-lock-brakes-equipped car along a straight road that is banked. Then since you are "using up" part of your static friction to avoid sliding down, the car stopping distance should be more than the stopping distance if the road is level. Are you aware of any experimental evidence for such behavior?
Comment: @JoseMenendez That is correct that the stopping distance would be higher for a banked road. I don't know if there have been any experimental tests of this behaviour.
Comment: Thanks. It's a small effect, though. It goes like the square of the sine of the banking angle.  Probably impossible to see experimentally due to the crudeness of the μ _N_ theory.  All this is inspired by Example 8.6 in the last edition of Knight's textbook, where the author solved an accelerated circular motion problem by assuming that the radial component of the friction force reaches the maximum μ _N_ value, and obscuring this assumption by using "force of wheels" to name the tangential component of the same force.
Answer: Sometimes it is useful to introduce the concept of "sticktion". While the tyres still grip, sticktion can build up beyond the level of friction. Once the sticktion maximum is exceeded, the car breaks away and the retarding force reduces to the level of friction.
Answer: It is possible that the friction coeficient depends on the direction because the tire has grooves, it is not isotropic. Let's say that $\mu_R$ is the radial friction coeficient and $\mu_t$ the tangential one.
If $\mu_R < \mu_t$, after a speed threshold the centripetal force vanishes, and the car slides following the local tangent path.
If $\mu_t < \mu_R$, the tangential speed reaches a maximum and the tires starts to slide. But even so, the speed can still increase, despite of some sliding. When the speed is such that $F_R = m\frac{v^2}{R} = \mu_R N$ => $v = \sqrt{\mu_R gR}$, the centripetal force vanishes and the result it the same as before.
Answer: If the vehicle is both accelerating (or braking) and cornering, the total friction force will be greater than either the lateral friction associated with cornering alone or the longitudinal friction associated with accelerating (or braking) alone. Since the total friction force is shared between the two, the vehicle will slip sooner if both accelerating and cornering at the same time, than if only accelerating or only cornering.
This can be illustrated by using the so called Kamm circle of friction. Refer to the figures below. The Kamm circle assumes that the coefficient of static friction is the same both longitudinal and laterally, as well as assumes the normal load supported by the tire is the same for both accelerating and cornering. These assumptions are discussed later.
The figures are an overhead view of one of the vehicle tires. The vehicle direction of motion is upward. The circle radius represents the maximum possible static friction force, or $u_{s}N$ where $N$ is the load (weight) of the vehicle supported by the tire.
Fig 1 shows the vehicle accelerating only where the longitudinal friction force enabling acceleration, $F_{Lon}$, equals the maximum possible static friction force, i.e., where loss of traction is impending.
Fig 2 shows the vehicle only cornering (to the right) where the lateral friction force, $F_{Lat}$ which equals the centripetal force, equals the maximum possible static friction force, i.e., where skidding is impending.
Fig 3 shows the vehicle both accelerating and cornering. As can be seen, the total friction force reaches the maximum possible static friction force sooner that when only accelerating or cornering.
Bottom line: The vehicle will slip sooner if both accelerating and cornering at the same time, then if only accelerating or cornering.
Regarding the assumptions discussed at the beginning.
Since the tire tread is not necessarily the same in the longitudinal and lateral directions, the coefficients of static friction may be different. For example, if the tire is designed more for cornering then the Kamm circle may be an ellipse, with the major axis in the horizontal direction.
Since when accelerating or cornering the weight of the vehicle may shift among tires and on a different area of the tire, the assumption of the same load $N$ may not be correct.
Hope this helps.


What is the purpose of `__metaclass__ = type`?

Question: Python (2 only?) looks at the value of variable __metaclass__ to determine how to create a type object from a class definition. It is possible to define __metaclass__ at the module or package level, in which case it applies to all subsequent class definitions in that module.
However, I encountered the following in the flufl.enum package's __init__.py:
__metaclass__ = type

Since the default metaclass if __metaclass__ is not defined is type, wouldn't this have no effect? (This assignment would revert to the default if __metaclass__ were assigned to at a higher scope, but I see no such assignment.) What is its purpose?
Answer: In Python 2, a declaration __metaclass__ = type makes declarations that would otherwise create old-style classes create new-style classes instead. Only old-style classes use a module level __metaclass__ declaration. New-style classes inherit their metaclass from their base class (e.g. object), unless __metaclass__ is provided as a class variable.
The declaration is not actually used in the code you linked to above (there are no class declarations in the __init__.py file), but it could be. I suspect it was included as part of some boilerplate that makes Python 2 code work more like Python 3 (where all classes are always new-style).
Answer: Yes, it has no effect.  It's probably just a misunderstanding from flufl.enum's author, or a leftover from previous code.
A "superpackage" __metaclass__ declaration would have no effect because there is no such a thing as Python superpackages.


What is this UI element on OS X?

Question:
Do it have any name to call this little thing?
Comment: if its changing images some call it a carousel. If it's an area for a large static image it's often called a hero photo. But in my experience it tends to be more descriptive relative to the design- the "primary", "first", "top", but YMMV.
Comment: Also can you be a bit clearer about what you're referring to? I assumed that you were pointing to the image.
Answer: it's a status bar. it's not specific to osx, all browsers have one.
it used to show the url of hovered links, status of requests, etc and then some add-ons/plugins started using it to show information.
Recently it's been reduced to a something like a tooltip in most browsers (it only appears on mouse over links or when something is loading, etc).
Answer: This is a status bar.
In Cocoa programming you can create this by adding a custom view on the bottom of a window and using a text field to show information as required.
Note that in OS X programming, the "Status Bar" (class NSStatusBar) refers to the the rightmost portion of the system-wide menu bar, with all the little icons, the clock, spotlight and so on. User-facing copy however uses "Status Bar" as a term for a horizontal area on the bottom of windows that contains auxiliary information (e.g. link URLs in Safari, or item counts and sizes in the Finder).

What is this UI element on OS X?


What does this star symbol mean in the airport chart?

Question: I know that there is no unidentified beacon because it is not in the circle, because the star symbol inside the circle represents the unidentified beacon. So what does this star symbol mean?
Answer: According to the FAA Airport diagram legend both a 5 point star with and without an enclosing circle both identify a beacon at the airport.
Further details can be found on the FAA website, towards the bottom of this page is a link to Legends & General Information (PDF) where you can find all details of all FAA charts.
Comment: You are right, sir. But when I check out the Jeppesen Legends I do not find any other information than the hazard beacon. It is not possible to have such a thing on the terminal.
Comment: it sure can be. Maybe there's a tall mast or flag pole on the roof with a rotating beacon light on top for example. Think that kind of beacon, not radio beacon.


Remove underlined hyperlink in portlet

Question: Working on plone and am just getting experience with it. In my portlet I am currently editing a static text portlet to look like an RSS feed (so I can have some customization with my news items). I've gotten the format to work perfectly - with the exception of removing the underline from the hyperlink. I've tried using methods from all the different forums with CSS and HTML formatting...it's not working. Anyone able to help?
Comment: What did you try with CSS? It's just a question of finding the right CSS selector, as Matheus is trying to show you.
Answer: Use FireFox + FireBug to find which css property is used on portlet hyperlink.
Probably you wrote a property too general and one more specific is used.
Take a look:
....

    1

....

Hyperlink will be underline because the first css property has a more specific "path".

Remove underlined hyperlink in portlet


Remote SSH connection with autostart virtual environment

Question: I need to make such possibility for remote users.
Remote user connects via SSH to my server. Then after connecting server runs some script that open virtual machine environment for this user.
It is possible to make it, or my idea is not correct?
Virtual environment in this case is some image of OS with desktop GUI and other pretty possibilities that I can not run directly on Linux or BSD.
This virtual environment working with database that has no ports of it's interface to the Linux or any of BSD.
How to make possibility for remote users to connect to my server and work with this database with or not with running a virtual machine?
Answer: I have no idea about this incredible virtual-machine.
But you can run scripts by just changing /bin/bash in /etc/passwd for the user to the script and making it executable, sometimes you need to put it on /etc/shells too.


problem transforming table to First normal form

Question: I have table named Agent. It has attribute named agent_status. It's value can be on or off. I want to conform this table to first normal form. Do i have to create different table for this attribute?
Comment: Do you want to track status changes over time? (I.e. will you ever need to query something like "was Agent XYZ status on last Monday at noon?") If yes, then maybe you can benefit from it (there are alternatives), otherwise no.
Comment: No need to define a new table. You should have a new table only if the attribute has a *repeated* value.
Answer: It is better to create a separate table for agent_status. Now it seems easy to add agent_status column in agent table itself. But with my little experience I can tell you, business requirements may change in future, sometime too often. Our data model must be developed in a way it should accommodate all the future requirements and changes without much alteration on the underlying model.
In some cases, business will required to track history of agent_status over a period of time (@Ziggy) and, there are possibilities, where you are required to add new status values, also you may required to change status name in future in order to accommodate your business requirement.
If you are sure that, your business requirement will not change in future, you can add agent_status column in agent table itself, or else create a separate entity named agent_status.
I hope this answer will give you some idea, Thank you.


How to calculate percentage of accuracy of game-play based on the number of mistakes, blunders and inaccuracies?

Question: For some time now, chess.com analysis suggests the accuracy of the gameplay based on the blunders, mistakes and inaccuracies, one committed during his/her gameplay. Now, my question is,
Whether there is any formula to calculate the accuracy of gameplay based on the inaccuracies, blunders and mistakes during the game? If not, then what are the other factors, that act on the accuracy?
Comment: You can do it pretty much however you want. How does chess.com calculate it is another question, though
Answer: The gameplay accuracy is a scale from 0 to 100 and it is calculated based on the accuracy of each of your moves. Chess.com collects a lot of data from played games that they use to evaluate which moves are more important for the final accuracy.
The final accuracy is a weighted average and that explains when you play a game with two book moves and a blunder why you can get an accuracy of 0.7 and not 66.7.
The average of a single move is determined by how close the evaluation deviates from the top engine suggestion and how far is the evaluation rank placed. If the move played was the 2nd best but was -3 instead of best -1, then that is more accurate than if the same move had 9th rank.
Chess.com has released these two articles that give some insight on the analysis:
How is it measured?
How to use game analysis?
Note:
Chess.com isn't open source and they haven't shared all the details of the calculation, so more explanation needs more speculation.
Answer: You cant.  They are just a rough guide about how you did.
The only factor is who won/lost the game.


Do flight tracking websites also track non-commercial and defense aircraft?

Question: Many flight tracking websites have the data about almost all the commercial airplanes in air. Do they have the data about the private jets and/or defense aircraft also and they just don't show that on the websites?
Answer: As long as an aircraft transmits (unencrypted) ADS-B information, anyone within radio range can track it. The equipment necessary to receive ADS-B can be as simple as a computer with a TV receiver (USB DVB-T module) and the right software.
Receivers can then send the data stream to, for example, Flightradar24, who will display it on their website.
As Flightradar24 states, not all aircraft are equipped with an ADS-B transponder, and even those that do may not have switched it on. Unless ADS-B is installed and operating, it would not be visible.
@ezra-g mentiones that Steve Jobs' aircraft was blocked, but this is of something one would have to ask for, and the site has to apply the filter so it doesn't display on its website. However, Jobs' plane would still have been visible on the receiving computers. And, of course, the website will only filter your aircraft if they are willing to do so, either on request, through payment, or a government order.
Flightradar.com also has some other data sources, like FAA (Federal Aviation Administration) radar information in the US, which also contains aircraft without a transponder. The FAA may also filter some aircraft.
Comment: And the FAA puts a 5 minute delay on the information
Comment: Flightradar24 is not a good example as they filter out military traffic
Comment: ADSBExchange does not filter flights, even military ones. Their coverage isn't as good, though.
Comment: Any aircraft owner can make a request to the FAA which removes their information from the public data feed.  If they do this, and have no ADS-B (as you say above), then they cannot be tracked by sites like this.
Answer: From the FlightAware FAQ:

How does FlightAware handle flights around the world? What is FlightAware's service area?
FlightAware's primary service area includes airspace operated by the United States (including Alaska, Hawaii, Puerto RIco, and Guam), Canada, the Caribbean, Australia, the United Kingdom, and France. Flights in the primary service area support real time maps, departure and arrival information, delays, and more.
FlightAware's secondary service covers scheduled major airline operations at any airport in the world. Flights in the secondary service area support departure and arrival information. Secondary coverage areas may have real-time positions for ADS-B equipped aircraft operating in FlightAware's ADS-B coverage area. Additionally, some airlines send FlightAware satellite position reports from aircraft worldwide that augments other position data and provides transoceanic coverage as well.
For flights arriving in a service area from outside of a service area, FlightAware will be able to track the flight when it nears a service area. For flights departing a service area, FlightAware will be able to track the flight until it leaves the coverage area. Flights may not be tracked beyond that point unless they enter another service area.
Not all worldwide data sources (e.g., European data, datalink ARINC/SITA ACARS, etc) are freely available on FlightAware.com due to government regulations or commercial arrangements. You can contact us if you have a commercial need for worldwide data.
Answer: Flight-tracking sites can track military aircraft, but generally don't.  For example, I live near a USAF base and can easily track dozens of military flights a day with an ADS-B receiver, but not one of those flights has ever shown up on FlightRadar24.
Comment: @RhinoDriver, Mostly various flavors of cargo planes and cargo plane derivatives, such as the KC-135.  A few oddballs like a U-2S or an E-6A.
Comment: What type of AF aircraft are you tracking with an ADS-B receiver? I'm curious which airframes have them now.
Answer: Flight tracking websites, such as FlightRadar24 and FlightAware, generally track aircraft using publicly available ADS-B transponder information. Privately operated aircraft are included as long as the owner of the aircraft has not specifically requested that their aircraft be excluded from public searching. For example: Steve Jobs' private plane's N-number was public information, but it was excluded from tracking on Flightaware.
Military aircraft are not included in public ADS-B tracking information.
For more on ADS-B and flight tracking, see the information from FlightRadar24 and FlightAware.
Comment: FlightAware also shows non-ADS-B traffic that has a filed flight plan.  So, GA traffic with flight plans shows up, but GA traffic without a flight plan does not show up.
Answer: Yes, recently PlaneFlightTracker provided exactly this live service both for NATO and Russian Military aircraft as well as Medical, Emergency, Safe and Rescue helicopters and airplanes. It starts with a procedure explaning how to track as well as Live Military Aircraft Maps. This site uses the FlightRadar24 map for embedment but has made an effort to extract necessary ICAO codes so that the users may get the proper maps.
Comment: *PlaneFlightTracker* is using the *Flightradar24* API and thus do not track a number of blocked aircraft. They are basing their "Military" designation purely on the ICAO `Aircraft Type Designation`.


Doing miswak and coronavirus

Question: Can I do miswak five times before every prayer nowadays. Because they're saying not to touch anything or bring it your mouth and other organs.
Comment: I think questions like these should be asked where there is medical expertise involved. Since this is not a fatwa site..
Comment: @Kilise yes this is not a fatwa site, but OP should elaborate first. He basically asks about how to use miswak while his statement says you can't do wudu' in first place. This way the whole question doesn't make sense. And I don't know of any expert who would agree to this claim. As long as you have washed your hands etc. everythng should be fine.
Comment: If that's the case how you do wudu'? You should handle it like with a teeth brush after being seek change it.
Comment: Brushing teeth is sunnah\mustahab not obligatory. Either way it is possible to practice caution without giving it up entirely: Wash your hands beforehand with soap and do not touch the bristles of the siwak. Keep the siwak covered\at home and if you suspect contamination then you can use a new one or also disinfect it with Hydrogen Peroxide.
Answer: The Prophet recommendation to do miswak with Wudu! So you would wash the miswak first and rinse your mouth afterwards. According to all Muslim doctors I have heard recently, coronavirus  washes away with water inshaAllah!

Doing miswak and coronavirus


Grout clogging up drain in bathtub

Question: I believe the person (idiot) who remodeled the home I recently purchased let the grout and other construction material he used to rehab the bathroom go down the drain.  I believe it has dried in the pipe and there is only a very small opening for water to drain through.  The house is a slab, so I can't get to the pipe under the tub.  Is there anything I can use to dissolve the grout so that the water will drain faster.  He obviously didn't know what he was doing as the tile is already bulging behind the faucet.
Comment: What makes you think it's grout and not a normal clog (hair, lint, paper, etc)?
Answer: I have used a Powerful Wet/Dry Vac for loose pieces before, if that is not the case, and the Grout is a solid piece, Go to the hardware shop and buy a small bottle of Hydrochloric acid, it's also called Muriatic acid in some places.
Dilute the acid with water (2 parts water, 1 part muriatic acid) and pour it down your drain. You may need the repeat the process a couple of times still the grout is dissolved and flushed away.
Make sure you wear eye, skin and breathing protection. Turn the bathroom fan on and open the windows. When you pour it down the drain leave the room straight away and close the door, come back in about 10 minutes and turn the water on the flush the drain.
If you are not confident doing that get someone else who has had experience with this type of acid. Hydrochloric acid is used a lot on building sites the clean and remove grout.
What I would try first is get the contractor back to your place and have him do it for you. That's the least he can do for you. If he won't come back I'm afraid you will have to do the job.
Comment: Always add acid to water when mixing. Not the other way around.

Grout clogging up drain in bathtub


What type of hardwood flooring and installation do I need for uniform look across three levels?

Question: I am ripping out the carpet across all three levels of my house -basement, ground, and upstairs. Basement and ground are concrete slab. I want to install engineered hardwood across all three levels so the flooring looks the same. But am getting lost in the installation method choice - floating, interlocking, adhesive, and nail/staple. I assume upstairs I can nail/staple with the subfloor, but what's best for the concrete slab levels? And will I be able to find wood that works across all three levels? Thanks!
Comment: A more important consideration is if the floors are flat to a long straight edge.  They don't need to be level, but most hard flooring like planks like less than 3/16ths from flatness.  Bigger dips/ridges are not good, but might be something carpet would hide.
Comment: Floating floor type would work, with a moisture barrier in the basement
Answer: Floating is an excellent method for use on a slab. You could use floating across all levels for consistency, or float on the concrete and nail/staple on the wood subfloor levels.
There are absolutely products which support all common installation methods. If you pick one that is appropriate to use below grade, it can be installed in the basement as well.


Console missing in Xcode 4

Question: My log window is missing in Xcode 4. I don't know what I did, but now there is just a blank gray box where it should be at the bottom the Xcode window.
How can I get it back?
Answer: This button should do the trick:

... which, on my window, can be found here:
Answer: XCode must have been in a funky state, closing and reopening fixed it.

Console missing in Xcode 4


Reference javax.script.ScriptEngine in android or evaluate a javascript expression

Question: Is it possible to reference the javax.script.ScriptEngine library when developing an android application?
If not is there anyway possible to evaluate a javascript expression in android?
Answer: For the classes javax.script.ScriptEngine, javax.script.ScriptEngineFactory and so on, you can add the jsr223.jar to your Android project: just copy the .jar file to your libs directory, and add it from Properties->Java Build Path.
These class will allow your JSR 223-compliant engines to compile. You can then do new SomeScriptEngienFactory().getScriptEngine() to get an engine. I've managed to do this with JNLua 1.0.4 and Rhino 1.7R2.
The file jsr223.jar can be downloaded from http://www.java2s.com/Code/Jar/j/Downloadjsr223jar.htm, a direct link is http://www.java2s.com/Code/JarDownload/jsr223/jsr223.jar.zip.
Comment: can you post a sample app?
Answer: javax.script.ScriptEngine is not a default part of android, but you could easily jar up any libraries you need(assuming the size is reasonable, I'm not sure) and include them in your project.
Answer: According to this post, javax.script.ScriptEngine is not available in Android SDK. You can try the steps below to include the library, but the code may not run, even though it will compile.
Using Android Development Toolkit in Windows, I performed the following steps to get javax.script library.

Right-clicked on the project, went to Properties (Project).
Under the Java Build Path, I chose Libraries tab.
Select Add Library located on the middle right of the Tab
Select JRE System Library under Add Library and click Next...
Select Workspace Default JRE (jre 7)
Click Finish.
Click Ok on the Java Build Path to exist project properties.

Javax.script was then loaded.
Answer: If you want to evaluate some code in JS in android
1) to your gradle dependencies add (rhino):
compile 'org.mozilla:rhino:1.7R4'

2) write some code like this to get the result of JS evaluation
Context rhino = Context.enter()
// turn off optimization to work with android
rhino.optimizationLevel = -1

String evaluation = "2+2"

try {
    ScriptableProject scope = rhino.initStandardObjects()
    String result = rhino.evaluateString(scope, evaluation, "JavaScript", 1, null).toString()
} finally {
    Context.exit()
}

3) You can write more complex scripts in JS to run in the android app also (functions etc.)


Mutual Funds: NAV vs Price

Question: When calculating the return of a mutual fund, do I look at the NAV(+dividends) or do mutual funds trade as different prices compared to their NAV like closed-end funds or ETFs?
Comment: U.S. Mutual fund shares (unlike ETFs and Closed End Funds) are issued by and redeemed by the MF company at Net Asset Value. There is no market price distinct from NAV.
Comment: Do you know if the same goes of European Mutual Funds?
Comment: No, sorry I don't know about European.
Answer: To calculate the return of a mutual fund, you should use NAV prices. NAV prices represent the value of the fund divided by the outstanding number of shares. The NAV is calculated by the fund custodian bank, most commonly on a daily basis. If you call your bank and buy a fund, the usual way is that your bank buys it from the mutual fund company. You pay the initial fee.
In Europe, you can also trade some funds on the stock exchange. The stock exchange is publishing prices frequently. This price is oriented to the NAV. Example: the NAV of a Mutual Fund is 100, calculated and published yesterday. Suppose that the fund portfolio is European stocks and suppose that the next trading day is a market surplus. The Stock exchange is predicting the next day NAV price and is publishing bid/ask prices higher than yesterday's NAV.
So if you have to calculate the return of a mutual fund, you should distinguish between NAV prices and market exchange prices.

Mutual Funds: NAV vs Price


Event registration times out with invoicing enabled

Question: Environment: shared hosting (LAMP), CiviCRM 5.18.2, Backdrop 1.14, PHP 7.2.23
When invoicing is enabled (pay later, no payment processor), event registration times out after confirmation screen is confirmed by user. No final confirmation/thank you screen shown, or email sent with pdf invoice.
PDF extension selected in CPanel PHP Selector > Extensions though throws same error if not selected; PHP timeout extended to 120 seconds, though this does not seem to override host settings (cannot restart Apache after changing).
Error message:
"[09-Oct-2019 23:57:10 Europe/London] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in ~/modules/civicrm/vendor/dompdf/dompdf/src/FrameDecorator/Block.php on line 193" Any thoughts gratefully received.
Disabling invoicing allows registration, and confirmation email sent with pdf invoice with no invoice number, just no contribution record or ability to generate copy invoice etc.
Comment: Update: host has increased PHP timeout to 300 sec. No improvement.
Comment: If you turn off the PDF option does it work as you'd expect?
Comment: does it include any images with biz size? if yes, reduce image size into KB.
Comment: @Laryn-CEDC.org: 'automatically include invoice...' switch on Admin>CiviContribute>CiviContribute Component Settings makes no difference. Works as expected when 'Enable Tax and Invoicing' is NOT selected.
Comment: @SunilPawar: No graphics in pdf - CiviCRM invoice template only with Civi logo removed.
Comment: Update: So that I can have something up that works for now, have set up another site reverting to D7/Civi for Drupal; works as expected. Keeping Backdrop site live to see if I can sort this out (with assistance from here most gratefully received if any further contributions can be made).
Answer: Generating a pdf can take a lot of memory and time. If you can turn of the PDF option, that should skip the problem, as Laryn suggested try to turn if off, at least to be sure it's the root problem.
But ff it really takes a lot of time (300 sec is a lot) it might be that you changed the layout of the pdf and/or include too many heavy things (like a huge heavy image for your logo?)
If you do need complex/heavy pdf, one workaround is to let civi delegate the hard work of generating that pdf to an external program. Check if your hosting provider can install wkhtmltopdf and under Admin/system settings/misc put the path of that program into "Path to wkhtmltopdf executable"
I use it for instances that need to generate loads of complex pdfs, the default civi way should work fine for "simple" pdf, it's likely you have something in your setting that is an issue (either faulty pdf layout if you customised it, non optimised images or something)
X+
Comment: I concur. I found that I was unable to generate almost all pdfs. Switching to wkhtmltopdf solved the problem for me in every instance. I haven't run into a downside.
Comment: @Xavier - Thanks. I will see if host can install wkhtmltopdf for me. Thanks also to Keith Nunn


Why are we forbidden to wear leather shoes on Yom Kippur

Question: Why are we forbidden to wear leather shoes on Yom Kippur?  Is it because leather shoes are a sign of wealth, or comfort; or does it have some thing to do with cruelty to animals?
Comment: If it had to do with cruelty with animals then it would not be allowed all year.
Comment: @GershonGold, cf. _pas palter_ in _aseres y'me t'shuva_.
Comment: We are supposed to afflict ourselves according to the Torah, and leather shoes are typically comfortable, so the halacha was made that we may not wear leather shoes on Yom Kippur. It doesn't have anything to do with cruelty to animals.
Comment: Though the straight halakha, AFAIU, is from Talmud (which identifies leather shoes as a status-marker), the meta-halakhic drash I've heard on this is that it's to allow animals to rest on a day when they, too, are judged.
Comment: @Aaliyah, if you can source that, you have a good answer. Why not post it as such?
Answer: The Talmud (Yoma 73b) lists the five obligatory "afflictions" (i.e. forbidden pleasures) of Yom Kippur:

Eating and drinking
Bathing
Anointing
Wearing shoes
Marital relations

Maimonides, in his commentary on the Mishna, summarizes the Talmudic discussion saying:

The Torah does not explicitly state the requirement to abstain from these things on the fast of Yom Kippur, but it uses the language of affliction (עינוי) five times... and tradition tells us that this is to prohibit these five forms of physical pleasure... for in Scripture we find that [refraining from] each of these five things is described as affliction....

With regard to the specific prohibition against wearing shoes, while there is some debate on the topic (see Minchas Chinuch 313:14), the dominant opinion is that "shoes" means specifically leather shoes (כל מנעל שאינו של עור לא מיקרי מנעל, see Beis Yosef OC 614), and therefore the prohibition applies only to leather shoes.
For the most part, in virtually all older sources, the discussion ends here, as there was apparently no perceived need to provide a special explanation for the the inclusion of wearing shoes (leather or not) among the required afflictions of Yom Kippur.
Among later sources, however, we do find some additional insights on this topic. Perhaps the most basic explanation is that given by Rabbi Samson Raphael Hirsch in Horeb (in his discussion of the laws of mourning (314:2), which he refers us to in his discussion of the laws of Yom Kippur (158)):

In the view of our Sages, the wearing of shoes on our feet betokens equipment for self-supporting activity. Thus, taking off one's shoes on holy ground is ordered several times in the Tenach as a sign of surrendering all one's self and of a complete submission to what is holy.

Unfortunately, R' Hirsch does not provide a source for this insight. However, the basic idea, i.e. that shoes symbolize the human capacity for self-sufficient action, can be found in several earlier sources (such as the Abudarham's commentary on the blessing, "שעשה לי כל צרכי").
Like R' Hirsch, a number of other commentaries associate the prohibition against wearing shoes on Yom Kippur with the prohibition against wearing shoes in the Temple, arguing that on Yom Kippur the entire earth is sanctified akin to the Temple and we are therefore required to walk barefoot. (R' Moshe Chagiz, cited in many sources, and R' Menachem Mendel of Rimanov, cited in Agnon's Yomim Noraim and in Artscroll's Yom Kippur)
The Arizal (in Shulchan Aruch HaAri, cited in Taamei Haminhagim) gives an esoteric kabbalistic explanation for why specifically leather shoes are forbidden. The basic point he makes is that leather shoes are associated with the "garments of skin" that God gave Adam and Eve after they sinned (Genesis 3:21) (which, according to medrash, were made from the shed skin of the serpent). Leather shoes therefore symbolize sin and impurity, which have no power on Yom Kippur. Thus, we are required to remove these shoes.
Finally, in a work titled Siddur HaMinhagim written by Rabbi Shlomo Tzvi Shik in the late 1800's, Rabbi Shik gives two original explanations for the prohibition against leather shoes.
The first, based upon a concept found in the commentary of the Shelah Hakadosh on the blessing "שעשה לי כל צרכי", is that leather shoes symbolize man's dominion over all of creation. However, R' Shik argues, a sinner has no such claim of dominion. Thus, on Yom Kippur, when we engage in repentance and confess our sins, we remove our leather shoes to demonstrate our recognition of our sinfulness.
R' Shik's second explanation is based on a custom that when a person would wear a new garment, people would bless him that, "You should wear it out and get a new one." However, some write that one should not say this with regard to a leather garment, as this would require killing an animal and Scripture (Psalms 145:9) states, "His mercy is upon all His creations." Similarly, when slaughtering an animal for the first time, while one does recite the blessings of Shehecheyanu on the mitzva of kisui hadam (covering the blood, assuming it is required, as with a bird), one does not recite Shehecheyanu over the actual slaughtering because, according to some, it involves harming a living creature. Similarly, R' Shik argues, being that Yom Kippur is a day of Divine mercy, it is improper to wear leather shoes.
This latter explanation (which, despite its rather obscure origin, has gained remarkable popularity, mainly because of its inclusion in Agnon's Yomim Noraim (and in the very popular, and heavily abridged, translation, Days of Awe), and, in turn, in many other such collections (including Artscroll's Yom Kippur)) is actually rather difficult in that it would imply that all leather garments should be avoided on Yom Kippur, and there is no such practice (although Agnon does cite a source that the Terumas HaDeshen, R' Yisrael Isserlein, preferred to avoid wearing any leather garments on Yom Kippur).
Answer: wearing leather footwear is associated with being able to work and provide for one's needs. For this reason we also admit the bracha in the morning, "...who has provided me with my every need." while it isn't done today at one point each of the brachos were said in a certain order and we related to certain articles of clothing with dressing in the morning. Yom kipur is a day in which we don't focus on the gashmyus of life and so we don't do 5 specific things of which wearing leather shoes which are connected to working for a livelihood.
no connection to cruelty to animals. although separately from yom kipur there is a commandment against tzaar baalei chayim and therefore one would not be aloud to produce leather shoes using such a manner.


Silverlight developer, learning ruby, rails

Question: As said in title I'm SL developer and want to learn ruby and after adopt rails. Which books/resources/screencasts you can recomend to get up and running quickly?
I'll use Linux and chosed Netbeans as IDE but if i won't like it i'll use gedit. What can you say about this?
Answer: I wouldn't go nuts on an IDE. just use a text editor.
If you're on silverlight:

Pay for this git screencast at peepcode
Buy the beta version of Agile Web Development with Rails (covers rails3)

Build the Depot store using the book and you'll fall in love.
Answer: For Ruby, the Pickaxe book is still the standard reference.
http://pragprog.com/titles/ruby3/programming-ruby-1-9
For Rails snippets, it's hard to go wrong with Railscasts.
http://railscasts.com/
Answer: You might consider jumping straight into rails if that is your end-goal. Checkout http://railstutorial.org/book
Answer: I use both the PragProg Rails book and The Rails Way by Obie Fernandez. The first works well as an introduction, the second works better as a reference. If you have to choose one, honestly I'd go with RW.
Ryan Bates' RailsCasts are essential.
All of the peepcode rails material is worth purchasing. If you're coming from a mostly Windows world as I was, the Unix screencasts are just as important as the rails stuff. I bought the year subscription and haven't regretted it.
Although I find the organization and overall tone not really my cup of tea, the content of Metaprogramming in Ruby has been extremely helpful in understanding many of the Rails idioms. I'd say understanding the techniques in this book are as essential as anything else. Once you're comfortable in the basic Rails framework, spend some time here. There will be a ceiling on your productivity if you don't dive in to metaprogramming concepts, and although it's essential to Rails, there's really nothing analogous to that style in the Java/.NET world.
Answer: Try searching StackOverflow first :) Learning Ruby on Rails


Why are expired @ViewScoped beans not destroyed until the session expires

Question: I'm using Mojarra 2.2.4 on GlassFish 4 with Java 7.
As I understand from BalusC's answer to How and when is a @ViewScoped bean destroyed in JSF?, @ViewScoped beans should be destroyed in three cases:

Post-back with non-null outcome
Session expiration
Maximum number of logical views in session exceeded

My beans are being destroyed in the first two cases, but not when the maximum number of logical views is exceeded. I have verified that the beans do expire when the maximum is exceeded (I get a ViewExpiredException), but they are still not destroyed until the session itself expires.
For memory consumption reasons, I would like to have the beans destroyed in this third case, especially since they are not usable after expiration.
Questions

Why are the beans not destroyed when they expire?
Is this a bug or expected behavior?
What would be a clean work-around to make sure the beans get destroyed?

Update: OmniFaces ViewScoped annotation destroys beans as soon as they expire.

Minimal Example
Here is my bean:
@javax.inject.Named("sandboxController")
@javax.faces.view.ViewScoped
public class SandboxController implements Serializable {
    private static final Logger log = Logger.getLogger(SandboxController.class.getName());
    @PostConstruct
    public void postConstruct() {
        log.log(Level.INFO, "Constructing SandboxController");
    }
    @PreDestroy
    public void preDestroy() {
        log.log(Level.INFO, "Destroying SandboxController");
    }
    public String getData() {
        return "abcdefg";
    }
}

and my sandbox.xhtml:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

        <h:form>
            <h:outputText value="#{sandboxController.data}"/>
        </h:form>

and part of my web.xml:
<context-param>
    <param-name>com.sun.faces.numberOfLogicalViews</param-name>
    <param-value>3</param-value>
</context-param>
<context-param>
    <param-name>com.sun.faces.numberOfViewsInSession</param-name>
    <param-value>3</param-value>
</context-param>

If I refresh the sandbox.xhtml 50 times, I get 50 copies of INFO:   Constructing SandboxController in the log. The beans are not destroyed, regardless of how many times I refresh. VisualVM confirms that the beans are still referenced by the UIViewRoot's ViewMap. In my full-size bean, which maintains a fair bit of state, I quickly get an OutOfMemoryException.
When I manually expire the session, I get 50 copies of INFO:   Destroying SandboxController.
If I add a submit button to sandbox.xhtml and load it up in 4 different tabs, then try to submit the first one, I get a ViewExpiredException, as expected, but the bean is still not destroyed.
The behavior is the same if I instead use the javax.faces.bean.ManagedBean and javax.faces.view.ViewScoped annotations. However, the OmniFaces annotation org.omnifaces.cdi.ViewScoped works properly.
To clarify...
My @ViewScoped beans are being destroyed on session expiration, unlike problems described in related questions such as Linked ViewScoped beans lead to memory leaks
I am not asking why each bean is not destroyed immediately on subsequent refresh as questioned here: JSF 2.1 ViewScopedBean @PreDestroy method is not called. I want to know why it is that even when they expire, and are no longer useful, they are still not destroyed, and thus continue consuming memory.
Answer: I was able to find a clean work-around by using the OmniFaces @ViewScoped annotation (org.omnifaces.cdi.ViewScoped) instead of the standard @ViewScoped (javax.faces.view.ViewScoped).
The OmniFaces ViewScoped correctly destroys the beans as soon as they expire.
See here for more details:
http://showcase.omnifaces.org/cdi/ViewScoped


Why does my MacBook sometimes ring the startup chime four more times after the initial chime?

Question: Sometimes, not always, upon restarting my Macbook (late-2006), the chime is repeated four more times after the initial chime.  It then starts up normally.
Answer: Does it happen in quick succession to where you could say the the unit chimes 5 times at start up? Or does the system reboot between each chime?
If they happen in quick success I would suspect a RAM Module issue. If it is so that the system reboots each time I would lean more towards an issue with the MLB's boot ROM. Late 2006 MBP parts are getting scarce since a Apple computer can only be serviced for 5 years from DOP. Hopefully that will give you a bit of information.
Another (distant) possibility is that the OS is corrupted after trying to do a software update. That one is a bit tricker to find but best tip is to run a complete backup of the unit, re-install the OS from the DVDs that shipped with the unit and the reapply all available updates (making sure the unit is attached to power the entire time).
Answer: You can take a look at the Power On Self-Test codes from Apple ( http://support.apple.com/kb/HT1547 ), copied here for convenience:
<code>1 beep = no RAM installed
2 beeps = incompatible RAM types
3 beeps = no good banks
4 beeps = no good boot images in the boot ROM (and/or bad sys config block)
5 beeps = processor is not usable
</code>
If you have 5 beeps, it might be a processor problem. Note that the chimes will be uniform, all of them the same, if there is a problem the "normal" chime is not played, just N beeps as stated above.