Equivalence between fragments of intuitionistic and classical logics

Question: Is the fragment $\{\vee,\land,\Rightarrow\}$ (no $\neg$) of intuitionistic propositional logic equivalent to the corresponding fragment of classical propositional logic, i.e. a formula is intuitionistic provable iff it is classically valid?  If yes, where can I find such a proof?
Answer: Classical and intuitionistic propositional logic do not prove the same formulas, even in the purely implicational fragment.
Most famously, Peirce's Law $((P\to Q)\to P)\to P$ is a classical tautology, but is not intuitionistically valid. (That is, classical logic proves it, but intuitionistic logic doesn't).

The two logics are equivalent for the $\{\land,\lor\}$ fragment, though. In terms of which formulas are theorem of the pure calculus, this is not very interesting (because no formula in the $\{\land,\lor\}$ fragment are theorems), but it also holds if you consider non-empty theories: Classical and intuitionistic entailment coincide for this fragment.
See this question which shows that the only change to the classical sequent calculus LK that is necessary to get intuitionistic logic instead is to the ${\to}R$ rule. However a cut-free proof in the sequent calculus never uses rules for connectives that don't appear in the conclusion, so the valid (cut-free) proofs in the classical LK for conclusions in the $\{\land,\lor\}$ fragment are the same as the valid proofs in the intuitionistic variant.
Comment: @DougSpoonwood: They are also equivalent in the non-vacuous sense that their _entailment relations_ are the same for this fragment.
Comment: "The two logics are equivalent for the {∧,∨}{∧,∨} fragment, though."

There don't exist any theorems in that fragment.  Note that the question makes reference to a formula as "proofable" [sic].  So, yes, they are equivalent.
Answer: Additionally to Henning's answer:
Usually you have at least some expression in your logic expressing "contradiction", for example $0=1$ in Heyting Arithmetic. Then you immediately get all of intuitionistic logic by setting $\neg a :\equiv a \Rightarrow (0 = 1)$, so removing $\neg$ usually does not change anything.
If you don't have contradiction already, you can just "adjoin" it in the same fashion you add an $-\infty$ to the lattice of reals (and more generally: a least element to a poset or initial object to a category).
Comment: @fweth: If all you have is $\{\land,\lor,\to\}$ and no constants, then you cannot express negation even classically -- because every expression you can build with those connectives will evaluate to true when all the variables in it are true.
Comment: Also if I have no constants?  Like just propositional variables and connectives, not bottom, etc. can I still express contradiction then?  Thanks for your answer anyway!
Comment: I also think I can't express negation classically, but still not every formula is valid.  $A$ is not classically valid but e.g. $A\Rightarrow A$ is.
Answer: I use Polish notation.
The formation rules go:

All lower case letters of the Latin alphabet qualify as significant expressions.
If $\alpha$ and $\beta$ qualify as significant expressions, then so do N$\alpha$, C$\alpha$$\beta$, A$\alpha$$\beta$, and K$\alpha$$\beta$.

The significant expression CApqCCpqq can get proved in intuitionistic logic from the axiom set {

CpCqp
CCpCqrCCpqCpr
CpApq
CpAqp
CCpqCCrqCAprq
CKpqp
CKpqq
CpCqKpq
CpCNpq
CCpNqCqNp

} under uniform substitution and detachment.
However, CCCpqqApq, which does hold in classical logic, cannot get proved since the following model satisfies the above 10 axioms but does not satisfy CCCpqqApq according to Mace4.  Thus, the fragment {A, K, C} of intuitionistic logic is not equivalent to the fragment {A, K, C} of classical logic:
<code>A   0   1   2
0   0   0   2
1   0   1   2
2*  2   2   2

C   0   1   2
0   2   1   2
1   2   2   2
2   0   1   2

K   0   1   2
0   0   1   0
1   1   1   1
2   0   1   2

N
0  1
1  2
2  1
</code>


How do I deal with a colleague who wants to talk to me?

Question: I have a colleague at work. He is autistic. He likes to talk but have trouble expressing his emotions. He doesn't sit next to me. He works with me sometimes. He leaves his cubicle to talk to me even though I'm busy. How do I deal with this?
Comment: Does either of them cause any issue to you ? Do they interrupt your workflow to talk about things that are not related to the company business or your daily tasks ?
Comment: Have you tried wearing headphones? They are a signal that you don't want to be disturbed.
Comment: One of them does. Yes, They interrupt my workflow.
Comment: What have you tried so far?
Comment: I asked them to leave politely. I also told them that I'm busy.
Comment: "I asked them to leave politely. I also told them that I'm busy." As that strategy worked in the past? Please give us more context. Also, can you remove additional chairs from your cubicle?
Comment: What do they want to talk about? Work stuff or private stuff?
Comment: Can you tell him that you like the chat, but your manager wants you to get some urgent tasks done today, and you have to work now, and you will get back to him after you are done with the tasks ?
Comment: Okay. Why does always looks for me and sought me out?
Answer: I've learned if you don't like someone's conversation they will eventually get the hint if you  excuse yourself repeatedly from the interaction this will in turn cause them to confront you instead of you having to confront them
They will ask why you are avoiding them and you can politely say I like my job and frankly it's way more important so let's keep it professional and maybe go have a drink after work or message through email
Drink is leading them to believe you want to have a social friendship tell them to email you will send them. Clear messaging that you're not really wanting to be socially connected to them. This in turn will save face as you can't be the bad guy of they confront you works for me  ... Goodluck
Comment: "Men" and "getting hints" often doesn't work. On the positive side, "men" and "being told directly what you don't like" works well and without problems for most who don't get hints.
Answer: Are these colleagues discussing work matters with you, or just chatting about social things? (Or perhaps a bit of both?)
You generally can't avoid talking to work colleagues about work. However, what you can do is channel how and when they talk to you. Set specific times in your calendar where you have time for catch-ups, and let your coworkers know when that is (alternatively you can block out specific chunks of 'focus time' where you don't want to be disturbed, and again, tell your coworkers). Then, and this is the hard part, don't discuss non-urgent work matters outside the times you've said you're available. Ask them politely to leave and come back at a specific later time, as you're busy.
With regards to non-work chat, you can take a similar approach where you ask them to discuss the topic with you during your break/lunch time instead. You can be apologetic about it and tell them that you do want to discuss whatever topic is at hand, but you can't give them your undivided attention at the moment. You can, for example, offer to grab them when you're next getting a cup of coffee.
Both of the above assume that your problem is with the timing of the conversation, and not the fact that they're talking to you at all. If you don't want to have any sorts of discussions with them, this is likely to be tricky. Being antisocial at work will tend to lead to other problems down the line. You should aim to maintain an effective working relationship if these are people you work with at all, and sometimes that means listening to an occasional boring story or pretending to laugh at a dull joke. You can try to minimise the time spent with them using the above strategy, but ignoring them completely is unlikely to work out well in the long run.
If this is seriously impacting your work: Escalating to your manager/HR is likely to have social and perhaps professional repercussions for you, if it's seen as an overreaction. Try to resolve things with them directly first. However, if you've tried to be polite and professional and it's not working, then you can get your manager involved (inform them of the steps you've already taken and how much it's affecting your productivity, to make it clear that it's a serious problem for you).
Answer: There's multiple ways to do this:
1: The Passive approach - you get a big pair of over-the-ear Headphones - and you let your colleagues know that if you have them on, you are busy on important issues and would like not to be disturbed.
2: The Direct approach - Sit down with them (and potentially their manager)  and say something like this:
"Hey guys, I find it very difficult to stop what I'm currently working on, have a conversation, and then resume what it is I was doing before you needed to talk to me - Can I ask that you consider sending me a message in Teams/Slack/whatever or put it in an Email so that I can respond and assist when I've reached a convenient break point in my current tasks?"
3: The HR approach - raise this with Mangement/HR - outline much the above - that you are finding the regular interruptions to be really hampering your efforts to complete your work and ask that they have a chat with the individuals to limit the interactions
Also - don't feel bad about asking - I work in IT and this is fairly common that people are very particular about when they can be asked a question as it really does break a flow of concentration.
Answer: It doesn't sound like there is a problem!
But if you really have someone talking to much, just wrapping up the conversation after a short hearing by saying "I'm sorry, Jane, I've got so much on my plate that I'll have to crack on."
A certain amount of chat between colleagues is normal and expected.
If two people with very different roles are colocated, you might end up with different norms and personalities conflicting, but in that case it might be appropriate to approach your manager and ask for a more private area to work, or even move on to another company.
If it isn't a personality or role issue, but just somebody who really won't stop rabbiting on, after a few times of being polite about wanting to crack on with work, it might be appropriate to be more direct, or even approach your manager.
It would seem unusual to have two such people with this problem, man and woman, in one place though.


Why are computers slow to come back from hibernate?

Question: Hibernation is supposed to write out RAM contents to disk, and coming back from hibernation is supposed to fill back RAM with saved contents. Why is coming back from hibernation slow, e.g. system is very unresponsive in general for quite some time?
Comment: You should try a computer which uses a solid-state drive (SSD), such as a MacBook Pro. It's almost instant, most of the time.
Comment: capture a hibernation/resume trace with xbootmgr and analyze what is slow: http://www.msfn.org/board/index.php?showtopic=140247
Comment: I use hibernate on my work laptop, but to speed it up I close all my apps first (using a small utility called closeall http://www.ntwind.com/software/utilities/close-all.html )
Answer: The main cause is disk I/O. Reading and writing to a physical disk is much slower than from RAM. When your computer resumes from disk (hibernation) it also has to power up the components which may cause some slowdown. This is highly dependent on the computer. A SSD will have almost the same resume speed from disk as from RAM. Some computers let you move the mouse around before the ram has been completely filled up again, causing low response times.
Note: Assume you have 8GB of RAM and a SSD with 400MB/s throughput.
It will still take 8*1024MB/400MB/s = 20.48s. This is not the same speed as resume from RAM.
Assuming a RAM throughput of 15,000MB/s, the resume time is 0.55 seconds.
Comment: `Reading and writing to a physical disk is much slower than from RAM.`   Yes, but reading is faster than writing, so why would it take so much longer to read the HDD than to write it?
Comment: @Synetech is it?  If you're just timing the hibernate from hitting the option to the screen blanking (as opposed to the drive activity stopping) the OS is probably blanking it early so it looks like it didn't stall.  If you are measuring shutdown via IO time there're a few possibilities.  With an SDD I'd check to see if the page file is fragmented because SSDs are faster on random writes than random reads.  Otherwise I'd speculate that dehibernate is slower due to delays in restarting some hardware components that were shut down not due to IO performance.
Comment: @DanNeely, actually I know what you mean. I have often been annoyed that when I click Hibernate, the screen quickly turns off, but the drive itself is still thrashing for quite some time (often a minute or two more). This is really annoying because you cannot just pick up a laptop and throw it in the bag since the drive is still spinning and moving it would increase the chances of a head-crash (standby is better for quick shutdown). However, I also know what enthrops is saying; sometimes a resume takes a long time (well Windows resume fairly quickly, but the HDD LED stays lit for a long time).
Comment: @Synetech yet another reason to wish SSDs were cheap enough to be universal.
Answer: It's a tradeoff. Do we pull everything that was in RAM before hibernation back from the disk into RAM all at once, or only a little bit at a time, as needed?
We all know that reading a sector from a spinning disk takes practically the same amount of time as writing that sector to the same spinning disk -- the seek + rotate time.
So we might expect that writing information from RAM to disk (on hibernate) would take about the same time as reading that same RAM from disk (resume from hibernate).
But it doesn't happen that way, because of demand paging.
If the OS pulled in everything at once, then resume from hibernate would take dozens of seconds, but after that it would act the same as if you had never hibernated at all.
OS programmers typically choose demand paging instead.
In other words, the OS pulls only a little bit at a time from disk, as needed.
That has the advantage that resume from hibernate takes much less time before it starts responding to the keyboard and mouseclicks.
On the other hand, when you use something for the first time after hibernation,
there's a small but noticeable delay when the OS finally gets around to loading it up.
That happens even when "the first time" you use something may be several minutes after the hibernate.
So after resuming from a hibernate (i.e., after you see a screen that appears to be more-or-less identical to the screen just before the hibernate), working with the machine may seem sluggish for a while.
As Synetech pointed out, there's a bit of human psychology also involved:
Because the screen turns off right away at the beginning of hibernation, it seems like it shuts down fast.
And the user can immediately go on with whatever else you wanted to do.
But after a resume from hibernation, the user is trying to do something, and the little delays are annoying because they get in the way of what the user is trying to do.
Answer: While RAM is very fast, the hard disk is the exact opposite. Imagine you have to copy your RAM contents, which might be about 16 GB, from the hard disk. That's 4 DVDs. See?
Answer: I know what you mean. It does indeed seem like the HDD LED flashes for a long time after resuming from hibernation.
Some reasonable explanations have been given about delays due to starting up hardware (and driver acceleration?) and fragmentation (you'll notice that a system fresh from the factory will generally hibernate and resume fairly quickly while one that has been used for some time will be much slower to do so). There are a couple of more explanations for this behavior.
When you hibernate, Windows flushes the RAM to the drive. Despite high speeds for reading RAM and writing to disk (even with a defragmented hibernation file on a big, empty drive), it still takes quite a while to write several gigabytes (you will notice that hibernating and resuming a system with small amounts of RAM is farily fast). The screen goes off quickly, but the drive (and motherboard, fans, etc.) all remain running for a while until it finishes flushing the RAM to disk. (Make sure not to throw a laptop with an HDD around until after it has finished and completely turned the drive off).
You can do some experimental tests to measure the time it takes from clicking Hibernate until the system is powered down, and the time it takes from the moment you see the Resuming Windows screen until the HDD LED stops flashing. They will likely be approximately equal. (Windows does attempt to make it seem like it resumes from hibernation very fast by writing and then reading the kernel and stuff to the hibernation file first, so that it can get back up and running immediately and then continues to load in the rest in the background and as needed until it has all been resumed—you can see this behavior in action because the login screen is shown very quickly.)
Why then does it seem like resuming takes longer. There's two explanations for this.

It's psychological. As Dan pointed out, because the screen turns off right away when you hibernate, it seems like it shuts down fast, while you see the entire resume process (opening screen and HDD LED flashing).
It's paging. Since most people use hibernate instead of shutdown because they want to avoid exiting programs and such so that they can pick up where they left off, it means that when Windows resumes, there are a bunch of programs already running and already consuming memory. Because a significant amount of time has passed since the last time that Windows' memory-manager checked on the system, it will likely end up doing a bunch of memory swapping since from its perspective, some programs have been dormant for a while and others have become active. This swapping of course takes a while and thrashes the drive for some time.

The end result is likely a combination of factors and interactions between hardware activation, paging, psychology, and fragmentation.
If you are up to it, you can definitively find out (at least on your system) what is the bottleneck by performing a few simple tests such as using Process Monitor to observe drive/file activity while Windows hibernates and resumes to see whether all that thrashing is due to access to hiberfil.sys or pagefile.sys.
Comment: i like the psychological approach. Hibernation on plain old hard drives is bad designed in a UX way, or it should never have existed.
Answer: If your processor is fast enough and you are using an SSD, then hibernation & reboot doesn't make any difference, may be slight unresponsiveness for few seconds if you are using a hard disk.
Simply close all the application before hibernating and you not experience any such issue, and even faster responsiveness than normal boot if you are using hard disk instead of SSD.
In fact, if you have more processes which needed to restarted, hibernation is much faster, as processes just need to be loaded from hard disk instead of restarting it.
Hibernation is always faster than restart if you have loaded your Windows file in a hard disk(not SSD) and you are using a low end processor like Intel Pentium.
I always did that to my old pc to reduce boot time significantly.
Answer: For Windows 10, I scheduled a task to periodically disable and re-enable hibernation mode. This re-generates the hibernation file and seems to fix the problem.
Commands to run periodically (in sequence):
powercfg -h off
powercfg -h on


Queue Cases Rerouting through Omni channel when Assigned to a User of Queue

Question: I am having an issue where cases are rerouted through omni channel when assigned to queue member.
example:
I have 3 queues configured in omni, when a case is assigned to 4th queue it is dropping of from queue backlog which is good but if i assign to any of the queue member from 4th queue it is re routing through omni again.
Answer: I would say that is happening because it once was a Work item, so in your changing its owner to another queue Omni considered it assigned still (as this queue does not have a Routing Configuration assigned, it acts as a User); then when you assigned it to another user, maybe their Presence status was Offline or Busy, and so it tries to route it again.
This assumes you are talking about a Case that was at one point routed in Omni, Ie. it became a Work item.
So I think that the solution would be to delete the AgentWork record. (this is mentioned in Sf help material as an option: "This object is never automatically deleted, but you can manually delete it when the State field is in a non-active state.")
Or, to not let the Case enter Omni in the first place.
I hope that gives you some ideas?
These are useful resources around this:
The Routing Lifecycle
Omni-Channel Reference


practice and discovery of Boost Type Erasure

Question: I am reading about boost type erasure and I am trying to figure out the potential usage. I would like to practice it a bit while I am reading tons of documentations about the topic (it looks a big one). The most quoted area of application that is networking / exchanging data between client and server.
Can you suggest some other example or exercise where I can play I bit with this library?
Comment: page 16ff of http://accu.org/var/uploads/journals/Overload116.pdf has an article about dyamic C++ using type erasure
Comment: I am reading it right now. Thanks for the suggestions.
Comment: I'd say for networking, classic runtime polymorphism is a more appropriate idiom than type erasure. Type erasure is great for handling deleters and allocators in `std::shared_ptr`, though.
Answer: Type Erasure is useful in an extraordinary amount of situations, to the point where it may actually be thought of as a fundamentally missing language feature that bridges generic and object oriented programming styles.
When we define a class in C++, what we are really defining is both a very specific type and a very specific interface, and that these two things do not necessarily need to be related. A type deals with the data, where as the interface deals with transformations on that data. Generic code, such as in the STL, doesn't care about type, it cares about interface: you can sort anything container or container-like sequence using std::sort, as long as it provides comparison and iterator interface.
Unfortunately, generic code in C++ requires compile time polymorphism: templates. This doesn't help with things which cannot be known until runtime, or things which require a uniform interface.
A simple example is this: how do you store a number of different types in a single container? The simplest mechanism would be to store all of the types in a void*, perhaps with some type information to distinguish them. Another way is to recognize all of these types have the same interface: retrieval. If we could make a single interface for retrieval, then specialize it for each type, then it would be as if part of the type had been erased.
any_iterator is another very useful reason to do this: if you need to iterate over a number of different containers with the same interface, you will need to erase the type of the container out of the type of the iterator. boost::any_range is a subtle enhancement of this, extending it from iterators to ranges, but the basic idea is the same.
In short, any time you need to go from multiple types with a similar interface to a single type with a single interface, you will need some form of type erasure. It is the runtime technique that equates compile time templates.
Comment: Both excellent resources, but I thought you might wish to know of the much more general need for type erasure, beyond `any` or `any_iterator` or `any_container`. Much as member function pointers only exist to implement delegates, it may be the case virtual functions exist primarily to allow type erasure. It's that fundamental of a concept.
Comment: Hi. In the meantime, for reference I've also read the following  from Thomas Becker
http://www.artima.com/cppsource/type_erasure.html
http://thbecker.net/free_software_utilities/type_erasure_for_cpp_iterators/any_iterator.html


Kaehler analogue of very ample line bundle

Question: In the correspondence between projective and Kaehler geometry an ample line bundle corresponds to a positive line bundle, where the latter requires that the curvature of the Chern connection is a positive $(1,1)$-form. A very ample is a strengthening of ample (no need to take powers). Is there a corresponding Kaehler notion, and in this case, is there a differential geometric proof that such a line bundle is generated by holomorphic sections?
Answer: J. P. Demailly, Multiplier ideal sheaves and analytic methods, p. 26, (3.15) A holomorphic line bundle $F$ over a compact complex manifold $X$ is
a) very ample if the map $\Phi_{|F|}\colon X \to \mathbb{P}^{N−1}$ associated to the complete linear system $|F| = \mathbb{P}(H^0(X,F))$ is a regular embedding (by this we mean in particular that the base locus is empty, i.e. $B_{|F|} = \emptyset$).
b) ample if some multiple $mF$, $m > 0$, is very ample.
By Example 3.14, every ample line bundle $F$ has a smooth hermitian metric with positive definite curvature form; indeed, if the linear system $|mF|$ gives an embedding in projective space, then we get a smooth hermitian metric on $F^{\otimes m}$, and the $m$-th root yields a metric on $F$ such that $(i/2\pi)Θ(F )=(1/m)\Phi^*_{|mF}\omega_{FS}$. Conversely, the Kodaira embedding theorem tells us that every positive line bundle $F$ is ample (see Exercise 5.14 for a straightforward analytic proof of the Kodaira embedding theorem).
Comment: So it's basically the same as in the algebraic case?
Comment: Yes. It is algebraic, because the Kodaira embedding theorem says that $X$ must be a smooth complex projective variety.
Answer: As Ben says, the complex-geometric version of an ample line bundle is a positive line bundle: A line bundle is ample if and only if it admits a positively curved Hermitian metric.
However, I'm not aware of a complex-geometric version of the notion of a very ample line bundle. That is, I don't know of a condition one can put on a positively curved metric on a line bundle that ensures that the morphism the global sections of the bundle define to projective space is an embedding.
Some such thing presumably exists, and can be dug out of some of the proofs of the Kodaira embedding theorem. One needs the annihilation of cohomology groups that obstruct the morphism to projective space from being an embedding; possibly one can find such a condition locally and use compactness to conclude that the condition can be satisfied globally on a manifold.
In conclusion, consider an elliptic curve $E$ and a point $p \in E$. The line bundle $\mathcal O_E(p)$ is ample, and thus positive. However, it has no nonzero global sections, as any such section would lift to a doubly-periodic entire function on $\mathbb C$ with a single pole, and no such thing exists by integration over the boundary of a fundamental parallelogram that contains the pole. How can we tell that this positive bundle does not define an embedding to projective space from just a positive metric on the bundle?
Comment: Yes, of course. The rest of your answer goes through. I was just pointing out a small mistake.
Comment: $\mathscr{O}_E(p)$ *has* a nonzero global section, which vanishes exactly at $p$ — with your identification, it corresponds to a constant function on $\mathbb{C}$.
Comment: Hmm... it's been a while so I may be confused. The point of talking about that line bundle was supposed to be that it's ample but not very ample, which I think is still the case modulo my confusion.


How to attach a virtual hard drive to occupy /dev/sdb?

Question: I want to insert a virtual hard drive (or anything) to occupy the system block /dev/sdb, how could I do that in Linux (Ubuntu and Debian)?
Comment: If you need a unchanging, static file system reference to a drive, you're better off using the device id
Answer: Create a file of the size you'd like this virtual hard drive to be (the following makes a 1Mx1024 or 1GByte file):
dd if=/dev/zero of=virtual_hard_drive.bin bs=1M count=1024
Create a loop device standing in place of /dev/sdb
mknod /dev/sdb b 7 500
No, this will not work if you already have a /dev/sdb there.
You'll need to change the 500 to another number in the extremely unlikely event you have a /dev/loop500.
Now, assign your file to this loop device
losetup /dev/sdb virtual_hard_drive.bin
So now you have a file acting as a hard drive, through Linux's loop device mechanism.  At this point you want to format it with mke2fs /dev/sdb or similar, and then mount it in the usual fashion.
To get this to work on boot will require some editing of boot time scripts as the scripts that check fstab won't make /dev/sdb into a loop device on boot by themselves.
If you don't really need a volume there, you can do something like ln -s /dev/sdb /dev/full to make /dev/sdb "point to" the full (or zero or null, or even dvdrom) virtual devices.
Comment: Hi, after the step mknod..., the /dev/ really contains a new virtual sdb file. However, in /sys/block/, a link named loop500 is created... How do I change this to "sdb"? thanks
Comment: Also, How do I take this virtual device off?
Comment: May have to use `ln` for the `/sys/block` if that's possible, i.e. try `ln -s /sys/block/sdb /sys/block/loop500` or similar.  To remove the loop, unmount it, then `losetup -d /dev/sdb`, then delete the device file you `mknod`ed.
Answer: If you want to use a raw disk image file you can use loopback devices to access it as a block device (like /dev/sdb).

Create an empty image: dd if=/dev/zero of=/path/to/the/image bs=1M count=10240
This will create an empty image of size 10 GiB.
Associate the image with a loop device: sudo losetup -f --show /path/to/the/image
This will print the used loop device. Let's say it is /dev/loop0.
Create partitions (and file systems): sudo gparted /dev/loop0
Move the original /dev/sdb: for a in /dev/sdb* ; do sudo mv "$a" "$a-orig" ; done
Copy loop devices in place of /dev/sdb:
l=/dev/loop0 ; d=/dev/sdb ; sudo cp -a "$l" "$d" ; for a in "$l"* ; do sudo cp -a "$a" "$d${a#$l}" ; done

After that you will have the disk image /path/to/the/image accessible as /dev/sdb including partitions.
Answer: Why do you specifically need it to be /dev/sdb? I think you need to explain why you want something to occupy that block device node, because you can't simply have something use it. If you have some software that wants to read /dev/sdb, you could just change the software.
In the worst case, you can use the SCSI debug host simulator. Simply do modprobe scsi_debug, and the defaults should provide a single SCSI device. Note that it won't explicitly be on /dev/sdb, but always the next available SCSI device.
Comment: This has to be the most useful thing i've found all week. Why did no one else mention SCSI debug simulator in my search for block device ramdisks?
Comment: @BradP. I'd call that a different need, one that I previously blogged about as well (depends on what properties you need, older options include mtdram, loop, newer high-performance is nvme loop target).
Answer: The solutions based on losetup given above don't create a SCSI block device, hence they don't create a /dev/sd* device node and some renaming or linking is required to create one, and some software may not find the device suitable since it's not using the SCSI subsystem.
It is possible to create a SCSI disk device that is backed by a partition or file using targetcli.  See http://linux-iscsi.org/wiki/Tcm_loop, and https://stackoverflow.com/questions/30972176/creating-a-loopback-device-in-lio-scsi-target which covers an issue with those instructions.  As with the SCSI debug host simulator suggested by @robbat2, this device will be assigned the next available identifier.
I gather that the SCSI debug host simulator is backed by RAM, so it is volatile.  With the method that I propose here, the data will actually be written to a partition or file.
Comment: Because the "target" subsystem is meant for exporting drives via iSCSI or FireWire, it should support file-backed (or at least loopdev-backed) devices just fine.


Where can I find a good classification for phase transitions?

Question: I'm having a hard time to find a good (and modern) classification scheme for phase transitions and related universality classes. Can someone recommend a paper/book/site? Detailed mathematical aspects are very much welcome.
Comment: Are you interested in experimental or theoretical results (note that rigorous results are very scarce)? Also, in what area? Phase transitions are used all over the physics.
Comment: What's happening to my comments?
Comment: Aha ! Now they're showing up. I´m a theoretical guy from disordered systems and interested in strongly correlated ones.
Comment: [Scaling and Renormalization in Statistical Physics](http://books.google.com/books?id=Wt804S9FjyAC&printsec=frontcover&dq=scaling+and+renormalization+in+statistical+physics&hl=en&src=bmrr&ei=-uxtTcH4Gsu4tgfU89zRBQ&sa=X&oi=book_result&ct=result&resnum=1&ved=0CCwQ6AEwAA#v=onepage&q&f=false) by Cardy.
Answer: The basic classification of phase transitions is into first and second order transitions. The former is characterized by having a nonzero latent heat, e.g. the liquid-vapor transition of $H_2 O$. Often one can adjust a thermodynamic parameter to construct a line of first order transitions and this line terminates at a critical point where there is a second order transition. Second order transitions are characterized by an infinite correlation length (in field theory terms the mass parameter goes to zero). Critical points are often studied using the tools of Conformal Field Theory. The critical exponents which govern behavior near the critical point depend on the universality class which often depends on the symmetry of the system. The Wikipedia page http://en.wikipedia.org/wiki/Phase_transition will give you a quick overview. I recall that the book "Modern Theory of Critical Phenomenon" by S. Ma has more detailed and pedagogical discussion of these matters.
Comment: I'm looking for smth deeper. Ma book and Wikipedia cover only a tiny fraction of the problem. They don't touch high order phase transitions, for example.
Comment: @David: Why are you modifying so many old post? They get bumped on top of the page.
Comment: @MBN: if you look at the edit histories you'll notice that all these posts' contents were deleted and replaced with a string of x's. I'm simply undoing the damage. Unfortunately there is no way to do so (as far as I know) without bumping them to the top of the page, if you are looking at the active questions view.
Answer: I am afraid that your question is too ambitious. It's almost like asking "where I can find a good resource of a theory of everything, including all emergent and complex phenomena in the world?". The question has many aspects.
Different physical systems have different numbers of different phases. In principle, there are infinitely many types of physical systems, so there are also infinitely many possible phase diagrams.
It is good to know a sufficient number of phase transitions - as well as their basic theories such as Landau's theory of second-order phase transitions - but it's hard to claim that one already knows "all of them" at a given moment - which is needed for claiming that they have been fully classified.
Incidentally, it's not always the case that the number of inequivalent phase transitions is increasing. Sometimes, it may be the other way around. For example, the AdS/CFT correspondence has shown that various phase transitions in gravitational theories - such as the Hawking-Page transition - are completely equivalent to some transitions in non-gravitational theories - such as the confinement/deconfinement transition.
This is the insight of the last decade or so. Similar insights are being added even today. The science of phase transitions hasn't been closed. Phase transitions are pretty generic properties of most physical systems - so whenever one learns new things about some physical systems, it's likely that one also learns something about some of their phase transitions.
Depending on what you really want, you may choose one of the books about phase transitions, e.g. from this list:
http://www.amazon.com/s/ref=nb_ss_b?url=search-alias%3Dstripbooks&field-keywords=Phase+transitions&x=0&y=0&tag=lubosmotlsref-20
Best wishes
Lubos
Comment: So, there is no general classification scheme? This is somewhat disturbing. People from critical phenomena try to enlarge the number of phases. On the other hand, FT guys do the opposite. Books don't agree on what a phase transition is. I'm still a little bit lost. A critical review would be very very nice! Anyway, thanks for the list!
Answer: If you already know something about phase transitions and universality classes and want to know what kind of phenomena are similar to each other, I would recommend the following article:
Géza Ódor, Universality classes in nonequilibrium lattice systems, REVIEWS OF MODERN PHYSICS, VOLUME 76, JULY 2004
This contains lots of different systems that can be (are) modeled with lattices (e.g. Ising, percolation and interface growth). The contents list is actually pretty good starting point for simple listed classification.
URL: http://link.aps.org/doi/10.1103/RevModPhys.76.663
DOI: 10.1103/RevModPhys.76.663
Answer: The classic multi-volume reference is Domb and Green, and although it is a little out of date, it is still pretty comprehensive.


COUNTIFS for Single Column Range but using Multiple Criteria

Question: I have a google sheet of 25k plus telephone records.  The sheet has the phone numbers broken down so I have a single column (Column L) that has all the area codes dialed.  I am trying to search that column for all the area codes from a single state which are listed in another column (Column O).  I have tried a couple of COUNTIFS based on web searches but all simply return 1 as the count instead of an expected 12,689.
I tried the following:
=COUNTIFS(L2:L25676,O2:O24)     The first range is the range of area codes, second is range of state area codes.
I also tried:
=COUNTIFS(L2:L25676,{"239","305","321","324","352","386","407","448","561","645","656","689","727","728","754","772","786","813","850","863","904","941","954"})
And this":
=SUM(COUNTIFS(L2:L25676,{"239","305","321","324","352","386","407","448","561","645","656","689","727","728","754","772","786","813","850","863","904","941","954"}))
Any and all advise is greatly appreciated.  I am certain at this point I am misusing the COUNTIFS function.
Comment: Welcome! Please try `=ArrayFormula(SUM(COUNTIF(L2:L,O2:O)))`
Answer: Try the filter(match()) pattern, like this:
=counta( iferror( filter(L2:L, match(L2:L, O2:O, 0)) ) )


Design backward and forward button operations of a browser

Question: If you were asked to design the backward and forward button operation (as a library) in a browser, how would you do it? What will be your APIs and parameters to them? what data structure will be best suitable for this usecase?
Comment: Interview? Assignment?
Comment: An interview question, I believe. Found it on the internet only.
Comment: There are several posts covering this. First, the theory is covered here: http://stackoverflow.com/questions/1313788/how-does-the-back-button-in-a-web-browser-work and implementation suggestions are here:http://stackoverflow.com/questions/6815797/datastructure-behind-browsing-history
Answer: Simplest solution would be to use two stacks (back, forward).
Clicking the back button will pop from the back stack and push the current page on the forward stack (and go to the popped value on the back stack).
Clicking on any link on a page (following a link) will clear the forward stack and push the current page on the back stack.
Clicking on the forward button will pop from the forward stack and push the current page on the back stack (and go to the popped value on the forward stack).
The back and forward buttons are disabled when the appropriate stack is empty.
Comment: I also thought so! how about using a doubly linked list instead? or a XOR linked list? Would a doubly linked list be better option than using two stacks?
Comment: All navigation is unidirectional, so a double-linked list would not be necessary. XOR lists are a nice optimization when you live in the 80's. Two stacks are simple to understand, debug and communicates the idea of a history API the best.
Comment: Do we need to create separate stacks for separate tabs/windows? or can we do it using a pair of stacks only?
Comment: This architecture is excellent for this task.  Took my < 1hr to build this into a project from scratch.
Answer: I would use an array containing urls, with a variable storing the length and an index pointing to the current item being displayed.
Back decrements the index, Forward increments the index. New page increments the index, stores the url at that place in the array and sets the length to the index value.
When the array is full, I would either use a realloc() for requesting more memory or implement a ring access to the array, depending on the memory constraints.
Comment: @Falcon I know stack based solution is universal but I don't find a problem with mouviciel's impl too. Can you shed some more light on "much better suited"?
Comment: Ok! how will you handle a case when user clicks on any link on a page ?
Comment: @KevindraSingh - This case belongs to the 'new page' feature of my implementation.
Comment: Yes I understand, but what if the next indexes are already occupied in your array. You would need to clear the rest of the array. Right?
Comment: @KevindraSingh - No, the length variable is enough to inform what data is valid in the array.
Comment: A stack-based solution is much better suited for this problem,


Is it really that simple to make dimethylmercury?

Question: I was reading about methyl iodide and I saw a warning to not let it come into contact with sodium amalgam or it will create dimethylmercury. I'm wondering if that's really all that it takes to create such a dangerous substance. Does simply dropping sodium mercury amalgam into a container and then pouring in some methyl iodide create dimethylmercury? I'm not really sure if these chemicals would ever need to be around each other, so I don't think an accident is super likely, but it's still kind of crazy to me.
Comment: Yes it really is that easy
Comment: $\ce{Hg + 2 Na + 2 CH3I -> 2 NaI + (CH3)2Hg}$ seems quite straightforward to me. Similar reaction was used to make $\ce{(CH3CH2)4Pb}$ for gasoline, before the lead-free one.
Comment: Dimethylmercury is very toxic. [Read about Karen Wetterhahn](https://cen.acs.org/safety/lab-safety/25-years-Karen-Wetterhahn-died-dimethylmercury-poisoning/100/i21)
Comment: You seem to have a wrong perspective on dangerous substances. Yes they are very easy to come by, they are all around us, they are more common than the opposite. The Nature is not friendly to us.
Answer: Yes, it is. However, it is not crazy since these precursors are not something easily obtainable directly from nature.
https://en.wikipedia.org/wiki/Sodium#Commercial_production
This illustrates the fact that sodium itself is not that simple to find, the final step in the creation of dimethylmercury is very easy, but fortunately there are some obstacles before that, which prevent accidents.
Answer: Yes, dimethylmercury is that easy. Roughly speaking, sodium amalgam is mercury endowed with excess electrons from the electropositive sodium, and methyl iodide (an electrophile) can react with the excess electrons and the mercury atoms to form dimethylmercury. The iodide ions displaced by this reduction end up precipitated from the mercury as sodium iodide.
Dimethylmercury is especially dangerous as mercury sources go because it is much more easily absorbed through the skin or inhaled than elemental mercury or inorganic mercury compounds.
The good news is there is not a lot of sodium amalgam in nature. The bad news is that there are plenty of natural processes for forming dimethylmercury; see for instance Jonsson et al[1].
Reference

Jonsson, S., Mazrui, N. & Mason, R. Dimethylmercury Formation Mediated by Inorganic and Organic Reduced Sulfur Surfaces. Sci Rep 6, 27958 (2016). https://doi.org/10.1038/srep27958
Comment: How quick is that reaction? If someone spills one on the other can it be cleaned up fast? Or should one assume its been created and treat it as worst case scenario?


How do I transfer Comments from one Facebook App ID to Another?

Question: Is there any way to transfer comments from a "deleted" Facebook app (that is still receiving comments) to a new app id? The app was deleted by accident quite some time ago but we now have thousands of comments that have been entered using it. I'm afraid I will lose all of the comments if I simply switch to a new app. The app id seems to function just fine with the commenting mechanism, but I can't manage it or use it in any other way.
Answer: AFAIK, there is no automated way of doing this. However, you can read them programatically from your deleted app (provided you have the permissions) and then post it again on your new app.
You can get the original app's feed using the following (PHP) code:
<code>$response=file_get_contents("https://graph.facebook.com/".$id."/feed&access_token=".$facebook_access_token);
$response_array=json_decode($response,true);
// $id: ID of the page where the comments are
</code>
You can also customize this query by adding pagination parameters like since,limit,until etc. Please refer to https://developers.facebook.com/docs/reference/api/ for documentation.
And can be reposted to your app by HTTP POSTing to the same URL. See https://developers.facebook.com/docs/reference/api/page/#posts for details.
Please understand that you can't post as the original author - so you can only post the text and perhaps manually add the context of the original author. so i.e:
"Shreeni: 'This is a cool app' "
will have to become
"App: 'Shreeni said: 'This is a cool app' ' "


how to do chi square test

Question: I am new to stats and I need to compare two groups of count data.  I have two groups of participants who did X a number of times (out of 90 possible times).  Group A did X 59 out of 90 times and Group B did X 74 out of 90 times.  How do I set up the table to know if there is a significant difference between the two groups?  Thank you in advance!
Comment: Is the question of interest specifically about B doing *more* - a one-tailed hypothesis - or is that wording just a resulting of it being higher in the observed data and the underlying question is really just about a difference?
Comment: The underlying question is only whether there is a significant difference or not.  Sorry-my wording was unclear.
Comment: Could you edit the question to clarify it? It's best if clarifications aren't only in the comments.
Answer: Welcome to the Cross Validated!
You can perform a Pearson's chi-square test as follows:
${\chi}^{2} = \sum \frac{(O - E)^2}{E}$
Where E is a set of expected values in a contingency table and O is the set of observed values (e.g. those in your question: 59, 31, 74, 16).
Your contingency table is then:
59 | 74
31 | 16
The expected values are calculated by the sum of the column (e.g. for the first column (59 + 31) divided by the total number of observations (n = 180 in your case), multiplied by the sum of the row (e.g. for the first row - 59 + 74).
Once you have these expected values, use the equation above to calculate the chi-square value.
In words, you take the observed value of a cell, minus the expected value of that cell, square that number and then divide by the expected value of that cell. Then sum all the values that you get from doing this for each cell.
With your newly calculated chi-square value, use a table of critical values of the chi-square distribution to assess whether there is a significant difference.
You will need to know the 'degrees of freedom' to be able to use this table. df = number of rows minus 1, then multiplied by the number of columns minus 1.
Comment: Thank you so much!  This is very clear.  One question though...should that be 16 instead of 26?  The top figure plus the bottom figure should equal 90 (total observations), is that correct?
Comment: Yes. Corrected in the text.
Answer: It is helpful to use software to conduct a chi-square test of association.
One option is to use an online calculator.  For example, this one.  It provides the chi-square test result with p-value and Cramér's V as a measure of effect size.
Note that in this calculator, for a 2 x 2 table, by default it reports the chi-square and p- values with a Yate's continuity correction. (And gives you the uncorrected values in a separate box).  In general it is important to understand what assumptions or corrections a piece of software uses by default for a given analysis.
As another alternative, the following code could be run in R.  You can install R for free on your computer, or use an online editor like JDoodle.  The code will produce the corrected and uncorrect chi-square test, and produce Cramer's V.
<code>Matrix = matrix(c(59, 31, 74, 16), nrow=2)

Matrix

chisq.test(Matrix)

chisq.test(Matrix, correct=FALSE)

Cramer = sqrt(chisq.test(Matrix, correct=FALSE)$statistic/sum(Matrix)/(min(nrow(Matrix), ncol(Matrix))-1))

names(Cramer) = "Cramer's V"

Cramer
</code>
Finally, it is helpful to read-up on tests and alternatives.  To get started, I might recommend The Handbook of Biological Statistics or Summary and Analysis of Extension Program Evaluation in R.

how to do chi square test


How to attach insulation to Hot End

Question: I bought some heating block cotton to insulate the exposed surface of my hot end.  I thought the yellow as double-sticky but it appears to be Kapton.
What can I use to attach it to the extruder?

My extruder is already covered on four sides.  I want to cover the other two.
Answer: Kapton tape would be the logical material. It's unfortunate that your vendor did not supply that as a separate item, rather than sticking it to the "cotton" (I'm guessing not actually cotton, as things might get a bit scorching for cotton, so I'm assuming some type of ceramic fiber or the like.)
Comment: "heating block cotton" is just the common name, the insulation is made of ceramic fiber.  I suspect the pieces are intended to replace the existing material.  I was wanting to try to use it to insulate the other two sides.
Comment: So, cut/punch a hole in a chunk for the filament input tube, stick it over the top, wrap it the "other" way (you may also have to make cutouts for various wires not illustrated...) and kapton-tape the flaps to the bottom after wrapping the ends. That will get you a double-layer on top. Or cut small chunks just to cover the ends and kapton-tape them to the top, bottom and sides, but if you have adequate material to go over the top twice, why not?
Comment: So, make a slit from an edge to the hole (and to any other holes needed for wires) so you can get it on without disassembling. If need be you can tape those up.
Comment: I am considering that; but, that might require disassembling the extruder which I am not sure is worth the effort.
Answer: Not quite the answer to the question but closely related, so I venture. I use ordinary wool thread to insulate the hot end. I just wrap it carefully so it is covered everywhere. Very low cost, very effective. Wool can handle even the hottest extrusion temperatures easily.

How to attach insulation to Hot End


Expanding an event group shows more events than labeled when there are new events

Question: I have six upvotes for the one question with no intervening history. They have been summarised into two groups - one with 4 events and one with 2 events. However, when you expand either, both show all 6 events. Minor I know, just letting you know.
Comment: Right now there is only one group item covering all 6 so it no longer presents in the same way.
Comment: This still has not been fixed and @Rory it does not go away with a refresh/cache clear for me.
Comment: Can you reproduce it *now*? This was reported several times, it is because of the asynchronous loading of the content...at least in 99% of the time.
Comment: Yeah.  After you expand a highlighted group of new votes on a certain post, when you reload the page, the new group merges with the older group.
Comment: I've had this before, it always disappeared on a refresh?
Comment: It also happens when there are seperate events which aren't normally included in the sub-list like removals... http://meta.stackexchange.com/questions/193405/removed-points-are-listed-twice-in-rep-summaries
Comment: For what it's worth, this is still occurring.
Comment: Yeah, [I still have this bug as of today](http://i.stack.imgur.com/7FriF.png), so I guess it's been around for years without a fix.
Comment: One serious aspect of this issue is that if you switch between time/post mode, you get a timestamp in the URL, and at that point it doesn't matter if you refresh the page.
Comment: Reproduced again today on video.SE. See [snapshot](https://i.stack.imgur.com/BVt11.jpg) and [updated answer](http://meta.stackexchange.com/a/221220/212646).
Comment: I ran into this today too: https://i.snag.gy/rGoyFJ.jpg. Followed a nice chain of dupe links to this report.
Answer: I've confirmed/reproduced the issue behind this. It is as I said. When you have new and old events on the same post in your history (only tested for the same day as well), both of them will expand to show the full list of all events for the post, rather than being limited to the new and old events as they're split up.

They must have made a change somewhere that caused this to start happening, because it didn't used to do this previously.
Comment: [Yet another repro](https://meta.stackexchange.com/questions/297101/incorrect-grouping-duplication-of-rep-events-when-unfolded?noredirect=1#comment963905_297101)
Comment: [still on in 2020](https://meta.stackexchange.com/q/351006/178179)
Comment: I reproduced this in 2014, and again today. See my post below.
Comment: Reproduced this bug again today. [See my post](http://meta.stackexchange.com/a/221220/212646).
Comment: [Reproduced this today as well.](http://meta.stackexchange.com/questions/139091/expanding-an-event-group-shows-more-events-than-labeled-when-there-are-new-event#comment944224_139091)
Comment: Still not fixed https://meta.stackexchange.com/q/323538/260198
Comment: This bug still prevails for me today.
Answer: The below is what I saw just a few minutes ago (And have seen similar on quite a few occasions in the past). A couple of minutes later it has merged into one drop down with a correct total rep count.
I see Sulfurized Demonbobby comment above about the asynchronous nature of the updates, which I can understand if it was a a short while (a few minutes ago), but think it is unreasonable to have inaccurate counts (5 + 5 + 5 is 15, not 10) some 25 mins after the event took place.
Answer: February, 2016 2017 and this bug is still scurrying about. It's not a big bug, but at least let us know if you're going to address it or not.

Most recent reproduction, found on video.stackexchange.com:

Blues and Reds should add up to each other. Greens are WTF.

Here is the Feb 2016 iteration:

On that post, I received 3 upvotes and 9 downvotes. You can see that the blue brackets are the same events, not different events, and the red stars list what's new, but appear to be incorrectly added because all events for the day are listed below, instead of just the new ones.

I reproduced this recently as well. I made a different meta post, however, because I did not see this one first. The snapshot below is color coded to show where confusion might occur because of this. It did right itself about an hour later.
Comment: Some people who vote on meta are just stupid. The question is tagged as a bug, and it obviously is, and there is no response by se staff for over a year. My post proves that it is still happening and bumps this to the front page so people can see it again. Why would you downvote?
Answer: I have just seen this issue... in fact it appears to have two distinct symptoms which appear in the UI:

one of which could be considered an enhancement-request, as whilst the data displayed is not incorrect, it could be formatted better, and;
the other could be considered a bug as it shows incorrect data

Here is the reputation with the unexpanded event - no actual error shown, except that it could be considered a UI enhancement-request as the reputation changes are not all contained under one expandable line, and it would be more aesthetically pleasing if they were:

Here is the event expanded - this is the bug as it would suggest a reputation change of 11 rather than 6:

Finally, after the page was refreshed, both issues appear to be, and indeed are, resolved:

NOTE: I was going to post this as a question, but then realised that it would have been a duplicate (not that it matters that much) of this question and Incorrect grouping/duplication of rep events when unfolded, when I saw that other people had posted similar experiences as answers, then I reasoned that I would do the same. I hope that was the correct thing to do - I've never raised an issue as an answer before and it seems rather counter-intuitive.
Answer: This OCD triggering bug still prevails!
Comment: If you are an OCD sufferer, then I feel your pain and I hope you have sufficient support mechanisms to manage it. But if not, would you please consider amending your answer as it may been seen as belittling a serious and debilitating mental health condition. May I suggest "This annoying bug" instead?


Rails STI - Prevent base class from instantiation

Question: Is there any way in a Rails STI situation to throw an error when the base class is Instantiated? Overriding initialize will do it but then that gets trickled down to the subclasses.
Thanks
Answer: The answer by John Topley is actually wrong. Setting abstract_class = true in the base class will actually cause the child classes to stop setting their type automatically. Plus, unless you set_table_name in the base class, the child classes will complain their table does not exist.
This is because the purpose of abstract_class=true is to set up inheritance when you are NOT using STI, and want to  have an abstract class (class not backed by a db table) in your class hierarchy between ActiveRecord::Base and one or more model classes.
Having initialize raise is one solution, also adding validates_presence_of :type to the base class is a solution.
Note if you DO override initialize, you need to call super:
def initialize(*args)
  raise "Cannot directly instantiate an AbstractUser" if self.class == AbstractUser
  super
end

Answer: You can try this:
class BaseClass
  def initialize
    raise "BaseClass cannot be initialized" if self.class == BaseClass
  end
end

class ChildClass
end

the result will be:
a = BaseClass.new  # Runtime Error
b = ChildClass.new # Ok

Hope that helps
Comment: Since BaseClass will probably descend from ActiveRecord::Base, initialize should probably call super.
Answer: I often prefer to simply make the new class method private with:
class Base
  private_class_method :new
end

This way accidental instantiation of the Base class triggers an error, but it's still possible to instantiate it with Base.send(:new) to write tests for the Base class.
Answer: even better than validating the presence is validating against the known list of accepted non abstract class types
  validates :type, :inclusion=> { :in => ["A", "B", "C"] }

because if you validate just for presence an "evil developer" can still pass in the abstract class name as the type parameter.
Answer: In the initialize function check that the class is the STI base class.
Though the question is why would you exactly want to do this? It seems more likely that trying out a different design might help you more.
Answer: You can do self.abstract_class = true in the base class to tell ActiveRecord that it's an abstract class.
Comment: This stops the table_name from being inherited, so not a great solution


Reconciling Understanding of Quantum Entanglement and Superposition

Question: My basic understanding is that Superposition is a property of particles that allow them to behave as if they are in multiple states simultaneously, e.g., interference patterns in double-slit experiment. Quantum Entanglement means that if I measure a state of one of two entangled particles, I can know the corresponding state in the other. So, that begs the question: If Alice and Bob produces two buckets of entangled photons, A and B, and Bob takes bucket B and measures each of them, then Alice takes bucket A and performs a double slit experiment with them, will Alice still get interference patterns? In other words, can the particles still behave as if in a Superposition even if I know the state of each one?
Answer: This is an extreme oversimplification:

Quantum Entanglement means that if I measure a state of one of two entangled particles, I can know the corresponding state in the other.

There are many types of entanglement (or, more specifically, pairs particles can show entanglement on many different degrees of freedom), but generally speaking entanglement is a property that shows up as a kind of correlation between the two particles. For entangled particles, experiments on either of the two particles will not show any interference properties at all, and it is only once you collate results with what the other particle produced that you can obtain interesting stuff from the correlations.
Once you do collate the results, though, what you get will depend on what kind of measurement you did on each of the two particles. Generally speaking, if the measurement on B provides you with enough information to infer (via correlations on the later analysis) which slit in a double-slit experiment the A particle went through, then you will be completely unable to recover any interference in the post-slits pattern. However, there are measurements on B that can reverse this decoherence (normally known as quantum eraser experiments) where the measurement on B is incompatible (in the technical sense) with any which-slit measurement, in which case post-selection on that measurement can reveal interference patterns within the data in A.
Answer: In the usual case, the polarisation state of the photons will be entangled whereas a double-slit experiment is agnostic to polarisation. So in that most common case, Alice will still see interference patterns. However if you were to install a polariser on one of the slit, depending on the setup, you could make the interference disappear. Take this with a grain of salt: this is just to convey the gist of it as the devil is in the details.
Answer: Great question indeed.
Well, this whole topic is speculative as there can be many assumptions and uncertainties. Therefore, to avoid tangential comments from Q guards, I will take a specific scenario from your question.
Suppose the entanglement/state involves perfect anti correlation between the two particles of a pair.
Suppose the setup is such that Alice is on one side of the source and double slit is on the other side (Bob side) of the source.
Suppose Alice measures her side of the photon, just a moment before the Bob side photon enters the double slit. That moment is small enough for light speed to not being able to communicate from Alice to Bob side.
Suppose numerous entangled pairs are sent one by one in this setup.
Now per various current theories, the entanglement will be broken instantaneously on Alice's measurement.
One such theory/interpretation is that the wave function collapses. Let us consider this interpretation.
So, as the wave function collapses before the Bob side photon hits the double slit, it should not behave as a wave and there should be no interference pattern. Because the interference pattern is caused by wave nature, which has collapsed.
This setup can be used to investigate the truth behind nature of entanglement - i.e. whether the two photons are indeed a single system or not.
Obviously, depending upon whether the interference is observed in such an experiment, folks can argue that the wave function that collapsed on Alice's measurement is only the one that ties the two particles into a single system and the wave function that causes interference is a different wave function and survives the collapse of entanglement wave. However, both wave functions appear to follow same math, so I would think it should be same and the one wave.
Again, great question, and a great scenario for investigating truth of entanglement.


Using MS SQL Server Analysis Services to create cubes on hierarchical data

Question: I have a hierarchy, like an ProductDimension hierarchy.  Currently, I query this table using the Nested Sets methodology.  I write the usual star-schema joins to get a time-series report of groups of Products (Batches, CountryOfOrigin, ProductLine, etc.).
I'm currently investigating using SSAS cubes- but can a cube model this?
Are there any resources that would help with the creation of a cube based on hierarchies?
Answer: Sounds like a good use for a parent-child relationship in a dimension?
Like the standard Employee dimension, where each employee is 'beneath' their boss in the hierarchy. A quick example is here: http://technet.microsoft.com/en-us/library/ms174846.aspx

In this dimension table, the
  ParentOrganizationKey column has a
  foreign key relationship with the
  OrganizationKey primary key column. In
  other words, each record in this table
  can be related through a parent-child
  relationship with another record in
  the table. This kind of self-join is
  generally used to represent
  organization entity data, such as the
  management structure of employees in a
  department.


compizconfig-settings-manager: command not found

Question: When I start compizconfig-settings-manager, I get the message command not found, but apt-get says that it is installed.
Searching for the reason, I found that compizconfig-settings-manager was updated in the last system update, the log says "compizconfig-settings-manager:amd64 (0.9.5.92-0ubuntu3, 0.9.8+bzr3287-0linaro3)". There (and also in many other entries) appears this linaro, which seems to be the problem. Because few days ago, I added a repository:
sudo add-apt-repository ppa:linaro-maintainers/overlay

Now I wanted to remove it with
sudo add-apt-repository -r ppa:linaro-maintainers/overlay

But it failed with the message (no module named Linaro). I found another way to remove this repository: I deleted the file for this repository in /etc/apt/sources.list.d/
I thought now I could just make a system update to get back the old packages, but the update manager says that all my packages are the newest version. So how can I get rid of those linaro-packages?
Answer: Two commands - one to add the PPA - the other to revert back to official packages and to remove it again:
sudo add-apt-repository ppa:linaro-maintainers/overlay
sudo ppa-purge ppa:linaro-maintainers/overlay


How to save the state of a Live CD into a .iso?

Question: I would like to create an Ubuntu Flavor with custom settings and packages.
I think a simple way of doing it would be to just boot Ubuntu from an USB, modify settings un/install packages and save the state of the OS into a .iso that can later be written into a drive and booted with my modifications kept.
But how do I save the state of a Live CD into a file?
Answer: I think what you are looking for is Persistent Storage:
LiveUsbPendrivePersistent


Is it time to replace the battery?

Question: When I let my car idle over the night the battery voltage is around 12.2v and after running it's around 12.5v, and charging voltage is around 14-14.2v, i thought the monoblock amp which i connected was causing the drain over the night and to test this i disconnected the amp and rechecked and this time voltage was around 12.3v, and another thing is when i turn off the engine at stop signal the horn sounds weak and even after starting the car the horn still sounds weak for about good 1-3 seconds and sometimes power steering motor doesn't work about 3-4 seconds soon after i start, i don't know if it's the battery or something else which is causing the issue ? Or is it time to replace the battery for a new one ? But car starts fine and it takes around 1-2 seconds to start the engine.
Comment: At what temperature did you measure those voltages? Battery temperature affects its open-circuit voltage.
Comment: How old is the battery?
Comment: Battery is around 2yrs 8months old and i measured these volatges after an hour of turning the engine off
Answer: According to these charts: https://footprinthero.com/lead-acid-battery-voltage-charts
...12.2v, the lowest voltage you measured, corresponds to more than 60% of charge left (I'm assuming this measurement was made at rest). These voltages are at room temperature. Now obviously, if there's nothing you can do to increase the 12.2v voltage, not even a long drive with all high power draws like your amplifier turned off, you may have a problematic battery.
Based on these, there could be some other explanation for the phenomena you have observed, but it could be that the battery is nearing the end of its life.
If you turn off the engine at a stoplight, but there's lots of accessory draw, it's possible the battery voltage sags, and therefore the power steering and/or horn can be weak. If you now turn on the engine again, it may take some time until the alternator is capable of pulling the voltage up high enough for power steering and/or horn to work.
It would be interesting to hear what's the system voltage when you have accessories on, but engine off, at the time when the horn is weak and the power steering doesn't work well.
It is possible that the battery is nearing its end of life (which might explain voltage sag), but it's also possible that you simply have too much power draw in your car. You mentioned an amplifier (presumably aftermarket one). Are you sure it isn't drawing too much power when it's on?
I would further diagnose the issue by disconnecting the amplifier, and measuring voltage right at the moment when engine is stopped and thus the horn is weak and power steering doesn't work well. You may also want to buy a clamp ammeter and measure the power consumption of the amplifier by encircling the positive or negative wire going to the amplifier by the ammeter clamp.
If your amplifier is power-hungry and you often use it when the engine is off, you may benefit from a higher quality battery, like a battery that provides more current -- not made of flat plate cells, but made of spiral cells, and that doesn't dislike deep discharge (starter batteries are notoriously bad when used in deep cycle use, but for example AGM batteries aren't generally as easily damaged by sometimes deep cycling).
Comment: Alternator voltage at idle may not be accurate. It's a reference. Output varies between 13v-15v, 14.5v measured above idle rpm where output ramps up. Idle rpm is the lowest output, barely recharging batteries. Long idling periods may not recharge a battery and any amp simply drains the battery with little recharging occurring at idle. Measure battery/alternator voltage above idle. If voltage doesn't go above 14v, either the battery is on its last legs or the alternator is faulty. Most auto stores like Autozone provide free battery and alternator testing whether in vehicle or bench testing.
Comment: To test this i did check the volatge again after i disconnected the amplifier and it's a mono class D one providing 300w to the sub, i am thinking of testing it with a spare battery from a shop and then i will get a new one, also when the amp is one volatge drops to 12-12.1 if i add headlights to this equation then voltage is around 11.8-11.9v and yes i did check the voltages when engine is idle and after is cooled down.

Is it time to replace the battery?


Add new details to confirmed order in backend using a form?

Question: I want user's specific measurement for product. So once order is placed, we will send a confirmation mail with a link of form. When user will open that link, a form will open. In that form user can fill the measurements form field. And i want to save those details from form into Order details So in backend these details will be added with order details. So is there any extension or solution for this?
Thanks
Comment: have tried the solution ?
Answer: Obviously, you can do this but there is no ready made extension available for the exact requirement.
So Create a new Extension, with sql setup file like :
<?php
$installer = $this;
$installer->startSetup();

$installer->addAttribute("order", "form_field1", array("type"=>"varchar"));
$installer->addAttribute("quote", "form_field1", array("type"=>"varchar"));

$installer->addAttribute("order", "form_field2", array("type"=>"varchar"));
$installer->addAttribute("quote", "form_field2", array("type"=>"varchar"));

$installer->addAttribute("order", "form_field3", array("type"=>"varchar"));
$installer->addAttribute("quote", "form_field4", array("type"=>"varchar"));

//...
//Add all form fields that customers are going to fill after order is placed from that Email link

$installer->endSetup();
?>

This will add new columns like form_field1, form_field2, etc... to sales_flat_order and sales_flat_quote tables. These tables are responsible for storing all Order data/attributes. Now we are going to add values to these columns/fields.
Add all fields that you want to save from that Form.
Now, In that form's post action, you can load Order and Save these fields, like:
<?php
//load by order_id
$order = Mage::getModel('sales/order')->load(ORDER_ID);

//OR load by Increment Id
//$order = Mage::getModel('sales/order')->loadByIncrementId(ORDER_Increment_Id);

$order->setFormField1("POSTED VALUE HERE");
$order->setFormField2("POSTED VALUE HERE");
//....
// Set all field here

//Updating Order by form fields
$order->save();
?>

This will SAVE all form data to the appropriate order.
Now, for Showing these data to Order edit page in admin, follow this tutorial. You can edit custom.phtml to format the view of that fields.
Hope this helps to get the Idea for whole process


Can I undo overwritten files?

Question: I accidentally overwrote a blend file. I was making a small thing and instead of opening something else I saved new small unimportant file over one of my biggest projects. Can someone help me please?
Answer: I already know the awnser! You just go to files to open one. Then by the filters you check the one next to the blender logo. then you click the .blend1 version of your file. save it as the file how it was before and you're done!

Can I undo overwritten files?


How to list publication in special issue dedicated to a conference in a CV?

Question: I have presented in conferences A and B. The work presented in A is published in the conference proceedings (in case it is relevant, it is indexed by IEEE), and the work presented in B is published in a special issue dedicated to conference B. My CV has sections for conferences and articles. Is it the norm to include both publications in the article section and then rewrite them again in the conferences section (in each case, the talk and the paper have the same title)? If not, how should I do it?
Comment: How similar are the two?
Answer: Put your articles in articles section, and presentations in presentations section
For a publication that comes out of a conference talk, it is legitimate to list it in the appropriate part of your articles section, and also list the conference talk in your conference presentations section.  So as not to conflate the two, make sure that the latter section is clearly about conference presentations rather than conference publications and reference the presentations by conference title, location, date, etc.  So long as you are clear on the distinction between published articles and presentations relating to those articles, there should not be any confusion.
Comment: And the same applies to conference proceedings, right? Another question: Can I list a conference presentation if I didn't attend the conference but my work is presented by another author? Do I have to distinguish between the presentations that I gave and those that others gave?
Comment: I meant I am an author of the work, just didn't attend the conference myself
Answer: You can list both if you do so with some care.
For two things that are essentially the same, you can list one, followed by "Also published as..." giving the second reference.
If one extends the other you can list the more complete one, followed by "Preliminary version published as...".
There are other variations, of course, but if you link them, giving any distinctions, you should be fine.
Only treating them in a CV as independent when they are not would be an ethical issue.
Comment: I think my wording may cause some confusion. Essentially, I have two researches 1 and 2. Research 1 is presented in conference A and published in the proceedings of conference A. Research 2 is presented in conference B and published in a special issue dedicated to conference B. The talk and the paper in each case are essentially the same.


How to override country drop-down in checkout page magento 2?

Question: I want to override country drop-down in custom checkout page. In further i want to add my custom function on change of country drop-down.
Answer: Provide information to get help: what custom checkout is? is there custom theme installed and used? What other module are enabled?
It work in default by changing vendor/magento/module-checkout/view/frontend/layout/checkout_index_index.xml in theme/module and additional js file need to be added as ui_component.
Comment: I am working in my custom module for checkout. In my custom module i want to update shipping method on change event of country drop-down changed. So from where in default magento shipping method updated on change of country drop-down. So i can over write that file in my module.


When is transform width in code not equal to the transform width in inspector?

Question: I've come across a strange case in Unity's UI where the width of a RectTransform isn't the same as what is being reported. I have a transform which is 50 by 50 with no scaling, it is a root object of the canvas yet when I use the information that I get from the transform in code to draw from the bottom left edge of the transform to the top right it doesn't reach all the way!

Gizmos.color = Color.red;
Vector2 pos = new Vector2(transform.position.x, transform.position.y);
Gizmos.DrawLine(pos - transform.sizeDelta, pos + transform.sizeDelta);

Vector3[] corners = new Vector3[4];
transform.GetWorldCorners(corners);

Gizmos.color = Color.magenta;
Gizmos.DrawLine(corners[3], corners[0]);
Gizmos.DrawLine(corners[0], corners[1]);
Gizmos.DrawLine(corners[1], corners[2]);
Gizmos.DrawLine(corners[2], corners[3]);

The first section should draw a line from the bottom left to the top right according to what the transform reports are the width and height however they don't reach across the entire transform. Using GetWorldCorners the actual corners can be found and drawn around, with that data you can extract that the actual width is 60 (150.2 - 30.2 = 120 / 2 = 60)!
Why? Is this a bug or an I missing something obvious here?
Answer: This is because RectTransform.sizedelta only query the width and height values with no scaling applyed. You most likely have scaling from your canvas or a parent game object.

Tested in Unity 5.6.1f1


If graphite's just a huge polymer of benzene why isn't it an aromatic compound (polymer?)

Question: My teacher had once told me that graphite was just an insanely huge polymer of benzene (Those weren't his exact words but the gist). Today While we were studying aromaticity in organic compounds we steadily advanced from benzene to napthalene the annulenes and so on. What really stuck me was how as the number of  benzene rings increased the stuff tended towards graphite (atleast thats what the structure seemed to indicate). So the main question is why isn't graphite aromatic if its just a big collection of benzene molecules
Answer: Graphite/graphene is aromatic. The first image below is a common crystallographic representation of graphite and does not account for covalent bonding.  The second one shows the molecular structure of graphite as a kekule representation. Graphite is made of planar sheets of carbon atoms in 6-atoms rings with conjugated double bonds. This also satisfies the 4n+2 π electrons criteria needed within the aromatic ring for graphite to be aromatic. This aromaticity is why graphite is not only stable to high temperatures but also a more thermodynamically favorable allotrope than diamond under typical conditions.

Crystallogrphic Representation of Graphite.

Kekule Representation of Graphite.
Comment: `+1` (possibly helpful http://ion.chem.usu.edu/~boldyrev/graphene.php) and so I've just asked [How is the aromaticity in graphene different from the aromaticity in benzene?](https://chemistry.stackexchange.com/q/115218/16035)
Comment: +1. To OP: I copy a comment from the thread mentioned by uhoh. Indeed related arguments. Benzene is one cycle, no other cores have the same aromaticity. "I might be too naive but at the end it means that while in benzene there is a sextet delocalised in a ring, in graphene the delocalisation over the neighbours results in just two pi electrons delocalised but pinned onto a single ring. The other are described by extended orbitals and are those responsible for the in plane electrical conductivity. I am aware that worded this way might even sound trivial." Replace graphene with graphite.
Comment: @Alchimista "... the delocalisation over the neighbours results in just two pi electrons delocalised but pinned onto a single ring." 1- Does neighbours mean upper & below rings for that ring of graphene? 2- What do you mean by ... pinned onto a single ring?
Comment: @apurvium a) read on plane neighbors. Planes do interact, but yet they can "slide" on each other. The interaction, or bond, is less strong between plane (think also of the anisotropic conductivity). b) pinned in the sense that while as benzene has a delocalised sextet, only two remain for each ring of graphite. The third being the one spreading along the sheet as per a)


About best practices of JMS integration using TIBCO .Net client

Question: I'm working on an integration project where I'm talking to JMS framework using TIBCO .Net client.
A colleague is recommdending a design decision based on a fear of receiving too many messages suddenly in a way that our application can't handle it. We are using Asynchronous mode while receiving messages. I'm new to that topic so I couldn't find quick best practices to support his clam or mine. Any suggestions? How can I test this subject?
Answer: After I tested the subject for a while I found out there's no fear of number of received messages. The major point won't be in receiving itself but in the processing of received message. This is what determines the actual performance of application.
In a previous design, We have separated the Receiver component from Processor component & That resulted in delay because we have to wait till receiver finishes then to start processing received messages via the another component.
This design is being changed now. So, processing should be immediately upon a message reception. Message receiving should be Asynchronously through handling the event MessageHandler of type EMSMessageHandler and this is the best practice for message receiving so far.


Why is there no transition from Rebbi Yehuda's Baraisa of Queen Helene's sukkah to Rav Shmuel bar Yitzchak stating the halacha of minimum size sukkah?

Question: Is the seemingly abrupt transition from the Baraisa of Queen Helene's Sukkah to Rav Shmuel bar Yitzchak stating the halacha for a minimum size sukkah on Sukkah 3a indicating separate topics or are they related?
Answer: אמר רב אשי לא נצרכה אלא לקיטוניות שבה רבנן סברי בניה בסוכה מעליא הוו יתבי ואיהי יתבה בקיטוניות משום צניעותא ומשום הכי לא אמרי לה דבר ור' יהודה סבר בניה גבה הוו יתבי ואפ"ה לא אמרי לה דבר אמר רב שמואל בר יצחק הלכה צריכה שתהא מחזקת ראשו ורובו ושולחנו א"ל רבי אבא כמאן כב"ש א"ל אלא כמאן איכא דאמרי אמר רבי אבא דאמר לך מני א"ל ב"ש היא ולא תזוז מינה

Rav Shmuel bar Yitzchak essentially said, Rebbi Yehuda's Baraisa regarding Queen Helene's sukkah has defeated Rebbi Yoshiyah and Rav Chanan bar Rabbah's dictum in the name of Rav. Therefore, if you are going to maintain that the Rabbis still dispute Rebbi Yehuda holding the opinion of Rav Huna, that the source for the 20 amos height limitation of a sukkah is that it requires a 1:5 shade ratio, then the consequence is that: הלכה צריכה שתהא מחזקת ראשו ורובו ושולחנו.
Rebbi Abba said to Rav Shmuel bar Yitzchak: כמאן כב"ש.  According to whom are you ruling? According to Beis Shammai?  But, we poskin like Beis Hillel.
Rav Shmuel bar Yitzchak responded to Rebbi Abba, אלא כמאן, but according to whom could the halacha be, except Beis Shammai?  For since, Rav Huna's opinion maintains that the 20 amos height limitation of a sukkah is due to a 1:5 shade ratio, which allows a sukkah to be higher than 20 amos beyond 4×4 amos, therefore the Rabbis can no longer poskin that the minimum size sukkah is ראשו ורובו in accordance with Beis Hillel who holds that a sukkah is a דירת עראי, which requires a sukkah to be lower than 20 amos in height.  This is because Beis Hillel's understanding that a sukkah is a דירת עראי is in the terms of the height of a sukkah, which consequently enables a sukkah as small as ראשו ורובו in length because he does not require the קבע of a table.  Whereas, Beis Shammai's opinion that a sukkah is a דירת קבע on basis of a requirement that a table must be inside the sukkah establishes the minimum length and width of a sukkah as ראשו ורובו ושולחנו.
Furthermore, since Rav Huna's opinion maintains that a sukkah can be built at less than 4×4 amos, the Rabbis can no longer poskin like Rebbe who maintains that a sukkah is a דירת קבע, which requires a minimum size sukkah of 4×4 amos.  As a consequence, the halacha for the minimum size sukkah must be decided in accordance with Beis Shammai that a sukkah is a דירת קבע which requires a person to bring his table into his sukkah to dwell in the manner that he normally does in his house all year long, 28b and 7b.
Finally, in regards to Rav Shmuel bar Yitzchak's understanding of the dispute between Beis Shammai and Beis Hillel, which he understood in the terms of a requirement that a sukkah must be either a דירת עראי or דירת קבע, the Gemara adds that it was said by some that the exchange continued with R' Abba asking, "who is it that told you" that Beis Shammai and Beis Hillel argue over whether a sukkah is a דירת עראי or דירת קבע?  And, Rav Shmuel bar Yitzchak responded to Rebbi Abba, "it is Beis Shammai" that told me.

And the proof that Rav Shmuel bar Yitzchak's statement is a continuation of the Gemara's conversation regarding the dispute between the Tanna Kamma and Rebbi Yehuda in the Baraisa of Queen Helene's sukkah, and not simply an introduction to a completely new topic where Rav Shmuel bar Yitzchak makes a halachic statement that was already universally accepted, is that Rav Nachman bar Yitzchak understands Rav Shmuel bar Yitzchak's conversation with Rebbi Abba as concerning the case of Queen Helene's sukkah hinging on the assumption that Beis Shammai and Beis Hillel are arguing in a small sukkah over a דאורייתא.  Therefore, he asked on 3a: ממאי דב"ש ובית הלל בסוכה קטנה פליגי, From what evidence do you presume that Beis Shammai and Beis Hillel argue over the halacha of a minimum size sukkah?

And, if Rav Shmuel bar Yitzchak's statement was merely a halachic statement of fact Rav Nachman bar Yitzchak's question would make no sense outside of the case of Queen Helene's sukkah, because no other case has been presented in which the opinions of Beis Shammai and Beis Hillel are opposing each other.  Therefore, Rav Shmuel bar Yitzchak and Rav Nachman bar Yitzchak are discussing the halachic difficulty that Rebbi Yehuda's Baraisa creates for the Rabbis.
The meaning and significance of Rav Nachman bar Yitzchak's challenge to Rav Shmuel bar Yitzchak can not be overstated.
מתקיף לה רב נחמן בר יצחק ממאי דב"ש ובית הלל בסוכה קטנה פליגי דלמא בסוכה גדולה פליגי וכגון דיתיב אפומא דמטולתא ושולחנו בתוך הבית דבית שמאי סברי גזרינן שמא ימשך אחר שולחנו ובית הלל סברי לא גזרינן

Rav Nachman bar Yitzchak is challenging Rav Shmuel bar Yitzchak's understanding that the argument between Beis Shammai and Beis Hillel over the minimum size of a sukkah, is originating from a דאורייתא requirement. As such, a דאורייתא perspective of the argument represents a Torah requirement by Beis Shammai that a sukkah must be large enough to accommodate a person's table and by Beis Hillel that a sukkah cannot be above 20 amos in height.  And since Beis Hillel's understanding of a דירת עראי is in the terms of the height of a sukkah, which doesn't involve a table, they can validate a minimum size sukkah in regards to the dimension of length as small as ראשו ורובו.  Therefore, they argue in a small sukkah over a דאורייתא as to whether a sukkah is a דירת עראי or a דירת קבע.
Rav Nachman bar Yitzchak's assertion that their argument could possibly be over the manner in which one eats, which could even take place in a large sukkah, is an attempt to establish the argument as regarding a דרבנן. This would mean that the argument in the sukkah is not defined in terms of a דאורייתא requirement, that a sukkah must either be a דירת קבע or דירת עראי with their resulting minimum size sukkahs.  In doing so, Rav Nachman bar Yitzchak is stating that the Rabbis who argue with Rebbi Yehuda in Queen Helene's sukkah, in accordance with Rav Huna's opinion which permits a sukkah to be higher than 20 amos when larger than 4×4 amos on the basis of a 1:5 shade ratio, would not have to poskin in accordance with Beis Shammai that the minimum size sukkah is ראשו ורובו ושולחנו.  Rather, if the argument between Beis Shammai and Beis Hillel is over a דרבנן regarding the manner in which a person eats from a table (whether in a large or small sukkah) that would mean that the Rabbis can still poskin according to Beis Hillel in regards to a minimum size sukkah of ראשו ורובו because it wouldn't matter anymore that Rav Huna permits a sukkah higher than 20 amos in height when beyond 4×4 amos in length.
Comment: This content appears to be copied without license or attribution from https://sukkah.home.blog/. Please see https://judaism.meta.stackexchange.com/questions/75/how-should-i-cite-an-answer-elsewhere , and [edit] this answer to express the points necessary to address the question, in your own words.
Comment: Thank you for the level care you take to make sure this forum is a great place for learning. The page is my working document of progress to date, which has been a slow and difficult task, though with much love and joy. I really need confirmation now as to whether I have learned correctly or not. That is why I'm here. Best Regards, Yonason.

Why is there no transition from Rebbi Yehuda’s Baraisa of Queen Helene’s sukkah to Rav Shmuel bar Yitzchak stating the halacha of minimum size sukkah?


What would Popper say about Kuhn's notion that Normal Science is a good thing

Question: Have read the book and still unable to finalize the answer
Comment: Which book are you referring to?
Comment: Hi, welcome to Philosophy SE. Please visit our [Help Center](https://philosophy.stackexchange.com/help) to see what questions we answer and how to ask. One-line posts are discouraged because it is hard to tell from them what people are looking for. Please provide the title of the book and explain what you have so far and what prevents you from finalizing it.
Comment: Kuhn does not assert that *normal science* is a "good thing". He asserts that *normal science* is the "normal" way for science to work.
Comment: Popper wrote more than one book, so it would be useful to say which one you are referring to.
Answer: Popper did not accept the delineation between normal and extraordinary science.  He looked at it as one grand continuum of hypotheses from the most mundane of fine-tuning computations to highly confrontational propositions that audaciously challenge all the surrounding work.
So he would see Kuhn's 'normal science' as a good thing, but not as the best thing.  The best thing, for him would be for common scientific processes to mature through normal refinement, but occasionally contain highly audacious confrontational propositions.
However, Kuhn showed that historically, what Popper expects to arise from a grand contradiction simply does not happen very often.  If the confrontation is too great, the new hypothesis, even if well tested, is not integrated into the science.
There is a shared, underlying set of unassailable propositions that constitute the paradigm of a productive science. To alter the paradigm, not only must there be available and compelling contradictions, but the existing normal science must be decreasing in its return on investment.  Otherwise the contradiction sits there unintegrated, or gathers a small number of obsessive vindicators, until the rest of the science is ready for it.
Having never accepted this argument, Popper would maintain that what he originally proposed would still be best.  If science were consistent and fully rational, it should work that way, even if it historically doesn't.  The parochialism that the idea of a stable paradigm implies seems inappropriate to a process that could otherwise be described by a simpler and more directly rational process.
Comment: Or as Planck put it: "A new scientific truth does not triumph by convincing its opponents and making them see the light, but rather because its opponents eventually die"

What would Popper say about Kuhn’s notion that Normal Science is a good thing


Hamilton Operator of any atom

Question: I am wondering if the Hamilton operator of an atom always is calculated by the same formular
$$ H = \frac{p_e^{2}}{2m} + \frac{P_N^{2}}{2M} -\frac{Z*e^2}{|r|}$$
with index e stands for electron and $N$ for Nucleus.
I have also seen some diferences in this formular. Is this the same as
$$ H = \frac{p^{2}}{2m_e} - \frac{Z*e^2}{|r|}~?$$
Comment: What about an atom with more than 1 electron?
Answer: The Hamiltonian for any number of electrons and any number of nuclei is:
\begin{align} H=&-\sum_i \frac{\hbar^2}{2M_i}\nabla_{R_i}^2 -\sum_i \frac{\hbar^2}{2m_i}\nabla_{r_i}^2 + \\
&+\frac{e^2}{4\pi\epsilon_0}\sum_{i<j}\frac{1}{|r_i-r_j|} - \frac{e^2}{4\pi\epsilon_0}\sum_{i,j}\frac{Z_i}{|R_i-r_j|} + \\
&+\frac{e^2}{4\pi\epsilon_0}\sum_{i<j}\frac{Z_iZ_j}{|R_i-R_j|} \end{align}
where $M_i$ ($m_i$) are the nuclear (electronic) masses, $R_i$ ($r_i$) are the nuclear (electronic) positions, and $Z_i$ are the atomic numbers.
The first two terms are the KE of the nuclei and electrons, followed by the electrostatic electron-electron repulsion, the electron-nucleus attraction, and the nucleus-nucleus repulsion.
To answer your question: for hydrogen you set $Z=1$, and you have a single electron and a single nucleus, so the Hamiltonian reduces to:
\begin{align} H=&-\frac{\hbar^2}{2M}\nabla_{R}^2 -\frac{\hbar^2}{2m}\nabla_{r}^2 - \frac{e^2}{4\pi\epsilon_0}\frac{1}{|R-r|}  \end{align}
You may then take the nucleus as your centre of mass (i.e. fix $R=0$), in which case it further simplifies to
\begin{align} H=&-\frac{\hbar^2}{2m}\nabla_{r}^2 - \frac{e^2}{4\pi\epsilon_0}\frac{1}{|r|}  \end{align}
Comment: If you include nucleus nucleus repulsion then there are no bound solutions. Also what about spin? Relativistic corrections?

Hamilton Operator of any atom


Snap to Face Unavailable

Question: Im trying to do Guru's donut series and I'm stuck at the point where you need to snap the icing to face. Instead of snap to face, It gives me two options; snap to face project and snap to face nearest. There is no snap to face option in my drop down menu. Sorry I am new around here and don't know what to do. any help would be greatly appreciated.
Comment: Hi, I don't have snap to face as well, only face project. Maybe the tutorial is with an older version of blender and the names have change. Does snap to face works for you ?
Answer: The tutorial uses an older version of Blender - I guess you have 3.3, there is this new distinction between Face Project and Face Nearest.
The difference is that Face Project might also snap vertices to hidden/occluded geometry, while Face Nearest only snaps to visible geometry.
So in the case of the donut tutorial I guess, if you want to make sure your vertices don't snap to somewhere in the background, it's best to use Face Nearest.
From the Blender manual:

Face Project

Snaps to the face by projecting the current point on the nearest face. This snap mode will snap geometry to both visible and occluded. This snap mode is useful for retopologizing.

Face Nearest

Snaps to the nearest surface in world space. This snap mode will only snap geometry to visible (non occluded) geometry.

Snap to Face Unavailable


jQuery sortable plugin problem

Question: I am using jQuery's sortable plugin to sort some lists.
The lists I have are a lot, making the page scroll.
The problem is that when I click to drag an element that is in a portion of the page that has been scrolled, the plugin seems to not be able to calculate correctly the element's top offset.
As a result, the mouse is on one point of the page and the element is on an other. The element is being dragged but it is not under the mouse.
Inspecting with firebug while dragging the element, I see that the top attribute is not correct. It is, as if the plugin does not calculate the body scroll.
Anyone experienced something similar?
Thanks
Answer: Just found it
I had position : relative to the ul that contained the li's.
That was the culprit. Removing it, fixed it
Hope it will help someone in the future

jQuery sortable plugin problem