Why did Schrodinger never budge on the meaning of $|\Psi|^2$

Question: Schrodinger believed that the phisical interpretation of the wavefunction $\Psi$ was the vibration amplitude  and $ |\Psi|^2 $ was the electric charge density. While no-one disagrees with his interpretation of $\Psi$, many physicists believed Schrodinger was wrong about about $|\Psi|^2$ and argued that $|\Psi|^2$ is a probability. Schrodinger never accepted this view, but registered his "concern an disappointment" that this "transcendental, almost psychical interpretation" had become "universally accepted dogma." Why did Schrodinger forever think that $|\Psi|^2$ was the electric charge density and not a probability?
Comment: Do you mean $|\Psi|^2$? (I don't believe $\Psi^2$ has any physical meaning.)
Comment: Generally when people say "Why X" then X is a true statement. In this case, you have violated this rule.
Comment: @RonMaimon I didn't see that in the faq.
Comment: @JoeHobbit: I didn't mean your question violates a rule of this site, just a rule of semantics.
Answer: Schrodinger never fully accepted the Copenhagen interpretation, that's about as far as I will agree with the question.
But Schrodinger most certainly did not continue to believe that $|\psi|^2$ was the electronic charge density past the end of 1926. This interpretation was shot down by Bohr and Heisenberg, and Schrodinger accepted the criticism. That this interpretation is impossible in Schrodinger's formalism was conclusively demonstrated first in one of Schrodinger's own papers! The wavefunction for two electrons is a function of 6 variables, for 3 electrons in 9 variables, and the dimension keeps going up as the electrons become more numerous. The physical charge density is only a function of 3 variables.
Schrodinger's cat was Schrodinger's way of acknowedging that the wavefunction was some sort of mulitple-possible-universes entity. This was sparked by a letter from Einstein, where Einstein pointed out that a powderkeg triggered to explode on an alpha particle emission would end up in a superposition of exploded/unexploded in Schrodinger's formalism. Einstein came to the conclusion that the wavefunction was too big to be physical, and must be a statistical description of some underlying hidden variables. Schrodinger dithered on interpretation, and at times agreed with Einstein, at times not. But he didn't like Bohr's instrumentalism.
In the classical field limit, Schrodinger's sharge-density interpretation is correct, and the classical Schrodinger field has a charge density of $|\psi|^2$. The classical field interpretation is also why there's a local conservation law for the probability density (it doesn't need to be locally conserved in quantum mechanics--- only globally conserved).
I believe Schrodinger's interpretation was somewhat like an early version of Everett, something similar to Wigner's consciousness-causes-collapse interpretation. The modern decoherence views are essentially the same, except they pretend that the density matrix solves the interpretational problem (and from a strictily mathematical view, they are probably right).
Comment: Schroedinger's cat was not his way of "acknowledging that the universe was some sort of multi-possible universe entity". It was his way of ridiculing the Copenhagen school and its probability interpretation, where collapse was dependent upon an "observation" being made.
Comment: @Marty Green: The wavefunction, independent of interpretation, is a multiple-possible-universes sort of thing. The cat does not "ridicule" the Copenhagen intepretation, it just explains that the wavefunction is not a perceptual entity. I don't know Schrodinger's final position. All I know is that it it wasn't that Psi is a charge density.
Answer: Because it rescues Maxwell's equations and gets rid of the damned Quantum Leap. The fluctuating charge densities associated with superpositions of different wave functions correspond to exactly the sources necessary to generate and absorb the electromagnetic radiation associated with all thermal phenomena including the Black Body spectrum, as well as the photo-electric effect and the Compton effect.
EDIT: Notwithstanding the downvotes my answer has received thus far, the reasons I have given are exactly the reasons Schroedinger continued to believe in the charge density interpretation, as opposed to the probability interpretation, to the end of his life. You may disagree with the correctness of Schroedinger's interpretation, but that is not the question. The question is, why did he believe what he did; and I have answered that question.
(It is not true that Schroedinger "never budged" on the interpretation. He was indeed cowed in the late 1920's by relentless pressure from the Copenhagen school, but came back to his original views by the mid-30's, as evidenced by his withering attack on the probabilistic interpretation in the form of his cat parable. And The idea that Schroedinger is the spiritual father of the multi-worlds school is sheer nonsense.)
Comment: Oh come on now. The whole point of the cat parable was to ridicule the people who talked about the importance of consciousness.
Comment: -1: Schrodinger _did not_ believe the charge density interpretation to the end of his life! He did not believe it past 1926. He himself discovered the wavefunction for many degrees of freedom is in a higher dimension, which makes the charge-density interpretation impossible. He did tend to believe the wavefunction was more physical than Bohr (or Einstein), but it was more like Everett and Wigner. Schrodinger believed in mystical Wigner style consciousness-causes-collapse, rather than the mechanistic many-worlds, but these only differ in their philosophy of consciousness.
Comment: Please clarify the pronoun "it" in the first sentence.


How to link animation of object A to object B while keeping A's original location?

Question: When I link animation data of a cube to a sphere and animate, cube snaps to the sphere's location and take the same path while moving! How to link while keeping cube's original location?
Answer: One way to recycle motion without having the objects overlap is to use NLAs.  This is not exactly trivial.  You have to

place the action inside an action strip
put a location keyframe on the second object
change the action strip blending mode from Replace to Add

Another strategy would be to make the second object a child of an Empty or other object.  You can adjust the location of the parent to set the origin of the modified coordinate system.
In the following screenshot you can see the lower left window is the NLA editor illustrating that Cube.001 has one NlaTrack with the shared action, and its primary action is the offset keyframe.  The action strip has its Blending set to Add.
In the upper right outliner window you can see Cube.002 is parented to an Empty.
Answer: Once you link the two objects, click on the cube and move to where you want or its original location. Then use the sphere to control both of their locations together.
hope this was helpful!
-Noah


Android Hotspot doesn't work on Macbook pro

Question: I'm completely new to the Mac world. I am trying to connect my Macbook Pro (13" 2020
with Catalina 10.15.6) to my Android Hotspot. This seems to work because my macbook can connect to the hotspot and it responds to the ping. But whenever I try to open a web page the result is the same as not connected. Is anyone else experiencing this problem?
Comment: I know my son is doing it with a macbook pro 2015 running yosemite and an android with 4g. The macbook was on my wifi first so we knew all was fine then disconnected and connected by the android 4g. Works to get him into his bank.
Answer: Before I got a new iPhone, I experienced this with my Android sometimes. It may or may not work for you, but try a physical connection. I have found that this helped me.


See which user created a customer in backend

Question: Is there anyway to track which user creates customer accounts in the magento backend? I'm unfortunately running into a he-said/she-said situation, where customer accounts are being setup incomplete and I need to know who the culprit is.
Answer: This feature is only available in magento EE. You would have to install a module to have this functionality in your shop.
Some extensions I found in google:
https://amasty.com/admin-actions-log.html
http://merch.docs.magento.com/ee_docs/content/system-operations/admin-actions-log.html
Also read this article could be of interest to you: http://inchoo.net/magento/logging-user-customer-actions-in-magento/
Answer: You can adapt my module from this post for the customer grid
List out admin user id who add the product in magento 1
Good luck !


Neural Networks

Question: Is there such a thing as a double sided neural networks? I am trying to see if there are already established algorithms in Neural Networks for matching purposes. Lets assume there are two different parties available each with a separate dataset (like men and women in a dating site). Can we start a Neural work on one side (men) to get an output and conduct another neural Network from the other side (women) which could be possibly totally different and find a way to compare (measure the distance or the similarity) of the two outcomes? Assuming to have a large enough set of data would it possible to train both networks simultaneously? I have looked into Siamese Neural networks for instance, but that would not be the answer since in the case of Siamese networks both branches of the network have to be identical.
Answer: So you have two dataset and the goal is to tell if they match or not and the features of them are different right ? here we have binary classification and its normal ML problem, you can use a neural network ass well for extract features, if the features are so much, then you can classify them final layer with sigmoid function or any ML algorithm such as SVM
Comment: I am sorry Mustafa. I don't quite understand. This is not a binary classification. It is about matching apples to oranges (Men to Women) or People to Places and so on. As another example lets say you want to decide which type of jeans matches to which type of men. There are 50 types of jeans and go and figure how many type of men we got out there. This is a problem  that goes towards ad-optimization I would say but not completely.

Neural Networks


Where are the rules for a knight?

Question: I know that there is a Knight in D&D 4e, but I want to know where the detailed rules are for this kind of Fighter. I want to check if it has some other powers than the one I have from a template.
Answer: The Knight is found in Heroes of the Fallen Lands, or I linked to the DDI description if you have access to that.
It is a fighter variant.  This means you can replace Knight powers with Fighter powers of the same (or lower) level.
Comment: Also, Eladrins have a variant Knight in dragon magazines (can't remember which one at the moment).
Comment: But only powers that have a level. So, neither Battle Guardian (Fighter Attack) or Defender Aura (Fighter Utility) - which both lack a level - can be swapped for a Fighter (Weaponmaster) at-will or utility power.

Where are the rules for a knight?


Error trying to style a component directly with styled-components

Question: I'm trying to style a component like this:
function _MenuItem({label, icon}){
    return

        {icon}

{label}

}

export const MenuItem = styled(props => <_MenuItem {...props} />)`
    color: red;
    p{color: red}
    *{color: red}
`

The component is rendering, but the styles are not being applied.
I have managed to apply the styles by making a styled div and creating the component from that div, but I was wondering if there is a way to apply the styles directly to the component?
I am very new with react and more with styled-components so I assume that I have misunderstood some basic concepts.
Answer: Making a styled div is the correct way of doing things. I couldn't find anything on styling a component directly nor felt the urge to done it before.
Even when the styled-component docs describe how to style any component, they are basically styling an element just with a different syntax.
There doesn't seem to be a good enough reason to do what you want to do,  since you can achieve what you want to achieve by using the styled components as intended.
The following way of doing things works and it is super simple:
import styled from "styled-components"

const _MenuItem = ({label, icon}) => {
    return <Root>
        {icon}

{label}

    </Root>
}

const Root = styled.div`
    color: red;
    p{color: red}
    *{color: red}
`

export default _MenuItem;

Please let me know if I'm missing some specific use-case or something other.


How can you fill in frequency gaps in resampled vocals?

Question: If for instance you have a sound or voice, and it start's at pitch middle C, then you shift it down by say, 8 semitones, what appears to happen often is that the higher frequencies become shifted so that there's no longer any high frequencies to the voice whatsoever. What can be done to counteract this?
Answer: If you have to pitch shift plus/minus by more than ~4 semitones (M3), then you are probably better off just re-recording the vocal track in the different key.  You'll never be able to reproduce the harmonic spectrum of the vocalist correctly after pitch shifting by large amounts.  To do that you would need a model of the performers vocal track including how its resonances/formants vary with frequency and amplitude.  Besides a harmonic exciter, you could also try using a match EQ where the spectrum to match is the original un-pitch-shifted vocal track.  So keep a copy of the original untranspose track, and use that as the spectrum to match while processing the transposed track.  Then after the match EQ, maybe try the harmonic exciter.  I'm not sure what order would work best, but theoretically it would seem to make sense to do the match EQ first, and then the harmonic exciter if needed.
Answer: You could use a harmonic exciter plug-in, to add the sparkle back to the higher frequencies.
These are quite often used for vocals, so is probably the best choice for the task.


Locked out of Linux Mint

Question: I am running Linux Mint 12 with Cinnamon and sometimes when I leave my computer idle for a while, it will lock the screen. Usually, when I move the mouse a login prompt will pop up, but sometimes it doesn't. Then it's just a black screen with the time and my full name on a bar at the top of the screen. I can move the mouse, but nothing happens when I click on anything. When this happens I am forced to hard shutdown my computer, which is obviously not good. Does anyone know how to solve this?
Comment: Not an answer, but something that will help with the hard shutdowns is installing and setting up `acpid` so that when you press your power button it will trigger a clean shutdown. Also, I've been experimenting with Cinnamon too, and I get this issue sometimes too so you're not alone.
Comment: Also, some systems usually have (or used to have) CTRL+ALT+DEL set to run `shutdown -r now` (that is, reboot). Also, see the ["Magic SysRq" key](http://enwp.org/Magic_SysRq), as suggested by @jasonwryan, which is a last resort before a hard shutdown/reboot (`REISUB`).
Comment: Does the screen lock display animated images of some kind? If you press `Ctrl+Alt+F1` in that state, does it bring you to a text console? If you press `Alt+SysRq+S`, does it cause some brief disk activity?
Comment: Did you have VMware Workstation installed ? Sometimes it kills your Xorg key mapping.
Answer: Solving the issue would involve understanding why it is happening. You should start by looking through your logs to see if there are any obvious errors; begin with /var/log/Xorg.0.log and the lightdm log at /var/log/lightdm/lightdmlog.
To avoid having to do the hard shutdown, next time it happens, switch to a console with CtrlAltF1 (or any of the F_ keys between 1 and 6) and login and restart the display manager with:
sudo service lightdm restart
You can then switch back to the console that X (your GUI) is running in with CtrlAltF7 where you can log back into your Mint desktop.
Comment: In that event, it's time for the [Magic SysRq key](https://secure.wikimedia.org/wikipedia/en/wiki/Magic_sysrq)...
Comment: If you can't switch terminals, then it sounds like an X11 driver issue — do you have any other computer around you can network with that one to see logs and play with the computer after the "lockup" happens?
Comment: Unfortunately, when this happened to me I couldn't switch VT's, so that might not be a solution.
Comment: Huh, that's interesting. Never knew about that one. Personally, I just configured acpid to perform as safe shutdown on pressing the power button, and then use that to perform a safe reboot if I have to. Has the added advantage of just pressing the button on the front of my box to shut it down at the end of the day. This is still very useful info though, thanks!
Answer: I'm having the same trouble.  I haven't found a solution yet, but you can avoid losing your work pretty easily.  Hit ctrl-alt-F1 to get a terminal, log in, and run a ps -A | grep cin
then kill all the cinnamon-screensaver processes.
Then run DISPLAY=:0 cinnamon --replace
Then switch back to your main screen with ctrl-alt-F7 and continue working.

Locked out of Linux Mint


Is it possible to increase the amount of Powerplay Contracts you can recieve in Elite: dangerous?

Question: Like the title says, I would like to know if it is possible to increase the amount of powerplay contracts you can receive in one go, because a mere 10 contracts seems like a small amount!
Thanks,
CMDR Coopmac
Answer: If you navigate to Navigation > Galactic Powers > Rating, you'll notice your Pledge Rating tab and Available Ratings tab.
Your Pledge Rating tab displays the Rating you have with the Power your allied with. Your Available Ratings tab displays what benefit each Rating supplies you with.
You increase your Rating by meeting the Merit requirements for each one.
In accordance with your Rating you'll see how many power commodities each Rating is allowed access to. For example, Rating 1 with the Edmund Mahon allows for 10 power commodities, Rating 2 allows for 15, Rating 3 for 20, Rating 4 for 25, and Rating 5 for 50.


How can I see my dweller's maximum HP?

Question: I like to send out only dwellers with the highest HP into the Wasteland for the longest runs.  How can I see a dweller's actual HP?
Answer: There is no way to see a number for the dweller's health, but looks like the health increases with the level (and maybe Endurance?).
Anyway some guys are working on a very useful google sheet for Fallout Shelters.
On sheet 7, point 7.7 there is an experiment to try to calculate a Dweller's HP.
Comment: Yes, endurance does affect how much the max HP for a dweller goes up each time they level.  http://gaming.stackexchange.com/questions/223904/what-does-each-special-stat-in-fallout-shelter-do  - And yes, the lack of a numeric value for the total HP for a dweller is something I lament the lack of.
Answer: Without using a Save Editor of some kind there is no way to see your Dwellers' Max HP stat. However if you want a Wasteland Runner, you should at minimum raise Endurance to 10 before sending them out into the Wastes. If you can also equip them with +5 or +7 Endurance gear all the better. Whenever a dweller levels up they gain HP based on their Endurance, and this includes the gear they are wearing. So a Dweller who has a 17 in endurance will gain the most HPs each time she levels.
It's also worth noting that at 11 Endurance Dwellers don't take radiation damage in the wastes.
If you really want to do well in the wastes, raise all 7 stats to 10 before reaching Level 2. Then put your dweller in your best Endurance gear and send them out. Once they hit Level 50, switch to your best other gear and give a newbie the high Endurance gear. There are events for each of the stats in the wastes, so having everything maxed will give you the best benefit. Additionally, when a Dweller levels up they are healed completely, so a SPECIAL 10 dweller w/ Endurance gear can often go a whole day or two before using her first Stimpack. I've had several dwellers make it 5 days or more before running out of Stimpacks.
Comment: I don't level E on any dweller who gets past level 1. New level 1 dwellers get sent to Fitness training, and then, with 10E, are used in my vault. As I get the gear, 10E/1 dwellers are sent into the wasteland and levelled there, to 50, in wasteland gear. When they return, I use the Barber, to color their hair according to the quality of the wasteland gear they levelled in: +3E gets green hair, +5E gets blue hair, +7E gets purple hair.
Comment: Yes, I understand how Endurance works and have instituted a comprehensive exercise program, but not everyone got the training at level 1 so I've lost track. Also, I don't mind peeking with a save game utility.
Comment: In my when someone gets to E10 I append their name with •## (where ## is what level they are) so I know what level they finished their E training in.

How can I see my dweller's maximum HP?


Confused about mode locking

Question: I am confused about the way mode-locking is done in practice. If i understand the problem well, normally, in a laser cavity with a large enough bandwidth, we have many modes that would interact in an incoherent way and give a low power (this would be a continuous wave laser). If we are able to create some phase relation of the modes (for example all of them to have the maximum of one of the peaks at the same point) than we create a mode-lock laser. So the problem we need to solve is to somehow shift the phases of the modes in the cavity to go from some random noise to a nice tall peak. However, I read about an active way of achieving this, using an acustic-optic resonator. If I understand it well, this allows frequency modulation which can shift the present modes by c/2L and in the end you remain only with the central mode, while the others get lost as they are not able to reproduce themselves. So basically (part of) all modes are converted to some frequency and the rest is discarded. But I am really confused now. All this would shift the frequencies of the modes, not the phases. So you end up with "bunches" of light of the same frequencies, but out of phase. How is this any better i.e. different than random noise? I imagine that, given that you have just one frequency now, the noise shape will stay the same (before the shape was also changing in time, due to having different frequencies), but I am not sure I see how do you get such a nice, narrow peak from lots of out of phases "bunches" of light and not just noise. Any explanation would be greatly appreciated! Thank you!
Comment: If this is related to your earlier laser question, you might want to look at Q-switching, which also produces higher powered pulse output, but is simpler to explain.
Comment: @ThePhoton it is not necessarily related, but I am reading laser stuff, so you can say it is. I understand how Q-switching works, that pretty clear. I am just confused about mode-locking. How does playing with frequencies solves the problem of phase difference. As far as I can tell, adjusting the frequency shouldn't influence the phase.
Answer: In practice, there is usually a passive element relying on Kerr lensing that stabilizes the coherent modelocked beam over the CW one.  The mode locked beam has a much higher peak intensity, and so if there is a material whose index of refraction is dependent on the intensity of the field (which is really all materials, the effect is just weak) then the modelocked beam will become spatially convergent, like it had passed through a lens.  This allows the modelocked beam to be spatially filtered from the CW beam, effectively blocking it.  Does that help?
Comment: I am actually confused about the active mode-locking, not the passive one.
Answer: Ok, let me see if I can answer this question. Active mode-locking via acousto-optical modulator can be achieved via amplitude modulation: basically you create losses at the same frequency of your cavity. In this sense a pulse that exists at the minimum loss point every roundtrip is the only surviving circulating E-field in the cavity. This is of course easier to understand in a time setting, not phase or frequency. Just imagine a time gate that only opens exactly at the same frequency as the time it takes the pulse to go through the cavity.
In the end it stabilizes as a short pulse also because the gain then is also modulated: as the mode-locked pulse passes through the medium it depletes its energy quite efficiently and so other modes also have a hard time getting gain.
Now, frequency modulation, or phase modulation, that you were probably referring to, and I dont really know what an acoustic-optic resonator is, and will not google it. So, if you modulate the phase seen inside the cavity, for example with a medium whose refractive index is modulated in time, to have the same frequency as the cavity, then from a single frequency, passing through such thing, creates sidebands at a frequency away equal to the modulation frequency. These sidebands now generate sidebands, which generate sidebands, which generate sidebands, you get the picture. Now all of them are phase locked, as they originate from one single frequency, and they are all spaced equally, the spacing the same as the modulation frequency. Now all of this will only be supported in a cavity where all this frequencies can coexist, so the spacing needs to be the same frequency as the cavity. Then the same thing with the gain above happens, as they are all now constructive interfering in a nice pulse, they deplete the gain more efficiently. Just imagine that at a certain point there was one mode, arbitrary phase, that had more power than others, and this mode and its sidebands were able to pull through and rise above all others, effectively stabilizing the mode-locking mechanism.
This whole process can also be thought as for example the end mirror oscillating with the same frequency as the cavity length, if you imagine such a scenario, this is the case of a phase modulation: total phase is proportional to length of the cavity (and creates the sidebands).
Now the pulses prefer when the mirror is at either side of the oscillating movement, or zero velocity, because at every roundtrip this is reproducible. During a ramping up or ramping down, the cavity modes are effectively shifting like an accordeon, and this just generates a bunch of light modes negatively interfering. While at the turn around point the modes are fairly static.
No one likes active mode-locking either way :p (this is not true, though, just a small joke)

Confused about mode locking


Cinema4D: The application was unable to start correctly (0xc000007b)

Question: Everytime I open Cinema 4D R18, I get this message:
The application was unable to start correctly (0xc000007b)
I'm on Windows 10 Pro 64-bit (Version 1703, Build 15063.413) and I've made sure I'm on the latest version of Windows and .NET framework.
There's one way I've found to get it to work and it happens everytime I finish installing the program and I tick "run after the setup is complete". C4D works perfectly but once I close it, I get this message everytime I want to open it again.
After thouroughly looking online for a solution, I still havent found anything.
Answer: Are you using a no license version?

Uninstall and reinstall latest Microsoft Visual C++ runtime packages and do the same thing with .net framework, update directX.
Run cinema 4d as admin.
Try signing into another user account and open it.
Search if any dll missing in your cinema 4d directory while installing due to anti-virus(it may be deleted by your anti-virus).
Check if any registry errors( i had this problem while ago with cinema 4d r16).

Restart your PC :)


deploy a vpn from an appliance

Question: I have a client (for our SOC) whos home is protected by a PAN 200 firewall (palto alto) but doesnt have a static ip address. The issue Im facing is how to send all the logs to our vps without having to open up all IP addresses. From what I understand, site to site vpns require static ips on either side, so I was considering adding an openvpn access server on our end and somehow establishing a connection from the PAN 200 appliance to our server. Is this possible in any way?
Answer: It is possible to setup openVPN server on the VPS end.  the specific procedure would depend on what operating system the VPS is running.  You might also consider Wireguard as an alternative to OpenVPN.
If your only objective is to ship log files from the home office environment, you might also consider using ssh.  Although, if you decide to employ ssh in this capacity, you should disable password authentication and accept only key-based authentication.
Comment: Thanks for the reply. I think I didn't clarify my question well enough. We have an openVPN server on the vps. What we would like to avoid is having to open every port in order to accept the incoming logs from the agent. I understand you are suggesting ssh however I dont believe this will work for the monitoring we are doing. So more specifically Id like to know if their is a way to deploy a openvpn client on an appliance?
Comment: "Id like to know if their is a way to deploy a openvpn client on an appliance?"
Yes, there should be, although that depends on the nature of the appliance, specifically, the operating system on which it is built, and whether there is something within the appliance's config that would reset custom configurations upon reboot.  May I ask what appliance you are wishing to install an OpenVPN client on?  You might also consider using another VM as a gateway to the VPN.
Comment: we would like to deploy openvpn on a palto alto firewall
Comment: I don't know anything about Palo Alto.  When you said appliance I thought you meant virtual appliance.  My mistake.  It may only be possible to use your palo alto device in OpenVPN client mode if the vendor has exposed this functionality in their software.  Do you have a specific model/version you are working with?  I would like to research the capabilities of your specific device.

deploy a vpn from an appliance


Install pygame in anaconda

Question: I have anaconda on Ubuntu 14.04. I want to install the pygame module with anaconda. I already run sudo apt-get install python-pygame, but this only works on python, not in anaconda.
Answer: I realize I am quite late to the party but here is what worked for me if anyone needs it. Ubuntu 14.04 64-bit with Anaconda 2.3.0 installed.
Install binstar:
conda install binstar

You get a response like: The 'binstar' conda package has been renamed to 'anaconda-client'. Please run: conda install anaconda-client.
So run:
conda install anaconda-client

Then search for the pygame package on anaconda.org:
anaconda search -t conda pygame

You get a list of pygame packages available at anaconda.org. Select a package for your distribution e.g. tlatorre/pygame is for Linux 64-bit.
To install it use:
conda install -c https://conda.binstar.org/tlatorre pygame

Once done, import pygame should work.
Credit: Answer by cohdez on
https://stackoverflow.com/questions/29137369/installing-pygame-module-in-anaconda-mac
Answer: Use this code at Terminal:
    conda install binstar
    conda clean --lock
    conda install anaconda-client
Search for appropriate package at:
anaconda search -t conda pygame
For Python 3 use the following
conda install -c https://conda.binstar.org/kne pygame

for Ubuntu this would work
Answer: I'm having the same problem and am looking for the same answer. Sadly, I didn't find an answer to install pygame with anaconda. What I did find is an alternate solution. You have to change your path like so:
Open terminal and run
echo $PATH

then you will see:
/home/username/anaconda/bin:/usr/lib/etcetcetc..

Now, copy this from the : to the end (excluding :). Then, run
PATH=/home/username/anaconda/bin:/usr/lib/etcetcetc..

This will make the terminal use the default python and pygame will work. This is not permanent. When you close the terminal, this is automatically changed.

Install pygame in anaconda


Create a sparse matrix

Question: I am writing a FE program which calculates the displacements under a uniform load. I want to store the stiffness matrix in sparse form(COO) without using an external library.Assume an upper-bound for the number of non zero elements per row is known.
My problem is that I can't assemble the matrix in a sparse form and all the examples that I found they take as input the whole matrix and then make it sparse. In my case I want the spasrsity from the beggining ,is that possible?
Comment: COO comprises 3 arrays: row, col, data. Build those arrays any way you see fit. You probably need to sort them by row and col after, or insert them in a sorted order. What have you tried?
Comment: Have you seen: https://scicomp.stackexchange.com/questions/14134  ?
Answer: Start with a matrix that only stores those entries you have explicitly written something nonzero to. For example (not particularly efficient, but feasible), you could do
<code>class SparseMatrix {
  using std::pair<int,int> ij_coordinates;
  std::map<ij_coordinates,double> entries;

  ...
};
</code>
Initially, there are no entries, but as you add ones, the map fills up.
Answer: The sparsity is going to depend on your choice of basis functions and the way you mesh the geometry of the problem you pick. If the basis is trilinear quadrilaterals on the cube meshing a cube that's 15x15x10, that gives one structure, if the domain is L-shaped, that gives something else.
If you know all three aspects: element type, underlying domain, and the division of that domain into elements, you have some hope of forming the sparsity before assembly. And unless you're trying to slowly build your matrix as you mesh (with lots of dynamic allocation and lazy evaluation), you're likely to have to know all this beforehand anyway.
Answer: I would recommend Chapter 8 in Sparse Matrix Technology, by Sergio Pissanetzky, 1984.  He shows how the element-node connectivity array, once put into a sparse matrix format, can be used to generate the node-node connectivity.  This connectivity is the sparse matrix indices for a finite element method.  This connectivity can be used to initialize the sparse matrix storage that is filled in with element assembly.

Create a sparse matrix


How do our eyes perceive a parallel beam?

Question: So if our eye is considered a lens, a parallel beam (sort of like collimated light from a flash light) should converge to a single point, the focal point. So does that mean our eye will see a finite parallel beam as a single dot? That seems contradict real life experience, where I still see the parallel beam as a beam with finite width. What gives?
Answer:
... I still see the parallel beam as a beam with finite width.

Can you describe this scenario more?   Normally you cannot see "beams" at all.  You just perceive the transmission point.
But yes, for parallel beams, and assuming the lens is focused at infinity, and assuming the beams intersect the lens, then they would all focus to a single point.   You would see a single point of light.
Basically, this is exactly the scenario when you observe a bright star in the night sky.   Light rays from it are intersecting your lens at different points (near the center, near the top edge, halfway to the right edge, etc.) All these rays are brought to a focus at a single point on your retina and you perceive a single point.
Flashlights don't produce parallel rays.  So when you look at a flashlight you're able to see different parts of the transmission lens.
Comment: I guess the issue is the flashlight I was using doesn't really produce parallel rays as you said --- I was under the impression the cone shaped reflective material around the bulb is designed to make all rays parallel, but I guess that's not true. At least not true for all the light. But some of the rays are indeed parallel, aren't they? --- When you point a candle towards the wall you don't get a beam at all, but pointing a flash light at a wall it does create a circle beam.
Comment: Yes, the mirror and lens in a flashlight *concentrates* the light, but there's still plenty of divergence so you can see that the flashlight is "lit" even quite a bit off-axis.
Answer: Imagine you are in a space ship ten times as far away from the sun as we are now, just past the orbit of Saturn. You have a window pointing towards the sun and a fog generator in your craft for some reason. The sunlight scattering off the fog would make the beam passing through the window visible from the side, and you would see a beam the width of the window with almost no noticeable divergence.
But if you looked at the sun through the window you would see a very bright point of light (or at most a tiny spot) as all of those (almost-)parallel rays were focused onto a point on your retina. You can make the rays as nearly parallel as you want by moving farther from the sun; it just becomes harder to see the beam scattered off mist.
Any time you see something as having some width, that means that the rays entering your eye from that thing are not parallel. If you have a very parallel beam (which rare), and it appears from the side that way, what you are seeing is non-parallel rays of light being scattered from particles in the path of the beam.
Comment: They are parallel to exactly as good an approximation as the angular size of the sun. The sun is just half a degree across in the sky. That's big enough to perceive as a disk, but, still, two lines with a half-degree angle between them are pretty close to parallel.
Comment: How does this explain the fact that we can see the sun as a spot with some width? The suns rays are, to a very good approximation, parallel.


Viewing all permissions for a user or AD Group in SharePoint 2007?

Question: Similar to this question is there a similar way to look up permissions for a given user or AD Group?  SharePoint 2007 really doesn't work in PowerShell and the Internet didn't yield much here.
Answer: You can get information via PowerShell in MOSS 2007. The script from this site will traverse a site and give you groups and permissions.
To quote form the site, it will:
Recursively crawl a site or entire web application within SharePoint
Enumerate permissions assigned to a SharePoint site Detail the
SharePoint users assigned to a SharePoint group Determine if an
Active Directory group is a member of a SharePoint group Detail the Active Directory users who are members of an Active Directory group
Search for a specific user's permissions on a SharePoint site
http://geekswithblogs.net/bjackett/archive/2009/04/24/the-power-of-powershell-and-sharepoint-enumerating-sharepoint-permissions-and.aspx
Answer: SharePoint SUSHI (SharePoint Utility with a Smart, Helpful Interface) is a free administrative tool for SharePoint that among other tasks, will list the permissions a user or AD group has within an entire site collection (the screenshot on the main page shows this functionality).
Disclosure: I have no affiliation with SUSHI but I have used it specifically to find out permissions for some users.
Answer: The SharePoint Admin Toolkit has some features that help tracking down user permissions within the SharePoint interface.  We have it installed and it definitely helps track down why people might get access denied errors due to permissions and comparing permission sets.
Answer: Checkout SharePoint Permissions Manager which gives a quick view of all the permissions for the group/user within the site.
Comment: Negative, this tool does not do AD Users or groups only SharePoint groups, used already
Comment: Maybe I misunderstood the question. I believed, the users and AD group permissions you are talking about, are the users and groups from AD directly added into your SharePoint site within SharePoint groups. Moreover the link, you provided was speaking about permissions in site and site collections. So I came to that conclusion. Anyway, good to know, you got the right solution.


sections of the cotangent bundle of elliptic surfaces

Question: Consider an  elliptic surface $f :X \rightarrow C$ with $\chi(X) > 0$
or equivalently the fibration has a reduced singular fiber apart from possibly multiple fibers
 (the field under consideration
is $\mathbb{C}$,$X$,$C$ are smooth and projective ).
Denote by $\Omega$ the cotangent bundle of $X$ and
$K$ the canonical bundle of $C$. We have an inclusion
\begin{equation}
0 \rightarrow f^*K \rightarrow \Omega
\end{equation}
Let $q(X)$ denote the dimension of $H^0(X,\Omega)$ over $\mathbb{C}$.
We have $q(X) = g$ where $g$ is the genus of the curve $C$.On the other hand
dimension of $H^{0}(C,K)$ is $g$ as well and hence we get (using the above inclusion of
sheaves)
\begin{equation}
H^{0}(C,K) = H^{0}(X,\Omega).
\end{equation}
Now what I am trying to understand is the above equality in a better way (rather
than just by using the dimension argument as above). Is there a way to see why
all the 1-forms are pull backs of those from the base curve?.
Comment: @Ariyan: I dońt understand your exact sequence: $\omega_f$ should be the sheaf of differentials of $f$. This will not be a line bundle unless $f$ is smooth everywhere.
Comment: You could write down what the entire exact sequence should be. If I'm not mistaken, it should be $0\to f^\ast K\to \Omega\to \omega_f\to 0$, where $\omega_f$ is the relative dualizing sheaf. This is a line bundle on $X$. It is zero because $\omega_f$ reduces to the canonical sheaf on the generic fibre of $X\to C$ , and the generic fibre is an elliptic curve, right? If you don't like "relative dualizing sheaves", then just note that the quotient of $\Omega$ by $f^\ast K$ reduces to the canonical sheaf on the generic fibre. So your "surjective map" should be an isomorphism.
Comment: @ariyan I think if I assume further there are no multiple fibers
(which I should have mentioned above) only then the quotient
sheaf $\Omega/ f^*K$ is torsion free. In that case I thought
this quotient should be of the form $\omega_f \otimes I_Z$
where $I_Z$ is the ideal sheaf defining the singular points in
the fibers.
Comment: This proof has to take advantage of the fact that the family is not isotrivial, because the theorem is false there. One way to do this is using Hodge theory to compare sections of the tangent bundle to a cohomology group, and the Leray spectral sequence to compute the cohomology group. But presumably that's just a version of the dimension argument you don't like. So you need some more clever way to take advantage of that. As Ariyan points out, the key fact is that any section of $\Sigma$ must map to $0$ on $\omega_f$ and thus arise from $K$.
Comment: Please fix the markup.
Comment: hi yes I was trying that .. :)
Comment: Note that this statement is still true if you remove the singular fibers, and then you don't have to worry about the singularity at all. Adding back in the singular fibers only requires you to check that if it's $0$ at the nonsingular fibers then it's $0$ at the singular ones, which is true as long as you're torsion-free. This removes the singular fibers from consideration and frees you to focus on the monodromy, which is the interesting part, but I don't fully see how to complete the argument.
Comment: @Damian yes that is what I think too, infact I believe it will
torsion free only when the fibers are reduced. Otherwise
as I commented above won't it be of the form $\omega_f \otimes I_Z$
?.
Comment: @Damian  My apologies. I was implicitly thinking about the smooth case.
Comment: @rvarma. You're right I was thinking about the smooth case.
Answer: This is a comment starting from a slightly more general context. Most of the following material can be found in  a paper of T. Saito and me (but most dealing with the positive characterisitc case).
Let $f : X\to C$ be a flat morphism of smooth (geometrically connected) projective varieties over a field $k$ of characteristic $0$. Consider the canonical exact sequence
$$ 0 \to f^*\Omega_{C/k}\to \Omega_{X/k}\to \Omega_{X/C} \to 0. $$
We have $f_{*}\mathcal O_X=\mathcal O_C$. Taking $f_*$ we get an exact sequence of sheaves on $C$:
$$ 0 \to \Omega_{C/k}\to f_{*}\Omega_{X/k} \to f_{*}\Omega_{X/C}\stackrel{\theta}{\to} R^1f_{*}(\mathcal O_X)\otimes\Omega_{C/k}. $$
We have $R^1f_{*}(\mathcal O_X)\simeq \omega_{X/C}^{\vee}$ (in characteristic $0$).
Let $T=\Omega_{X/C, \rm{tors}}$ (torsion as $\mathcal O_X$-module).
A local analysis shows easily that $T$ is an invertible sheaf over the verticla divisor $D:=\sum_{s\in C} D_s$, where $D_s=X_s-(X_s)_{\mathrm{red}}$ (here again we need $k$ of characteristic $0$) and we have an exact sequence
$$ 0 \to T\to \Omega_{X/C}\to \omega_{X/C}(-D) \to S \to 0$$
with $S$ of finite length. Thus the $\mathcal O_C$-torsion part of $f_*\Omega_{X/C}$ is exactly $f_*T$.
At the generic fiber $\theta$ is the Kodaira-Spencer map. It is non-trivial when $f$ is non-isotrivial, and it is injective if moreover the generic fiber has genus $1$. So under these hypothesis, we have
$$ 0 \to \Omega_{C/k}\to f_{*}\Omega_{X/k} \to f_{*}T\to 0. $$
Therefore the canonical map $H^0(C, \Omega_{C/k})\to H^0(X, \Omega_{X/k})$ is an isomorphism if
$$H^0(X, \Omega_{X/C, \mathrm{tors}})=H^0(C, f_*T)=0.$$
In a small neighborhood of a non-multiple fiber $X_s$, one can show that $H^0(f_*T)=0$. Otherwise (especially when $X_s$ is irreducible but not reduced) I don't know.
Comment: hi prof Liu, thanks for the answer. The thought of using $f_*$
did not cross my mind :) . Anyway but in my case since $C$
is a smooth curve and $\Omega_{X/C}$ generically restricts
to the canonical sheaf of the elliptic curve (say F), in particular
$h^0(\Omega_{X/C}\mid_F) = 1$, the sheaf $f_*(\Omega_{X/C}$
splits $L_0 \oplus T$ where $L_0$ is a line bundle and $T$
is a sky-scrapper sheaf. Now on the other hand $f_{*1}(O_x) \otimes \Omega_{C/k}$ is locally free as well. So the kernel of $\theta$
has to be $T$.
Comment: So as long as $\Omega_{X/C}$ is torsion free, we get
$K_C \cong f_*(\Omega_{X/k})$ which I never knew.
Tell me If I was wrong somewhere.
Once again thank you.
Comment: Oh yes $\theta$ could be $0$ as in the isotrivial case.
Comment: @rvarma: yes, if $\Omega_{X/C}$ is torsion free (equivalently, all fibers of $f$ are reduced), your isomorphism is correct. But this isomorphism holds under a slightly more general situation, it is enough that there is no multiple fibers (this is proved in the paper with T. Saito in any characteristic, but probably there is a simpler proof in characteristic $0$).
Answer: Consider the short exact sequence
$$
0\to f^*\Omega_C\to \Omega_X\to \Omega_{X/C}\to 0,
$$
and the long exact sequence induced by $f_*$:
$$
0\to \Omega_C\to f_*\Omega_X\to f_*\Omega_{X/C}\to \Omega_C\otimes R^1 f_* \mathscr O_X\to \ldots
$$
If $f$ is not isotrivial, then $\beta: f_*\Omega_{X/C}\to \Omega_C\otimes R^1 f_* \mathscr O_X$ is generically injective (at least where $f$ is smooth $f_*\Omega_{X/C}$ is a line bundle and $\beta$ is non-zero).
If $\Omega_{X/C}$ is torsion-free, then so is $f_*\Omega_{X/C}$ and hence $\beta$ is injective everywhere. That implies, that then $\alpha:\Omega_C\to f_*\Omega_{X}$ is an isomorphism.
Therefore, $H^0(U,\omega_C)=H^0(f^{-1}U,\Omega_X)$ for every $U\subseteq C$ open.
Comment: hi thank you i believe you meant f non isotrivial.


What is the best way to ask "how did you?" questions on an old question?

Question: I have found old questions (two years to seven years for the sake of argument) and answers that are close to what I need to know, and in some of the questions there is useful work already done that I want to ask the OP how did you even get that far? What is your OS? What preliminary tools did you use? But these are old questions and I haven't found the proper guidance yet to know if commenting on an aged question is rude or bad practice. I have not found a way to reach out directly to another user either. Is there such a method? Is it restricted for 'low points" users?
Comment: It seems you need to ask your own question about where you are stuck.  You can cite the other question as a reference, but make sure you indicate how your question is different from that one and what you are asking that is not covered in the answers to the other question.  If you can comment, you can drop a comment to your own question that is targeted at the OP from the original question to see if they can help you with yours, but that's the extent of person to person communication on SO.
Comment: From your profile, it looks like you mostly ask about Python. If you want to discuss stuff related to Python, you're welcome to visit the [SO Python chat room](https://chat.stackoverflow.com/rooms/6/python). You can read our rules [here](https://sopython.com/chatroom). We can help with questions that may be too broad for the main SO site, and general brainstorming, but we still need you to explain your question clearly & coherently.
Comment: There's no point in asking other OPs anything if they are not logging in. If their profiles show something like _"Last seen more than 2 years ago"_ they won't even see your comment. But even if they do, they may ignore it, or not remember anything about the issue now. Expect nothing, and be pleasantly surprised if you get a helpful response. A better approach would be to cite those other questions in your post, explaining why they are not helpful to you. That helps in two ways: it clarifies your problem, and precludes the possibility of your post being closed as a duplicate of those.
Comment: You may want to review https://meta.stackoverflow.com/questions/258610/how-should-one-ask-for-clarification-on-a-question-if-they-cant-yet-comment
Comment: Do you mean ask the author for clarifications on their question so that you can answer it better?
Comment: @Dharman -- No - I mean for my related question (not close enough to use the answers from this one) if I could just learn some of the underlying techniques the OP used in getting to THEIR question, I would be able to make a lot of progress on my own. Makes sense? May I quote a specific example?
Comment: @AlexeiLevenkov I reviewed that post and answers and did not find it adequate to answer these questions. Mostly it was back and forth arguing about what should be point thresholds, not relevant, except in the sense that I am where I am and that isn't going to change except in a negative way if I ask a poorly formatted question.
Comment: Thanks all, please consider this done
Comment: For a question that's years old, even if the person being commented to is active there's a good chance it won't help.  If I'm asked about something I did years ago at a previous employer in a stack I no longer work with I'm very unlikely to remember any details about it; and can no longer fire up a copy of the code to take a look.
Answer: The best way for you would be to ask a new question. If the topic you are searching for doesn't have adequate answers on Stack Overflow yet, then your responsibilty is to post this question so that an answer may be found.
There's no way to contact the author of that question. Stack Overflow is not a forum and you can't reach out to other people to have a discussion on how they did a project.
Comment: grok. I will try to follow this guideline and @jfriend00 's advice and format a very specific question that may elucidate a useful and focused answer.
Answer:
[H]ow did you even get that far? What is your OS? What preliminary tools did you use?

In general, I agree with Dharman that new questions should be asked as a "new question". However, your examples sound more like you would like a clarification about details on an existing answer.
In that case, it's perfectly fine to leave a comment. The age of the question is completely irrelevant. Some users leave the site for good 10 seconds after having received an answer to their question, others stay around for more than a decade. And even if the original author is not active anymore, it's quite possible that someone else sees your comment and knows the information you are looking for.
Comment: I would say that if the original author doesn't see your comment, it's *extremely unlikely* that someone random will have anything useful to add.  Old questions don't get nearly the same amount of traffic as new questions.
Comment: @MarkRansom: Unlikely, indeed, but it has happened (at least to me, iirc).
Comment: @MarkRansom: Maybe not quickly, like maybe years later.  I sometimes respond to old un-answered comments if they're asking things I can imagine other future readers might be wondering, especially if it makes a useful addition to the answer.
Comment: @PeterCordes I did say unlikely, not impossible. I'm sure I've done the same myself.  But since the question was about which approach would be more fruitful, I thought it was a point that needed to be made.
Comment: @MarkRansom: Fully agreed if we're talking about practical results in the *short* term, where asking a new question is the other option.
Comment: Now that I can comment this will all go a little easier, ha.
Answer: There's something that worries me from your question:

I haven't found the proper guidance yet to know if commenting on an aged question is rude or bad practice

Commenting asking for clarification is never rude or bad practice. Commenting alone even if it's not asking for clarification is never rude. That's literally the reason why "comments" exist:

The worst that can happen is that the author never sees your comment, the best is that it respond to your query, so there's nothing to lose and too much potential to win. Don't try to guess if it ever going to respond. Heck, I've been replied to months after my comment.
Comment: You might want to clarify this meta answer that it's only ok to ask for clarification of something the answer was already trying to explain.  It's *not* ok to basically ask a followup question or how to apply the answer to a very similar related case.  That's something a lot of beginners misunderstand, even going so far as to post a new question as an *answer* instead of comment.  So just for the sake of any future readers of this answer, might want to be specific.
Comment: But some construe rudeness if comments (and posts) *deviate from the* ***letter*** *form*, including explicit addressing (e.g., *"Good afternoon, Braiam. It is a very nice day outside. The sun is shining. . Regards, Peter Mortensen"*.) (Though, ironically, it is also rude to assume being in the same time zone (*"Good afternoon"*) or the same geographical location (*"It is a very nice day outside"*).)
Comment: @PeterCordes that's up to the author to determine. If there's something that isn't explained and could be edited in the answer, that would be best. I prefer giving them all the go to doing comments and that if the author believe that the commenter would be best served to ask an entire new question they can tell them so. In other words, I don't want readers to restrict their comments. I prefer them to comment first and then ask new questions later.
Comment: @JackFisher no Vulcan, just don't waste the reader time. Get to the meat immediately. Ask what you want to ask, nothing less, nothing more.
Comment: Precisely.  A question is a question, not an email.  For 100% of the people reading your question in (say) 1 years time (and 99.5% now), the "politeness" is just a distraction.  Imagine if you were reading an FAQ and ever question in the FAQ started with *"Dear support, I hope this finds your well, "*.
Comment: @PeterMortensen personally, I tend to edit out those from my reading and get to the meat of the comment. BTW, that someone considers a behavior rude doesn't make it universally rude. Otherwise, there would be no way to not offend someone.
Comment: So far whenever I have posted a question or answer (I have deleted several) someone has edited out any form of polite expression, so my interpretation is that I should behave like a Vulcan that wants information or one who has a useful contribution to make.
Answer: If you have sufficient reputation (75 points), another approach would be to post a "bounty" asking for answers that explain in more detail how to solve the problem.
But asking a new question is probably a better idea, as per Dharman's answer.
Comment: So, are you saying OP shall first wait 11 years (based on his average rep gain during the past 7 years) until he has enough reputation, then spend all the points for a bounty so afterwards he isn't even able to comment any more? Sorry, but the bounty approach is not working for a lot of people.
Comment: His past rep gain will be related to the amount of help he provides to other people.  But yea ... for this person and other people who don't ask questions and write answers, this is not going to help.
Comment: I was off the site for a long time. Now I believe I am back for a while. My work is going to require growth mindset in programming for the foreseeable future.


What are the screen dimensions of the iPhone 4s and iPhone 5s?

Question: What are the dimensions of the screen on the iPhone 4s and 5s? I mean the length and width of the actual display, in mm or cm. I tried searching for it online but all the sites I looked just provide the resolution and not the actual dimensions.
Answer: This can be easily calculated with the available information. Since screen dimensions are always specified as the diagonal measurement, the rectangle can be divided into two equal right-angled triangles, with the hypotenuse being the diagonal measurement and the aspect ratio of the display providing inputs for the calculation of the height and width.
iPhone 4S

Display size (always specified as the diagonal size): 3.5 inches or 89 mm
Aspect ratio: 1.5 (which is specified as 3:2 and can be calculated from the resolution - 960 x 640 pixels; 960/640 = 1.5)
Calculating the height and width when the ratio of the sides and the length of the hypotenuse are known can be done manually or even quicker, by using WolframAlpha.
Check this calculation link for iPhone 4S on WolframAlpha. The result is 74.05 mm by 49.37 mm.

iPhone 5s

Display size (always specified as the diagonal size): 4 inches or 100 mm
Aspect ratio: 1.775 (which is specified as 16:9 and can be calculated from the resolution - 1136 x 640 pixels; 1136/640 = 1.775)
Calculating the height and width when the ratio of the sides and the length of the hypotenuse are known can be done manually or even quicker, by using WolframAlpha.
Check this calculation link for iPhone 5s on WolframAlpha. The result is 87.12 mm by 49.08 mm.
Comment: Talk about a comprehensive answer! Awesome!
Comment: Great work Michael and M K, this was the exact answer I was looking for. To choose between models, I made two cardboard cutouts of the 6's to see how they felt in my hand since the shop ones are on bulky chain fixings. Thus the screen size was important too, cheers. Not that there is any stock in Australia!!
Comment: Calculation links on Wolfram Alpha return "(not a possible rectangle)"
Answer: Wanna add info about iPhone 6 and iPhone 6 plus:
iPhone 6

http://www.wolframalpha.com/input/?i=119.38+mm+screen+aspect+ratio+1.778

1334 x 750 = 1.778
iphone 6 = 104.1 mm x 58.52 mm

iPhone 6 plus

http://www.wolframalpha.com/input/?i=139.7+mm+screen+aspect+ratio+1.778
1920 x 1080 = 1.778
iPhone 6 plus = 121.8 mm x 68.48 mm
Comment: No. But for example I was looking for sizes in mm of all iPhones. But here was only sizes for iPhone 4 and 5... So I calculate sizes for new iPhones and post it here for other people who will search for it.
Comment: This doesn't answer the question.
Comment: @Michael A better approach would be to post a question for the new models and answer it yourself.


Is it possible to read data from TOF (time-of-flight) sensor on Android?

Question: Recent models of Android phones (Honor View 20, Huawei P30 Pro, Samsung Galaxy 10 5g) have TOF (time-of-flight) sensor. Is it possible to read it through some API or manufacturer SDK?
Answer: Possible for Huawei using AR Engine SDK
https://developer.huawei.com/consumer/en/ar
Excerpt of SDK Document AREnginesdk-sample-188.8.131.52\HUAWEI AR Engine Function Manual.doc

4.13 Scene mesh
  Huawei AR Engine provides real-time output scene mesh
  capability. The output includes the pose of the  mobile phone in
  space. The 3D mesh of the current camera view only supports the
  specified Huawei  models(Honor V20、P30Pro) that can obtain depth
  information, and the supported scanning scene is  static.

Excerpt of SDK Document AREnginesdk-sample-18.104.22.168\java\HUAWEI AR Engine SDK Interface Manual.docx
126.96.36.199.   ARSceneMesh
•   Description: The class used to return the tracking result when the environment Mesh is tracked. The result includes the Mesh vertex coordinates, the triangle subscript, and so on.
•   Methods:
public ShortBuffer getSceneDepth()
        // Get the depth image of current frame(optimized).
public int getSceneDepthHeight()
        // Get the height of the depth image.
public int getSceneDepthWidth()
        // Get the width of the depth image.

Possible on Huawei usinga camera2 API
https://github.com/google-ar/arcore-android-sdk/issues/120#issuecomment-535413944
This issue in ARCore contains a lot of information!
Also seems to be possible on S10 5G, but currently not on Note 10+
Excerpt of Night Vision / ToF Viewer app description:

This app is currently working only on Huawei P30 Pro, Honor View 20
  and Samsung S10 5G. More devices will start working by future device
  software updates.
New features

compatibility for Samsung S10 5G added (and maybe for other devices)
resolution dialog removed
support for front facing removed

Note: There was done a big research for Samsung Note10+ support,
  however this device does not seem to support ToF for 3rd party apps.

Another interesting app:
3D scanner app using Huawei ToF sensors
https://play.google.com/store/apps/details?id=com.lvonasek.arcore3dscannerpro
Answer: Android does include OS level APIs to interact with non-traditional visual cameras. For Samsung S10 5G for example, you can access the camera with the Camera2 API and get a DEPTH16 frame directly. Here is an example: https://medium.com/swlh/working-with-the-3d-camera-on-the-samsung-s10-5g-4782336783c This works with all the Samsung devices, though the example only uses the front-facing ToF camera on the S10 5G. Both S10 and Note 10+ 5G have back facing ToF cameras as well.
I don't know if Huawei or OnePlus conform to the same API (they theoretically should and other answers indicate that they do to some extent).
Answer: Not possible as of now.
As Android has not included any such APIs in official latest SDKs.
Also those manufactures like Huawei, Samsung and OnePlus are using their customized OS sources and I don't think they have opened it out.
I was searching for the same and i came across this thread on Samsung community,
https://developer.samsung.com/forum/board/thread/view.do?boardName=SDK&messageId=371359&listLines=40&startId=zzzzz~&searchType=ALL&searchText=tof


How to CSS parallax scroll by updating background-position value with JavaScript?

Question: In CSS, using JavaScript, how can different Y position percentages be assigned to layered background images so they update as the page scrolls?

So in the above example the percentages (45%, 50%, 55%) would not be static values, but instead dynamically influenced by the page's vertical scroll position. Probably a mix or averaged blend of the actual scroll percentage.
Comment: [Incredible scroll-based animations with CSS-only](https://www.youtube.com/watch?v=UmzFk68Bwdk) by Kevin Powell. There is a link to a polyfill, in the video description, to support older browsers.
Answer: Easy parallax scrolling, relative to the page top and bottom
My question received an answer (which I had accepted), but that contributor has since deleted their answer. It was a helpful answer, and it demonstrated one possible approach that works. After looking around at some other answers here, I was able to refine the methods and put together what I was envisioning:
A multi-layered parallax scrolling background that displays reliably at any window size, and can be contained all within the HTML BODY element. (No need for extra DIVs.) This solution uses jQuery - love it or not, it proved very useful for this case. Of course, there's no technical reason this couldn't be recreated in vanilla JavaScript if somebody really desired to do so. The code is not very complex.
Concept
A multi-layered background is designed and CSS styling is specified, including background-position. This dictates how the background is to appear on page load. Then the script subtracts a pixel value from the top or bottom position for each layer, depending on whether it's an upper part of the design or a lower one.
Background images used in this demo, and their respective values:

image
background-repeat
background-size
background-position(initial)
background-position(scripted)
background-blend-mode
perceptuallayer *

repeat-x
100vw
center bottom
center bottom -${(scrollBtm * 0.9)}px
lighten
lay1:btm(nearest)

repeat-x
100vw
center bottom
center bottom -${(scrollBtm * 0.6)}px
normal
lay2:btm

src
repeat
33vw
center top
center top -${(scrollTop * 0.3)}px
lighten
particle anim **

repeat-x
100vw
center top
center top -${(scrollTop * 0.2)}px
normal
lay3:top

repeat-x
100vw
center bottom
center bottom -${(scrollBtm * 0.2)}px
multiply
lay3:btm

no-repeat
cover
center center
center center(not scripted)
normal(always)
lay4(farthest)

* = "Perceptual layer" refers to how the layers in the design are perceived to be ordered, from the viewer's perspective. It's not a technical term, just how I kept track of stacking. Use whatever labels work for you.
** = The GIF of animated particles was an afterthought and has no "correct" way to be ordered. Hence no "perceptual layer" number assigned. It happened to look good between lay2 and lay3.
The main thing to note about this approach is the simplicity of using scrollTop and scrollBottom functions to offset the backgrounds from the top and bottom of the page. Any given perceptual layer (such as lay3) can have both a top and bottom image.
The script makes layers move away from (- amount px) the top or bottom of the page when scrolled.
Adjust the scroll rate multiplier (* range 0.0 to 1.0 ) to set the rate of movement relative to the scrolling. Perceived distance will be nearer with higher values (0.9), and farther with lower values (0.1). Image layers sahring the same "perceptual layer" should be given the same scroll rate in order to appear to be the same distance away.
While not necessary for every kind of design, the background-blend-mode property is utilized in the example to illustrate how useful it can be for achieving even more interesting results.

<!doctype html>

  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Parallax Scroll</title>
  <link rel="stylesheet" href="css/styles.css">

After running the code snippet, clicking Full Page is recommended to perceive the full effect.
Notes on image optimization: imgur (the host of the images in this demo) currently does not support WebP, but if used the file size can be greatly reduced - in my tests WebP averaged a minuscule 8% the size of the PNG and GIF still backgrounds. The total size of all still images when exported as WebP was merely 193KB. The single animated GIF was much more costly at 254KB. While I don't want to get sidetracked on a tangent about optimization, it's something to be mindful of when designing full-page backgrounds, especially in multiple layers. The main takeaway is that if you use efficient compression (WebP, AVIF) wherever possible, and restrict inefficient formats (animated GIF) to small dimensions, the image file sizes for your final design should not be prohibitive.


What was the tree of life in Genesis 2:9

Question: What specifically is the "Tree of Life" in Genesis 2:7
What specifically is the "Tree of the knowledge of good and evil" Gen. 2:7
Comment: I think this question needs to have the focus narrowed. First off, a post for each tree might be in order as quite a bit of detail could be written about each. Secondly, it opens lots of cans of worms. To answer this question, you may need to decide if the tree is literal or representative of something. Furthermore, the origin of the tree as it appears in other religious texts (so the literary influences) could be a valid answer as well as what kind of tree these were traditionally through to be (eg, fig tree vs apple tree)
Comment: Related: "[Could the "tree of knowledge of good and evil" mean "tree of intelligence"?](http://hermeneutics.stackexchange.com/q/5444/2215)" and "[Would it have mattered if God cursed Adam and Eve if they had eaten from the tree of life?](http://hermeneutics.stackexchange.com/q/17518/2215)"
Comment: I choose not to weigh in on this one, but I commend to you the reading of Revelation chapter 2 (especially v.7), and Revelation 22 (especially vv.2, 14, & 19). What was once forbidden and guarded by cherubim and a flaming sword in Genesis is in Revelation freely available to "overcomers" and to those who "wash their robes." Just a thought. Don
Comment: Welcome to Stack Exchange! If you haven't done so already, check out the [site tour](http://goo.gl/5U2gsX) and read up on how this site is a [little different](http://goo.gl/wCxRAv) than other sites around the web. *This is not a comment on the quality of the question, just a standard greeting*
Comment: @Mark I would say that this is a perfectly good question IF you include 1 Word:  "Meaning". If you ask,"What is the Meaning of the Tree of Life in Gen. 2:7, and add meaning in your next sentence-it "removes" the natural/biological quotient and I believe it gets at the heart of your question. Essentially, I agree w/James Shewey-I'm offering a 'fix' so it doesn't get deleted. Thank you!
Comment: The two trees could have been two ordinary trees with two different symbolic significances.
Comment: There is only one tree. The tree of the knowledge of good pain (which is the tree of life).
Answer: The Tree of Life
Adele Berlin says (The Oxford Dictionary of the Jewish Religion, page 751) that the Tree of Life, a tree whose fruit gave life to all those who partake of it, was a frequent mythological symbol found in Semitic and other cultures. Adam's expulsion from the Garden of Eden was motivated by the concern that he would eat from the Tree of Life and thus gain immortality.
Maurice H. Farbridge (Studies in Biblical and Semitic Symbolism, page 73) says that amongst both the Babylonian and Hebrews, the serpent is connected with the Tree of Life.  A Babylonian seal, with two figures seated on either side of a tree and a serpent behind one of them, was once thought by many scholars to be a Babylonian representation of the Hebrew account.
Emil G. Hirsch and George A. Barton (Jewish Encyclopedia) discuss a view that in the earliest account of the Garden of Eden there was only one tree and that the story evolved to include both the Tree of the Knowledge of Good and Evil, and the Tree of Life.
The above studies all reach the conclusion that the Tree of Life was symbolic, and not a literal tree. Leon R. Kass regards the Garden of Eden as a mythical place and says in The Beginning of Wisdom: Reading Genesis, page 58, the story tells permanent truths about our humanity, rather than a historical yet idealised portrait of a blissful existence we once enjoyed but lost. On page 69, he says that by placing a tree of life in the Garden, the story speaks more to the impossible longings of its readers, who wished for immortality, than of the desires of original, innocent man.
The Tree of the Knowledge of Good and Evil
This tree gave those who partook of its fruit the knowledge of both good and evil. This is sometimes interpreted to say that until they ate its fruit, Adam and Eve had no understanding of good or evil, so probably had no moral guidelines.  On the other hand, the ancients thought of all creation as comprising just two sets: those things that are good and those things that are evil. On this view, knowing good and evil meant omniscience - knowing everything. They knew everything and now realised they were doomed to die, so they had good reason to want to eat of the Tree of Life:

Genesis 3:22 And the LORD God said, Behold, the man is become as one of us, to know good and evil: and now, lest he put forth his hand, and take also of the tree of life, and eat, and live for ever:
Comment: Interesting response except that I see no scriptural references to support the answer. Hence I am still looking for someone to relate the tree of life in Genesis and the one in Revelation 22
Answer: Tree of Life
I assume the other biblical authors were inerrant so a quick keyword search in Logos provides a lot good interpretations for the first question. First, it was a literal tree given the narrative nature of that part of Genesis (just as Paul believes that Adam was a literal historical man Ro 5:12-15). So Genesis 3:22 shows that it had real fruit that could be grasped with the hand and make one live forever. It also needed be physically blocked by the angel (Ge 3:24). Here it was a literal tree that could make one's body live forever. That does not mean that one bite would make one immortal, but possibly that eating the fruit would at least keep one healthy.
In the OT a generic "tree of life" is mentioned as a source of blessing in this life time when it is a metaphor of wisdom, righteousness, and hope (Proverbs 3:18, 11:30, 13:12, 15:4, ESV). However both Genesis and Proverbs keep the effects of the tree in the current physical life.
But the most interesting parallels which are more specifically linked to the Genesis tree are in Rev 2:7, 22:2-19. This shows a rolling back of the curse and an undoing of sin and death. Similar to Jesus saying that he is the "life" (John 14:6) it means more than physical life. Parts of Revelations are allegorical with literal implications. The point here is not that there will be a tree in the new paradise (although we have good reason to believe there will be), but that there will be a restoration of the "very good" creation, blessings, and enjoyable eternal life with God (Gen 1:31).
The type of fruit does not matter. The authors were not concerned with telling us that and it is more likely we no longer have such fruit available to us today. The authors were concerned with the significance of the fruit in the story and history of salvation. Further more the tree of life in Rev 22:2 produces many different kinds of fruit.
Tree of Knowledge
Again it was a literal tree of an unknown fruit, but this time the author uses it to represent the experience of sin or divergence from God's will. It was appealing to the eyes similar to many sins but brought the opposite of "life". It is not referenced again in the Bible.
Comment: Welcome to Stack Exchange! If you haven't done so already, check out the [site tour](http://goo.gl/5U2gsX) and read up on how this site is a [little different](http://goo.gl/wCxRAv) than other sites around the web. In particular, pay attention to what constitutes a good answer and consider revising this answer to meet those guidelines. Please note that "showing your work" is [required](http://goo.gl/BoMPLJ) and answers should be in excess of 500 characters. *this is not a comment on the quality of your answer, just a standard welcome message*.
Answer: To grasp what the 'tree of life' is, consider that the text in which it was first addressed no longer exists.

"The first and foremost concept that a reader of the Biblical text must learn is that the ancient Hebrews were products of an eastern culture while you, as the reader, are the product of a western culture. These two cultures are as different as oil and vinegar; they do not mix very well. What may seem rational in our western minds would be considered irrational to an easterner of an ancient Near East culture. The same is true in the reverse, what may be rational to an ancient Easterner would be completely irrational in our western mind.

The authors of the Biblical text are writing from within their culture to those of the same culture. In order to fully understand the text one needs to understand the culture and thought processes of the Hebrew people.

All existing Hebrew Lexicons of the Bible convert the vocabulary of the ancient Hebrews into a vocabulary compatible to our modern western language. The greatest problem with this is that it promotes western thought when reading the Biblical text. In this Lexicon the mind of the reader is transformed into an eastern one in order to understand the text through the eyes of the ancient Hebrews who penned the words of the Bible."   https://www.ancient-hebrew.org/ahlb/

I believe that, in the beginning, God 'penned' his words for all of his children to understand, from the time of his first writing until the writing was no longer needed. In knowing that his words would need to carry understanding for the different language speaking peoples and the different cultures they live in, he would have expressed his words in a way that would have provided the best method of conveying his meaning.
Stories were told to help the receiver better understand the concept and meaning of the words of the originator. Stories convey emotions, and emotion is a powerful tool we use to express ourselves to others. Poetry is another method of telling a story as poetry also conveys emotions.
Consider a tree and what it does. A tree projects a description of food, protection, strength, and shelter. A tree takes that which is deadly and converts it to something necessary for life as we know it to exist. A tree has roots that draw water and nutrients from its base, channels it up its trunk, through its branches and transpires the water out of its leaves. The water moves to other places that benefit from it. Water also cools the air and provides relief on a hot day. A tree is both a source and a resource. This is, for all I see, a partial description of Jesus Christ.
Jesus  describes himself as food, and a vine, and a Root. Isaiah described him as a shoot from the stump of Jessee. Jesus said that we are branches grafted onto his trunk and that our fruits are good for others. He said that his Father is the gardener. He said that those that believe in him will have streams of living water flowing from them, like a tree.
Genesis 3:22:

And the Lord God said, "The man has now become like one of us, knowing good and evil. He must not be allowed to reach out his hand and take also from the tree of life and eat, and live forever."

And he placed a guard to block man's access to the tree.
The apostle John wrote:

For God so loved the world that he gave his one and only Son, that whoever believes in him shall not perish but have eternal life. (John 3:16)

In the beginning, man was given the right to eat of any tree in the garden except one – the tree of the knowledge of good and evil. Man chose not to eat from the tree of life but chose instead to travel a different direction from God. Perhaps the forbidden fruit is just that: man's willful act to live apart from God.
Jesus Christ was there for God's children in the beginning, as he is for each of us today. Our lives begin in the same way at different times. He is the Alpha and the Omega, the beginning and the end.
Jesus said

"… I am the way and the truth and the life. No one comes to the Father except through me.

Jesus has the authority to allow God's children to access eternal life.
There are at least 50 names in Scripture that are used to describe Jesus Christ. I believe that 'tree of life' should be added to that list.
Comment: Actually the ancient Hebrew text exists but the language was different than the language of today. Sorry for the incorrect statement. Also, the last verse reference is from John 14:6.
Answer: The Tree of Life was definitely a Sumerian concept, first mentioned in the Epic of Gilgamesh in Tablet XI, detailing the Deluge, Gilgamesh's testing by Utnapishtim, and his obtaining the 'Plant of Eternal Life' on his journey home to Erech, one of the first cities of civilization circa 3100 Bce. It was stolen from Gilgamesh by the 'serpent', which connects to the biblical Garden of Eden. But as with the serpent itself, the Tree of Life may in it's metaphoric nature represent more than simply physical entities. So the serpent may represent DNA; or serpent/'dragon' lines which traverse the world carrying the solar and stellar energies of the cosmos which enable Life to have growth on Earth. Likewise the Tree of Life may represent - the Heaven Earth world-tree or axis; the spine which connects body and mind, spirit and matter; and equally, the Way of Life which the Sumerians/ Babylonians called the Milky Way - this because the source of the Sun and solar system was the centre of the galaxy, and from where further energies flow to the Solar System. Attached is a stela (carved stone artwork) from the Assyrian period circa 18oo Bce shown at the British Museum. As can be seen, the Tree of Life is surrounded by gods and humans, and has a geometrical appearance, indicating the numerical and geometric nature of the forces of Life, particularly light itself.  Many Hebrew concepts existed beforehand within the Sumerian Assyrian and Babylonian cultures, and enriched Judaism in it's growth from nascent belief-system to world religion.
Answer: The Tree Of Life
The purpose of this tree was to greatly extend the life of the first humans in the garden of Eden so that they may multiply and fill the earth.
Apparently, Adam ate of this tree because he lived for 930 years. His descendants also had exceedingly long lives, and this leads me to believe that the anti-aging properties of this tree were so potent, they could be passed on to his children.  Adam's son Seth, lived for 807 years (Gen 5:7).
According to the book of Enoch, this tree was a literal tree. It was beautiful. It had a strong scent and its leaves were immortal.
Chapter XXIV

And amongst them was a tree such as I had never yet smelt, neither was any amongst them nor were others like it: it had a fragrance beyond all fragrance, and its leaves and blooms and wood wither not for ever: and its fruit ⌈⌈is beautiful, and its fruit⌉⌉ resembles the dates of a palm. 5. Then I said: '⌈How⌉ beautiful is this tree, and fragrant, and its leaves are fair, and its blooms ⌈⌈very⌉⌉ delightful in appearance.'

The Tree Of Knowledge of Good and Evil
This tree was responsible for making us like gods. I think the intent of the author of Genesis is to tell us that before Adam and Eve ate of this tree, they were more like animals. The animals have no understanding of nakedness, right and wrong, or good and evil. All they know to do is eat and reproduce.
After eating of this tree Adam and Eve knew they were naked (Gen 3:7).
Comment: Book of Enoch is a reject and not acceptable for doctrinal derivation.
Answer: The two trees in question could have been two normal fruit trees.
The Tree of Life could have been a papaya tree, and the Tree of Knowledge of Good and Evil could have been a banana tree.
The Tree of Life could symbolically have referred to the body of a woman, namely Eve's body, and to eat from it could simply have referred to the feeding of babies.

The Tree of Knowledge of Good and Evil, on the other hand, would then have referred to Adam's body, and eating from it would have been forbidden because no babies could be born that way. Consequently, if the forbidden tree was eaten from the human race, which Adam and Eve were the only progenitors, would die already on the drawing board.
Let us now turn to the Tree of Life on the New Heavenly Earth, of which the Book of Revelation  22:2 seems to indicate that there are twelve. These would not have to be real papaya trees because the symbolism has already been established, and the Book of Revelation just have to reuse the old symbolism in its prophecy about the particular part of the future that it is here addressing.
Instead, the prophetic text of the Book of Revelation could be referring to the bodies of future twelve matriarchal progenitors of the heavenly Israel; the female half of the twenty-four elders of Rev 11:16 and 19:4. The ones whose main mission may be to produce new bodies for the chosen dead. Cloning with applicable corrections of possible DNA glitches and space-time travel are futuristic technologies that could be used in this endeavor.
In conclusion, the two mystical trees in the Garden of Eden could have been ordinary trees with some symbolical resemblance to the male and female bodies. To arrive at this conclusion a lateral interpretation of Mark 8:24 was attempted.

"He looked up and said, "I see people; they look like trees walking around." (Mark 8:24)
Comment: A person's spirit is, according to Jesus in John 3, born of Spirit, and a person becomes born again in a spiritual way that way. But, as Jesus also touched on in verse 6, if a person is going to be furnished with a new body one day after death, that body has to come from another body, because: "that which is born from flesh is flesh; and that which is born from Spirit is spirit"
Answer: The first decision
Are the trees literal trees or a metaphor?
Here we see the first account of the trees

Out of the ground the LORD God caused to grow every tree that is pleasing to the sight and good for food; the tree of life also in the midst of the garden, and the tree of the knowledge of good and evil. (Gen 2:9 NASB)

From this verse either the tree of life and the tree of the knowledge of good and evil are part of the trees that came "out of the ground" or are of separate entity.
Evidence that supports a metaphorical tree:
Solomon's usage of the phrase

How blessed is the man who finds wisdom And the man who gains understanding.
14 For her profit is better than the profit of silver And her gain better than fine gold. 15 She is more precious than jewels; And nothing you desire compares with her. 16 Long life is in her right hand; In her left hand are riches and honor. 17 Her ways are pleasant ways And all her paths are peace. 18 She is a tree of life to those who take hold of her, And happy are all who hold her fast. (Pro 3:13-18 NASB)

and here:

The fruit of the righteous is a tree of life, And he who is wise wins souls.
(Pro 11:30 NASB)

and here:

Hope deferred makes the heart sick, But desire fulfilled is a tree of life.
(Pro 13:12 NASB)

and here:

A soothing tongue is a tree of life, But perversion in it crushes the spirit. (Pro 15:4 NASB)

Data mining to attribute the metaphor

Understanding
The fruit of the righteous
Desire fulfilled
A soothing tongue

Evidence that supports a literal tree (from a perspective)

Then the LORD God said, "Behold, the man has become like one of Us, knowing good and evil; and now, he might stretch out his hand, and take also from the tree of life, and eat, and live forever" (Gen 3:22 NASB)

The action: "he might stretch out his hand, and take also from the tree of life, and eat" holds physical attributes, however the concept "stretch out his hand" may hold metaphorical expression as well.
Conclusion to the first decision: Are the trees literal trees or a metaphor?
Although possible that the trees where at one time literal trees with undefined Genus and Species. Evidence does support that the phrase "tree of life" does hold metaphorical expression.
The second decision
The location "midst of the garden" is it literally physical location, or does it hold metaphorical locality?
Evidence that supports metaphorical locality

"You are a garden spring, A well of fresh water, And streams flowing from Lebanon." (Sng 4:15 NASB)
For you will be like an oak whose leaf fades away Or as a garden that has no water. (Isa 1:30 NASB)

Placing a blessing over the curse
Hopefully you will be like an oak whose leaf is perfect or as a garden that has much water.

And He will destroy the glory of his forest and of his fruitful garden, both soul and body, And it will be as when a sick man wastes away. (Isa 10:18 NASB)

Placing a blessing over the curse
And he will build the glorify of his forest and of his fruitful garden, both soul and body, and it will be as when a sick man goes to perfection.

"And the LORD will continually guide you, And satisfy your desire in scorched places, And give strength to your bones; And you will be like a watered garden, And like a spring of water whose waters do not fail. (Isa 58:11 NASB)

Data mining to attribute the metaphor

You (hence, the person represents the metaphor)

Evidence that supports a literal garden (from a perspective)

The LORD God planted a garden toward the east, in Eden; and there He placed the man whom He had formed. (Gen 2:8 NASB)
Now a river flowed out of Eden to water the garden; and from there it divided and became four rivers. (Gen 2:10 NASB)
They heard the sound of the LORD God walking in the garden in the cool of the day, and the man and his wife hid themselves from the presence of the LORD God among the trees of the garden. (Gen 3:8 NASB)

Conclusion to the first decision: The location "midst of the garden" is it literally physical location, or does it hold metaphorical locality?
Although possible that the garden represents a true garden. Evidence does support that the word "garden" does hold metaphorical expression. Therefore the phrase "midst of the garden" does have possibility of describing "you and inside you".
Conclusion Based on Literal Expression
If the "Tree of Life" and also the "Tree of the Knowledge of Good and Evil" where both literal trees, inside of a literal garden then both Genus and Species remain unknown from the records available to my cognition of fact finding resources, unless we play captain obvious and say that the "Tree of Life" is a "Tree of Life Tree" and the "Tree of the Knowledge of Good and Evil" is a "Tree of the Knowledge of Good and Evil Tree".

Deduction of the Metaphorical Account
Let's begin with this description of the metaphor "garden, both soul and body" (Ref: Isaiah 10:18 NASB) to see what hermetical boundaries we learn.
Now even though this word "soul" gets translated from a Hebrew source, the Greek word for "soul" perhaps will give some insight into this metaphor. The word is "ψυχή" and is recorded as 5590 psyxḗ (from psyxō, "to breathe, blow" which is the root of the English words "psyche," "psychology") – soul (psyche); a person's distinct identity (unique personhood), i.e. individual personality.
Psychology gets defined as the science of the mind or of mental states and processes.
Using the rules of replacement the metaphor now may Be defined as:

gardenVar = "the mental states and processes, and the body";

Adding previous decided metaphorical description "you and inside you"

gardenVar = "you and inside you, the mental states and processes, and the body";

The Metaphor of the Tree

And he looked up and said, "I see men, for I see them like trees, walking around." (Mark 8:24 NASB)

The word here for men tis the Greek word ἀνθρώπους defined as 444 ánthrōpos – man, also the generic term for "mankind"; the human race; people, including women and men.
Interesting that this metaphor of the tree can also get defined as the pronoun "you" as "you" references one of mankind in a perspective. However for exactness sake:

treeVar = "you (like that of the human race)";

John the Baptist use this tree metaphor.

The axe is already laid at the root of the trees; therefore every tree that does not bear good fruit is cut down and thrown into the fire. (Matthew 3:10 NASB)

This usage of the tree metaphor we can find in the Matthew account, its also stated in Luke 3:9.
Jesus use this tree metaphor.

Every tree that does not bear good fruit is cut down and is thrown into the fire. (Matthew 7:19 NASB)

The Metaphor of the fruits

So every good tree bears good fruit, but the bad tree bears bad fruit. (Matthew 7:19 NASB)

The Greek word for "bad" here πονηροὺς gets defined as evil, bad
Here the pronounced division in the metaphor gains classification:

Fruit.Class.Good = "Good Fruit";
Fruit.Class.Evil = "Evil Fruit";

Metaphorical Connection! The tree of the knowledge of good and evil.
in the midst of the garden the tree of the knowledge of good and evil.
"in the midst of the " . gardenVar . "the" . treeVar . "of the knowledge of" . Fruit.Class.Good . "and" . Fruit.Class.Evil
Rendering Echo
In the midst of the you and inside you, the mental states and processes, and the body the you (like that of the human race) of the knowledge of Good Fruit and Evil Fruit
Grammar Filtration
Among the mental states and processes of you and your body, your knowledge of good and evil.
Comment: Though the connections might be interesting, this argument appears to be a classic case of eisegesis, of reading a later notion back into the biblical text.  The following explanation might be of some help:  http://hermeneutics.stackexchange.com/a/5325/6884
Comment: Do you think using object oriented classes and string concatenation is really the best easiest and most straightforward way to communicate you thoughts to the non-programmers out there? Or are these placeholders for your own thoughts? (If placeholders, it is best to post your answer once you actually have completed it)
Comment: Well, editing in response to comments or to add new information is fine, but excessive editing is usually not recommended. Every time you edit a question it moves it to the top of the active questions board. If this is excessive, it is usually frowned upon, so we usually like to see the answers completed before they are posted to help avoid that from happening. Hermeneutics however should exegete (get meaning from) the text rather than read a meaning back into the text (eisegete). Do you think  your interpretation obviously arises from the text as the origional author intended it to mean?


Application for google adsense rejected twice due to Unacceptable site content

Question: I have a technical blog site and frequently I add technical articles.
I applied for Google Adsense but my application rejected, twice in fact. The issue reported both times was non-acceptable site content. I read the content policy by Google and found nothing that would indicate that the content I have on my blog is unacceptable to them.
Why are my next steps?
Comment: Btw nice looking.
Comment: It could simply be that the previous owner of your domain had questionable content. Did you dig wayback / cache to check?
Comment: Hello,

I have a huge site www.indianchamps.com , But google rejected my request please can you suggest why this happend. I have spend around 1 lack in making the website but no returns by google, I have created more than 20,000 pages.

Please please some 1 help me..
Comment: I'm sure 90% of sites in India run on bought Adsense account and in fact Google implicitly allows cheap sites, given the level of public and business atomosphere in India. All sites have it(except for new ones like yours). Check MFA sites: customercarecontacts.com and customercareinfo.in . But they're earning non-stop... customercareinfo.in was banned once but it managed again to get another account. In India rules are very different.
Answer: I think the info links advertising could be the main problem. Regardless of Adsense, I would personally stay away from using those because they are annoying and put people off the site. Everything else looks OK to me.
Comment: +1 for infolinks advertising. I hate these. Apparently the phrase President Obama means I want to go on a holiday?!
Answer: I searched over your site for keywords that might be banned, but I did not find any bad keywords. Just check whether any post on your site contains same contents which are already published somewhere else.
Do you have any image which conflict copyright issue?
I didn't found any footer on your site contains copyright disclaimer. It might be because your site is not loaded successfully. And gave some error. you will found <code>--></code> somewhere on your site. Just check it against w3c compatibility.
Comment: Thanks, i will add a footer and a copy right notice. I have a few posts on this blog which are also present on on of my other blogs too. Do you think that can be one of the issues ? Also i have a line at the bottom of my posts which says that in case you like this post please share it with others by clicking the links below, do you think that might be causing this issue ? Is it fine to have infolinks ads along with google adsense ?
Comment: link you provided for sharing is not a issue. but the posts which are similar can create a problem. You can have multiple ads from different adsense. There is no problem in this
Answer: I would send Google an email and ask them specifically why you were rejected.
I worked with a client for a few months in setting up their Google Base feed for selling products online. They were rejected 10 times in a row (each time for different reasons). But Google was very quick to reply and give specific reasons as to why they were rejected.
Comment: For for Indians it won't be same. I submitted my site thrice and subsequently a bot was rejecting it even on Sundays after couple of hours.


What TextFormatFlags.TextBoxControl flag exactly does

Question: I would like to understand what effect has enablig the flag TextFormatFlags.TextBoxControl when using the TextRenderer.DrawText method is called.
I have written an small program and I can't see difference between using it and don't using it.
Also, I inpected the code with the .NET reflector and the flag is passed directly to the native method so I could see what is the effect.
Answer: Not sure everything it does, but I use it for one specific effect...
If you use just WordBreak, then if you have a word that is too wide to fit on a line, it just clips that word... it will not break in the middle of a word.  But if instead you want it to break within words that are longer than the width, such that nothing is clipped, the you can add TextBoxControl to it and it will do so.
The TextBox Control needs that, because when you are editing text, you really want to be able to see all the characters.
The DataGridView's text columns by default render without it, unless you are editing, and then they edit with it.  Right now I'm trying to figure out if there is a setting somewhere in DataGridView or its Columns etc., that will let me specify TextFormatFlags to use when rendering it, so that I can fix that.  Any clues on that greatly appreciated.
Answer: It looks like it has something to do with Padding, maybe when MultiLines is in play.
From Accurate Font Metrics

Note that we calculate the size of the string using MeasureText and then we add an additional 7 pixels to the height. This is because the TextBox itself has some internal padding that it applies and from our testing it appears to be roughly 7 pixels.