Do the people in a cluster communicate at a speed faster than light?

Question: This can be seen when any of them are talking with each other or especially when they are embracing each other. Does that mean that the communication is happening instantly, therefore faster than the speed of light?
Comment: Since light can go around the world in a [fraction of a second](https://answers.yahoo.com/question/index?qid=1006042439064), could you really notice a difference between instant communication and near speed of light communication?
Comment: @Wikis Only if the distance is significant enough
Answer: Short answer, no, they don't need to be communicating faster than the speed of light to accomplish what we see in the show.  Long explanation follows.
The only time I recall us seeing what we need to answer this is when Will and Riley speak on the phone while also sharing.  We see them interact via their connection faster than the cell phones, but it's pretty close, the cell phones are like an echo.
At the time, I believe Riley was in London, and Will was in Chicago.  That's 3,945 miles (across the surface).  The Earth's radius is 3,959 miles.  Doing some math, that means that the straight line distance between London and Chicago is ~3784 miles (burrowing through the Earth), and the speed of light is 186,282 miles/sec, so a speed of light direct connection would take 0.020313 seconds.  So about 20 millisecs.
I couldn't find a solid figure on cell phone lag between the US and UK.  I did find this post which suggests we're dealing with a lag on the scale of hundreds of milliseconds at best.
For an audible echo, you need an absolute minimum of 1/15th of a second gap between the sounds, which is .0666666 seconds.
So the sensates can, at worst, communicate at roughly the same speed as we route cell phone calls around the surface of the Earth (or via satellite) to match what we see in that scene, which is well under the speed of light.  Therefore, no need to assume they can communicate faster than the speed of light.  They can be communicating well under the speed of light to pull off what we observe in the show.
Comment: My geometry skills are really rough, so please hit me up in chat if my math is wrong here.
Comment: I get a circumference of 24875.1 miles for the Earth, so 3945 across the surface is 0.15859 of a 360 degree angle, or 57.0924 degrees. So if you make a right triangle with the radius as the hypotenuse, and another side X as half the straight-line distance from London to Chicago, then the angle opposite side X will be half of 57.0924 degrees, or 28.546 degrees. Then sin(28.546) = opposite/hypotenuse = X/3959, so X = 3959*sin(28.546) = 3959*0.47786 = 1892 miles, the number you got. But then you have to double that because to make a right triangle we had X as half the distance, so 3784 miles.
Comment: @Hypnosifl Augh, I thought I had the 2x at the end accounted for.  Bah!   Thanks for the correction!
Answer: Though it's not explicitly stated in the series, there are scenes where the action outside of a "linked" conversation is dramatically slowed.  This does give us some context at the speed the sensates can communicate.
examples from episode 1x10:

Wolfgang is on his knees during the gang fight.  He is asked a
question by his cousin with a gun to his head. At this point, Lito
'shows up' and he and Wolfgang have a 1 minute conversation while the
events in the background move very slowly. When everything resumes,
it appears that only a couple of secondshave passed.
Lito is fighting Hernando and being beaten.  While laying on
the ground, Wolfgang appears to help him up and offers to take over.
During this interraction, we see Hernando dragging Daniela away
in slow motion while conversation is happening in 'real time'

While the 2 sensates are communicating, everything else is moving at a very slow rate, but not frozen.  If communication was at light-speed, it would be near-instantaneous and we'd see the surrounding events be frozen.
My conclusion:
No, they do not communicate at the speed of light..
BUT..
Considering the reference of outside events being super slow, I believe they can have full conversations at the speed of thought.
Answer: No, it does not appear they are communicating faster than light. Nor would they need to. And even if they were, you would not be able to determine it unless one of them was living off-planet to confirm it.

All of our known electromagnetic communication phenomena take place at the speed of light and experience delay only when there is an interaction with a technological medium supporting or relaying the signal.

Electromagnetic waves are created by the vibration of an electric charge. This vibration creates a wave which has both an electric and a magnetic component. An electromagnetic wave transports its energy through a vacuum at a speed of 3.00 x 108 m/s (a speed value commonly represented by the symbol c). The propagation of an electromagnetic wave through a material medium occurs at a net speed which is less than 3.00 x 108 m/s. (REF: The Physics Classroom)

Since it doesn't appear to matter whether the Earth is in between two communicators, whatever their communication uses for a transmission medium is NOT delayed by the mass or interference of the planet, itself.

You do not need faster than light communications on the surface of a planet. The speed of light is fast enough for real-time communication. The only time it wouldn't be is if you were communicating between stellar bodies such as the Moon or other planets in the solar system.

If for example, one of the cluster were to be standing on the moon and did not have any form of noticeable delay, could you make the case for instantaneous communication because there was NO lag in their signal.


Going from ♭VI to I

Question: I have seen and heard a bVI -> I progression in quite a few scores to create an inspiring feeling (for example, from an F major chord to an A major chord) and was wondering how this could be justified with theory. Any clues on that?
Comment: @piiperiReinstateMonica, a correct theoretical justification could help one extrapolate to other scenarios or generate ideas for ways to apply the theory to different chords. For example, if the answer is 'FMaj and AMaj triads share a chord tone, and the other two chord tones are only separated by a half step' then this provides some ideas for creativity: one could try *two* shared chord tones, a *whole* step movement, etc.
Comment: @jdjazz Yeah ok, I guess my point of view is that something as simple as F - A offers a large array of interpretations for creative uses. Many doors are open. Why does this generate an "inspiring feeling" to someone - and there should be a _theory_ that describes this inspiring feeling? But ok, the validity of an answer is supposed to be checked by the OP by trying to extrapolate variations of the same theme. IMO, just about any change and ambiguity in harmonic feeling is very inspiring, and I can't get enough of that stuff. Sit at the piano and press down keys, it's hard to not get inspired.
Comment: It is clear from the example that the OP means `bVI -> I`. Perhaps someone allowed to make one-character edits could make this change.
Comment: @Tim If the prevailing key is F, then A is the III chord. The typical move here would be to go from III to vi or perhaps IV, as you have analyzed it.  However, the OP's description of the sound as "inspiring" makes me think the key center is A, where F is borrowed from the parallel minor. This device is used in a lot of popular music, e.g. "Gravity" by John Mayer (with a V in between, but that is not necessarily the case). At any rate, the best we can do is take the OP at face value, since he labels A as the I chord.
Comment: Or for a better example, the song "Love Theory" by Kirk Franklin vamps on something like `Gb | Bb4 Bb`. The tonal center is clearly `Bb`, but starting on the `Gb` chord invokes the tension associated with the parallel minor, and the resolution of the note D in the `Bb` certainly conveys a feeling of inspiration. I don't know if classical theorists have a name for this particular device, but jazz musicians often call it (I admit, vaguely) "the major/minor thing."
Comment: @piiperiReinstateMonica, if the answer is: 'Think about this as being in the key of FMaj, not AMaj. The AMaj chord is really A7, whose major third (C#) offers a brief uplifting feeling before wanting to resolve to Dmin, the relative minor to FMaj,' then this might inspire one to try FMaj - Amin - Dmin to generate the same bass movement without the uplifting quality that A7 offers.
Comment: @Max - as noted in my answer, in this example, the prevailing key would seem to be F. How could it be A? Therefore it would perhaps make more sense to call it 'from I to III'.
Comment: To be clearer - are you in key F, and playing an A chord, or in key A, and playig an F chord? The two are quite different .
Comment: The OP stated the case clearly: `A` major is the `I` chord. In my answer I pointed out the ambiguity of whether there is a flat on `VI`. The way the OP wrote it suggests `A` minor where `F` major is diatonic, needing no flat, and the `I` chord changes from major to minor. I suspect they didn't mean minor mode so I explained it both ways.
Comment: @Max, I can't wait to read your answers on these topics! Great examples
Answer: The chord you are referring to is the ♭VI, F, not the VI, which would be F♯ in the key of A major.
This is one of several chords that are commonly borrowed from the parallel minor, in this case A minor. Some other commonly borrowed chords are the ♭III or C and the ♭VII or G. These chords are all very effective in major keys and can be found in hundreds of songs in all styles. Also, with the exception of the ♭VII there is a common tone between the two chords which tie them together in your ear.
Try playing an Am to an F and back a few times, then do it with an A major. You will hear the similarities and the differences between the two.
Comment: So far this is the more legible of only two answers that correctly address the OP's question. Others have interpreted the question as though F was the I chord, but the OP states explicitly that A is the tonic, and his comment ("I already 'know' how to use it") suggests that he is experienced enough in playing music to mean what he says.
Comment: Thanks ! I wanted to actually write ```bVI``` but somehow I had a brainfart and forgot to do it. Thanks for your answer, it is excactly what I was looking for. As @jdjazz put it, having such an explanation allows me to toy with this concept in different manners than just thinking of it in term of "that one cadence that sounds uplifting".
Comment: @Max the trouble writing a short answer is the OP didn't give the key and only two symbols. Either `F` or `A` could be borrowed chords.
Answer:
...justified with theory...

"Explained with theory" would be a better approach.
Really basic progressions like IV V or I IV are easy enough to explain in isolation, because they are such common fundamentals. Explaining VI I seems to be a problem only in the sense it isn't a common progression.
One technical quibble. If I is A major, then I suppose A major is the key: A: I. If that is the case, then F major is bVI. You could say the key was A minor in which case F major to A major would be Am: VI I. The point is about which chord is chromatically altered?
The real problem is VI I provides almost nothing to explain.
You can simply point out the two chords are chromatic mediants, and chromatic mediants are fairly common.
There isn't any surrounding harmonic context with only VI I so you can speculate about how it might be used.
The chromatic mediant idea can be expanded. Chromatic mediants could loop in a circle, ex. F A C#(Db) F all major chords where the progression is by ascending major third. All the chords are sort of "equal" in that loop and any one of them could get some treatment to become a tonic. Like: | F A C# C# | F A C# C#  |A Dm A A | or A: bVI I III III | bVI I III III | I iv I I |. In that treatment the minor iv uses the lowered sixth degree but as the subdominant of A. You could tack on a cadence like 'iv V7 Ioriv V65/V Vfor a formal phrase ending. The point is theF(and theC#`) are just shifting around the tonic chord - explained as a tonic prolongation - then other chords solidify the key.
Another possibility is some kind of deceptive cadence structure. We need barlines to make that clearer. Instead of VI I we show ... VI | I ... that could be elaborated into Am: i V7 VI (d.c.) | A: (mode change to major) I...
Mode change and color (chromatic harmony) are one way to approach it. That can create a dramatic mood, or as you put it "...an inspiring feeling."
Answer: This progression was quite usual in early renaissance before there existed a major/minor tonic system.  There were just chords triads in root position, a later theory could explain that F is the III of dm and A the V. So if you just ask about F and A out of context this could be ♭VI - I in A or iii - V in dm or it could be I  V/vi in F.
In A major F is the ♭VI and is also called the mediant chord but it the progression is usual in the opposite direction: I - ♭VI.
Answer: Maybe not theory per se, but consider how V7 moves to I. The M3 moves a semitone up to the tonic, and the m7 moves a semitone down to M3 of that tonic. The 5 note of the tonic has remained the same - as the 1 of the dominant. Small movements all round.
Think about F major. F A C. Going to A major, the A remains, while the F moves a semitone down to E, and the C moves a semitone up to C♯. Small movements all round. There is often minimal movement of a set of notes to produce an inspiration.
It could be considered as VI>I, but if the prevailing key is F, then it's more likely to be called I>III. Or - I>V/vi.
Answer: In a key of F the A major chord is a dominant for VI (Dm).
However, since IV and VI share two chord notes, A could flawlessly go into B♭.
Answer: I don't know how anyone might use a theoretical justification for anything, but in practice, a motion from F to A can be handled or utilized like this

If the song is prominently in A major, the F chord can be used a bit like a Dm. Instead of A - D - Dm - A you use A - F - A.
Repeat A - F/A - A as a moody coda.
Played rhythmically F - A sounds like a fanfare. Or F - G - A. It's kind of an antithesis of F - G - Am.
If the song is prominently in A minor, F - A is a nice or cheesy happy ending
For soloing or melodies, switching between F and A can be handled like a switch between A minor and A major. Or a bluesy A mixolydian on the A. A minor pentatonic makes a nice bluesy feeling over the A major as well, it exploits the mixture "is this A major or A minor".
Comment: I'd have said in key A, an F chord is more likely to herald a key change up a semitone to Bb. Not a lot like going to relative minor.
Comment: @Tim Interesting! To me F is _obiously_ a switch to Am as a first choice. I use that all the time for a moody harmony change without really going anywhere, which can be done whenever there are a few bars with suitable "empty" space and no incoming traffic from other musicians. Jumping to Bb with a plain F ... I'd use something stronger for that.
Answer: IF the F chord acts as a pre-dominant, it could be explained as the b5 substitution for B7, the dominant-of-the-dominant of A.  This would be a stronger argument if it were F7, which shares the A - Eb(D#) tritone with B7.
Otherwise, we could just point out that A major and F major triads share a note - and it's a pretty important note in the key of A major, the tonic!   Any triad that contains that note isn't going to sound TOO 'left field'.
Any chord can lead to any other.  When there's a unifing factor - perhaps notes in common, or the resolution of a tension - the progression can sound smooth.  That's good.  When there isn't, the progression may sound dramatically unexpected.  And that's good too!
Answer: Smooth Move
A Maj = A B C♯ D E F♯ G♯
F Maj = F G A B♭ C D  E
Phrygian Mode = 1 ♭2 ♭3 4 5 ♭6 ♭7
A Phrygian = A B♭ C D E F G
Make F the root, and that's the F Maj scale.
Take 1 3 5 7 and you have FM7... or just the basic triad = FMaj.
So in other words, the phrygian mode has an interesting, elusive, aetherial, somewhat diminished feel (by the various subtle nuances obtained by flatting the 2nd of the natural minor mode.  But that doesn't matter... if you just want to think of the phrygian mode sounding cool and unusual... always a cool way to intermix major and minor feels {ala Jimi and others!}.  BUT... since you asked the question, you must also see the beauty in the theoretical connections!  So YES!!! To you and I, it does!).
So in short, introducing an F Maj chord into an A Major context suggests a rather smooth move from the A Ionian to the A Phrygian context!
As we all know, music is subjective.  Context defines just about everything.
So I believe this is the answer you are looking for.
But as a test, instead of F Maj -> A Maj, try F Maj7 -> A Major.  Also try A Phrygian melodies (A minor with a ♭2 aka B♭)... perhaps some 1/2 step tensions (tritones, diminished chords)... or even C7, and see if they fit your desired feel.
If so, then I am correct. (Or better yet, this connection is correct).
If not... then sorry!
Comment: Thank you for your very appropriate edits Glorfindel.  Question:  How does one access musical symbols such as those sharps and flats?

Going from ♭VI to I


Cannot reach Pi via ethernet after disabling wireless interface

Question: I have a raspberry pi running Arch Linux ARM connected on two interfaces. It uses systemd-networkd.

eth0 is connected on a DMZ. It has a static ip and it's behind a router with a public ip and port forwarding.
wlan0 is connected on a wifi network (LAN). It has a local ip.

I can ssh into the pi through both the public ip and the local ip. There is a webserver running on the pi, and I can access ip via the public ip.
However, for security reasons, I now want to prevent the pi to connect to the local network. But whenever I disconnect from the wifi, I lose all connectivity to the pi on the public ip (and local ip as well as expected).
This is the command I tried to disconnect from the wifi:
systemctl stop firstname.lastname@example.com

ip link set wlan0

I would like to find out why shutting down the wlan0 interface would also block any connection on a public ip that is supposed to be routed through the eth0 interface. There is probably a routing problem and I would be glad if you could help pinpoint it.
Please the result of a few commands that might be of interest:
$ ip route show
default via 172.16.16.16 dev wlan0 proto dhcp src 172.16.16.25 metric 1024
10.0.0.0/29 dev eth0 proto kernel scope link src 10.0.0.2
172.16.16.0/24 dev wlan0 proto kernel scope link src 172.16.16.25
172.16.16.16 dev wlan0 proto dhcp scope link src 172.16.16.25 metric 1024

$ ip address show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether dc:a6:32:1c:2b:b1 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.2/29 brd 10.0.0.7 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::dea6:32ff:fe1c:2bb1/64 scope link
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether dc:a6:32:1c:2b:b2 brd ff:ff:ff:ff:ff:ff
    inet 172.16.16.25/24 brd 172.16.16.255 scope global dynamic wlan0
       valid_lft 80544sec preferred_lft 80544sec
    inet6 fe80::dea6:32ff:fe1c:2bb2/64 scope link
       valid_lft forever preferred_lft forever
....
.... other docker related interface

Answer: The problem was with the route to the gateway.
ip route add default via gateway_ip dev eth0 solved my problem.


What do I need to know to get accepted into college for any music-related major?

Question: Right now, music is really the only career I am seriously thinking about. But, I can only play the flute and saxophone at an okay-ish level and only know the very basics of music history and theory. I am 200% certain that this is not enough to get accepted into any sort of college. Are there any courses I can take in high school to help with this, or any good books, or websites? I don't have any checkpoints as to where I need to be or what I should expect to have to know at all. This isn't very urgent, since I won't even be in high school for a year at least, but I would still like to know.
Comment: If you want a career as a performer and you're not already first-chair AllDistrict (or equivalent),  just stop.  You have no idea how competitive the performance world is.
Comment: @CarlWitthoft I'm not familiar with the American system (assuming that's where we are talking about), but the OP isn't even in high school yet. Surely they have a bit of time up their sleeve? That being said, backup plans are never a bad idea.
Comment: You have time but you need to start working, very seriously, if you want to have a career in music.  I have to agree with @CarlWitthoft on this
Answer:
I am 200% certain that this is not enough to get accepted into any sort of college.

I am 100% it is enough!
Although it may be different in different countries, music schools in the US are pretty much exclusively interested in the talents you show in your major. If you are applying for music performance, they are interested in your instrumental abilities. If you are applying for music composition, they are interested in your compositions.
Some schools will give various placement tests (usually music theory) during audition weekends, but only rarely do these tests actually factor into your acceptance.
The well-rounded education in music theory, aural skills, music history, keyboard skills, etc. is something you will get as a part of your degree. You're welcome to practice/study these things now---and if you high schools offers theory courses, take them!---but it's not a requirement to get into a college.
With that said, if I could give one piece of advice to someone your age considering a career in music: Take piano lessons. Piano lessons will give you a wonderful background that will help in your later theory courses, and they will save you money by preventing you from having to take some (or all) of the required keyboard courses.
Answer:
I am 200% certain that this is not enough

I can agree 100% with Richard that not only are you on track, you may even be ahead of the curve. Not getting into a prestigious private conservatory is one thing, but there's a wide range of options and you have plenty of time.

Are there any courses I can take in high school to help with this, or any good books, or websites?

Take whatever your school has. Join the band/orchestra/jazz band/choir, whatever they have. If they don't have it, see if you can do some kind of independent study. Though it was many years ago and every school is different, I was able to replace all my "study halls" with "independent music study" where I could find a corner in the music department and practice or work on things the music teacher would give me.
Get a method book or series of them for your instrument(s) and get a theory book. Work through them at your own pace, there's no hurry.

I could give one piece of advice to someone your age considering a career in music: Take piano lessons

And I also agree with Richard about piano. It's the common tongue and you'll probably be required to take piano anyway so you might as well start learning now. You don't need to be a virtuoso or anything, you just need some basic competence.
Lastly, when you get closer to applying/deciding, try to talk to an advisor or somebody at the school. Every school is different and will have different expectations. I was able to get some advice on exactly what I had to brush up on to get in.
Answer: It seems you have plenty of time, so keep going with flute and sax(es), and add clarinet to your list - a not-so-bad transition from what you already play.
As previously mentioned, piano is a must. Partially as it sets out things quite graphically, thus making theory more easily understandable.
It's not a bad move to go through the exams of a local or national board - don't know about U.S., but in doing so, there'll be structure to your learning, at the higher grades playing will help with theory, and vice versa, and you'll have some certificates to wave at the interview. Level of playing for entry to College/Uni is probably about the same as in U.K., where grade VII/VIII gives you a good chance of acceptance. A dip would be even better, and attainable with enough time - and talent - and maybe a teacher...
Answer: What musical job do you see yourself doing, a few years after college?  If as a performer of flute/sax, I'd expect you to be rather more than 'okay-ish' now. Start practicing - hard!   For general musical training, you ask about high school courses - well, what does the music department of YOUR high school say?  If you're doing more than vague dreaming, any music teacher will be delighted to help you and point you toward what's available, in or out of school.  Start tomorrow!


SQL Server Log Entry Gathering?

Question: I'm trying to better understand how SQL server does log buffering and flushing in order to better balance costs and performance.  I know that unless you use delayed durability, log entries for a transaction will be flushed all the way to disk at commit time.  However, what I'm really curious about is what else might get flushed along with that.  For example, if the log disk is already busy flushing the entries for a previous transaction (and thus can't flush for the current transaction yet), will entries for other transactions also get flushed to disk at the same time, or will the entries for each transaction get flushed serially.  Given that in most cases the actual flushing to disk is by far the most time consuming operation and the fact that for logging operations, the time to flush is affected only minimally by the size of the flush (at least for the frequent case of many small transactions), it would seem like a good optimization for the log processor to pipeline flushes such that while one flush is happening, entries from any committed transactions awaiting a flush are gathered together and flushed together rather than one at a time.  This would improve throughput with little impact on the latency of the first transaction (it might even improve average latency).  Does anyone know if such an optimization has been made in SQL Server?  If it has been made in a specific release, can you identify the release and where you found that information?
Answer:
However, what I'm really curious about is what else might get flushed along with that.

Any log lower than the LSN currently requesting to be flushed will be flushed as well. Log records are put into the log buffer in order and all transactions are serialized to the log buffer for that database. Note that individual log records aren't flushed, they are put into log blocks and log blocks are flushed.

Does anyone know if such an optimization has been made in SQL Server?

It's called group commit, and it stalls the normal commit for a few ms if it can group more together for better overall performance (roughly-ish speaking). I believe it was added in 2008R2.
Comment: I'm searching for some reference to that, but can't find anything.  "Group Commit" seems to be MySql and Oracle's version of "Delayed Durability".
Comment: @James It's not delayed durability. It's grouping smaller commits together to get better throughput to the log manager. There isn't anything that's really been blogged about it, but here you can see a performance object for it: https://msdn.microsoft.com/en-us/library/ms189883.aspx under `Group Commit Time/Sec`.

SQL Server Log Entry Gathering?


Efficient private set intersection protocol for small sets

Question: I need to implement a PSI that will be used on mobile devices to find mutual contacts. Assuming the set cardinality from both parties A and B are less than 1000, what would be the most efficient PSI protocol that I can use in such a scenario without involving a third party? Would it be possible to extend this protocol for multi-party PSI?
Comment: Is it a requisite that both parties receive the output?
Comment: Yes! Both parties should receive output.
Answer: I'll focus on semi-honest security in this response. You can divide the relevant PSI protocols into two categories:

In Diffie-Hellman-based protocols (originating in Huberman-Franklin-Hogg),  the parties must calculate a few exponentiations for each item in their sets.

In Oblivious-transfer-based protocols (the leading ones in this case would be KKRT and Chase-Miao), the parties first perform a few hundred base OTs (each requiring a few exponentiations), regardless of the size of their PSI sets. Everything that comes later in the protocol uses only much more efficient symmetric-key operations, like calls to AES/SHA.

The Diffie-Hellman approach invariably has lower communication cost, no matter how big the PSI sets are. And when the PSI sets are small, the time to perform a few exponentiations per item is less than the time to perform the "base OTs" of the other protocols. In general, Diffie-Hellman PSI for small sets is a great rule of thumb.
But how small is small? You mention sets containing ~1000 items. With sets of this size, it's no longer absolutely clear which protocol is best. In experiments that we have run in our research group, the cutoff (where OT-based protocols become faster) is just below 500 items on very fast networks and just above 1000 items on very slow networks. But even on fast networks, the difference in performance is nothing to get hung up on for this application: we're talking 0.35 vs 0.25 seconds to perform PSI.
In summary, I would recommend implementing the Diffie-Hellman PSI protocol of Huberman-Franklin-Hogg, since (1) running time is close enough to the lowest; (2) communication is lowest; (3) simplicity of the protocol makes it easier to implement.
Edit Dec 2021: We have recently published an improvement to the Huberman-Franklin-Hogg protocol for PSI on small sets. It is faster, uses less communication, and has stronger (malicious) security. This would be my latest recommendation.

To answer your question about multi-party PSI: It is now fairly easy to convert most 2-party PSI protocols to multi-party.
Most PSI protocols are built from an underlying oblivious PRF (in Diffie-Hellman PSI, the oblivious PRF is $x \mapsto H(x)^k$ where $H$ is a random oracle). In KMPRT we showed how to construct multi-party PSI from 2-party OPRF. One of the constructions is secure against semi-honest adversaries, and the other has a security property with more fine print. In a paper that will appear at Crypto 2021 we show that this second construction is in fact secure against malicious adversaries.
Overall, multi-party PSI essentially involves each party doing a modified 2-party PSI with one central party (the one who receives the output).
Comment: At the time of your question I was not ready to share our latest work and experiments. But in [this paper](https://eprint.iacr.org/2021/1159) from CCS of this year, we have an improvement to the DH-PSI protocol for small sets. You can see our latest experimental results in this paper.
Comment: Thanks for your answer. The PSI sets would vary between 50 and 2000. However, the average size of the set is around 150. I think as you suggested Diffie-Hellman-based protocols would be the best fit. Can you point me to the experiment results from your research group if they are publicly available? Can you also point me to a couple of the latest DH-based PSI research papers to start with?


Modal page and button click

Question: I have a modal page with login button. Clicking on the button verifies the username or password. And if incorrect, error messages will be shown while still being inside the modal. But I can not find a way to do this.
Please help me.
Comment: Is this an implementation question or UX question?
Answer: You can find a few possible answers on this page -
Most Common Log-in Problems and Solutions
This is a common question. There must already be a few questions related to this.

Related question:
What is best practice for designing form error messages?

Modal page and button click


How to Parse send push without gcm registration?

Question: While implementing push with Parse, I didn't use anything related to Google Cloud Messaging. I didn't open Google dev console and switch on GCM messaging, also I didn't get any sender ID and I didn't register devices to obtain registration ID, however Parse could send push. I wonder Parse uses its own socket? In Parse Android source code, I couldn't catch anything related to this. Now all Parse migrating services need GCM registration ID including with Parse's own open source push backend solution. Can someone give detailed information about this?
Comment: I suppose you are aware Parse is closing up and you are asking this out of curiosity?
Comment: @DanieleSegato Yes, I do.
Answer: Parse DO use GCM. They just use their own account.
You don't have to believe me, the android SDK has been made open source a while ago:
https://github.com/ParsePlatform/Parse-SDK-Android
These are the class used to integrate to GCM:
https://github.com/ParsePlatform/Parse-SDK-Android/blob/bdd5f50d51d30030b9df12c0e09d08d8859e64be/Parse/src/main/java/com/parse/GCMService.java
https://github.com/ParsePlatform/Parse-SDK-Android/blob/e2329512e5531f0efd56671c02f476285f87386b/Parse/src/main/java/com/parse/GcmRegistrar.java
https://github.com/ParsePlatform/Parse-SDK-Android/blob/bdd5f50d51d30030b9df12c0e09d08d8859e64be/Parse/src/main/java/com/parse/GcmBroadcastReceiver.java
However they have a method of supporting Push notification without GCM, it's mostly made for non-Google devices or to release the app in non Google-Play market. It's called PPNS
The switch between provider is done inside this class:
https://github.com/ParsePlatform/Parse-SDK-Android/blob/bdd5f50d51d30030b9df12c0e09d08d8859e64be/Parse/src/main/java/com/parse/PushService.java
the PPNS class is supposedly handled by a class called com.parse.PPNSService which is not in the github code. It is instantiated via reflection, I'm guessing they add it later in the jar in someway and they didn't make it public. It surely would have to open and handle it's own socket.
Comment: That's what I exactly I ask is PPNSService and I thought that it was reflection therefore I need a confirmation, Thanks for that. Also Parse uses ppns when developer explicitly doesn't add gcm requirements even if device has google play services. anyway thanks.
Comment: Have you any idea about how to migrate parse installation data to GCM Server Application (which is create by us using PHP)?


How can I make use of iterative "work in progress" versions of papers

Question: I often find myself writing the N+1st version of the same paper: we might have a short periodic internal report, a longer report for the funding agency, and  we're now writing a conference paper.
As N gets larger, this gets more and more confusing.
While the early iterations were good, they had different purposes, lengths, and level of details.
For example, the internal "work in progress" version of a paper might have many preliminary results, but almost no introduction.
The conference version needs to have a more detailed introduction, but fewer (more focused) results.
Currently, I find that writing paper version N+1 requires starting with a rough copy/paste from version N, printing all version until N, and then looking in all previous versions for any missing information.
What are some strategies for better handing these multiple iterative versions of these papers?
Note that in contrast with this question, we don't start with a complete result (something that could be considered the "superset" paper).
Early iterations are mostly rough drafts, and sometimes middle versions do diverge because of different audience/requirements.
Answer: Not sure if I understood you correctly, but if you need a better workflow for managing the progress and evolution of your drafts, then I think the question you've linked to actually answers your question.
A combination of git and modular LaTeX can help you to:

track changes in your draft(s)
make sure new versions (and new versions of new versions) start with everything that was in the version they were started from
merge changes between versions
split your draft(s) in such a way that it is easy to include different bits and pieces in different versions
greatly simplify collaborative work
reuse parts of your projects (e.g. git project setup, LaTeX macros/environments/styles, any compilation scripts)
and many more things


Including both individual and state fixed effects

Question: Consider we have the following regression model:
$$y_{it}=x_{it}'\beta+\alpha_{i}+\upsilon_{it}$$
  where we have data on $N$
  individuals for $T$
  time periods. Now, if we estimate $\beta$
  by fixed effects, we only use within individual variation. As a result, the effect of time invariant regressors are not identified.
Now, if, lets say, $x$
  contains the individual's state of residence. If we include state dummies, what do coefficients on those dummies identify? Where does the variation come from? In the extreme case, if all the variation in state residence is across individuals (i.e no individual moves states), then will this coefficient be identified?
Comment: Similar: http://stats.stackexchange.com/questions/194725/time-fixed-effects-inclusion-of-time-invariant-variables-possible/194737#194737
Answer: If you have individual fixed effects, your estimate of the state dummy will be based upon within individual variation (i.e. it will be based upon the people that move across state lines). If no one switches state, then the state dummy will not be identified.


Lagom without ConductR?

Question: Is it practical or wise to use Lagom in production without ConductR? The commercial licensing is putting me off. This framework looks like it could be pretty arduous to deploy and custom tooling for that can take a lot of effort to get right.
Comment: Lightbend has left these production specific tools and implementations open ended in the open source version of Lagom. You can implement a `ServiceLocator` yourself and manage autoscaling, logging and the like yourself using other open source tools like Consul and Nomad for example. Lightbend makes it easier for you to just commit to ConductR by providing all these implementations out of the box with a great SLA backing it. They have recently acquired OpsClarity which, I believe, is bundled in their commercial package.
Comment: @stelterd Did you find a ConductR replacement?
Answer: (disclaimer: I'm a Lightbend employee, currently core member of the Lagom team)
Edit (Nov 2018): Please refer to https://www.lagomframework.com/documentation/current/java/ProductionOverview.html#Running-Lagom-in-production for up to date information on this topic.
(original answer, Aug 2017)
A lot has changed in the Lightbend stack since this question was added over a year ago. For example: ConductR is now free to use in production for up to three nodes.
Also, the team behind ConductR is also working on providing tools to deploy a Lagom application on Kubernetes. The efforts on that front are very advanced and some of our sample apps can be deployed in Kubernetes already.
Answer: Your question is rather open-ended and so let's start with "it depends".
If

you're comfortable managing your scaling within the configuration of your Akka cluster,
your usage doesn't violate the open-source licensing terms of lagom, play and Akka, AND
you don't have sufficient cash flow to justify leveraging Lightbend's production suite,

then you arguably can deploy with a minimum of effort and custom tooling.
If those conditions don't hold, your options are to go elsewhere (e.g., Spring Cloud) or retain Lightbend. You may find going elsewhere has it's own cognitive load and/or commercial expense.
Hope that helps even 7 months later.
Answer: The other answers are higher level, but I can essentially say "yes." I'm currently deploying a Lagom service to be hosted on a Kubernetes cluster, and I'm not using ConductR or any of the commerically licensed components.
You will need to dig a little bit into some Play internals to start the service properly, and if you want to hook in with some other service locator you may need to implement one yourself, but it certainly isn't impossible and I think it's less effort on net.
Answer: Being honest it really worth to pay, because you got much more, good reporting dashboards, automatic cluster formation and what really cool is split brain resolver....
But sometimes agree when you are working on a project that don't have a lot of money, you can do some small tricks and get it work and may be then do all what really lucks or buy enterprise subscription.
So Lagom can be very easy being used without service discovery at all if you will delegate all to Kubernetes DNS or without Kubernetes just put load balancer before each service and use its address.
How this can works
Each lagom service that you have should be external service

Production run configuration should be mixed with

ConfigurationServiceLocatorComponents

Service that should communicate with another one should be started with extra parameter that tell lagom that this service is external one and can be communicated directly(all can be in JAVA_OPTS as for play application)

-Dlagom.services.your_service_name=http://k8s_service_name.default.svc.cluster.local:9000

Lagom without ConductR?


Why is a potato cooked in issur not chanan according to the Rema?

Question: If a potato or any parve permissible food item is cooked in liquid with a forbidden substance why does it take on the identity of just taste (tam k'ikker) rather than becoming a new entity which is chatika nases nevela?
Comment: Please put references in shulchun aurach to where you are talking about
Answer: Without a reference, it's hard to know exactly what you are talking about.
Firstly, Ch'n'n isn't exactly a "new item". We are still talking about taste.
The general situation these two concepts come up is in the situation of transferring taste. If the potato is removed from the unkosher liquid and put into another liquid, how do we determine whether that second liquid becomes unkosher?
As is commonly known, we need 60 against the non-kosher food to nullify its taste. However, this is an originally kosher potato, so what do we measure 60 against?
Generally speaking, the Mechaber holds that in this case (depending on other factors which I won't go into), we only need to measure against the amount of non-kosher substance that got absorbed by the potato. The Rama holds that we need to measure against the whole potato - we treat it as if it is a neveila (and this is derabbanan).
So, I think you might have Rama and Mechaber backwards, although hard to tell without more information and sources in the question. I recommend learning Shulchan Aruch Yora Deah 92:2-3 and commentaries to get a good handle on these halachot.


Can a police officer make an arrest while working undercover?

Question: I am a playwright working on a new play related to Ag-Gag laws. My plot involves a woman who is trespassing with another animal rights activist to film animal cruelty at a CAFO. Unbeknownst to her, the "activist" is actually an undercover policeman who has infiltrated the animal rights group. Once the woman has captured the abuse on her camera, I would like the undercover guy to reveal himself and arrest her. But is this at all realistic? (I don't mind a little poetic license, but I don't want to make it completely far-fetched.) Thanks for any insights!
Comment: In some places, Undercover Police are allowed to have sex with prostitutes before making an arrest. I'm pretty sure your situation is standard police work.
Comment: If you don't mind, could you specify the country and if possible, the region in that country, this is taking place?
Comment: @hszmv This is for a play, so it probably doesn't have a specific jurisdiction, and it just needs to look good to people (preferably including people who know something of procedures).
Answer: A lawyer would have several questions here: is trespass an arrestable offence in this jurisdiction? Did the officer persuade the woman to commit the trespass (entrapment)? Do citizen's arrests and warrantless arrests exist here? It sounds, though, as if the level of realism you are looking for is "her lawyer turned up and a few hours later she was out on bail" or thereabouts: for that purpose, your scenario is fine.
As Justin pointed out, though, it's somewhat implausible to have an undercover operation revealed simply to make an arrest for trespass; whether she has taken photographs is irrelevant legally, so the time and resources (including the officer's cover) have been expended simply to make a misdemanour arrest that could have been made by a passing patrol, or even a security guard.
Comment: There is the concept of citizens arrest in common law, which occurs when a civilian witnesses a crime and detains the accused until such time as lawful authorities can take over.  These are frowned upon by the police because the police are trained to make lawful arrests, where the citizen arrest is being done by an armature and might get close to vigilantism.  You can face legal responsibilities from doing it wrong for this reason.
Answer: Realistically, if a bust was going to be made, uniformed cops will make the arrest of the entire group, or all who were in attendance, including the undercover officer who will be separated from the rest of the group to be debriefed.  This is to keep the fact that the undercover officer may still need to be undercover as the lawyer may be able to pass word from the arrested activist to the rest of the group (cops cannot listen to lawyer's conversations with their clients... if the arresting officer is undercover, than she could warn others about the undercover officer and stop further investigation of the group.
Answer: well, the officer is on duty even if its undercover he can make an arrest and even if he was not in duty her would still arrest her and call his cop friends to write it up as his arrest.
The bigger thing is the cop does not want to blow his cover.


How to edit filtered rows in interactive report in apex oracle

Question: I want to edit rows in interactive report. Before or after filtering. I have made column link in select query using ''edit_link but in Regions > Interactive Report > Column Attributes > [Column Name (edit_link)] > Column Link section i can't send data using item because there is no items on list to pick in page with interactive report. In normal report there are items i can select to read data from and send to (item and value boxes). Is it any solution to edit filtered rows?
Answer: There are a couple of ways that come to mind to accomplish this.  I will explain an approach that starts off with where your prompt left off.
1. Create a FORM Page
This is to edit a record from your Interactive Report.  I assume that the query behind your IR is not a complex, multi table query, which will not work with this approach unless you build this form on a Stored Procedure (instead of Apex's automatic DML functionality).
Build a Form on the Table from the IR
From the Application Builder menu, CREATE a New FORM.  Select "Form on a Table or View".  Select the TABLE to build this form on and fill in the information required to map it.  You will be asked to identify the PRIMARY KEY of the table from your Interactive Report.
Set All Branching Activity to Return to the IR
When Prompted for "After Page Submit And Processing Branch to Page" and "When Cancel Button Pressed Branch to this Page"  Choose the page number of your Interactive Report. Any activity on this page, when done (whether through CANCEL or SUBMIT and process), you will want it to go back.
2. Set Column "Edit Link" Properties
Under the Column Link section, set the target to "Page in this Application", and add the page of the form previously created.  Items should now show in your popup.  Select the Page Item from your Forms page that corresponds to your Table's Primary Key.  The value can be derived in some way, or just point to a the column it came from. (i.e., #MY_KEY_ID#).
The key part that was probably missing for you was the existence of the edit form required to modify the record.  That is not an automatically created feature when you create an IR report.


What is a simple example of an asynchronous javascript function?

Question: I am really struggling here to get to grips with writing asynchronous JavaScript. Could you please provide an example of a simple JavaScript function which is asynchronous written in plain JavaScript (and not using Node.js or JQuery)
Comment: @ryan: But asynchrony has nothing to do with single-threaded-ness.  Aside from Web Workers (obviously), all Javascript asynchrony is still single-threaded.
Comment: Thanks for the comments guys but why the vote down of my question? - its these type of confusions about async I wanted to clear up for myself and others.
Comment: @SLaks read Bergi's answer. That's basically what I am referring to.
Comment: @ryan You're contradicting yourself. You said AJAX is the only "plain" Javascript that is asynchronous, but then you're agreeing with Bergi about the other types of asynchronous things in Javascript...
Comment: Is it possible to move this question to a more appropriate forum. This seems a valid question and both it and the answers are a useful, straight-forward resource.
Answer: JavaScript itself is synchronous and single-threaded. You cannot write an asynchronous function; plain JS has no timing API. There will be no side-effects from parallel threads.
What you can do is use some APIs provided by your environment (Node.js, Webbrowser) that allow you to schedule asynchronous tasks - using timeouts, ajax, FileAPI, requestAnimationFrame, nextTick, WebWorkers, DOM events, whatever.
An example using setTimeout (provided by the HTML Timing API):
window.setTimeout(function() {
    console.log("World");
}, 1000);
console.log("Hello");

Update: Since ES6 there are promises as an asynchronous primitive built into plain JavaScript, so you can do
 Promise.resolve("World").then(console.log); // then callbacks are always asynchronous
 console.log("Hello");

However, on their own they're not really helpful when there is nothing you could wait for (such as a timeout). And they don't change anything about the threading model either, all execution is run-to-completion without any events interfering midway.
Comment: @jasdeepkhalsa: No, the javascript itself does not run in parallel - it's always single-threaded (WebWorkers being the workaround). What happens in background is the waiting, the file access, the HTTP request etc.
Comment: I thought async was less about timing and more about running a function or set of functions as a kind of background task so that the JavaScript interpreter need not wait to run the next function. Or in other words, running functions in parallel rather than in a series. Is that true?
Comment: +1, very true; 'async' tasks are just the ones shifted in the execution queue. Hence the (sometimes) useful trick with `setTimeout(func, 0)`. )
Comment: Hello from 2016: "JavaScript itself is synchronous" --- is this still kept after the `Promises` were added to the standard?
Comment: @zerkms: I guess the answer needed an update, yeah
Answer: This is asynchronous:
setTimeout(function(){
   console.log('1');
}, 2000);

console.log('2');

2 will be written to the console before 1. Because setTimeout is async.
Answer: Here's one very simple example:
for (var i = 0; i < 10; i++) {
  window.setTimeout(function() {
    console.log(i);
  }, 2000);
}

You might expect these console.log() calls to show you 0, 1, 2 etc., as in this snippet:
for (var i = 0; i < 10; i++) {
  console.log(i);
}

But in fact only 10s will be printed! The reason that functions passed into setTimeout function (as its 'callback' argument) will be invoked after for loop is completed - i.e., after i value is set to 10.
Yet you should understood one thing: all JavaScript in a browser executes on a single thread; asynchronous events (such as mouse clicks and timers) are only run when there's been an opening in the execution queue. Here's a brilliant article written by John Resig on this topic.
Comment: The problem with the loop is a scoping issue, not because of it's asynchronous nature. If they were scoped correctly, the loop would work as expected. Although it's a good explanation of the functions passed to `setTimout` executing _after_ the `for` loop


Jackson Exception when parsing Yaml with a Map of List values

Question: I have a Yaml document that includes map entries that correspond to lists.  Here's an example:
environments:
  qa: [ 'us-east-1' ]
  staging: [ 'us-east-1', 'us-west-2' ]

I am using Jackson 2.3.2 to parse the document into a class using the following field & accessors:
private Map<String, List<String>> environments = new HashMap<String, List<String>>();

@JsonProperty
public Map<String, List<String>> getEnvironments() {
    return environments;
}

@JsonProperty
public void setEnvironments(Map<String, List<String>> environments) {
    this.environments = environments;
}

I'm testing the reading of the Yaml file with the following:
inputStream = new FileInputStream("src/test/resources/configuration_test.yml");
config = mapper.readValue(inputStream, MyConfiguration.class);

The following exception is thrown with a stacktrace that's not particularly helpful:
Caused by: java.lang.IllegalArgumentException: Can not find a deserializer for non-concrete Collection type [collection type; class com.google.common.collect.ImmutableList, contains [simple type, class io.dropwizard.metrics.ReporterFactory]]
at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory.createCollectionDeserializer(BasicDeserializerFactory.java:814)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer2(DeserializerCache.java:392)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer(DeserializerCache.java:350)
at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:263)
... 42 more

Any idea how to get Jackson to parse the Map value as a List?
Answer: I had the same problem extending dropwizard's configuration class. As CAB mentioned, using Jackson.newObjectMapper instead of new ObjectMapper solved the issue. Now my test looks like this:
ObjectMapper mapper = Jackson.newObjectMapper(new YAMLFactory());

MyConfiguration myConfig = mapper.readValue(fixture("fixtures/configuration.yml"), MyConfiguration.class);

// Asserts

PS: I am using io.dropwizard.testing.FixtureHelpers.fixture to fetch the YAML file.
Comment: I'm using 0.8, the `Jackson` class is part of dropwizard  `io.dropwizard.jackson`. You can either upgrade your DW version or use  `ObjectMapper mapper = new ObjectMapper(new YAMLFactory());`.
Comment: I'm not able to do the same as newObjectMapper() doesn't take any arguments.
Comment: Which dropwizard version are you using?
Comment: Dropwizard version is 0.7.1
Answer: You need to properly configure your ObjectMapper. In dropwizard, there is Jackson.newObjectMapper()
Answer: This was actually due to my binding class extending from the DropWizard 'Configuration' class.  Parsing the Yaml mentioned in the issue worked fine when using a binding class that did not extended from the DropWizard 'Configuration' class.
It's worth noting that the exception occurred only when run in a JUnit test (TDD, of course), not when running the DropWizard application.  The exception did not occur when the Yaml file was read during normal application startup.


Struggling with voicing an alveolar trill

Question: I was hesitant to post this question, as I imagine a ridiculous amount of people post here asking about it, but I can't find help with this specific issue. After some time and tutorials, I'm able to vibrate my tongue in what I think is the right position, but that's about as far as I've gotten. I cannot for the life of me add my voice to it. I sound like those spring door stops when you flick them. It's also delayed, it takes a second or two of building up pressure before I'm actually able to initiate the trill and once I do, it's accompanied by a throaty sound like I'm trying to cough up phlegm. Whenever I do try to add voice it sounds hard, almost like I'm trying to say "tra." My theory is that my tongue is still to stiff so it takes a lot of air to get it to move. Even if my assumption is correct, I have no idea how to fix it. Does anyone know how to help with this issue?
Comment: What language are you referring to? In Spanish, an alveolar trill does not involve the throat.. In any case, you have to make the tip of your tongue vibrate. This does exist in Scottish English and Scottish Gaelic but not in AmE or BrE.
Comment: Well, I gave you an answer....
Comment: What is your first language? Where did you learn it (i.e. if it's English what kind of accent do you have?)
Comment: Tip: Start singing a note, and then whilst holding the note do your trill.
Answer: alveolar trill

How to roll your Rs

The answer is simple: Gravity.
Rather than training to activate the muscles, it's more important to
learn how to deactivate them. Lie down on a flat surface or tilt your
head up to a 90° angle, relax your tongue, you`ll find the gravity has
helped you to pull it down to touch the hard palate. Now your tongue
is prepared in a pre-tapping position automatically, without pulling a
muscle.
The next step is also simple: exhale. Allow strong exhalation to force
the air pass the oral cavity and into the small gap between your
tongue and hard palate, you'll soon notice the tip of your tongue
starts to vibrate. Now that the muscles are completely relaxed, this
process should be much easier to achieve than when they are stiff.
Once you are able to sense a vibration, you are officially enrolled in
the alveolar trill exercises. Keep your head tilted, practice every
day, until both two parts of the tongue muscles get used to the
movements and are able to function separately. Once vibration is
guaranteed, try gradually bringing your head down to a 45° angle while
making the sound, and then eventually down to the normal position. At
this point there's no need to involve the vocal cord, as the practice
is all about muscle training and physical memory. The more time you
spend on practicing every day, the quicker you'll be able to vibrate
your tongue while looking horizontally.
Now it's time to do some letter combinations. The vibration noise you
now are able to make should sound like a "tr." Use your vocal cord and
make a "dr" sound, you'll find it more challenging. This is because
now your exhalation activates not only the vibration of your tongue
but also your vocal cord. As the old saying goes, practice is still
very much the key to success.
Answer: It's called practice. You are expecting too much too fast. It will happen when it is suppose to happen. The more you simply practice the more it will happen. The less you try to force it to make it happen sooner the sooner it will happen. It is really that simple.
It is not a technique issue but a practice issue which means that it is a muscle coordination and brain issue and control issue.
It's like riding a bike, once you get it then you get it. If you just ride the bike and enjoy the process including falling off then it will just happen. If you put too much pressure on yourself you will inevitably no be able to do it because you will try to do it and actually just get locked in to doing it wrong.
There are more important things in the world than being able to trill your r's by tomorrow.
It's actually very easy to do but when I was "trying to do it" I couldn't. Then after a while I remembered as a kid I used to make "machine gun sounds" and well, I realized I could do it. Then it was just playing around to get variations. It is not so much a technique as it is an "idea". Meaning if you can connect the idea in your mind(imagine yourself doing it in some sense but really you hear it in your head) then you will almost be able to do it. If you just let it naturally come out you will do it. If you try to force it chances are you will over tense your muscles making it not work.
In some sense it's sort of like spitting a loogie caught in the back of  your throat but that is more in the back. Anyways, that is even too much. Once you start trying to analyze it then it becomes self-defeating.
As you listen to people do it more you will just naturally do it. It is something that you pick up on in the process so if you can't do it now it really just means you are not suppose to be doing it now.
Move on, it will happen, trying to forcing it is just wasting energy. Listening to people tell you how to do it is the wrong approach. They will tell you wrong(It is not how you do it even it they seem to be "experts". How you do it is not to do it(think Buddhist monk approach)). If you just stop worrying about it one day you will just be able to do it and the more you can move past it the sooner that day comes.


optimum hardware setup for android emulator?

Question: is there a "best" setup for the android emulator? It runs terribly slow on my mac os as well as my windows 7 32-bit. I was just wondering if there's an optimal setup as far as 32-bit vs 64 bit, or linux/windows/mac is concerned?
Comment: Are you running an ARM or x86 system image?
Answer: Actually the bad news is that everyone has the same problem . its dead slow !! . try using the Intel based emulator(instead of the arm-7 )and download the haxm software that Intel provides. Its available for the Mac too.
You can download the Intel based emulator and the haxm software (only for windows I guess) from the SDK manager.
Comment: I have to agree, even on a pretty high end development machine the emulator is pretty damn slow. It's faster the higher spec the PC but in general there's a lot of waiting around wondering what's gone wrong.


Vagrant managed docker container doesn't start

Question: I've been trying to write a vagrant file to start up my docker container to run a small web app I've been writing. However when I try use vagrant up I eventually get an error saying
The container started either never left the "stopped" state or
very quickly reverted to the "stopped" state. This is usually
because the container didn't execute a command that kept it running,
and usually indicates a misconfiguration.

If you meant for this container to not remain running, please
set the Docker provider configuration "remains_running" to "false":

  config.vm.provider "docker" do |d|
    d.remains_running = false
  end

I'm very new to vagrant so I'm not really sure what the best way to try and fix the problem is.
My vagrant file contains
Vagrant.configure("2") do |config|

  config.vm.synced_folder "thelibrary", "/thelibrary"

  config.vm.provider "docker" do |d|
    d.image           = "django-dev"
    d.has_ssh         = false
    d.ports           = ["8000:8000"]
    d.cmd = ["python", "/thelibrary/manage.py", "runserver", "0.0.0.0:8000"]

  end

end

I'm not sure why it says the command doesn't keep running. I can run the docker container with the same command and it will spin up my django app without any issues.
Answer: I had the same problem but adding option
d.create_args = ["-i"]

solved my problem
Answer: I spent the day try to get the docker machine running.. finally got it working. Here is what I have in my vangrantfile, hope this can at least get you started:
config.vm.provider :docker do |d|
    d.image = "paintedfox/postgresql"
    d.name = "db"
    d.cmd = ["/sbin/my_init", "--enable-insecure-key"]
end

vagrant status returns me this:

Current machine states:
  dev                       running (docker)

Another solution that you can try is to remove all your existing images and start fresh, it could be that your image is broken.


Estimating conditional probabilities on a large corpus of parsed documents

Question: Scope
I have a large corpus of (parsed) documents where each has multiple terms and few associated codes.
My objective is to estimate the conditional probability $P(code | terms)$.
First attempt
After some limited review of the literature, I prototyped a solution using a Bayesian network.
First, I turned the corpus into a one-hot-encoded matrix $M$.
Next, using pgmpy, I estimated the DAG representing the network:
from pgmpy.estimators import BicScore, HillClimbSearch
from pgmpy.inference import VariableElimination
from pgmpy.models import BayesianModel

model_estimation = HillClimbSearch(data, scoring_method=BicScore(data))
estimated_model = model_estimation.estimate()

Next, I built a model, fitted it and instantiated a variable elimination object:
bayes_model = BayesianModel(estimated_model.edges)
bayes_model.fit(ohe_corpus)
inference = VariableElimination(bayes_model)

At this point I could run something like:
inference.query(["code_1", "code_2"], evidence=["term_i", "term_j", "term_k"])

which returns a table with the conditional probabilities.
This last step was very fast.
Synthetic data
As the next phase, I created a synthetic data set and used the pipeline described above to experiment with it.
It comes as no surprise that the bottle neck of this approach is the model/DAG estimation phase.
Here are some timings I took:
duration_sec  n_codes  n_terms  related_terms_per_doc   noise_terms_per_doc  nodes_count
  141.957661        3       15                      6                     2           40
  178.062985        3       16                      6                     2           43
  904.152860        3       18                      6                     2           48
 1031.557014        3       20                      6                     2           52
 1040.274353        3       17                      6                     2           48
 1135.333175        3       19                      6                     2           52

n_codes is the number of codes my corpus has
n_terms is the number of terms my corpus has
related_terms_per_doc is the number of terms related to the code of the document
noise_terms_per_doc is the number of terms not related to the code of the document
nodes_count the number of nodes in the estimated DAG.

In each test I had the same number of documents: 500.
For the sake of brevity, I skipped some details how I constructed the synthetic data.
This growth in time might turn to be an issue for my application.
My questions

How feasible this approach is assuming I'm having about 50k documents using thousands of terms and hundreds of codes?
I understand that the complexity of the DAG estimation exponentially depends on the number of unique terms and codes in the corpus. Is that correct? I might be OK with an estimation step that takes 12-24 hours but I need to know about this in advance.
Assuming that the answers to the above questions are that it is rather impractical, what would be a workaround? One idea I had is to run a PCA on the correlation matrix of the one-hot-encoded terms data and build a DAG on the reduced matrix. However, this proved to be a problem because the switch to floats exploded the number of unique terms. I tried to round the loadings yielded by the PCA, but so far this seems to be a dead-end. What workarounds can I consider to tackle this problem?

I tend to believe that this is a well studied problem and I would be thankful for pointers and ideas.
Answer: If you have $n$ documents $D=d_i, i \in 1:n$. According to Bayesian rule, following equation can be derived for a specific term $T=t$ and code $C=c$:
$$
\begin{align}P(c|t) &= \sum_{i=1}^n P(c,d_i|t) \\&= \sum_{i=1}^n \frac{P(c,t|d_i)P(d_i)}{P(t)} \\&= \frac{ \sum_{i=1}^nP(c,t|d_i)P(d_i)}{P(t)} \\&= \frac{ \sum_{i=1}^nP(c,t|d_i)P(d_i)}{\sum_{i=1}^n P(t|d_i)P(d_i)} \\& \text{put } P(d_i)=1/n\text{ inside,}\\&= \frac{ \sum_{i=1}^nP(c,t|d_i)}{\sum_{i=1}^n P(t|d_i)} \\\end{align}
$$
Where $P(c,t|d_i)$ is the probability of $C=c,T=t$ (among all the $(C,T)$ combinations) in document $d_i$, and $P(t|d_i)$ is the the probability of $T=t$ (among all the possible values of $T$) in document $d_i$. You can calculate $P(c,t|d_i),i \in 1:n$ and $P(t|d_i),i\in 1:n$ directly from your corpus, put them into above equation will get you the answer.
Hope it helps!


For awhile or In awhile- Would you say I haven't moved in awhile or for awhile when referring to traffic

Question: Which one would be correct:
I haven't moved in awhile or for awhile when referring to traffic- i need a clearer explanation for- for awhile and in awhile
Comment: The correct form is "I'm stuck here in this damned traffic!"  This is not a situation where you'd need to write a formal letter, and after not moving for 20 minutes you're apt to be thinking of all sorts of ways to express your displeasure.  You'll need them all, so no sense in trying to select the one perfect phrase.
Answer: The correct form should be "for a while".
"In a while" is used to point out one or more points of time in a given period (when).
e.g.:
A1) I played cards once in a while (, but did it more often before).
A2) In a while I'll leave this place.
First example: Referring to how often I did it in the period of time.
Second example: Referring to the point in time I'll leave in the period.
"For a while" refers to the period of time as a whole (how long).
e.g.:
B1) I slept for a while.
B2) I was unable to sleep for a while.
In this examples the thing you do or do not does not change in the period of time.
An example that shows the two meanings:
C1) I will play soccer for a while. (how long)
C2) I will play soccer in a while. (when)
Comment: "I played cards once or twice in a while" ← This sentence is completely ungrammatical to me. _Once in a while_ is a set phrase, but "once or twice in a while" is completely unparseable.
Comment: This is a good explanation, especially point C where the difference is very important- but you will hear colloquially in American English the use of for/in interchangeably in the example you gave. People will commonly say (when in traffic) `I haven't moved for a while.` or `I haven't moved in a while.`.
Comment: @jdfLemon Yes, but also both examples you gave are correct. If you have not moved for a while you also did not move in a while. People just do not think about the different implications. I dislike this, especially in my native tongue (German). One example is, we ( I must admit, I also) often do not distinguish between our words for when and if. We just use when. Most do not even notice this (like here for/in a while). In English I possibly miss the woods for all my trees, where the woods and trees are my mistakes. :-)
Comment: That is very interesting, I am native English speaker, and would likely use 'in' in this situation but I have no reason for it and certainly wouldn't think about the implications, but I totally understand why you would dislike that. I speak Spanish and Italian also, both of which have less prepositions than English and that difference was very difficult for me to understand while learning them since there is no direct translation from one preposition to the other - it is more based on the situation and meaning, as is the case here.
Comment: @jdfLemon I should be more precise here. :-) I dislike, not being precise, if I could be. In English I normally do not even see this, if it is not asked as in this question. In German I more often realize how imprecisely I and others use our language when on the contrary it could be used very precisely. In this case (for/in a while regarding traffic) it does not really matter, since there is almost no room for misunderstandings, but it might lead to a wrong use on other occasion. In German I can see and do mourn this progress/tendency. Sometimes it even causes confusion.
Comment: @JanusBahsJacquet You are right. I made this up from e.g. twice/thrice a week. Thank you. Edit is done.
Answer: You should also understand the difference between a while (with space) and awhile. This post does a good job of explaining but I will summarize.
A while is a noun phrase meaning 'a period or interval of time'.
Awhile, is an adverb meaning 'for a short time or period'.
The adverb 'awhile' cannot follow a preposition, but you can re-work a sentence to use either properly and not have the meaning changed drastically.
I haven't moved for a while - means you have been stationary for a period of time.
I have been here awhile - means you have been stationary here for a period of time.
If your question was just about in vs for in the noun usage, Daniel did a good job explaining that above.
Answer: These have the same meaning to me, but that is my opinion; I don't have a reference to point you to.
However, I will note that "awhile" should be two words: "haven't moved in a while" or "haven't moved for a while."  I hope this helps!
See also this related question:
"In a while" vs. "for a while"


What kind of signal is outputted from engine fire sensors

Question: Engine fire sensor informs the pilot engine fire and triggers fire extinguisher to release their payload. However, fire extinguisher valves are controlled through pressure operated switches or electrical switch. These valve controls require either pressurized fluids or simple dc currents, not the digital data transmitted from the engine fire sensor to the Engine Information display in the cockpit. Could you tell me what kind of signal is outputted from engine fire sensors?
Comment: When the engine fire detection system detects (via heat sensor) a fire it sends a signal to the cockpit normally illuminating the involved (one for each engine) cockpit fire extinguisher handle and also an aural warning is heard. The flight crew must activate the fire extinguisher system for the engine involved.  Usually pulling the illuminated fire handle and rotating it to the left or right (2 bottle system), shutting off fuel etc. to the engine and deploying the extinguishing agent. Does not happen automatically.
Answer: From a generic system configuration standpoint, the fire sensing loops don't normally trigger the  fire bottles; only the cockpit indicators and alarms. The bottles are fired by separate controls normally on the glareshield or overhead panel.
The pilot needs to be able to fire the bottles at his/her discretion during the engine fire drill.  For example, if a fire alarm goes off right after takeoff, the pilot may delay calling for the drill until the airplane is in a more stabilized phase.
The bottles are fired by electrical squibs (an explosively fired plunger) wired through the firewall shutoff valve switches and normally powered by a very basic battery source bus, so that closing the shutoff valves arms the bottles. You'll normally have guarded pushbutton lights, or handles that you pull and turn to do the arm and fire function.
The fire sensing loops are really just a kind of thermal switch that sets off a fire alarm.  You use a small stainless steel tube with a wire down the center, snaking around the engine, with a voltage applied to the center wire, and a compound insulating the center wire from the outer tube, that becomes conductive above a certain temperature. High temperature applied at any point along the length of the loop closes the circuit.
So to answer your question, whatever monitor unit or central computer is looking for a fire, in most cases the unit will be supplying 28 volts to the loop, and triggering the alarm if 28 volts appears on the return side of the circuit (because there is a hot spot somewhere on the loop that completes the circuit).
Comment: Because you may not want it to activate as soon as the alarm goes off.  On a departure, you worry about flying the plane, then deal with the fire when you can divert your attention to the procedure, at least no sooner than autopilot engagement. Also you normally operate the firewall shutoffs and wait, and only fire a bottle if the fire is still going after an interval.
Comment: why didn't it activate the release mechanism automatically though? wouldn't it be faster and reduce pilot workload? Also, would you mind provide some sources for your description of engine fire sensor set up


Supplying relay board with mains voltage

Question: I bought a relay board (this one) that can handle 10A at 250V, my question is: if I wire a mains supply into it, say from a ring circuit (that powers sockets throughout normal houses). Will the relay be able to handle the current/voltage to work appropriately? (The relay will power device like a computer, tv, monitor, etc...)
Comment: Spend more time describing your concepts and ideas. If needed, reference pictures that illustrate exactly what you have ahead of you. "A relay board" isn't nearly as good as identifying exactly which relay board. Saying "ring circuit" means almost nothing to me, but could be something like a doorbell's AC secondary transformer voltage, for all I know. I've already written more than you, and that's not a good thing when it's a question you care about. (Or should.)
Comment: @jonk I have edited and showed what relay board I have used
Comment: @jonk it being a ring circuit is irrelevant to the question (it's a common mains distribution topology used in domestic dwellings in the UK)
Comment: As NMF indicates, a ring circuit is an indicator you're not in north america, and your system voltage is probably 240V rather than 120V.  It would be better if you indicate where you live, and your mains voltage if you know it.  The board you show appears to have relays that can switch up to 10A at 250VAC.  The board and control mechanisms operate at 5VDC.
Answer: You could, actually. You need to keep in mind not to exceed the max current in the relay. Check the nominal current each device consumes. Avoid connecting stuff like hair dryers, toasters, etc.
Comment: Yes, the OP 'could', but if they have to ask the question here then they probably shouldn't without significant consideration of the safety implications, protective earthing, fusing etc.
Comment: @NMF the earthing continuity will be kept through the sockets using crimps or connector blocks. Devices plugged into the sockets will have fuses too so the safety will be managed
Comment: He *could* do it, yes. Will it achieve what he wants to do, which I can only guess is to turn devices on or off remotely or based on a timer? Who knows. Many devices such as TVs, monitors and computers power up in standby mode and won't switch on without manual action. And turning a computer off by cutting the mains supply doesn't always end well.


Significance of image position

Question: Consider the case of image formation in the convex lens when the object is placed between f and 2f its image will be formed beyond 2f on the other side. And the image position is said to be the point where all the rays intersect and if we observe the image from a position beyond image position we can say rays are diverging from the image position, but what if we observe from a position that is before the image position surely we will see the image but we are observing the rays before it gets chance to intersect how we will explain image formation in this case ?
Comment: Why do you say that Observer 2 will see a focused image?  They won't!
Comment: So image position also depends upon observer?
Comment: Well what you are saying  is that the the observer will observe an image even when he sees it from a location different than the point from where the rays converge. Is that correct?
Comment: Yes he should see some image as light from the object is entering his eyes but I don't think he will observe same image as the observer 1 in the image
Comment: Is the point of this question to take into account that the eye is itself a lens?
Answer: The ray diagram does not only provide the image position. It also provides the image size. The figure itself shows that.  This is a real image. So observer 1 sees an enlarged real image as expected. Observer 2 is obviously preventing the formation of the real image. So you have to draw ray diagram including the eye lens to see what kind of an image will form.
Answer: If an eye is placed in position 2 it will hardly be able to see
anything. Might be exceptions, but to see that we must elaborate the
matter.
Normal (emmetropic) human eye is able to accomodate (to see sharply)
objects situated between about 25 cm and infinity. This happens
because thanks to the adjustable curvature of the crystalline lens
rays coming by a source within that range can be made to converge to a
point on the retina.
Of course rays coming from an object in front of the eye arrive at the
pupil as a divergent beam. These are the kind of beam a normal eye is
able to focus. But the eye placed in position 2 does not receive a
beam of that kind, it receives a convergent beam. Such a beam will
be brought to a point well before reaching the retina and will again
diverge, thus forming on the retina an extended spot.
There is a kind of refractive defect allowing to bring to a focus
converging beams too: it's hypermetropia. In any case within a limit.
Since the questioner gives no numbers it's impossible to say if a
moderately hypermetropic eye would see that image.
But try an example. If f = 50 cm, real image is at 3f = 150 cm from
the lens. Eye 2 is in between, say at 75 cm, i.e. 75 cm before image.
So the image to be seen is 75 cm behing eye, which requires a
far-sightedness of at least 1/0.75 = 1.33 diopters - a low
hypermetropia.

Significance of image position


Using em for navigation sidebar - what unit to use for remaining body container?

Question: I have a webpage with a sidebar that has navigation options for the site.  The sidebar is a width of 6em (right: 0px, height: 100%, position: fixed).
I want the rest of the content to utilize most of the remainder of the page (100% of total width, minus 7em).
Right now, I'm using percent on the main content - is there a smarter/better way?
Thanks
Answer: Sure, keep the 100% width on the remaining page and add

padding-left: 7em;

(your remaining page should be placed inside a containing div)
Answer: It's hard to say without seeing some HTML, but I'd simply set your content div to 100% width and add right padding of 7em to accommodate the sidebar. What you do inside the content div is at your discretion.
Answer: If the main content is display: block, it will use up the entire usable area by default.  There is no need to specify it to 100% width.  To make sure there is no overlap, give it a right margin of 6em (or whatever the width of the navigation bar is).  Depending upon some of your inner element styles, there may be problems, but it's unlikely.
http://jsfiddle.net/XFaeZ/
Notice how "content" is visible even though it's floated to the right.  If the #content div were set at width: 100%, its margin would extend past the width of the page and "content" would be obscured.


Any tips for asset allocation across multiple retirement accounts?

Question: My family has 4 brokerage accounts: 1 traditional IRA & 1 Roth for both my wife and me. I would like to do a single asset allocation (such as the one below) across the 4 accounts? Is this a good strategy and any tips on managing this effectively if the accounts have widely differing balances (with some below the minimum for some mutual funds):
Answer: I have a similar plan and a similar number of accounts.   I think seeking a target asset allocation mix across all investment accounts is an excellent idea.
I use excel to track where I am and then use it to adjust to get closer (but not exactly) to my target percentages.
Until you have some larger balances, it may be prudent to use less categories or realize that you can't come exactly to your percentages, but can get close.   I also simplify by primarily investing in various index funds.  That means that in my portfolio, each category has 1 or 2 funds, not 10 or 20.
Comment: do you invest index funds because the expense ratios are too high for mutual funds?
Answer: I have a similar situation -- five different accounts between me and my wife.
Just as you and @Alex B describe, I maintain my asset allocation across the combination of all accounts. I also maintain a spreadsheet to track the targets, deviations from the targets, amounts required to get back in balance, and overall performance.
I (mostly) don't use mutual funds. I have selected, for each category, 1 or 2 ETFs. Choosing index ETFs with low expense ratios and a brokerage with cheap or free trades keeps expenses low. (My broker offers free ETF trades if you buy off their list as long as you aren't short-term trading; this is great for rebalancing for free 2 or 3 times a year.)
Using ETFs also solves the minimum balance problem -- but watch out for commissions. If you pay $10 to buy $500 worth of an ETF, that's an immediate 2% loss; trade a couple of times a year and that ETF has to gain 5% just to break even.

One issue that comes up is managing cash and avoiding transaction fees. Say your IRA has all the growth stock funds and your Roth has the bonds. Stocks do well and bonds do poorly, so you sell off some stocks, which creates a bunch of cash in your IRA. Now you want to buy some bonds but you don't have enough cash in your Roth, so you buy the bonds in your IRA. Not a problem at first but if you don't manage it you can end up with small amounts of various funds spread across all of your accounts. If you're not careful you can end up paying two commissions (in two different accounts) to sell off / purchase enough of a category to get back to your targets.

Another problem I had is that only one account (401k) is receiving deposits on a regular basis, and that's all going into an S&P 500 index fund. This makes it so that my allocation is off by a fair amount every quarter or so -- too much in large cap equities, not enough of everything else.
My solution to this going forward is to "over-rebalance" a couple of times a year: sell enough SPY from my other accounts so that I'm under-allocated in large caps by the amount I expect to add to my 401k over the next 3 months. (So that in six months at my next rebalancing I'm only 3 months over-allocated to large caps -- plus or minus whatever gains/losses there are.)


Neighbour dispute

Question: If any visitor comes to my home, then when they return from my home, my neighbour comes near the fence and starts talking with my visitors.
I feel it as a disturbance for my privacy and for maintaining a good relationship with my visitors. My visitors fall in trouble because of antisocial and misbehaving activities of the neighbour.
One day I told not to do this to the neighbours, but they are continuing that disturbing activity for my visitors. How can deal this to stop?
Place :Sri Lanka
Comment: Are they complaining to your visitors or calling them derogatory names or...?
Comment: Yes they complain at my visitors . Their jealous talks becomes some nonsense complaints at that moment
Answer: If all that your neighbor is doing is talking to your visitors, I do not see any plausible legal remedy.
The neighbors aren't trespassing. Talking with a visitor of a neighbor doesn't ordinarily constitute a public nuisance (unless they are using a huge megaphone or something like that not implied by the question). And, since they are talking to your visitors, rather than you, it isn't really your privacy at issue.
Also, unless the visitors are also your children or employees, you really have no authority or right to regulate how third-parties interact with them.
It is possible that some important fact that would lead to a legal remedy has been omitted from the question, but with the limited facts available, I do not see a legal remedy.

Neighbour dispute


How to request intra day real time option data using ibPY?

Question: For example, price, iv, delta, gamma, volume, and open interest
Answer: Interactive Brokers posted a webinar on Dec 13 2016 about using IBridgePy to connect to IB's API. https://www.youtube.com/watch?v=hogXB07OJ_I.
It is pretty easy to request real time price of option data. You may check out the website of IBridgePy at www.IBridgePy.com
To learn how to use it, you may refer to its documentation.


elementary OS boots into the command line interface

Question: After upgrading the graphics card, the system does not start properly. It boots to black screen without showing up the user interface. Please help me.
Comment: Please add some more information. Some error messages while booting, etc.? Which graphics card, how upgraded?
Comment: uninstall the graphic card via tty and try again.
Comment: You can try to switch to the GUI session by pressing `ctrl + alt + F7`, but you will more than likely need to install the proper drivers for your new graphics card. What card did you upgrade to, and what was your old card?
Answer: I had the same problem after having installed bad drivers for my graphic card, so in my opinion it's a problem related to some not working open source driver that are being installed by elementary. You can try downloading the correct drivers from your graphic card's producer's website and install them manually from the command line interface, this should solve the problem.
In my case I had to reinstall the system, if you have nothing to lose, also try to install elementary again.


How can I add the sku code in [commerce-order:commerce-email-order-items]

Question: While the shortcode [commerce-order:commerce-email-order-items] is used to send several commerce emails, it does not includes SKU code. How can I add sku code or edit the output of [commerce-order:commerce-email-order-items]
Answer: Some tokens are generated by code others by views. This token is generated by code
So edit commerce_email.module and around line 420 you will see commerce_email_order_items function here you can add the sku.
Take in mind that this is not an ideal solution See hook_tokens_alter
Comment: This is a bad idea.
Comment: Yes it is, but i could not find another way of doing this. there is some kind of hook to alter tokens?
Comment: `hook_tokens_alter()` is indeed the way to alter tokens implemented by other modules. I would be surprised if there isn't a token for the SKU code; if there isn't, a module could be created to implement it with `hook_tokens()` e `hook_tokens_info()`.
Comment: There should be a sku token, thats for sure. But as commerce_email does not let you change/add tokens/fields or whatever to its order-summary-table function because it is hardcoded i think the propper way is with hook_tokens_alter
Answer: The best way:

Go to: admin/structure/views/view/commerce_cart_summary/edit/
Under Fields you should change:
Commerce Belegzeile: Product
Erscheint in: commerce_line_item:product,     commerce_line_item:product_discount.
Set the same settings from: admin/structure/views/view/commerce_cart_form/edit/
Delete the line for the Title.

Now you can change the output over the product-variation-types-sites under Basket:
admin/commerce/config/product-variation-types/
Now you have a very good looking and adjustable order confirmation email.


Once a question has retained one net upvote, is it undesirable for each answerer to upvote it?

Question: I've been in the habit of upvoting each question I'm answering, but it has recently occurred to me that this may be counter-productive in a collective enterprise such as PSE, since whoever posted the question might thereby be encouraged to disingenuously delay their acceptance of any answer, so as to artificially inflate their PSE reputation.  I'm sure I'm overlooking some factor(s) which would discourage that practice, but might it be possible to specify them for me?
Answer: You should up vote any question you think deserves an up vote. Usually this is for reasons such as it fits well on the site, it is clear, etc. I don't think there needs to be anything beyond this. We should be evaluating the posts independent of who is asking them and what may or may not happen with their reputation.
Comment: @Edouard Reputation isn't worthless, but at the end of the day quality content is quality content no matter how much reputation is attached to it.
Comment: @Edouard Down votes work differently on Meta compared to the main site. Typically downvotes here just reflect disagreement. e.g. the one who downvoted probably disagrees with the practice you are proposing here.
Comment: I'll think it over, but, for now, I can't see it that way:  I've posted an answer, within the past week, to a question that, over the course of 10 or 11 yrs. and 8K views, has received 23 upvotes and 7 answers, and, with its OP having been "seen this week", the answerers may be serving as a cow furnishing the OP with a form of "cash", unless reputation's worthless.  (I'd sometimes considered reputation as a decisive factor in break-point situations, giving an upvote to whichever of two answerers already had the larger reputation, but will henceforth upvote either both or none in such cases.)
Comment: There 's a patent ambiguity re the question concerned, and a request for clarification of that ambiguity (which resides in its linguistic formulation, that includes a phrase which deviates from standard English rules for capitalization) has as received no response.  (The ambiguity's in a capitalization that hints at a preference for a particular response, made by at least one respondent, that has as yet failed to receive acceptance:  Also, it falls short of the 3-character minimum required for an "edit".)  Consequently, I consider the downvote of my status on Meta rep inappropriate.


How can I determine if my Android application is running in an AVD

Question:
Possible Duplicate:
How can I detect the Android emulator?

Is there a way to reliably and programatically determine if my app is running on an AVD vs. real hardware?
Previously I've had good luck checking MAC addresses, but I'm not sure if AVD's all have the same first AA:BB:CC portion (like stock VMWare or VirtualBox Virtual Machines do).
I use a lot of Log.i() calls while learning to code Android Java. But this logging will murder a real phone (and is just rude to waste the user's space and resources). I figure I could wrap my Logging like this pseudo-code:
<code>public void Loggy(String s)
{
  if (!DEVELOPER) return true;

  Log.i(MYAPP,s);
}
</code>
I've searched and the closest I see are people asking the same question but for iPhone.
Answer: See How can I detect when an Android application is running in the emulator?


How do I type in Japanese (anthy)?

Question: I installed ibus-anthy but it didn't appear on keyboard layout.
Answer: I have the same problem before with iBus. It works on Ubuntu Unity desktop, but not in elementaryOS. I've not yet try it again. I use NIMF instead to type in Japanese or Korean.
If you like to install NIMF for Japanese or Korean you can install with command below :
sudo apt install nimf anthy* libanthy* libhangul*

Then on your terminal :
im-config

or
sudo im-config

then select NIMF as default IME, click OK.
Logout then Login again from your account or restart, whatever you like.
It will appear on the corner (left side of SystemKeyboard) select the IME that you want.

頑張って.. 홰팅!홰팅!

How do I type in Japanese (anthy)?


Cyclicity of AES

Question: It is known that AES is extremely secure, with its highest standard(AES-256) being able to protect the national secrets of most governments. Due to the nature of its steps, there's the question about its cyclicality, or how many full encryptions with the same key would it need to yield the plaintext back, supposing that the variation is AES-ECB-128 NoPadding, with only one full block of plaintext.
Comment: Note that it is generally assumed that AES with a fixed and unknown key (to a smart adversary) behaves like a random permutation of equal size, or is at least sufficiently indistinguishable from that.
Answer: It is widely believed that AES in the iterative mode you describe behaves like a random mapping $f:\{0,1\}^n \rightarrow \{0,1\}^n$ with $n=128$. Such a mapping would have expected (average) rho-length equal to
$$
\sqrt{\pi 2^n/2},
$$
and expected maximal rho-length (this happens if your starting point $x_0$ ended up in the longest rho pattern of the iterative graph of $f$)
$$
2.4149 \sqrt{2^n},
$$
which is just a constant factor larger than the expected quantity.
The rho-length is the minimum number of iterations $N$ starting from a random plaintext $x_0$ with $x_1=E_K(x_0),$ $x_2=E_K(x_1),$ etc. until $x_{N-1}=E_K(x_{N-2})=x_j$ for some $j\in \{0,1,\ldots,N-2\}$ where $f(x)=E_K(x)$.
See the paper by  Flajolet and Odlyzko which appeared in Eurocrypt in the late 1980s here.
Remark: The term rho-length is used because of the generic $\rho$ shape the iteration takes before hitting a point that was already seen.

Cyclicity of AES


Configure a Guest network on a Sonicwall TZ-205 N

Question: I'm trying to configure a Sonicwall TZ-205 N to have 2 wireless networks. The first wireless network is a guest network which only has access to the internet (client isolation would be nice but is not a requirement). The second wireless network is a hidden network that has access to the internet as well as other devices on the LAN.
Can this all be accomplished with a single device or will I need to purchase a second sonicwall wireless device?
Comment: Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer.
Answer: One option with the sonicwall enhanced os for the TZ-205 would be setting up wireless guest services (http://www.sonicwall.com/us/en/support/2213.html?fuzeurl=http://www.fuzeqna.com/sonicwallkb/ext/kbdetail.aspx?kbid=4955).
Otherwise I think you may be able to setup new wireless profile and virtual access point. Then manually prevent access from it to your LAN zone with firewall rules.
Answer: One single device (Sonicpoint) is enough for the configuration you're seeking. If you need 2 wireless networks you'll have to create 2 virtual interfaces (and 2 different zones).
Client isolation is also possible.