Is local equilibrium a reasonable assumption for evolutionary processes?

Question: Whenever I look at discussions of fitness landscapes (in particular, Kauffman's NK model) the questions tend to resemble:

The population is at a local equilibrium, but another equilibrium of higher fitness exists, how will the population cross the fitness valley between these equilibria?

These sort of statements assume that the population has reached a local equilibrium. Although, the local equilibria must exist, why do the people working in this field believe that they can be found before environmental (or other external events) change the fitness function? Are the timescales required to go from a random initial population to one that is at a local equilibrium compatible with the typical time-scales on which a fixed fitness landscape is an appropriate approximation?
If we switch to the polar opposite model of complete frequency-dependent selection (say replicator dynamics in evolutionary game theory) then limit-cycles (think rock-paper scissors game) and chaotic-attractors are common and it is possible for the population genetics to be constantly changing and never at equilibrium.
In an experimental setting, it also seems like although beneficial point-mutations are much more rare than deleterious, they do exist. This would suggest that experimentally, organisms are not at a local equilibrium. Do model organisms tend to be at local fitness equilibria?
In general, is the local equilibrium assumption in fitness landscapes research a reasonable assumption?
Answer: Nothing is at a genome-wide local equilibrium. Graham Bell wrote fairly extensively on this (IIRC).
Some loci

will be at what are likely global optimums (e.g. Cytochrome oxidase)
will be at local but not global optimums (e.g. low-fitness malaria resistance vs. high fitness malaria resistance: for the extremely cool story check out this page)
will not be at any optima because the environment shifts too quickly (e.g. loci clearly under frequency-dependent selection, such as MHC).

So, in general, it depends what you are trying to model. If you want to model a specific kind of evolutionary change, then model that kind of evolutionary change. If you want to model a different kind of change, then model that kind of evolutionary change. Natural populations will likely follow any model some of the time, but will probably never follow any model all of the time.
Comment: You mean Graham Bell?
Comment: Yup. That's the one. You'd think I could look six inches above my screen to the binding of a book to check the spelling of his name, wouldn't you?
Comment: I looked through Bell's publications, and I can't see a paper that suggests that he has been looking at this. Can you give an example?
Comment: In his book "Selection: the mechanism of evolution" he talks extensively on the dynamics of selection : i.e. how selection is changing over time, in different environments, etc. In particular I am recall some claims that evolution cannot be modelled as a markov-process because the state space is too large and impossible to characterize. My memory of this is quite vague, so I could be remembering a different author, and I can't find the relevant passage in this book right now.
Comment: You are right - overall the environment, which is always subject to change puts individuals in dynamic equilibrium. See the Red Queen hypothesis.  The genome itself is never completely at equilibrium either.
Answer: I think the jury is out on this one, there are examples of evidence both for and against reachability of local equilibrium and even these examples can be interpreted in many ways. I present three pieces of evidence and some interpretations. In general, my feeling after reading about this is that the assumption of equilibrium is ingrained in mathematical models for convenience and historic reasons not because there is solid evidence for it. (I expand more on this in this blog post).
Evidence against: vestigial features and macroevolutionary change
From a genome-wide perspective, it seems that equilibrium is at odds with the intuition of naturalists. Consider for example vestigial features of your own body like your appendix, goose bumps, tonsils, wisdom teeth, third eyelid, or the second joint in the middle of your foot made immobile by a tightened ligament (see video below). Wouldn't it be more efficient (and thus produce marginally higher fitness) if you didn't spend the energy to construct these features? Of course, this naturalist argument is not convincing since we don't know if there are any small mutations that could remove these vestigial features from our development, I could just be describing a different local optimum that lays on the other side of a fitness valley from my current vertex.
The other tempting naturalist example of macroevolutionary changes like speciation is also not convincing for static fitness landscapes. The usual retort is that on these timescales the environment is not constant and depends on the organisms through mechanisms like niche-construction or frequency-dependence. This defense of local equilibria is actually a central part of the punctuated equilibrium theory of evolution; the environment changes (either through an external effect like meteor or internal effect like migration or niche-construction) and the wild-type becomes not locally optimal, but adaptation quickly carries the species to a new nearby local optimum where it remains for a long period of time until the next environmental change. Naturalistic observations are insufficient to settle this question, so we need to turn to experiments.
Evidence for: affinity maturation
The length of evolutionary process leading to affinity maturation is very short, typically a local equilibrium is found after only 6-8 nucleotide changes in CDR (Crews et al., 1981; Tonegawa, 1983; Clark et al., 1985), so you need only a few point mutations to quickly develop a drastically better tuned antibody -- an adaptive process that happens on the order of days. There are two reservations to keep in mind:
First, the adapted B-cells were not experimentally isolated and all of their point-mutations were not checked to guarantee that a fitness peak was reached. In both theoretical and experimental treatments of evolution, it is known that fitness increases tend to show a pattern of geometrically diminishing returns (Lenski & Travisano 1994; Orr, 1998; Cooper & Lenski, 2000) which means that after a few generations the fitness change will be so small that the fixation time in the large population of B-cells will be longer than the presence of the pathogen causing the immune response. We might not be seeing more steps because the next steps might have a fitness increase too small to fixate before the environment (and thus, fitness landscape) changes again.
Second, as can be seen from the AID protein (and other mechanisms) increasing the rate of mutation by a factor of $10^6$ along the gene encoding antibody proteins, this is a fitness landscape that has been shaped by previous evolution of the human immune system to find fit mutants as quickly as possible. This biases the phenomenon towards landscapes where local maxima would be easier to find than usual, and thus makes it not a good candidate for considering evolution under more typical conditions.
Evidence against: long-term evolution experiment
A more typical setting might be the evolution of E. coli in a static fitness landscape. Here, biologists have run long-term experiments tracking a population for over 50,000 generations (Lenski & Travisano 1994; Cooper & Lenski, 2000; Blount et al. 2012) and continue to still find adaptations and marginal increases in fitness. This suggests that a local optimum is not quickly found, even though the environment is static. However, it is difficult to estimate the number of adaptive mutations that fixed in this population, and Lenski (2003) estimated that as few as 100 adaptive point-mutations fixated in the first 20,000 generations. It is also hard to argue that the population doesn't traverse small fitness valleys between measurements, which could be used to suggest that the colony is hopping from one easy-to-find local equilibrium to the next.
References
Blount, Z. D., J. E. Barrick, C. J. Davidson, and R. E. Lenski. (2012). Genomic analysis of a key innovation in an experimental Escherichia coli population. Nature 489: 513-518.
Clark, S.H., Huppi, K., Ruezinsky, D., Staudt, L., Gerhard, W., & Weigert, M. (1985). Inter- and intraclonal diversity in the antibody response to influenza hemagglutin. J. Exp. Med. 161: 687.
Cooper, V.S., & Lenski, R.E. (2000). The population genetics of ecological specialization in evolving Escherichia coli populations. Nature 407: 736-739.
Crews, S., Griffin, J., Huang, H., Calame, K., & Hood, L. (1981). A single V gene segment encodes the immune response to phosphorylcholine: somatic mutation is correlated with the class of the antibody. Cell 25: 59.
Kauffman, S.A., & Weinberger E.D. (1989). The NK model of rugged fitness landscapes and its application to maturation of the immune response. Journal of Theoretical Biology, 141(2): 211-245.
Lenski, Richard E. (2003). "Phenotypic and Genomic Evolution during a 20,000-Generation Experiment with the Bacterium Escherichia coli". In Janick, Jules. Plant Breeding Reviews (New York: Wiley) 24(2): 225–65.
Orr, H.A. (1998). The population genetics of adaptation: the distribution of factors fixed during adaptive evolution. Evolution 52: 935-949.
Tonegawa, S. (1983). Somatic generation of antibody diversity. Nature 302: 575.


Can eye drops cure dry eyes?

Question: When waking up on every morning it takes several minutes before I can clearly see (I have to blink quite a lot). During the day it's common to feel irritation, like I had soap on my eye. I've tried over dozen eye drop brands suggested by professionals, none having any discernible effect, bringing only temporary relief. I currently think I shouldn't spend money at all on eye drops.
Comment: Good idea! Good luck, best regards. M. Arrowsmith
Comment: Hi! Interesting. When you mean by "professionals", you mean an "ophtalmologist"? Dry eyes is a very common symptom. However, in some cases they may be associated with an underlying condition. If obviously, none of the eyes drops are helping, I think, it would be worth seeing an eye specialist (=ophtalmologist). Best regards. M. Arrowsmith.
Comment: @M.Arrowsmith No, only my local optician. I doubt I've ever have been in touch with an actual doctor (but I will soon).
Answer: Here are some other home remedies that can help ease your dry eye symptoms:
Apply warm compress: Because dry eyes can occur due to lack of tears, applying a warm compress may unclog your tear glands, allowing the production of tears and relieving dry eye symptoms.
Blink: Our bodies naturally lubricate our eyes through blinking. Make sure you are blinking often, especially when concentrating on a computer screen or sitting in front of a TV. Blinking can also help remove dust and debris from your eyes and prevent irritation.
Wear protective eye gear: Sunglasses are an easy solution to your dry eye problem because they can block the sunlight and the wind – both dry eye causes.
Stay hydrated: Because our bodies require water for all major functions, it's no surprise that drinking enough water is a dry eye treatment. In particular, on hotter days, make sure you're getting adequate hydration, and if you find water boring, add in fruits and vegetables.
Apply cucumbers: Because of their water content, placing cucumbers on the eyes can keep them moist and lubricated – an effective dry eyes home remedy indeed.
Reduce coffee consumption: Coffee can worsen your dry eye condition, so cutting back on your intake may help relieve dry eye symptoms.
Comment: Does using glasses help? I wear glasses all the time.
Answer: Most over the counter eye drops only provide temporary relief for dry eyes by actually adding liquid to the eye. Once the liquid added evaporates, gets absorbed, or is removed in one way or another your eyes will feel dry again unless your eyes are able to adequately lubricate themselves. So most eye drops aren't treating any underlying cause, just the temporary symptoms of dry eye. If this is a frequent problem I'd look to see if any other medications you're taking could be causing the dry eyes as a side effect. If you're not taking any other medications that could be causing this, seeing an optometrist or ophthalmologist sounds like a good idea.
Edit: I should also mention, there is a medication approved for chronic dry eye called Restasis. It is prescription only however.
Answer: You could also try warm compresses for dry eyes; they help the glands in your eyelids secrete good oils for lubrication
Comment: I've done that, I feel that method is more effective than none of the eye drops I have used.

Can eye drops cure dry eyes?


How do I create a redstone loop on Minecraft?

Question: I tried to place a repeater and connect it with redstone in a loop around the repeater, then I gave it the redstone signal. When the button came back up, the loop stayed lit. I knew this was going to happen, then I connected the loop to a dispenser, and when I put arrows in it, it didn't fire! I had done all of this on my iPad. Why didn't it work?
Comment: I would recommend adding pictures of the red stone to help identify what the problem might be.
Comment: @santyclause I think I found what the problem is. The OP used only *one* repeater.
Answer: It seems you did a small mistake:

Both repeaters face opposite sides
But, when you place a button next to any of the four redstone wires, and press it, both repeaters will power, and it won't create a functional clock (loop), like this:

Now, when you get this, in order to make it work, you have to quicky destroy and replace a redstone wire of your choice. An easy way to do this is to link it to a redstone block one block below the redstone wire and place a redstone torch on it.  This will turn the circuit on for 1 tick before the torch is powered down.  You can also set a delay to the repeaters (the farther the red buds on the repeater from each other, the bigger the delay), so you can replace the redstone easily. The final clock (loop) should look like this:

(I made the animation a bit smaller because it's flashy)
This is at minimum repeater delay, the clock can go up to 4x slower.


Monthly Builder base reset

Question: Every month my builder base gets reset (downgraded) to 4000 points even if I am several hundred points above tha5 level (so far my max level is 4471)
I have asked this question no less than 6 times on the settings contact us button but nobody ever answers and the question gets deleted
Does everyone get wiped out back to 4000 or if not how can you prevent it?
Thanks in advance for anyone's help
Answer: Clash of Clans, like many online multiplayer games, uses a "season" system where every month all players are reset to a baseline level based on their league. Everyone in Titan League or higher gets reset to 4000. There's no way to avoid this, and it happens to everyone.

Monthly Builder base reset


How can I minimise data sent through a network in a modern FPS?

Question: I am aware of snapshot interpolation with the use of delta compression as being a technique used to minimise the amount of data sent in a modern FPS game like Quake 3, but what other techniques are there?
Comment: This is an extremely vague question- giving more details about what data you need to send, and why you feel it's not already optimized, will help you get better answers (or maybe answer your question for you), but as-is, this question is too open-ended. How you can minimize data depends on what data your game relies on, which is completely determined by how you design it.
Comment: It sounds like you need to do some background research to be able to ask more specific questions. As-written right now, this is likely to generate just lists of techniques, and those types of questions tend to be closed as off-topic because there's no way to select one correct answer. I'd suggest starting with [Jonathan Blow's Inner Product articles on networking, archived here](http://number-none.com/product/) which go from the very basics to some pretty advanced techniques.
Answer: When we implemented our networking engine we exploited a number of compression techniques:

First we write all of our snapshot bit-wise: bools are only 1 bit
instead of 1 byte (or more depending on compiler). We wrote a
bitstream class that reads and writes data to a stream. This saves a
fair bit  of data all alone when packing flags down. For an example of a
decent C++ BitStream class have a look at the RakNet source recently made
available by Occulus here: https://github.com/OculusVR/RakNet
We found the smallest way to represent data, bitwise - if an integer
can only be in the range of 0 to 15, for example, we only store it
in the snapshot as 4 bits. We perform this range packing on signed
and unsigned integers, minimizing the amount of data being sent at
the cost of having to write the data to our snapshot stream
bit-wise. There is CPU cost here, but the data bandwidth is greatly reduced.
We do this for enumerations as well - if there are only two states,
it only takes one bit, for example. We exploit templates here to
make this easy to write in code.
We establish some data types that can be quantized - data that we
are satisfied to lose some decimal precision to reduce the
over-the-wire bandwidth. Combined with the range packing we can
compress floating point numbers down from 32 bits to a smaller,
range and precision specific level. Again we exploit templates here
to make this easy to write in code.
Delta compression - you have identified this already, but it makes a
significant impact.
We group blocks of data where the delta compression allows
us to group a number of related, unchanging fields under a single
dirty bit to indicate if they have changed or not. This reduces the cost
of sending a bit for each field indicating it has NOT changed. There
is less of a win here, and one has to be careful about how you group
them, but infrequently changing fields that generally change in
tandem are good candidates.
We take the entire packet and compress it using a quick compression
engine - lz4, for example. This reduces the data even more - every
thing helps.
We don't send ANY data for objects that are too far away to be part
of the local player's simulation and bulk-synchronize those objects
when the player enters proximity. Some objects are excluded from
this system such as mission objects, keys and locks, for example.
We don't send ANY data that can be reliably reproduced on the
client. For example, we send animation state and time instead of the
position of each bone - the client can reliably pose the character
with that information, saving us the bandwidth of sending the
transform of every bone (and anything attached to those bones - hit
boxes, effects, etc). We extend this out as far as we can. As one comment
pointed out, "the best compression is not sending it at all".

I'm sure there are others, but these ideas should help.
Comment: The big one I'd add is that you should only send data that the client can't reliably reproduce on its own. That is, send only the non-derivable state changes. Compressing data that you don't need to send is still way worse than not sending it at all. :)
Comment: @SeanMiddleditch Good point - I'll add that to the answer


Unable to mount fs, disk slice corrupted

Question: please can someone help me with this issue. Now when i started sun server - it run on sunfire t100 and os od solaris 5.10, is display this:
checking ufs filesystems
/dev/rdsk/c0t0d0s7: BAD SUPERBLOCK AT BLOCK 16: NUMBER OF DIRECTORIES OUT OF RANGE
/dev/rdsk/c0t0d0s7: USE AN ALTERNATE SUPERBLOCK TO SUPPLY NEEDED INFORMATION;
/dev/rdsk/c0t0d0s7: e.g. fsck [-F ufs] -o b=# [special ...]
/dev/rdsk/c0t0d0s7: where # is the alternate super block. SEE fsck_ufs(1M).
/dev/rdsk/c0t0d0s7: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
THE FOLLOWING FILE SYSTEM(S) HAD AN UNEXPECTED INCONSISTENCY: /dev/rdsk/c0t0d0s7 (/export/home)
fsckall failed with exit code 1.
WARNING - Unable to repair one or more filesystems.
Run fsck manually (fsck filesystem...).
svc:/system/filesystem/local:default: WARNING: /sbin/mountall -l failed: exit status 32
Reading ZFS config: done.
Mar 18 13:59:54 svc.startd[7]: svc:/system/filesystem/local:default: Method "/lib/svc/method/fs-local" failed with exit status 95.
Mar 18 13:59:54 svc.startd[7]: system/filesystem/local:default failed fatally: transitioned to maintenance (see 'svcs -xv' for details)
I am connected to server via console. First of all i wanted to increase /var fs because it has only 120mb and shrink /export/home fs. I did it via format utlity but after reboot i was unable to login and disk slice where is /export/home mounted is damaged. But on this fs are no data. Please can somebody help me , i am really desperate, i tried everything that i founf on internet and nothing worked. Please!
Answer: Did you try and repair using an alternate superblock?
dumpe2fs /dev/rdsk/c0t0d0s7 | grep superblock
to get a list of backup superblocks then use one of the backup superblocks with
fsck -b (backup superblock) /dev/rdsk/c0t0d0s7


HTML: formatting instead of WYSIWYG

Question: I personally tend to hate WYSIWYG editors. They take time to load and just love plain old HTML, so I just disable the editor entirely. However, I would like to have HTML from the database to be prettyfied or beautified or ... well, loooking sexy for the time of editing with indents, newlines, etc. Any module out there that does that?
Answer: You're looking for HTML Tidy module.

This module tidies Drupal's HTML output with HTML Tidy by optionally
  sanitizing it when it is saved or when it is displayed, like a
  traditional input formatter. Missing and mis-ordered tag components
  are replaced and reordered automatically so that user input doesn't
  break site structure with open tags and the like.
User interface configuration supports:
Code indenting: Automatically format HTML for easier reading, or strip
  indenting for proper parsing and display in the less compliant
  browsers. Word wrapping: Automatically wrap lines in an intelligent
  fashion once they get to a specified length Info/Warning/Error
  information: Optionally appended to pages and includes details about
  the wrong HTML attributes and W3C validation info.
Comment: Correct me if I got it wrong. HTML Tidy tidies up the Drupal's output and the edited HTML chunk for a particular node is not "output" and is therefore not formatter/indented. I am looking more into something similar to markitup - a tool for the HTML editing.
Comment: You need to create a text format and then you can use it on fields
Comment: Somehow this does not work. https://www.dropbox.com/s/uezp2j87t1asfhd/Screen%20Shot%202013-09-14%20at%2010.03.37%20AM.png
Comment: Your text format is showing Full HTML in your screenshot. You need to create an HTML Tidy text format and use that.
Comment: It works now and I played the settings for some time, however, the indenting and word wrapping is not as I expected, it simply wraps at a certain position. I expected unnecessary spaces to be stripped and the HTML code reformatted with nested tags taken into account, etc.
Comment: I believe a similar question was raised here https://drupal.org/node/860554, but not closed without any real answer.
Answer: There's a patch here to provide support for Ace code editor in wysiwyg module.
From Ace's website:

Ace is an embeddable code editor written in JavaScript. It matches the
  features and performance of native editors such as Sublime, Vim and
  TextMate. It can be easily embedded in any web page and JavaScript
  application. Ace is maintained as the primary editor for Cloud9 IDE
  and is the successor of the Mozilla Skywriter (Bespin) project.

I'm not aware of any other source code wysiwyg editor supported by wysiwyg.module.

HTML: formatting instead of WYSIWYG


Management Plane protection (MPP)

Question: I'm new to networking. I was trying to understand What MPP is ? What kind of attacks is it preventing? How is it securing router from those attacks?
Comment: Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer.
Answer: Quoting from Cisco:

The management plane is the logical path of all traffic related to the
  management of a routing platform. One of three planes in a
  communication architecture that is structured in layers and planes,
  the management plane performs management functions for a network and
  coordinates functions among all the planes (management, control,
  data). The management plane also is used to manage a device through
  its connection to the network.
Examples of protocols processed in the management plane are Simple
  Network Management Protocol (SNMP), Telnet, HTTP, Secure HTTP (HTTPS),
  and SSH. These management protocols are used for monitoring and for
  CLI access. Restricting access to devices to internal sources (trusted
  networks) is critical.
Management Plane Protection Feature The MPP feature in Cisco IOS
  software provides the capability to restrict the interfaces on which
  network management packets are allowed to enter a device. The MPP
  feature allows a network operator to designate one or more router
  interfaces as management interfaces. Device management traffic is
  permitted to enter a device through these management interfaces. After
  MPP is enabled, no interfaces except designated management interfaces
  will accept network management traffic destined to the device.
  Restricting management packets to designated interfaces provides
  greater control over management of a device.

https://www.cisco.com/c/en/us/td/docs/ios/security/configuration/guide/sec_mgmt_plane_prot.html#wp1049321

Management Plane protection (MPP)


Best way to visualize huge amount of data

Question: I have a data set of around 3M row. I has only 2 category (category- 2:1 ratio). Now i want to visualize(scatter plot) it's distribution to understand can the data linearly separable or not(In order to choose model type).I already try this and the plot is not understandable. What will be the best way to visualize this data set?
Answer: I have three suggestions that may help.

Reduce the point size
Make the points highly transparent
Downsample the points

Since you do not provide any sample data, I will use some random data to illustrate.
## The purpose of S1 is to intermix the two classes at random
S1 = sample(3000000)
x = c(rnorm(2000000, 0, 1), rnorm(1000000, 3,1))[S1]
y = c(rnorm(2000000, 0, 1), rnorm(1000000, 3,1))[S1]
z = c(rep(1,2000000), rep(2,1000000))[S1]

plot(x,y, pch=20, col=rainbow(3)[z])

The base plot without any adjustments is not very nice. Let's apply suggestions 1 and 2.
plot(x,y, pch=20, cex=0.4, col=rainbow(3, alpha=0.01)[z])

Reducing the point size and making the points highly transparent helps some. This gives a better idea of the overlap between the two distributions.
If we downsample, we don't need quite as much transparency.
## The purpose of S2 is to downsample the data
S2 = sample(3000000, 100000)
plot(x[S2],y[S2], pch=20, cex=0.4, col=rainbow(3, alpha=0.1)[z[S2]])

This gives a different view that provides a similar, but not identical understanding of the two distributions.
These are not magic, but I think that they are helpful.
Answer: Assuming you're using Python, the datashader module was created to effectively display very large number of points.
I however recommend using the hvplot package instead as it includes datashader support and provides a pandas compatible API.
# import modules
import pandas as pd
import hvplot.pandas

# read your data into dataframe (or whatever source).
df = pd.read_csv('large_file.csv')

# plot using hvplot; normally df.plot
df.hvplot.scatter('x_column', 'y_column', datashade=True')

datashader in effect creates a series of images and only shows the data to the required resolution without over plotting.  As you zoom in it updated the view with the refined detail.
Note
If you're reading in larger than RAM datasets you may want to check out dask as well.


Phonegap Dreamweaver CS5.5 Android App

Question: Hey guys it would really big huge if you guys could help me out. When I finished making my app in Dreamweaver it worked fine in the Emulator. Now when I go to build it and upload it to the market it asks for a certificate. I have no clue how to do that probably I keep getting confused. I dont know how to put it into Eclipse so I can sign it. Where does Dreamweaver keep the files to use in Eclipse where do I locate it? Or how can I make a certificate ? Please if you can give me a step by step. I tried following others but I cant do it. Big Thanks in
Answer: you can find the way to generate a certificate here.
Dreamweaver generates an apk with the default android debug certificate. So your APK is already signed with the default debug key.
You need to unsign it by hand, for instance like this:

rename your apk as zip
unzip the file
remove the META-INF folder.
zip everything
rename back as apk

then follow the steps in the above link to sign the apk with your personal certificate.
hope this helps

Phonegap Dreamweaver CS5.5 Android App


travel to India with OCI or visa

Question: my kid is 5yrs ,he has both Indian visa up to 2026 and OCI ,recently his passport was renewed ,my question is can I use visa to go India or should I have to renew OCI card and use it.
Comment: I don't know whether the exception outlined in [this press release](https://mea.gov.in/press-releases.htm?dtl/32222/Press+release+on+Relaxation+in+OCI+Guidelines+till+30th+June+2020) is still in force, but if it is it seems like it is the answer to your question.
Answer: Under ordinary circumstances, any traveler under 20 years of age needs to get the OCI card re-issued every time the passport is renewed. Source (emphasis mine)

(a) OCI card is a smart card;
(b) Possession of an OCI card will facilitate quicker immigration
clearance at the Immigration Check Posts;
(c) It will help in obtaining various Consular Services from the
Indian Missions;
(d) For those who are resident in India, it will facilitate in
availing various services in India.
OCI card holders are required to get their OCI cards reissued whenever
passport is renewed for persons under twenty years of age, and OCI
card needs to be renewed  after crossing 50 years of age only once,
that too when the US passport is renewed.

However, in Dec 2019 Indian government had granted a temporary relaxation in rules (source from @phoog in comments)

December 18, 2019
The following OCI guidelines have been in force since 2005:
OCI card needs to be re-issued each time a new passport is acquired by the cardholder up to the age of 20 years.
OCI card is required to be re-issued once on acquiring a new passport after completing 50 years of age.
Re-issuance of OCI card is not required each time a passport is issued to a cardholder between 21 and 50 years of age.
This is to inform that Government of India has decided to grant temporary relaxation till 30th June 2020 in the following cases:
(i) In case an OCI card holder below the age of 20 years has not got OCI card re-issued on change of passport, he/she may travel on the
strength of his/her existing OCI card bearing old passport number
subject to the condition that along with the new passport, the OCI
cardholder carries old passport mentioned in the OCI card.
(ii) In case an OCI card holder who has attained the age of 50 years and got his/her passport renewed subsequently but has not got
his/her OCI card re-issued on renewal of passport, he/she may travel
till June 30, 2020 on the strength of existing OCI card along-with the
new and old passports.
It is, however, advised that OCI cardholders may take steps to comply with the existing OCI guidelines in Para 1 above and renew their OCI cards as required by the rules.

Recently (26-Mar-21), the relaxation has further been extended till 31-Dec-2021. Moreover they have also relaxed the need to carry old passport. Source

In order to further ease the travel of OCI card holders to India
following has been decided:
(i) The time line for re-issuance of OCI cards in
respect of OCI card holders, who may be required to get their OCI card
re-issued, has been extended till 31 December, 2021.
(ii) Henceforth, the OCI card holders traveling on the
strength of their existing OCI card bearing old passport number are
not required to carry their old passport.  However, carrying of new
passport is mandatory along with the OCI card.
San Francisco March 26, 2021

In view of this your kid can travel on strength of his OCI card and new passport but it may be advisable to bring his old passport along, just in case.

travel to India with OCI or visa


How can my necromancer become a Lich?

Question: My RAW Necromancer (pure Wizard) wants to become a Lich.
What's the surest path to becoming one?
He is OK to change alignment and spend lots of coins, but not to worship any god or sell his soul with an infernal contract.
Answer: By RAW, the surest way to become a Lich is to use the occult ritual : Eternal Apotheosis
The main problem is to find a way to learn this ritual.
Depending on your GMs approval, a DC 24 Intelligence check might be enough to learn it from scratch.

Learning a ritual from hidden clues or from scratch takes a week or a
  month per ritual level (GM's discretion). At the end of this period of
  study and contemplation, the person attempting to learn the ritual
  must succeed at an Intelligence check (DC = 15 + the ritual level if
  learning from clues or a coerced teacher, or DC = 10 + the ritual
  level if learning from an instructor eager to teach).

If you GM approves, this is the easiest way.
If you GM does not approves, there's a longer but surer path.
Who could teach it without taking your soul or devotion in payment ?
Your surest bet is the Greater True Name Feat (taken at lvl 15)
With this feat, you can learn the true name of a Lilitu
Which has just the right number of HD to be called in this manner.
As per the True Name description :

It must obey you to the best of its ability, without pay or bargaining for its services, for its fear that you might release its true name to the wider world is enough to bring even the most recalcitrant of outsiders to bear.

Which means the Lilitu will do everything in her power to help you for free.
Now how can you be sure that the Lilitu knows this Ritual ?
Well. Orcus, the arch demon of undeath and patron of Liches happens to have lots of Lilitu at his service

In his Abyssal realm of Uligor, Orcus is served by strange demon-undead hybrids, powerful liches, and lilitu demons.

Also, Lilitu are demons of sin, they will try to push mortals to commit sins by granting them Wishes. And becoming a Lich is typically the kind of "sin" Orcus encourages.
So, use the feat to find the True Name of a Lilitu that worships Orcus and ask her to use her "Wish" ability to explain you the Eternal Apotheosis ritual and threaten to spread her True Name if she doesn't. (or tries to trick you in any way.)
Once the Occult Ritual is learnt, all you have to do is perform the ritual and make your Phylactery.
Beware that the ritual is inherently a heinously evil act and involves a number of DC 34 skill checks. And in case of failure, your character will turn into a forsaken Lich and die in matter of months.
This is the safest path I could find to Lichdom, which doesn't mean that it is safe at all. The Lilitu might try to get revenge on you and purposely give you a false ritual destined to fail or come during the ritual to prevent you from succeeding in it's accomplishment, all of this is at your DMs discretion of course.
Comment: If I'm not mistaken, this roll is to learn it from a teacher or from of written materials or clues. Do you know some ways of getting those clues ? (that would be much easier, for sure :-) )
Comment: Depends of if the GM is completely on-board with helping you become a Lich or just willing to allow it if you can figure it out. I think the answer provides a much more reliable way of accomplishing this (assuming the GM is foolish enough to allow True Name)
Comment: Good catch on the "learn from scratch" method :-) Added in !
Comment: "make your Phylactery." And now, because not all rituals are exactly the same and you missed the fine print, you must worship Orcus.
Comment: If your GM doesn't want you to be a Lich, 1) You shouldn't be trying. This *should* have been sorted out in Session 0 or whenever you wrote up your character. 2) They can just say the Lilitu you found the Name of isn't one of Orcus' many followers and clues to the Apotheosis basically don't exist because a Crusade wiped out all except those in Nethys' library.
Comment: Awesome answer though, I know written ways to attain Lichdom are hard to come by.
Answer: The kind of wizard who wants to become a lich isn't a playable character. The best way is to retire it and ask if the DM can give you some skill checks once a game year, to see how things are going. Or maybe ask the DM to play it as an NPC. Your next characters may get a mission from your old wizard to retrieve some ancient scrolls from an evil cult. That would be fun.
The reason is that liches aren't merely a thing wizards can turn into. They're a thing an insane, obsessed one might do. From the lich template ob the pathfinder D20 site:

While many who reach such heights of power stop at nothing to achieve
immortality, the idea of becoming a lich is abhorrent to most
creatures. [...] the spellcaster gives up life, but in trapping life
he also traps his death [...] he can continue on in his research and
work without fear of the passage of time.

Even power-mad mages think wanting to be a lich is raving bonkers. Especially when they cackle and proclaim "at long last I can ... continue on in my research ??".
Onto becoming one. The Pathfinder Wiki lich entry has this to say:

[...] The process itself is a quite difficult and lengthy one [...] researching the process is expensive in the extreme, requiring the expenditure of hundreds of thousands of gold pieces, and requires months, years, or even decades of research.2 [...]

That seems to have been partly copied from the lich monster template, which says this about becoming one:

The exact methods for each spellcaster's transformation are left to
the GM's discretion, but should involve expenditures of hundreds of
thousands of gold pieces, numerous deadly adventures, and a large
number of difficult skill checks over the course of months, years, or
decades.

Put those together and it seems you could do research for decades (if we can trust the wiki). That's the safest way. Or you could speed it up to mere months with deadly adventures and riskier skill checks.
So firstly, pre-liches are mages who only want to do research. Even worse, they've given up on normal research for now, becoming obsessed with being able to do research forever. And they've stopped caring about anything in the world -- that's why a living death as a cold, passionless abomination in a lair seems like a good idea. Even mad scientists want to show up everyone who ever laughed at them; and vampires like being around people; but liches, even pre-liches, have no interest in the affairs of the living.
Comment: Welcome to RPG.SE! Take the [tour] if you haven't already, and check out the [help] for more guidance. Is your answer based on experience with Pathfinder 1e, which this question asks about? Your answer links to an article on the official D&D website, seemingly one written after D&D 5e came out.
Comment: Sure, the pathfinder bestiary has the rules for becoming a lich: GM creates a custom, long campaign, plus 100,000 GP+. That would be a good answer to this Q, but it's not my answer. I wanted to emphasize the roleplaying part: liches don't adventure, and wizards trying to be liches hate to adventure. The D&D quote was nice for that -- but pathfinder also has flavor text like that. I'll edit that in.

How can my necromancer become a Lich?


Why would I submit prior art here for patent 5,491,834 when Article One Partners will pay me?

Question: I see Article One Partners has a research study for US5491834.  Why would anyone post prior art at Ask Patents for granted patents?
Comment: Since this is largely about the purpose and operation of the site, I am going to move this to meta.
Comment: A lot of people are genuinely eager to help improve this system for nothing (or because they think doing so is good for them or their industry.)  Most patents aren't on Article One, and my understanding is that (as you reference) there are none there pre-issue. So if you want to help improve the quality of most patents, especially *before* too-broad patents get issued, they're not really an option. Not to turn the question around, but why would anyone post a bounty there without first trying to solicit help for free here.
Comment: Are you asking why would someone do something for no reward when they could do the same thing for a reward?
Comment: Yes.  I may be missing the point of the prior art tag on askPatents.
Comment: I think the driving force behind this was to engage a software knowledgeable audience to collectively identify documents that might be good prior art to be submitted in pending cases under the AIA 3rd party submittal procedure. However it is not the sole purpose of the site and people may want to identify and tag things that might be used to invalidate issued patents.Presumably someone involved in a suit might stumble across something useful here.
Answer: That's easy. Because you are not comfortable with the Researcher Agreement that you would have to sign when you register at Article One Partners and instead prefer to publish your findings under a Creative Commons license here.
I suggest you check the paragraphs titled "Confidentiality" and "Non-Disclosure Requirements" in the Researcher Agreement.
The "Confidentiality" provisions basically designate all information provided by Article One or its clients to be confidential regardless of whether such information is explicitly marked "Confidential" or "Proprietary".  Vice versa the "Confidentiality" provisions also put the work that you provide in relation to a prior art request under an exclusive license to Article One.

The confidentiality of Studies posted on our Site and the work that you may provide in relation to a Study (together Study Material) is of paramount importance to us and to our clients.

The "Non-Disclosure Requirements" command you not to disclose the fact that you are working for "Article One". The provisions also state that any material produced by you relating to your work for Article One will be the exclusive property of Article One.

you will not, without our prior written consent, disclose to anyone that you are performing or considering performing work for a Study or any other non-public information regarding a Study or any activity on our Site.

I'd summerize the differences between Ask Patents and Article One as follows:

If you want to work as a free researcher, publish your work at Ask Patents.
If you want to be employed and work under strict confidentility and non-disclosure regulations, get a job at Article One.
Answer: This site is not about pre-issuance searches. See the others questions on the topic. It is only concerned with invalidating issued patents.  You have a legitimate point, why give away a free search? Probably explains the utter dearth of responses to calls for prior art. Most appear to be nothing than so someone using google patent's prior art feature.
The concept that the site makes the examination process better means it has to deal with pre-issuance inventions. That takes away from work though for people who want to get paid to file bad applications.
Comment: To the contrary, this site was created originally to solicit prior art  for published but not yet examined US applications. The provisions of the AIA provide a window for free 3rd  party submissions. See FAQs


Clean up iTunes excess

Question: Over the past years, I have removed plenty of songs from my iTunes library, but not deleted the files, and now my Music/iTunes folder is double the size of what iTunes reports as my library size. I don't care about any of the songs I have removed from my library. Is there any way to delete all of them? Thanks in advance!
Answer: There's a handy AppleScript that will identify files in your iTunes folder that aren't in the iTunes library: Music Folder Files Not Added.
Download the file, open the .dmg and add the script file to <code>~/Library/iTunes/Scripts</code> (you may need to create that folder if it's not there already). Then it should appear under the script menu in iTunes (a scroll icon between the Window and Help menus).

Clean up iTunes excess


On that p does not imply necessarily p

Question: Am I right to assume that in no modal logic, whether in K or in a logic where the accessibility relation is specified as either reflexive, symmetrical or transitive, does "p implies necessarily p" hold? In what (if any) ways does the accessibility relation between worlds have to be qualified in order for this inference to be provable?
Comment: Temporal modal logic, like Aristotle's ship-battle discussion uses, presumes p implies necessarily p as an axiom -- which means it is provable.  Only the future (even if it is the immediate future, or the immediate past to be known only in the future) has possibilities and requires arguments about necessity.  Later modal logics often take a more abstract version of necessary.  But this one is not dead.
Comment: Very interesting! You mean that if we are speaking about the past, the inference could be provable?
Comment: The answer below makes sense, and renders this comment irrelevant, for this case.  You aren't filtering p for temporal references.  If you know the past and can totally predict the future, because it is all necessarily determined to be the same as the original world, you no longer have an interesting modality of necessity left to talk about.  (So Scholastics who wanted primarily to talk about 'eternal' things then needed a different way of looking at necessity -- they pulled 'necessary' back to what *could not have been otherwise* rather than Aristotle's *can no longer be otherwise*)
Comment: For materialists, if we are talking about the past, this is not just provable, it is an axiom, right?  We cannot change the facts from which we must start.  Things are as they are and have the histories they already have.  So that is then uninteresting again.
Answer: You are right.
If the equation p→☐p is provable, then the only world that is allowed to be accessible from world w is w itself. One could describe that as all worlds being isolated. More formally, this axiom forces the accessibility relation R to satisfy:

If wRv, then v=w.

The whole idea of having other worlds breaks down...
If R is also reflexive (i.e. if ☐p→p is an axiom), you can derive p↔☐p, and the logic behaves exactly as the usual propositional logic with an uninteresting additional symbol.
Answer: Your question is more interesting than it may seem at first.
Almost every modal logic includes an inference rule called "Necessitation" which was originally proposed by Goedel. This rule states:
<code>"If p is a theorem, then ☐p is also a theorem"
</code>
So it's also interesting to ask why modal logic should include the Goedel inference rule, but not p→☐p as an axiom.
It is not true that a logic with the axiom p→☐p cannot allow for any world to be accessible other than to itself. For an example, consider a modal frame where the domain of possible worlds is a power set P(D) of some simple non-empty domain D. Then for accessibility take the subset containment relation w⊃v, (read as "greater or equal to") as the accessibility relation. This is a partial order, meaning it is reflexive, transitive, and anti-symmetric. This last property means:
<code>  "If w⊃v and v⊃w then w=v"
</code>
In a frame like this, p→☐p is valid. It cannot be proven from any other axioms, but it's true in every frame whose accessibility relation is a partial order. So it could be an axiom.
What's even more interesting (to me, at least) is that nowhere in the literature is there any discussion at all of any such logic, or any such frame. If anyone knows of an exception, please share it in the comments!
It's perhaps understandable that such frames would be omitted, because in these frames necessity "disappears" into ordinary truth. For every possible world where p is true, ☐p is also true. And vice versa. So modality has almost no interest in such frames.
I take this as a justification for adopting the Goedel rule of Necessitation, instead of an axiom such as p→☐p. I only wish there were more discussion in the literature.
Comment: Isn't modal collapse the explanation of why not to include p→☐p as an axiom? Necessitation only applies to theorems, so it just reflects that 'analytic' truths are necessary. But p→☐p would not have any restrictions on p, so p can be any contingent truth, and that's the problem. If p is restricted to theorems ⊢ p→☐p just rephrases necessitation.
Comment: @Conifold. I think you have it right. Hughes and Cresswell use the name Triv for the modal system that includes p → ☐p and ◇p → p as axioms. It is a system of modal collapse, since it follows that ◇p, p and ☐p always have the same truth value. The necessitation rule is quite different: it entails ⊢¬◇⊥ so one might say that its role is to enforce that no impossible worlds are accessible. It leaves open exactly what counts as impossible.

On that p does not imply necessarily p


How to use a python api on iPhone?

Question: There is an "Unofficial Plurk API in Python".
Plurk is a twitter-like website.
Can I use the API(python) from Objective-C? Or i have to port them?
Answer: Apple's iPhone developer license prohibits applications that use interpreted code. So, python is out, unfortunately.
Answer: The way I see it, one option is to try this this.
Alternatively, ths plurk api (which is really more of a python-automated abstraction than an API) isn't very big and is unlikely to take very long to port. Apart from being exceptionally simple code. The author's done all the legwork, defining urls and associated functions and so on.
Answer: The iPhone SDK will not allow you to run any Python code.  You need to convert it to C, C++, Objective-C or ObjectiveC++.
Answer: Well, Plurk has an official API now, and I wrote an Objective-C library to connect to Plurk. Maybe you are interested to give it a try.
http://github.com/zonble/ObjectivePlurk
Answer: Unfortunately, you can only do what Apple allows you to do (they are VERY controlling).  However, if you jail break your device (this violates your usage agreement with Apple) you can do many, many things with what I consider to be an amazing device (unfortunatly, Apple limits it's true possibilities).

How to use a python api on iPhone?


PHP and Keywords

Question: I would like to know if I can make a php script that will allow me to echo keywords into a meta tag.To be more precise will the keywords echoed by the php script be indexed by search engines? I don't need the actual script I just need to know if this will be any good for indexing.
Answer: Sure you can. They will also be seen by Google crawler/bot. The reason is that PHP is server-side language, your code is generated on server and sent back to browser for people and search engines to see.
Answer: From what I know it won't do you any good. The search engine crawlers will see your meta tag, but Google, for example, ignores the keywords when determining relevance.
If you want search engine visibility you should focus on your content and presentation. Be sure to follow the w3c recommendations on publishing HTML content.
Comment: I don't even care if I'm correct. I just want people to stop shoving keywords in their pages and focus on real content.
Comment: yep, correct: http://googlewebmastercentral.blogspot.com/2009/09/google-does-not-use-keywords-meta-tag.html
Comment: Well not really pointless, because the keywords tag **should** tell something about your page. The reason it is ignored is that webmasters have the habit of spamming it with keywords that don't summarize their real content.
Answer: search engines crawl web pages (actually their "robots" do). how you generate the content of the pages is not relevant. important is that you generate the content in a SEO (search engine optimization) way.
it is best to check out googles ressources on how to structure that content: http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=35291
Answer: You can try something like this:
<code><meta name="keywords" lang="<?=$language;?>" content="<?=$keywords;?>"  />
</code>
The variable $keywords should contain the keywords separated with , for example:
"news, php, java, perl"

PHP and Keywords


react native maps clustering

Question: I want to integrate maps in my react-native app, I am using the "react-native-maps" library for that
https://github.com/airbnb/react-native-maps
I want to use clustering but I am unable to find proper documentations related to that.
Please help me to find documentation of how to integrate maps with clustering and also tell which library is best for the implementation of clustering for both platforms, iOS and Android.
Answer: You can use mapbox/supercluster repo, and here's a gist showing how to implements supercluster to React Native. It's initially developed for browser/node applications but you can still simply npm install and use it (javascript is javascript everywhere).  Add the clustered markers into your MapView (originally shared here):
<MapView ref={ref => { this.map = ref; }}>
  { this.state.markers.map((marker, index) => {
    return (
      <MapView.Marker
        coordinate={{ latitude: marker.geometry.coordinates[1], longitude: marker.geometry.coordinates[0] }}
        onPress={() => this.markerPressed(marker)}>
        <Marker model={place} active={this.isSelected(place)} />
      </MapView.Marker>
    );
  })}
</MapView>

Warning from an issue of react-native-maps:

The major issue is performance, if you need to display hundreds or
  thousands of markers you're gonna have to optimize the hell out of it,
  and this is where it gets really hard.

react-native-maps also have an active conflicting PR which solves this issue both in Android and iOS natively, but it waits for a merge. However, you can manually implement it.
Answer: You can use react-native-maps-super-cluster. This module wraps AirBnB's react-native-maps and uses MapBox's SuperCluster as clustering engine. This module is super easy to use.
Demo

There is one more library for clustering react-native-map-clustering.
Answer: yarn add react-native-map-clustering
import {Marker} from 'react-native-maps';
import MapView from "react-native-map-clustering";

    const INITIAL_REGION = {
      latitude: 52.5,
      longitude: 19.2,
      latitudeDelta: 8.5,
      longitudeDelta: 8.5,
    };

    const App = () => (
      <MapView initialRegion={INITIAL_REGION} style={{ flex: 1 }}>
        <Marker coordinate={{ latitude: 52.4, longitude: 18.7 }} />
        <Marker coordinate={{ latitude: 52.1, longitude: 18.4 }} />
        <Marker coordinate={{ latitude: 52.6, longitude: 18.3 }} />
        <Marker coordinate={{ latitude: 51.6, longitude: 18.0 }} />
        <Marker coordinate={{ latitude: 53.1, longitude: 18.8 }} />
        <Marker coordinate={{ latitude: 52.9, longitude: 19.4 }} />
        <Marker coordinate={{ latitude: 52.2, longitude: 21 }} />
        <Marker coordinate={{ latitude: 52.4, longitude: 21 }} />
        <Marker coordinate={{ latitude: 51.8, longitude: 20 }} />
      </MapView>
    );

Answer: How does this work with callouts?
Using this code gives me an error: Element type is invalid: expected a string...
<Marker>
    <MapView.Callout tooltip>
        <Text>Test Text</Text>
    </MapView.Callout>
</Marker>

react native maps clustering


will a force with same frequency as natural frequency make system resonance (in multi-dof)?

Question: assume we have a multi-dof system and a force is applied with same frequency as one of the natural frequencies. will this system be resonant in any circumstances?
(system is undamped).
Comment: A common mistake people make here is they assume everyone knows every acronym. It is always helpful to spell out the full term before using an acronym. What is "multi-dof"?
Answer: That resonance is exactly why most systems are designed to avoid vibrating at the natural frequency - there are many examples of the consequences - see the (millenium I think...) bridge in London people walked, bridge moved, people started to walk in step, bridge moved even more...
Comment: will this happen always? my teacher said there is one exception but didn't say what is that.
Comment: Tuning forks - musical instruments?
Comment: @SaDeGH_F maybe your teacher is referring to the position of the actuator, for example applying a periodic force to a beam at a node of the standing wave corresponding to that frequency should hardly excite the system.
Answer: A Multi-DoF (system with multiple degrees of freedom) can be linear or nonlinear.
For linear systems in most cases, the system will enter resonance. The application of so-called mass dampers can be used to avoid the resonance peak. The theoretical advantage of linear systems is that we know that there is no dependence of amplitude and frequency from the external excitement for the resonance frequencies and modes of resonance of the system.
For the nonlinear system, we observe that the resonance frequencies are depending on the amplitude and frequency of the external oscillations. In general, the term mode of resonance is not applicable for nonlinear systems. Additionally, there are a lot of effects that make vibrations of nonlinear systems very difficult to describe.


What is the conditional min-entropy of a pure bipartite state?

Question: In this paper, it is stated that the conditional min-entropy $H(A|B)_{\rho_{AB}}$ of $A$ conditioned on $B$ for any $\textbf{pure}$ quantum system $\rho_{AB}=|\psi_{AB} \rangle \langle \psi_{AB} |$ is
$$ H_{\textrm{min}}(A|B)_{|\psi_{AB} \rangle \langle \psi_{AB} |} = - \textrm{log}_{2} \Big(\textrm{tr}\sqrt{\rho_{A}} \Big)^{2}\,, $$
where $\rho_{A}:= \textrm{tr}_{A}\rho_{AB}$ and $H_{\textrm{min}}(A|B)_{\rho_{AB}}$ is defined by
$$   H_{\textrm{min}}(A|B)_{\rho_{AB}} := - \inf_{\sigma_B}\, {D}_{\infty}(\rho_{A B} \| \mathbb{I}_A \otimes \sigma_B)\,, $$
where
$$D_{\infty}(\tau\|\tau') :=
   \inf\{\lambda \in \mathbb{R}: \, \tau \leq 2^\lambda \tau' \} \ . $$
The result for pure states is stated without any proof or reference, so I assume it comes straight from the definition, but I haven't been able to derive it. I found on Wikipedia that $H_{\textrm{min}}(A|B)_{\rho_{AB}}$ can be defined via an SDP as
$$ H_{\textrm{min}}(A|B)_{\rho_{AB}} = - \textrm{log}_{2}\, \min_{\sigma_{B}}\, \textrm{tr}\sigma_{B}\,\,\,\,\,\,\,\, \textrm{subject to}\,\,\,\,\,\,\,\, \mathbb{I}_A \otimes \sigma_B - \rho_{AB} \geq 0\,, $$
so the optimal $\sigma_{B}$ must satisfy $\textrm{tr}\,\sigma_{B}= \big(\textrm{tr}\sqrt{\rho_A} \big)^{2}$, but I don't see how to prove this. Any help appreciated.
Answer: I'll use an equivalent definition of the min-entropy
$$
\begin{aligned}
H_{\min}(A|B) = - \log_2 \min& \quad \lambda \\
\mathrm{s.t.}& \quad \rho_{AB} \leq \lambda I_A \otimes \sigma_B \\
& \quad \mathrm{tr}[\sigma_B] = 1 \\
& \quad \sigma_B \geq 0
\end{aligned}
$$
The interesting condition is $\rho_{AB} \leq \lambda I_A \otimes \sigma_B$. Let's assume $\sigma_B >0$ is positive definite, I'll leave it as an exercise to show that this also works when things are only positive semidefinite. Then this condition is equivalent to $\sigma_B^{-1/2} \rho_{AB} \sigma_{B}^{-1/2} \leq \lambda I_{AB}$ which is in turn equivalent to $\|\sigma_B^{-1/2} \rho_{AB} \sigma_{B}^{-1/2}\|_{\infty} \leq \lambda$. Thus the above program could be equivalently written as
$$
\begin{aligned}
H_{\min}(A|B) = - \log_2 \min& \quad \|\sigma_{B}^{-1/2} \rho_{AB} \sigma_{B}^{-1/2}\|_{\infty} \\
\mathrm{s.t.}& \quad \mathrm{tr}[\sigma_B] = 1 \\
& \quad \sigma_B \geq 0
\end{aligned}
$$
Now from the question we know that $\rho_{AB}$ is pure and hence
$$
\|\sigma_{B}^{-1/2} \rho_{AB} \sigma_{B}^{-1/2}\|_{\infty} = \|\sigma_{B}^{-1/2} |\psi\rangle\langle \psi|_{AB} \sigma_{B}^{-1/2}\|_{\infty} = \langle \psi|\sigma_B^{-1}|\psi\rangle = \mathrm{tr}[\rho_B\sigma_B^{-1}]
$$
Taking $\sigma_B = \frac{\sqrt{\rho_B}}{\mathrm{tr}[\sqrt{\rho_B}]}$ we see this feasible point of the SDP gives the objective value you expected, namely $\mathrm{tr}[\sqrt{\rho_B}]^2$.
To show this is optimal we take a look at the dual problem. We know by strong duality that the they will be equal (see the paper) and so if we can find a feasible point of the dual giving the same objective value then we are done. Note the dual problem can be written as
$$
\begin{aligned}
H_{\min}(A|B) = - \log_2 \max & \quad \mathrm{tr} [\rho_{AB} E_{AB}] \\
& \quad \mathrm{tr}_A [E_{AB}] = I_B \\
& \quad E_{AB} \geq 0
\end{aligned}
$$
But now consider the feasible point $E_{AB} =\rho_{B}^{-1/2}\rho_{AB} \rho_{B}^{-1/2} $. Using the assumption in the question that $\rho_{AB} $ is pure we see that
$$
\mathrm{tr} [\rho_{AB} E_{AB}] = \langle \psi|\rho_B^{-1/2}|\psi\rangle \langle \psi|\rho_B^{-1/2}|\psi\rangle = \mathrm{tr} [\rho_B^{1/2}]^2
$$
Which is exactly what we wanted.
Answer: Remember that the max relative entropy satisfies, in general,
$$D_{\rm max}(\rho\|\sigma) = \log \inf\{\eta\ge0:\,\, \rho\le \eta \sigma\}.$$
In particular,
$$D_{\rm max}(\rho\|I\otimes \sigma)=\log \min\{\eta\ge0: \,\, \rho\le \eta( I\otimes \sigma)\},
%= \log \min\{ \operatorname{tr}(Y): \,\, Y\ge0, \,\, \rho\le I\otimes Y \}
\\[20px]
H_{\rm min}(A|B)_\rho
\equiv - \min_\sigma D_{\rm max}(\rho\|I\otimes \sigma)
 = -\log \min\{\operatorname{tr}(Y): \,\, Y\ge0,\, \rho\le I\otimes Y\}.
$$
These identities are all discussed in details for example in https://cs.uwaterloo.ca/~watrous/QIT-notes/.

The above tells us that the task is essentially to find $Y\ge0$ such that $\rho\le I\otimes Y$ that minimises $\operatorname{tr}(Y)$, for some pure bipartite state $|\Psi\rangle$, which we can always write in its Schmidt decomposition as $|\Psi\rangle=\sum_k \sqrt{s_k} |u_k,v_k\rangle$.
Let then $\rho=|\Psi\rangle\!\langle\Psi|$.
I'm pretty sure there is a decent general proof of this, but it's eluding me right now. The following is a pretty ugly way to prove this that works for 2-qubit systems, assuming the solution for $Y$ is diagonal in the basis of the Schmidt decomposition of $|\Psi\rangle$.
We can assume without loss of generality that $|\Psi\rangle=\sqrt{s_0}|00\rangle+\sqrt{s_1}|11\rangle$, as this only amounts to a local change of basis.
Let's also assume the solution corresponds to a diagonal $Y$, meaning $Y=\sum_i Y_{ii} \mathbb{P}_i$, where $\mathbb{P}_i\equiv|i\rangle\!\langle i|$. Clearly, we'd also need to show that this is the case, so this proof is incomplete in this regard.
Using this assumption, our task is to minimise $\operatorname{tr}(Y)=Y_{00}+Y_{11}$ under the constraint $I\otimes Y-\rho\ge0$. Explicitly, this amounts to the condition
$$\begin{pmatrix}
Y_{00} -s_0 & 0 & 0 & -\sqrt{s_0 s_1} \\
0 & Y_{11} & 0 & 0 \\
0 & 0 & Y_{00} & 0 \\
-\sqrt{s_0 s_1} & 0 & 0 & Y_{11} - s_1
\end{pmatrix} \ge 0.$$
Using Sylvester's criterion, this is equivalent to the set of conditions
$$Y_{00} \ge s_0, \qquad Y_{11} \ge s_1, \qquad Y_{00} Y_{11} \ge s_0 Y_{11} + s_1 Y_{00} .
$$
Given that we need to minimise $Y_{00}+Y_{11}$ under these constraints, we can focus on the last constraint and use Lagrange's multipliers, obtaining the condition
$$Y_{11} -s_1 = Y_{00}-s_0.$$
Putting this condition back into the constraint, we get the following equation for $Y_{00}$:
$$Y_{00}(Y_{00}+s_1-s_0) \ge s_0 (Y_{00}+s_1-s_0) + s_1 Y_{00} \\
\iff Y_{00}^2 - 2s_0 Y_{00} + s_0 (s_0-s_1) \ge 0 \\
\implies Y_{00} \ge s_0 + \sqrt{s_0 s_1} \,\,\vee\,\, Y_{00} \le s_0 - \sqrt{s_0 s_1}.$$
Remembering we must also have $Y_{00}\ge s_0$, we see that only the first condition is in our feasible set. Thus using $Y_{00}=s_0+\sqrt{s_0 s_1}$, the relation found above between $Y_{00}$ and $Y_{11}$, and $s_0+s_1=1$, we conclude that the trace is given by
$$\operatorname{tr}(Y) = Y_{00} + Y_{11} =
2Y_{00} + s_1 - s_0 =
1 + 2\sqrt{s_0 s_1}. $$
This corresponds to the result stated in terms of $[\operatorname{tr}(\sqrt\rho_A)]^2$, because $\sqrt{\rho_A}=\sqrt{s_0} \mathbb{P}_0+\sqrt{s_1} \mathbb{P}_1$, hence
$$[\operatorname{tr}(\sqrt\rho_A)]^2 =
(\sqrt{s_0}+\sqrt{s_1})^2 = 1 + 2 \sqrt{s_0 s_1}.$$
Answer: Reading again the paper you linked, I think the way the authors were thinking about the result was of showing this via the relations between conditional min- and max-entropies, see discussion at the end of section A, page 2 in the arXiv version.
This is clearly a much more elegant and general way to show the result, and completely different from the other approach, so I'm posting it as a different answer.

Given any bipartite $\rho\equiv\rho_{AB}$, consider a purification $\rho_{ABC}$ on some auxiliary purification space $C$, and define the conditional max-entropy as
$$H_{\rm max}(A|B)_\rho \equiv - H_{\rm min}(A|C)_\rho.$$

Observe that for product states, $\rho = \rho_A\otimes\rho_B$, we have
$$H_{\rm min}(A|B)_\rho = -\log\min\{\operatorname{tr}(Y): \,\, Y\ge0,\,\rho_A\otimes\rho_B\le I\otimes Y\}
\\= -\log\min\{\alpha: \,\,\alpha\ge0,\,\, \rho_A\le \alpha\}
= -\log\|\rho_A\|_\infty \equiv H_{\rm min}(A)_{\rho_A},$$
where in the last 2 steps we observed that the $Y$ that saturates the inequality will have the form $Y=\alpha\rho_B$ for some $\alpha=\operatorname{tr}(Y)$.
To compute $H_{\rm max}(A|B)_\rho$, we can use Lemmas 5,6, and Theorem 3 of the paper you linked, where the authors prove that
$$H_{\rm max}(A|B)_\rho = \log d_A + \log \max_{\sigma_B} F(\rho,\tau_A\otimes\sigma_B)^2,$$
where $\tau_A\equiv I_A/d_A$ is the maximally mixed state, and $F(A,B)\equiv\|\sqrt A\sqrt B\|_1$ is the fidelity. In the case of $\rho=\rho_A\otimes\rho_B$, the fidelity is clearly maximal when $\sigma_B=\rho_B$, and thus we get
$$H_{\rm max}(A|B)_\rho = \log d_A + \log F(\rho_A,I_A/d_A)^2, \\
F(\rho_A,I_A/d_A) = \frac{1}{\sqrt{d_A}}\|\sqrt{\rho_A}\|_1
= \operatorname{tr}(\sqrt{\rho_A})/\sqrt{d_A}.$$
Putting these together you get
$$H_{\rm max}(A|B)_\rho = H_{\rm max}(A)_{\rho_A} = \log (\operatorname{tr}(\sqrt{\rho_A}))^2
= 2\log \operatorname{tr}(\sqrt{\rho_A}).$$

We conclude using the complementary relations that if $\rho=\rho_{AB}$ is pure,
$$H_{\rm min}(A|B)_\rho = -H_{\rm max}(A|C)_\rho,$$
where $C$ is a trivial (one-dimensional) space, and therefore
$$H_{\rm max}(A|C)_\rho = H_{\rm max}(A)_{\rho_A} = 2\log\operatorname{tr}(\sqrt{\rho_A}),$$
which is the result we wanted.


Tallis falling off

Question: What happens if your tallis falls off, is a bracha required?
Answer: Both according to Sephardim and Ashkenazim it depends on whether or not you realized it was falling off, and thus had intention to put it back on immediately or not.  See Shulahan Arukh 8:15, and the Mishnah Berurah, as well as the Kaf HaHaim there , and Ben Ish Hai Year 1 Berashit 10 .
The reasoning behind the Kaf HaHaim and Ben Ish Hai is that a second Berakha would be a Berakha sofek l'vatala, and thus should not be said.  However, if it falls off without your knowledge and there was no immediate intention to put it back on then it appears another Berakha is required.
Comment: I can't speak for the Sephardim, but I don't think Ashkenazim make that distinction.  Only when your intent is to take it off and return it, no beracha is said.  But if you don't want it to fall off, I don't know that daas to return it while it's falling works.  See mishna berura 39 whose svara applies even when you realize (everyone's stam daas is to put their talis back on if it falls).
Comment: I just looked at the Kaf haChaim.  He, too, does not make the distinction.  He says you don't make a bracha at all when it falls off because of safek brachos, unlike the Ashkenazim.  The Ben Ish Chai does not talk at all about a talis falling off.  He only talks about taking it off intentionally.  So we don't know where he stands in our case.
Answer: I've heard the shulchan aruch says that if it totally fell off, then yes, you'd make a new bracha when putting it back on.  Your intent with your first bracha did not include this sudden interruption.
Comment: So you were looking to quiz us here?
Comment: My brother is saying his bar mitzvah speech on this topic and he said that that was the exact awnser.
Answer: If one's tallit or tzitzit fall entirely off, he must recite a new blessing before putting them back on. This is true even if he picks it up and puts it back on immediately.
Among Sephardic Jews, one who removes his tallit intentionally must recite a new blessing before putting it back on. Among Ashkenazic Jews, though, one who intentionally removes the tallit need not recite a blessing before putting it back on, so long as he did not travel far and did not wait a long time before putting it back on. It is difficult to define "a long time;" ask your local authority for more information.
(Code of Jewish Law Orach Chaim 8:14-15; Mishneh Berurah 8:40)
from Mordechai -
http://halachahbyemail.blogspot.com/2010/11/if-tallit-falls-off.html
Comment: The bit about Sephardim is not true. The Maran does not rule that way, neither does the Ben Ish Hai, the Kaf HaHaim, or the Yalkut Yosef.
Comment: Sorry the Maran does rule that way, but the Sephardim Poskim rule according to the Rema in this case.

Tallis falling off


How does an engineering undergraduate apply for master in humanities?

Question: I am doing undergraduate in engineering but I want a transition to humanities for masters (history, anthropology).
How do I do this?
Should I take  prerequisite courses at a community college or through online/distance education?
Comment: simply put, you don't :P. Anyways, switching field is not easy though you might need to first read the general prerequisites for the program at the university you are interested in.
Answer: While I think the other way around (transitioning from the humanities to the sciences) might be harder, if you can demonstrate that you are serious and prepared to undertake graduate training in the humanities, it is definitely doable.
In my sociology department (PhD track, we didn't have a separate MA program and most entered straight after undergraduate school), many of my colleagues did not have any sociology training. While most of them came from related fields of economics, political science, and psychology, there were people with math and physics backgrounds and these were sometimes the people who were doing the most innovative and interdisciplinary work. The selection committee was fine with accepting them as long as their proposed research area fit with the department faculty's research and they showed promise as a sociologist.
While a degree in the field isn't necessary, make sure you address how you have been working to fill the gap you have on your CV. A personal statement will be a good place to address this. In addition, you can take additional courses, read as many works in your proposed field, and try to have a well developed study plan to give confidence to the committee that you are as competitive as the other candidates. It might be a good idea to also build contacts with professors in schools that you are applying for and go talk to them to see if they will be interested in working with you. If you plan to specialise in a society other than where you are based in (especially in case of anthropology), make sure you demonstrate regional expertise, language skills, knowledge of the society, or maybe work and/or living experience. Also, since those departments (in case of a PhD program) will likely ask for a writing sample, start working on one well in advance so the committee can see that you can indeed to the work in the proposed field.
Answer: This really depends on the country. In the US, most undergraduate programs offer enough flexibility to take a lot of electives. You can also extend you studies by a semester to pick up additional prerequisite classes. In the UK, there is generally not enough flexibility to take electives and you cannot easily extend your studies. Further, you likely would not have the prerequisite A-level classes to get into a humanities program. It a probably best to go talk to someone in the relevant department at your university for advice.
Answer: Briefly speaking,  your odds of getting admitted to a program of distinction (necessary for any academic job prospects) is low unless:

You have an excellent GRE score (absolutely required);
You have substantial coursework (30+ credits at minimum) in advanced humanities subjects with excellent grades;
You have an especially polished writing sample and excellent references from leading professors in your desired field;
Perhaps,  you have published work.

Remember, in humanities, admittance to a truly outstanding program is required for even limited career prospects. Do not settle for a lower ranked program.
Answer: I would suggest choosing either anthropology or history as they are fairly distinct areas of study when you get past the surface of things. If you haven't already picked a minor in either history or anthropology. This way you can see if it's a passing fancy or something you are serious in.
If it turns out you are then you will be part way there for the second degree. You may depending, on how far in you are, be able to dual degree in engineering and history/anthropology. If you can't dual degree but you took the minor you will then probably have enough to go on to appear like a good match for most schools you may apply to for graduate studies. You will also have the side of not having to go through as many lower undergrad classes to catch up with the mainstream majors.


Does the Catholic Church have a formal definition of the Mass?

Question: Does the Catholic Church have a formal definition of the Mass?
I have read about the Mass but never found a definition.
It could be that the term Mass is hard to define.
Comment: This short book (The Hidden Treasure, or the Immense Excellence of the Holy Sacrifice of the Mass...), by St. Leonard of Port Maurice, is currently sold in paperback but you can read it for free here: https://ia804703.us.archive.org/0/items/St.LeonardOfPortMauriceTheHiddenTreasureOrTheImmenseExcellenceOfTheHolySacrificeOfTheMass/St.%20Leonard%20of%20Port%20Maurice%20-%20The%20Hidden%20Treasure%20or%20the%20Immense%20Excellence%20of%20the%20Holy%20Sacrifice%20of%20the%20Mass.pdf It is well worth the read.
Answer: The Mass is…

The unbloody sacrifice of the New Law, in which the Body and Blood of Christ, under the species of bread and wine, by a mystical immolation, are offered by a legitimate minister of Christ to God in order to acknowledge His supreme dominion and to apply to us the merits of the Sacrifice of the Cross.
—B. Merkelbach, O.P., Summa Theologiæ Moralis (vol. 3), 8th ed. (Montreal: Desclee 1949) 3:308, quoted in Anthony Cekada, Work of Human Hands: A Theological Critique of the Mass of Paul VI pp. 105-6

What is the Mass?The Mass is the sacrifice of the New Law in which Christ, through the ministry of the priest, offers Himself to God in an unbloody manner under the appearances of bread and wine.

—The New Saint Joseph Baltimore Catechism (no. 2) p. 168

EUCHARIST
The true Body and Blood of Jesus Christ, who is really and substantially present under the appearances of bread and wine, in order to offer himself in the sacrifice of the Mass and to be received as spiritual food in Holy Communion. It is called Eucharist, or "thanksgiving," because at its institution at the Last Supper Christ "gave thanks," and by this fact it is the supreme object and act of Christian gratitude to God.
Although the same name is used, the Eucharist is any one or all three aspects of one mystery, namely the Real Presence, the Sacrifice, and Communion. As Real Presence, the Eucharist is Christ in his abiding existence on earth today; as Sacrifice, it is Christ in his abiding action of High Priest, continuing now to communicate the graces he merited on Calvary; and as Communion, it is Christ coming to enlighten and strengthen the believer by nourishing his soul for eternal life. (Etym. Latin eucharistia, the virtue of thanksgiving or thankfulness; from Greek eucharistia, gratitude; from eu-, good + charizesthai, to show favor.)
—Fr. Hardon, S.J., Catholic Dictionary
Comment: See the precise definition I added from the great theologian Benedikt Merkelbach, O.P.
Comment: That seems more like an explanation then definition to me
Answer: Does the Catholic Church have a formal definition of the Mass?
A Catholic definition of the Mass needs a explanation in order that it be truly understood.
Here is how Fr. Hardon SJ defines the Mass:

Mass
The Sacrifice of the Eucharist as the central act of worship of the Catholic Church. The "Mass" is a late form of missio (sending), from which the faithful are sent to put into practice what they have learned and use the graces they have received in the Eucharistic liturgy.
As defined by the Church at the Council of Trent, in the Mass, "The same Christ who offered himself once in a bloody manner on the altar of the cross, is present and offered in an unbloody manner." Consequently, the Mass is a truly propitiatory sacrifice, which means that by this oblation "the Lord is appeased, He grants grace and the gift of repentance, and He pardons wrongdoings and sins, even grave ones. For it is one and the same victim. He who now makes the offering through the ministry of priests and he who then offered himself on the cross. The only difference is the manner of offering" (Denzinger 1743).
The Mass cannot be understood apart from Calvary, of which it is a re-presentation, memorial, and effective application of the merits gained by Christ.
The re-presentation means that because Christ is really present in him humanity, in heaven and on the altar, he is capable now as he was on Good Friday of freely offering himself to the Father. He can no longer die because he now has a glorified body, but the essence of his oblation remains the same.
The Mass is also a memorial. Christ's death is commemorated not only as a psychological remembrance but as a mystical reality. He voluntarily offers himself, the eternal high priest, as really as he did on Calvary.
The Mass is, moreover, a sacred banquet or paschal meal. The banquet aspect of the Mass is the reception of Holy Communion by the celebrant and the people, when the same Christ who offers himself to the Father as a sacrifice then gives himself to the faithful as their heavenly food. It was this fact that inspired the Holy See, after the Second Vatican Council, to restore the practice of receiving Communion under both kinds for all the faithful: "The entire tradition of the Church teaches that the faithful participate more perfectly in the Eucharistic celebration through sacramental Communion. By Communion, in fact, the faithful share more fully in the Eucharistic Sacrifice. In this way they are not limited to sharing in the sacrifice by faith and prayer, nor to merely spiritual communion with Christ offered on the altar, but receive Christ himself sacramentally, so as to receive more fully the fruits of this most holy sacrifice. In order that the fullness of the sign in the Eucharistic banquet may be seen more clearly by the faithful, the Second Vatican Council prescribed that in certain cases, to be decided by the Holy See, the faithful could receive Holy Communion under both species" (Sacramentali Communione, June 29, 1970).
Finally the Mass is the divinely ordained means of applying the merits of Calvary. Christ won for the world all the graces it needs for salvation and sanctification. But these blessings are conferred gradually and continually since Calvary and mainly through the Mass. Their measure of conferral is in proportion to the faith and loving response of the faithful who unite themselves in spirit with the Mass.
It is in this sense that the Mass is an oblation of the whole Mystical Body, head and members. Yet, among the faithful, some have been ordained priests and their role in the Mass is essentially different from that of the laity. The priest is indispensable, since he alone by his powers can change the elements of bread and wine into the body and blood of Christ. Nevertheless the role of the participants is of great importance; not as though there would be no Mass without a congregation but because the people's "full, active and conscious participation will involve them in both body and soul and will inspire them with faith, hope and charity." The more active this participation, the more glory is given to God and the more grace is bestowed not only on the Church but on all the members of the human race.


Looking for ''test management tool'' for manual testing

Question: I am researching Test Management tool for creating test plan, test cases, test coverage, test matrix, reports and also should integrate with automation tools with providing some features for e.g. test modifications, duplication, test coverage etc.
Comment: What have you researched so far?
Answer: Although this answer can be found rather very quickly using mighty Google search, but anyway for manual testing I would highly recommend TestLodge, it is very good tool and basic package should be sufficient for several small projects or two big.
It can be connected with various platforms, but as far as I know there is no connection with automated testing, but on the other I didn't search every option that was available over there :)
For more information about TestLodge: click here.
Also check out this list, you can find something that suits your need.
Answer: I recommend Jira
it is contain more features will help you
Answer: The Best Tool in Manual Testing is HP Application Lifecycle Management (HP ALM). Moreover many Software Testing Companies are using this successfully.
Comment: please define what is best for you, the price of HPs products makes them much less the desirable for me


Scala tool to remove all unused code

Question: I am writing a Scala plugin for an editor I use that would highlight all unused code paths (could be unused defs, vals, classes and implicits), and give the user an option to yank them out of the .scala file.
How can I do this? To simplify the problem, let's pretend we only have a single root level .scala file with no external dependency on libraries or any other code files.
Ideally I would want this to be an SBT plugin that, given a single such Foo.scala file, would spit out Foo_min.Scala file with all unused code removed.
Comment: The closest thing I know is to use `-Ywarn-unused` and `-Ywarn-unused-import` as sbt options.
Comment: Possible duplicate of [Is there a tool for Scala to clean all the unused imports from all the code files?](https://stackoverflow.com/questions/7767567/is-there-a-tool-for-scala-to-clean-all-the-unused-imports-from-all-the-code-file)
Answer: You need some kind of semantic API to traverse over the code and ask questions like "is this variable/import ever used" ?
As far as I know, Intellij uses Meta programming System to achieve same goals. For scala, you can wait for scalameta's 2.0 release, which (most probably) will support semantic API.
Answer: Scalafix has a rewrite for this: RemoveUnusedImports
Follow those instructions to run it: https://scalacenter.github.io/scalafix/#Installation
Answer: You're basically looking for a callgraph.
A complete but complex callgraph for Scala code is implemented in the Dotty Linker. This is state of the art. However, even building an easier callgraph is not a trivial task. I wouldn't be surprised if a Meta implementation would be constrained to perform such a task. Particularly, you need to be very careful with implicits and scoping, especially given the fact that meta macros are expanded after typer.
Creating your own callgraph requires symbols, types and implicit searches. I'm afraid you need to wait until the Semantic API in Scala Meta 2.0 is released.

Scala tool to remove all unused code


Attribute table in QGIS won't save custom values

Question: I am trying to edit a point shapefile in QGIS and I have editing on for that layer. I have added a new column for the custom data, I have set it to text and have 8 characters allowed in the column, but every time I save and toggle editing off all of the values go back to null.
Comment: This may or may not help, but sometimes simply closing and reopening the attribute table has resolved this for me in the past.  Stupid workaround but nonetheless it has worked.  Also, do you have any Joins on the layer while editing? This has also caused similar behavior when editing for me in the past.
Answer: There may be something weird with the shapefile, in case QGIS have write access on this file.
In this case, I have two ideas for you:
1) To diagnosticate the shapefile for anomalies, using the shp_doctor tool.
If you are on Windows and you don't want to loose time with the shp_doctor compilation from sources, then you may
 download a working executable, tested for viruses, from here. (Press the yellow button - Download now, File Size: 567.1 kb)
Below is such a test, with a healthy file, but I'm expecting in your case, to see a hint for your shapefile bad behaviour:

2) I think this is the quick-and-dirty way to solve your problem, regardless of the cause of errors (I hope not to be wrong!):

open up the attribute table of your weird shapefile;
select only those healthy point features, omitting those with null values;
right click the layer name and choose Save Selection As...;
choose ESRI Shapefile as Format;
choose a name and a location for the new, healty layer;
check Add saved file to map and press Ok.

Now, working with the new point layer should be smooth!


Increasing a potential causes increase in energy levels

Question: Suppose a potential $V(x)$, and suppose a bound particle so the allowed energy levels are discrete. Suppose a second potential $\widetilde{V}(x)$ such that $\widetilde{V}(x) \geq V(x)$ for all $x$ (suppose the potentials are relevant only for some interval). Does this necessarily imply that the eigenvalues of the Hamiltonian with $\widetilde{V}(x)$ will be at least those of the Hamiltonian with $V(x)$? That is, if $E_n$ are the energy levels of the first Hamiltonian and $\widetilde{E}_n$ are the energy levels of the second Hamiltonian, is $E_n\leq \widetilde{E}_n$ for all $n$? How can one show this?
Answer: You can show this by using perturbation theory (only for suitable small changes in the potential).
When you assume, that $\tilde{V}(x) = V(x) + c$ with $c > 0$, then you can write your problem als perturbation:
If the unperturbated hamiltonian $\hat{\mathrm H}$ has eigenstates $ | \Psi_n \rangle $ with discrete energies, then perturbation-theory states that changing the hamiltonian by a little term $\hat{\mathrm V}_\textrm{perturbation}$ will change the eigenvalues $E_n$ by:
$$
\Delta E_n = \left\langle \Psi_n \left| \hat{\mathrm V}_\textrm{perturbation}\right| \Psi_n \right\rangle
$$
This is valid if you neglect terms of higher Order.
There is one think to watch out regarding perturbation theory: If your energy eigenvalues are degenerated, then the perturbation term has to be diagonal in the subspace that is spanned by the degenerated states.
In our case, $ \hat{\mathrm V}_\textrm{perturbation}= c$ is just a multiplication, so:
$$
\langle \Psi_m | c | \Psi_n\rangle = c \langle \Psi_m | \Psi_n\rangle = c ~\delta_{nm}
$$
$\hat{\mathrm V}_\textrm{perturbation}$ is diagonal in any subspace, and we can make use of perturbation theory. You then calculate the energy-shift just by
$$
\Delta E_n = \langle \Psi_n | c| \Psi_n \rangle = c  \langle \Psi_n | \Psi_n \rangle = c >0
$$
So if you increase the potential by a constant, then the energy eigenvalues will just shift by that constant.
Edit: One can expand the proof for perturbations that vary with time: Let the change in the potential be $\delta V(x)$ (which now depends on $x$), then you can still calculate the energy-shift by using perturbation theory. In whatever subspace that is formed by degenerate states, you can find a Basis $|\tilde{\Psi}_n \rangle$ for which $\delta V(x)$ is an orthogonal Operator.
In this Basis you then calculate the energy-shift like described above:
$$
\Delta E_n = \langle \tilde{\Psi}_n | \delta V( \hat{x})| \tilde{\Psi}_n = \int dx |\tilde{\Psi}(x)|^2 \delta V(x)   > 0
$$
Since $\delta V(x) > 0$. Those are now energyshifts for eigenstates of your "old" hamiltonian. However, those eigenstates are not necessarrily the eigenstates that you started with.
Comment: The perturbation theory argument seems right, except for the part where you claim that the potential is diagonal in any subspace. What if it's not a constant? In general you would want to add a small term of the form $\delta V(x)$.
Comment: You are right, if you want to add a small term of the form $\delta V(x)$, then my argument can't be used, you would have to justify the perturbation theory another way, or use another argument.
Comment: @Quantumwhisp, note that if $\delta V(x)$ is a generic *positive* function (not a constant), then your argument still works (in the case of nondegeneracy), since: $$\langle \psi \vert \delta V (x)\vert \psi \rangle = \int \text d x \vert \psi (x)\vert ^2 \delta V(x)>0.$$
Comment: What you want to say is, that even in cases with degeneracy, If I diagonalize $\delta V(x)$ in the subspace of degenerated states, the Eigenvalues will still be positive?
Comment: It seems like your are making the assumption that the perturbaton is a constant number, which is not necessary (and too much restrictive). Also, yes, in the degenerate subspace, the 1st order perturbations to the levels are still given by the expectation values of the "good" eigenstates and are therefore strictly positive in our case.
Comment: I'm aware that the perturbation being a constant positive number is too restrictive, and I'd like to relaxe this condition to the perturbation being a positive function $\delta V(x)$. By "good" eigenstates, do you mean eigenstates in which $\delta V(x)$ is diagonal? If so, then we are talking about the same thing, and I'm good and will edit my answer to include what you mentioned.
Answer:
Let there be given a selfadjoint$^1$ operator $H^{(0)}$ and a (semi)positive operator $V\geq 0$ on a Hilbert space ${\cal H}$. Let the basis of normalized eigenvectors for $H^{(0)}$ be $(|i^{(0)}\rangle)_{i\in I}$ with corresponding eigenvalues $(E^{(0)}_i)_{i\in I}$ ordered such that
$$ \forall i,j ~\in~I:\quad i~\leq~j\quad\Rightarrow \quad E^{(0)}_i~\leq~E^{(0)}_j.\tag{1}$$ Similarly, let the basis of normalized eigenvectors for $H^{(1)}:=H^{(0)}+V$ be $(|i^{(1)}\rangle)_{i\in I}$ with corresponding ordered eigenvalues $(E^{(1)}_i)_{i\in I}$.
Non-degenerate$^2$ perturbation theory yields the following construction: Define a one-parameter family of selfadjoint operators $$H(t)~:=~ H^{(0)}+tV, \qquad t~\in~[0,1].\tag{2}$$ Consider the following initial value problem of coupled 1st order differential equations$^2$
$$ \frac{d|i(t)\rangle}{dt}~~=~~\sum_{j\in I\backslash \{i\}} \frac{\langle j(t)| V | i(t) \rangle}{ E_i(t)-E_j(t)}|j(t)\rangle ~~=~~ \sum_{j\in I}A_{ij}(t)|j(t)\rangle , \tag{3}$$
$$ A_{ij}(t)~~:=~~\left\{\begin{array}{ccl} \frac{\langle j(t)| V | i(t) \rangle}{ E_i(t)-E_j(t)} &\text{if}& i~\neq~ j \cr
0 &\text{if}& i~=~ j \end{array} \right\}~~=~~-A^{\ast}_{ji}(t),  \tag{4}$$
$$ \frac{dE_i(t)}{dt}~~=~~\langle i(t)| V | i(t) \rangle~~\geq~~0, \tag{5}$$
$$|i(t\!=\!0)\rangle~~=~~|i^{(0)}\rangle,\qquad E_i(t\!=\!0)~~=~~E^{(0)}_i,\qquad i\in I. \tag{6}$$
We conclude from eq. (5) that the spectrum of $H(t\!=\!1)\equiv H^{(1)}$ is increased compared to the spectrum of $H(t\!=\!0)\equiv H^{(0)}$, i.e.
$$ \forall i~\in~I:\quad E^{(0)}_i ~\leq~ E^{(1)}_i,\tag{7}$$
as OP wanted to know. Note that the anti-Hermitian property (4) implies that the basis $(|i(t)\rangle)_{i\in I}$ is normalized.
In case of degeneracies and level-crossings, the basis $(|i(t)\rangle)_{i\in I}$ is no longer a well-defined/continuous function of $t$. Nevertheless, one may argue that the ordered eigenvalues $E_i(t)$ are still non-decreasing as a function of $t$, i.e. weakly increasing.
Alternatively, the increase in the ground state energy can be independently & non-perturbatively deduced from the variational method:
$$ E_0^{(0)} ~~\leq~~ \langle 0^{(1)}| H^{(0)} | 0^{(1)} \rangle
~~=~~ \langle 0^{(1)}| \left(H^{(1)}\!-\! V \right)| 0^{(1)} \rangle~~\leq~~ E^{(1)}_0. \tag{8}$$
A generalization of the above variational method (8), based on the Schur-Horn theorem, leads to the following tower of weaker inequalities:
$$ \forall j ~\in~I:\quad \sum_{i=0}^j E^{(0)}_i ~\leq~\sum_{i=0}^j E^{(1)}_i.\tag{9}$$
(To prove ineq. (9) work in a basis where $H^{(1)}$ is diagonal, and then apply the Schur-Horn inequality.)

$^1$We will ignore subtleties with unbounded operators, domains, selfadjoint extensions, etc., in this answer.
$^2$ We assume in Section 2 that the spectrum for $H^{(0)}$ is non-degenerate and that no level-crossings occur.
Comment: I'm still bothered by the use of perturbation theory. How can this rule out a level inversion when the two potentials are completely different? The variational method looks very hard to extend beyond the ground state.
Comment: @Emilio Pisanty: I agree to a large extent with your above comment.
Comment: Fair enough. But also the ground-state variational proof means that if level inversions do happen then it needs to work only on excited states, and I'm at a bit of a loss as to how that would work. It's a good question, though.
Comment: I updated the answer.
Answer: Consider $\tilde{V}(x)=V(x)+\Delta(x)$ where $\Delta(x)>0,\forall x$. Within 1st order perturbation,
$E_n=E_n^0+\langle \psi_n|\Delta|\psi_n\rangle=E_n^0+\iint dx_1dx_2\psi_n^*(x_1)\delta(x_1-x_2)\Delta(x_2)\psi_n(x_2)=E_n^0+\int dx|\psi_n(x)|^2\Delta(x)>E_n^0$
Comment: Also I don't know if I treat it correctly... almost forget the wave-mechanical treatment.
Answer: Generically, the answer is "no".  The Zeeman effect is the splitting of degenerate spectral lines in the presence of a static magnetic field.  As the field strength increases, some lines move to higher energies and some lines move to lower energies.  Example of the splitting of the $5s$ orbitals of Rubidium:

(Graph created by: Danski14.  Image used under Creative Commons Attribution-Share Alike 3.0 Unported license)
Note that the levels don't even move monotonically:  The (2,-1) and (1,-1) levels move towards zero frequency shift for small field and then away for large fields.
Similarly, the Stark effect (shifting and splitting of spectral lines by an imposed electrical field) can shift to higher and lower energies.  (Structurally similar shifts can be seen on the linked page as those shown above for the Zeeman effect.)
EDIT:
At least one commenter seems confused about what these words mean.  The Zeeman splitting occurs under a uniform field.  A uniform field has no potential, so makes no contribution to $\tilde{V}(x)$.  In detail, using the OP's potential, $$ V(x) + \text{[uniform magnetic field]} = V(x) + 0 = \tilde{V}(x)  \text{.}  $$  Consequently, Zeeman splitting occurs without changing the potential at all.  (This is admitted by the OP's use of $V(x) \leq \tilde{V}(x)$.)
A magnetic field is a vector field, so does not have spin dependence.  That is, the uniform magnetic field is not written as a function of position and spin; it is only a function of position.  The Hamiltonian contains all of the interaction terms.  If there is coupling between electrons and the magnetic field, this coupling appears in the Hamiltonian.  And in a Hamiltonian that has such a term, the spin of an electron does contribute to the sign of the effect of the electron-magnetic interaction.  The OP gives no details about his/her Hamiltonian.  If a commenter has questions about spin-dependence in the OP's Hamiltonian, the only profitable choice is to inquire with the OP.
It is perhaps unfamiliar to imagine a uniform electric field (rather than an electric field of uniform gradient).  Such a field is approximately produced in doped semiconductors.  Far from a p-n junction, the Stark effect deforms the orbital/band structure of the materials, differently depending on the dopant.  Since we are far from the junction, the net electric field is induced by the dopant (and depletion physics) and is as uniform as your model allows.  Near the junction, the local field value is intermediate and the Stark deformation of the energy levels/bands is intermediate (and a bit nonlinear since now the gradient of the electric field is not necessarily small).
So, without changing the numerical value of $V(x)$ at all, binding energies can can be shifted positively or negatively.  This is observed in real atoms.
Comment: Do you think Zeeman term is an increasing potential?
Comment: I would say that the question's increase a potential doesn't mean such a case where spin (and orbital) degree of freedom involves.
Comment: the question directly requires $V(x)$, not $V(x\sigma)$
Comment: the magnetic interacts with two part: orbital part, which enters as a vector potential into kinetic energy and hence doesn't meet the requirement of this question. Interact with spin, is not considered. Hence I would say your example is not a candidate to disprove this.
Comment: @RoderickLee : Instantaneously, no.  "As the field strength increases", yes.
Comment: @RoderickLee : I see no restriction on the form of the Hamiltonian in the Question.  If you would like clarification on the Question, you should direct your inquiry/comment to the Question.
Comment: A (spatially) uniform magnetic or electric field gives a $V(x)$, a very simple one at that.  It's the Hamiltonian that would contain the interaction terms; that's what Hamiltonians do.
Comment: Again -- if you wish to know more about the questioner's Hamiltonian, ask them.  No amount of commenting at me will change or clarify the Question.
Comment: I deleted a comment exchange involving some inappropriate comments.