How to log data to a database using javascript?

Question: I am to track who viewed a specific document in a document library, I found out that there is no Item Viewed event or similar event in the SPEventReceiver class. SO I developed a spfx solution that attaches event listeners to html elements. I attached the event listeners on the links to a file I was able to call a function regarding this however I need to log those who viewed the event in a database.
Answer: You can create a list named logs,
and you can add to it a new item every time a user is viewing your specified document.
Creating a new item you can achieve by javascript REST call:
<code>// item = { __metadata: {type: SP.Data.xxxListItem }, ....}
PostListItem = function (listName, item) {
  return jQuery.ajax({
    url: encodeURI(_spPageContextInfo.webServerRelativeUrl + "/_api/web/lists/getbytitle('" + listName + "')/items"),
    type: "POST",
    data: JSON.stringify(item),
    headers: {
        "Accept": "application/json; odata=verbose",
        "Content-Type": "application/json;odata=verbose",
        "X-RequestDigest": $("#__REQUESTDIGEST").val(),
        "X-HTTP-Method": "POST",
    }
});
</code>
}


Executing a method by parameter in C#

Question: I'll start by I have no idea on the terminology on this or if it is even possible (I am pretty sure it can be done).
I have a chunk of code that is basically as follows:
DataTable dt = new DataTable();

if (string = "this")
    dt = method1();
else if (string = "that")
    dt = method2();
else if (string = "somethingelse")
    dt = method3(datetime, datetime2);
else if (string = "anotherthing")
    dt = method4(string);
....and so on....

I am trying to make this cleaner. The comparison string is in a table. My thought would be to do something more like the following:
if (row.parmtype = "date"){
   dt = row.method(datetime, datetime2);
else
   dt = row.method();

So the method I call would be stored in the table along with the type of call it is (there are only 3 types so far). Each call returns a DataTable. Can I either get a sample for better yet, a resource on how to do this?
Realize that since I don't know what I am talking about, the above code isn't exactly what I am looking for, but is for the purpose of getting my point across.
Answer: you can do a dictionary like
var delegates = new Dictionary<string, Func<MyClass, DataTable>>()
                                {
                                    {"somestr", x => x.Method1()}
                                };

            if (delegates.ContainsKey(key))
                delegates[key](this);

Comment: This appears to be what I am looking for. Thanks!
Answer: You have a couple of options (off the top of my head) that work in basically any version of the framework:

Change your "if" nesting structure to a switch
You could use reflection over the object if you are calling known functions on the object
Lastly you could use a Command Pattern to implement a common "execute" function and do as you describe above passing the command and the data to the object and letting it decide what to do.
You could also look into using delegates and events depending on your needs as well

Any of these should work depending on your requirements, the simplest "next step" from where you are is to probably change to a switch statement and then look at using the command pattern. Reflection can be great, but expensive if you are doing it at a high volume and you dont take care to use good caching. Fasterflect can help if you decide to go this direction.
In .NET 4.0 (maybe 3.5) you could also look at using dynamic and expression trees to do something similar, but this may be more code than you want to write for your current implementation.
Answer: You are probably looking for delegates.

Executing a method by parameter in C#


Column Default Value Settings disappear after site collection restore

Question: I have restored a site collection and for some reason the column default value settings have all disappeared. Is this a known problem with SPSite-restore? Thanks
Answer: I figured it out. My Powershell restore command had a lower case site collection path whereas the backed up site collection was upper case. Once I corrected it and did a new restore with the correct case the defaults became visible in the restored site collection. Bit of a trap for a beginner like me.


Placing two queens on an $n \times m$ chessboard

Question: I want to find the number of ways in which two queens can be placed on a chessboard so that they can attack each other. two queens can attack each other on a row, a column or on same diagonal just likes the moves of a queen.
Answer: I assume the queens are indistinguishable (say, both white). Wlog. $n\le m$.
Then there are $n\cdot{m\choose 2}$ ways with horizontal attacks; $m\cdot {n\choose 2}$ ways with vertical attack; $(m-n)\cdot {n\choose 2}+2\sum_{k=2}^{n-1}{k\choose 2}$ ways with "falling" diagonal attack and the same number with "rising" diagonal.
Use the well-known formulas for sums of quadratic sequences to get an explcit expression for $\sum_{k=2}^{n-1}{k\choose 2}$ and add all up.


Can we pronounce the 'th' sound as a d?

Question: I know that there are two ways to pronounce the th sound. Like in the word 'then' and 'thing'. But in a lot of cases I hear it pronounced as a d sound, especially in fast speech or if it comes after the s consonant, for example. As in across the floor or as they went. In cases like these it doesn't sound to me as the voiced form of the th. Am I right or am I deaf?
Comment: You are not deaf! They do sound like *dat*.
Comment: In General American English, when preceded by s or z sounds, these are still th (voiced or unvoiced alveolar fricatives). But they are more likely to be elided (lost, unspoken altogether) than converted to d. In some regional dialects (older people in New York, Chicago, AAVE), 'th' is often changed to 'd'. But that is not the standard General American pronunciation.
Comment: "Dee do dough, don't dee?" (meaning *"They do though, don't they?"*) is a catchphrase of the Liverpool "comedian" [Stan Boardman](https://en.wikipedia.org/wiki/Stan_Boardman). The 'd' substitution is common in the ['Scouse'](https://en.wikipedia.org/wiki/Scouse) regional accent (and in many others).
Comment: It depends on the word you are using after "as". for eg." as this sunset turns to morning" , "this"(th sound) will always sound the same whether or not you have an "as" before it.likewise "they" will sound more like "dey"(d sound) even when it does not have an "as" before it.
Comment: If you wish to *poorly* pronounce your words, you certainly may pronounce "th" as "d".  It is a good way to indicate that you are poorly educated and don't care how you are perceived.
Comment: I remember the Irish in our team working in Liberia had *no* trouble mixing in with all the mention of 'tings' :)
Comment: Could you write some examples, please?
Comment: @Hot Licks There is a story which did the rounds when I was at school (a very long time ago) about a boy who was asked by his teacher to put the words *delight*, *depot* and *defender* into the same sentence. He replied *De light was out, de pot was gone, so I did it in de fender*. And I promise you I have had no more than one (imperial) pint of ale tonight.
Comment: There is a small subset from the South Side of Chicago using the *d* for *th* substitution. "Da Bears!" Seriously. I live here.
Comment: As Porky Pig so eloquently intoned, D-d-d-d-dats all for now folks!
Comment: Historically the *Rotherhithe* area of south east London was sometimes pronounced and written as *Redriff(e)* (see Gulliver's Travels or Pepys's Diaries) so both th-stopping and th-fronting in the same word
Answer: There are several varieties of English which use a [d] to represent the voiced th sound and a [t] to represent the voiceless one, as well as several others which use [v] and [f] respectively instead.
However, I think the Original Poster is asking about variation in the pronunciation of [ð] in accents such as British RP, or General American, where a canonical /ð/ is thought of as being a voiced dental fricative.
If you ask speakers of such types of English what sound they use at the beginning of the word the, they would make a clearly articulated [ð]. This sound has two parts to it. The first is voicing caused by the vibration of the vocal chords. This is what gives the sound its pitch. The second aspect is the audible friction caused by turbulence in the air as it is forced over the surface of the tongue and out through the stricture formed by the tongue resting against the back of the upper incisors.
The description of this sound is a voiced dental fricative. The term voiced reflects the vocal fold vibration, the term dental reflects the place of articulation and the involvement of the front teeth and the term fricative indicates the type of consonant and the fact that it uses turbulence caused by air being forced through a narrow aperture. This involves an increase in the air pressure in the mouth behind the stricture.
This, however, is just how we think about this sound in an idealised kind of way. In real life the realisation of this phoneme is very often not actually a fricative at all. It is actually very often realised as an approximant. What this means is that the tongue still makes contact with the teeth but there is no friction involved. The air pressure in the mouth does not increase and there is no audible friction caused by air being forced out of a narrow stricture at high pressure.
The reason that the Original Poster might perceive the /ð/ in the string as they went as a [d] is because there's very likely to be a complete absence of frication - which will make the sound quite different to our idealised canonical version of /ð/.
It is probably also worth mentioning that this phoneme is subject to many types of assimilatory processes as well as, in the case of consonant clusters, complete elision (in other words not being pronounced at all).
So, for example in the sequence in the, the th sound will often be realised as a voiced dental nasal, in other words as an [n] made on the back of the front teeth instead of on the alveolar ridge. So the th sound there will have adopted the manner of the consonant from the preceding /n/. This type of assimilation happens in many other sequences. So in fast speech the th sound in is there any ... will often transorm into a /z/.
The Original Poster isn't deaf! Far from it, they have razor-sharp ears.
Comment: The physical side of language is my favorite part.   Anyone who has tried to learn a language with phonemes absent in their mother tongue knows the gymnastics it takes to generate the approximate sound.  It is so wonderful when someone can tell us "Put your tongue right behind your teeth.  Now engage your voice and you will feel a little vibration as your breath comes through...Okay!  That's the sound."
Comment: Thank you very much, your answer was quite professional and helpful. It was the best so far, and I really appreciate your efforts and that of the others, too.  Thank you every one, you helped me a lot.
Comment: Your last sentence seems at odds with the rest of your answer. The OP asks if /ð/ becomes a stop in a given context, but you only mention nasals and approximants, very much in the other direction from stops. In some, non-standard varieties /ð/ does become a stop even outside the OPs context, but in most varieties it is lenited in the OPs context.
Comment: @Mitch Both stops and approximants involve the lack of frication. So the absence of frication in conjunction with a roughly dental place of articulation will account for the perception of [d], because we have no other dental approximants in English. In contrast, some native speakers will swear blind that they always produce and always here the frication - even when it isn't there. Hence the OP's listening skills are very good.
Comment: Yes, you're right.  Sorry.  I deleted my comment.
Answer: This is known as th-stopping, which is a feature of some accents of English. For instance Wikipedia mentions then and den sounding the same in African American Vernacular English.
Answer: (Note: the "th" in "the" has the IPA symbol /ð/.)
It's a dialectual as well as accent variation.
Funny enough, even with me being a native speaker I couldn't distinguish /ð/ and /d/ until I was 12 because I wasn't simply told what the difference was until then.
In slang chat you can still see people substitute "d" for the /ð/ sound instead of "th", for example:
http://www.urbandictionary.com/define.php?term=dat
(Warning, swearing)

Can we pronounce the 'th' sound as a d?


What is this bicycle I'm not sure what it is

Question: Not a bicycle person and not sure what this is.
Comment: We would probably need more pictures to help out.  Any identifying marks, especially a logo on the headtube, and components, if there are any.
Comment: The bike is a "department store" model, almost certainly from the 50s.  The chain guard looks very much like the Sears guard from that era.
Comment: what information are you actually looking for here?
Answer: It looks like a classic electro-forged Schwinn frame.
The fenders, chain guard, chain ring and seat match the 1952 Standard Schwinn for Girls.

waterfordbikes.com 1952_04
Or the 1953 Schwinn Meteor for Girls

waterfordbikes.com 1953_02
Schwinn used the same frame for several different models within a year and over the years. The models were made different by adding a tank or lights or a rack.
1957 was the last year for the support bar between the top tube and the down tube.

What is this bicycle I’m not sure what it is


Moving GIMP floats with arrow keys + Shift

Question: Looking around it seems like the accelerated Shift + arrow keys movement default is 25 pixels. Somehow mine seems to be 2 pixels. Can this be customized?
Comment: Welcome to GD.SE!
Answer: The arrow keys move 1px by default. Holding down Shift moves in bigger increments, but the amount depends on your zoom level.
If you are zoomed into the pixel level, Shift+arrow keys moves in 2px increments, but if you zoom out if moves in progressively bigger increments. Makes sense if you think about it.
I think this behaviour was changed in newer versions. However it doesn't seem to be documented on the GIMP Docs page yet. Maybe it needs to be updated. I only discovered it by testing.
As far as I'm aware, you can't change this behaviour other than by zooming out. If there was a way it would probably be in the Preferences, but I couldn't find a setting for it.
Comment: Thanks, I didn't notice the zoom aspect of it, I just found this 25 pixel number from looking into documentation and various posts. I also couldn't find anything in the preferences, which is really too bad.


Suitable box for outdoor patio

Question: Can I use a standard pvc new work box for receptacles/ switches, in an outdoor patio wall that will be enclosed? The wall will be completely sealed and covered in stone so rain, snow, etc. will not be able to enter the box(es).
Answer: As long as it is out of the weather as you describe then standard  boxes, devices and plates are fine. This installation sounds no different than a garage for instance.
Now, if this covering is voluntary, as in only on sometimes, then an inspector could very well consider this a damp or even wet location due to the fact that in some circumstances the area is likely to get wet. As in an unexpected rain storm while you are at work. If this is the case I would treat the area as damp, with outdoor covers.

Suitable box for outdoor patio


Limits of integration for parametric equation

Question:
For the picture attached I am wondering why I cannot take the limits from $-\frac{\pi}{2}$ to $\frac{\pi}{2}$. If I take those limits, Sine vanishes (in the second last step) and the answer varies significantly. Where am I going wrong?
Comment: John ,thanks for edit .Can you please ,help me with the problem also?
Comment: I believe it would really help if you sketched out the various solids on a coordinate plane.
Comment: Sorry for the bologna mate!
Answer: Integrating from $0$ to $\pi$ seems very strange to me too! Those bounds would correspond to the region $y \ge 0$, which doesn't match up with the fact that the cylinder in question lies entirely in the region $x \ge 0$ (if $a>0$), since its equation can be written as $(x-a/2)^2+y^2 \le (a/2)^2$.
So you're right, the integration should go from $-\pi/2$ to $\pi/2$, but you mustn't forget that when you substitute $r=a\cos \theta$ into $(a^2-r^2)^{3/2}$ you get
$$
(a^2 - a^2 \cos^2 \theta)^{3/2} = (a^2)^{3/2} (\sin^2 \theta)^{3/2} = a^3 \sin^2 \theta \, \sqrt{\sin^2 \theta} = a^3 \sin^2 \theta \, | \sin \theta |
.
$$
Note the absolute value here, coming from the identity $\sqrt{t^2} = |t|$.
With this integrand, the integral from $-\pi/2$ to $0$ will give the same contribution as the integral from $0$ to $\pi/2$, and you don't get zero as your answer anymore.
Comment: Awesome Hans .Thanks a lot .A usual error of taking √x^2 as x and not modulus x made me pay the price .I was doubting my concepts and was in terrible frame of mind .Thanks for the timely rescue .
Comment: I've been monitoring this problem and was actually struggling a bit my own self...thank you for coming to the rescue. +1!


How long will cold brew keep?

Question: After making a big batch of cold brew, I'd like to be able to keep it around for an extended period of time-- one month, let's say. Assuming I keep it in an airtight container in the refrigerator, how long will my batch of cold brew remain fresh, flavorful and bacteria-free?
Answer: From anecdotal experience freshness and flavor begins to fade within ~7 days with regular storage methods. Many people brewing cold brew online state between 5 days and 2 weeks is okay to keep cold brew for. In my opinion you will have coffee that you won't want to drink long before you run into harmful bacteria as long as you are keeping things sanitary.
How you store the coffee will determine how long it keeps.
To improve storage look into bottling it in individual bottles with little headspace, or even kegging the coffee. Exposing coffee to oxygen will negatively impact flavor and expose coffee to more bacteria. Creating a concentrate of the coffee may help to prevent bacteria from forming. Splitting batches up into multiple sterile containers and keeping them sealed may also help it to last longer.
Getting your coffee to last you a full month is almost definitely going to be much more of a hassle than brewing coffee more frequently. The taste will always be better from fresher coffee and cold brewing coffee is one of the simplest methods. Unless you absolutely can't make coffee more frequently I would recommend making smaller batches you can consume quickly.
Comment: Another note - I brew large batches of cold brew at home and put it in a keg. I purge the keg of oxygen, by using nitrogen and I've kept kegs of cold brew up to 3 months with little to no perceptible degradation.
Comment: I agree with the storage element effecting how long it will keep. I have a specific cold brew pitcher which recommended that my cold brew would keep for up to 2 weeks. Fortunately for me I go through a 1 liter pitcher in less than a week. ;)
Answer: As annoying as it is, I would say venture to say that making a month's supply of cold brew is not a great idea. Normal cold brew will begin to lose its flavor after a week, if you're lucky a week and a half.
I would try to either make smaller amounts that you can consume in a week or less. If you're making it traditionally, this shouldn't be a huge amount since you'd be diluting the brew upon drinking it with water.

How long will cold brew keep?


field update with formula

Question: I have a workflow which closes a case itself if the customer hasn't returned to us after certain time. After case is closed I want to populate a field with a certain value, but only if this field is empty.
This field's type is picklist. I have a field update action defined but I cannot verify if there's already a value on this field or not.
Please advise.
Answer: You can use ISBLANK function to verify if field contains any value or not.
Description : Determines if an expression has a value and returns TRUE if it does not. If it contains a value, this function returns FALSE.
Usages: ISBLANK(expression) and replace expression with the expression you want evaluated.
So in your case as this is picklist value your function will be like this ISBLANK(TEXT(fieldapiname))
Comment: Why don't you add that in initial condition of WFR
Comment: Hi Himanshu, thank you for replying, but I'm afraid I wasn't clear. I have a WFR, in one of the steps I do a field update to a picklist field. I want to do this field update only if there's no value in that field already. Meaning I have the initial condition in the WFR and then I need to have another condition / use a formula for checking if the field is blank, but in the field update I don't have an option to use formula since it's a picklist field. I hope my pain is clearer now.
Comment: since it's a time dependent WF and it was not the first action - I haven't thought about this solution. As it turns out - I took your advice. Thanks!

field update with formula


How to create custom class clusters in objective-c..?

Question: I have two classes say A and Band I want to create objects of any one of these classes depending upon some condition. Can I create a custom class cluster for this? If YES, how? I know that NSMutableArray also works on the same principle.
Comment: You could take a look at [this](http://stackoverflow.com/questions/1844158/what-exactly-is-a-so-called-class-cluster-in-objective-c) question, and especially Frank C.'s answer.
Answer: What you are looking for is a class cluster pattern, you can find many examples here on SO as well as on the Apple Dev pages itself.
Have a look into a simple example of this pattern given here by @Frank C.


Is there a diminutive form of adjective in English language?

Question: My native language is Russian, and it has very many diminutive forms. For example: the Russian word "малый" means "small" or "little", and this word has a diminutive form "маленький"... but I have not found much information about diminutives in English.
I heard something about the "-y" suffix, so is "littly" or "smally" a correct form?
Comment: **-ish** is not a diminutive. I state that strongly.
Comment: Welcome to ELL, Nyan Cat! You might want to ask this question at the [Linguistics Stack Exchange](http://linguistics.stackexchange.com/), or at [English Language and Usage](http://english.stackexchange.com/questions), I guess they would love to answer. There is indeed the **-y/ly** form in English, and there is the rarely used suffix **[-kin](https://en.wiktionary.org/wiki/Category:English_words_suffixed_with_-kin)** found in several words (pannikin, ladykin, catkin, nipperkin..).
Comment: Here's [a search for "diminutive"](http://english.stackexchange.com/search?q=diminutive) at ELU, here's [a search for "diminutive"](http://linguistics.stackexchange.com/search?q=diminutive) at Linguistics SE - you might want to look if there are possibly answers to your question among the finds.
Answer: In English we have the suffix "-ish", which can be aplied to many, but not all adjectives. It means "like that, but not so much",  so in a way it is diminutive.  for example:
smallish, greenish, mannish, etc.
It would generally be understood this way if you coined an uncommon word with {adjective}+ -ish (say it with a distinct pause at the hyphen, so they can tell you know it's not a standardized word); For example:
funny-ish, clumsy-ish, huge-ish, cold-ish, round-ish, square-ish, young-ish
(there's a comedy on American TV called Black-ish)
but -ish can also mean "like that" (and not just a little bit) when attached to a few nouns: oafish, childish, churlish, foolish, foppish, rakish.
Or "a person or dialect from there":
British, Swedish, Polish, Spanish
Comment: **-ish** does not signify either *1. much smaller than the average or usual; tiny.* or
*2. pertaining to or productive of a form denoting smallness, familiarity, affection, or triviality, as the suffix -let in droplet from*
Comment: Did I say that it did?
Answer: A progression of adjectives related to size would be: small, tiny, teensy — "teensy" being even smaller than "tiny". Note that teensy would never be used in formal writing. Another example is cutesy.  However, this morphological change is not a generalizable production.
Answer: I would say if you want to express a lesser degree of an adjective you say: a bit expensive, not very useful, little helpful, rather small. You don't do it by adding   suffixes.


What are the differences between Vitriol, Vituperation, and Invective?

Question: I am having a really hard time seeing the nuanced differences between these three synonyms, especially vituperation and vitriol. I saw from my research that invective is used in more formal context with use of refined language (if somebody can add more to this word, I would be appreciate it). But I have trouble seeing the subtle difference between vitriol and vituperation since both suggest bitter, cruel, harsh abusive language.
Comment: **Vitriol** is a noun and should be used as a noun. **Vituperative** is an adjective and should be used as an adjective. **Invection** is a noun, and, again, should be used as a noun. Unlike vitriol it is **abusive**, and not only harsh or mean.
Comment: @ambitious_ph1lologist **Vituperation** _is_ a noun -- also **invective** is the noun you're looking for.
Comment: Then OP should probably edit the question, because it is confusing: there's **vituperative** in the title and **vituperation** in the body.
EDIT: my first comment has a typo: I meant **invective**
Comment: **Vitriol** is actually an old word for sulphuric acid, used in the metaphorical sense to mean very bitter invective.
Answer: Webster's Dictionary of Synonyms (1940) covers two of the three words of interest to the question poster—vituperation and invective—under the general heading of abuse; it doesn't discuss vitriol at all. Here are the relevant parts of the entry for abuse:

Abuse, vituperation, invective, obloquy, scurrility, billingsgate agree in denoting vehemently expressed condemnation or disapproval. ... Vituperation suggests the overwhelming of someone or something with a torrent of abuse. "The daily vollies of that that great French master of vituperation, Leon Daudet) (T. S. Eliot). Invective implies vehemence and bitterness in attack or denunciation, and (often in distinction from abuse) connotes a command of language and skill in making one's points. It is the precise term when the attack is public and made in a good cause. "John Bull stopped at nothing in the way of insult; but its blazing audacity of invective never degenerated into dull abuse." (A. Repplier).

The contemporaneous edition of Webster's Collegiate Dictionary—the fifth edition (1936)—has this entry for vitriol:

vitriol n. 1. Chem[istry] a A sulphateof any of various metals, as copper (blue vitriol) iron (green vitriol), zinc (white vitriol), etc.;—from the glassy appearance of many of these salts. b Oil of vitriol. See SULPHURIC ACID ["A heavy corrosive, oily liquid, H2SO4, colorless when pure, early made by distilling green vitriol, whence the name oil of vitriol"]. 2. Hence, anything likened to vitriol as being caustic.

So in the 1940s, Merriam-Webster seems to have taken the view that vituperation is a kind of tsunami of insult and abuse, while invective is a no less bitter but far more considered and selective expression of abuse, as from a notably cultured, cultivated, and articulate enemy. Vitriol, meanwhile, in its figurative sense seems not to have advanced very far from its literal origin (in oil of vitriol) as a chemical term for sulfuric acid, so its meaning was not broadly "abuse" but something highly corrosive, biting, or acidic.
The synonym notes under abuse in Merriam-Webster's Eleventh Collegiate Dictionary (2003) show that MW's view of the difference between vituperation and invective has changed very little in the six decades since Webster's Dictionary of Synonyms appeared:

VITUPERATION implies fluent and sustained abuse {a torrent of vituperation}. INVECTIVE implies a comparable vehemence but suggests greater verbal and rhetorical skill and may apply to a public denunciation {blistering political invective}.

The torrent of abuse that MW associated with vituperation is still there in the example use of the word, but the flood is now characterized as "fluent and sustained" instead of simply "overwhelming." Meanwhile, invective retains the stamp of rhetorical skill and (often) a political cast—although I have trouble making sense of the Eleventh Collegiate's insistence that invective "suggests greater verbal and rhetorical skill" than vituperation, given that vituperation implies "fluent and sustained abuse."
Meanwhile, the Eleventh Collegiate has this definition of the figurative sense of vitriol:

vitriol ... 2 : something felt to resemble [chemical] vitriol esp. in caustic quality; esp : virulence of feeling or of speech

Neither vituperation nor invective has the chemical underpinning that vitriol does, and neither so clearly frames the character of the abuse or criticism being expressed as caustic or corrosive.
My own sense of vituperation and invective is that the former suggests true personal bitterness or malignity, while the latter has more of a political cast and thus applies more often in the context of performative outrage—as on the political stage or in the courtroom—than in instances of sincere personal animosity.
Answer: After consulting a couple of online resources such as the Merriam-Webster and Cambridge dictionaries, it seems to me that at least a number of partial answers is available in popular language reference works.
Here[1]'s the Merriam-Webster's (MW) take on the small distinctions between vituperation and some of its synonyms and words that come close to it in meaning and usage.
As for vitriol (which happens to be covered as the last item in the synonym list there) vs. vituperation, it seems to me that it may be not so much a matter of precise meaning or expression on a factual level as of register or approximative position on a formality scale.
Compare, for a similar case illustrating register, the example of some dated subway sign saying

Expectoration is forbidden

to express what could be more plainly put as

Please do not spit

(Note: Source has eluded me but could be retrievable if needed.)
For an attempt at a partial seat-of-the-pants answer (another user may be able to give more insight as to this), vitriol seems to be rather towards the everyday/colloquial where the more formal and neutral term seems to be abuse while vituperation seems to me to have a bit of a formal touch for whatever intent or purpose. (Such as the speaker distinctly wishing to sound distinguished and somewhat above any person whose demeanor they may describe as  shedding vitriol.)
Here[2]'s an example of the use of vitriol from somewhere in literature (last example on the page):

Two men positioned themselves directly behind me and from them came a constant stream of vitriol.

On a personal note, that lets me think of a street scene of a certainly not elevated tier of society, at least for the two men mentioned. As a matter of taste (YMMV), it seems that here it would be breaking register (in the language of the narration that might credibly be kept in accordance with the content and inner setting of the narration) to use vituperation.
So at least part of the matter does boil down to the subtleties of using words of potentially the exact same meaning (depending on context as there are rarely two words of overall exactly mutually overlapping content) to express things in one's speech other than just the plain factual meaning, such as mood and register.


Replace tabelator by two spaces in answer editor

Question: Many users copy&pastes their code into the answer editor, which sets the tab size to something like four spaces treated as single character. This screws the indentation up, the code often needs to be scrolled right and back to read. Since the tab can be inserted only by pasting anyway, wouldn't it be practical to replace it by two or four hard spaces?
Answer: Bad formatting is going to happen no matter how many automatic corrections are done.
A Python problem that can't be reproduced because of automatic changes to the indentation would be a Bad Thing(tm).
If someone wants excellent, free help, the burden's on them to format things in a legible way.
Comment: But still: if I try to improve formating by holding `delete` key :-) to avoid horizontal scrolling, the text starts to jump left very fast if the delete starts to eat tabs. And if I need to place tab somewhere else, tough luck, only by pasting. Maybe `Ctr+tab` could insert the tab in text? I can live without that, just a suggestion.
Comment: @JanTuroň What about just converting all the tabs to spaces in a separate editor?  (Or not using them in the first place, when applicable.)
Comment: can be, unless someone else's post needs edit. To ask them is usually longer process than a quick direct edit. In that case, I usually don't bother, but I (and perharps someone else) could if the tab was fixed.
Comment: @JanTuro: Personally, if I see a badly indented question, I attempt to fix it by running it through PhpStorm. If it works, great, edit it, now look at it again. If it doesn't, too bad. This question isn't worth my time. OP didn't even put the effort to make the question look decent. Why should I?


A problem with Miller indices

Question: I know how to calculate Miller indices (hkl), but I have found a weird one I can not work out could you please help, I know your you have to expand the plane but after that I'm lost.
Comment: See also: https://chemistry.stackexchange.com/q/82937
Answer: Because of translational symmetry, every plane has a set of symmetry-equivalent parallel planes (infinitely many). To get the Miller indexes, you have to find the plane closest to the origin that does not pass through the origin. The example shows a plane that goes through the origin. If you translate it by -b, it will cross a at 1/2, b at -1 and c at -1. So it is the 2, -1, -1 plane, also known as -2, 1, 1.

A problem with Miller indices


Why sagen, erklären, erzählen are dative verbs? why Lieben is not a dative verb?

Question: I understand that sagen, erklären, erzählen are dative verbs but what's the logic behind treating them dative. Why lieben is not dative?
Comment: Having learnt German as foreign language, I'd advise just not to lose time with trying to find explanations to why each verb is governed by which case. (The worse was to try to find explanations to genders, for which rules exist only for very small class.) Memorization is the best you can do.
Comment: This question might be interesting for you: https://german.stackexchange.com/questions/75997/what-are-cases-used-for
Answer: One (actually, one of the main, and actually its literal) purposes of the dative is denoting "giving something to someone". The notion of "giving" is interpreted very widely in languages that have a live dative to "do something for someone", and even "give a word to someone" and "give help to someone". That roughly explains why sagen, erklären helfen, and erzählen require the dative (as an optional object in addition to their mandatory accusative object).
The interpretation of "giving" does not so much extend to "lieben", so it forces the accusative. With respect to your "why is that" question, the answer is, as always in language questions, bluntly "because people talk that way". And, no, you should rather not expect or apply too much logic to a language.
Answer: sagen, erklären and erzählen are transitive verbs and thus take an accusative object. It is just not the receiver of the said/explained/told thing.
The receiver is denoted as a dative object, and is optional. The accusative is required and a sentence would be incomplete without it.
It is the same as in English:

Ich erkläre dich = I explain you = I explain what/who you are (sounds strange)
Ich erkläre XXX = I explain XXX = I explain what XXX is (not mentioning to whom)
Ich erkläre dir XXX = I explain XXX to you = I tell you what XXX is
Ich erkläre dir = I explain to you (missing "what" object, may be implied)

Lieben on the other hand is also transitive, but cannot take a receiver as dative object. The loved thing is the accusative object

Ich liebe dich = I love you
Ich liebe dir = I love to you
Comment: "Ich erzähle euch von meinem Leben Leben" does not have an accusative object.
Comment: Actually "Ich liebe dir" is not unheard of, just watch the afternoon program on RTL-II (as Alfred Dorfer once observed): "Komm zurück zu misch, isch liebe dir!"
Comment: There's an implied accusative object "etwas".
Answer:
I understand that sagen, erklären, erzählen are dative verbs

But they aren't!
Check out these examples:

Er sagt etwas. ← That's an accusative object.
Sie erklärt den Ablauf. ← Clearly an accusative object.
Er erzählt großen Mist. ← Also, cleary an accusative object.

So those are just normal transitive verbs which feature an accusative object. But you may add a dative object to mark the receiver of the message:

Er sagt mir etwas.
Sie erklärt mir den Ablauf.
Er erzählt mir großen Mist.

So the dative object tells who receives the accusative object, or more in general, who bears the result of the action on the accusative object.

With lieben you could indeed argue that the one loved is who receives the love. Similar as with helfen for example.
Unfortunately, German isn't that regular.
You have to remember for each verb which objects it takes. So it's

jemandem helfen

but

jemanden lieben

There's no way around drilling that, sorry.


do the uniformly continuous functions to the reals determine the uniformity?

Question: It is well known that the completely regular spaces $X$ are characterized as those topological spaces whose topology is recovered from $C(X)$, the set of continuous functions $X\to \mathbb R$. In other words, $C(X)$ determines the topology on $X$. Is there a similar result where $C(X)$ is replaced by $C_U(X)$, the set of uniformly continuous functions? Thus, for which uniform spaces is it true that the set of uniformly continuous functions to the reals determines the uniformity? I'm also interested in the same question for quasi-uniform spaces. References are welcome if this is well-known material.
Comment: You might want to ask this on mathOverflow. http://mathoverflow.net/
Answer: They don't determine the uniformity.
Let $X$ be a uniform space and let $X'$ be $X$ with the weak uniformity coming from the uniformly continuous maps $X\to R.$ I understand the question to be whether the map $X\to X'$ is an isomorphism of uniformly continuous spaces.
One can describe the entourages $V$ of $X'$ as supersets of finite intersections $\bigcap_{i=1}^n\{(x,y)\mid |f_i(x)-f_i(y)|<2\}$ for some uniformly continuous $f_1,\dots,f_n:X\to\mathbb R.$ Equivalently, $V\supseteq \{(x,y)\mid \|f(x)-f(y)\|_\infty<2\}$ for some uniformly continuous $f:X\to\mathbb R^n.$
So $X$ is covered by the countable union $V[f^{-1}(\mathbb Z^n)].$ If $X$ is $\ell^\infty(\mathbb N),$ the entourage $V=\{(x,y)\mid \|x-y\|<1\}$ cannot be of this form - you can't cover the space by countably many unit balls. Another counterexample is to take $X$ to be an uncountable set with the discrete uniformity, and take $V$ to be the diagonal - you can't cover $X$ with a countable union of singletons.
(If $X$ is a topological group with its usual uniform structure, and $X\to X'$ is not an isomorphism, we have the same topological group with two different uniformities. This is not a contradiction: the group multiplication in $X'$ must fail to be uniformly continuous.)

If $X$ is furthermore a length space, and $X\to X'$ is an isomorphism, then we get the nice pair of conditions
$$d(f(x),f(y))\leq C(d(x,y)-1)$$
$$d(x,y)\leq \tfrac12(d(f(x),f(y))-1)$$
where $C$ comes from the uniform continuity of $f$ applied to a chain $x=x_1,x_2,\dots,x_k=y$ with each $d(x_i,x_{i+1})<1$ and $k\leq d(x,y)+1,$ and the $\tfrac12$ comes from considering a chain $f(x)=x'_1,x'_2,\dots,x'_m=f(y)$ with each $d(x'_i,x'_{i+1})<2$ and $m\leq \tfrac12 d(f(x),f(y))+1.$
These make $f$ a quasi-isometric embedding. So two-dimensional hyperbolic space is a counterexample. If you are interested in this aspect, a good reference is "Metric Geometry" by Burago, Ivanov, Burago.
Answer: It seems the answer is "Yes.", a corollary of a result in Bourbaki (Theorem IX.I.4.I):

Given a uniformity $\mathcal{U}$ on a set $X$, there is a family of pseudometrics on $X$ such that the uniformity defined by this family is identical with $\mathcal{U}$.

Now pseudometrics aren't quite functions from $X$ to $\mathbb{R}$ (they're functions from $X\times X$ to $\mathbb{R}$), but this can easily be fixed:  Let $\mathcal{D}$ be a collection of pseudometrics on $X$ that induces $\mathcal{U}$.  Then,
$$
\left\{ d_x:d\in \mathcal{D},\ x\in X\right\} ,
$$
where $d_x\colon X\rightarrow \mathbb{R}$ is defined by
\begin{equation}
d_x(y):=d(x,y),
\end{equation}
is a collection of real-valued uniformly-continuous functions on $X$ from which you can recover the uniformity $\mathcal{U}$.


DC rated caps for AC signal

Question: We have 470pF 500VDC caps (Kemet part number C1206C471KCGAC Ceramic, SMD, MLCC, Ultra-Stable, Low Loss, Class I, 470 pF, +/-10% Tol, 500V, C0G, -55/+125C, 1206, 0.1% DF, Dielectric Strength=750V) on 110VAC 400Hz signal and chassis ground (I think for EMI purposes after main design was completed) in our Controller circuit. This should be okay. Is it or can it cause problem since these caps are DC rated? What would happened if they mistakenly placed 100VDC rated caps with the same spec in place of 500VDC caps?
Answer: The dc rating should be the same as the peak ac rating. A 110Vac supply may be expected to be as high as 125Vac and the peak voltage seen could therefore be approaching 180V so no, I would change the caps rated at 100V to higher voltage ones such as at least 250Vdc.
Comment: Thank you. SO you don't see any problem of using the 500VDC caps on 110VAC 400Hz lines. I have Quality engineers here that do not think using ceramic DC rated caps on AC lines is wise. They say this cap would break down soon under this conditions.
Comment: @Kamran I guess the designers would be best placed to comment on this because there may be power line resonance issues caused by sudden transients when other devices are switched on or off on the 400Hz supply and they may have considered this. If there are NO issues that can cause sudden +/-500V transients (and I have to say this would be a rarer situation than what most folk would think) then they should be fine.

DC rated caps for AC signal


Specifics of nightly prayer

Question: I typically read the Bible and pray every night but over time my prayer has become long and very structured and in some ways forced with me saying the same things every night and the same established prayers IE. Our Father Hail Mary Oh my Jesus etc. because of this prayer typically takes a long time, feels forced, and frustrating. I have no issue with the time, but if I were to make my prayers at night shorter and more relative to the day would that take away from praying as a whole? Would it be selfish or disrespectful of me to pray in total less that way? I just feel that i say the same things and it doesn't feel like a conversation anymore, more so a burden. But should I continue on this commitment or not?
Comment: Hello, and welcome to the site. Are you looking for the teachings of a specific denomination? For personal advice, random internet strangers on Stack Exchange generally won't be your best source -- in fact, the disclaimer on the site recommends seeking such advice from your pastor, priest, or other trustworthy counselor.
Comment: _Like any library, Christianity Stack Exchange offers great information, but does not offer personalized advice, and does not take the place of seeking such advice from your pastor, priest, or other trustworthy counselor._
Comment: Welcome to Christianity.SE! and thank you for your contribution. When you get a chance, please take the [tour] to understand how the site works and [how it is different than others](https://christianity.meta.stackexchange.com/a/1809/50259). I would also recommend reading the [Help Center's](https://christianity.stackexchange.com/help) sections on asking and answering questions.
Comment: While the short answer is "yes, prayer in your own words is still a form of communication with God" this question is a matter of pastoral advice and per our site's rules will need to be closed.  I cannot suggest strongly enough to consult with your pastor. Simply having that conversation will be helpful.
Answer: Without trying to answer the personal part of your question, I would like to point out the old catholic tradition of the Liturgy of the Hours (Liturgia Horarum), also know as the Divine Office (Officium Divinum), or Work of God (Opus Dei). All religious orders pray this Liturgy in some way or another, and all secular clergy vow to pray this liturgy as well at ordination.
Lay people are also invited to pray this liturgy, partly or all of it, according to their possibilities. In this liturgy you will find the night prayer (in my country called Completen, Compline in english says wikipedia)
It is a rather short prayer, especially compared to some other prayers in the morning and evening, structured in a way that makes a lot of sense (well, what would you expect). It gives you words, readings, and a base for your personal communication with God.
Answer: I can relate. If our heart is not in something, the prayer is vain. The Lord specifically admonishes us against "vain repetitions": "When ye pray, use not vain repetitions, as the heathen do: for they think that they shall be heard for their much speaking" (Matthew 6:7, KJV).
Remember the so-called "Lord's prayer":

"Our Father, which art in heaven, Hallowed be thy Name. Thy Kingdom
come. Thy will be done in earth, As it is in heaven. Give us this day
our daily bread. And forgive us our trespasses, As we forgive them
that trespass against us. And lead us not into temptation, But deliver
us from evil. For thine is the kingdom, The power, and the glory, For
ever and ever. Amen." Matthew 6:9-13, Luke 11:2-4

Remember the Lord does NOT say, "You should recite these specific words in order to pray". Rather He introduces this as an outline, saying, "After this manner therefore pray ye", in response to the question of His disciples, asking, "Lord, teach us to pray".
Therefore, prayer is to give real glory to God, recognize His holiness, expedite the coming of His kingdom, to ask Him for what we need, to give Him thanks, to express our commitment to forgive others and to beg His forgiveness, to ask Him for power to overcome temptation, and very interestingly, very oft overlooked, that His will be done.
Who prayed, "Thy will be done", and in what circumstances?
How can we follow His example?
"Thy will be done" is not a passive pronouncement, merely hoping that someone else will do what God wants or that God will get His way in the end. It is the most active and effortful expression of our determination to be the ones to do His will on the Earth.
Viewed in that way, prayer becomes a powerful collaboration and expression of our devotion to team up with God in the greatest endeavor in existence. Prayer is a form of work. Problem-solving, expressions of love and devotion, and precise individual covenants and commitments are all completely appropriate in prayer.
I have in recent years developed a rule: If I do not spend time in a day actively thinking or working on a problem or striving to grow in charity and love in a specific matter, I do not include that matter in my prayers unless I am determined to be an active part of the solution. I think this helps me to avoid vain repetitions. Yes, I pray for peace in other lands, but this prayer is meaningful to me only because I strive to be a peacemaker in my own home and community.
When we sincerely strive to be a part of the solution with God instead of leaving it all up to Him to change our minds, our hearts and our circumstances, then we are empowered to become the sons of God and be one with Him as the Savior prayed.
For me, moving away from a "shopping list" routine of prayer and more into a heartfelt and effortful "Thy will be done" pattern has made all the difference in my life. Including this one element by making specific promises to do exactly what God has asked me to do--not half-heartedly, but wholly and completely, has helped me to overcome challenges that were otherwise impossible to surmount and unresolved for decades.

Specifics of nightly prayer


Disc brakes better for rainy days?

Question: Are disc brakes more effective on rainy weather? I had a close call riding my road bike during a morning rain and almost collided with a parked car. My road bike is steel and has tektro branded caliper brakes. Should I get a disc brake commuter bike?
Comment: When you had this close call, what did you feel from your brakes?  Delayed engagement?  Insufficient pressure/slowing?  Loud scary noises?
Comment: A trick (make that more a mandatory practice) with rim brakes is to "squeegee" the rims whenever coming into a situation where you *might* need to brake.
Answer: Disc brakes are generally more effective in the rain than rim brakes, but using rim brakes properly in the rain has served people well for many years.
You need to feather the brakes to remove the water+crud from the rims. Softer brake pad compounds can also help you brake more easily. Also, having good quality brakes that are well adjusted is always a good thing too. Remember that you also need to brake earilier in the rain, regardless of the type of brake, and be more careful than in the dry.
If you have small hands, make sure also the small hand inserts are in for your brake levers (if it has them).
Comment: After riding through obvious crud a light touch of the brakes for a few metres will help a lot.  And on downhills commuting in the wet I prefer to keep the brakes skimming the rims ready for real braking - this is highly compatible with taking the hill a bit slower because of a lack of grip between rubber and road.
Comment: Anecdotally, for not winter riding, I often commute on an 80s road bike with Shimano 105 caliper brakes. Stopping power has never been a problem for commuting.
Comment: > Remember that you also need to brake earilier in the rain

This is strictly because of issues between the tire and the road.  Disc brakes suffer zero (or very close to zero) degradation in performance because of wet weather.
Answer: I've done my motorcycle test and know all about defensive riding techniques - and you apply it no matter what bike you are riding.
I ride both rim and disc brake bicycles on my winter training and on my commuter bike. On the winter bike I have swapped out the pads to a softer compound for better braking performance (but not so good for longevity). Even with this change - I often find wanting for more power on descents or rapid & predictable braking in wet conditions.
My commuter bike has discs (Avid BB5) - and the braking in the wet is significantly better - I also feel safer in that I know I can stop reliably in any conditions.
The downside is the weight - it doesn't sound like much but it doesn't translate into a performance ride. Which is why I have to maintain a winter training bike for club and group rides and a commuter for solo rides to work.
And remember - your brakes are only as good as the rubber contact patch under your wheels. So decent tyres and a half-decent width - I'd say 25mm minimum or better still 28mm if you have the clearance.
Comment: I love the varied use of "winter" throughout the world.
Answer: The delay period you normally experience with caliper brakes is much less noticeable with disc brakes, especially a good quality pair.
Even more noticeable is that on much steeper inclines and especially in damp conditions caliper brakes, as I'm sure you've noticed, tend to have an all or nothing attitude when it comes to applying pressure. Disc brakes on the other hand will let you finesse the braking power and keep your wheels from locking up.
The only downside really is that you won't be able to swap your wheels between your disc-brake commuter and your caliper-equipped road bike.
Comment: The only downside is swap wheels?  What about the downside of buy a new bike?
Comment: There are wheels that have been built up with a rim brake compatible rim and a disc compatible hub. But the new bike trumps this (plus, most people who aren't racers don't exactly have sets of wheels to swap/care about that anyway).
Answer: Yes disc brakes are more effective in rain (and dry).
If you should spend the money for a disc brake commuter bike is something for you to decide.
In the rain I ride more defensively.
Answer: If you want really weather-proof brakes you should consider drum or roller brakes. I use roller brakes in my commuter bike and they're working flawlessly for over 5 years in mud, snow and salt (I'm doing about 5k km/year).
Comment: Drum or roller brakes may require less maintenance than discs, but I seriously doubt the performance is better.  I have great modulation and reliability of my disc brakes in all conditions.

Disc brakes better for rainy days?


EC2 login with Tableau

Question: I'm trying to login to my EC2 instance from Tableau. I have the postGresql driver installed on my Windows machine(w/ Tableau installed) and want to login to my EC2 instance.
From Tableau, it asks me for...
Server
Port
Database
Username
Password
What is my username/password that I have to login with? I can ssh into my EC2 instance no problem but that is using my .pem file. I'm a totally newbie so can someone help with my schoolboy question?
Answer: You need to give Tableau the location of the database on your EC2 instance. The username and password that it is asking for are the credentials for your database not your EC2 instance.
Also, you will need to make sure that your Security Groups settings allow Tableau Desktop to directly connect to the database you have running in EC2. The default EC2 Security Group is as follows:
A default security group is named default, and it has an ID assigned by AWS. The following are the initial settings for each default security group:

Allow inbound traffic only from other instances associated with
default security group
Allow all outbound traffic from the instance

So if you are running Tableau Desktop outside of AWS then you will have to specifically allow that traffic through.

EC2 login with Tableau


Thread pitch of Ender 3 bed leveling screws

Question: What is the thread pitch of the Ender 3's bed leveling screws? The diameter measures about 4mm. Are they M4 0.7 (coarse) pitch or 0.5 (fine) pitch? I'd like to develop rigorous formulas for the amount to turn the knobs by after measuring (or visually inspecting, since I can see an accurate 0.2 mm first layer decently well) leveling-test patterns in the corners rather than using a closed-loop tune-and-retry approach.
Comment: Ideas for measuring this are nice, but I wonder if there's a spec on it available somewhere..
Comment: Incidentally, it's easier to see the arrows on the knobs if you fill them in with paint, e.g. use a white paint pen and wipe off any excess immediately.
Answer: I measured mine with a thread gauge and it says the pitch is 0.7 mm.
So, as the stock adjustment wheels have 14 bumps around their circumference, turning by one of those is an adjustment of exactly 0.05 mm (assuming no backlash).
I can't speak for anyone else's, but due to the availability of replacement height adjustment wheels which don't specify alternative thread pitches, I guess that's the only one in use. I encourage you to verify my finding before relying on it.
Comment: An additional piece of information: the stock adjustment wheels have 14 large sinusoidal bump crests around their circumference, so turning by one of these is an adjustment of exactly 0.05 mm.
Comment: @R..GitHubSTOPHELPINGICE Thanks, I added that to my answer in case someone else finds it useful.
Answer: Just as Andrew, I did run a quick test to measure it: on my corner closest to <0,0,0>, a little stud is poking out. Just enough to screw on a threadcutter I know without any cutting happening:

Indeed, it is M4x0.7, aka coarse thread.
Answer: Possibly tongue in cheek here, but if you can detect a 0.2 mm change, you may be able to determine visually the thread pitch, although it means de-tuning your bed for the experiment. Keeping close count is part of the experiment and you can reverse the count easily enough.
Make contact with the nozzle at the location of one screw. Count the turns in order to set the screw back to original location (or don't worry, re-tune later).
If the pitch is 0.5 mm, two complete turns would give you a millimeter, while the 0.7 mm pitch will give you 1.4 mm. Make it four turns and the difference is more apparent. That would present a 2.0 mm compared to 2.8 mm for the two types of threads.
Answer: I don't know what the value is, but there are a few ways to find out. It is very hard to measure this with a caliper, but it can be done, mark the upper and bottom of e.g. 10 windings and measure this with a caliper. Alternatively measure how much the screw drops after 10 full turns.
There are special tools that give you the answer directly, they cost a few Euros/bucks but can be very handy; a thread gauge, just place the 0.5 mm and the 0.7 mm beside the screw and you will instantly see which is the correct one.

I bought mine at a typical Chinese vendor site.
Comment: An even more obvious way to measure this would be to get (or even print) some M4 0.7 and 0.5 nuts and see which (if either) successfully thread onto the exposed bottoms of the screws. With real metal ones you'd have to be careful not to damage the thread with the wrong one, but printed ones would be harmless. Probably would need a long interface to ensure that it doesn't "work" just by bending a couple threads.
Comment: Could also print a thread gauge like that, though it might be some work figuring out a way to do it with sufficient resolution.


Show different report in Oracle based on parameter

Question: I'm using Oracle report builder and I have to show summary and detail reports. This tool does not have drilldown capability. I need it to show the either the detail or the summary report based on a parameter that the user enters at the beginning. Can anyone tell me how to dynamically display either one or the other report based on the user parameter entered?
Answer: You will use a repeating frame to display the content and you can set the visibility of this frame according to the value of your report parameter.
So you will just have two of these - one for your first select and another one for the second.


How to enable ssh on raspberry without screen?

Question: my problem is, that I do not have screen and keyboard on raspberry. And I am trying to connect to it via SSH. But from default is in sshd_config set: PubkeyAuthentication to yes. And that is my problem, because when I copy .img file to SD card I`m unable to login via ssh because of pubkeyauthentication. How can I change it to no using my PC? (Ubuntu) I tried to mount .img file and edit sshd_config, but I am able to mount it only read-only. What do u suggest?
Comment: Have you attempted editing the `sshd_config` file as sudo?
Comment: You should be able to mount the SD card on Ubuntu.
Answer: Do you want to login with a password? Then I think it's the PasswordAuthentication option you want to check. It doesn't matter if PubkeyAuthentication is yes as well, they can both be yes. Add the -v option to get debug info during connection setup: ssh -v user@rpi


What would a default wind current look like?

Question: Assuming the world in question to be of similar size to ours, same proportion of atmosphere etc. but whose surface is perfectly flat, and has a 0 degree axle tilt what sort of weather/wind current patterns would be produced?
Answer: The flat surface has little to do with the global air circulation since it is manly driven by the difference of air pressure caused by the global circulation of air itself and the difference of temperatures as well.
Having no tilting means there is no seasonal variability in the wind patterns and logically no season variation of temperature. A different wind pattern will affect the precipitations. Places that are wet will always be wet and places that are dry are always dry (places affected by a high pressure system like India during most of the year except in summer). For example, the Mediterranean climate could not exist since there would be no dry season in the summer. The monsoon would never occur in India because the the Sun would not be able to heat the land enough to cause the pressure to drop and thus change the wind to flow inland. Therefore, most of India would be something between a steppe and a desert.
One quick way to get an idea of what the weather would look like would be to look at temperature/precipitation maps for the month right after the equinoxes. This is because the most important factor is the energy received from the Sun.
Answer: In the Earth global wind circulation is heavily affected by geography - in part due to some topographical obstacles, in part due to different heating of continents an oceans and in part due to different transport of heat by different oceans. If the Earth were flat and oceans were uniformly distributed, global circulation would be the only factor with no local disturbances.
Furthermore, without axis tilt there wouldn't be seasonal differences.
Therefore, in an uniform untilted Earth we could expect nearly constant winds, always eastward or westward according to latitude.

Earth Global Circulation (credits here).


How is SYMPREC used to determine symmetries compatible with local magnetic moments in VASP?

Question: In DFT calculations using vasp, symmetry analysis are performed to determine space group symmetries at first, if symmetrization is turned on, such as ISYM = 2. When magmoms are set in INCAR, symmetries broken by local magnetic moments are removed and magnetic symmetries are obtained. To test whether a symmetry $g$ is compatible with local magnetic moments, given a site $r_i$, an equivalent site, $r_j = gr_i+R$, related by the symmetry is found at first. $R$ is a Bravais lattice. After applying the symmetry to the magnetic moment on the site $m_i$, if resulting magnetic moments is equal to the magnetic moment on the equivalent site,$m_j=gm_i$, the symmetry is preserved. The equality must be hold within some tolerance, that is
$$
|m_j-gm_i|<\delta.
$$
My question is what is value of the tolerance give a value of SYMPREC?
Comment: +1 and nice first question! I notice you've been around for 5 months but have only started to post something now, so please accept my welcome to the community, and we hope to see much more of you in the future !!! Hopefully someone with more experience in VASP than me can help you :)
Answer: Without any testing, I think the value of SYMPREC is also used for the tolerance $\delta$ in your expression.
The subroutine related to the magnetic sites is called MAGSYM that can be found in symlib.F. In the subroutine, the magnetic moment of sites are compared with that of their corresponding sites after symmetry operation and the tolerance is set to a variable called TINY with a default value of 1E-5. The default value of TINY can be found in module sim_prec at the beginning of symlib.F.
And this TINY variable is also read in by READER subroutine inside reader.F from SYMPREC tag in your INCAR.
So, I would suppose that changing the value of SYMPREC also changes the magnetic tolerance.
Comment: I checked subroutines you mentioned above and I think you are correct. In the comments about input parameters, only integer rotation matrices are requires and no input variables contains information about the lattice. Thus integer rotation matrices are directly used to rotate magnetic moments. Does it say that **while MAGMOM in INCAR is in cartesian coordinate, ATOMOM variable is magnetic moments in fractional coordinates just like fractional positions of sites?**
Comment: I'm not an expert on these subroutines, but from my understanding, `ATOMOM` (which is read in by `reader.F ` to `T_INFO%ATOMOM`) corresponds directly to the input value of `MAGMOM` in `INCAR` file. That means it only contains the magnetic moments and the site correspondence is done directly by considering the order of atoms in `POSCAR`.
Comment: In `symmetry.F`, there are two `INISYM` subroutines. Compared with output with regard to symmetry in OUTCAR, I think the second one is used currently in version 5.4.4 and after. For ISPIN =4, non-collinear case with four elements in spin density matrix considered, `ATOMOM` is converted to lattice coordinates and stored in a temporary variable `TMP(:,:,5)`. For ISPIN = 2, collinear case, It seems magmoms are used directly without conversion although it says `bring them to lattice coordinates and store in TMP(:,:,5)` in comments, which is confusing to me.
Comment: At least for non-collinear case, the **unit of TINY is dependent on the lattice** but not $\mu B$.


Looking for tips on how to write a werewolf/mafia type story

Question: I've been looking for tips on how to write a werewolf/mafia story, but when I use search terms such as mafia, werewolf, or mole, I just get stories about the mafia, werewolves, and moles (animal.) When I combine those search term I just stories about the mafia, werewolves, and moles (animal.) When I use the term social deduction story, I get a bunch of social deduction games. As you can imagine, when the thing you're trying to look up has a vastly more common definition than the definition you are trying to use, then finding what you want is hard. So, I'm looking for tips on how to write a werewolf/mafia story (as in trying to find out who amongst the group is actually an enemy.)
Comment: What kind of advice do you want? The question seems too vague.
Comment: I think there are some murder mysteries based on the idea of a group of people getting stuck together somewhere and having to find the murderer among them. You could look to those for inspiration.
Comment: Be careful, for this can be viewed as brainstorming. Maybe give more details on your story?
Comment: Your question is not really answerable. Are you looking for research tips...? or for someone's novel on the exact topic you want so you can rip it off...? Or a game on the exact topic you want that has a narrative?
Comment: I'm just looking for any general research tips.
Answer: Searching for 'Mafia', 'Werewolf', or 'Moles' is a red herring in this case, I think.
These sorts of stories predate those games by a long, long time. The most reliable term I could think of that would probably best match is 'Murder Mystery Stories'.
The trouble will be narrowing it down such that all participants are known ahead of time-- I think the story that most comes to mind for this is something like CLUE, or perhaps Sherlock Holmes, depending on the style you're looking for.
Hope that helps.
Comment: I'll try and look into it.
Answer: The American Mafia is a criminal enterprise which may be viewed as distinct from the origins of the Sicilian Mafia. I recommend being clear on what you mean by 'mafia.'
In the 19th and 20th centuries, the American and Sicilian mafias may together have  been defined as:

... a network of organized-crime groups based in Italy and America,
evolved over centuries in Sicily, an island ruled until the mid-19th
century by a long line of foreign invaders. Sicilians banded
together in groups to protect themselves and carry out their own
justice. In Sicily, the term "mafioso," or Mafia member, initially
had no criminal connotations and was used to refer to a person who was
suspicious of central authority.

I would think this might be the angle to contemplate if considering the history of a current-day monster, such as a werewolf.
Comment: I mean mafia/werewolf the genre. There's a link in the post. It's usually refers to a game where one has to discern who amongst the group is actually an enemy.
Answer: It's been a bit since I read their article, but TVTropes.org also has an article for Werewolf that got me hooked.  They also have a subpage called "Characters"  which will list dedicated roles that may show up in a play through and what their function to the community is as well as alternative names (For example, while the game can be run homemade cards for players, the most popular box set lists one role as "The Little Girl" even though the role requires play that can be done by any character in a story regardless of gender or age.  For those interested, player who is given "The Little Girl" role is permitted by the game master to see the werewolves after their first attack, thus learning the identity of all three wolves.  However, the character realizes that if the wolves learn this, they will kill them, so they are barred by rules from directly outing the wolves... but may vote on which player to eliminate during the democracy portion of the game freely...  Thus the players who identify the "Little Girl" can watch for cues in how the player votes to determine if the person who is being accused is a werewolf... including the wolves presumably if a wolf ever identifies the "Little Girl" the player will surely be eliminated the next round) or similar roles that overlap (as a party game, many house rules exist to give lack luster roles a little extra or create new roles to replace old ones.  Depending on the group, these modifications either change a base role's abilities OR have both roles present because the creation is to make sure all the villagers have an ability OR eliminate other base roles based on roles in play).  I also believe they list the Mafia's equivalent names (The roles handle the same no matter the version you pull, Werewolf is themed to small town fantasy horror setting while Mafia is themed to a modern organized crime setting, thus role names are changed to fit the story.  For example, one role will allow a villager to discover the latest attack victim and heal them once per game, thus letting them nullify a kill.  In Werewolf, I believe the role is called "The Witch" and the thematic idea is that they either use magic to reserect the player or are making "magic" potions from natural ingredients that benefit the user's health... In Mafia, the role is "The Doctor" and represents a person who has medical knowledge finding the victim after the attack but before the vic succumbs to the wounds in a right place, right time.  In other versions of the game where the "Wolves" are a Coven of Witches (I suspect to drive the point of playing a game of witch hunt home a little better) the role will obviously get another name, since "Witch" is the name of the titular bad guys (I heard one version where the role was given the name "Good Samaritan" since the redress was set to a theme of the Salem Witch Hunts, and as such, the roles were given a quasi-mystical theme naming, but unlike Gothic Horror, the naming was given a Biblical/Religious theme... since Witches are linked to Satan in setting.


XNA WP7 Mango: DrawableGameComponent can be dynamically added to Microsoft.Xna.Framework.Game?

Question: It seems that the class inherited from DrawableGameComponent can be added to Xna.Framework.Game only at Initialize() phase in Game1. Later than that, the component's Draw won't be called. Is there any workaround? The components can be dynamically created at run-time. I need to add the component to be drawn. Thanks!
Answer: Components can be addded to the Game.Components collection whereever you want. If you add a component in the e.g. Update() method, even its Initialize() and LoadContent() methods are called. To draw all components, make sure that the Game.Draw() method contains a call to base.Draw().
If you are experiencing problems only because components are added later, then the problem is probably in the component itself or somewhere else. Make sure that everything exists that the component relies on.


Is infinity possible

Question: Can there be such a thing as infinity if the universe isn't growing constantly? Or is it a finite universe? I tried to ask myself this but is it really possible to understand?
Comment: This may be too broad for a short answer that is not primarily opinion based. Are you reading someone who takes a stand on this issue? If so quoting that person may restrict the scope enough for an answer. Best wishes and welcome!
Comment: Consider a racetrack, it is possible to walk forever in one direction. Now consider a fractal, it has infinite circumference yet finite surface area; or in 3D infinite surface but finite volume...
Comment: Based on gut feeling, without any notional argument for it. I believe infinity to be a human concept, and not a physical reality.
Answer: The notion of infinity boggles the mind, but maybe that is because our minds are conditioned by a temporal component since birth. Consider how the earth's rotation and revolution would instill in all earthly beings some concept of time. We observe time, or at least perceive that we do, all around us, always. We think, speak, and behave in coordination with space-time.
Consider that perhaps there is a dimension that transcends space and time. If space and time are subset to some extra dimension, then maybe that dimension exists without time at all; if so, then it is also true that we exist in that dimension -- though we may not intellectually perceive it.
The resulting premise is this: If time applies to all things in the space-time set and there is infinity, then there must be some additional dimension that is superset to space-time and so time does not apply to it.
For further thought, consider dark matter1:

Dark matter is a hypothetical kind of matter that is invisible to the  entire electromagnetic spectrum, but which accounts for most of the matter in the Universe. The existence and properties of dark matter are inferred from its gravitational effects on visible matter, radiation, and the large-scale structure of the Universe.

Dark matter is hypothetical and only indirectly observed, yet it has been conceded that dark matter accounts for most of what we perceive as the universe. Our indirectly observing dark matter seems comparable to a 2-dimensional being that exists only on a flat plane observing a 3rd dimension of height indirectly through another entity's ability seemingly to transport to another perceived location via 3-dimensional movement.
Perhaps dark matter is of space-time's superset, and so we continue to struggle to understand it as we may only indirectly observe it; further, imagine our difficulty in observing it if time somehow does not apply to it. The 2-dimensional being may observe a third dimension indirectly, but likely would fail to describe that dimension in terms that transcend its 2-dimensional universe -- which, by the way, could well be the same universe as the one in which we exist.

1 https://en.wikipedia.org/wiki/Universe#Dark_matter

Is infinity possible


Slackline on square pillars

Question: Is it safe to setup a slackline on a square pillar, or are the few pressure points likely to cause damage to the pillar / slackline? I have attached a picture as an example..
Comment: Depends on how these pillars were build. If they're just a few stacked bricks, they won't like horizontal forces. If it's reinforced concrete, all is well. But likely it's the former, so without further information, I'd say it's a bad idea.
Comment: Also, the risk that the part that goes around the pillar gets chafed quickly is quite high. Better find two decent sized trees.
Answer: You might be putting yourself into peril by doing this. As mentioned in the comments, there are two main risks:

The pillar is most likely made of stacked bricks and not meant to withstand the horizontal forces of a slackline. It could collapse anytime.
The sharp edges of a pillar can cause significant chaffing on the line, particularly because it moves up and down while you walk on it. Small damages to the line can significantly reduce its breaking load. A tree is much smoother in that respect and most slacklines come with a textile ribbon that's placed around the tree below the attachment loop to prevent chaffing both to the line as well as to the tree.

Here is a page that calculates the forces exerted on a slackline (you might find one in english, too). A slackline of 20m length pulls with up to 15kn (1.5 metric tons!) on the attachment points when an 80kg person walks on it.
Comment: I was fairly confident it was a bad idea because of pressure points, but had not realised how much horizontal force it exerts

Slackline on square pillars


Significance of the different designs of Tobi's/Obito's masks

Question: There have been three designs of the masks of Tobi/Obito shown in the Naruto (anime/manga). Is there any significance behind the masks and the designs, or is it just a design and something to be ignored?
Answer: The masks in each stage has their own significance:
The Spiral Mask with center at the eye was designed by the mangaka to give the dimension switch by Tobi a better look.
The Rinne-Sharingan shaped mask was worn by Tobi during the Shinobi War to represent his mission i.e achieving the Rinne-Sharingan for the Infinite Tsukuyomi .
All these designs don't have any significance from the perspective of the storyline. They were just designed by the mangaka to have a stylish, appropriate appearance.
Source:

Obito Uchiha
Answer: Well, apparently the masks represent the different stages that Obito's eyes move to.
The third mask is obviously a combimation of the Sharingan with the Rinnegan. It is the same pattern that can be seen on the moon or on Kaguyas forehead.
The 2nd one is like a whirpool, which makes me think of Obito's power to suck other people in the other dimension, that looked kinda similar (look for instance the fight with the 4th Hokage)
The first one is the one I cannot identify. To me, initially, it kinda looks like the cursed pattern that Sasuke gets on his face, but that is kinda of forced, since it does not look exactly like that, and it has no relationship with Obito.
Answer: The first mask is a reference to the 9 tails he summoned (referenced by the 9 ends to the lines on the mask)
The second is a reference to both his Kamui ability and Tobi (guruguru)
The third is a reference to the eye of the moon plan, the pattern is reminiscent of the rinne sharingan and also the third tamoe is in position for a third eye that Obito would have gained.
Comment: There is 8 lines on the mask ... am I wrong?
Comment: yea technically there are 8 lines but I was counting the ends on the lines. if you count the tips of the lines near the eye then you get 9. Although I admit this interpretation is a bit of a stretch is the only I could come up with.
Comment: ahan got it. anyway it's not good reason but can thing about it :-) Thank you so much for sharing your opinion
Answer:
Just rotate it and then you have the first maks
Comment: That doesn't explain anything.
Answer:
I'm not 100% sure, since I've not finished the anime and haven't read the manga, but I think the orange spiral pattern is related to the Zetsu named Tobi, nicknamed Guruguru by Obito.
Answer: :spoiler:
I think the first mask is supposed to represent the mission that he was crushed under the rocks due to the creased pattern on the right side of the mask where his face was partially crushed, the second mask is to represent kamui which is the dimension switch ability of his mangankeyo sharingan, and the last mask is foreshadowing the rineesharingan which is a mix of the rinegan and sharingan.
Comment: Please include relevant sources/references.
Answer: The first mask represents the Kyuubi's tails, the second either his Kamui ability or his friend Guruguru, and the third is related to his Tsuki no Me plan. :D


Field widget item form alter for file field

Question: I want to alter field widget item form of a file field with cardinality > 1 so that a new form element is added to each row of the file tables. For example, in the attached image, I want to add another text field below the "Description" for each uploaded file, even the one done via Ajax, not just the existing ones. I used hook_field_widget_form_alter() but it doesn't seem to work with the newly uploaded file. Any ideas?
Answer: A lot of the build logic for the file field widgets is handled in #process callbacks, so some detailed structures of each individual file's form element aren't really available during hook_form_alter()s.
You might want to preprocess the individual elements with hook_preprocess_file_widget(). Something like:
/**
 * Implements hook_preprocess_file_widget().
 */
function MYMODULE_preprocess_file_widget(&$vars) {
  // Make some alterations to normal file-field widgets.
  $element = &$vars['element'];
  if (isset($element['#file']) && is_object($element['#file'])) {
    // This is an existing file... alter $element accordingly.
  }
  else {
    // This is the actual upload widget... you may want to skip this or alter
    // it in a special way.
  }
}

You could also use hook_preprocess_file_widget_multiple() to specifically target a group of files in a file field that has cardinality > 1. In this case you may need to have some iteration logic to loop through the children elements with element_children().
Comment: For image fields, the hook is `MYMODULE_preprocess_image_widget(&$vars) {}`


as the amount and variety of data increase(s)..?

Question: I remember discussions of flour and butter - different subjects. What if the subject were the same but its two facets are meant:
as the amount and variety of data increase(s)..?
Comment: A grey area; I'd not consider either choice as constituting a problem.
Answer: My analysis
The crucial question here is whether the subject is understood as a single thing despite having separately named components or whether the subject is intended as a plural subject.
Consider this sentence:

The give and take of political negotiation has/have become a lost art in recent years.

This is a fairly clear case, because "give and take" is an idiomatic set phrase that English speakers generally interpret as representing a unitary idea. For this reason, you would be very unlikely to hear a fluent English speaker say

The give and the take of political negotiation...

"The give of political negotiation" doesn't express an idiomatically clear notion in modern English parlance, whereas "the give and take of political negotiation" does. And since the subject expresses a unitary idea, we would normally use a singular verb with it:

The give and take of political negotiation has become a lost art in recent years.

In effect, we treat the giving and the taking alluded to in "the give and take of political negotiation" as simultaneous activities, rather than as sequential ones: each party engages in a continuous process of giving and taking in order to reach a mutually acceptable agreement.
Now consider this example:

The bark and bite of the junkyard dog is/are well known.

In this case, we might very well hear a fluent English speaker say

The bark and the bite of the junkyard dog...

And indeed, for physiological reasons, the bark and the bite of a dog are inherently nonsimultaneous events. So it would make a great deal of sense to choose the plural verb in this case:

The bark and bite of the junkyard dog are well known.

Having considered these two contrary but reasonably clear-cut cases, let's look at a slightly expanded version of the OP's example, which Edwin Ashworth in a comment beneath the posted question has very justly described as occupying "a grey area":

The amount and variety of data increase/increases as the pool of source material grows.

Here, the choice between increase and increases as the verb hinges on the speaker's (or writer's) understanding of "the amount and variety." If the speaker conceives of "amount and variety" as a unitary or closely compacted entity that increases as if it were truly a single thing, the speaker has every reason to want to use the singular form of the verb to emphasize that conception:

The amount and variety of data increases as the pool of source material grows.

But if the speaker has in mind two distinct variables that merely happen in this instance to have similar relationships to the growth of the pool of source material, the speaker has every bit as much reason to use the plural form of the verb:

The amount and variety of data increase as the pool of source material grows.

And although it is by no means necessary to do so, the speaker might choose to repeat the definite article before the second noun in order to emphasize the duality of the subject:

The amount and the variety of data increase as the pool of source material grows.

Bryan Garner's guidance
At least at first glance, Bryan Garner, Garner's Modern English, fourth edition (2016) seems to take a somewhat less permissive attitude toward the question than I have, although he clearly acknowledges that compound subjects can take singular verbs in some instances:

SUBJECT-VERB AGREEMENT, A. General Rule. The simple rule is to use a plural verb with a plural subject, a singular verb with a singular subject, But there are complications. If a sentence has two or more singular subjects connected by and, use a plural verb. Yet if the subjects really amount to a single person or thing, use a singular verb {the apple of his eye and the source of his inspiration is Heather}.
...
D. Compound Subjects Joined Conjunctively. If two or more subjects joined by and are different and separable, they take a plural verb ... [Examples omitted.] But sometimes the two subjects joined by and express a single idea, and hence should take a singular verb {their confusion and uncertainty is understandable}. This is the case with spaghetti and meatballs, which denotes a single dish and therefore takes a singular verb.

The spaghetti and meatballs and inspirational Heather examples call for singular verbs just as indisputable as my give and take example does. But the really interesting example that Garner slips in on his way to spaghetti and meatballs appears at the end of the sentence prior:

Their confusion and uncertainty is understandable.

If you accept the singular verb in that sentence, it seems to me, you are conceding that any tightly bound, difficult-to-disentangle compound subject is fair game for a singular verb. I don't know whether Garner would be willing to view "the amount and variety of data" as sufficiently unified to pass the "confusion and uncertainty" test; but I do know that, by okaying "Their confusion and uncertainty is," he has accepted that the line between acceptable and unacceptable use of singular verbs with compound subjects is a fine and (for the instances close to it) highly subjective one.

Conclusion
Ultimately, from the perspective of rule making, we're stuck with a rather unsatisfactory conclusion: In some instances, a subject of the form "the X and Y" very clearly takes a singular verb; in others, a subject of the form "the X and Y" very clearly takes a plural verb; and in still others, the matter is too close for an outside observer to call, and we must leave it to the speaker to determine which form of the verb more accurately expresses the relationship between the two nouns in the subject.
Answer: the verb relates to two descriptors of the same item (data) so the verb is plural since it refers to quantity and variety.  Is that clear?
Comment: Would you consider 'Health and Safety is our prime concern' wrong?
Comment: @Edwin Ashworth  Interesting question.  Since "Health and Safety" has effectively becomes a phrase that describes a single function, rather than two distinct and separate functions, I would use "is" in that context...
Comment: And there are many grey areas where some would accept sufficient cohesion to warrant singular agreement in a usage, and others wouldn't.
Answer: Amount and variety give a compound subject thus you need the plural verb increase.


White seams appearing when zooming out

Question: I have this model I have imported in Blender. The UV map is quite dirty and I have the following texture paint as you can see. However when I zoom out some seams appear where there are separations on the UV map. How can I fix this? Please note that I am very new to Blender.
Comment: Texture bleeding? Can you share the blend file? Go into edit mode and select the face(s) with the bleed. then in UV editor you can try adjust the position of the mapping or its scale. https://blend-exchange.com
Comment: @HarryMcKenzie I uploaded it
Comment: You need to post the link that is displayed after the upload. Otherwise, no one can access the file ;-) -- About your question, the margin around the UV islands might be too small as *Harry McKenzie* wrote. As an alternative to scaling, you can try re-baking the image and creating an image texture with a larger margin. (*Image Texture* node -> *Emission* node, then bake with Bake Type: *Emit* and increase *Margin* in the bake settings).
Answer: This looks like the results of insufficient margins in your texture relative to your models' UVs. In the Image Editor in paint mode, if you turn on the Display Paint Texture Paint UVs overlay, you can easily see where your painting is relative to the mesh's UVs:

When you go away from your model, the viewport uses mipmapping to reduce the displayed texture resolution and use less resources. But because your painting margin is too small, the mipmap downresolutions quickly display your texture's white background.

Source: Edge padding - polycount
A first easy way to fix the texture as is would be to just change that white background color to the greyish blue (HEX code #2E394C) you have almost everywhere, using the Fill brush:

For further texture paintings:
Do remember to set a higher Bleeding in the viewport's Sidebar > Tools tab > Options panel:

This will make your brush strokes in the viewport automatically "bleed" by a certain amount outside your meshe's UV islands, reducing the risk of seeing the wrong color when your model is viewed from afar.
If you paint from the Image Editor instead of the viewport, you won't have any automatic bleeding but you can manually paint the margin anyway.
Make sure you always have some paint outside your UVs so to avoid the issue.

White seams appearing when zooming out


Install Ubuntu 12.04 bootloader issues

Question: I am trying to install Ubuntu 12.04 over Windows 7 using a USB drive. However, I am not able to install it. Installation breaks saying that "bootloader cannot be installed on
this device." In the details section, I see the ubiquity message saying that it can't read the partition from dev/sda. I've tried various things, boot-repair one among them (http://paste.ubuntu.com/6056191/), but no luck. What am I exactly doing wrong?
Answer: I was able to install it by disabling RAID.
Answer: Did you start with clean disks with no partition table on it or did you reuse the disks. This can be the reason why your system won't boot. Guess how I know.
First clean your disks with:
<code>dd if=/dev/zero of=/dev/yourdev bs=512 count=1
</code>
replace yourdev with the device name of your disks
Then install Ubuntu again. It will then install new gpt partition tables. You only need a swap and a boot partition in raid ofcourse.
Don't forget to adjust your uefi settings in the bios.

Install Ubuntu 12.04 bootloader issues


Small- signal analysis of BJT

Question: Can you explain to me how to obtain the small signal voltages of vc(vout),vb( for the upper BJT) and ve( small-signal voltage of the common emitter ? for this small-signal equivalent circuit. I have tried to do write KCL equations but I think I am not able to find the proper relationships.

sorry for image quality.
Comment: Badly drawn circuit, not even sure that small signal model makes any sense, unreadable component value, not even showing an **attempt** at solving the equations. I'm moving on !
Comment: I can't even understand the annotations.
Comment: What does the u mean, as in r_o = 100ku? Can you show the full schematic so we can verify if your small-signal representation is correct?
Comment: sorry again for my bad hand-writing. its ohm not u. they are resistances.
Comment: Could you look at it now? I have added the main circuit, hope it will be help full.
Comment: I think you're on the right track with your model. Notice that r_o is significantly larger (40-100 times larger) than than the other resistances in the circuit. What happens if you consider it as infinite resistance and erase it from your circuit? Does the math get significantly easier? I was never any good at generating and solving systems of equations for this kind of circuit. Too much focus on algebra, almost no focus on gaining an intuitive understanding of what the circuit is doing. Always try simulating difficult circuits in LTSPICE, PSPICE, or CircuitLab, too.
Comment: well this could have been an exam question for us without using any computer or program :D
Comment: Experience simulating circuits will help you solve them on paper. It's hard to have confidence in your calculations if you can't/haven't verified them. Exam questions, as important as they are in school, are totally irrelevant to the rest of your life as an engineer. Simulation is a skill you need to build. It will help you tremendously. I don't think I would have graduated if not for PSPICE!
Answer: Many times it is best to use simpler equivelent circuits before writing loop or node equations.  The first thing to do in this case is to find the Thevenin equivelent at the base of the npn to ground for vin and the two resistors.  You know how to do this if you are to the point of analyzing circuits like this.  The second thing is to notice that for the PNP i=gm*vbe is the equation of a resistor between C and E.  If you substitute gm=1/r you will find that this is small enough that you can probably ignore the base emitter and collector emitter resistors.  If not just do the parallel combination to replace the PNP with a single resistor.
For the PNP you have B in the wrong place.  Since Vx is a short to ground for small signal, B is the ground end of the PNP r-pi.
Answer: If I were to answer this question, I would begin by finding the equivalent input resistance looking into the base of the NPN transistor. This effectively helps reduce the system of 3 equations to a system of two equations due to the fact that, given the input resistance, call it Rb, you can find the voltage at the base of the NPN transistor. Due to this fact, you can solve for the output voltage of the circuit in terms of a test base voltage (Vb):

simulate this circuit – Schematic created using CircuitLab
This will give you $$\frac{V_o}{V_b}$$ In order to find $$\frac{V_o}{V_{in}
}$$ you would need to solve for $$\frac{V_b}{V_{in}}$$ and find the product of these results. The latter can be found by using the voltage divider between the 2.2kOhm resistor and the 1890 Ohm resistor in parallel with the base resistance. Additionally, to simplify further, you can find the resistance looking down into the emitter of the PNP transistor and treat it as an AC resistance. Hopefully this helps you answer the question!

Small- signal analysis of BJT