Couchbase view index update hanging after adding file over ~1.4mb

Question: I'm using the latest Couchbase .Net SDK and I'm having problems with larger JSON-documents (over 1.4mb) in views.
In the case these documents were there when the design doc was added, the large files are just not shown in the view results (amount of documents given by view is smaller than actual amount).
If I add these larger files (using .Net client) later on, after design doc is created in the bucket, and getting the view with stale=false, the updating of the index never finishes and the method call does not return. I can see from the web UI that the index is being updated, but it never finishes. Eventually the GetView-call in .Net will give a timeout.
Restarting the Couchbase server did not help. Immediately when I remove the large document, GetView works again.
I have the following, simple view:
<code>function (doc, meta) {
  emit(doc._id, [doc.name, doc.version, doc.type, doc.date]);
}
</code>
Adding documents up to 1.2mb works fine, but documents bigger than 1.45mb don't. I could not find any documentation or actually anything online related views and larger documents. Is there some restriction to how big documents views can handle? I know Couchbase can't handle documents bigger than 20mb's, but the ones I use here are significantly smaller than that.
Answer: There is a limitation in the indexer of 1MB per document; larger documents are skipped (and a message logged).
This admittedly isn't very well documented at present, see the open bug MB-11668 to address this.


Is there a connection between Odin or Zeus and the Christian God?

Question: Could the Norse Odin or the Greek Zeus be Christianity's "The Creator" and father of Jesus?
Comment: I've update my answer with more similarities.  Take heart that the question now has two reopen votes!
Answer: It's interesting that the most common epithet of Zeus in Greek literature is not the form of the name beginning in "z", but the form equivalent to Dios.  (This is the same word root for god in the Romance languages of Europe.)
You see the word as an adjective often in phrases like  καὶ δῖος Ἀχιλλεύς (kai dios Achilleus) "godlike Achilles", and even other deities might be described as divine (lowercase d), but only Zeus himself is referred to as Δῖος ("God" with the capital D).
Some have linked the "seus" part of Jesus' name to Zeus, arguing that his original name was Joshua (ישוע Yeshua).  All are "King of Heaven" for their respective heavens, whether Olympus, Asgard or the Christian heaven.
Joseph Campbell might refer to Odin, Zeus and the Lord of Hosts as "sky fathers", and the depictions of all deities in art have certain characteristics such as the beard.
This is no accident as Italian Renaissance art in particular was heavily influenced by Classical mythology at the peak of the power of the Catholic Church.  You can even find a direct merging of the two cosmologies in Dante's Inferno, which influences the Christian conception of the universe second only to the bible itself.
It is also worth noting that a well known epithet of Odin is the "Allfather" (Alfaðir), and that Zeus is called "Father of the Gods and Men".  In Christian sects that uphold the doctrine of the trinity, the creator is knows as "God the Father".
The main distinction I see is that the polytheistic versions of these kings of heaven were only nigh-omniscient and/or nigh-omnipotent.  Specifically, they were the kings of their respective hills, but inferior to the singular or infinite nature of the Lord of Hosts.

Note: Unlike Zeus, who is undying and eternal, though not omniscient nor omnipotent, Odin is mortal in the sense he dies at Ragnarök, swallowed whole by the wolf Fenrir.
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](http://chat.stackexchange.com/rooms/73519/discussion-on-answer-by-dukezhou-could-odin-zeus-be-known-to-christians-as-god).
Answer: Odin is not from Greek Mythology. Rather he is from the Norse Mythology.
Also father of Jesus was Joseph who was a human and a saint not any God. Whereas Odin was the the King of Asgard and also effectively the King of Norse Gods who lived in Asgard.
Comment: I'd comment that in Christianity, Joseph is regarded as Jesus' legal father, but not the progenitor.  Also will make the point that in some Caribbean religions, Catholic Saints merged with the traditional gods of Africa (see [syncretism](https://en.wikipedia.org/wiki/Syncretism))  Like gods, saints in some christian sects are worshiped (see: [veneration](https://en.wikipedia.org/wiki/Veneration).)
Comment: Well i have been told that Jesus was a son of somebody else, but Joseph accepted him, the innocent child, and forgave Mary and that is why he is a saint.
Answer: Odin and Zeus are the most alike out of the three since they both rule over a group of gods from a giant palace in the sky (I do believe that Asgard is in the sky but I may be wrong and it might be one of the nine realms.) and they command some kind of all-seeing magic unlike many of the other gods. but they both fought and won a great battle that lasted over the centuries. the Christian god is nothing like the other two because first of all, they both had legions of children (especially Zeus since he was very unfaithful to Hera) while the Christian god only had one- Jesus. the Christians have a monotheism thing going on while the greeks and many other religions like it - including the Norse- believed in polytheism.
Answer: Id like to point out as some one who is Greek and Norse descendant that all 3 gods are similar if you compare the known descriptions. Zeus the Father of gods/Angels.Zues had Angels to cupid and Aris. And Odin's Angels where the Valkyries. All three are the fathers of the gods and human kind and to say God has only one child. We are all gods Children. That make everyone Jesus brother and sisters. God made us and he made juses. If you compare the three Michael the Archangel Apollo the sun god and Bauldar all look a like. God the one true god can build any so there for could he not take the form of zuses or odin if everyone claims he can do anything. Than no one can prove or disprove the 3 gods are not the same. He had to have at least made the other gods. We Call them Angles now not gods.
Answer: Odin is the same as Adon or Adonai of the Jews and Adonis of the Greeks, thus all three cultures descended from the same origin.


Untagged interface in Linux?

Question: I know how to create a tagged interface in linux using  vconfig  like eth1.10 which makes it receive and send tagged packets. Is it possible to create an interface which receives and sends untagged packet for vlan 10?
Comment: There is no such thing as an "untagged packet for vlan 10". In 802.1Q, frames are either tagged or untagged. If tagged, they belong to the vlan mentioned in tha tag. If untagged, they belong to a default vlan.
Comment: There is *absolutely* such a thing as "untagged packet for vlan 10". It is a common phrase for the state of a port where the system takes untagged traffic and tags it with vlan 10 before further processing. It also means that if a frame needs to be forwarded to that host, ensure the system removes the tag prior to forwarding. It is the same as Cisco's "pvid" or "native" terms, which all deal with how we process untagged frames.
Comment: I see no reason to close, while technically impossible, this is a valid question.
Answer: An untagged interface already exists: it's the parent interface, that is, eth1 in this case.
Sending packets through eth1.10 results in those packets being tagged while packets received with VLAN tag 10 come in through that interface.
Sending packets through eth1 results in those packets being untagged while packets received without a VLAN tag come in through that interface.
There is no such thing as "sending untagged packets for vlan 10". Untagged packets don't have any vlan tag, by definition.
Comment: @GregSchmit that's true, a completely standard feature of ethernet switches is to assign incoming untagged packets to a vlan, but that is by definition not exposed on the wire and the Unix host at the other end has no idea it's happening.
Comment: In an HP switch, if you go into an interface and set it to be "untagged on vlan 10", that means that untagged traffic is assigned to vlan 10. What the OP seems to want is traffic incoming on eth1 to behave as if it came in on eth1.10. Here is a helpful HP link for their terminology of untagged vs tagged: https://community.hpe.com/t5/Switches-Hubs-and-Modems/Tagged-vs-Untagged/td-p/4004330
Comment: The above may sound weird, but it is a standard feature in any network switch. In Cisco, it's called setting the port access vlan or trunk pvid, and in HP lingo it is called setting the interface untagged vlan (default is 1).
Comment: I agree that it wouldn't be exposed on the wire, which is why the questioner asked for functionality that "receives and sends untagged packet for vlan 10". I was just clarifying that talking about sending or recieving "untagged" vlan packets is a coherent thing to talk about, even though it sounds weird. It just means that the switch internally treats the untagged packet on that port as in the vlan broadcast domain of vlan X, and knows to strip vlan tags before sending to that host on the untagged port.
Comment: I think currently the feature just isn't implemented. You can't set a port VLAN ID (PVID) and easily put a port "native" on a VLAN in the BSDs and Linux distros I've used.
Comment: For anyone reading the discussion later, the bridge with vlan filtering on ports was added. See https://developers.redhat.com/blog/2017/09/14/vlan-filter-support-on-bridge/ for example.
Comment: I think this answer is wrong, because the parent interface includes both untagged and tagged traffic.  For example if I want to create a bridge that includes only traffic for vlan 10, I want to collect untagged traffic off eth0 and vlan tagged 10 traffic off eth0 but not traffic with other tags.
Answer: I've found the following method to work.

Use TC to match packets without 802.1q on ingres and push a vlan header with id 0
Use TC to match packets in vlan 0 on egress, and pop the vlan header
Create the untagged logical interface with type=vlan and id=0

Here's an example:
$ tc qdisc del dev eth0 root
$ tc qdisc add dev eth0 handle 1: root prio
$ tc filter add dev eth0 parent 1: protocol 802.1q basic match 'meta(vlan eq 0)' action vlan pop

$ tc qdisc del dev eth0 ingress
$ tc qdisc add dev eth0 handle ffff: ingress
$ tc filter add dev eth0 parent ffff: protocol all basic match 'not meta(protocol eq 0x8100)' action vlan push id 0

$ ip link add eth0-vlan0 type vlan id 0
$ ip link set eth0-vlan0 up
$ ip addr add 192.168.10.253/24 dev eth0-vlan0

peer$ ping 192.168.10.253
PING 192.168.10.253 (192.168.10.253) 56(84) bytes of data.
64 bytes from 192.168.10.253: icmp_seq=1 ttl=64 time=0.209 ms
64 bytes from 192.168.10.253: icmp_seq=2 ttl=64 time=0.188 ms
^C

Note that adding the prio qdisc on egress (known as "root" above) disables the default mq discipline, which divides packets according to number of transmit queues on the NIC in order to allow multiple CPU threads to push packets to the different TX queues. To restore the default behavior, use mqprio as follows:
$ tx_q_count=$(ls -d /sys/class/net/eth0/queues/tx-* | wc -l)

$ tc qdisc del dev eth0 root
$ tc qdisc add dev eth0 handle 1: root prio bands $tx_q_count multiqueue
$ tc filter add dev eth0 parent 1: protocol 802.1q basic match 'meta(vlan eq 0)' action vlan pop
$ for i in $(seq 1 $tx_q_count); do tc qdisc add dev eth0 parent 1:$i pfifo_fast; done

$ tc qdisc del dev eth0 ingress
$ tc qdisc add dev eth0 handle ffff: ingress
$ tc filter add dev eth0 parent ffff: protocol all basic match 'not meta(protocol eq 0x8100)' action vlan push id 0

$ ip link add eth0-vlan0 type vlan id 0
$ ip link set eth0-vlan0 up
$ ip addr add 192.168.10.253/24 dev eth0-vlan0

peer$ ping 192.168.10.253
PING 192.168.10.253 (192.168.10.253) 56(84) bytes of data.
64 bytes from 192.168.10.253: icmp_seq=1 ttl=64 time=0.230 ms
64 bytes from 192.168.10.253: icmp_seq=2 ttl=64 time=0.198 ms
^C

A different solution that also works is to add a software bridge next to the vlan logical interfaces on the physical interface. The software bridge has a vlan filtering feature that allows limited vlan remapping (pvid->vid on ingres and vid->pvid on egress, but not full remapping) that can be used. Here's an example:
$ ip link add eth0-vlan0 type bridge
$ echo 0 > /sys/class/net/eth0-vlan0/bridge/default_pvid
$ echo 1 > /sys/class/net/eth0-vlan0/bridge/vlan_filtering
$ ip link set dev eth0 master eth0-vlan0
$ bridge vlan add vid 4094 dev eth0 pvid untagged
$ bridge vlan add vid 4094 dev eth0-vlan0 untagged pvid self

$ ip link add eth0-vlan4094 link eth0 type vlan id 4094
# ... BEGIN: only if you intend to use vlan 4094 ...
$ ip link set eth0-vlan4094 up
$ ip addr add 10.10.40.253/24 dev eth0-vlan4094
# ... END ...

$ ip link set eth0-vlan0 up
$ ip addr add 192.168.10.253/24 dev eth0-vlan0

peer$ ping 192.168.10.253
PING 192.168.10.253 (192.168.10.253) 56(84) bytes of data.
64 bytes from 192.168.10.253: icmp_seq=1 ttl=64 time=0.238 ms
64 bytes from 192.168.10.253: icmp_seq=2 ttl=64 time=0.215 ms
^C

You need the VLAN interface matching the VID number used inside the bridge, because the VLAN filtering feature is a bit so-so. It accepts both untagged frames using the pvid->vid mapping, buuut it also accepts frames with a VLAN tag on wire matching the remapped vid. The VLAN interface eats up those frames instead. Leave it in the down state if you do not need that particular VLAN.
The software bridge has recently gained a "default_pvid" feature which makes it work like cheap hardware switches: it is vlan aware, but will per default do a pvid->vid mapping to vid 1, and allow vid 1 on all ports, so that you can plug the switch in and start using ports for untagged traffic without a single configuration directive.
Finally, a more modern solution would be to use tc_clsact and write a small BPF program to push/pop the tags for the PVID. Works just like the TC example above, except that some NICs allow hardware offload of BPF programs, so it could be more performant.
Answer: As mentioned in comments and another answer, there isn't specifically a way to send untagged packets belonging to a specific VLAN, because untagged packets have no way to describe which VLAN they belong to due to lack of a tag.   As also mentioned, the parent interface (eth1 here) will send untagged packets.
However, this does not mean that untagged packets sent from your linux box can't belong to a particular VLAN on your network.  It is up to the switch to assign untagged packets arriving on a given port to a particular VLAN.  Typically, switches (which are capable of VLANs) will, by default, assign untagged packets to the "default VLAN (1)".  However by changing the configuration on the switch, you can instruct it to put untagged packets received onto VLAN 10, and route them wherever else VLAN 10 is assigned.
If VLAN 10 is set to tagged on a different port, those same packets will come out tagged there if that's the destination of the packet and untagged on a different port that is set to untagged for VLAN 10
Answer: this:
# ip link add link eth0 name untagged type vlan id 0

seems to do the trick.
tcpdump on the parent interface (eth0) shows untagged packets when you ping -I untagged (some-ip).
(tcpdump on the new logical interface should show only untagged traffic, while tcpdump on the parent interface should show all traffic, tagged and untagged, with 802.1q headers for the tagged stuff.)
you may need to disable ARP on the parent interface, so that untagged ARP replies are not put in the ARP table relative to the parent interface:
# ip link set eth0 arp off
# ip link set untagged arp on

i would also disable IPv6 link-local addresses on the parent interface, and enable on the untagged logical interface, for good measure.
you can up/down the untagged interface without killing the whole parent interface (tagged traffic included) etc.
Comment: This can't be the whole answer. At least: I've tried it on my local setup, and this _does not work_. I can bridge traffic from other VLANs, but VLAN 0 does not communicate on the LAN with other untagged hosts.
Comment: I also tried this, and the "untagged" interface does not receive untagged frames, even after allowing arp on the vlan if and disallowing arp on the base interface.
Answer: You can create a bridge between a physical interface (eth0) and a vlan interface (eth1:10). This bridge will then allow untagged packets from the physical interface (eth0) to communicate with the tagged network on the vlan interface (eth1:10).
I am using exactly this constellation. Whether this would work if the bridge was created over a parent interface (eth0) and its own subordinate vlan interface (eth0:10) I cannot say...
Answer: Here's the solution using eBPF.
To avoid having to install bcc and compile the code from source, here's the binary:
$ base64 -d > tag-native-vlan0.o
f0VMRgIBAQAAAAAAAAAAAAEAAAABAAAAAAAAAAAAAAAAAAAAAAAAALABAAAAAAAAAAAAAEAAAAAA
AEAABwABAGESFAAAAAAAVQIDAAAAAAC3AgAAAIEAALcDAAAAAAAAhQAAABIAAAC3AAAAAAAAAJUA
AAAAAAAAYRIUAAAAAAAVAgMAAAAAAGESGAAAAAAAVQIBAAAAAACFAAAAEwAAALcAAAAAAAAAlQAA
AAAAAABHUEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAF4AAAAAAAMAKAAAAAAAAAAAAAAA
AAAAAFcAAAAAAAQAKAAAAAAAAAAAAAAAAAAAAD0AAAAQAAUAAAAAAAAAAAAAAAAAAAAAACMAAAAQ
AAQAAAAAAAAAAAAAAAAAAAAAAAcAAAAQAAMAAAAAAAAAAAAAAAAAAAAAAAAudGV4dABjbHNhY3Rf
aW5ncmVzcwBwdmlkX2luZ3Jlc3MAY2xzYWN0X2VncmVzcwBwdmlkX2VncmVzcwBfX2xpY2Vuc2UA
LnN0cnRhYgAuc3ltdGFiAExCQjFfMwBMQkIwXzIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEcAAAADAAAAAAAAAAAAAAAA
AAAAAAAAAEgBAAAAAAAAZQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAQAAAAYA
AAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAFgAA
AAEAAAAGAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAA
AAAAADEAAAABAAAABgAAAAAAAAAAAAAAAAAAAHgAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAgAAAAA
AAAAAAAAAAAAAAA/AAAAAQAAAAMAAAAAAAAAAAAAAAAAAACwAAAAAAAAAAQAAAAAAAAAAAAAAAAA
AAABAAAAAAAAAAAAAAAAAAAATwAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAuAAAAAAAAACQAAAAAAAA
AAEAAAADAAAACAAAAAAAAAAYAAAAAAAAAA==
^D

I've set the PVID to map to VID 0 instead of VID 10, for no particular reason.
(To change it to VID 10, use a disassembler and assembler, eg. ubpf or llvm-objdump, on the .o file, and change the VLAN tag.  You can also talk to eBPF from user space, so it should be possible to make the pvid reconfigurable at runtime if need be.)
Make sure to run something like kernel 4.8.0 (uname -a) and iproute2 4.9.0 (ip -V).
Add the eBPF to the physical interface:
$ tc qdisc add dev eth0 clsact
$ tc filter add dev eth0 ingress bpf object-file tag-native-vlan0.o section pvid_ingress
$ tc filter add dev eth0 egress bpf object-file tag-native-vlan0.o section pvid_egress

Create a logical interface:
$ ip link add eth0-vlan0 link eth0 type vlan id 0
$ ip link set eth0-vlan0 up
$ ip addr add 192.168.10.253/24 dev eth0-vlan0

L3 is configured on the logical interface, and the physical interface is used for L2.
Test from a connected box:
peer$ ping 192.168.10.253
PING 192.168.10.253 (192.168.10.253) 56(84) bytes of data.
64 bytes from 192.168.10.253: icmp_seq=1 ttl=64 time=0.380 ms
64 bytes from 192.168.10.253: icmp_seq=2 ttl=64 time=0.240 ms
^C

And there you have it, an "untagged interface on Linux".
Comment: You should really post the C code that you used to produce this object file. For people ready to use bcc, it would be much easier to reuse. And easier to understand what happens for all people reading your answer. For some reason I had to pass `--triple bpf` to `llvm-objdump` for it to find the target, not sure why (usually not necessary). Also, nitpick: tc/ip commands should be run as root.

Untagged interface in Linux?


How to hedge a dual digital option

Question: Let us assume we have two FX rates: $ 1 EUR = S_t^{(1)} USD$ and $ 1 GBP=S_t^{(2)} USD $. Let $K_1>0, K_2>0$ be strictly positive values and a payoff at some time $ T>0 $ (called maturity) defined by: $ V_T=1_{ \{ \kappa_1\cdot S_T^{(1)}<\kappa_1\cdot K_1 \} } \cdot 1_{\{\kappa_2\cdot S_T^{(2)}<\kappa_2\cdot K_2\}} , \kappa_1,\kappa_2\in\{-1,+1\}$.
We know that this product is dependent on the correlation between the two FX rates. HJow do trading desks measure the exposure to this correlation parameter? How do they hedge such options?
Answer: Dispersion trading is a way to mitigate correlation risk. The book "Foreign Exchange Option Pricing A Practitioners Guide" (Chapter 10 Multicurrency Options) introduces an analysis framework.
Last, people use the gap to smooth out the barrier regarding digital options. i.e. using call/put spreads to replicate digital payoffs.

How to hedge a dual digital option


Why do we need to define odbc connection to connect to sql server(but not always)

Question: When i open up sql server management studio and make a connection to an sql server database, it connects fine. But when i try to define a connection to the same sql server in cognos administration, andthen try to test the connection through the local framework manager, it says connection failed. And I need to define an odbc connection in my control panel for it to work.
So my question is..why sql server management studio does not need odbc connection, but cognos needs it? I have also heard that ms access needs it.
Answer: It depends on the type of Data Source you're creating in Cognos Administration.  If you select ODBC as the data source type, it will attempt to use ODBC to connect.  You probably want to select the appropriate SQL Server data source type.


Organizing into dimensions

Question: I'm looking for a word for the process of organizing things into multiple dimensions. For example, if you had an online shoe store, you might want to decide to let customers filter your shoes by several attributes, e.g.: mens/womens, price, size, and color. What is a good term to describe the process of choosing these dimensions? A related term is clustering, where you might cluster the shoes into clusters, such as a cluster for mens shoes and a separate cluster for womens shoes. Clustering is a good term because it refers to the organizational process but misses the fact that there are multiple ways to split the items into groups by color or gender or by numerical values such as size or price. Thanks!
Comment: You should probably ask for such a term to a more technical audience, like crossvalidated.SE. But a close term might be 'principal components'.
Comment: The word you used, 'filter', is the term for the process of choosing the dimensions.
Comment: Categorising / choosing categories.
Comment: @Mitch: _Filtering_ is what customers will be doing, OP is asking what you do in order customers can filter products by .
Comment: I updated the question to clarify that the term refers to the process and that it doesn't have to be a for a technical audience. Thanks!
Answer: The general term is sorting.

Sorting is any process of arranging items according to a certain sequence or in different sets, and therefore, it has two common, yet distinct meanings:

ordering: arranging items of the same kind, class or nature, in some ordered sequence,
categorizing: grouping and labeling items with similar properties together (by sorts).

The main purpose of sorting information is to optimise its usefulness for specific tasks. In general, there are two ways of grouping information: by category e.g. a shopping catalogue where items are compiled together under headings such as 'home', 'sport & leisure', 'women's clothes' etc. (nominal scale) and by the intensity of some property, such as price, e.g. from the cheapest to most expensive (ordinal scale).
http://en.wikipedia.org/wiki/Sorting

Organizing into dimensions


Why can't the Klein bottle embed in $\mathbb{R}^3$?

Question: Using Alexander duality, you can show that the Klein bottle does not embed in $\mathbb{R}^3$. (See for example Hatcher's book Chapter 3 page 256.) Is there a more elementary proof, that say could be understood by an undergraduate who doesn't know homology yet?
Answer: If you are willing to assume that the embedded surface $S$ is polyhedral, you can prove that it is orientable by an elementary argument similar to the proof of polygonal Jordan Theorem. Of course the proof is translation of a homology/transversality/separation argument.
Fix a direction (nonzero vector) which is not parallel to any of the faces. For every point $p$ in the complement of $S$, consider the ray starting at $p$ and goint to the chosen direction. If this ray does not intersect edges of $S$, count the number of intersection points of the ray and the surface. If this number is even, you say that $p$ is black, otherwise $p$ is white. If the ray intersects an edge of $S$, you paint $p$ the same color as some nearby point whose ray does not intersect edges. It is easy to see that the color does not change along any path in the complement of $S$ (it suffices to consider only polygonal paths avoiding points whose rays contain vertices of $S$).
Now take points $p$ and $q$ near the surface such that the segment $pq$ is parallel to the chosen direction. Then they are of different colors. But if the surface is non-orientable, you can go from $p$ to $q$ along a Mobius strip contained in the surface. This contradicts the above fact about paths in the complement of $S$.
Comment: Yup this is really elementary. Thanks!
Answer: Assuming that K is smooth or locally flat, there is a nice geometric reason based on transversality.
The Klein bottle is not orientable.  If it embedded in R3 so as to separate a small epsilon neighborhood of its image, then the neighborhood would be homeomorphic to a trivial line bundle over the Klein bottle, K times (-1,1), and therefore the neighborhood would also be non-orientable.  But since any 3-dimensional submanifold of R3 is orientable this cannnot happen.
So the Klein bottle embedding would have to be non separating in this neighborhood.  But this means there is a curve C in the neighborhood that intersects the embedded Klein bottle once, transversally.
Now C bounds a disk D in R3 since R3 is simply connected. (Bounding any surface is enough).
One can make D transverse to the Klein bottle K, leaving boundary D fixed. One then see that K intersects D in a union of arcs and closed curves, with a single boundary point.  But any such collection has an even number of boundary points, a contradiction.
This argument works more generally to show a closed nonorientable surface cannot be embedded in a 3-manifold M with H1(M;Z2) = 0.
Answer: There are proofs that do not use homology, but I don't know that they are more elementary... For example:
Lemma: If S is an embedded compact surface without boundary in an orientable three manifold M then S is orientable if and only if S separates a regular neighborhood.
Thus if K is an embedded Klein bottle in R^3 then K does not separate R^3.  Now we have:
Lemma: If S is an embedded compact surface without boundary in R^3 then S separates R^3 into two pieces, one compact and one not compact.
Proof: A cut and paste argument, inducting on the number of saddle points of S with respect to height.//
This is very similar to Alexander's Theorem that spheres in R^3 separate.
Answer: If you care only about tame embeddings (a figure being tame iff it is homeomorphic to a polygonal or polyhedral figure) then you can prove the nonembeddability by elementary means.
Using the Link appearing theorem:

Any complete 6-graph in $\mathbb R^3$ contains a pair of disjoint cycles that forms a non-trivial link.

By splitting the Klein bottle as two Mobius bands identified along their boundary, $M_1,M_2$, note that the meridian of $M_1$ and $\partial M_1=\partial M_2$ will form a non-trivial link and therefore the two-cells must intersect.
You can take a look at the article "Why is P2 not embeddable in R3?", by Hiroshi Maehara, American Mathematical monthly.
Comment: This is very nice, and I read the proofs on Maehara and  the Conway and Gordon paper it refers too. So the proof that $P^2$ doesn't embed in $\mathbb{R}^3$ is elementary. So thanks for the reference.

However I don't understand your comment "therefore the two-cells must intersect". You can isotope the boundary link to something very close to the meridian of $M_2$, but which wraps around it twice.
Comment: This means that the linking number of the meridian of $M_1$ and $\partial M_2$ is twice the linking number with $M_2$. However we know that this linking number is odd by the link appearing theorem. Maybe you had something more elementary in mind?
Answer: If you have a closed (connected) differentiable surface embedded in R^3, then isn't it true that its normal bundle is trivial? This would imply that the surface is orientable. I guess I replied raising another question..
Comment: How do you prove the normal bundle is trivial?
Comment: I mean without using some characteristic class theory ...
Comment: I do not know if it is true that the normal bundle of a closed, connected surface in R^3 is trivial. It seems to agree with what Sam Nead says below. I will try to inquiry this!


Difference between uncle block and forked blocks

Question: For example https://etherscan.io/uncles and https://etherscan.io/blocks_forked, what difference between them?
Answer: Valid blocks that are not included in the main Ethereum chain because they were found a bit too late are still submitted to the network. Miners can include those blocks as "uncles" if they are not "older" (further away) than 7 blocks. They will receive a certain addition to the reward (a fraction) and the original miner of the uncle will also receive a reward which decreases with the "age" or "distance of the uncle.
It seems like the forked blocks page shows blocks that forked for any reason (e.g. and mostly because they were a bit too late) but which are NOT included as uncles later. The uncles page shows only those blocks that are actually recorded as uncles in the Ethereum chain.
While the list of uncles is complete because it can be read from the blockchain, it must be noted that the list of forked blocks depends on the connectivity of etherscan's nodes and, therefore, is not conclusive.
Comment: Thanks! This is probably the clearest definition I've seen so far attempting to explain how forked blocks vs uncle's work. At a glance, it would then seem that you have to rely on checking a block's parent hash, and compare it to blocks you previously recorded to determine if you mistakenly included forked blocks as truth.
Answer: This is only a partial answer.
Here are some differences which I noticed when looking a the linked pages in your question:
Miner Reward. Forked blocks earned the miners a full reward (5 ETH + gas fees) while uncle blocks only earned them a fraction of that
Numbers  As of today (July 7, 2017, 12.25 pm), there are only 15,584 forked blocks on the blockchain compared to 310,542 uncles. For some reason (that I hope someone else can explain), forked blocks are a lot less common.
Relationship  Some forked blocks include uncles and others do not. Uncle blocks by definition all include one or two uncles.
Another big difference is that, after blockchain re-organization, forked blocks are excluded from the main blockchain (per the statement on the etherscan.io page you provided) while uncles can still be included / referenced on the blockchain, and that is in fact encouraged for a number of reasons which Vitalik explains in in this article:

Stale blocks in Ethereum can be re-included into the chain as
  "uncles", where they receive up to 75% of their original block reward.
  This mechanic was originally introduced to reduce centralization
  pressures, by reducing the advantage that well-connected miners have
  over poorly connected miners, but it also has several side benefits,
  one of which is that stale blocks are tracked for all time in a very
  easily searchable database – the blockchain itself.

Having noted all these differences, and done some web research, I still could not get to the core difference between both types of blocks (i.e. forked and uncle). I hope others will help clarify further.
Comment: So uncle block is a block which was found by another miner at same time, but how it includes in blockchain? how I understood, first miner who found a block, it goes to blockchain, second miner who found it also, just tracked in original that it has uncle at some position at which block was found uncle right?
Comment: Your answer may be a bit misleading. Forked blocks don't earn the miners any reward at all because they are not included in the Ethereum chain. The numbers shown on etherscan are not conclusive. Etherscan only shows those reorged and forked blocks that their own nodes see. If their nodes happen to be poorly connected to the rest of the network it would result in a high number of forked blocks and reorgs.
Comment: If forked blocks are not included on the main chain, where does etherscan found those blocks?    Is it true that every time you switch to a longer chain, the old one becomes a fork, while when someone else pushes a shorter one to you, that one becomes a uncle?
Comment: @jotud it makes more sense to me that forked block doesn't earn any reward. But why it is valuable to show them on etherscan? Because it helps measure how much computing power is wasted?
Answer: Also note that since the upgrade to proof of stake, uncle blocks no longer exist.


Are there constraints for the variance of predicted probability on calibrated models?

Question: I'm sorry if the title is too vague. I'm not really sure of what I ask, this is a somewhat speculative question...
The setting is that I'm using XGBoost in a binary classification problem (40% positive class) , and I want to get predicted probabilities, so after the model is trained, I train an isotonic calibrier. What I get is the following:

The first model, before calibration, was good enough in terms of AUC, obtaining 0,82.
The probabilities were not calibried at all.
After calibration, the probabilities are well calibrated, but I plotted the histogram of predicted probability and I got this:

So, after seeing this histogram, I began to think that the model was not very informative, or too conservative. I mean, let's imagine that we had all possible models with perfect calibration in front of us. Which one will be the best? And the worst? I think the worst will be the model that predicts the base rate for all instances, as this is the bare minimum that a non-informative but calibrated model can give. And the best will be the model with two peaks, on 0 and 1, a model that "knows" for certain the class of each instance. In between, the rest of models could be ordered in terms of how concentred is the histogram around the mean.
I'm not sure of what I'm saying, so I ask just in case there is a theory that supports this intuitions:

Is it true that, among calibrated models, the more "disperse" the better? For example, the model with the bigger variance the better?
And if so, if you start with a model not calibrated, and then calibrate it, will there be a relationship between the overall predictive power of the first model (in terms of AUC for example) and the variance of the calibrated model? Like some kind of constraint...
Answer: Check the answer that I made here:
Experimentally, I have found that optimizing for what is called there "histogram-width" and optimizing for "roc_auc" is really similar. So yes, I think there is a close relationship.


How can i get FSNamesystem of running NameNode in cluster?

Question: I want to get a running instance of FSNamesystem of HDFS.
However, it is somewhat complicated than I expected.
If I can get NameNode instance of running cluster, then it can be solved.
Is there anyone who know about this stuff?
Thanks!
Comment: have you tried using conf file
Comment: How does it work? Can you give some specific example code for me?
Answer: Actually FSNamesystem is used internally by the NameNode. At the same time, you will not able to create a NameNode instance because the NameNode is already running on the same port. So if your client is not a web application, it is hard to get the running NameNode instance. Maybe you can try using the secondary namenode for this purpose.


How do I type carriage return?

Question: How do I type a carriage return control character, in Windows or in Linux?
I'd like to type a backspace character too.
http://en.wikipedia.org/wiki/Control_character
Answer: In Windows, hold Alt and type 013 on the numpad.
Comment: Note that this is Windows-only
Answer: In Linux, your keyboard will send carriage return if you type Ctrl-M, linefeed when you type Ctrl-J, and backspace when you type Ctrl-H.  Can't say with Windows, since you can be typing into so many different kinds of text-input controls, including a console window.
Answer: In linux, backspace is Ctrl+H, carriage return is Ctrl+M
If you want to insert a literal carriage return/backspace, you must quote it. Quoting is program-specific, but usually (or at least in bash) Ctrl+V quotes the next character. Other programs have different quoting mechanism, e.g. Ctrl+Q in emacs or Meta+V in nano
Therefore:

To insert a carriage return in bash, you would press Ctrl+V then Ctrl+M
To insert a backspace in nano you would press Meta+V then Ctrl+H
To insert a carriage return in emacs, you would press Ctrl+Q then Ctrl+M

Edit: To insert another control character, look in this table in the first column. For example, to type an escape character you would press ^[ (Ctrl+[)
Comment: It seems to be `Alt+V` in nano?
Comment: Whoops! I'll fix the answer
Answer: The decimal value for the ASCII carriage return character is 13. With Microsoft Windows, hold down the <ALT> key and type the numbers "13" on the numeric keypad; the row of numeric above QWERTY won't work. This will insert the "♪" character in to your document.
You can also copy the "♪" character from this answer and paste it in to your document as well.

How do I type carriage return?


Is it legal to sell a mod of a desktop app?

Question: Suppose I was selling a "mod" of an app. You'd purchase the mod, download it (app not included), and run its installer to inject it into the desktop app, so that every future launch of the app would include the mod. The mod would contain only my code, and no one else's. Would this be legal? I am an American. The app in question is a popular electron desktop app.
Comment: Does this answer your question? [Can someone claim copyright infringement after-the-fact?](https://law.stackexchange.com/questions/29505/can-someone-claim-copyright-infringement-after-the-fact)
Comment: Sort of. It asks about whether the original app is copyrighted, but there's no clear explanation of how a mod would fall under an app's copyright. AFAICT, there is no copyright violation for this hypothetical mod since I'm only selling my own intellectual property, but maybe I'm wrong.
Comment: My intuition is that the correct answer would be more clear if the context and nature of the mod were spelled out more. The issue is derivative work liability and that tends to be highly context specific.
Answer: The purpose of this "mod" appears to be to create an unauthorized derivative work of the original copyrighted app. Running the mod and thereby creating such a derivative work would be copyright infringement unless fair use or another exception to copyright applies, and there is not enough info inn the question to come to any conclusion on that point.
Creating the mod itself would seem not to be infringement. However, distributing it with the intention that others, running it, will create such a modified version of the original app might well be contributory infringement. There are signifgicant possible problems here that the answer by user6726 does not address.
Comment: Thanks. It still seems odd, because the mod is what I'm selling, not the derivative work that can be created with it
Comment: @hodler Yes, but your business model works because you are selling to people who you have good reason to believe will use it to violate the law. It is a little like selling glass cutters in a drug marketplace--you would know that people are often buying them to commit break-ins. Not quite the same thing, but it may help one see the point. Or it is like one who sells **access** to a site that hoists pirated works.
Comment: What about the many popular chrome extensions that modify all web sites by default? Vimium and dark reader being two examples
Comment: @hodler
 those do not modify the sites in place, to the best of my understanding.. Rather they modify how the browser displays them.
Comment: There is no distinction between the "site" and how it is displayed. The navigation and design of a site are specified in code just like everything else, and these extensions modify them. And things like the design are also under copyright, no? And there are many examples of extensions that are even more intrusive, such as Grammarly
Answer: Since what you are distributing is (by your stipulation) entirely your own creation, you can sell it or give it away as you like. You can't include portions of the host program without permission of the copyright owner. I also don't address the possibility that you are contractually prohibited from doing this (creating you program requires use of software licensed under the condition that you not use it to engineer add-ons etc). This is analogous to writing a Word macro, which takes advantage of the fact that Word can execute programs.


Is it possible to send a transaction with phantom to an on-chain program with the purpose of modifying that program's data?

Question: const [programDataAddress] = PublicKey.findProgramAddressSync(
  [programId.toBuffer()],
  BPF_LOADER_UPGRADEABLE_ID
);
const programDataAccountMeta: AccountMeta = {
  pubkey: programDataAddress,
  isSigner: false,
  isWritable: true,
};
const modifyProgramDataInstruction = new TransactionInstruction({
  programId,
  data: Buffer.from(serialize(modifyProgramData)),
   keys: [programDataAccountMeta],
});
let transaction = new Transaction();
transaction.add(modifyProgramDataInstruction)
//sign and send transaction with phantom

Answer: There's a lot to unpack here!
From Phantom, or any wallet, you can send any transaction that you want to the network, targeting any program.
For the loader program, I'm not sure what you're trying to do exactly, but it's not possible to just modify program data in place. If you want to change a program, you must create a new "buffer" account, write the program to that buffer, and then upgrade the existing program with the buffer account.  You can read more about deploying programs at https://docs.solana.com/developing/on-chain-programs/deploying
Since you must write the entire program into an on-chain account, and transactions are capped at 1232 bytes, it may take thousands of transactions to upload the program. For that reason, a web wallet like Phantom will be practically impossible to use, unless you want to click "approve" thousands of times!
Separately, it doesn't look like your modifyProgramData instruction will work as is, however, since you're only passing in the program data account. No instructions to the upgradeable loader take only one account.  You can see them all at https://github.com/solana-labs/solana/blob/13107b4eb69120f672896f48d77affa9df45e8b4/sdk/program/src/loader_upgradeable_instruction.rs


How can I conduct penetration testing on VirtualBox

Question: I want to get started with penetration testing, and have read that it is better to conduct such tests using a virtual machine rather than your own computer. I also want to use the internal network function of VirtualBox to ensure that I dont mess anything up. How can i create a network to attack and have an attacker outside this network, but with all of them internal, and with no access to the internet? Is this even what I should be doing?
Comment: Within the VirtualBox, I want to have two internal networks. The attacker is on the first network and the other devices are on the other one. I understand that there must be a device that has access to both networks, through which the attacker can then access the 2nd network. However, I am unsure how to do this.
Comment: @JamesTan that "device" is your host computer already. But if you are starting, you don't want to go that route. Check my answer.
Answer: On the VM settings, set each of the NICs to Internal Network.  This will allow the VMs to communicate with each other but not the outside world.
As to getting started, get a premade .ova of Kali and another of Metasploitable.  If you happen to have access to a Windows Vista or earlier disk (especially if it doesn't ship with any service packs!), install one of those, too.
This will allow you to launch attacks and scans from Kali without accidentally hitting your real network.  Plus, metasploitable is designed to have vulnerabilities, so you're not hitting a proverbial brick wall before you know how to use the hammer.
In particular, in Kali, look at nmap (especially with the --script option) and metasploit.
I noticed you're asking about network penetration, too.  Consider that an additional complication for later, as firewalls are another obstacle entirely, and except where you've enabled port forwarding, you're relying on the targets to reach out (or making them reach out after some compromise they've brought upon themselves; still, not the same as port scans unless you already know which ports you purposely make vulnerable, or are looking for vulnerabilities in the router.)
Answer: You're asking a lot of questions.
To configure a network in VirtualBox, just go to preferences > networks, and create a host-only network.
But then what? what's your plan? you need something to attack. You need to figure out what do you want to focus in.
Web applications? Install some webserver and download DVWA, WebGoat or whatever other vulnerable web application is people using nowadays.
Operating Systems? Install some vulnerable virtual machine like Metasploitable.
You really don't need to create the VBox network because you are going to attack a single system at the beginning. When you are more proficient, you can start installing "real" systems, connecting them and finding vulnerabilities.
Comment: So what youre saying is that I should first have the internal network limited to 2 systems: the attacker and vulnerable VM. Then i can try any attacks using the former to the latter? And only after I am more familiar with these should I start on a 'real' network mentioned above.
Comment: @JamesTan you don't need to create an internal network. Just install the vulnerable VM and access it. If you set the network adapter as bridged, just be sure you are not forwarding traffic to that IP in your router, and that's it.
Answer: I will share my way to do penetration tests with VMs.

I use VirtualBox, typically I start with two machines, the attacker and the victim.
The victim is my target system, it could be only the OS, or an specific configuration or software. Some people already suggest some matasplotaible or other images prepared to be compromised.
The attacker is a recent version of Kali or other environment with the tools for the work.
Configuration of VirtualBox allows me to interact directly with those two VM.
Comment: Welcome on the Security SE! :-)


How to Enable WiX Projects in Visual Studio 2015

Question: When I go the the New Project dialog in Visual Studio 2015, Windows Installer XML isn't available. How can I enable WiX projects in Visual Studio 2015?
Comment: I was never able to get this to work. I tried multiple WiX versions, repaired VS2015, and no luck. Thankfully the extension for VS2017 works...
Answer: Update 2015-09-08: WiX Toolset 3.10 is released with official support for Visual Studio 2015 editions. It is available for download from wixtoolset.org.
You can manually enable Visual Studio 2015 compatibility with WiX 3.9 or earlier:

Copy
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\WiX to
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\WiX
Then execute as Administrator:

"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv" /setup

When you open Visual Studio 2015, WiX 3.9 and earlier projects will be compatible.
Comment: With the latest preview (v14.0.22310.1), step #2 needs to point to `C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat`
Comment: On a fresh installation of Windows 10 that has never had VS2013 installed, After performing the above fix, I also got an error that was solved by adding the file "C:\Program Files (x86)\WiX Toolset v3.9\bin\votive2010.dll" which appeared to be missing. (I added it from an installation on another partition)
Comment: I had some trouble following these steps because what was in my Visual Studio 12.0 directory were not the right files.  I finally figured it out by finding the right files under the Visual Studio 10.0 directory.  There should be several ItemTemplates and ProjectTemplates in the WiX directory, not just one zip file.
Comment: You do not need to run the VsDevCmd.bat. Just run the devenv /setup as admin after files has been copied.
Comment: Thank you @Wolf5 I have confirmed you are correct, and removed the unnecessary step from my answer.
Comment: On a newly installed windows 10 , I've installed wix setup it works for VS2015 now , without any trick.
Comment: Although I installed 3.10, I additionally had to do step #2 because VS 15 didn't seem to detect it.
Answer: This was also my issue before, and it looks like Chris Schiffhauer's answer isn't the best solution by now, as WiX 3.9 or earlier is not specifically build for Visual Studio 2015.
The solution is just to install the latest builds of WiX v3.10 from this link as what they replied on their tweets: https://twitter.com/wixtoolset/status/597796279729528833

@5ervant latest builds of WiX v3.10 support @VisualStudio 2015.

I only have Visual Studio Community 2015 RC when I'm looking for a solution, and upon following Chris' answer, after installing WiX Toolset v3.9 R2, I didn't found the C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE folder nor the C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7 folder in my system.
Comment: I too had only VS2015RC, installed 3.10, Working fine for me.
Comment: WiX 3.10 is still not officially released. I tried the 3.10 pre-release after the public release of Visual Studio 2015, found it to be incomplete, and had to uninstall it. I've updated my own answer to make Wix 3.9 functional with the final release of Visual Studio 2015, and marked it as the accepted answer.
Comment: 3.10 RC is available since last week of June
Comment: Wix 3.10 is not yet a public release, but since Visual Studio 2015 is also pre-release I'm accepting this answer. I will verify that this answer is still the best when Visual Studio is publically released.
Comment: I didn't found the C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE I have VS 2015 only and don't have VS 2012. Neither of the solutions worked for me.
Answer:
If you have VS 2012 and VS 2015, Install Wix ToolSet V3.10.3.
This will install the Wix toolset for 2012 and 2015 will not yet detect it.
Next in Control Panel-->Programs, choose the WIX installation, right click and   change. Choose the Repair option in the toolset UI.
Once repaired 2015 starts detecting the installer and it works fine after.
Answer: I have found that the order of installation is important.  Using VS2015, when I tried to add an existing WiX project I could not select it because the *.wixproj extension was not available.  When I tried to add a new WiX project the "Windows Installer XML" templates were not available.
To fix this I closed VS2015, uninstalled the WiX tools using the Control Panel and reinstalled it by running wix310.exe (version 18.104.22.1686 downloaded from https://wix.codeplex.com/releases/view/619491)
Comment: I had to do this too. Now .wixproj files open in VS2015, but are unavailable in VS2013. Gah.
Comment: I had to uninstall wix311.exe and downgrade to wix3.10
Answer: In my scenario the Wix project in the VS 2015 solution would load fine, but stopped loading one fine day with the exception that wix project type was not supported. The issue kept popping even after already installed the VS 2015 relevant Wix Toolset v22.214.171.1248 was updated.
The solution lied in going to Tools->Extension and Updates, locating Wix extension in the list of extensions and enabling it. It had got disabled somehow. Enabling it asked for restarting the VS 2015, which, upon restarting loaded the Wix project fine.
HTH!
Answer: I got the same issue with 3.11. I uninstalled 3.11 & installed WIX 3.10. Wix version 3.10 worked smoothly without any manual steps with VS 2015.
Atul
Comment: i confirm that 3.10 work perfectly out of the box,  3.11 not, thanks .


Strengthening dis-identification in normal life

Question: How we can strengthen dis-identification in normal life? How can we free our attention from self-reference?
Comment: You might want to elaborate, to attract more answers...
Answer: We should try to see everything as "impermanent, unsatisfactory and uncontrollable"
When you see and contemplate that you can not control anything, not even your body, then you will understand that nothing is really yours.
I mentioned the body because the Buddha used to give this example, as you cannot control it, you cannot prevent it from getting old, sick or die... then what is really yours to control?
Another good technique, very common in Mahayana Buddhism, is to see "emptiness". When you see that everything comes from something else you will understand that everything lacks a self, a true identity, our bodies are just pieces of this planet, combined in a certain way based on the DNA of our parents... See dependent origination
In Theravada Buddhism, they would probably recommend you to focus on anatta (non self), as the Buddha used to say: "This is not me, this is not mine, this is not my self". There is no soul, a permanent soul would contradict impermanence, there is only a everchanging mindstream, so where is the identification? Hope it gives you something to think about!
Answer: It's not good to mix up actual daily living with meditation principles and practice. First one should master meditation and then one will naturally do "dis-identification" spontaneously and quite perfectly during day-to-day life. If one forces it to happen before one has that foundation, it will not be a real dis-identification and will damage both one's meditation life (2nd training) and one's life (1st training).
It's like training for the Olympics. Meditation is the training, the Olympics is day-to-day life. A participant, once already in the contest, should not think about "training"... one should just enjoy the road and live rightfully as best as one can, free of technique. When training on the other hand, the Olympian practices those techniques with all his might, strengthening and teaching his muscles.
One should work similarly on exercising the various facets of meditation, specifically the Wings of Awakening.
Thus, make special time to practice Vipassana and dis-identification will happen gradually. Don't force indifference in daily life or try to meditate. Just live mindfully and right. People are not meditation objects.
Make that special time throughout the day, even 2 minutes of moderately-powered Vipassana can completely change the way you would respond to anger-causing, delusion-causing, love-causing situations...
Comment: Sorry could you clarify the first paragraph, or should I ask that as a separate/new question? Is there a technical name for or authoritative description of what you're describing there, and/or are you speaking from your own experience? What does "forcing it to happen" mean, how do you do that (i.e. what exactly should you not be doing)?
Comment: Its the difference between indifference and natural detachment/equanimity.
Comment: The former tends to have no practice component to it but can be mistaken for the wisdom of the latter which is caused by wisdom either at the mundane level or supermundane level.
Answer: Identification is due to notion or perception. How do dis-identify is by cultivating opposite perception as in Girimananda Sutta. Also perception results in conditioned metal reaction which creates sensations followed by formations when you react to the sensation. Much of these sensations are generally around the head based on the volitional formation. These can be dissolved slowly by brining your attention to them maintaining equanimity and knowing their 3 characteristics.
Answer: Please note below my answer is based on my personal experience.
I can feel your question and I'm fully aware of this situation. What I'm doing is "trying" my best to keep my "attention" focused on part of the body .
Start from something easily could feel in your body. In my case it was touch of lips and chest. To hold this attention you need effort . Be careful this does not mean that you have not kept your attention on your daily tasks.
Do an experiment when you walk next time in a park. You will notice even if you keep attention still you can walk without any problem . If not ,that is a warning that you have identified with the sensation of that body part. By balancing you will find your sweet spot.
But still you will see all your "ego" plays only thing is now it will have less impact. In my experience still this was not help me with emotions . I'm still keep identifying with emotions. But this helped me most of the time with unnecessary Ego "thoughts" / inner chatter  .
Answer: Dis-identification as a practice is really, really, hard.  Probably also not as helpful as you would want it to be either.
Even as you try and explain insights to yourself, you will find yourself confused, identified with your insight.  Given the way our language is constructed, we are hopelessly bound to conventions in our thinking and everyday experience.
An Example: "I think it is going to rain".
That sentence is just f*cked from the get go.
First: I think - implying that you are there apart from your thoughts, and you are taking the action called thinking - and as you're taking this action; thinking has revealed to you some content called going to rain.
Second: it is going to rain. -  It is?  Who is going to rain?  What will he do after he is done raining?  Why is he doing it?
But there's no clear language for saying something like: "Consciousness says wetness coming", or whatever.  If you talk like that, people will stop listening to you.
So, as we are bound by convention, trying to disentangle the threads of identification is extremely difficult, because in our language; there is only identification.  The more you try and disentangle yourself, the tighter the trap gets (think Chinese handcuffs).

What is powerful; what is extraordinary; what is beyond measure is to be aware of identification as it arises.
I've played some powerful games in life; some ridiculously competitive games that bestow upon the winner the admiration of the spectators.
There are basically three ways to deal with winning a game like this inside the context of dis-identification.

Reject it completely.  Do not for one second take pleasure in the victory, and ignore the admiration.  Make sure that at no time do you in any way gain pleasure or conceit from the admiration, and focus at all times on the fact that you are not special; they don't admire you, but rather your position or accomplishment.  Know that it is impermanent - and the success can be taken away at any moment.
Allow yourself to freely indulge in the admiration.  Become dependent upon it for self-worth, and freely step into the role you are playing.  Define yourself as your accomplishment, and embrace the status it bestows upon you.  Live in the role with all of yourself for as long as you can, and ignore any concerns you have about what the future may hold.
Love god and do what you will.

Okay.  The last one was spoken a bit tongue and cheek, and I'll say more about it, but #3 is where you will find peace.
#1  Leaves you in a state of constant tension - embracing what is not so much a state of being open and aware as defensive posture designed to protect you from identification and subsequently loss.
#2 Thrusts you fully into the realm of the Gods.  Short lived and exciting, but devastating when lost, and difficult to escape from.  This is like the ultimate context of attachment for people with worldly success.
#3 Play the game fully.  Why not?  Holding back to protect yourself is every bit as egotistical and constraining as falling in love with yourself as a winner.  All the time playing the game though, you are open and aware of your sense of identification.  You can't stop it when it arises, but all there is to do, is to see it; to notice it; to bring the attachment into the light of consciousness and observe it.
Whenever you truly give your whole self to something, you disappear.  There is no you as the doer; no thing that's getting done.  But if you find yourself indulging in identification, love yourself for it; laugh and let it be.
There is nothing beyond this; no prize for dis-identifying completely.  There is just seeing and letting go.


Difference between "encampment" and "camp"

Question: I recently came across the term encampment. Although I could understand that the word must be very close related to camp, it bugs me that I don't understand why such a long word for the same thing exists. Is encampment a more sophisticated word than camp? The translation for both words refer to the same words in my mother tongue (german).
Answer: As literal nouns these words are synonymous, though "camp" is by far the more common term to describe a location for and collection of temporary accommodations and related activities. In modern usage, "encampment" is usually reserved for military contexts (and even there is rare and used for spice).
As a verb, the words differ: "to camp" is to engage in the activity of camping, i.e. "to go and live in a camp or as campers"; "to encamp" is specifically to "set up a camp".
But perhaps the biggest difference is that "camp" is used synecdochically to mean "the people of a camp", and by extension, metaphorically to mean "the members of a particular [often political] party". "Encampment" is never used this way (it always means the camp as a whole; the location, the structures, the people, the activity; but never only "the people").
Bottom line: contemporary English speakers almost always use "camp" today; the only time we'd use "encamp" is as a verb, to specifically describe the activity of "setting up a camp". The only time we'd really use "encampment" is as a colorful synonym for camp, almost always in a military context.
Comment: Now _this_ is a really good answer.
Comment: Thank you very much. The military context was the thing I missed while thinking about what the difference between those words could be and why _encampment_ was used in that text I read.
Comment: No problem. Note also @Jim's observation below that while *camps* might endure, *encampments* are always temporary (precisely because *encampments* are established by armies with a bounded objective: they win or lose, but either way go home) whereas *camps* can be long-lived or even permanent, as in refugee camps.
Answer: Camp is basically short for encampment.  Families camp out, but an army encamps itself at a location.  This location is then called the encampment.
Comment: +1 Also, encampments are typically ephemeral while camps can be permanent.
Comment: Thanks @Jim, yet another thing that makes the difference more clear to me.
Answer: Encampment has more of a military feel to it, similar to bivouac. A military camp may be called an encampment, whereas the tent you pitch by a fire site in a national park is merely a camp, or a campsite.
When I was in the Civil Air Patrol, encampment referred to the two weeks in the summer spent on an Air Force base, during which the cadets received training in various Air Force activities, including flying and various other activities.


When was the last time a quaterback from University of Miami (FL) threw a touchdown pass?

Question: As of 22nd October 2023, when was the last time a quarterback from the University of Miami (FL) threw a touchdown pass in the NFL?
Comment: It's not so difficult though. Get the U QB history list -> QB still active -> latest (game) stats. "*The long list of big-time Miami quarterbacks most Canes fans resonate with started with Jim Kelly (1978-1982), and it continued on with many others. Bernie Kosar (1982-1984), Vinnie Testeverde (1982-1986), Craig Erickson (1987-1990), Gino Torretta (1989-1992), Ken Dorsey (1999-2002), Jacory Harris (2008-2011) and Stephen Morris (2010-2013) represented several more of the top signal callers for the Canes*" (FanNation - Sports Illustrated). Latest ones are as easy to find as these...
Comment: This is bіtсh work: https://sports.meta.stackexchange.com/questions/909/what-is-the-consensus-on-do-it-for-me-questions
Answer: Pro Football Reference is tough to use anymore since it requires a subscription to see all data.
Deducting from the following query, Miami, FL, the answer is: Vinny Testaverde (2007)


How can I pass my Windows credentials in cURL?

Question: I'm writing a script that uses cURL to pull data from an internal web server. I can explicitly use --user combined with --ntlm and everything works well, but I can't get it to recognize whomever's logged in and pass it transparently. If I visit the same site in Chrome/Firefox/IE it immediately gives me permissions without any prompts (We are using a proxy here if that's important). The server is using IIS.
Answer: I use (in a Windows domain environment):
curl --ntlm -u : ...

cUrl knows to supply my domain credentials and it works every time.
Comment: Thanks @BillP3rd! Just a heads up: this works perfectly when running curl within a Windows command prompt, but does not work if you are running within a terminal emulator like Cygwin on your Windows machine.
Answer: Use -u : which provides an empty usercode and password, to get cURL to pick those up from the credential store.
I use this on Unix with GSSAPI and curl -u : --negotiate ...
Answer: To elaborate on @Phil P answer heres how I did it from my ubuntu box.

Find out the IP address of your domain controller instructions on how to do that here
Install kerberos sudo apt-get install krb5-user
Enter the following in your /etc/krb5.conf
[libdefaults]
    default_realm = YOURDOMAN
    # note that this must be in UPPER CASE
    krb4_config = /etc/krb.conf
    krb4_realms = /etc/krb.realms
    kdc_timesync = 1
    ccache_type = 4
    forwardable = true
    proxiable = true
    v4_instance_resolve = false
    v4_name_convert = {
        host = {
            rcmd = host
            ftp = ftp
        }
        plain = {
            something = something-else
        }
    }
    fcc-mit-ticketflags = true
[realms]
    YOURDOMAN = {
        kdc = YOUR_DOAMIN_CONTROLLER_IP
    }
[domain_realm]
    yourdomain = yourdomain
    yourdomain. = yourdomain


Scattering and bound States

Question:
So from my understanding, as long as $E>0$ you will have scattering states and these scattering states will always result in an imaginary $\psi$, but bound states can also have an imaginary $\psi$? Is this correct and or is there a better way of looking at this maybe more conceptually?
I noticed in a footnote in Griffiths Intro to QM 2nd ed. in the finite square well section he mentions that he wrote $\psi$ in terms of sin/cos instead of exponentials because we know the solutions will be even or odd because the potential is symmetric. But he also does it for the infinite square well when it's not really symmetric (at least with respect to the y-axis) and doesn't do it for the delta potential. How come he doesn't do it for the delta potential, is it not really symmetric? and why does he do it for the finite square well?
What is the benefit of "exploiting the even/odd solutions" and what does he mean by that?
Comment: Usually Schrödinger Hamiltonians have only continuous spectrum for $E>0$ with associated scattering states but there are exceptions (Anderson localisation in random systems). Why should the eigenfunction ψ be imaginary in this case? One can always multiply with a constant phase factor rendering it real (in fact states are described by unit rays rather than vectors). As to your second point, such choices are usually made for convenience.
Answer: I also don't quite understand what you mean by "imaginary $\psi$", but let me give you some general, more mathematically correct view.
In general, what we measure is the spectrum of a self-adjoint operator. For the energy, this operator is of course the Hamiltonian. Now, since it is self-adjoint, its spectrum will lie on the real line. To have stability, we also usually require that the Hamiltonian be bounded from below, which implies that the spectrum, i.e. the energies in the system have a minimum value, a ground state.
Now, the spectrum is divided into three parts (by Radon-Nikodym), two of which will be very interesting to us: First, there is the point spectrum, the eigenvalues. This spectrum corresponds to real eigenvalues which have eigenvectors, i.e. normalizable states that take on this eigenvalue. Then, there is the absolutely continuous spectrum. These are NOT eigenvalues. They do NOT have an eigenfunction in the Hilbert space, instead you can only find an approximate eigenfunction or a "generalized eigenfunction", such as the Fourier waves, which cannot be normalized. The third part, the singularly continuous spectrum is somewhat different but we won't go into that here - often, you try to prove that for what you want to do, it doesn't exist anyway.
The crucial point is that the RAGE theorem tells you what your physical intuition already told you before: The point spectrum (the eigenvalues) corresponds to bound states, the absolutely continuous spectrum corresponds to scattering states. This has nothing to do with $E>0$, although if you consider a potential that is zero at infinity, this is precisely what you expect: For energies greater than the potential, the "wave" should "escape", i.e. scatter. It's also not true that the bound states cannot occur at $E>0$, this is also entirely up to the nature of the potential and how it behaves at infinity.
The second part of your question is already answered in the comment by Urgje: If you know that your solution must have a certain symmetry, exploiting this usually makes your calculations simpler. Try doing the same calculations without exploiting the symmetry, you'll end up at the same result and just take more time.

Scattering and bound States


What do you think about Mobile Robotics Programming Toolkit?

Question: Did anyone use Mobile Robotics Programming Toolkit? What do you think about it?
I am currently studying the SLAM problem (I am quite new in this area) and I am planning to implement a Mono Slam solution based on Extended Kalman Filter (C++). Do you recommend to implement my solution on top of Mobile Robotics Programming Toolkit, or it would be better to start from scratch?
Answer: Well, I'd say it depends. Why would you use it? Does it provide anything special that you need, like feature extraction or visualization? Since it's for learning purposes, I'm assume their monoslam implementation is of little interest.
If not, why bother? Once you have your measurements, you pretty much only need a decent linear algebra library. I recommend Eigen; it's easy to use and does everything you need.
Disclaimer: I haven't actually used MRPT.
Answer: FYI, Eigen is also included in MRPT. I am starting to use MRPT as well. It's quite a good tool for SLAM beginner->advanced I think.


PGP private key and decryption issues

Question: I have created a private and public key set and encrypted a message to a friend with their public key. I then turned off my machine, and since it is not in persistence mode, my keys were deleted, but I saved my private and public key on a flash drive. Will my friend still be able to decrypt the message? If not, would he be able to once I boot my machine and add my keys to gpg again?
Answer: Yes, he will be able to decrypt your message, but you will not be able to decrypt any of his messages. The public key is used to encrypt a message, and as it is intended to be public, anyone who has it can encrypt a message that only the corresponding private key can decrypt. The private key on the other hand is used to decrypt the message. As long as your friend still has their private key, they will be able to decrypt a message you have created with their public key, regardless of when you created it.
Note that, while you can still encrypt messages to him (as you can always get his public key again), you will not be able to sign your messages. The private key is required to sign an encrypted message.

PGP private key and decryption issues


How to start with bitcoin?

Question: I have been listening about bitcoin from my colleagues and they convinced me to investment into bitcoin. They also suggest me couple of websites to start with. I have started with one of them and invest $150 bit seems no profit from them. Can you guys please suggest the sites or the people to with I can start my investment. Also need some guideline about how that works, sell and buy, how and when and all that primary stuff.
Answer: One of the popular trading sites is coinbase.com. There you can sign up and buy and sell - should be straight forward. Of course there are other sites as well.

How to start with bitcoin?


How to open a Photoshop file in Illusrator preserving effects

Question: So, I have a logo which I made in Photoshop and it has a lot of effects. The logo itself is a shape, not a raster image, and I wanted to continue editing it in Illustrator but without the need of recreating it again (because it's not easy). Is there a way to open it in Illustrator with all the effects and stuff intact?
Answer: I'm not sure how many effects will transfer over but what you can do is "save as" as .EPS file. Then open that file in Illustrator. Go to the "Layers" palette and open up that layer and you'll see all the shapes grouped individually with the effects. For example, you'll see the vector circle and the drop shadow layer on its own. Sometimes depending on effect, it places that effect in a subgroup of the vector. Again, not sure how complex the logo is but hope that helps. Also, keep in mind "all effects" not editable at this point.
Comment: Thanks, I'll try! Are the layer masks going to be there too?
Comment: Sort of but in funky kind of way. If you want to edit the shape you'll have limitations and the shape is married to the mask. Meaning the shape doesn't come in as a fully editable shape. And I haven't found a way to combine them as a sort compound path. I would play around with and see if it works for you. It might just be what you need but if you can rebuild in Illustrator, I would highly suggest that for a cleaner file. Good luck!


Combine/Concatenate Two Datasets

Question: I would like to combine/concatenate two datasets that don't have any key/field relationship. Attached to this post are the example and the result format. Is this possible? If yes, how can this be done?
Answer: Where do you want to do that?
Within the dasboard, then use the union command to combine the datasets.
To create a new dataset, which then can be used in multiple dashboards/lenses create a dataflow and use an append node.

Combine/Concatenate Two Datasets


Amazon container registry login

Question: Since we use AWS for a number of other projects, when it came time to publish private docker images in a repository, I really wanted to use Amazon Elastic Container Registry.
However, the login process seems overly complicated.
Is it correct that the only way to log into the ECR is to use the aws command line tools to generate a 12hour token, and use that with the Docker login command?
Any advice on scripting this process without AWS tools?
Answer: You must use AWS tools to generate a temporary authorization token to be used by Docker CLI since it does not support the standard AWS authentication methods. Quoting the explanation from the official AWS ECR authentication documentation:

Because the Docker CLI does not support the standard AWS authentication methods, you must authenticate your Docker client another way so that Amazon ECR knows who is requesting to push or pull an image. If you are using the Docker CLI, then use the docker login command to authenticate to an Amazon ECR registry with an authorization token that is provided by Amazon ECR and is valid for 12 hours. The GetAuthorizationToken API operation provides a base64-encoded authorization token that contains a user name (AWS) and a password that you can decode and use in a docker login command. However, a much simpler get-login command (which retrieves the token, decodes it, and converts it to a docker login command for you) is available in the AWS CLI.

Pay attention that although you must use AWS tools to generate the authentication token, using the AWS CLI is not the only option. You can call the GetAuthorizationToken using any form of the AWS tools which is convenient to use from your scripts.
The get-login command is available only in the AWS CLI as opposed to other AWS tools. As quoted above, it is claimed to be a simple way to perform the authorization.

Amazon container registry login


rt3070 won't connect to WiFi

Question: So I'm purchasing various WiFi adapters for the sole purpose of using Wireshark and other pentesting tools. My first two purchases were TP Link 722n with the chipset ar9271/ath9k driver(works great) and the 727n chipset rt5370/rt2800usb driver(works great). My third WiFi adapter is a generic brand rt3070/rt2800usb driver. The reasoning behind the different chipset versions is to identify which chipsets work best in certain situations. Now my problem is that the third WiFi adapter rt3070/rt2800usb won't connect to WiFi(wlan3,4,ect..). My concern is if I make any modifications will that limit my use of other chipset versions, is the rt3070 a usable chipset version. Any help would be great.
Answer: A rookie mistake. I forgot to whitelist the MAC address associated with the new WiFi adapter. Once the MAC address was whitelisted the adapter worked fine.

rt3070 won't connect to WiFi


Lost Phone, I want to locate my phone

Question: Can I get the location of my phone it does have WhatsApp on it,
I lost it about 20 hours ago and it was online(life) on WhatsApp 11 hours ago
I tried google-locator but it is out of reach because I switched off background data.
Comment: Welcome to Android Enthusiasts! Have you already checked with our [lost-phone tag-wiki](/tags/lost-phone/info)? You're not the first asking this question ;)
Answer: You can try locating your phone using Google's find my device option. Just go to Android.com/devicemanager log in, and it will show you the location of the device. If it doesn't show your location, in that case your location option is probably off, or your phone is off, or it was factory reset.
WhatsApp doesn't have a function to find your phone. So unless you had a different app that does that, you might be out of luck.

Lost Phone, I want to locate my phone


Making user notifications in rails

Question: I want to make a simple user notification in rails with just text.  I want there to be multiple notifications obviously so my question is do I have to create a whole new migration and create an association with my User model or is there some way to just extend a "notifications" text attribute in my User table?  I guess you can just insert line breaks in between notifications but that's not what I'm looking for as that sounds like it would get too messy.  Thanks!
Answer: If you just want to store notifications only you can tell Rails to treat it as an Array (notifications' column type should be text):
class User < ActiveRecord::Base
  serialize :notifications, Array
end

If you want to store any additional notification details (like author or timestamps or whatever) you should probably go for a separate model.
Rails docs: Active Record, search for "Saving arrays, hashes, and other non-mappable objects in text columns".
Answer: If you want to keep a history of the notifications for users to look at later then you would want to store it in the database. Meaning yes, you would want to create a new table in the DB. You should do this via a migration script. This new model should be associated to the User model so you could do something like user.notifications to retrieve all their notifications.
Also if you used timestamps in the new Notifications model you could do some fun analytics later.
Answer: you can use rails polymorphic association for this purpose, using this mechanism you can relate your notification model to other models without modifying target table.
A better example is given in this link
http://railscasts.com/episodes/154-polymorphic-association

Making user notifications in rails


How can I recreate this shiny chrome effect?

Question:
I need to know how this shiny almost wet effect with the text. It also appears to have a ring light of some sort seen in the letter. I've tried principled BSDF node with metallic all the way up but it just doesn't look right. I've also tried using an environment texture (studio 2 from polyhaven). The second time I tried to use it without the hdr. This is what mine currently looks like
Comment: With a metallic surface, all reflections get the tint of the base color - that's a characteristic of metallic surfaces. This way you cannot get the white reflections on the object. What you can do to have metallic and "normal" reflections is setting _Metallic_ to 1 with a bit of roughness like 0.3 or so (as you like) and also set the _Clearcoat_ to 1 with that low default _Clearcoat Roughness_. This way the metal surface gets a shiny reflective layer on top of it. Also, to have awesome reflections you need something in the environment that can be reflected.
Comment: are you need source files? hahaha carefully [![enter image description here](https://i.stack.imgur.com/PLBM7.jpg)](https://i.stack.imgur.com/PLBM7.jpg)
Answer: For me it's more plastic that metallic, you could lower down the Roughness and increase the Specular, also mix the Principled BSDF with another one with a darker color, with a Layer Weight as factor in order to create a darker outline around the letter:
Comment: Thank you, what did you do for the lighting?
Comment: A studio hdri and 3 area lights