Lamport OTP system

Question: Is the Lamport OTP algorithm different from HOTP and TOTP? How similar or different are they?
Comment: a wiki search returns the different algorithms - have you done some research?
Answer: HOTP and TOTP are similar. Lamport OTP is different.
A HOTP is an HMAC of a shared secret and a counter. For example, on your Nth login you would use HMAC(SHARED SECRET, N). This provides strong security but can suffer from the counters between the client and the server becoming out of sync. It also has the problem that the next HOTP is long-lived. That is, it is valid until it is used. This may allow an attacker considerable time to try to guess it.
A TOTP is an HMAC of a shared secret and the current time. For our discussion we'll assume that the password changes every 60 seconds. As an example, a login that occurs on 2015-06-05 05:33 GMT, you would use HMAC(SHARED SECRET, 201506050533). Unlike the HOTP, there is no counter to get out of sync (it is fair to assume that clocks are synchronized within a few seconds of each other). Also, each password only lasts for one minute so an attacker who is trying to guess the TOTP must find it within 60 seconds or they must begin their guessing again.
A Lamport OTP is a bit different than HOTPs and TOTPs. A Lamport OTP does not require a shared secret. Lamport OTP's are used for validating a series of successive logins. For our example, let's assume we have a hash function H (pick your favorite). Lamport OTPs have the property that the Nth OTP, written OTP(N) is H(OTP(N+1)). This means that if the server remembers that the last OTP was X, when it receives the next OTP Y, it can validate it is correct by ensuring that X equals H(Y). If it is correct, the server will allow the login and store Y for use in the next login. The server gets the initial OTP from the client when the client logs in the first time.
On the client end, the client begins by choosing a seed value. It then calculates H(SEED), H(H(SEED)), ... Let's say for 1000 iterations. It stores the entire sequence. When it first logs into the server it passes it the 1000th value. The next time it passes it the 999th value and so on. Because hash algorithms are not easily reversible, an observer who sees any specific OTP cannot calculate the next OTP as that would require them reversing the hash.
When the chain of Lamport OTPs runs out (eg: after the 1000 are used), the client must create a new seed, calculate a new chain, and pass the server the new last value. While it is not a requirement of Lamport OTPs, one could imagine that a login that is passing the new last value of a chain would require 2-factor authentication while logins that are using the next Lamport OTP require only 1-factor.
While all of these have the word "password" in their name, they can be used for purposes other than logins. For example, this article describes using Lamport OTPs for authenticating successive messages in a conversation.
Comment: Thank you much. Exactly the sort of explanation I needed.
Comment: @Neil, Is Lamport OTP even used at all in the real world? It seems like something that just exist in the classroom.
Comment: Sorry @pacerier bit I don't know. I can't think of any use that I've heard of.
Comment: @pacerier lamport was used but imho it is not anymore
Answer: I think there is a conceptional difference between lamport OTP and OATH HOTP/TOTP.
Take a look at RFC1938 which you probalby ment when referring to Lamport OTP. It was published in 1996 and is based on [1]
[1]  Leslie Lamport, "Password Authentication with Insecure
       Communication", Communications of the ACM 24.11 (November
       1981), 770-772
There are actually tools to calculate such OTP values
"OUST COAT FOAL MUG BEAK TOTE" and to login like, lets say SSH.
I experimented with that several years ago.
Such an OTP value is calculated based on the iteration number and a password you enter for calculating the OTP value.
HOTP/TOTP (RFC4226) is calculated based on a secret key - usually stored in hardware. At least all participanting writers of RFC4226 are...
...hardware vendors.
To my understanding Lamport OTP and OATH HOTP/TOTP have totally different goals.
Although SSL 1.0 was published in 1994, the RFC number for SSL is 2246 which is signigicantly higher than 1938 ;-)
The goal of Lamport OTP was to avoid password replay attacks over insecure connections! Also see the abstarct of RFC 1936.
In contrast HOTP/TOTP is ment to introduce a second factor for authentcation, where the secret key was originally stored in offline hardware. Lamport OTP generated the OTP based on one factor "passphrase" and was only ment to avoid sending the password over the wire.

Lamport OTP system


When I color the eyebrows then go back to my body mesh the eyebrows arent colored

Question: I made a male with eyes eyebrows and eyelashes in makehuman then I exported him to blender. So in my side panel when I click on the eyebrows, eyes, eyelashes, and color them with vertex paint, then when I click back to my original mesh they are not colored. I don't know if I have to merge the eyebrows etc with the body or something?
Answer: For seeing your paint in the viewport, you have to use texture shading (Alt+Z).

For rendering with blender internal, you have to assign a material to your eyebrows and to check "Vertex color Paint" in the material options :

For cycles, you have to use an Atttibute node (attribute name is 'Col' by default).
Notes :

Vertex paint visualisation in viewport is only available for blender internal renderer.
Depending what you want but it is often better to use "Texture paint" instead of "Vertex paint" for painting a model.


InDesign - Inserting my 2 page CV in front of my Portfolio

Question: I am a new learner of InDesign - trying desperately to place my A4 Covering Letter and 2 x A4 pages of a CV into an already set up A3 design portfolio.
Why is that when I FILE and PLACE my 2 pages of a CV, ONLY the first page of my CV is show.
Is it something to do with the A Master Page?
Comment: You need to set up your preferences to add new pages at the end of a story. Or manually add three pages at the beginning before placing.
Comment: Many thanks Lauren! Three pages have already been added manually, I simply cannot get the two pages of my CV to copy over, I can only place one page of a two page CV. So frustrating!!
Comment: What is your CV in? Are you trying to bring in another INDD file? Copy/paste? .PDF?
Comment: @LaurenIpsum why not make that an answer.
Comment: @Danu when you place the first page, look at the lower right-hand corner of the text box. If there's a little red box with a plus in it, it means there's more text. Click on the red box and you'll get a "loaded" icon. Click on the next blank page in ID and it should place the rest of your text.
Answer: There are a few reasons this could be happening, but one of the most common reasons is that you have not checked the "Show Import Options" in the Place dialog. Once this option is selected, you will be given an option as to which page of your document you'd like to place.


cannot convert 'const char*' to 'LPCWSTR {aka const wchar_t*}'

Question: I'm getting an error in my C++ code that I can't quite make sense of. The stripped down code bits are here:
RS232Handle=OpenRS232("COM1", 9600);

HANDLE OpenRS232(const char* ComName, DWORD BaudRate)
{
    ComHandle=CreateFile(ComName, GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
}

I get the following error:
error: cannot convert 'const char*' to 'LPCWSTR {aka const wchar_t*}' for argument '1' to 'void* CreateFileW(LPCWSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD, DWORD, HANDLE)'
     ComHandle=CreateFile(ComName, GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);

The code was taken from VS code and I am now using Qt creator.
How can I fix this issue? Thanks!
Comment: `const char *` and `const wchar_t *` are not the same and not implicitly convertible.
Answer: The Windows CreateFile function is actually a macro that expands to one of:

CreateFileA, which takes a file path of type const char*
CreateFileW, which takes a file path of type const wchar_t*.

(The same is true for most of the functions in the Windows API that take a string.)
You're declaring the parameter const char* ComName, but apparently compiling with UNICODE defined, so it's calling the W version of the function.  There's no automatic conversion from const wchar_t* to const char*, hence the error.
Your options are to:

Change the function parameter to a UTF-16 (const wchar_t*) string.
Keep the char* parameter, but have your function explicitly convert it to a UTF-16 string with a function like MultiByteToWideChar.
Explicitly call CreateFileA instead of CreateFile.
Compile your program without UNICODE, so that the macros expand to the A versions by default.
Kidnap a prominent Microsoft developer and force him to read UTF-8 Everywhere until he agrees to have Windows fully support UTF-8 as an "ANSI" code page, thus freeing Windows developers everywhere from this wide-character stuff.

Edit: I don't know if a kidnapping was involved, but Windows 10 1903 finally added support for UTF-8 as an ANSI code page.
Comment: #5 isn't a distinct option, it just lets #2, #3, and #4 work when the string contains extended characters.
Comment: Changing the Character Set in Visual C++ did the trick for me...
Answer: There are many ways of fixing this

Open the project properties, General/Character Set.  This will be set to either Unicode or Multi byte character set.  If you wish to use char* change from Unicode to MBCS.  This will convert CreateFile to CreateFileW if Unicode is specified and CreateFileA if MBCS is specified.
Enclose all strings in _T() eg _T("COM1").  What this does is to compile the string as a char* if MBCS is specified, wchar_t if unicode is specified
Force all strings to be wide strings by prefixing with L eg L"COM1"

Note that in some error handling routine the strings are specifically MBCS
Answer: Try this:
RS232Handle=OpenRS232(L"COM1", 9600);

HANDLE OpenRS232(const wchar_t* ComName, DWORD BaudRate)
{
    ComHandle=CreateFileW(ComName, GENERIC_READ|GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
}

On Windows the wchar_t type is used to represent characters in UTF-16 encoding.  This is what the Windows kernel uses internally and therefore modern versions of Visual C++ default to Unicode functions. If you insist on using the ANSI functions instead (thus going back to your original code), remove the L-prefix from the string "COM1" and change the call from CreateFileW to CreateFileA.
Most Windows API functions that deal with strings have both a W and an A version; the only exception that I am aware of is the function GetProcAddress which always takes an ANSI string regardless of whether you're working with ANSI or Unicode in your project.
Comment: If your datatype is hardcoded as `wchar_t*`, use `CreateFileW`.  The `CreateFile` function macro should only be used together with the `TCHAR` or `LPCTSTR` type macros.
Comment: @BenVoigt Expanded my answer
Answer: const char* and const wchar_t* are two different types with no implicit conversion between them. Therefore, you need to perform the conversion to before passing the value on to the CreateFile function. Take a look at this answer for a possible conversion approach: https://stackoverflow.com/a/3074785/6710751
Alternatively you might just use the CreateFileA function instead of CreateFile, as was suggested by Ben Voigt.
Comment: Or just call `CreateFileA` which will do the conversion for you.
Comment: Thanks for the suggestion, I've added this to the answer.


A 3-manifold with fundamental group isomorphic to a surface group.

Question: Let $M$ be a 3-manifold (the case I am interested is $M$ closed orientable connected hyperbolic); suppose $\pi_1 (M)$ is isomorphic to the fundamental group of a (closed orientable connected) surface (let's say of genus $g \geq 2$). Is $M$ necessarily a product $S \times I$ for some interval $I\subseteq \mathbb{R}$?
Answer: If $M$ is a connected closed (i.e. compact without boundary) 3-dimensional manifold, then $\pi_1(M)$ cannot  be isomorphic to $\pi_1(S)$, where  $S$ is an orientable surface of genus $\ge 2$. You can see this by first noting that $\pi_2(M)=0$ (otherwise, by the sphere theorem, $M$ is a nontrivial connected sum which will imply that $\pi_1(M)$ is a nontrivial free product, which is not the case). Then you observe that $\pi_k(M)=0, k\ge 3$ since the universal cover $\tilde M$ of $M$ is noncompact (here you use that $S$ has positive genus, which implies that the fundamental group is infinite): Thus, $H_k(M)=0$ for all $k\ge 2$. Now, use Hurewicz theorem to conclude that $\pi_k(M)=0$ for all $k\ge 3$.
Thus, $M$ would be homotopy equivalent to $S$ (they have isomorphic fundamental groups and contractible universal covers; now, use Whitehead's theorem). However, $H_3(M)\ne 0$ while $H_3(S)=0$. Contradiction.
What one may ask is about topological classification of compact orientable 3-dimensional manifolds such that $\pi_1(M)\cong \pi_1(S)$. You can still have manifolds of the form: $S\times I$ minus some disjoint open balls. However, such manifolds which are reducible, meaning that there exists a tame 2-sphere in $M$ which does not bound a balls.
It is a theorem (I think, due to Stallings), that if, $M$ is assumed to be oriented, $S$ is oriented, and $M$ is irreducible then, it indeed is homeomorphic to $S\times I$. You can find a proof of this in Hempel's book "3-manifolds".  The key is that in this situation there exists a proper homotopy-equivalence $h: M\to S\times I$, i.e., a homotopy equivalence which is a homeomorphism on the boundary. One then proves that such $h$ is homotopic (rel. boundary) to a homeomorphism.
If one allows for connected boundary of $M$, or for nonorientable $M$ or $S$, then the conclusion is that $M$ is homeomorphic to an $I$-bundle over $S$.
Edit. Here is a construction of an open 3-manifold which is homotopy-equivalent to a closed surface $S$ but is not homeomorphic to an interval bundle over $S$. Start with an open contractible 3-dimensional manifold $W$ which is not homeomorphic to $R^3$, say, the Whitehead manifold. Embed (properly and smoothly) a ray $\rho$ into $W$ and then remove a small open tubular neighborhood of $\rho$ from $W$. The result is a contractible manifold with boundary $X$; $\partial X$ is homeomorphic to the open disk $D^2$. Now, take $M=S\times I$, pick an disk $D\subset \partial M$ and glue $M$ to $X$ identifying $\partial X$ and $D$ homeomorphically. Lastly, remove the remaining boundary from the result of gluing. You obtain an open 3-dimensional manifold $N$ which is homotopy-equivalent to $S$ but not homeomorphic to an open interval  bundle over $S$. The reason is that $N$ is not "tame". Proving non-tameness of $N$ requires some work to prove (by appealing to its "fundamental group at infinity"); the proof is basically the same as the one showing that $W$ is not tame.
Comment: Are there not nontrivial bundles $I \rightarrow M \rightarrow S$?  Or are all such bundles abstractly diffeomorphic to a product?  Or all all such $M$ reducible?
Comment: @Lor: In the case of open manifolds $M$, things work well if $M$ is "tame", i.e., admits a compactification as a manifold with boundary. Otherwise, things are bad since you can use, say Whitehead manifold (contractible and not homeomorphic to $R^3$) to create examples not homeomorphic to line bundles over surfaces. I can provide more details if you care.
Comment: @JasonDeVito: You are right, I forgot about one more assumption, namely that the boundary is not connected. Otherwise, the manifold is an I-bundle.
Comment: @studiosus thanks for your very complete answer. Can you please tell me something about the non-compact case? I mean: same setting, but $M$ is only required to be boundaryless and orientable (and $I$ will be the whole $\mathbb{R}$). I have checked Hempel's chapter on I-bundles, but he deals only with the compact case.
Comment: yes please: I'd really appreciate an explicit construction of an open (non tame?) manifold with fundamental group isomorphic to $\pi_1(S)$ but not homeomorphic to $S\times I$.


How to set New Variable value from Old Variable value, if New Variable value changed the Old Variable not follow the changes

Question: As stated in the title
Look at this code Example:
void main() {
  final Student student = Student('Lincoln', 29);
  print('Student before $student');

  final Student newStudent = student;
  newStudent?.name = 'Abraham';
  print('new Student $newStudent'); /// 'Abraham', 29
  print('Student after $student'); /// 'Abraham', 29 - but I need this output still 'Lincoln', 29
}

class Student {
  Student(this.name, this.age);

  String? name;
  int? age;

  @override
  String toString() => '$name, $age';
}

From the code above if we set newStudent and make changes, the student variable also follows the changes, but I don't want the student variable changed. How to solve this?
Answer: You should make a new Student instance for the new one. If you want it to have the same name as age as the old you could do this for example:
final Student newStudent = Student(student.name, student.age);

Comment: can you check my new question right [here](https://stackoverflow.com/q/74686509/13096991)
Answer: and also study this example..this will clear the concept...
 final List<int> numbers=[1,2,3];

  print(numbers);

  final List<int> numbers2=numbers;

  numbers2.add(100);//this will add also to numbers
  print(numbers);

  //so use following for keep original array as it was

  final List<int> numbers3=[...numbers];//user this spread operator

  numbers3.add(200);

  print(numbers);

so what u have to focus is
we passing reference not value by this statement
Student newstudent=&student (like in C language, here & sign is not used in dart


Origin of the reconstructed pronunciation

Question: I know that a common source for the reconstructed pronunciation of latin is Vox Latina by William Sidney Allen, but I've read somewhere that a critical analysis of latin texts and the pronunciation reconstruction started in Germany by the end of the 19th century, but I cannot find any reference on this.
Does anyone know when the first works on the reconstruction of latin pronunciation began and who were the authors? Also has there been any changes/ disputes on the reconstructed pronunciation?
Comment: Something to start with: Waquet, F. 2002. *Latin, or, The empire of a sign: from the sixteenth to the twentieth centuries*. London: Verso, **esp. pp. 158-170.**
Answer: If you are asking simply for the earliest discussion of correct Latin pronunciation, then Quintilian (c35-c100CE) deserves a mention. INSTITUTIO ORATORIA BkI Ch4  The translation here is by HEButler (Loeb 1920). Much gratitude to Bill Thayer for the site.
On sounds lacking alphabetical forms:

Aut grammatici saltem omnes in hanc descendent rerum tenuitatem,
  desintne aliquae nobis necessariae litterae, non cum Graeca scribimus
  (tum enim ab isdem duas mutuamur), sed proprie in Latinis: ut in his
  "servus" et "vulgus" VIII. Aeolicum digammon desideratur, et
  medius est quidam u et i litterae sonus (non enim sic "optimum"
  dicimus ut "opimum"), et in "here" neque e plane neque i auditur;
But all teachers of literature will condescend to such minutiae: they
  will discuss for instance whether certain necessary letters are absent
  from the alphabet, not indeed when we are writing Greek words (for
  then we borrow two letters from them), but in the case of genuine
  Latin words:  for example in words such as seruus and uulgus. 8
  we feel the lack of the Aeolic digamma; there is also a sound
  intermediate between u and i, (for we do not pronounce optimum as we do
  opimum), while in here the sound is neither exactly e nor i.

...and on variations in pronouncing consecutive vowels:

Quia "iam" sicut "etiam" scribitur et "uos" ut "tuos". At quae ut
  vocales iunguntur aut unam longam faciunt (ut veteres scripserunt, qui
  geminatione earum velut apice utebantur), aut duas: nisi quis putat
  etiam ex tribus vocalibus syllabam fieri si non aliquae officio
  consonantium fungantur. XI. Quaeret hoc etiam, quo modo duabus
  demum vocalibus in se ipsas coeundi natura sit, cum consonantium nulla
  nisi alteram frangat: atqui littera i sibi insidit ("conicit" enim est
  ab illo "iacit") et u, quo modo nunc scribitur "vulgus" et "servus".
  Sciat etiam Ciceroni placuisse "aiio" "Maiiam"que geminata i scribere:
  quod si est, etiam iungetur ut consonans.
For instance iam and etiam are both spelt with an i, uos and tuos both
  with u. Vowels, however, when joined as vowels, either make one long
  vowel (compare the obsolete method of indicating a long vowel by
  doubling it as the equivalent of the circumflex), or a diphthong,
  though some hold that even three vowels can form a single syllable;
  this however is only possible if one or more assume the role of
  consonants.  [Ch.11] He will also inquire why it is that there are two
  vowels which may be repeated, while a consonant can only be followed
  and modified by a different consonant. But i can follow i (for
  coniicit is derived from iacit): so too does u, witness the modern
  spelling of seruus and uulgus.
  He should also know that Cicero preferred to write aiio and Maiiam with a   double i; in that case one [p69] of them is consonantalised.
Comment: Hi Hugh, thanks for the reply but I was not wondering about the earliest reflections on latin pronunciation but rather at what time in history people realised that the traditional/ecclesiastical pronunciation was not the roman pronunciation, and started a scientific and critical analysis of latin pronunciation (not the renaissance "reconstruction"). Also, who were the pioneers
Answer: I think the reference you are looking for is here: https://en.wikipedia.org/wiki/Contemporary_Latin#Pronunciation
It refers to K.L. Schneider's Elementarlehre der Lateinischen Sprache, 1819
I have not read this book and so cannot speak to specific changes in understanding, but there remain many disputed areas of reconstructed pronunciation for Classical Latin.  One example is whether short and long vowels differ in quality as well as length, which is dealt with by Andrea Calabrese here.
Comment: There is no scholarly dispute about Latin vowel qualities, there is a reddit dispute. Calabrese's paper doesn't deal with Latin as such; it's a paper on rule-based phonology whose purpose is to introduce the operation of Negation which inverts the values of phonological features and serves to repair "marked" configurations such as [+high, -tense] vowels. Even worse, this paper is a mash-up of 3 different papers on different topics (which I haven't read). His overview of historical evidence is sloppy and his assertion is that Latin had an Italian-type 7 vowel system by the 1st century AD.


What took 8 days

Question: What took the Jews 8 days to produce new oil when rededicating the Temple in the Chanuka story? It seems the process of oil-making takes a lot less time (I have done it in Israel on one of the tourist trips), so what exactly historically took 8 days?
Answer: Another answer (Beis Yosef, Orach Chaim 670, s.v. והטעם) is that the actual pressing would indeed take a day, but that they first had to undergo seven days of purification (from tum'ah contracted by contact with corpses, of which there were plenty during the battles against the Syrian-Greeks) - since, after all, the whole point was that they needed oil that was free of tum'ah.
Comment: I don't quite understand that answer. It's evident that not everyone at the time was impure. (Otherwise - who was it that lit the miraculous oil) So that being the case - the pure people could have made oil(?)
Answer: The Ran in Mesechtas Shabbos 21: and the Rokayach in Hilchos Chanuka say that it took 4 days to travel to the location where they made the oil and 4 days to travel back, hence 8 days. The Meiri in Mesechtas Shabbos 21: says that the place where the oil came from was Tekoa.
Comment: today Tekoa is less then 4 days traveling from Jerusalem. It's about 13-15 km by the air line.
Answer: Adding to what @GershonGold brought in the name of the Meiri, Rabbi Dr. Shmuel Klein in his book "Eretz Hagalil" (Land of Galilee), pg. 20-21 writes (my translation):

"One of the Gaonim of Babylon was asked: "Why do we keep eight days of Chanukah...and why do we have eight nights and it didn't last more or less than that?"
Because the oils came from the land of Asher, as it says: "May he dip his foot in oil", and he had a place called Tekoa, as they say: "Tekoa, the primary source of oil" (Mishna Menachot 8:3), that from there the oils come, and from there until Yerushalayim it took eight days to walk to and back...and therefore they waited until pure oil was brought from there, and that is why the miracle lasted for eight days.

This answer is very important, because never do we see anywhere in the Talmud that the length of the road from Yerushalayim to Tekoa back and forth was eight days. So too do we not find anywhere that the oil for the Menorah in the Temple was brought from Tekoa in the land of Asher, and in particular, it is not said that this was so in the time of Chanukah in the days of the Chashmonaim. If, however, the Gaon was able to tell us all of these things, and in accurate detail, we must surely assume that he had by him ancient traditions from a non-Talmudic source, but ancient and trustworthy.
Per that tradition, Tekoa, from the above mishna, was in the Upper Galilee, and it supplied oil to the Temple already in the time before the Chashmonaim. The oil for the menorah was made with purity, therefore there were Jews there that kept mitzvot and knew halacha.
This Tekoa is mentioned in another mishna, albeit a later one, but still from the time of the Temple, bearing witness of Nitai, man of Tekoa, who brought challah from Beitur and they didn't accept from him. The man dwelled in Bei-Yetur, meaning, one of the areas within the land of the Itureans in Lebanon...we should think that this man settled in Bei-Yetur after the conquests of Aristobulus and that he wasn't from Tekoa in Judea, but from Tekoa of Asher, near the land of the Itureans.
Another piece of evidence that Tekoa was in the Upper Galilee, is from the Tosefta in Shevi'it:

"One may eat olives until the last one is finished in Tekoa. Rabbi Eliezer ben Yaakov says: Also that of Gush Chalav."

In a parallel baraita it says:

"One may eat olives until they are finished from Meron and Gush Chalav."

The second baraita lists two famous cities in the Upper Galilee and Meron is parallel to Tekoa in the tosefta, therefore, there is no doubt that the halacha is talking about the Galilean Tekoa, as it is mentioned together with Gush Chalav."

To sum up, we see that there was an ancient tradition that the oil for the Menorah was brought from the Galilean Tekoa, a way's length of four days one direction, meaning it took eight days for someone to go all the way there and return with pure oil.

What took 8 days


What orthographies are acceptable in questions?

Question: Following on from my comment in this question, I think it would be good to develop some guidelines around what orthographies to use in asking questions. I propose that we should allow linguistic material to be presented in its own orthography, whatever that may be, but it seems to me it should always (as far as possible) also be presented in IPA. Given that this is an English language website, English material could be exempt unless an IPA rendering is necessary to dealing with the question.
Comment: @GastonÜmlaut: Perhaps what you need is the [How to Read Greek Kit](http://www.umich.edu/~jlawler/wow/scans/Wow-6.pdf), which I gave to my Freshman Etymology students.
Comment: Let me reword this to see if I understood: You would like to make it "mandatory" (for lack of a better word) to add IPA for all examples in a question? Or only for not-so-popular languages?
Comment: I think 'mandatory' is too strong, I'm thinking of it as just a guideline. I'm not sure what a 'popular' language is, but I think it would be useful wherever the orthography employs a script that is not based on the Latin alphabet. Eg if I posted a question on Inuit and included the example utterance in Inuit orthography, I should also present it in IPA.
Comment: Yeah I agree mandatory is too strong but I couldn't find a better word to express the concept. :P I understand what you mean though. I'd like to wait and see if others want to weigh in and say their opinions too. :D
Comment: Desirable? Suggested? Recommended? I just think it would be good if people are encouraged to do this as a matter of course.
Comment: Let me re-ask the question I asked in the original post: Do you **really** want an IPA transcription of Ancient Greek? If so, which dialect? Homeric, Attic, and Koiné have quite different phonologies, and all are different from Modern Greek (which is often spelled the same). If you did get an IPA transcription (I could do one in Homeric, but not the others), what good would it do you?
Comment: So it's not possible to read Ancient Greek? That would be the use, that it would be possible to read it rather than just looking at a set of squiggles. Anyway, surely that question *is* about a specific variety, New Testament Greek?
Comment: Thanks @jlawler, I actually have learned the Greek alphabet before, but a few decades of no use and I forgot it. But, given your comments, I find it contradictory that your document teaches pronunciation, even giving IPA equivalents.
Comment: It teaches original pronunciation; if you follow the rules, you'll be pronouncing close to Homer (though few English speakers will use aspirates for phi, theta, and chi).
Comment: Maybe I missed something, but where does it say that this is an "English language website"?
Comment: @fdb, good point. I have not yet seen any questions in any language other than English, so I suppose I just made an assumption based on that. Is there any official guidance on this?
Answer: IPA should be considered essential if the question is related to phonology in some way, but if it's about morphosyntax, semantics, NLP etc I see no reason to require or even encourage it. Whichever orthography would be normally used for the language can be used. That doesn't mean that you can't ask for it if you think it would help, but we don't need a rule requiring it for all questions.
Answer: Here are my recommendations based on standard practice in linguistics publications:

Questions involving phonetics or phonology should ideally include IPA, with the following caveats:

Users asking questions come from a variety of backgrounds, so it may not be possible or necessary for them to provide an IPA transcription, depending on the nature of the question.
Some languages have orthographies with a straightforward mapping from phonemes to graphemes. Even in the phonological literature, these orthographies are sometimes used, with an accompanying note explaining where symbols depart from IPA usage. I think this would be fine in phonological questions (and others) here too.

For questions not pertaining to phonetics/phonology, a Roman-based orthography is fine. If there are any potentially confusing symbols (especially in less familiar languages), these could be explained with their corresponding IPA symbol or phonetic description.
Non-Roman orthographies are welcome, but they should always be accompanied by at least a transliteration into a Roman-based orthography, if not an IPA transcription.
Answer: I would like this conversation to go somewhere, so I hope it is okay if I answer even though my answer is basically identical to Jason Zentz's one. Every question asked I've seen so far has used Roman script (and English language) for the asking of the question. There really is no reason not to add a (however vaguely accurate) Roman or Roman-like transcription, except to show off how many scripts we bright linguists can read. So could we forget about IPA (too complicated, not everyone knows it and it's pretty useless for languages we don't even really know how to pronounce anymore) but kindly ask to use romanizations?
Answer: I think we don't need any guidelines about orthographies, and instead we should encourage people to make reasonable assumptions about what readers might know. If a reader does not know how to interpret [šιft] or [ʃɪft], then they will need to invest a bit of effort into figuring that out, if they care. The same would go for any formalized logical expression or syntactic representation. A question like "Is 在 a copula" is kind of disfunctional, from the standpoint of communicativeness, since only people who read Chinese (or know how to Google a Chinese character) can pronounce "在". But only people who know Chinese can answer the question in the first place. While it is nice to assume a universal audience, there are many questions that could be understood by only a small percentage of users here, and just as I tune out the NLP questions, I expect that they will tune out the Thai / Arabic / Russian questions, without being offended that they weren't "included".
That said, I think if the topic is English pronunciations, there should be a phonetic transcription, since almost nobody here speaks my dialect, and I get confused when people say things such as "like the vowel in 'super' or German 'über'" (apparently for some people those are the same vowel).
Comment: That would be Australians, right?
Comment: But on topic: I know that I sometimes browse questions just to soak up random knowledge, and I'd like to know that we are talking about pistis and elpis even if I couldn't read it. I've seen some Russian questions that seemed extremely interesting to me, and not being able to read them made me sad. Of course, you might say that if I care that much, I could just learn Cyrillic.


Trouble Upgrading from 2.5.2 to 2.8.1

Question: Is it possible that there's some kind of issue for anyone upgrading from EE 2.5.2 to 2.8.1? I've tried it several times now, and what happens is the process starts and initially takes EE to 2.5.5, then stops at 2.6.1. The main admin.php file is then stuck on the welcoming upgrade screen, even when deleting the /installer directory.
Comment: When I've come across similar issues it's been down to the contents of config.php. Check what `$config['app_version'] = '';` is set to.
Answer: When I've come across similar issues it's been down to the contents of config.php. Check what <code>$config['app_version'] = '';</code> is set to. It should match the version of EE that is currently installed when you run the installer (2.5.2 in your case). When it's been set to a different version (sometimes because the config files has been copied across from another installation when setting things up on the new site) I've seen the errors you describe.
Unfortunately they've not been easy to fix once you start getting into that situation as the installer and the current installation start getting confused. In those cases I've found it easier to restore from a backup, double check the settings, and then proceed with the upgrade.
I don't think there should be any particular problem with the upgrade proceedure from 2.5.2 to 2.8.1 however.

Trouble Upgrading from 2.5.2 to 2.8.1


win10 dos execute ioinc command issue

Question: My OS is win10,When I Installed Ionic with run "npm install -g ionic cordova" command,everything looks OK,but when I run "ionic start" command,normally,it should ask and wait me to enter my project name,but it just ask me but not wait me to wait,command quickly end.
"ionic start" command execute like this:
C:\WINDOWS\system32>ionic start

? What would you like to name your project:
C:\WINDOWS\system32>

"ionic start ionicstudy" command execute like this:
C:\WINDOWS\system32>ionic start ionicstudy

? What starter would you like to use: (Use arrow keys)
> tabs ............... ionic-angular A starting project with a simple tabbed interface
  blank .............. ionic-angular A blank starter project
  sidemenu ........... ionic-angular A starting project with a side menu with navigation in the content area
  super .............. ionic-angular A starting project complete with pre-built pages, providers and best practices for
 Ionic development.
  conference ......... ionic-angular A project that demonstrates a realworld application
  tutorial ........... ionic-angular A tutorial based project that goes along with the Ionic documentation
  aws ................ ionic-angular AWS Mobile Hub Starter
C:\WINDOWS\system32>

I tried to upload ioinc again an again,and restart my computer,but the same.can anyone help me?
Answer: try this ionic start name_of_your_project tabs
for example
ionic start myApp tabs
or vists https://ionicframework.com/getting-started for more details.

win10 dos execute ioinc command issue


System limit for number of file watchers reached when trying to start an expo project

Question: This question seems to be everywhere on SO, but the answers don't seem to address or answer my situation. I am just getting started with nodejs and react native, so I installed nodejs and ran these commands to get started:
$ npm install expo-cli
$ npm update
$ npx expo init helloWorld

I selected the "minimal" bare workflow and then started with npx expo start. npx couldn't find expo-cli, so I movied the node_modules directory into the helloWorld directory and started again with npx expo start. This time, the project starts okay, but immediately gives me an error about exceeding watchers, most likely due to the large number of files it tries to watch after adding the node_modules dir:
internal/fs/watchers.js:186
    throw error;
    ^

Error: ENOSPC: System limit for number of file watchers reached, watch '/home/drew/helloWorld/node_modules/css-tree'
    at FSWatcher.<computed> (internal/fs/watchers.js:178:26)
    at Object.watch (fs.js:1445:34)
    at NodeWatcher.watchdir (/home/drew/helloWorld/node_modules/sane/src/node_watcher.js:159:22)
    at Walker.<anonymous> (/home/drew/helloWorld/node_modules/sane/src/common.js:109:31)
    at Walker.emit (events.js:315:20)
    at /home/drew/helloWorld/node_modules/walker/lib/walker.js:69:16
    at FSReqCallback.oncomplete (fs.js:163:23) {
  errno: -28,
  syscall: 'watch',
  code: 'ENOSPC',
  path: '/home/drew/helloWorld/node_modules/css-tree',
  filename: '/home/drew/helloWorld/node_modules/css-tree'
}

All of the top answers I found searching for solutions here had to do with watchman, but I don't have that installed and react native seems to be using fs.watch instead. The one relevant question I found suggests that there is no way to add an ignore list like there is in watchman:

Doesn't look like it's possible. Just take a look at the path in the listener and do nothing if it starts with 'node_modules'.
It can't be that much of a performance hit, unless you're constantly updating modules while node is running, which would be a little strange.

Is this not the way I should be setting up my development environment? I want to isolate projects as much as I can (coming from python where virtualenv is very important), but it seems like it's introducing more problems than I was anticipating. How can I fix this without resorting to installing everything globally?
Answer: It looks like you missed a step after npx expo init.
When running npx expo start, and refusing to install expo-cli globally, you should have called npm install --save-dev expo-cli to add it to the dependencies in the helloworld/package.json and to install it in helloworld/node_modules.
The watcher error comes from exhausting the number of "user watches" in inotify: https://linux.die.net/man/2/inotify_add_watch
It can be tuned through sysctl, see relevant details here: https://stackoverflow.com/a/59726128/4173186 — unfortunately, I could not find a description of this sysctl in the Linux kernel documentation.


What's the fastest way to logout GMail weblogins via an Android phone

Question: Sometimes I log into GMail on a computer and after leaving the computer I notice that I forgot to log-off.
In those cases I don't have direct access to a computer but I have my Android with me. What's the fastest way to log-out? (Not counting the time for the initial setup)
Answer:
Using any browser open https://mail.google.com
Open the hamburger menu (3 bars on left). Scroll to bottom and select view Gmail in desktop
Go to the top right and sign out
Create a shortcut: If using Chrome tap the 3 dots menu and Add to home screen so that a shortcut is created on your home screen and you can jump directly to third step to sign out. On other browsers, this shortcut may be named differently


All Posts admin screen - show time underneath the 'Date'?

Question: In the list of posts in the 'All Posts' screen, is there a way to display both date -and- time in the Date column?  If you hover over the date, the time is part of abbr tag title, but I'd like to display the time, directly.  I see that I could unset the current Date column and put in a custom Date column.  Just wondering if there is a simpler solution to show the time, since it's already there in the abbr tag?
Answer: Add this code to functions.php of your active theme:
function wpse_posts_list_date_format( $time, $post ) {
    return $post->post_date;
}
add_filter( 'post_date_column_time', 'wpse_posts_list_date_format', 10, 2 );

The callback function receives 4 parameters, but we need only 2.
Comment: I'm sure the first js solution, above, would have worked, but the post_date_column_time filter solution provided more flexibility in formatting.  Instead of returning the simple $post->post_date, I used the get_post_time function to customize the date and time formats.  Thank you.
Answer: You can do it with some JavaScript:
jQuery(".column-date abbr").each(function(){
    jQuery(this).html(jQuery(this).attr("title").replace(" ", "
"));
    jQuery(this).removeAttr("title");
});

This will replace visible date portion with date and time and will clear the title attribute.
Comment: Please check your script. It does nicely replace date from title attribute, but it does not make title empty, afterwards..


Permissions Issue on Centos

Question: Hi I'm trying to deply a webapp to my server who currently runs Centos and I have the issue that I can not write to files inside the public app dir. My directory structure is as follows, there you can see permissions on each directory. The list runs from the index.php file to the root directory.
<code>-rwxrwxr-x. 1 myuser apache 102 Mar 28 08:08 /var/www/mypage/public/index.php
drwxrwxrwx. 2 myuser apache 4096 Mar 28 07:39 /var/www/mypage/public
drwxrwxr-x. 3 myuser apache 4096 Mar 28 07:39 /var/www/mypage
drwxr-xr-x. 9 myuser apache 4096 Mar 28 07:38 /var/www
drwxr-xr-x. 20 myuser apache 4096 Nov  6 09:16 /var
</code>
The server throws an error that says that the server has no permissions to  write to a file inside the public directory.
The server runs as apache and the user myuser is on the apache group.
So, what can be happening? I have other projects inside the same directory and they have the same folder structure and permission but with no permissions error.
Answer: Solved, it was a selinux configuration problem. Found an answer here https://stackoverflow.com/a/37258323/2573303

Permissions Issue on Centos


How raspberry pi talk with its HAT's

Question: I got bit confusion about the new raspberry pi HAT. Lets say we have a configured HAT with a right EEPROM, when the pi starts how it talks to the HAT ? What tool does it use (is it SMbus ? )? and how it prepare the HAT to be usable ?
Answer:
In a nutshell a HAT is a rectangular board (65x56mm) that has four
  mounting holes in the (nicely rounded) corners that align with the
  mounting holes on the B+, has a 40W GPIO header and supports the
  special autoconfiguration system that allows automatic GPIO setup and
  driver setup. The automatic configuration is achieved using 2
  dedicated pins (ID_SD and ID_SC) on the 40W B+ GPIO header that are
  reserved for an I2C EEPROM. The EEPROM holds the board manufacturer
  information, GPIO setup and a thing called a 'device tree' fragment –
  basically a description of the attached hardware that allows Linux to
  automatically load the required drivers

My bold.
See https://www.raspberrypi.org/blog/introducing-raspberry-pi-hats/
So the HAT is queried via I2C on GPIO 0/1 (pins 27/28 on the expansion header) and has the needed device tree information to set up the GPIO.  This is all handled by the kernel during boot.
Comment: Hmm, are these "hats" stackable or one at a time?
Comment: One at a time.  I understand that stackable HATs added too many design problems.  You may be able to stack identical HATs.
Comment: One hat at a time. See http://raspberrypi.stackexchange.com/q/39153/19949

How raspberry pi talk with its HAT's


Two tabs on the same page?

Question:
In a page we're designing, we have an issue of there being two tabs (closely positioned) and I wanted some suggestions for alternatives. Essentially in this page, we have a main tab that serves the function of switching between different tables. This function can't be changed but can be displayed differently (drop down wasn't working out). The second tab appears when the user clicks a button on the screen, and a slider opens up into half of the table. In this slider there is another set of tabs. Do you all have any suggestions as to how to maneuver this? Sorry if I'm being unclear, let me know if I can help clarify. I have attached an image for context.
Answer: Nothing wrong with tabs
There is nothing wrong with two sets of tabs. Tabs are a commonly used pattern and mostly well understood by people, using something unusual and new might leave users more confused.
From your sketch it looks like you maintain a clear hierarchy, as long as that is maintained in the visual design it should work fine (assuming it's a desktop application).
If you think about it there are many applications that have tabs everywhere. In photoshop, or any adobe product, they are all over the place.
If you still have doubts, test it with people to get some evidence.
Suggestion
Would it be possible to replace the single button with 3 buttons?
Comment: Thank you! The difference in visual design did the trick it getting it across.
Answer: If I understood your question correctly, you are talking about nested tab bars, right?
Have you considered placing the main navigation into a sidebar on the left side of the screen? This way, you end up with a menu, that is commonly used and known by users, and also accomplish a clear distinction between your main navigation and your lower-level tabs.
Here are some guidelines that might help you:  how to design menus
If you're struggling with the lost space, you could consider hiding your menu behind a burger button, which is another widely used and known mechanism nowadays. However, keep in mind that burger menus could harm the user experience!
Comment: Thank you for your help! Unfortunately I didn't have the scope for this project to make changes for the main navigation. However, maybe for future iterations.

Two tabs on the same page?


Driver for 3.5mm Jack

Question: I was wondering whether it is possible to write Linux Drivers for the 3.5mm jack to use it for non-audio purposes. How does the linux kernel identify that a device is inserted into the 3.5mm slot? What are the interfaces in the linux kernel I could use for this purpose?
Comment: Notice that many phones and tablets (running android/linux) detect whether some serial adaptor is connected to the 3.5mm jack upon starting up and redirect the serial console there -- but I don't think that the linux kernel has anything to say into it, or that it could just turn that on and off (I may be wrong, though). Anyways, that's highly device specific, you'll have to obtain some (possibly confidential) hardware manual.
Comment: and beware that that's 3.3v not 5v !
Comment: Gautam are you talking about a specific piece of hardware here? There's no requirement for a computer to have a 3.5mm jack. Perhaps you're referring to a Pi or some other common SOC? But if this is the case you need to say so.
Comment: No specific hardware in mind. Just wanted to ask in a general sense.
Answer: That jack is a part of your (possibly integrated) sound card, so you would have to write a driver for your sound card that treats it as something other than a sound card.
Answer: Not all 3.5mm jacks are capable of detecting that something is plugged in. It requires an extra hardware contact in the jack that is designed to become grounded if a plug is inserted, a pull-up resistor and a connection to a suitable GPIO input pin that can then be used for detection.
ALSA includes a programming interface for such detection, as most 3.5mm jacks tend to be connected to sound cards. If you are using such a jack for some other purpose (e.g. as an alternative serial port connector) and it has a plug detection contact, you might wire it into any suitable GPIO (General-Purpose Input/Output) input pin in your hardware. Then, if the chip the plug detection pin is wired to does not already have a GPIO driver, you might first write a generic GPIO driver for it, and then your design-specific plug detection driver on top of it.

Driver for 3.5mm Jack


What is the cons and pros of using decentralized crypto exchange instead of centralized?

Question: I found this wallet and want to test it. I previously used CEX only.
Answer: Decentralized crypto exchanges are not regulated by any central authority, whereas centralized exchanges are. So in order words, if you lose your money due a .hack or bad code you can't get your money back. You could be refunded in a centralized system.
Overall in a decentralized system people play by a immutable set of rules, unless enough people agree to change said rules.
In a centralized system, rules can change at any time (transfer rates, fees for dollar to eth conversion, etc ...).
In general I prefer decentralized, but this is more of a centralized vs decentralization issue.
Let me know if any part of my answer was unclear :)


Can we add decade tags?

Question: The story/show/movie identification questions would benefit from tags designating the approximate era of the story/show/movie. It helps answerers find questions they're most likely to know the answer to -- I read a lot of stories while in high-school and as an undergraduate in the 80s but not so much in the 90s (grad school is time consuming) and none in 00s (kids are even more time consuming). Decades seem like the right range for 1900s, maybe 25 year blocks for 1800s and 100 year blocks before that? And (long-live SF&F-SE) it's probably better to have 1960s instead of 60s.
Comment: Doesn't this rely on people accurately recalling the era of the work? Just flicking through the story identification tag, a lot of questions have vague statements like "late 70s or early 80s, maybe", or just when they read it, not when it was published. I'm not convinced it would be useful (but I rarely browse story identification, so I could be wrong).
Comment: Adding both 70s and 80s tag in that case? Still eliminates golden era stuff.
Comment: I know it doesn't make it easier for the individual user, but for the question-asker, a simple (and very frequently used) solution is to simply include a known decade in the question title.
Answer: I doubt the necessity of decade tags.
While tags can easily be edited at a later date, I feel that tags should be used to definitively categorize questions with known constants/facts.
Decade identification is often too fuzzy in the memories of people. Just this morning, I was considering this question and trying to remember if the movie Shocker was from the 80's or 90's. I saw the film in around 1992 or 1993. At the time, it felt like a 90's movie, and I would have sworn it was from the 90's.
Sure, the question's tags could be edited if an answer is found, but that requires/involves extra unnecessary editing for the simple purpose of cleaning up tags. It makes more sense to me to just identify the possible decade(s) in the question.
I'd also question the usefulness of such tags. The intended purpose of tags is to categorize questions so that one can search or ignore questions. While some people loathe story identification or Doctor Who questions and might want to filter those out, or highlight them as favorite tags, I see little chance that someone would specifically choose to filter/highlight questions about works from any one decade specifically.
One other issue regarding the decade tags, is the question of which decade a work should be tagged according to.
For example: A story is written/published in 1985, but the story takes place in 2015. Which decade should the question be tagged with? Does one tag it based on the date the OP thinks it was published in, or when the story takes place?

Can we add decade tags?


How can I reach and beat wave 15 of the Frost Moon?

Question: Whether I use traps or kill manually, I can't seem to get to wave 15 of the frost moon. Any advice, useful strategies or arena setups that might help? I have a trap arena, but that only gets me to Wave 7 or 8, and doing it manually gets me to wave 6 or 7.
Answer: Actually, I figured it out. I need to use traps AND kill manually. I can go down and use my Razorpine/Vampire Knives to kill mobs, while they are also getting killed by my traps.
Answer: a VERY good weapon to use for the frost moon and the pumpkin moon is to use the flairon which is a 20 percent drop chance from dduke fishron who is summoned by truffle worms while fishing in the ocean and you get the truffle worms in the mushroom biome underground and they are hard to catch so you need to sneak up on the to catch them with a bug net which is sold by the merchant for 1 gold coin and the merchant is obtained by having a proper npc room which should be 10 by 6 blocks and a chair, background walls, a table , and lighting like torches and the merchant spawnes when there is an open room and you have 50 silver coins or more in your inventory. omg that took a long time to write


WiX DifxApp error on driver package install: Could not get services associated with driver package

Question: The driver I am attempting to install is a Kernel Mini-Filter driver for Windows 7x64. The machine I am testing the installer on is in test mode and the driver files and .cat file are all signed with a certificate I made. I followed the instructions HERE and I am still unable to get the driver to install. I made sure to add DriverPackageType = FileSystemMinifilter to the [version] section of the .inf file.
Here is an excerpt from my WiX installer xml:
        <Directory Id="Driver" Name="Driver">
          <Component Id="MY-DRIVER-NAME" Guid="MY-GUID">
            <File
              Id="DRIVER_FILE1_SYS"
              Name="DriverFile1.sys"
              DiskId="1"
              Source="path_to_sys_file"
              Vital="yes"
              System="yes"
              ReadOnly="yes"
              KeyPath="yes"/>
            <File
              Id="DRIVER_FILE2_SYS"
              Name="DriverFile2.sys"
              DiskId="1"
              Source="path_to_sys_file"
              Vital="yes"
              System="yes"
              ReadOnly="yes"
              KeyPath="yes"/>
            <File
              Id="DRIVER_FILE3_SYS"
              Name="DriverFile3.sys"
              DiskId="1"
              Source="path_to_sys_file"
              Vital="yes"
              System="yes"
              ReadOnly="yes"
              KeyPath="yes"/>
            <File
              Id="DRIVER_FILE4_SYS"
              Name="DriverFile4.sys"
              DiskId="1"
              Source="path_to_sys_file"
              Vital="yes"
              System="yes"
              ReadOnly="yes"
              KeyPath="yes"/>
            <File
              Id="DRIVER_FILE_INF"
              Name="DriverFile.inf"
              DiskId="1"
              Source="path_to_inf_file"
              Vital="yes"
              System="yes"
              ReadOnly="yes"/>
            <File
              Id="DRIVER_FILE_CAT"
              Name="DriverFile.cat"
              DiskId="1"
              Source="path_to_cat_file"
              Vital="yes"
              System="yes"
              ReadOnly="yes"/>
            <difx:Driver Legacy="yes"/>
          </Component>

The "Id", "Name", and "Source" paths have been changed (I'm not actually using the values shown above it is just an example). I have no problem building the installer. When I run it with msiexec /i MyMsi.msi /l*v install.log I see the error DIFXAPP: ERROR: Could not get services associated with driver package
Then it tries to undo the changes and runs into a few more errors:
ERROR: Unable to revert to a previous driver store for service ''.
ERROR: Unable to open service '' to delete it because of error 0x7B

The .inf file has no problem installing with the command:
RUNDLL32.EXE SETUPAPI.DLL,InstallHinfSection DefaultInstall 132 path-to-inf\infname.inf

It also successfully installs via 'right-click install'.
Adding the 'RUNDLL32.EXE' command above as a custom action ExeCommand to my WiX installer instead of using DifxApp works when installing the .msi file on the machine manually, however, when deployed via GPO from an Active Directory server (Per-Computer GPO), the installation does not complete. (Everything except the INF install completes).
Answer: Turns out the answer is a modified version of the RUNDLL32.exe command. Change the 132 to 131
RUNDLL32.EXE SETUPAPI.DLL,InstallHinfSection DefaultInstall 131 path-to-inf\infname.inf

According to http://msdn.microsoft.com/en-us/library/aa376957(v=vs.85).aspx
128 + 4 = 132 = Ask the user to reboot if required
128 + 3 = 131 = Don't ask just reboot
Since this is being deployed from AD and installed on boot before any user is logged on, I imagine it fails when the program tries to create a popup box to ask if the user would like to shutdown. Making it 131 causes it to install and reboot the computer all before a user can log on. After the computer is done with the double reboot it's good to go.


Crying soldiers in "Paths Of Glory"

Question: Why did the French soldiers in Paths of Glory cry at the end of the film when the German girl was singing?
Answer: The song evokes memories of their youth, their homes, and their loves in a world they may never see again. There is still a hint of their common humanity and sensitivity in the men despite the misery and depravity of war.
Quoting from this detailed analysis of the movie:

In the final memorable sequence of the film, Dax wanders in the streets of the town towards his quarters. He hears lecherous, cat-call whistling and shouting in a nearby tavern, where men from his troops are getting drunk for "a little diversion" (according to the master of ceremonies tavern keeper) following the execution. He stands outside in the doorway, witnessing the coaxing of a frightened, fragile, teary-eyed and innocent German blonde girl (Susanne Christian in the credits, actually Christiane Harlan, director Kubrick's future third and last wife). She may be a prisoner, or a refugee who is forced to sing a song in front of rowdy soldiers who are cat-calling, hooting, and laughing at her.
The girl is introduced by the tavern keeper as "our latest acquisition
from the enemy...from Germany, the land of the Hun!" She is "a little
pearl washed ashore by the tide of war" who has "a little natural
talent" (he gestures over her physical curves) and "she can sing like
a bird - she has a throat of gold." Dax recognizes companions of the
executed men and is disappointed by their apparent lustful callousness
shortly following the death of their own comrades. In front of the
raucous troops, the timid and fragile young girl - with tears on her
cheeks - begins to sing a ballad - in German. [It is a
universally-known folk song of love in war, called "The Faithful
Soldier" - (La Treue Hussar (Fr.) or Der treue Hussar (Ger.)).] It is
a simple, sweet song that is inaudible until the audience quiets down
and listens intently and respectfully to her plaintive voice. Soon,
hers is the only voice in the tavern:
(the girls sings the song in German)
The soldiers - for once affected and showing some regard for human life - join her and hum along with their faces drawn to her. The human feelings in the song transcend the language barriers - some of the French soldiers may know the tune of their enemy's song, and some may even know the words. One of the youngest recruits in the audience has tears flowing down his cheeks. The song evokes memories of their youth, their homes, and their loves in a world they may never see again. There is still a hint of their common humanity and sensitivity in the men despite the misery and depravity of war.

Another beautiful explanation of the scene:

The song has begun to pacify the men, and so the frenetic pace of the
editing slows as the gaze of the men moves from carnality to
contemplation.
The men begin humming along at 2:25 as the young blond soldier
swallows hard, as though preparing himself for something awful. The
survey of faces continues, and the men look increasingly worried until
the 2:42 mark, when an older soldier appears mortified, ashamed. At
the 2:54 mark, we return to the young girl who has taken note of the
men's tears, and she regains her confidence, nodding her head to the
audience to encourage them.
As the audience gazes at the helpless girl, the imagination of each
soldier wanders off. The think of their wives, sisters and daughters.
If a German girl could be plucked from her home and set before a room
full of cat-calling brutes, the same could happen to a girl they knew.
The young blond soldier weeps because the girl is not the enemy, but
his own girlfriend, disgraced by jeers. She is no longer a German
girl, but a girl, and then no longer a girl, but a human being among
other human beings. The soldiers begin to cry not on behalf of the
girl, but as the girl. Sympathy is an act of imitation, and every act
of imitation is an act of becoming.

(Emphasis mine)

Crying soldiers in "Paths Of Glory"


Drop down menu in SharePoint 2013 Foundation

Question: I have got opportunity to work on SharePoint 2013 Foundation version and i noticed there is no publishing template available and thus no navigation. Is there any trick or way I can make drop down menu for the site.
Comment: By Publishing template, do you mean to create a Publishing Portal Site?
Comment: And what type of drop-down menu are we talking about?
Comment: Asad like in Server we find publishing but i know in foundation we dont have so thats why navigation is not there...all i am asking is drop down menu in SharePoint 2013 Foundation
Answer: There's no drop down in the Foundation version. If you want this, you need to revert to javascript.
Here's somewhere to start:
mega drop down SharePoint 2013 - Any more third party tool


Terraria - Caster AI - how to make a slope they don't teleport to?

Question: I want to make a dungeon grinder for a Wisp in a Bottle. Casters are giving me a problem, though. How can I make sure they don't spawn to specific areas? How do these "slopes" work?
Comment: Can you give some more context on what `slopes` you are referring to? I am assuming you found something saying they won't spawn on sloped terrain?
Comment: I haven't seen anything to indicate that the slope assumption is correct.
Comment: Other users claimed that the land was "sloped" so the casters could only land on specific surfaces, from which they could quickly kill them.
Comment: Sounds realy wired I never heard of a method that stops Specific Enemies from spawning. @KvB can you give a link or something to your Sources ?
Answer: I don't think there is a way to stop them from spawning. However, there is a way to make them easier to handle. Here is a step-by-step procedure.
1) Hollow out a large portion of the Dungeon, at least 100 tiles wide and 40 tiles high (make sure the backwalls are in back of every part of the section you hollow out). You will probably have to make the section in a tall part of the Dungeon.
2) Build a platform in such a way that you cannot see the bottom of the pit, but also so that mobs can still spawn on the floor of the pit.
3) Stand on the platform and barrage the floor below with Chlorophyte Bullets/Rockets/Terra Beams/whatever. All you have to worry about is the occasional Paladin.
As a plus, (which is what makes the casters easier) the casters will only be able to spawn on the floor or the platform. If you're on the platform, they'll only spawn on the platform (and vice versa for the floor), so they should be very easy targets if you're using, well, pretty much any weapon.
Answer: You can make a block sloped by hitting it with a hammer. I do not think that this affects monster spawns, however.
From the Wiki:

When the game decides to spawn a monster, it will first choose a
  random tile within a rectangle around the player. The maximum distance
  from the player it can choose from is 84 tiles to the left or right,
  and 47 tiles up or down. If the picked tile is solid block, it will
  try another one. If the picked tile has a wall that blocks monsters
  from spawning, it will also try another tile.
Once an empty tile is found, it moves down until it finds the ground.
  If there is enough space for a monster to be spawned at this location,
  this will be the tile it chooses. The exception to this is when the
  player is in an area where Harpies can be spawned. In this case the
  game does not attempt to find a ground tile.
The chosen tile is then checked to make sure it is not within the
  "safe" area around the player. Monsters cannot spawn less than 62
  tiles away left or right and about 35 tiles above or below.

There is nothing in there that would lead me to believe that a monster cannot spawn on sloped ground, since for most purposes, sloping ground is purely aesthetic.


Removing particular elements from an array using dynamic, mongo-like expressions

Question: I am designing a light mongo-like database which takes an object-oriented query statement such that each periodically seperated reference may either be a function or object reference:
foo.users.find( args );
foo.users.remove( args );

Where args is a JSON encoded object string.
Each function my database supports must take a pointer to the current result set with which to operate on (given by obj) as well as a comparator object, similar to those seen in mongo.
remove:function(obj,comp){
    comp = JSON.parse(comp);
    var result = [];
    for(var i =obj.length-1;i>=0;--i){

        /**For each object in the array*/
        var match = true;
        for(var key in comp){
            /**For each comparator field*/

            for(var test in comp[key]){
                /**For each logical comparator test*/
                if(comparators[test](obj[i][key],comp[key]) == false){
                    /**A logical test failed, this item does not match
                    all the criteria*/
                    match=false;
                    break;
                }
            }

        }
        if(match == true){
            /**The item matches the given criteria*/
            result.push( obj.slice(i,i+1)[0] );
        }
    }
    return result;
}

In my specific use case, the query:
users.remove({"username":{"$eq":"Hello_World"}})

Did not work, even though other queries which operate on the same data set, in a similar manner, would work correctly. The 'users' reference points to a location on a tree which IS an array of objects and it DOES contain the appropriate user object.
Changes should be made permanent to the tree however, it is not currently working as such. A further query to the tree would reveal that the user "Hello_World" was never removed and is a valid user.
No changes are made to 'obj' outside similar functions. Also, the return should be an object-array with 1 object however, contains none.
Comment: All valid javascript? No id10t errors?
Answer: I have found and solved the issues:

My comparator test in the 3rd nested loop, should instead be:
if (comparators[test](obj[i][key],comp[key][test]) == false){

}

Instead of obj.slice(), try obj.splice(). Only logic I could see to this was that my NodeJS environment does not support the function (which I would usually think otherwise).

In the end, it works as directed, now onto bigger and better things


tsocks using for terminal commands

Question: Actually, I'm using LinuxMint and would like to configure tsocks to use tor proxy as some repositories are banned where I am !.

I did a lot of changes in /etc/tor/torrc, /etc/privoxy/config and /etc/tsocks.config but no way to work and I didn't know how to reset these files to default values as it was long time ago. I tried to remove these packages and reinstall them but these files aren't removable, and I don't know if deleting them manually safe.

Then can somebody help me to re-configure them correctly to be able to use tsocks sudo apt-get install **** I searched a lot but nothing worked well.

Thanks in advance
Comment: have you try `dpkg-reconfigure  ` and how do you remove it did you try `apt-get purge `?
Comment: well,that worked to re-configure them .However,now how to configure them out to use TOR ?
Answer: you can use dpkg-reconfigure <package name> to restore your package defaults.
if thats doesn't work you can purge them (purge remove the package from your PC totally including it's configs files) by using :
apt-get purge <package name>
Answer: torrc you should not have to mess with.
Privoxy's default config has a single line you need to uncomment to work with the default torrc.  Search in the file for "Tor".  Details:

Since Privoxy 3.0.5, its main configuration file is already prepared
  for Tor, if you are using a default Tor configuration and run it on
  the same system as Privoxy, you just have to edit the forwarding
  section and uncomment the line:
#        forward-socks5             /     127.0.0.1:9050 .

tsocks needs to be told to use 127.0.0.1:8118 (Privoxy's port) for all addresses.
You can also try using torsocks which may work without configuration.
The Tor's project page on torsocks is something you should read.

tsocks using for terminal commands


Why couldn't the guardians leave the infinity stone with the collector?

Question: I've done a little research regarding the collector, and he's supposedly one of the most powerful beings in the marvel comics universe.  If that's the case, wouldn't the orb have been safe with him?  Why did the guardians feel like they had to take the stone someplace else when they could have left it with such a powerful being and gotten paid?  The aether seems to be safe with the Collector, and the asgardians seemed to think it was safe to leave the aether with him, so why couldn't the orb have been left with him?
Answer: From my point of view, the obvious answer is the Collector just had his whole collection blown to smithereens due to the infinity stone. Obviously he is not able to control the destructive power of the stone. Seeing as how it was too much for him, they needed to leave it in other hands. I would also wonder at this point if the Asgardians  might want to rethink their leaving things with the Collector as well ... he's not quite as dependable as previously thought.
Comment: While this makes sense, it would have to mean the cinematic universe Collector is but a shadow of the powerful being from the comics universe.  Further just because he was betrayed by his closest servant, doesn't necessarily mean he cannot handle valuable or powerful objects.  In face, if he couldn't handle powerful objects, his entire character would no longer have a story or reason to exist.  Also, what makes the nova corps capable of keeping the stone more safe than the collector could?
Comment: James Gunn deliberately made many characters in his Guardians movies different from their comic book counterparts, which he admits to in numerous sources (for example, in "Guardians of the Galaxy Vol. 2" audio commentary). If Drax, Yondu and Taserface are all different in the movies than in the comics, why wouldn't The Collector be as well?


customizing google maps V.3 streetview controls

Question: I've got one instance of google maps with fully customized options in my app.The users are able to switch to street view if they want to and come back all with the same instance of the map.
Is there a way to customize streetview controls when creating the map instance, along with the other map options?
I can not see any documentation on how to do that on the main map, while if you directly instantiate a the street view on a separate dom element you can do that like this:
var panoramaOptions = {
    zoomControl: false,
    linksControl: false,
    panControl: false
}
var panorama = new google.maps.StreetViewPanorama(document.getElementById("map_streetview"), panoramaOptions)
mymap.setStreetView(panorama)

Any hint?
Answer: You may access the streetView-property of a map(no matter if custom or default) by using the getStreetView()-method of the map.
Use the setOptions()-method of the streetView to set the options:
mymap.getStreetView().setOptions(panoramaOptions);

Comment: Doesn't look like setOptions exists anymore on v3 - https://developers.google.com/maps/documentation/javascript/reference#StreetViewPanorama


What rare items exist in Minecraft, and where can I find them?

Question: What are the rare materials/drops in Minecraft? I'm talking about things you might never find, except perhaps in chests near mob spawners, or by some convoluted collection process.
I already know about saddles, records and slime balls. What other rarities am I missing?
Answer: Unique Item

Dragon Egg - only obtainable by killing the Ender Dragon.

Rare Items

Saddles - Only found in chests in dungeons, Nether Fortresses, Desert and Jungle Temples, and NPC villages. Can also be obtained by trading with Villagers and fishing. It can also be obtained by killing a ravager.
Horse Armor - Only found in dungeons, Nether Fortresses, Desert/Jungle temples, and NPC villages.
Music Disc - Only gained by tricking skeleton into shooting a creeper with its arrow. Also, discs "13" and "cat" are found in 8% of dungeon chests.
Name Tag - Only found in chests in dungeons, Nether Fortresses, Desert and Jungle Temples, and NPC villages. Can also be obtained by trading with Villagers and fishing.
Melon Seeds - Can be found in minecart with chests in abandoned mine shafts. You can also get them from NPCs.

Rare Mob Drops

Ender Pearls - A rare drop from a rare mob (Endermen).
Blaze Rods - Blaze are flying mobs in the nether; hazardous to kill.  Can be used to make a few other ingredients via Blaze Powder
Ghast Tear - Prone to falling into lava when you kill the Ghast.
Wither Skeleton Skull - A rare drop from a somewhat rare mob (Wither Skeleton).
Nether Star - An item drop from the Wither Boss
Mob head(other than Wither Skeleton) -  Can only be obtained by blowing up the said mob with a charged creeper (creeper struck by lightning).

Rare Blocks

Emerald Ore - A new block that only generates in one biome, and generates between three and eight blocks per chunk. Used as a currency for trading with NPC villagers.
Beacon Block - An item crafted from the Nether Star, 3 Obsidian, and 5 Glass.
Sponge - Found only in ocean monuments and dropped by Elder Guardians.
Ice - can only be mined with a silk touch pickaxe, can only be made in a snowy biome.
Packed Ice - A more compact version of Ice, but doesn't melt in Torch/Glowstone light, only found in the rare Ice Plains Spikes biome, and obtainable only with silk touch enchanted Pickaxes.
Prismarine - Only found in Ocean Monuments. It can be crafted from prismarine shards dropped by Guardians.
Sea Lantern - Only found in Ocean Monuments. It can be crafted from prismarine shards and prismarine crystals dropped by Guardians.

Other

Bedrock/Adminium - Cannot be mined, found at bottom of map or top of the Nether.  Must be spawned through the console to place.
End portal and End Portal Frame - 1,152 end portal blocks per world and 1,536 end portal frame blocks. (As of 1.15)
Command Block - Only obtainable via console command.

Command Cart - Also must be obtained by commands.

Barrier - Obtained by commands.
Comment: Golden Apple in particular -- Normal apple + 72 gold ingots (8 gold blocks)
Comment: Cocoa beans seem fairly common within the Jungle biome -- but you have to have a Jungle biome handy to find them. Does that still count as rare? It doesn't seem more rare than pumpkins, per se.
Comment: @KBKarma: The rule is, just do it :) If I or anyone else don't agree with it, we'll roll it back or edit it ourselves.  And if you have below a certain rep (3k I think), your edit will need to be approved.  So basically, the system self-moderates, so knock yourself out :)
Comment: I've found at least 3 records in dungeon chests.
Comment: Since new rare stuff has been added, this post needs to be updated. What are the rules on editing these sorts of posts? I'm planning on adding info on Emeralds.
Comment: Gears are not obtainable in any way in any form through any commands or any item editing. Their object sprite and ID was replaced by redstone.
Comment: No Diamond?  That's...odd.
Comment: I forgot Apples and clay, but apart from that nothing is particularly rare. Once you reach bedrock, and learn how to kill a few mobs, the only rare items are those in chests.
Comment: While rare clay is on GetSatisfaction, that is as a user complaint. No one from Mojang has aknowledged it as such.
Comment: @Macha: See http://getsatisfaction.com/mojang/topics/clay_rarer_than_diamonds#reply_4120949.  There is really no doubt, in my mind at least, that clay was never intended to be *that* rare.
Comment: @BlueRaja: So, at that link you have proof that it is rare. Where is the proof that Notch hadn't intended that?
Comment: [Golden Apples](http://www.minecraftwiki.net/wiki/Golden_Apple) aren't as hard to make now. Just an apple and 8 gold nuggets (instead of gold blocks).
Comment: It is possible to mine ice blocks now with a Silk Touch enchanted pickaxe.
Comment: One more thing: The Elytra! I'm late, but there's new things now like the shulker, too.


How to create a shapefile in QGIS using the spreadsheet?

Question: I have a spreadsheet which has columns (X, Y, Att1, Att2 ...). I want to create a point shapefile, all columns in the spreadsheet to be the column in the shapefile. How can I do this in QGIS?
Comment: your question looks similar to  http://gis.stackexchange.com/questions/72781/how-do-i-export-xy-data-from-qgis-to-shapefile/72807#72807
Answer: You will use the Delimited Text Import feature as a one time process.
Save the spreadsheet as .csv (comma separated value) then import it into QGIS via the menu command
LAYER|ADD DELIMITED TEXT LAYER
Many of the options can remain preset, although likely you will have to choose which columns hold the x y data. You may also have to select a CRS (coordinate reference system) as the second stage of the wizard. For instance for x y in decimal degrees you can choose EPSG:4326
Once the data has been imported, you then right click on the new layer and SAVE AS an ESRI Shapefile to create the shp format.
There is also the ability to read xl files directly but this is troublesome IMHO and does not create a shapefile.
hth
Answer:
Convert your spreadsheet to CSV(comma separated values) using MS Office or OpenOffice
Use QGIS text delimited layer plugin to import your xy data file.
Select X(Longitude/Easting) and Y(Latitude/Norhting) and press OK
In CRS window select CRS (for example WGS84) & Press OK
In the Layers section select the recently imported layer right click and save as shapefile.
Comment: text delimited import is natively available, it is not a plugin anymore
Comment: @Willy thanks for your information but i think it was not there in QGIS 1.8 and user didn't mention which version he has on his system.


Car financed at 24.90% -- what can I do?

Question: The car dealer told me the car worth $3900.00,  I am paying him $279.17 for 19 months. That's $5304.23. Am I getting ripped off? If so, is there any way to fix it?
Comment: Yes you are getting ripped off. What a horrible interest rate even for poor credit
Comment: You need to specify what state or country you're in, because the laws on interest rates and consumer contracts can vary pretty wildly.  If you're paying that kind of interest then my suspicion is that you're dealing with a "buy here - pay here" car lot because your credit is not very good.  Still, many states have limitations on what kind of interest rate you can be charged, so make sure to update your question to reflect this in order to get the best answers.
Comment: $3900 at 24.9% is "only" a payment of $250.47. There would need to be a loan of $4346.83 to get up to that payment at that rate. Does the paperwork show other costs of $446.83?
Comment: @Eric depending on the country it is not a bad rate. Is it USA?
Comment: Did you shop anywhere else for credit?
Comment: Unless your credit is really, really poor and the car is really worth $3,900 -- yes, you are getting ripped off.
Comment: It seems right if they added tax/title/licensing fees, and are charging interest...  Do you have the loan contract?
Comment: Retail Installment Contract & Security Agreement 24.90%
Answer: If you are a subprime borrower, that may not be an unreasonable rate given the risk they are accepting. In any case, it's what you agreed to.
As others have said, you could/should have shopped elsewhere for the loan.
In fact, you can still shop elsewhere for a loan to refinance that vehicle and thus lower the rate, unless the existing loan has equally obnoxious rules about that.
Comment: Another possible issue with refinancing is that the car may be upside down - the amount owed exceeds the car's value.  This is particularly likely if the dealer's number of $3,900 was inflated (which would not be surprising).  OP may want to check the Blue Book value for the car.  If it is upside down, they'd have to come up with enough cash to pay off the difference between the balance owed and the amount another lender is willing to loan them.
Answer: You could look into refinancing with a bank or credit union.  But to weed out options quickly, use a service like LendingTree, which can vet multiple options for you a whole lot more quickly than you could probably do yourself.  (I don't work for, or get any benefit from LendingTree.)  Whatever you do, try to do all the applying within a short span of time, as to not negatively affect your credit score (read here) by creating extraneous inquiries.
Then again, if your credit sucks, you might not qualify for a re-fi.  If you are turned down, make your payments on time for six months or so, and try again.
Answer: Anytime you borrow money at that rate, you are getting ripped off.
One way to rectify this situation is to pay the car off as soon as possible.  You can probably get a second job that makes $1000 per month.  If so you will be done in 4 months.    Do that and you will pay less than $300 in interest.  It is a small price to pay for an important lesson.
While you can save some money refinancing, working and paying the loan off is, in my opinion a better option.  Even if you can get the rate down to 12%, you are still giving too much money to banks.
Comment: Absolutely agree that doing whatever can be done to pay that of asap is the better option. Interest rates are typically higher for used cars than new ones and without good credit they will be higher still. An extra job for a period of time to pay that loan off quickly will be better than a refinance to half the rate and paying it off as scheduled.


Why do all-pair shortest path algorithms work with negative weights?

Question: I've been studying all-pair shortest path algorithms recently such as Floyd-Warshall and Johnson's algorithm, and I've noticed that these algorithms produce correct solutions even when a graph contains negative weight edges (but not negative weight cycles). For comparison, Dijkstra's algorithm (which is single-source shortest path) does not work for negative weight edges. What makes the all-pair shortest path algorithms work with negative weights?
Comment: It might be instructive to learn why Dijkstra's algorithm _doesn't_ work with negative weights: http://stackoverflow.com/questions/13159337/why-dijkstras-algo-not-work-for-negative-weight-edges
Answer: Floyd Warshall's all pairs shortest paths algorithm works for graphs with negative edge weights because the correctness of the algorithm does not depend on edge's weight being non-negative, while the correctness of Dijkstra's algorithm is based on this fact.
Correctness of Dijkstra's algorithm:
We have 2 sets of vertices at any step of the algorithm. Set A consists of the vertices to which we have computed the shortest paths. Set B consists of the remaining vertices.
Inductive Hypothesis: At each step we will assume that all previous iterations are correct.
Inductive Step: When we add a vertex V to the set A and set the distance to be dist[V], we must prove that this distance is optimal. If this is not optimal then there must be some other path to the vertex V that is of shorter length.
Suppose this some other path goes through some vertex X in the set B.
Now, since dist[V] <= dist[X] , therefore any other path to V will be atleast dist[V] length, unless the graph has negative edge lengths.
Correctness of Floyd Warshall's algorithm:
Any path from vertex S to vertex T, will go through any other vertex U of the graph. Thus the shortest path from S to T can be computed as the

min( shortest_path(S to U) + shortest_path(U to T)) for all vertices U in the graph.

As you can see there is no dependence on the graph's edges to be non-negative as long as the sub calls compute the paths correctly. And the sub calls compute the paths correctly as long as the base cases have been properly initialized.
Comment: You can't just say "Now, since dist[V] <= dist[X]", at least not without qualifying X a bit more.  I think what you need here is to say "Suppose this some other path goes through some vertex X *in B.*" in the previous sentence, and explain why it's not necessary to consider the case where X is in A.
Comment: If the path has to go through some vertex of set A then it will directly start from that vertex. I thought this too basic not to add. However I have added that "X is in set B". Thanks for pointing out.
Answer: Dijkstra's Algorithm doesn't work for negative weight edge because it is based on the greedy strategy(an assumption) that once a vertex v was added to the set S, d[v] contains the minimum distance possible.
But if the last vertex in Q was added to S and it has some outgoing negative weight edges. The effects on the distance that caused by negative edges won't count.
However, all pairs shortest paths algorithm will capture those updates.


$P\{X>r\}$ for a geometric distribution

Question: In the geometric distribution section of the Head First statistics book, it is said that the $P\{X>r\}$ is $q^r$ because for the success to occur after $r$ trials it means that the first $r$ trials must have ended in failure. And, according to the book, we don't need $p$ in this formula because we do not want to know which trial was successful, only that we needed more than $r$ trials.  However, I do not really understand this concept. Shouldn't the probability rather be $q^rp + q^r+p$ and so on until infinity. Could anyone please help explain this?
Answer: The book does not cheat you. In order to know that $X>r$, you only need to ensure that $r$ first trials are unsuccessful. These $r$ consecutive failures have probability $q^r$, which is the answer to your question.
Comment: Thanks for the answer, I understand the mathematical proof now but intuitively the only thing that confuses me is that when we consider the success occurring in either r+1 or r+2 or r+3 or r+4 trials  (which is what is implied by P{X>r} in my mind) what we usually do is add up the probabilities for each of those, since the probability of it being > r can occur in any of those and not necessarily the r+1th trial which is what q^r would suggest.
Comment: @QPTR, if you always think about what you "usually do", you'll never learn anything new. So I recommend to try hard getting used to new ideas and approaches.
Comment: well, true, but I do want to learn, which is why I was curious about the intuition behind this new way.
Answer: Let us remember how geometric distribution works. Let $X$ is geometric distr. with parameter $p$.
Then, we calculate:
$$Pr(X\le r)=\sum_{k=1}^rpq^{k-1}. $$
Now we are looking for opposite probability (remember that $1=p+q$), so:
$$Pr(X>r)=1-\sum_{k=1}^rpq^{k-1} =1-\sum_{k=1}^r((1-q)q^{k-1}).  $$
$$Pr(X>r)=1-\sum_{k=1}^r(q^{k-1}-q^k) =1-(1-q^r)=q^r. $$
Where in the last equality survives only first and last member of the sum. Hence the answer $q^r$.
Comment: Thanks for the answer. I understand the derivation now!
Comment: I also tried doing it the other way round that is the sum of q^r and q^r+1 and so on and it gives the same answer!

$P\{X>r\}$ for a geometric distribution


Add GMail to Ubuntu Indicator Applet

Question: How do I add GMail to the "Me" menu, aka the Indicator Applet, in Ubuntu 10.04?
Answer: I don't know if this is the only way, but I found the following at the indicator applet site.  At this Launchpad post, they suggest following these directions to install Gmail Notifier, which worked.  I followed the first suggestion, which consisted of:
sudo add-apt-repository ppa:gm-notify-maintainers/ppa
sudo apt-get update && sudo apt-get install gm-notify

and then System > Preferences > GMail Notifier Configuration to enter your gmail account information.
I also wanted to remove the unused evolution section of the indicator applet menu.  I followed the advice from How do I add/remove an entry in the Indicator Applet in Gnome? and added the file "evolution" to the directory ~/.config/indicators/messages/applications-blacklist, which contained the entry:
/usr/share/applications/evolution.desktop

Finally, to restart the gnome panel with the changes I ran
killall gnome-panel

so that I didn't need to log off.
Comment: you can add multiple links by posting the extras into comments, or changing "http" to "hxxp".  high-rep users can edit those into your post for you (though if you go back to edit later you'll hit the same problem).
Comment: Thank you for the edit. It makes the answer much easier to read.
Comment: No other answers yet, so I'm marking this answer "accepted" even though it was my own contribution.  It worked for me.

Add GMail to Ubuntu Indicator Applet


What is considered a good response time for a dynamic, personalized web application?

Question: For a complex web application that includes dynamic content and personalization, what is a good response time from the server (so excluding network latency and browser rendering time)?  I'm thinking about sites like Facebook, Amazon, MyYahoo, etc.  A related question is what is a good response time for a backend service?
Comment: For a site such as Facebook, they have a 1.8-2 second time to first byte / which includes a good chunk of content on page.  Then they ajax the rest of the content in the next 1-2 seconds.
Answer: There's a great deal of research on this. Here's a quick summary.

Response Times: The 3 Important Limits
by Jakob Nielsen on January 1, 1993
Summary: There are 3 main time limits (which are determined by human perceptual abilities) to keep in mind when optimizing web and application performance.
Excerpt from Chapter 5 in my book Usability Engineering, from 1993:
The basic advice regarding response times has been about the same for thirty years [Miller 1968; Card et al. 1991]:

0.1 second is about the limit for having the user feel that the system is reacting instantaneously, meaning that no special feedback is necessary except to display the result.
1.0 second is about the limit for the user's flow of thought to stay uninterrupted, even though the user will notice the delay. Normally, no special feedback is necessary during delays of more than 0.1 but less than 1.0 second, but the user does lose the feeling of operating directly on the data.
10 seconds is about the limit for keeping the user's attention focused on the dialogue. For longer delays, users will want to perform other tasks while waiting for the computer to finish, so they should be given feedback indicating when the computer expects to be done. Feedback during the delay is especially important if the response time is likely to be highly variable, since users will then not know what to expect.
Comment: @KarthikCherukuri - yes, it's still relevant. The answer is talking about human perception, which is a function of biology. The time between 1993 and today is pretty small when it comes to evolutionary time scales. Our neuroanatomy is the same now as it was then.
Comment: Does this still holds good in 2017 ??
Comment: The first link does not work anymore
Comment: In this age of fully matured social media that brazenly leverages instantaneous feedback looks and endless content feeds, I'm sure these numbers are lower but personally I think these are still good metrics to keep in mind. .1s is never going to change, as its too unnoticeable to the lay person. 1s is likely fine, as people are used to that in today's web as they wait for content to be served. But I fear the gap to "keeping attention" is far lower than 10s. In any case, definitely a +1 here for coming equipped with research and proper citations!
Answer: We strive for response times of 20 milliseconds, while some complex pages take up to 100 milliseconds. For the most complex pages, we break the page down into smaller pieces, and use the progressive display pattern to load each section. This way, some portions load quickly, even if the page takes 1 to 2 seconds to load, keeping the user engaged while the rest of the page is loading.
Comment: Maybe he really meant 20 milliseconds.  The app I'm presently working on has typical response times averaging around 15 ms (when testing locally on my laptop).  That's not what most users actually see, unfortunately, since they're far away from the server, plus there's render time you have to include, too.  But from a pure app perspective, 15, or even a tad under 10, is very possible, even for a complex e-commerce app.
Comment: Maybe 2000 milliseconds and 10000 ms?
Answer: It depends on what keeps your users happy. For example, Gmail takes quite a while to open at first, but users wait because it is worth waiting for.
Comment: The faster, the better.
Comment: That's fair.  My question is a bit general.  I guess I am looking for real world numbers of what people are striving for.  A know a lot of it depends on the situation.  Thanks!
Answer: I have been striving for < 3 seconds for my applications, but I'm a bit picky when it comes to performance.
If you ask around, they say that people start to lose interest in the >= 7 second range, by 10-15 seconds you have typically lost them, unless you REALLY have something they want or need.
Comment: < 3 sounds more like you're talking about page load time which is not the same as response time.
Comment: 3 seconds for app server or rendering on the browser?  I aim for 100mSec for app server.  but 4 second on the browser.
Comment: "I have been striving for < 3 seconds [response time] for my applications, but I'm a bit picky when it comes to performance." - was that a joke or have applications improved that much since 2008?
Answer: Of course, it lays in the nature of your question, so answers are highly subjective.
The first response of a website is also only a small part of the time until a page is readable/usable.
I am annoyed by everything larger than 10 sec responses. I think a website should be rendered after 5-7 sec.
Btw: stackoverflow.com has an excellent response time!
Answer: Our company has a 5 second response time standard limit, and we aim for 2-3 seconds in general. This accounts for 98% of page loads. A few particular tasks are allowed to go up to 15 seconds, but we then mitigate that time by putting up a page and refreshing every 5 seconds telling the user that we are still trying to process the request. That way the user sees that something is happening and doesn't just leave. Although, considering that I work on a website whose users are forced to use for business reasons, they aren't going to leave, but they are capable of complaining quite loudly.
In general, if the processing is going to take more than 5 seconds, put up a temporary page so that the user doesn't lose interest.
Comment: Hi @Elie, I wonder if you still work for that company and if the response time have changed over 14 years now ;) Came here as my request to get paginated list of 24 products takes ~650 ms ( out of 1800 products available )
Answer: I think you will find that if your web app is performing a complex operation then provided feedback is given to the user, they won't mind (too much).
For example: Loading Google Mail.
Answer: Not only does it depend on what keeps your users happy, but how much development time do you have? What kind of resources can you throw at the problem (software, hardware, and people)?
I don't mind a couple-few second delay for hosted applications if they're doing something "complex". If it's really simple, delays bother me.
Answer: 2 to 3 seconds