Updating a gameobject position that needs to be consistent across all players' games

Question: I am creating a real time multiplayer game in Unity 3d using Google Player Services that has a ball that the players will interact with. I'm not particularly sure how I will update the ball's position on all of the games though. I have each player sending updates for their positions and all of that but with the ball being interacted with by all players I'm not sure how to figure out who's update of the ball position I should take.
Comment: Is that ball a physical object in your game? Or you are moving it manually?
Comment: @HamzaHasan It is a physical object that has physics working it and everything.
Comment: Then I'd suggest to send only initial calls, for example initial force applied by a player, and thn apply the same force vector on other hand, instead of updating positions at every frame. Then at the end verify the position and all that
Comment: I presume this is a game without a dedicated server component? That is, the multiplayer is peer-to-peer?
Answer:
I'm not sure how to figure out who's update of the ball position I
  should take.

One way to handle this problem is to introduce the concept of authority over an object. It's particularly useful in games that aren't backed by a dedicated server process (if there is a dedicated server, just make the server the authority for the ball's simulation).
The client that has "authority" over a particular object is the one responsible for the simulation of that object that everybody else eventually sees. Even if each client does some local prediction of the ball movement (which they probably should), they will ultimate defer to the authoritative corrected state of the ball sent to them from the client with authority over that ball.
Grant authority to a client when that client first interacts with the ball in some fashion. That client retains authority over the ball until some other client touches or interacts with it. While a client has authority, it's the one responsible for periodically sending updates to everybody else.
You'll need some form of consistent timestamp or token mechanism to resolve who wins in the event that two clients interact with the ball at approximately the same time.


How long should it take to get a copy of my contract?

Question: I have requested a copy of my contract but 10 days later still haven't received it. How long before they have to / should respond?
Comment: As a rule, I always require an immediate copy for me of documents  I am signing, be it at a job negotiation or at the bank. Any refusal is deemed as abusive, and I wont sign it. As for the actual copies that have to be signed by this or that person, they  can take a month or two, I do not care, for me it does not make difference. For people with a house mortgage, it may make a difference for  showing them at the bank. Your question is not exactly that verbose on details why it is being asked.
Comment: With zero details in the question, this cannot be answered. Maybe the only HR person is out sick? How would we know? You should get a copy immediately upon signing (matter of fact both parties should sign both copies) anything else would be seen as a scam where I live.
Comment: Why did you need to request a copy of your contract? Normally you should get a copy of the contract before signing it? Did you get one and lose it? Or did you never get one? Have you even signed your contract yet? Please edit to clarify.
Comment: Where are you / the company based? Without that detail we can't tell what laws apply, and therefore cannot answer how long before they *have* to respond.
Comment: How long after what? You should have it before you give notice at your previous employer.
Comment: Have you reminded them of your request? Please [edit] your question to tell us how you've followed up. People sometimes miss things unintentionally.
Answer: I would NOT work for a company which does not provide a valid, properly-signed-by-all-parties contract, LATEST during the first day of work.
I would make an exception (but not more than a few days) ONLY if they provide a very reasonable reason.

If there is a reasonable motive to not have a proper contract in due time (i.e., more than a few days), then the company should release you a kind of "pre-contract", where they specify all the conditions of the contract, AND they mention that the proper contract will follow latest after XYZ days.
Answer: In a decent and well-organised company, on your first day at work you go into an office with HR, they have two copies of the contract, they sign one and hand it to you to keep it, and you sign the other one and hand it to them to keep it.
Comment: @nvoigt that depends on timing and location. Acceptance of the offer by both sides makes it legally binding in many jurisdictions, and signing may happen on the first day of work or even later if vacations or illness get in the way. Heck, I've accepted a job offer where the manager who had to sign the contract was on a foreign vacation from before the date I accepted to after the date I started. He'd approved the hiring budget so I could be hired but didn't see the contract until after I started.
Comment: That sounds very dodgy to me. If you quit your job hoping your contract is fair when you arrive at your new company they have you in a vulnerable position but I guess different countries do things differently.
Comment: In a well organized company, that formality takes place before you hand in your resignation with your future former company.
Comment: @jwenting "Acceptance of the offer by both sides makes it legally binding in many jurisdictions" in my jurisdiction, two signatures are the proof two parties consented to a contract. While verbal agreements are binding in theory, they are worth the paper they are written on in practice. You would need the other party to actually admit you had a verbal agreement and why would they do that.
Answer:
"How long before they have to / should respond?"

In most of the cases, for a contract being finalized, every involved party gets a valid copy of the contract, with all the authorization (signature, seal etc as applicable) as the contract gets signed. Considering the time taken for doing the due diligence (taking print out etc), I see no reason for not getting a copy on the same day as it's finalized / signed.
Unless you have a copy (either in an electronic format or a hard-copy/print out), there's no way you can claim anything about the contract.
Follow up immediately and push for getting yourself a copy ASAP.
Answer: If you accept the offer, the contract may take a very long time to arrive.
It may actually never arrive.
If you say, let me take a look at the contract before I accept, the contract is FedExed to you the next day (or in the next two business days at the very most).
Note: Please replace the word FedEx with the fastest method of delivery in your area. It could be DHL, Express mail, a messenger on a bike. Whatever is the fastest method of delivery in your area (assuming they don't use email or electronic signatures).
Comment: Well, the contract should be there when you arrive for your first day at work at the latest, unless something's gone wrong (I've had it happen that the CEO who had to sign it was on vacation from the day before I accepted to a week or so after I started for example).


why does directional derivative move fastest along the gradient?

Question: i have just started learning multi-variable calculus , i learned that directional derivative moves fastest along the gradient . i am not able to digest it well as for the 2-D curves that i studied a curve moves fastest along the tangent and slowest along the normal but over here it moves fastest along the gradient and slowest along the tangent plane . i am not able to understand why ?
thanks for your help
Comment: It's a dot product, and since we have the formula

$$\mathbf{a}\cdot\mathbf{b}=\lVert\mathbf{a}\rVert\lVert\mathbf{b}\rVert\cos \theta$$

and $\cos\theta\le 1$

with equality iff $\theta=0$ we get the result.
Comment: Why? If you're talking about the **function** $f(x,y,z)=x^2+y^2+z^2$, then it is not a sphere (only the slice of the function, $f(x,y,z)=1$, is a surface). But the gradient to the **graph** has no such constraints.
Comment: i understood the maths , but i am not understanding it qualitatively , for example take a sphere , at its pole the surface becomes flat but rate of increase is said to be maximum vertically , which seems contradictory to me
Answer: In the case of $t \mapsto (x(t),y(t))$ the tangent to the curve is $(dx/dt, dy/dt)$. The tangent points in the direction in which $t$ increases along the curve. In contrast, a level curve $f(x,y)=k$ is the set of all $(x,y)$ which solve the equation. So, you can't compare these directly. The manner in which the curve is described is different. In the case of the level curve, if you have a parametrization $(x(t),y(t))$ of the level curve $f(x,y)=k$ then that means $f(x(t),y(t))=k$ for all $t$. But, then differentiate and use chain rule to see:
$$ 0=\frac{\partial f}{\partial x}\frac{dx}{dt}+\frac{\partial f}{\partial y}\frac{dy}{dt} = \langle \frac{\partial f}{\partial x},\frac{\partial f}{\partial y} \rangle \cdot \langle \frac{dx}{dt},\frac{dy}{dt} \rangle. $$
This shows that the tangent vector and the gradient vector at the same point are perpendicular. The tangent vector does not really say much about how $f$ is changing, however, the magnitude of the gradient gives the max-rate of change in $f$. Many different curves take the same tangent here, but the gradient is connected to the level function $f$.


What VAT rate to charge for intra-EU sales?

Question: I am VAT registered in 2 EU states and often sell to other EU states where I am not registered for VAT as I am under the distance selling threshold. One thing is still not entirely clear to me is what VAT rate I should put on the invoice? Should it be the the rate I pay to revenue or the local rate where the customer is located?
Comment: [This page](https://www.gov.uk/guidance/register-and-use-the-vat-mini-one-stop-shop) on the UK Government's website _might_ be helpful. It seems focused mainly on "_sales of digital services_", but includes "_VAT is charged at the rate due in the consumer's country_" (not certain if that applies to physical goods as well). The page was last updated before the UK left the EU, so I would _imagine_ that would be an EU-wide rule.
Comment: MOSS is for services and is optional so doesn't really apply here, though the rules may turn out to be the same in the end for VAT.
Answer: The underlying principle is taxation in the Member State of destination. The details are available under the URL below, and depend heavily on what, how and to whom you are selling.
Where to tax?
As requested by OP in the specific context of supplying goods for distance sales if the supplier's annual sales are below the threshold applied by the customer's Member State:

Supply of goods
The place of taxation is determined by where the goods are supplied.
This not only depends on the nature of the goods supplied, but also on
how the supply is made.
The supply of goods is taxed at the place:
[...]

where the goods are located when the dispatch or transport to the customer begins for distance sales if the supplier's annual sales
are below the threshold applied by the customer's Member State (except
if the supplier has opted to tax in the Member State of destination)
[Article 34 of the VAT Directive]

Example 4: A French company is selling CDs via the internet to private
customers throughout the EU. When CDs are sold to customers in
Denmark, Danish VAT must be charged when the Danish threshold is
exceeded, while Dutch VAT must be charged to customers in the
Netherlands when the Dutch threshold is exceeded.
Example 5: If the annual sales by the French company (see above
example 4) to customers in Belgium do not exceed the Belgian
threshold, the CDs will be taxed in France.
Example 6: When the French company supplies to a customer in
Luxembourg and the French company has taken the option to tax at
destination, the CDs will be taxed in Luxembourg.
[...]
Comment: Please add bullet point 4 from "supply of goods" section as that answer the question.


WAS server - attach policy set to a single JAX-WS client

Question: I have a java project (*.jar) that has code for 10 JAX-WS clients. One of the clients uses WS-Security and needs policy set/bindings to be attached to  it. Remaining nine clients use plain HTTP without any security to invoke respective services.
I used instructions from http://www.redbooks.ibm.com/redbooks/pdfs/sg247758.pdf section 6.5 and configured local/developer RAD workspace, such that the policy set/bindings are associated only to the secure service client, and am able to invoke all services successfully.
However, in our QA environment, from WAS Admin Console am unable to associate the policy set/binding to the specific service. It is either all or none. That is, either I can attach the policy set to all 10 clients, and the secure client works OR I can detach the policy set and remaining 9 HTTP clients will work.
Can you help me understand why i am not able to attach the policy set to the secure service alone?
Thanks for your help in advance.
Answer: IBM confirmed that it was a defect in WebSphere Application server v 188.8.131.52.
The regular expression matcher that attached the policy set/bindings to a JAX-WS call was not working. Hence we could not attach it to an individual service, but it worked when we attached it to the entire EAR.
IBM provided us with a fix


XEN: Cannot Install Centos 8 as PV-based DOMU with Debian 10 DOM0

Question: My goal is to install CentOS 8 as a Guest/DOMU on a Xen system managed/installed via Debian 10.
I need to use PV since the hardware doesn't support HVM as it is quite old. HVM would obviously simplify this greatly.
Creating Debian PV's is trivial, but installing a foreign OS from ISO or repo is proving to be very difficult for a newbie to Xen like myself.
Two resources that got me this far:
https://wiki.alpinelinux.org/wiki/Create_Alpine_Linux_PV_DomU
https://www.systutorials.com/install-paravirtualized-centos-7-domu-xen/
I have the following configuration being used to generate the VM (centos-8.2.pvlinux). You will notice kernel and ramdisk is commented out, downloading or extracting the CentOS PXEBoot kernel and RAMDisk caused failures earlier in the process, and using the Debian versions at "/" seemed to work, at least initially (CentOS version downloaded from mirror at '/centos/8.2.2004/BaseOS/x86_64/os/images/pxeboot/').
kernel = "/vmlinuz"
ramdisk = "/var/opt/xen/ISO_Store/CentosPXEBoot/initrd.img"
#ramdisk = "/initrd.img"
extra="modules=loop,squashfs console=hvc0"

# Path to HDD and iso file
disk = [
        #'file:/vmdisk0,xvda,w'
        'format=raw, vdev=xvda, access=w, target=/dev/mapper/vg_1-domain.com',
        'format=raw, vdev=xvdc, access=r, devtype=cdrom, target=/var/opt/xen/ISO_Store/CentOS-8.2.2004-x86_64-boot.iso'
       ]

#extra="ksdevice= inst.repo=https://mirror.jaleco.com/centos/8.2.2004/isos/x86_64/ nameserver=18.104.22.168"

# Network configuration
vif = ['bridge=xenbr0']

# DomU settings
memory = 3072
name = "centos-8.2"

This causes the following, I have abbreviated the output:
Parsing config from /etc/xen/centos-8.2.pvlinux
[    0.000000] Linux version 4.19.0-10-amd64 (email@example.com) (gcc version 8.3.0 (Debian 8.3.0-6)) #1 SMP Debian 4.19.132-1 (2020-07-24)
[    0.000000] Command line: modules=loop,squashfs console=hvc0

....

[   16.434798] systemd[1]: Detected virtualization xen.
[   16.434844] systemd[1]: Detected architecture x86-64.
[   16.434880] systemd[1]: Running in initial RAM disk.

Welcome to CentOS Linux 8 (Core) dracut-049-70.git20200228.el8 (Initramfs)!

[   16.446415] systemd[1]: No hostname configured.
[   16.446473] systemd[1]: Set hostname to <localhost>.
[   16.446725] random: systemd: uninitialized urandom read (16 bytes read)
[   16.446775] systemd[1]: Initializing machine ID from random generator.
[   16.621449] random: ln: uninitialized urandom read (6 bytes read)
[   16.623730] random: ln: uninitialized urandom read (6 bytes read)
[   17.062380] systemd[1]: Reached target Timers.
[  OK  ] Reached target Timers.

....

[  OK  ] Started iSCSI UserSpace I/O driver.
[  OK  ] Stopped iSCSI UserSpace I/O driver.
[FAILED] Failed to start iSCSI UserSpace I/O driver.
See 'systemctl status iscsiuio.service' for details.
[   22.462372] systemd[1]: Started Journal Service.
[  OK  ] Started Journal Service.
[   23.688098] dracut: FATAL: iscsiroot requested but kernel/initrd does not support iscsi
[   23.688178] dracut: Refusing to continue
[   23.869896] systemd-shutdow: 56 output lines suppressed due to ratelimiting
[   24.013409] systemd-shutdown[1]: Syncing filesystems and block devices.
[   24.013708] systemd-shutdown[1]: Sending SIGTERM to remaining processes...
[   24.019611] systemd-journald[121]: Received SIGTERM from PID 1 (systemd-shutdow).
[   24.026531] systemd-shutdown[1]: Sending SIGKILL to remaining processes...
[   24.032149] systemd-shutdown[1]: Unmounting file systems.
[   24.038715] [371]: Remounting '/' read-only in with options 'size=1497604k,nr_inodes=374401'.
[   24.039938] systemd-shutdown[1]: All filesystems unmounted.
[   24.039986] systemd-shutdown[1]: Deactivating swaps.
[   24.040223] systemd-shutdown[1]: All swaps deactivated.
[   24.040259] systemd-shutdown[1]: Detaching loop devices.
[   24.040650] systemd-shutdown[1]: All loop devices detached.
[   24.040687] systemd-shutdown[1]: Detaching DM devices.
[   24.051030] xenbus: xenbus_dev_shutdown: device/vif/0: Initialising != Connected, skipping
[   24.051080] xenbus: xenbus_dev_shutdown: device/vbd/51744: Initialising != Connected, skipping
[   24.051114] xenbus: xenbus_dev_shutdown: device/vbd/51712: Initialising != Connected, skipping
[   24.051183] reboot: System halted

I have tried removing the ISO and using the Extras line for grabbing the ISO, but I have the same result.
I have also tried creating a non-volume group disk, same result.
Any guidance is very much appreciated, thank you.

Update:
Long story short. There seems to be a consensus that CentOS 8 does not support PV environments.
Why this isn't supported is beyond me, since this prevents usage of PVH environments that perform much better than default HVM setups.
There is apparently support within PV using a third party kernel from elrepo. But how you could manage to install Centos8 within a PV using this is not something I'd care to figure out myself. This kernel primarily seems useful for individuals who want to use PVH environments where PV interfaces are used within HVM.
I'll have to use different OS for now.
Answer: CentOS 8's default kernel has no support for Xen PV or PVH - these were removed by Red Hat. It can be run as HVM but you said that your hardware does not support that.
It is possible to run CentOS 8 in PV or PVH mode by enabling the elrepo and using kernel-ml from it as your kernel. That is the mainline Linux kernel and as such hasn't had Xen PV/PVH support removed from it. elrepo does however come with no form of support.
You can install it into a chroot from any existing Linux or Unix-like computer. Here are some step by step instructions which use this provider's "rescue VM" but if you have administrative access to the host computer you can do it from there.
https://tools.bitfolk.com/wiki/Installing_CentOS_8


What happens to the rotational kinetic energy?

Question: There is a classic example that a spinning skater pulls his arms back. The angular momentum is conserved, the moment of inertia decreases. And therefore, it's angular velocity increases, so the rotational kinetic energy will increase. But what will happen if the skate pushes his arms outward? The rotational kinetic energy will decrease. But where will it go?
Comment: @Buraian I think that might be a little different. Pulling your arms in and relaxing your arms are two different things, and they are not the reverse of each other (your muscles don't get energy back when you relax them and your arms fly out).
Comment: Absent the tiny amount of energy needed to move the arms, the total energy remains constant.
Answer: When the skater is pulling his arms towards his torso he is doing work.
Now to the converse of that:
First: To remain spinning fast the skater must sustain a large centripetal force: that's  just to keep his arms close to his torso. By easing up that centripetal force he allows his arms to move away from his torso. The motion of his arms moving away from his torso is the converse of pulling in his arms. Due to this motion of his arms (away from his torso) the mass of his arms is doing negative work, decreasing his rotational kinetic energy.
During the stage that the skater is pulling his arms towards his torso his muscles are exerting a slight surplus of centripetal force, this surplus causes the contraction.
During the stage that the skater allows his arms to extend again he is still exerting a centripetal force, but now slightly less than the required centripetal force, such that his arms move away from this torso in a controlled manner.

Negative work
At first sight the concept of doing negative work may appear counter-intuitive, since it is always taught that energy is a scalar.
Textbook authors often rearrange the description of a setup to avoid the concept of negative work. Take for example the following setup: a cylinder with a piston and by applying force to compress a gas in the cylinder you are doing work upon the gas, compressing it. Now: when you are allowing that compressed gas to relax again you are doing negative work upon the gas. But textbook authors will describe that as follows: "The expanding gas is doing work". That is a change of perspective just for the purpose of avoiding the expression 'negative work'.
In the case of the skater allowing his arms to extend again to slow himself down: that change of perspective isn't available because the skater pulling in his arms is not done against some other force.

Where did the rotational kinetic energy go to?
In order to generate a lot of rotational kinetic energy the skater has to set up for that. He pushes off with his skates against the ice to give himself an initial angular velocity while holding his arms extended. Those two are both necessary. Without initial angular velocity contracting the arms doesn't do anything. And if his arms are already tight to his torse when giving himself initial angular velocity then he doesn't have any distance to do work. With both in place the skater has set up the ability to do work.
Of course, all of that setup would be useless without muscle power. The contracting force is provided by the skater's muscles. The energy source for the increase of rotational kinetic energy is muscle power.
When the skater extends his arms again he is decreasing his angular velocity. During that phase his muscles are absorbing energy. As we know, while muscles are good at extending in a controlled manner, muscles do not recoup energy. (In fact, extending a muscle in a controlled manner costs energy too.) So if a skater spins up and spins down repeatedly he will work up a sweat because each cycle his muscles absorb the rotational kinetic energy that was generated on spinning up.
Answer: The other answers are stating some incorrect things here. Yes, when you pull your arms in your muscles are doing work on your arm, but if you

relax your arms so they fly out, then you aren't doing work on your arms, or if you

push your arms out so that you are doing work on your arms, then you are doing positive work on your arms. Furthermore, doing an opposite motion with other muscles does not give your muscles back energy.

So what is going on here? There has to be some radial force doing negative work here. It turns out it is still your arms, but you have to consider the entire motion of your hands and arms to see it.
When you either relax your arms$^*$ so that they start moving radially outwards, that isn't the end of the story. This can easily be seen by a simple model of an object that was moving around a horizontal circle on a string where the string is suddenly cut. Here the object will move tangentially away from the previous center of rotation, and the kinetic energy will remain constant since no forces are doing work.
Coming back to our scenario, obviously our hands and arms do not fly outwards forever, so there needs to be a radially inward force at the end to stop our arms (this can be applied willingly with muscles or unwillingly by whatever prevents our arms from popping out of place). This is where your negative work comes from.

$^*$ The following analysis works for pushing your arms out as well, but that just includes an additional step of adding energy to your hands before taking the energy away.
Answer: We can write angular momentum as:
$$ \frac{L}{I} = \omega$$
and, hence we can write energy as:
$$ K =  \frac{1}{2} I \omega^2 =  \frac{L^2}{2I}$$
So, since the angular momentum of the system is conserved in absence of external torques (when you move your arms you generate internal torques which sum to zero). Hence, the Kinetic energy is purely a function of rotational inertia:
$$ K(I) =  \frac{C}{I}$$
So, suppose we reduce inertia by pulling our arms in closer then our kinetic energy increases and when we increase inertia by pulling outwards kinetic energy increases.

The increase and decrease of energy can be associated with the changes in configuration of a system. When you move your arm, you have to do a work with that.
Here is an idea for understanding this better:
Think of your whole arms as a spring , so when you put your arms more outwards, it's like extending a spring. The energy at a given extension is given as:
$$ E= \frac{k}{2} x^2 + \frac{C}{I}$$
So, when I increase my $x$ my kinetic energy has to adjust in such a way that my energy is a constant by the conservation of energy.
Note: this is a really gross approximation.

References:
Simple university article
Muscles as locomoter springs (pubmed)
Spring mass model for jumping (pubmed)
Comment: Pulling your arms is not the same thing as compressing a spring. You don't store energy in your arms when you bring them in and then release that energy when you extend them (or vice versa, as you talk about here).
Comment: I'm pretty sure you can compress/ extend your arm beyond it's natural length. For example consider how we jump. We push compress our leg muscle and then when we jump, we quickly let them extend outwards just like a spring. So, quickly thrusting our arms to be more outwards could be thought of as compression and extensions.
Comment: Finally I am not at all talking about an exact model. I did not say they are same thing, I said they can be grossly approximated as so.
Comment: http://downloads.lww.com/wolterskluwer_vitalstream_com/sample-content/9780781774222_Oatis/samples/Oatis_CH04_045-068.pdf

see page -55 , pic-4.14
Comment: You can make analogies with springs, but I don't think you can take the analogy to a place where movement of your muscles stores energy in them. In your jumping scenario, it's not like bending down stores energy, and then to jump you just release that stored energy.
Comment: If you go deeper into the molecular picture (I only have very little biology education) then we can think of the muscle fibers can stretch and contract at a spring.  Further, there is done study of this model which exists here [spring mass sys](https://pubmed.ncbi.nlm.nih.gov/2625422/)
Comment: Finally it's not just an analogy .. It's been used as a model. I don't want to get into the philosophical debate of analogy vs mode, but my point is that there is definitely energy  changes associated with the extension  and contraction of muscles, and, in a gross approximation we can think of all those little muscles fibers as one single spring unit
Comment: But you don't store energy in your muscles by moving them a certain way.
Comment: Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/113441/discussion-between-buraian-and-biophysicist).
Answer: These answers seem to be missing the point.  Ignoring the relatively small amount of energy required to change the position of the arms, and ignoring friction, energy is conserved.
If we model the skater as a circle with circumference of one meter, with two 1kg weight at the extremes, rotating at 1 revolution per second, the kinetic energy will be 6 joules.
KE=1/2mv^2
If the circumference is reduced to 1/2 meter, the kinetic energy will be preserved, causing the rotational rate to increase to 2 revs per sec, preserving the 1 meter/second velocity.
"Angular momentum" is just a way to describe overall momentum for a rotating mass that does not have point masses but instead has the mass distributed across it's diameter somehow.  But it can be approximated by "dicing" the mass into smaller pieces and calculating the velocity of each, then applying the rules for linear momentum/energy.  (Or, if you're into self-abuse, calculate the integral.)
Comment: In your approximation it seems right but this contradicts the other answers but is still a reasonably good explanation of what is going on...
Comment: This doesn't conserve angular momentum - the angle velocity becomes twice but the moment of inertia has decreased four times because of the R squared dependence
Answer: The skater does work with her arms when bringing them closer to
her body or pushing them further out, and that work done manifests as a decrease or  increase in rotational kinetic energy. So the TOTAL energy does not actually go anywhere since total energy (and momentum) is conserved. Work done results in a change of kinetic (or potential in other cases) energy. If she brings here arms back, the rotational kinetic energy returns to its original value, so overall the total energy is conserved (assuming no energy losses to friction, air resistance etc).
Comment: If you push your arms out then you're doing positive work on your arms, so why would the energy decrease during that step?
Answer:
The rotational kinetic energy will decrease. But where will it go?

It goes into the linear kinetic energy of the arms as they accelerate from the body outward.
When the arms are slowed (either by muscles or by pulling on tendons), that energy is transformed into heat.
Answer: It doesnt go anywhere.
All this assumes you ignore friction and energy used to move the arms.
In the long run all the skaters energy becomes heat which is where it went.
In the simple example it is the opposite of pulling the arms in, the same way you analysed that case,  but in reverse.


unable to boot Ubuntu from a dual boot with windows 8.1

Question: just finished installing (dual boot)Ubuntu on my second partition,the first one containing windows 8.1,the installation went on smoothly until the end.but now the problem is that when i power on my computer there is no option to boot into Ubuntu and windows 8.1 just loads normally..is there something wrong..and can anyone help...thanks in advance.
Answer: Your problem is with your bios. After installing Ubuntu you need to select Ubuntu in your bios boot menu. The location varies with different bois.
It is in the section that covers uefi and secure boot you will see a menu listing both OS


HUD Text not displaying/drawing

Question: I am trying to use blueprints to display my character's speed using a HUD, but for some reason the text is not displaying. What am I doing wrong? I am using the First Person template.
Answer: There are some mistakes in your try.
The white lines are the execution path, the steps are executed in the order they are linked with the execution pins.
In your picture you can see that the first "Cast To FirstPersonCharacter" has no execution pins connected. So this is never executed.
And you use the output of this node as input for another cast node this value is null because the first cast has no input. Then you read the display name but not the velocity of the character. And again you did not connect the execution pins of the node where you try to set the string. So this step is skipped. In the end there is no value (null) that could be printed by the Draw Text node.
But now the solution:
You chose the HUD to show the text which is ok. Natively the hud draws the crosshair, which you can leave untouched. Simply put the part to draw the speed afterwards. Connect the execution output pin from the Draw Texture Node with your new nodes.

HUD Text not displaying/drawing


Do metrically weak chordal skips cause parallel 5ths and octaves?

Question:
I am trying to decorate a descending fifths sequence by using chordal skips and passing tones. As you see the skip to the 3rd of the C chord creates parallel octaves in the outer voices when moving to the F chord. Is this bad voice leading? Or would it depend on the style?
Here is the progression I am using
Comment: Yes, this is bad style. But if you want to go full baroque, consider simply letting the thirds on top hang over as sevenths.
Answer: In some sense it does depend on the style, since parallel perfect fifths and octaves are all over the place in popular music.
But in this four-part chorale texture, these kinds of parallels are basically always considered not ideal.
Possible options for addressing this could be to arpeggiate the soprano up to G (creating parallel thirds with the bass), or simply getting rid of that arpeggiation in the bass.
Answer: This would be bad style for common practice period, which this type of writing follows.
Even without the skip in the bass from root to third, the bass root C to root F creates direct octaves in the outer voices and that's less than ideal.
A fully abstracted relative motion rule of thumb is: use similar motion, which includes parallel motion, to only imperfect consonances.
What that means for your example is this: you are moving to a perfect consonance, an octave, do not move by similar motion, so contrary or oblique motion should be used.
The book Figuring Out Bach by David Fuentes had a nice concept of figurehead pairs, which are six types of two part harmonies. Two of those figurehead pairs can apply in your case: resonant pairs of thirds or sixths (specifically the chord third with either the root or fifth) and solid pairs octave or fifths (specifically root plus root or chord fifth.) Solid pairs are used for phrase beginnings and endings. Resonant pairs are used for phrase interior. The application of that idea for your example would be: avoid perfect intervals in the outer voices except the very beginning or end of a phrase. Obviously that's a rule of thumb, not a absolute rule, but it's modeled after Bach, and it will avoid a whole lot of frustration in writing good voice leading.
Comment: Michael hi. Can you explain why my textbook "Harmony and Voice Leading" shows direct octaves in this descending 5th progression if is to be avoided? Or am I misunderstanding something? I added a pic to my post.
Comment: I went back and did some research and think this rule does not apply if soprano moves by step. Am I correct?
Comment: For root position chords, that would be normal. My point really was to say the concern isn't about chordal skips, or metrically weak position, but just relative motion. To the extend that direct motion to fifths/octaves is warned against, you can handle all the voice leading issues about fifths/octaves with that simple statement about similar motion. Combine that with the three shortest distance voice leading models for triads along with don't double a tendency tone, and cover most of the big voice leading issues.


Does Jmeter support client side javascript

Question: Does Jmeter support client side javascript. I am able to record the script but replay log doesn't show anything.
Answer: JMeter is not a browser, it's a load generation tool. It can produce HTTP traffic, but it does not actually parse/execute JavaScript coming with the loaded page.
If you need to load test your AJAX application, then you can easily simulate HTTP traffic coming from normal browser requests and from AJAX requests.
For functional browser testing I would recommend using Selenium.
Answer: No. JMeter does not process Javascript or applets embedded in HTML pages.
JMeter can download the relevant resources (some embedded resources are downloaded automatically if the correct options are set), but it does not process the HTML and execute any Javascript functions.
If the page uses Javascript to build up a URL or submit a form, you can use the Proxy Recording facility to create the necessary sampler. If this is not possible, then manual inspection of the code may be needed to determine what the Javascript is doing.


How can I view questions with 0 answers, that haven't been upvoted, and that are tagged with my favorite tags?

Question: I believe this is impossible, currently, but I often find myself wanting to look at questions that abide a pretty specific set of criteria. It would be useful to have some kind of a tool that lets you search for those, similar to an SQL query.
Comment: would also probably check data explorer http://data.stackexchange.com/
Comment: @Sathya That wouldn't be very helpful in this case. The data explorer is updated occasionally, not live. The last updates were in June, so anything he finds would most likely not fit the criteria anymore.
Answer: Use the following search term:

[tag1] [tag2] answers:0

This will find all questions that have tags [tag1] and [tag2] and no answers
Comment: @bane - I don't think so
Comment: Didn't know about that, thanks! Is there a way to include all of my favorite tags?
Comment: And what about logical operators? It appears that this searches for questions that have **both** tag1 and tag2, but sometimes I want questions that have either one of those...
Answer: This will almost do the job:
[tag] answers:0 votes:0

However, the votes:0 mean that it must have at least 0 votes and you will still see voted questions :(
However, a solution for this is to use that query and sort by votes and start searching from the last page.
Answer: You can check the Unanswered -> No answers tab for questions with no answers, or Unanswered -> My tags to get questions with no upvoted answers in your favourite tags, but I don't think there's a way to mix & match both.


Align to Center Across Page in Inkscape

Question: When I used Inkscape before, I was able to snap an object so it would align with the center or edge of another object nearby without going into the Align and Distribute window. Now I can't do it anymore. Did I accidentally turn this off without knowing about it? All I've been able to find is how to snap to corners and use the align buttons.
Answer: You probably switched off one or more of the snapping options in the Snap Controls Bar.
A guess would be the "Snap bounding boxes", "Snap midpoints of bounding box edges", and "Snap to page border", or perhaps you switched off "Enable snapping" altogether.
Try setting the snapping controls as shown below (blue highlight is switched on). If you mouse over the buttons, a little tooltip appears to tell you what each snapping option does.

Here's an example of what these options do.

Align to Center Across Page in Inkscape


What is the theoretical maximum number of open TCP connections allowed on a Windows server

Question: On my Windows server I have a port open listening to incoming TCP connections from multiple clients. Is there a limit to the number of unique clients that can concurrently establish a socket connection on that opened port on my Windows server?  One of the threads What is the theoretical maximum number of open TCP connections that a modern Linux box can have talks about number of socket connections being limited by the allowed file descriptors on Unix platforms.  Is there such a limitation on the latest available Windows servers? If so how to go about changing that limit?
Comment: Are you actually having an issue with it, or just out of curiosity thinking if such a limit could be changed?
Answer: Based on an answer by a MSFT employee:

It depends on the edition, Web and Foundation editions have connection limits while Standard, Enterprise, and Datacenter do not.

Though as Harry mentions in another answer, there is a setting for open TCP connections that has a limit of a bit over 16M.
But while technically you could have a large amount of connections, there are practical issues that limit the amount:

each connection is identified by server address and port as well as client address and port. Theoretically even the number of connections two machines can have between them is very large, but usually the server uses a single port which limits the number. Also rarely a single client would open thousands of connections, but in NAT cases it may seem like it
the server can only handle a certain amount of data and packets per second, so a high speed data transfer or lots of small packets may cause the number to go down
the network hardware might not be able to handle all the traffic coming in
the server has to have memory allocated for each connection, which again limits the number
also what the server does is an important issue. Is it a realtime game server or a system delivering chess moves between people thinking their moves for 15 minutes at a time
Comment: There actually does seem to be a fixed limit (see my answer) but in practice the points you raise are more important.
Comment: @HarryJohnston But that is impossible to say without hardware information and used software. Also the question mentioned hard coded limits in Linux, which don't exist in Windows. So yes, of course you can't expect a slow machine with single NIC to handle a million active FTP connections, but a hefty machine might handle the same, or a trillion connections for a chess server.
Comment: Thanks Sami, Harry for your excellent info and insights.  In my case there are multiple clients each initiating a connection and keeping it alive as it sends periodic data.  This is basically some sensor data (like temperature for example) coming from the field.  Hence there can be multiple clients at the same time talking to the same port on the server.  It seems then that rather than connection limit memory, network hardware may be more of a limitation.  We will be starting some stress tests soon.
Answer: In addition to the licensing and practical limits outlined in Sami's answer, there is in fact a configurable limit to the number of simultaneous open connections, determined by the TcpNumConnections setting.  The default value is also the maximum, which is just shy of 16M.
(The linked documentation is for Windows 2003.  The corresponding documentation for later versions of Windows Server does not appear to exist.  However, I can't find anything to suggest that the setting has been removed.)
In practice, however, you are likely to run into the practical issues outlined in Sami's answer long before you hit this.  (Unless the system administrator has manually changed the setting, of course.)
Comment: True, I can't find any information that would say this wouldn't still be the maximum allowed, even though there is not a clear indication that it would be true either. But I also would go on the side that it exists since there are mentions about at least WS 2008.


How does surfactant decrease surface tension?

Question: How does surfactant decrease surface tension? As surfactant molecule occupies the air-water interface, it kicks out some of the water molecule close to the interface. The lesser the water molecules on the interface, the lesser the surface tension. Does this mean the surface area increases?
Comment: Surface area is approximately the same, the forces acting on the "surface molecules" reduces. As a qualitatively, quite rough, mechanical analogy you may think at this: take two points in space and don't move them (the distance of the points represents the dimension of the liquid surface); than take 2 springs, one with a larger, and one with a smaller elastic constant: the axial force $F_1$ in the spring with larger elastic constant may represent the surface tension in the fluid w/o reactants; the force in the low-elastic constant $F_2 < F_1$ may represent the surface tension with the reactant
Comment: Quite a rough approximation, since the elastic force in a spring depends on the displacement of its extreme points $F = f \Delta x$, while the surface tension is approximately a constant property of the interface between the materials $\gamma \approx \text{const.}$
Comment: The surface area remains the same? I thought that the surface tension ensures that the molecules occupy least surface area possible.
Answer: The attractive force between water molecules at a free surface (which is what we call surface tension) depends on how close together the molecules are to each other. Putting a surfactant molecule inbetween two water molecules moves them apart from one another and thereby furnishes them with an excuse to ignore each other, thereby reducing the surface tension. This process goes to completion when the free surface becomes fully populated by diffusion with surfactant/water molecule complexes. At that point, the surface tension of the free surface is about half of what it was to begin with, and adding more surfactant will not reduce the surface tension further.
This means that the process of breaking the surface tension of a free surface in water will have a characteristic time scale associated with it which depends on how fast the surfactant molecules can diffuse out to a patch of newly-created free surface and fully populate it. This means that the surface tension on short timescales will be greater than it is on long timescales and that difference depends on the diffusion rate of the surfactant molecules through the water that surrounds them.
This effect is of great importance in the design of inks for inkjet printing, where surfactants are used to obtain the right amount of droplet spread on the print media- a process which requires times of order ~250 milliseconds. Those surfactants cannot be allowed to break the surface tension of the ink while it is refilling the printhead nozzles (a process which requires times of order ~50 microseconds) or else it will slow down the refill process and the printhead nozzles will not yet be fully refilled for the next firing.
Comment: @Wiz123, this subject is perhaps the most closely-guarded trade secret category in the whole business of inkjet printing! I would recommend you do a keyword search on inkjet+surfactant and see what comes up.
Comment: Interesting...can you please refer me to a source about the role of surfactants in inkjet printing?


NameError in Django

Question: I am working with Django/python and ran into a few errors I can't seem to find relevant answers for online.
I was testing the following from views.py:
def teamRoster(request, pk): #shows list of players

    tempteams = Teams.objects.get(id=pk)
    tempteams = tempteams.players.all()
    team = get_object_or_404(Teams, id=pk)

    context = {
        'teamList': tempteams,
        'team': team,
    }

return render(request, "roster/teamRoster.html", context)

What I get in the shell:
from roster.models import Teams, Player
tempteams=Teams.objects.get(id=pk)

Traceback (most recent call last):
File "<console>", line 1, in <module>

NameError: name 'pk' is not defined

If I try the next line:
tempteams = tempteams.players.all()

Traceback (most recent call last):
File "<console>", line 1, in <module>

NameError: name 'tempteams' is not defined

My data does have a pk attribute that I put in when making my json file instead of having one automatically assigned. I'm not sure where I need to be defining pk. I'm fairly new with django/python but I did do something similar with another definition (same project) and it works fine. Any guidance would be much appreciated. And if it helps, my models and other parts of the code are at https://github.com/historymaiden/Athletic-Team-App - the app is called roster.
Answer: You have not yet defined pk in the shell which is why you are getting the error there
from roster.models import Teams, Player
tempteams=Teams.objects.get(id=pk)

Traceback (most recent call last):
File "<console>", line 1, in <module>

NameError: name 'pk' is not defined

Because the last code block failed then tempteams is not defined either
tempteams = tempteams.players.all()

Traceback (most recent call last):
File "<console>", line 1, in <module>

NameError: name 'tempteams' is not defined

NameError in Django


Who is the boatman that took away Sinfjotli's corpse?

Question: In chapter 10 of the Saga of the Völsungs, Sigmund's son Sinfjotli dies. His corpse is presumably carried to the underworld by a mysterious boatman, in a manner reminiscent of the Greek ferryman of Hades, Charon:

So Sinfjotli drank, and straightway fell down dead to the ground.
Sigmund rose up, and sorrowed nigh to death over him; then he took the corpse in his arms and fared away to the wood, and went till he came to a certain firth; and then he saw a man in a little boat; and that man asked if he would be wafted by him over the firth, and he said yes thereto; but so little was the boat, that they might not all go in it at once, so the corpse was first laid therein, while Sigmund went by the firth-side. But therewith the boat and the man therein vanished away from before Sigmund's eyes.
Source: The Story of the Volsungs, translated by William Morris and Eirikr Magnusson

Who is this mysterious psychopomp? Is he mentioned in any other Norse legend?
Answer: To answer your question we take a look at the context of the Ferryman outside of this specific instance. In Hárbarðsljóð: "Hárbarðr" is the name of the ferryman. Hárbarðr means "Grey beard," and is another kenning for Odin. Hárbarðr repeatedly boasts of his conquests of giantesses, as does Odin in Havamal. While many scholars still may disagree on it, Hárbarðr is usually considered to be Odin. This is based on not only Odin's statement in Grimnismál 47 that Hárbarð is one of his by-names. But that Odin is notorious for disguising himself to interact with people of worth.
If you read more on what William Morris has said, he cites in his translation: "The man in the boat is Odin, doubtless."
Comment: Is the ferryman in Hárbarðsljóð also a psychopomp? This is what peaked my interest, I suspected Odin might be the psychopomp in Volsunga, but I wasn't sure if he is compatible with the role. Is there another instance where Odin personally escorts someone to Valhalla, instead of sending his valkyries?
Comment: @Yannis I'm not exactly sure you are asking about a "psychopomp". Can you give me a chapter number from the Volsungs in which you are talking about?
Comment: A [psychopomp](https://en.wikipedia.org/wiki/Psychopomp) is a guide of souls to the underworld. The boatman in question ferries Sinfjotli's corpse to the underworld, therefore he acts as a psychopomp. Is that something Odin would do?
Comment: @Yannis Yes, it is exactly something Odin would do/has done. In Hárvarðslijóð Hárbardr is Odin. He says in Stanza 24. "In Valland I was and wars I raised. Princes I angered,  and peace brought never; The noble who fall in the fight hath Odin, And Thor hath the race of the thralls." So here he suggests he is exactly this. Acting as a ferryman now and having traveled to Valland the "land of the slain".
Comment: I'm sorry, but I don't think I follow. Yes, we know that those who fall in battle will find themselves next to Odin in Valhalla. However, Odin does _not_ personally escort them there, does he? The boatman in Volsunga does escort a fallen, Sinfjotli (even though he did not fall honorably in battle, which as I understand is required for Odin to get involved). Is there any indication that Hárbardr fulfils a similar role? Or is the only thing that links him with the figure in the Volsunga that they are both ferrymen?


uhh why does my fluid acting up like this? it was working before, the fluid came from the circle but now it looks like this, check the photo

Question:
I was just following a fluid tutorial and i tried it with a simple donut, it was perfectly fine at first but i feel like the result is very bad so i took a nother try. When i try to bake the fluid again it comes up like what is shown on the picture
Answer: Try baking it a third time, but move the circle up a bit first.


Engine for Briggs & Stratton mower not starting. Might be flooded

Question: My Briggs and Stratton mower won't start.  Only used it twice.  I may have over filled the gas tank and flooded it.  Not sure.  Gas is leaking from the air filter.
Comment: Welcome to Motor Vehicle Maintenance & Repair! What exactly is your question?
Comment: Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
Comment: Drain the gas out of the carb bowl. Take the air filter apart and get all that gas out of there and dry everything out before attempting another start. That's how you get a fire.  Backfire + soaked air filter = Roman candle.
Answer: Overfilling the gas tank won't cause a mower to not start. Overfilling the gas tank however can lead to problems due to heat expansion so you should remove the excess fuel before leaving the mower in the sunshine.
Engine flooding happens not by overfilling but rather letting too much gas into the engine. This may happen if you press the priming bulb too many times (assuming your engine has priming bulb and not choke), or do multiple weak starting attempts repeatedly with choke on (assuming your engine gas choke and not priming bulb). The solution is to use priming bulb sparingly and if equipped with choke, do one start attempt with choke on, few attempts with choke off, one attempt with choke on, etc. until the engine starts.
I also have an old mower with Briggs&Stratton engine that's hard to start. How I managed to start it is as follows:

Put only high quality small engine gasoline (alkylate gasoline) there. If alkylate gasoline isn't sold in your area, drain or use all fuel from the tank before the winter so bad gas won't make starting harder.

Always start the mower not over grass but on some flat area where the blades aren't touching anything. Uncut grass acts as a brake, making engine starting hard.

Press the priming bulb three times (my engine is equipped with a priming bulb not a choke -- if your engine is equipped with a choke, put the choke valve on)

Pull the cord until you feel little bit of resistance. The resistance depends on the position of the engine, but in some positions it's quite small. It's a mistake to pull until you feel maximal resistance because that consumes part of the pull cord travel, and if you let the cord be pulled back and try pulling again with the engine in the maximal resistance position, starting is harder.

Once you have found the position of the pull cord where you feel a little bit of resistance, yank the pull cord very fast. Try to make it start the first time. The first time is always the best possibility to start the engine because your muscles get fatigued and further starting attempts won't be as strong, and also you may not know how many times you need to press the priming bulb if the engine doesn't start the first time.

If you can't make the engine start after you've followed these instructions, you need to somehow decide how to operate the choke / priming bulb on subsequent starting attempts. With choke, it's a good idea to do first pull with choke on, three next pulls with choke off, then again a pull with choke on, then again 3 pulls with choke off, etc. With priming bulb, pressing it occasionally once may be a good idea after multiple starting attempts.
If you still can't start the engine, maybe the engine is worn or maybe your hands are too weak for this engine model. In either case, spraying some starter fluid to the air filter could help in starting.


Where can I find word games and puzzles?

Question: Where can I find downloadable word games for Ubuntu?
Answer:
Launch the Ubuntu Software Centre, by clicking on its icon in the launcher on the left of the screen.

Once the Software Centre has launched, click on the "Games" category.

Click on the "Puzzles" category

You'll see a list of games for free and for purchase which can be installed immediately.

You can also find games for Ubuntu on Steam, in Humble Indie Bundles, and on other websites.
In general, most software for Ubuntu can be found in the Ubuntu Software Centre, but you can also find software for Ubuntu online on websites as well. Installing software from the Centre is quite easy, whereas installing software from a .deb or a .tar.gz file is less easy.
Answer: I had a similar question for finding word puzzles.
I found this one named Klest-crossword (http://ubuntuhandbook.org/index.php/2013/07/klest-crossword-crossword-puzzle-game-and-creator-for-ubuntu-linux/). It has ~1000 crosswords for both Russian and English, and can automatically generate new ones. But it's too difficult for me...
As mentioned above, GBrainy (in software center) is another choice for verbal game. But that's not what I looking for...
Answer: Simon Tatham's Portable Puzzle Collection is fun, also demanding when the default setting is changed.
The collection is available for Linux, OS X and windows. Instructions for all 39 games (all in all under 20MB) can be found here > HTML Help <

After compiling with ./configure & make install you're good to go.


Where does the notion of pseudoholomorphic curve come from?

Question: I wonder, why we consider the notion of pseudoholomorphic curve: By definition a pseudoholomorphic curve in an almost complex manifold $X$ is a smooth map $f: C \rightarrow X$
from a Riemann surface $C$ into $X$ such that $df \circ J=J \circ df$ for the respective almost complex structure $J$. Why does it make sense to look at this definition? Is it just because the Cauchy-Riemann differential equations $\frac{\partial u}{\partial x}= \frac{\partial v}{\partial y}$, $\frac{\partial u}{\partial y}=-\frac{\partial v}{\partial x}$
are invariant under the symmetry $x \rightarrow y$, $y \rightarrow -x$ and $u \rightarrow v$, $v \rightarrow -u$ and therefore we have that this relation holds for a holomorphic map $f$ or is there any other reason?
Comment: It seems unfair to say Gromov introduced pseudo-homolomorphic maps: there is at least one prior significant result on this topic by Nijenhuis & Woolf (1963).
Comment: Pseudoholomorphic curves were introduced by Gromov, MR0809718
as a tool to study symplectic manifolds.
Comment: We consider the notion because it has turned out to be very useful.
Comment: 'What is...a pseudo holmorphic curve' by Donaldson http://www.ams.org/notices/200509/what-is.pdf could be a starting point.
Comment: Some context in the intro. of http://math.mit.edu/~vwg/lectures%20on%20symplectic%20geometry%20ana%20cannas.pdf
Answer: As many have pointed out: Gromov introduced it* wrote a seminal paper utilizing it, and we continue to use it today because it's an incredibly useful tool. I've never spoken to Gromov about why he introduced it (who knows how great mathematicians come up with great ideas) but I can try to give some (probably historically false) motivations as to why someone might have come up with the notion. For instance, if Gromov hadn't discovered it, you might have come up with it as follows:
(1) First, complex geometry--if you like, you can think of algebraic geometry--has a lot of rigidity. The fact that we can even give a discrete count to sub-objects (like how many curves pass through n fixed points) is special -- the question takes on a totally different nature in more flimsy geometries.
Now, is there a way to relax the background of complex geometry, and still come up with a useful, fun theory? For instance, how necessary is the integrability condition on J (the complex structure) to still make sense of curve-counting?
What Gromov showed is that if the complex structure is `tame' in the sense that one has a compatible symplectic form, questions about curve-counting can still have nice answers. Really, the difference between a pseudoholomorphic curve and a holomorphic curve isn't in their definitions, it's in the nature of J in the target. Relaxing the J from "integrable complex structure" to "complex structure tamed by a symplectic form" is the generalization that's happening.
(1') Put another way, we already had a famous 2-out-of-3 principle recognizing the relationship between Riemannian, complex, and symplectic structures on a vector space. Studying curves on complex projective varieties take on rigidity, in some sense, because we study maps between manifolds with Kahler structure: manifolds both symplectic and complex, and further, each structure is integrable--in that the Nijenhaus tensor vanishes, and omega is closed. It's natural to ask whether we can still find interesting structure in the 2-out-of-3 world by studying manifolds whose tangential structures are compatibly Riemannian, complex, and symplectic, but which do not satisfy a global condition like integrability of J or closedness of $\omega$. And when you get rid of the integrability of J, it turns out that you can find such a structure on any symplectic manifold. (In fact, once you fix $\omega$, there's a contractible space of compatible $J$. That's why pseudoholomorphic curves can be applied widely in the symplectic world.)
(2) There might be another motivation from physics. In mirror symmetry, one predicts the existence of mirror Calabi-Yau manifolds. A field theory that relies on the symplectic structure of one manifold should correspond to a field theory that relies on the complex structure of the mirror. And the correlation functions count J-holomorphic curves in the symplectic manifold. Historically though, I'm not sure if physics alone would be able to motivate the study of these field theories on just symplectic manifolds with almost-complex structure, as opposed to Calabi-Yaus. Somebody with more background could probably comment on this.
*As I learned from Antoine and Dmitri, there were previous works utilizing pseudo-holomorphic curves. For instance:
A.Nijenhuis, W.Wolf. Some integration problems in almost-complex and complex manifolds, Ann. Math. 77 (1963),
J. Eells and S. Salamon. Twistorial construction of harmonic maps of surfaces into four-manifolds. (1985).
Comment: In this interview http://www.ihes.fr/~gromov/PDF/rtx100300391p.pdf
p.396, Gromov tells how he got the idea.
Comment: What a wonderful interview. Tangential to our discussion: "Question: Is there one particular theorem or result you are the most proud of? Answer: Yes. It is my introduction of pseudo-holomorphic curves, unquestionably. Everything else was just understanding what was already known and to make it look like a new kind of discovery."
Answer: I think it would not be wrong to say that pseudo-holomorphic curves became really popular thanks to the work of Gromov Pseudo-holomorphic curves in complex manifolds http://www.ihes.fr/~gromov/PDF/9[45].pdf
In this work Gromov shows that certain facts about holomorphic curves in complex manifolds survive when the holomorphic structure is replaced by merely an almost complex structure provided the almost complex structure is tamed by a symplectic one.
For example there is a statement that every mathematician knows - for every two points in a plane there is a unique line that passes through them. This statement survives and becomes a difficult theorem in symplectic geometry that helps in particular to classify symplectic structures on $\mathbb CP^2$.
Pseudo-holomorphic curves were appearing here and there also without (an apparent) relation to Gromov's work. For example Elles-Salamon noticed that minimal surfaces in hyperbolic 4-space are in correspondence with almost complex curves in the twistor space of the hyperbolic space:
J. Eells and S. Salamon. Twistorial construction of harmonic maps of
surfaces into four-manifolds.
Answer: The work of Floer in proving the Arnold conjecture (at first in the monotone setting) interpreted pseudoholomorphic curves as a generalization of the flowlines in Morse theory.  In analogy with Morse homology, a count of pseudoholomorphic curves provides the differential in what has become known as a Floer homology.
This work predated Gromov's paper and has been seminal in its own way, spawning a variety of Floer homologies (such as the popular Heegaard-Floer homology) which provide strong invariants in low-dimensional topology.
If you're willing to accept that symplectic manifolds are reasonable things to study, then Floer's approach to the Arnold conjecture shows pseudoholomorphic curves arising very naturally.  Salamon has a nice paper explaining this carefully http://www.math.ethz.ch/~salamon/PREPRINTS/floer.pdf .
Comment: Floer's 1986 Duke paper assumes Kaehlerity of his manifolds, so doesn't actually use pseudoholomorphic curves. In his 1987 Bulletin of the AMS paper, he uses pseudoholomorphic curves, for the first time in his work, as far as I can see; he references Gromov's famous 1985 paper. So the ink trail suggests that Gromov saw the relevance of pseudoholomorphic curves before Floer. I suppose some people might know for certain the actual story behind the papers, which could be different. The Salamon paper you mention gives credit to Gromov for earlier use of pseudoholomorphic curves.


How is one amp under 1 volt different from 1 amp under 2 volts?

Question: I have been reading about volts and about the water pressure analogy being inadequate to describe electricity, since pressure makes water increase speed
and thus would mean electrons would also have an increase in speed under a larger potential,
So if an electron doesn't increase in speed or have a greater kinetic energy under a larger volt, and it always carries the same charge, and current is the number of electrons passing through a point:
How is one amp under 1 volt even different from 1 amp under 2 volts?
Answer: If 2 volts produce 1 amp of current, there must be a higher electrical resistance than in the case of 1 volt producing 1 amp of current.
Using your water analogy, you have increased the pressure but also added rocks which slow the water down.
Comment: Increasing voltage increases the current. In your scenario where the voltage increased but the current did not, something else (namely, resistance) must also have changed to decrease the current back to its original value.
Comment: It will drive the electrons faster, by which I mean they will have a higher drift velocity (you may find this interesting if you haven't heard of it: free electrons can be thought as bouncing around randomly in a wire, while a voltage causes them to drift in the direction of the wire. This drift velocity is actually very slow, on the order of micrometers per second, but this is what causes current - not the electrons' total speed. You may wonder how when you plug something in it starts charging right away if the drift velocity is so slow, well it's because there are just so many electrons).
Comment: @soundslikefiziks Yes. Again, note that it's their drift velocity (velocity component in the direction of the wire) that is increased in proportion with the voltage, while their total speed remains practically the same. To see this, imagine electrons bouncing up and down inside a wire (so they're not moving along the wire) with a speed of 200,000 m/s. Now suppose a voltage gives the electrons a horizontal velocity along the wire of 1 m/s (unrealistically large). There will be lots of current, but if you calculate their total speeds you will get 200,000.000003 m/s, not a significant change.
Comment: So voltage does increase the speed of electrons ?
Comment: So i know that according to ohm's law the current will increase, but the question is, why ? if the "pressure" from the voltage won't drive electrons faster why would anything be different compared to 1 volts.
Comment: So the energy the electrons gain from the increase of voltage is a kinetic energy and so they move faster and more electrons move through the measuring point per second which means the current is increasing?
Comment: @Benitok Excuse my confusion or misconception, but are they constantly moving at that total high speed and only when it comes to current measuring the drift speed is calculated ?
Answer: This is the analogy I think of (No, not the water pressure one) but I only took a couple intro physics classes in college so please correct me if this analogy is completely off..
If voltage is the energy difference between two points and amperage (ampere?) is the number of electrons traveling between these two points then we could think of it as a deep well that we are dropping rocks down.
Increasing amps means we start dropping bigger rocks down this well. Increasing volts means the well gets deeper.
This analogy gives you an intuition about why static electricity (high voltage, low amps) is isn't dangerous: imagine throwing a handful of sand down a super deep well.
Also, you can apply it to situations of low voltage & super amps ie if we connected 1000 mostly dead batteries in parallel: imagine a huge boulder hovering a centimeter off the ground, it'd kill you if you got under it but that won't happen easily (but it might destroy your finger).
In your situation, it's the same size rock being dropped but there's a greater energy difference between where it is and where it will be when you release (discharge) it.
Answer: The answer from @Benitok is nicely short and good, but it seems you still have some doubts. Allow me therefore to give my take on an explanation.

How is one amp under 1 volt different from 1 amp under 2 volts?

It isn't. 1 amp of current is 1 amp of current. But it can of course be produced in different ways. Which might cause more heat waste or other energy loss. But 1 amp is 1 amp nevertheless.
Think about your shower tap. During the years it clogs with chalk. Less water comes through. The water pressure didn't change, but less water comes through now that the resistance against the water flow is higher. To still get the same water out, you will have to turn up the tap and increase the water pressure. In this way different pressures can give the same amount of flow - simply because of different resistances along the way.
What in this way happens along the way in order to create a specific flow can vary. Same for electric circuits. The big difference here is just, that even through the current is the same, more waste heat might be produced depending on how this current is made. (Higher voltage increases the power release)
Comment: @soundslikefiziks It is lost as heat. All energy not turning into kinetic, turns into heat (or is stored or alike).
Comment: @soundslikefiziks The *drift* speed has to, yes. Current is charge per second. So double current means double as much charge moving past a point on the wire every second. In other words more electrons passing every second. So, faster drifting electrons.
Comment: Typo: "clocks" should be "clogs"
Comment: I understand the water analogy with respect to pressure increasing and thus increasing speed, but my doubts are with relation to kinetic energy in electrons, in the water analogy, the pressure from the tank gives more energy to the molecules to move through the barrier, but if electrons do not gain kinetic energy (or as minimal drift energy as @Benitok  mentioned) where is that extra energy that "helps" them move through the resistor when the voltage is increased ?
Comment: So they do gain kinetic energy and dissipate it as heat because of collisions inside the resistor (and some in the wires)?
Comment: @soundslikefiziks Yes, they gain it and then lose it right away to heat. So all in all they don't gain any but remain at constant (drift) speed.
Comment: So in case the resistance stays the same (1 ohm) for 2 volts, the speed of the electrons has to be twice as fast, to produce 2amps of current, is that correct ?
Answer: 1 amp under 1 volt, that is an expression like 1 car under 1 m water, doesn't make sense.
1 amp is a flow of a particular number of electrons through an electrical leading circuit. At every location of this circuit the flow is equal to all other points. Compared with water, it is a particular amount of water circulating in e.g. a closed tube circle.
Of course, the water will not circulate in a closed tube circle at all, it will not move at all. The same is with electronic circuit from e.g. a close wire circle. The electrons will not move at all. There will be no current, no amps.
If the water should move/circle, we need a water pump, for electrons we need a electron pump. An electron pump is e.g. a battery.
Unfortunately the tube is a flow resistance for water, the leading wire has a flow resistance for electrons. When we start a flow and stop the pump, the water will not continue flowing, the electrons will not continue flowing, they will stop flowing because of the resistance, sooner or later.
We can measure the flow resistance of a tube as well as of a electric leading material. For a water tube it is measured in pressure per amount of water flow, and for electric leading material it is measures in Volts per amount of flowing electrons, that is flowing amps.
Volts is the unit for pressure.
Amps is the unit for flow of electrons, that means amps.
Comment: Reiner, I think you made your central point best in your last sentence,  which would make a great intro sentence for that reason: "Volt is the unit for pressure, amp is the unit for flow of electrons." The two are indeed separate issues, though obviously they are closely connected in that higher pressure (higher voltage) will for the same circuit almost always result in more flow (more amps).


How do biologists estimate that there is 8% of protein coding genes in human genome?

Question: In class, the professor said that there is about 8% of protein-coding genes in human. I wonder how biologists estimate this without annotating all of human genes. Thank you!
Comment: What do you mean by "without annotating"?  Without a minimal annotation of the transcriptional and translational features this is obviously not possible. After they got the sequence they had to read it. What is your question exactly?
Answer: S/he's off by about 6 - 7%.
As per the national human genome research institute approximately 1% of the human genome encodes proteins. We can tell this by looking at the sequence (which we're now able to do quite quickly) and identifying those portions of the sequence can be translated to protein using the genetic code.

Scientists have been able to identify approximately 21,000 protein-coding genes, in large part by using the long-ago established genetic code. But these protein-coding regions make up only approximately 1 percent of the human genome...
Comment: You are taking some wrong assumptions. There are plenty of regions that contain open reading frames in the human genome and a high fraction of them are translated into "proteins". This was recently seen in ribosome profiling experiments. That does not mean that these translated ORF are proteins in the sense that they perform a function. Most of them are noise as they are transcribed and translated in small quantities.
Additional evidence to consider a translated region as a true protein is usually conservation. However very recent proteins will not appear even in closely related species.
Comment: @biojl This is a statement by the NHGRI, the institute at the NIH that oversees genomics research. It represents consensus in the field. There is, of course, more to that goes into it, but you find out how much of the genome codes proteins "in large part by using the long-ago established genetic code". We use conservation of these ORFs as well, but recent work suggests we should be a little more liberal with what we consider a functional protein.
Comment: The consensus in the field of genomics (where I belong) has changed quite a lot since 2012... Those statements were true back then but the beauty of science is that it changes when new data or new ways of looking at it appear.
Comment: @biojl personally, my time in the lab is remote, but I like to think I'm still on top of things, and current research is relevant to me. Do we really not think that 1-2% of genome encodes proteins anymore? Do we not start that estimation by looking for ORFs?
Answer: It is important to remember that protein-coding genes have a start and an end, exons and introns, and identifiable promotors. Knowing that these factors exist and how to identify them (usually by their unique DNA sequences, the frequency they occur and their sequence lengths) we can identify these sequences as part of whole genome analyses.
Next-generation sequencing made it possible to sequence the entire genome of a human in a matter of days, if not hours. This massive database makes it possible to identify it's variable elements. Now, knowing where a promotor is, the following start codon of a gene can be found along with its stop codon. This leads to identifying open reading frames (ORFs).
Now it is simple, in that simply counting all the ORFs in relation to the other structural and "nonsense" DNA and the percentage of protein coding sequences can be determined. Remember that this is the norm, however there is still much we do not know about the human genome. There may be more protein-coding genes with unknown promotors that we do not know of. So always keep on asking!


Convert file from .img to .bin

Question: I need to convert an img file to a bin one.I have tried with power iso but nothing.I also used any burn but it gives me an error.How can I convert the file?
Answer: Convert Image File to BIN / CUE
<code>1.Run PowerISO.
2.Choose "Tools > Convert" Menu.
3.PowerISO shows Image File to BIN Converter dialog.
4.Choose the source image file you want to convert.
5.Set the output file format to bin / cue.
6.Choose the output bin file name.
7.Click "OK" button to start converting.
</code>
if this is not working for you, then find program called 'Isobuster'

Convert file from .img to .bin


Does Java provide 'friend' access modifier?

Question: I wonder if Java provides 'friend' (as in C++) access modifier? Someone said we can tread 'friend' as default modifier in Java. Is it true?
Answer: The default access modifier in Java allows members to be accessed by any code in the same package.
Answer: There is no such keyword (in Java) named as -
"Friendly"
The default access modifier has no keyword, but it is commonly referred to as "friendly." It means that all the other classes in the current package have access to the friendly member, but to all the classes outside of this package the member appears to be private. Since a compilation unit – a file – can belong only to a single package, all the classes within a single compilation unit are automatically friendly with each other. Thus, friendly elements are also said to have package access .
Friendly access allows you to group related classes together in a package so that they can easily interact with each other. When you put classes together in a package (thus granting mutual access to their friendly members; e.g. making them "friends") you "own" the code in that package. It makes sense that only code that you own should have friendly access to other code that you own. You could say that friendly access gives a meaning or a reason for grouping classes together in a package. In many languages the way you organize your definitions in files can be willy-nilly, but in Java you're compelled to organize them in a sensible fashion. In addition, you'll probably want to exclude classes that shouldn't have access to the classes being defined in the current package.
Answer: There isn't a friendly modifier in Java. In Java it is called package private. And it is the default modifier. It allows members of the same package to access it.
Answer: As others have said, there is no friend access, but package based access is available.
However OSGI, and the (hopefully) forthcoming Super Packages attempt to extends this concept to classes in a some higher lever grouping of classes.


Spring MVC, one controller for "add" and "update" when using setDisallowedFields?

Question: So I've got a simple form through which I can either "add" a new Thing, or "update" an existing Thing.
What I would like is to have one controller that can process both adding and updating.  On the outset this seems simple enough, until I consider the problem of using setDisallowedFields in my InitBinder so that the "id" field is not allowed when adding a new Thing.
Currently I have two controllers with what could be identical code except for the InitBinder method.
Any suggestions or advice?  (I'm open to the argument that I should want to maintain two controllers also, if you can give me good reasons)
Answer: Actually, you should disallow the "id" field both when adding AND updating. Otherwise a malicious user could tamper with the value of the "id" request parameter of an update request and thereby update a different record to the one shown by the form (assuming there's no ACLs or other domain-level security).
However if you simply disallow the "id" field, the controller will treat the ID as being null, which will work when inserting but not when updating (e.g. it might try to insert a new record instead of updating, depending on what persistence mechanism you're using). So you want the controller to remember the non-editable values of your domain object (not just IDs, but all disallowed fields) between requests so that it can send all the correct values to the service layer or other business logic. This is done using the type-level @SessionAttributes annotation, as follows (other annotations omitted for clarity):
@SessionAttributes("thing") // the name of your domain object in the model
public class ThingController {

    public void setDisallowedFields(WebDataBinder binder) {
        binder.setDisallowedFields("id", "someOtherUneditableField");
    }

    // request handling methods go here as before
}

For even better security, set the allowed fields rather than the disallowed fields. Either way you need the @SessionAttributes annotation to fill in whatever existing field values are ignored from the request.
Answer: The method signature to initBinder takes in the HttpServletRequest:
protected void initBinder(HttpServletRequest request,
    ServletRequestDataBinder binder)

So perhaps you can have initBinder() check the request parameters to determine if you should conditionally set setDisallowedFields?
(If this doesn't help, perhaps I'm not understanding the problem correctly...)
Answer: The way I do this with a single controller is to have a boolean on my command object indicating if it is a new object or not. In onSubmit I can then check the boolean to see whether I need to perform an add or update action.


My search engine is Yahoo, how can I change it to Google?

Question: I already follow some tips like, trying to find the extensions, but when I open it there's nothing in it. Also my search also already Google, so I'm confused right now.
Answer: You set this in Safari* Preferences - you don't need an extension to do this.

In Safari, go to the Search tab in Safari → Preferences (or press ⌘ Command,)
Select the Search Tab, and pick your Search engine.  I personally use Bing (by the way, Yahoo uses Bing to power it's search engine since 2009), but you can choose the engine you prefer.

* Safari 11.1.2 was used at the time of submitting this answer
Answer: There are actually two places to set search preferences in Safari. One is the Safari  Preferences > General as discussed in @Allan's answer.
The other is presented by opening a blank window (no URL in the address bar), and clicking on the magnifying glass icon to the left of the address bar. Whatever search engine is chosen in this method will override the Preferences setting. See this Apple:SE Q-and-A for more information.
Answer: there may be several things happening

Test wether it happens in safe mode .

Boot your mac in safe mode, and search something in safari and see if that fixes the problem.

Make sure that your search engine is google.

on safari you can go to safari>preferences>search (see Allan's response) and on chrome you can go to preferences search engines. If Google doesn't show up under the search engines, or the search gets redirected to Yahoo, your computer may have an app changing this.

Remove extensions.

Some extensions can change what your search engine goes to. If you have any extensions disable them, one at a time. Then try a simple search to see if that fixed the problem

Other Options

if none of the above work out, your computer may be infected with malware. First, check through all of your apps to see if any of them could be malware. Then, install/run an antivirus/antimalware app to get rid of the malware


Login to PHP form and then run a PHP script in Java

Question: I've now realised that everything I just had up was garbage. My problem is that after I do my POST to the php login script, the response coming back doesn't contain the "key" (Set-Cookie:amember_nr=blah) that I need. Without it the main php script can't verify me and thinks I am not logged in. I've even recreated an entire GET and POST header from my browser and tried using those, but still nothing. Any ideas why this would be happening? I'm using Apache Commons HttpClient.
Comment: What are you trying to achieve? Can you provide the relevant code (both Java and PHP) that you're using?
Answer: Solved using the HtmlUnit API. Handy API, even though I am only kind of using it for what it is meant for.


How can I create a custom landing page for a specific taxonomy term?

Question: How would I be able to have a customisable page where in it will be a landing page for special taxonomy terms and will display the related articles of a specific taxonomy term.
For instance, mywebsite.com/myspecialtaxonomyterm will display a PAGE, wherein a list of articles related to the tag myspecialtaxonomyterm is displayed, beside it is a custom widget as the sidebar and on top of it is a custom block which may contain videos or banner image. Can this be done by the Views module alone or should I create a module for this to be done?
NOTE: This page will be set to be the landing page of a specific tag, based on my example above. I am really confused on how to approach this.
Comment: Have a look at my answer http://drupal.stackexchange.com/questions/212569/how-to-show-content-type-with-only-related-taxonomy-item
Answer: To display only node content with a specific taxonomy term checked, add Content: Has taxonomy term to the Filter Criteria of your view. Once you add the filter, you will be prompted to select your taxonomy term vocabulary as well as the term you wish to filter your view by. Once completed, you will only see content associated with the desired term.
If you're using Panels, as your post's tags indicate, you can create your landing page using Pages (comes with panels). Make sure the view you create is a block, not a page, and it will be easy to plug into any panel.


How do I reverse a css export in Adobe Fireworks?

Question: I have exported a fireworks .fw.png file to a .png and a .css file.  I have lost the .fw.png files and the .css file has 200+ objects.   Is there anyway to recreate the slices from the CSS code?
Comment: you can open it in a browser (image+CSS) then do a screen shot.
Comment: no, that isn't re-creating the fireworks .fw.png object
Comment: oh, you want to some how convert it back into the source FW PNG file. Yea, no way to do that.
Answer: Thanks scott, i tend to agree.... ;-)
what i ended up doing was looking at the code that fireworks creates for a slice.  I then used the CSS and parsed it through a regular expression to extract the coordinates and slice name.  Then i pasted these into excel, translated the numbers to the required format and used the  concatenate function to generate a fireworks call.  i saved these as a stored fireworks macro.
this got the slices done, but i couldn't work out how to do the layers quickly, so that was a manual process.
Comment: That's an impressive solution! I would have probably just re-imported each of the individual PNGs back into one FW PNG file, assemble them back together, then just draw new slices snapping to the boundaries of the individual PNGs.
Comment: "stored fireworks macro" = javascript, vbscript, applescript, magic...?
Comment: Note that posting the source code for the macro (or at least the crucial bit) would be of interest to me and to posterity.
Comment: sorry, but it is long gone, i hope to never need it again, and it is the last time i trust our IT dept. to restore a backup....
Answer: I don't think this is possible.
You will have to manually reconstruct things using the CSS as a guide but there's no way to transfer CSS to objects in Fireworks. Also be aware the ability Fireworks has to save a layered PNG file is proprietary to Fireworks. Standard PNG files don't contain layers and construction elements.


WIFI Configuration Before Complete Boot-up Of Pi

Question: I am making a program and I need this program to get WIFI Credentials before anything else. Kind of like when you buy an Alexa and it has you connect to the internet before you can do anything with it. How could i go about this or is there any code out there that someone has already created that i could look at and could be directed to??
Comment: Raspbian comes with `systemd-networkd` so you have to look at it for your problem. Look at [Running Services After the Network is up](https://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/).
Answer:
WIFI Configuration Before Complete Boot-up Of Pi

You cannot usefully do anything network related before the Pi boots up properly.  I think you have just misconstrued the concept of "booting", and what you really mean is you want the Pi to boot up the first time in a state where the goal is to get a wifi configuration somehow.

Kind of like when you buy an Alexa and it has you connect to the internet

That's not what happens. Alexa and similar devices initially run their own hotspot which you can connect to; you then provide an SSID and password so that they can connect to your WLAN.
The first thing you want to do is configure the Pi to run either an open/unencrypted hotspot, or else one with a default password that can be used to connect to it.  Along with that you need it to run a server application which will:

Handle interfacing with a remote client to get the SSID and password, and then apply that to Pi's networking configuration.
Attempt to connect to the WLAN using the new configuration.
On failure, revert to the original state, possibly storing a message to inform the user on next connect to the hotspot that the original attempt failed.
On success the server application exits and leaves the Pi connected to the WLAN configured such that on next boot it will do so automatically.

So, there's a bit of work.  It requires you understand how networking is configured on the pi, and are able to create a simple server app which fulfils the above requirements.
Comment: thanks for the great explanation. Can you share how one would go about with 'forgeting' a wifi network? Say I have 2 networks and already connected my service to the first network. How do I connect it to the second network? In your flow it would always connect since it finds network 1. Keep in mind at this point the pi will have already rebooted and is now on wifi network 1.
Comment: That's really a question of understanding "how networking is configured on the pi", which I am not much help with since what it really means is "on the platform you intend to use" which, regardless of which GNU/Linux flavour that is (Raspbian, Arch, Ubuntu, etc.), I do not use the conventional networking services; I have my own stuff that I use built on low level tools (`wpa_supplicant`, `dhclient`, etc. -- conventional networking services manage these for you).
Comment: Anyway, based on that: A system will not automagically connect to any given WLAN unless it is configured to do so.  To clarify the flow above: Initially, the Pi (like Alexa devices) would be functioning as an access point or router *on its own network, which is not connected to anything else* (which is why I'd call it an access point and not a router).  It is not on the internet.  It is totally alone, until you pick up its SSID and connect to it.  Now there are two nodes, you and the device..
Comment: ..The device runs an application (likely a web application, making it easy to access) you connect to and enter the details for your WLAN.  After this, the device shuts down its temporary little network and tries to connect to your WLAN.  If subsequently you want it to connect to something else somewhere that WLAN is not accessible, it could do this by going back to the initial state and awaiting configuration. If you want it to connect to something else when there are multiple WLANs it could access, you'll have to implement that (via configuring the networking service or your own software).
Comment: Yea I am not really thinking of having multiple WLANs, just thinking about if someone chooses the wrong WLAN but it works. (For example when a network provides you a 3g and a 5g service and you accidentally connect to 3g but obviously want the 5g service. Configuring networking service manually isn't a great solution since I don't want the user I give the product to, to have to configure the PI manually...
Comment: I am more trying to think about how the flow works when it is already connected to a WLAN. Does that mean I would need to run a server on the PI that has a 'return to initial state' route? Or is there another solution that doesn't require a server to be running 24/7 for the off chance that someone wants to forget their current wifi?
Comment: A running server application that isn't being accessed doesn't do anything other than occupy RAM -- and it is certainly possible to do this without using much of that (although in this case you don't have to if you don't want to).  WRT "configuring a network service manually", if that simply means supplying the password and SSID, there's no way out of that; electronics are not telepathic.  Beyond that, the configuration would be done by software.
Comment: Providing the wrong SSID is a bit of an issue since it has no way to know it's on the wrong network.   Consumer devices usually have some kind of physical reset available to deal with stuff like that.


GNOME Sushi freezes system when previewing OpenDocument in 18.04

Question: I installed Sushi to be able to preview files. However, when I try to preview OpenDocument files, the entire system freezes. Why do OpenDocument files do this, and are there any alternatives that do not have this issue?
Answer: Installing the unoconv converter solved the issue for me and other users
<code>sudo apt install unoconv
</code>
This package provides a commandline utility which can convert from any document format that LibreOffice can import to any document format it can export. It uses LibreOffice's UNO bindings for non-interactive conversion of documents.
Supported document formats include Open Document format, LibreOffice Writter, MS Word, MS Office Open/MS OOXML, PDF, HTML, XHTML, RTF, DocBook, ODT, ODS, XLS and more.
Original Solution


Do corporate stock splits negate share repurchase programs?

Question: Stock splits increase shares outstanding and share repurchase progams reduce shares outstanding. If a company has a stock split and then later repurchases shares are the two taken together at the least counter-intuitive?
Answer: No, I think you are misunderstanding the Math. Stock splits are a way to control relatively where the price per share can be for a company as companies can split or reverse split shares which would be similar to taking dimes and giving 2 nickels for each dime, each is 10 cents but the number of coins has varied. This doesn't create any additional value since it is still 10 cents whether it is 1 dime or 2 nickels.
Share repurchase programs though are done to prevent dilution as executives and those with incentive-stock options may get shares in the company that increase the number of outstanding shares that would be something to note.
Answer: Companies do both quite often.  They have opposite effects on the share price, but not on the total value to the shareholders.  Doing both causes value to shareholders to rise (ie, any un-bought back shares now own a larger percentage of the company and are worth more) and drops the per-share price (so it is easier to buy a share of the stock).  To some that's irrelevant, but some might want a share of an otherwise-expensive stock without paying $700 for it.
As a specific example of this, Apple (APPL) split its stock in 2014 and also continued a significant buyback program:
Apple announces $17B repurchase program, Oct 2014
Apple stock splits 7-to-1 in June 2014.
This led to their stock in total being worth more, but costing substantially less per share.


More than one delivery location

Question: Playing Alpha 23 on Linux. Is it possible to have 2 or more Delivery Rooms? I set up a second prison complex with its own Delivery Room but all deliveries still only go to the first Delivery Room. This causes all the cooks and workers to travel to the first Delivery Room.
Answer: In the latest version as of writing this answer (Alpha 29) the truck unloading was overhauled. Trucks will now deliver their goods to the closest delivery location as soon as they stop. However, the unloading AI doesn't know where the goods are supposed to go, so you have no way to control into which delivery area specific goods are dropped.
Answer: This is actually not possible (according to my own experience and the official wiki). Also, a quick search on the PA bugtracker did not found any bugs related to this.

More than one delivery location