Confusion regarding K-fold Cross Validation

Question: In K fold cross validation, we divide the dataset into k folds, where we train the model on k-1 folds and test the model on the remaining fold. We do so until all the folds were assigned as the test set. In every of these iterations, we will train a new model that is independent of the model created from the previous iteration ( every iteration uses a new instance of the model). So my question is, if I divide my dataset into train and test sets, then I have used only the training set for the k cross validation process, and since every iteration uses a new model, what is the output model from this k fold cross validation process that I should use to evaluate it ( calculates the ROC curve, F1-score, precision and so on) using the test set ??  (As I have different models for every iteration). One way to implement k fold cross validation is to use sklearn.model_selection.cross_val_score and this returns only an array of scores of the model for each run of the cross validation and this confirms my problem, where there is no model is  returned to be further evaluated by the test set. What should I do in this case ?
Comment: It is probably more common to call these sets "training" and "validation", not "training" and "test". A test set is one that is set completely aside when the cross validation is being carried out on the {training+validation} set.
Comment: Relevant answer [here](https://stats.stackexchange.com/q/576179) on how data-splitting should be practiced for CV and hyper-parameter optimisation: from the question [Does using grid search for hyperparemeters make test set redundant?](https://stats.stackexchange.com/questions/576145/does-using-grid-search-for-hyperparemeters-make-test-set-redundant/576179#576179)
Comment: @RichardHardy Yes and this is actually what I mean. I mean " Test set", where I want to use it after the  cross validation process to predict the model's performance using precision, recall, F1-score and AUC.
Answer: If you use K-fold cross validation (CV) for hyper parameter tuning, you should train a single model on the entire training set with the best found hyper-parameters and test on the test set.
If you use K-fold CV for performance evaluation (like in sklearn cross_val_score), then you don't need to split your dataset into train/test. The performance reported in each fold will be a test performance. People usually average them or get all the predictions and then evaluate the entire dataset. This is usually done to assess performance when the dataset is small and there isn't a single model output for this case, nor the aim is to have it.
Comment: Thanks alot. So to make sure that I have understand you correctly. If my target is to optimize hyperparameters, then I train using k fold cross validation and the train dataset while I am finding the best parameters, then when I find them, I train the model again using the best parameters and then evaluate using the test set. On the other hand, If I need to evaluate the model only, then I use the whole dataset as k-fold cross validation in this case will do the splitting internally and the final performance is the average performance of all the iterations. Is that correct ?
Comment: That is correct. In the second one, an alternative method (as described above) is to get all the predictions for the entire dataset and calculate the performance (especially if fold sizes are small).


HC06 Weak Transmission

Question: I have been working for a while with a HC06 bluetooth module along with an Atmega 168A microcontroller and everything was fine until a day ago when the bluetooth transmission just went off. Data is being sent along with the correct protocol and I discovered that transmission ocurred only when I place a finger between the TXD and RXD pins of the module. I have tried to vary pull up resistors, baud rate and capacitors between VCC and GND but only the finger trick seems to work. What could be the problem?
Answer: The "finger trick" looks to me like a symptom of an unconnected pin. Unconnected pins in MOS circuits can be very high-impedance, and the resistance (and capacitance) of a finger can affect operation. I'd check very carefully for pins/connections that have become disconnected. The break in the circuit could be a breadboard pin, a connector pin, or even a cracked solder joint on the Bluetooth module itself. If the module has suffered a mechanical impact, also check for completely missing surface-mount components.
Comment: I have checked very well and everything is well soldered, I even changed the location of the module to be closer to the microcontroller but still no results, another curious thing is that transmission is perfect when the RXD pin connects to the TXD pin, I noticed this by accident but obviously it should not be done

HC06 Weak Transmission


bootstrap Glyphicons

Question: Bootstrap css uses the halflings from Glyphicons.
If I purchased their full product line, how would I incorporate that into the bootstrap framework?
Comment: I asked the artist, and he said "I'm glad that you're interested in Glyphicons! Regarding your question: at this time, there is nothing like ALL Glyphicons in Twitter's Bootstrap, but it's good idea, I'll be think about it."
Comment: Hi @phillip did you ever end up modifying the .less file for this?  Mind sharing, if you did?
Comment: Nah, I just kept moving on.  I was just wondering, but it wasn't a requirement.
Answer: Use this CSS sprite generator, uploading the zip file. It will create the relevant CSS classes for you (names are taken from images itself), merging all images in one (transparent) PNG one.
Comment: Gremo, you totally rock.  Using your suggestion I was able to create a setup for glyphicons-free for my site.  Now I have 420 icons for use.  My steps for anyone else: I removed 'glyphicons-###_' from the filenames and scaled the images down 56% to make them match the existing bootstrap glyphicons setup.
Comment: Excellent suggestion Gremo, this tool will do it all for you.
Comment: gremo--I just found this topic and have to thank you for this. That sprite generator is super awesome. Truly amazing. Thank you very very much!
Answer: You could also use the Font Awesome solution.

Scalable vector graphics means icons look awesome at any size.
Designed from scratch to be fully backwards compatible with Twitter Bootstrap 2.0.
Comment: Also the icons are different widths, so layout-wise they are useless.
Comment: actually I've found it renders quite poor at small sizes.
Comment: This is the right direction to go! As many others I thought that I will mess up everything using it. Well, read the home page, as I did, it's just integrate with bootstrap very well. Many thanks.
Comment: You somehow missed the question. While Font Awesome really IS awesome, the OP bought Glyphicons and wants to use them. So suggesting other icon fonts won't help him.
Answer: You would have to recalculate the background positioning of every glyph icon into your own class or overwrite the classes already set by the bootstrap in order to work them in. Twitter's bootstrap uses the halfling (free) version of the icons which are 14px all around, the full set is double the size so the old background-position's won't work.
Here is an example of what one of the bootstraps icon classes looks like:
/* class for the icon "fast-backward", notice the positioning values set in pixels */
.icon-fast-backward {
    background-position: -216px -72px;
}

/* main class, defining what icon sheet to use */
[class^="icon-"], [class*=" icon-"] {
    background-image: url("../img/glyphicons-halflings.png");
    background-position: 14px 14px;
    background-repeat: no-repeat;
    display: inline-block;
    height: 14px;
    line-height: 14px;
    vertical-align: text-top;
    width: 14px;
}

Answer: I have also created one on Github. Didn't see Marco's post above until after.
https://github.com/ekryski/bootstrap-template
Comment: Thank you very much ekryski!  I've recently learned about unicode and am wondering why a framework such as bootstrap isn't utilizing it, unless they feel that their sprite will be consistent across browsers.
Comment: Oh, I see Marco's comment to my comment above.
Answer: From what I recall, Glyphicons doesn't provide their icons as a sprite version (many icons as one image), instead you get each icon separately.  If you only plan on using a couple of their icons, this should be ok.
The best way would be to create a separate css file and continue on with their ".icon-" naming convention.
.icon-whatever {
   background:url('..img/someicon.png') 0 0;
}

The default background position is 14px 14px so you need to reset it to 0 0 like I did above.
Comment: Bootstrap's may be, but Makotosan is correct, Glyphicons pro is not distributed with a sprite image. Here is a generator/css for the pngs provided by the Glyphicons Pro zip file. https://gist.github.com/2694578
Comment: The Bootstrap version is definitely a sprite.
Answer: I've created a sprite and CSS drop-in for Bootstrap to provide this functionality. The repo and instructions are on Github. Not every icon has coverage yet, and some are still slightly off-center. To use the bigger icons just add the icon-large CSS class:

Comment: Thank you Marco!  I just noticed too that there are quite a few icons in unicode.  I wonder why bootstrap doesn't utilize that?  I suppose it's because they could vary from one browser to another.
Answer: There is a great article about Bootstrap Icons here: http://www.themplio.com/twitter-bootstrap-icons
Comment: @Phillip, its here now - ✔ :)
Comment: OK, great.  Hey, have you seen unicode?  I can't believe so much is built into the browser now, like: ✔
Answer: No need to incorporate it. You can just add the glyphicons and use it alongside with the halflings bootstrap comes with.
Add the glyphicons (regular set) as follows:
/css/glyphicons.css
/fonts/glyphicons-regular.eot
/fonts/glyphicons-regular.svg
/fonts/glyphicons-regular.ttf
/fonts/glyphicons-regular.woff
/fonts/glyphicons-regular.woff2

You propably should give the base-css-class: .glyphicons the same style as bootstraps .glyphicon
.glyphicons {
    position:relative;
    top:2px;
    display:inline-block;
    font-family:'Glyphicons Regular';
    font-style:normal;
    font-weight:normal;
    line-height:1;
    vertical-align:top;
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale
}

Next, add the reference to the glyphicons into your page as follows:
<link href="/css/glyphicons.css" rel="stylesheet" />

Now, use the complete 'regular' glyphicons alongside with the halflings:

The other answers are fine but keep in mind the difference between icons with the font-technique and the older technique when using sprite-png's. Png's are not always scaleable and therefore comes with several sizes. Also, the color can not be set. To contrast with the background, the .white class can be used on png's to switch from black to white. By using fonts, style the icons as you would style a font:
.iconstyle {  color: blue;  font-size: 26px;  etc.. }

Answer: You could use my soluce. Put this line after bootstrap link url css on your header.
<link href="../assets/css/bootstrap.css" rel="stylesheet">
<link href="../assets/css/opa-icons.css" rel="stylesheet">

Then to call online html code
 Someting
 Someting

You could download here the assets (images-icons png and css both in zip) :
http://www.photonautes-associes.fr/utils/assets.zip
enjoy :)
Comment: Thanks Bruno!  I'll check it out!
Answer: Download fonts from official bootstrap page and then paste this code as is in your CSS file
Try This code
@font-face{
font-family: 'Glyphicons Halflings';
src: url('/fonts/glyphicons-halflings-regular.eot');}

Answer: I thought I'd add my experience to the list here.
There were several obstacles for me when trying to add Glyphicons All to my existing, labyrinthine, Bootstrap-riddled codebase. (Among them, Glyphicons All uses the construction ".glyphicons .glyphicons-[name]" and Bootstrap uses the construction ".glyphicon .glyphicon-[name]").
I ultimately decided to just use them both, in parallel. Going forward, I find I'm using the Glyphicons All construction more and more, but the Bootstrap construction still works for all of my existing code.
Yes, including both "fonts" adds to the overall page weight, but not disastrously.
Comment: Thanks @skybondsor. I asked this question a few years ago. Maybe I should revisit it, but I don't know. I just settle for what's free instead of shelling out $59 to add a different icon.
Comment: I was defs satisfied with the free version for years! But recently I needed the backwards arrow icon for Twitter "reply", and figured it was probably time I kick that guy some money anyway.
Answer: What I did was pretty simple and worked perfectly. NOTE: this is if you want those beautiful glyphicons working as fonts, as the bootstrap version I'm using does.

In the glyphicons zip, copy all the fonts in /glyphicons/web/bootstrap_example/fonts to where your bootstrap fonts are currently in your project
In the glyphicons zip, look at /web/bootstrap_example/css/glyphicons.css, copy and paste all into your own less/css file.
This step may be unnecessary as long as your own css/less file overwrites them properly: In your project's bootstrap.css file, remove @font-face stuff, .glyphicon styles, and all the glyphicon individual content tags (i.e, .glyphicon-xxxx:before { content: ... }).
In your less/css file with all the new tags, do a find and replace
".glyphicons-" replace with ".glyphicon-"

That should be it, unless I'm forgetting something simple. Works great for me.
Answer: Use glyphicons classess, example:
`<span class="glyphicon glyphicon-search" aria-hidden="true"></span>`

My favourite icon fonts is Fontello, you can download icons you need instead of whole package.

bootstrap Glyphicons


java code help for temperature sensor(DHT11)

Question: I've the raspberry pi model b and i am trying to connect a temperature sensor(DHT11). I am facing problem on how to fetch the data from the sensor. I am using JAVA. Which API should i use to get this working? What else should i need to know?
Comment: You will presumably use the same Java API regardless of which processor you use.  That's a big Java selling point.  The question appears to have nothing to do with the Raspberry Pi.
Answer: DHT11 is a n analog o/p temp sensor. so its real easy to use. but on the other side it doesn't have a proper datasheet( it has one but its in Chinese).
so i will suggest use any temp sensor from TI,AD, Honeywell.
i use SHT25 its low cost and it can do temp and humidity. its accuracy is around 1.8% and 0.2'C.
it comes with I2C communication and real easy to use.
you can find java,python code here for Pi I2C.
Answer: You need a linux driver that you can call from Java and I don't think that there is one for the DHT11. I have used the code in the book Raspberry Pi IoT In C which interfaces directly without any drivers. You could do the same but you would either need to call a C function that read the data or write your own GPIO version in Java using pi4j It is difficult to know if Java is fast enough to do the job.


What if my validation set is worse than my training?

Question: I am running a CNN, on the 1st epoch my training set accuracy is 15% and validation set is 12%, by the 51st epoch my training accuracy is 87% and validation set is 13%. What is happening? What does it mean if my validation set is lower or greater than my training set ?? (my test set gives 12%)
Comment: It means you training set isn't a random sample from the union of training and validation sets. Resample and try again.
Comment: Can you show us the plots you get using the `history` object in Keras such that we can see what is happening. Either its what @Spacedman said, or you are over-training and thus over-fitting.
Comment: Its the usual sign of gross overfit.
Answer: This is a common high-variance problem due to overfitting.
Simply put: Good training accuracy together with low dev set (or in your terminology the validation set) accuracy it means you are expressing your training data very well, whereas your model fails to perform well on unseen data (High-variance Problem).
More general: there are few other combinations of this high-/low-bias together with high-/low-variance that are explained in length in the context of Bias-Variance Trade-off by Andrew Ng in his first Machine Learning course and even more relevant to Convolutional Neural Networks in his last DeepLearning course, see this video. You also easily find many blog posts discussing about these stuffs like this blog post, or this one.
What you see here is quite alright. If fact it is highly recommended practice that you start by a model capable of describing your training set very well first (even overfit). Then if overfit meaning there is a large difference in accuracy between train/dev sets (similar to your scenario), you start penalizing the model (aka regularization). Once again you can find tons of materials on how to regularize CNN models. On the top of your search you will find Dropout, Max-Pooling. See here for example.
I also suggest to pay attention to your data split distributions. It is a very fundamental concept that often paid less attention to. Violating this assumption (aka data split mismatch) could lead to problems that could appear in any forms like large accuracy difference of model on data splits. Maybe check Ng's short video.


This community policy about open source applications written in Mathematica

Question: I'm moving from programming middle sized application, intended for personal use and very specifics needs, to broader projects that can result useful for a generic user. I would like to release them as open source (with no open source licensing: simply publishing the code). Can mathematica.stackexchange accep requests for cooperation, beyond the "one question - one answer" paradigm ?
Comment: More importantly: **"with no open source licensing:"** that might not go well with many people. Not sure why someone would collaborate with you for free if you retain all rights and the software is released under an unknown/non-permissive license. (I mean there's nothing/no one stopping you from doing it... I just don't think "look but don't use or modify" is in the spirit of open source except perhaps in strict semantics)
Comment: I think words like "modify as you wish" could be subject to interpretation as well and also confusing. For example, "Ok, I modified as I wished, but can I now give this to someone else? Should I add your name and mine or only yours? Can I ask this other person to pay for it? Should they also share their source code?", Etc. A variety of licenses exist to answer these questions unambiguously.  You can take a look at https://opensource.org/licenses and pick one that you like. That would make things easy for everyone. I personally like to go with MIT license and is what I choose for my projects.
Comment: There have been posts introducing new projects/packages that essentially boils down to: "Q: How can we do X in Mathematica?", "A: I wrote a package blah blah, here's a few examples, etc." Note that the answer here must be thorough and be appropriate for this site. If you were thinking of just dropping a link and asking people to collaborate, then the site might not be a good fit, IMO. You can try asking in chat.
Comment: You should probably use [WTFPL](http://www.wtfpl.net/)
Comment: Here I really made a huge mistake in expressing my thought. I'm sorry.
I did not mean the opposite of "open soruce license". I  meant "with not licensing whatsoever". The spirit is "look, use, modify as you wish". Do you think that I should edit my question changing  "with no open source licensing" in "with no license whatsoever"?
Comment: I see. I have been a bit childish; the MIT License, however, seems perfectly fitting my intentions.
Comment: Please, can you explain if WTFPL is a joke or not ? Supposing it isn't, I could consider it seriously.
Answer: I would say, it depends. Usually, users don't announce that they now plan to write and publish some open-source projects. They just do it and we often find a way to incorporate them here.
I have myself started and/or maintained some open-source projects that have a Q&A here. You could look at

Can prettify.js be extended to support Mathematica? which ended in the syntax highlighter that is used on stackexchange and the Wolfram Community. Code is available on GitHub.
Mathematica Plugin for IntelliJ which is my largest project, has its own website and is open-source.
Our SE-editor buttons which is open-source
Our SE-Uploader that was started by Szabolcs and that I extended and maintain.

There are other very interesting open-source projects that have an Q&A, for instance

MaTeX package that lets you render LaTeX formulas in Mathematica graphics.
MATLink package to use MATLAB from within Mathematica

and many many more. You can find them on PackageData.net which is another project donated by a user here.
Comment: Thanks for you reply ! I didn't know about packagedata.net. I will inform the community of the existence of a project when a specific question will arise. Please, can you look at the comments above and suggest an  amendment of my question ?


Prove that $G$ has a nontrivial normal subgroup

Question: I wanted to ask if I had done this problem correctly.
Let $G$ be a group of order $pqr$ (for $p > q > r$ primes).
(i) If $G$ fails to have a normal subgroup of order $p$, determine the number of elements with order $p$.
(ii) If $G$ fails to have a normal subgroup of order $q$, show that there are at least $q^2$ elements of order $q$.
(iii) Show that $G$ has a nontrivial normal subgroup.
Let $n_p$ be the number of Sylow $p$-groups.  For (i), by hypothesis $n_p > 1$, so $n_p$ must be one of $r, q$ or $qr$.  Since $p > r > q$ and $n_p \equiv 1 \pmod p$, we must must have $n_p = qr$.  Every element besides the identity of a cyclic group of prime order is a generator, so these $qr$ groups have trivial intersection, meaning there are $(p-1)qr = pqr - qr$ elements of order $p$.
(ii) By hypothesis $n_q > 1$, so $n_q$ can either be $p, r,$ or $pr$.  Clearly $n_q$ can't be $r$, so at the very least there are $p$ Sylow $q$-groups, and therefore at least $(q-1)p$ elements of order $q$.  Since $p > q > r$, $p$ and $q$ must be odd primes, and therefore $p = q + k$ with $k \geq 2$.  Thus $$(q-1)p = (q-1)(q+k) = q^2 + kq - q + k \geq q^2 + 2q - q + 2 > q^2$$ (iii) If $n_r, n_p,$ or $n_q = 1$ we are done.  So assume all of these numbers are $> 1$.  By parts (i) and (ii) we can find at least $pqr - qr$ elements of order $p$, and $q^2$ elements of order $q$.
The elements which do not have order $p$ or $q$ must be numbered $|G| - (pqr - qr) - q^2 = qr - q^2 = q(r-q)$ or less.  But this number is negative, contradiction.
Comment: In ii), it's $p(q-1)$, not $(p-1)q$.
Answer: For the third part, we have: Let $p$ be the smallest prime dividing the order of $G$. If $G$ has a subgroup $H$ of with $[G:H]=p$, then $H$ is normal. Of course, firstly, you should verify this statement.(Normal subgroup of prime index)
In this question, $\vert$$G$$\vert=pqr$ and $r$ is the smallest prime dividing $\vert$$G$$\vert$. For the subgroup of order $pq$ ; that is , of index $r$, you may consider the Sylow-$p$-subgroups, Sylow-$q$-subgroups and their products.


Is "Now I lay me down to sleep" grammatical?

Question: This is in a song I've heard.  Is it grammatically correct?
Comment: *...I pray the Lord my soul to keep*. It's really just 'poetic doggerel', but strictly speaking it *is* grammatical, I'm sure.
Comment: _Enter Sandman_ by any chance?
Comment: It's originally from a prayer, and has been used in many songs.
Comment: Andrew, yes. It is in the record *Enter Sandman* by *Metallica*. Here http://www.youtube.com/watch?v=CD-E-LDc384
Comment: I concur on the use of reflexive pronouns anywhere an object is appropriate, but still hold to the implied preposition for indirect objects. Take, for example, "He gave his daughter in marriage" "He gave his daughter a wedding" "I sent him a letter"
"I sent him home." "Give us our daily bread" "Give us up for redemption"
Answer: Technically this is grammatically correct, however it is not common for someone to use the first person for both the subject and the direct object of a sentence, as it comes across as somewhat redundant.
"Now I lay down to sleep" has the same meaning and is a more conventional way of saying this. Although I'm sure the choice to use "Now I lay me down to sleep" was done for poetic reasons and there's nothing wrong with that.
Comment: Would it not be either "Now I lie down to sleep" or "Now I lay myself down to sleep"?
Comment: I don't think it's as uncommon as you seem to suggest in informal speech. E.g. "I gotta catch me some sleep."
Comment: Ah, you're right. "Lie" is used when no direct object is present "Now I lie down to sleep".
Answer: Nice use of the  middle voice.  Since the subject is acting upon itself, i.e., it is both subject and object, so use of the transitive verb "lay."  Without the object (me) it would have to be "Now I lie down to sleep" (the verb would have to be the intransitive "lie" not the transitive "lay.")  Use of "myself" here would be inappropriate as "myself" would take a preposition (usually implied), e.g., I bought a bike [for] myself; I finished the job [by] myself, I gave [to] myself a birthday gift.  (Except, "myself" can be used emphatically, "I myself won the prize.")  So "I lay myself" does not really work.
Comment: –1: There is no implied preposition in "I gave myself a birthday gift" – it's simply an indirect object. You can use reflexive pronouns anywhere an object is appropriate: direct, indirect, or preposition. Half of this answer is incorrect.

Is “Now I lay me down to sleep” grammatical?


Demonstration of central limit theorem

Question: I teach basic (very) statistics to prisoners in a medium/high security prison and would like to demonstrate the Central Limit Theorem. The classroom has no resources beyond a white board.  I can only bring in paper and writing implements.
Any suggestions on a simple demonstration?
Comment: Several of the answers to http://stats.stackexchange.com/questions/3734/what-intuitive-explanation-is-there-for-the-central-limit-theorem address this (but they are not comprehensive).  What other props might be available?  Coins, perhaps?
Comment: If you can bring in a piece of paper tape measure (where I live, IKEA gives these away, but you can print one easily enough onto paper), you can measure things (if I recall right, Student himself looked at averages of finger lengths over small groups when developing the t-test). If the students all carry something you can measure or count (maybe cigarettes?) you can look at distributions of averages of small groups compared to distribution of individuals. But these will work better if your class size is large; in small groups they may not do enough to show what you mean.
Comment: @Glen_b Yes - moreover they were the finger lengths of convicted criminals! The data set Gosset a.k.a. Student used is actually available for `R`. http://stat.ethz.ch/R-manual/R-patched/library/datasets/html/crimtab.html
Comment: Looks like it was averages of samples of size 4; both height and left middle finger length were considered, but he had 750 averages of that size to play with, which you won't have. If you have only about 20 students you probably won't see enough even with small samples (you need enough averages to see the effect on shape). But if you have a hundred, you might see something.
Answer: I assume that by "demonstration" you mean, "showing what it's about", not a mathematical demonstration.
I would draw a Galton board on the black-board, and simulate what happens as you drop balls, making a random choice each time. You can even ask the students to pick "left or right" randomly a few times, to make it clear that the process is random and you're not deliberately choosing the path (though you should probably do so, in order to get better convergence).
You could also ask all the students their height, and plot a histogram. Why does it look like a bell curve? It's a contribution of many random effects.
Comment: This seems like a good idea. If you have a coin to flip, you could use that to make your choice of left or right. If they don't get coins, but are allowed a pen, you could spin that for l/r.
Answer: If you are in US, this url has statistics on US prisons
http://www.bop.gov/about/statistics
Perhaps you could explore it to see whether some manifestation of the CLT emerges in there.
Answer: Can you bring in dice?  (or maybe they already have access to dice).  Then have them throw the dice (many times, they have the time ...), draw histograms, calculating mean number of eyes, drawing histograms of that for different $n$, so on ...
With many dice you can even build the histogram directly with the dice. We got this in class:
Answer: A proposal,
tell the people to choose papers (or cards) from a pack of cards where each card has a number from -2 to 2.
Also have 5 boxes (A, B, C, D, E).
At first time tell them to choose only one card each.
Then tell them to place their cards into one of the boxes.
When everyone (including you if you want) has placed her card(s) in a box, count the sum of each box and draw a histogram, this wil be very crude.
Then tell the people to choose more than one card (make sure there are enough cards for the experiment) and place their cards on a box (or even different boxes).
Repeat the counting process, draw a new histogram
Repeat once again with people having even more cards each, repeat the counting process, draw histogram.
One can repeat this process as many times as one wants.
Observe the histograms and their shapes.

Demonstration of central limit theorem


Is short drive trip bad for your engine?

Question: My wife's car often uses to drive to a nearby grocery store, which is too close to our house (about 2 miles). Some one told me that I should change the engine oil more often because engine is working hard for short drive. I don't know why.
Answer: Cold Starting Is Bad for All Engines
At cold, oil flow is insufficient to properly lubricate the engine because the oil is too thick; in fact, no oil available with today's technology will provide sufficient flow at cold and also be able to protect the engine at operating temperature.  The choice, then, is to pick an oil that will perform poorly at start up.  As a result, starting an engine cold is pretty much the worst normal operating procedure you can inflict on it.  Short drives mean more cold starts as a percentage of miles travelled, so there will be relatively more wear on the engine.
Condensation Does Not Evaporate
A short trip will not allow sufficient time for condensation in the oil system to burn off, which may result in a build-up of residue on your oil cap and other cooler parts of the system.  This is not harmful, strictly speaking, but it may make it more difficult to diagnose other problems that would result in similar symptoms (e.g., head gasket failures).
Engine May or May not Be Working Harder
I'm not convinced that in a modern engine moving oil around, even cold, is going to result in much extra strain on the engine or oil itself, unless we're talking about extreme cold conditions, in which case you must use synthetics because conventional oils will actually stop flowing altogether.
What Oil Change Interval to Use
Since your mileage will, presumably, be low, you will be changing your oil based on time, not distance.  This is important to do because oil thickens over time (even in storage), exacerbating the cold start issue.  Six months is considered standard and it's highly unlikely, under any kind of normal use pattern, you'd want to change it more frequently than that.
What Kind of Oil to Use
Synthetics thicken less than conventional oils, both when cold and in storage, so a synthetic would be a better choice in your application.
Conclusion
Synthetics are more expensive and frequent oil changes are expensive.  The reality is, if you don't have a very nice engine that you want to pamper, none of the above is particularly relevant because the short drives won't likely have a measurable impact on your engine's longevity.  So you have to decide if it's worth the cost.  If you're talking about a race-tuned 4A-GE that you want to keep forever, then change the oil every six months with a carefully-selected synthetic (but then, if that's the case, you already know all this).  If you have a 1ZZ-FE that you're not particularly attached to, then I really wouldn't worry about the short trip issue at all.  Either way, the best way to know if you're doing this right, with regard to the oil, is to send in your oil for a used oil analysis, but again, depending on your circumstances, you may not want to bother.
Comment: As addition to the "Condensation Does Not Evaporate" point: This is also valid for water vapour in the exhaust. When a car is used for a short trip the muffler will not heat to the point where water turns into steam. As a result it tends to rust quicker.
Comment: Lots of theorising here and it seems to be conventional wisdom, but conventional wisdom had been shown to be false many times. Has there actually been a properly controlled scientific study on this? Also, what are the actual numbers? All else being equal, how much could we expect engine life to differ?
Answer: If you stick to 3 months or 3000 miles, you should be fine. But short trips don't give the oil time to circulate or heat up and thin out. Contaminants don't get removed as well... Not to mention that the difference in viscosity of hot versus cold oil is significant, and yes, that means the motor works harder to churn through it as well as pump it throughout the engine
Comment: Most notably it's far too short a drive for the engine get fully to temperature and burn out all the moisture.
Comment: It is also really tough on exhaust systems as moisture tends to collect in the muffler and low spots of the system. It is even worse when the muffler is at the end of the system as it takes a long time for the muffler to get hot.
Comment: Yes another good point
Answer: Because no engine is 100% efficient at burning the fuel that enters the combustion chamber, a little fuel will leak past the piston rings and enter the crank case and engine oil.
This is a problem because it thins the oil and can harm the engine parts.
However, as the oil heats up, it helps the unburned fuel to evaporate and leave the engine through the crankcase ventilation system. But if the engine rarely gets up to operating temperature, then the fuel vapors will not leave the crankcase and will thin out the engine oil.


Synonym for widely acknowledged?

Question: Is there another word for widely acknowledged? I'm writing a paper and I can't find a better word for widely acknowledged, but it is already used by my source
Comment: Provide an example sentence with a blank where you can fill the word you are looking for.
Comment: I would also like more information about why "widely acknowledged" being used by your source makes it unusable in your paper.  In some situations using a phrase too often can seem awkward, but that's very dependent on context and quantity.
Answer: One option is the noun consensus, or general agreement within a certain community.

Consensus opinion is that Denali is the most impressive mountain in North America.
There is consensus that cardiopulmonary resuscitation alone is unlikely to start the heart.
Consensus holds that the Dred Scott verdict was a low point in U. S. Supreme Court decisions.
Answer: How about commonly recognized? (See the many examples of usage here.)

Synonym for widely acknowledged?


What are "ForwardedTypes" in the context of Castle Windsor component registration?

Question: As the subject says, really!  What do they do?
Answer: Forwarded types allow you to have more than one service implemented by a single implementation, for a concrete example say we have two interfaces for working with tree nodes of some sort:
public interface INodeAlterationProvider { ... }
public interface IChildNodeListProvider { ... }

And various components take a dependency on one or both of those interfaces.  However in implementing each of those interfaces you discover that their is a lot of shared functionality and want to merge the implementations into a single class along with some other features say like:
public class NodeFactory : INodeAlterationProvider, IChildNodeListProvider { ... }

You could register two instances of NodeFactory, one for each service they implement:
container.Register(Component.For<INodeAlterationProvider>().ImplementedBy<NodeFactory>());
container.Register(Component.For<IChildNodeListProvider>().ImplementedBy<NodeFactory>());

But this could potentially mean two singleton instances of NodeFactory exist - not ideal, especially if it's costly to construct - and can make debugging etc. harder to understand, especially if there was more than two interfaces being implemented.
This is where forwarded types step in, allowing you to forward multiple services to the same implementation, here's an example of doing that:
container.Register(Component.For<INodeAlterationProvider>().Forward<IChildNodeListProvider>().ImplementedBy<NodeFactory>());

Note: the component registration code shown here is only available on trunk.
Comment: Could well be a smell in the example I provided, I did come up with it off the cuff...  a more likely example might be something like an IExtendedLoggerFactory which extends ILoggerFactory and is implemented by a single class which satisfies both interfaces.
Comment: Thanks - that explains what it is.  However, based on that, it smells like a shortcut to not doing a "proper" refactoring to merge the two services...?
Comment: Ah; yeah, ok, I can see that.  I was actually at Mike Hadlow's talk on IoC/Windsor last night and found out some things about trunk there, too :)


Justification for re-opening

Question: When we vote for closure we put some justification of why we think this particular question is worth closing. However when one votes for re-opening it seems the process is different. For example I can see that the question has re-opening votes but I am not aware of what the arguments are. Does it make sense to add such kind of feature so that other people could reconsider their vision of how valuable the question is?
Answer: Part of the confusion is that there's an automatic reopen vote caused by any kind of edit to a question, no matter how trivial the edit happens to be.
I think having some kind of argument for a reopen vote could be a useful tool, but I don't know if that's something the overall SE community would want - this is a fairly low-traffic stack, and something like this could well be a nightmare if used in the big stacks.
Answer: Questions do not need a reason to be open. They only need a reason to be closed. By definition, a question that is being voted to be re-opened simply means it has been edited to no longer have any reasons that warrant its closure anymore.
If you look at the question in an unbiased manner and say "no, this doesn't meet any of the reasons to close" then you should consider voting to re-open it. Questions should be open whenever possible, and only closed so long as they meet criteria for closure.
Comment: Then why the question has to collect several reopening votes (considering "Questions should be open whenever possible")? Any voting does make sense when there are the arguments for the candidate.
Comment: For the same reason you need multiple votes to close it - to make sure one errant member doesn't get it wrong. But note that there [Gold Badge holders get some close and open privlieges under the assumption they won't make those mistakes as easily.](https://meta.stackexchange.com/a/231212/147335)

Justification for re-opening


If I stop consuming protein, will I still excrete urea?

Question: Will an animal that is not eating any aminoacids stop excreting urea (or whichever other form of excreting nitrogen)? If the body is not in a position to lose nitrogenated compounds, in which processes is nitrogen inevitably turned into waste products like amonia/urea?
Comment: The reason I am asking is because I am looking at the optimal protein intake from ratios of macronutrients for a healthy low-empty calorie diet. I want to understand what the smallest replacement amount of protein is that won't trigger autophagy and why even under autophagy one will still lose protein. I am sorry if I posed the question in a way that begs for a specific answer, but I could not really find a concrete answer to why it is that there is always some urea around even under nitrogen deficit. Seems to be because aminoacid reactions produce byproducts like ammonia that can't be reused.
Comment: A hypothetical question from a new user who hasn't taken the [Tour](https://biology.stackexchange.com/tour) looks suspiciously like a homework question for which there is a [specific policy](https://biology.stackexchange.com/help/homework) on SE Biology. For all questions, but especially homework questions you are required to show evidence of trying to answer the question yourself. In addition your standpoint seems unclear. Your "why not?" seems to be responding to some unspoken answer. Please clarify.
Answer: Yes, you will still excrete urea, but the amount you excrete will be diminished. As you might expect, when the body is low on protein, there's a physiologic drive to hold onto as much nitrogen products as possible, in order to conserve the limited supply.
Normally, your kidneys excrete approximately 40% of the urea that is filtered through the glomerulus. (It's slightly more complicated, because there's both secretion and reabsorption that happens along the nephron, but that's approximately the end result.) However, in protein malnutrition, the kidneys reabsorb more of the urea, and that number can drop to excreting only 10% of the filtered urea. (Source) It appears that this is an active process to reabsorb the urea, rather than a passive effect from other effects that malnutrition has on the body.
However, the body isn't capable of stopping excretion of urea completely... there will still be some that is excreted. Urea transporters in the kidney aren't 100% efficient, but probably the bigger issue is that the body needs to use that urea to regulate other functions. Urea is important to the body's ability to concentrate urine, which in turn is related to the body's regulation of blood volume and sodium concentration. And in general, the body cares more about maintaining proper blood volume and tissue perfusion than anything else.
Comment: also not eating protein will not stop proteins in the body from wearing out and having to be recycled.
Comment: Despite the title I would have thought the biochemical tag indicated an interest in whether urea was actually synthesized in starvation. Irrespective I find the information you provide about urea resorption interesting — I was not aware of it. Do you know whether the resorbed urea can be converted to useful biochemical intermediates either by reversal of the urea cycle or by other means (urease?).
Comment: What I don't understand is why when a protein is recycled, it won't just return to being made of its original aminoacids. Can't the body keep those aminoacids around for further usage? What is the specific reaction family that releases ammonia/urea (not the ones triggered when the body runs out of energy storage and has to use aminoacids as an energy source). Essentially, where does deamination occur in the aminoacid cycle and how can it be reversed?
Answer: If an animal that is not eating amino acids is still eating enough nucleic acids to degrade some, that will produce ammonia and urea.
Plus some amino acids will still get degraded.
Comment: The scenario I was thinking of is one where you have plenty of sugar/fat around, so no energy deficit, but you are eating too little protein, so that the losses of nitrogen can be somehow reversed. If they can't, why is such a reaction necessary and irreversible, even with availability of energy to reduce entropy increases from protein degradation into aminoacids?


System restore will wipe other partitions

Question: I will restore my Windows 10 with "restore pc" tool, "erase all data" option. So my question is: Other partitions in my hard drive will be clean too? I want to keep files in them.
Comment: If system restore is something from your manufacturer, then the answer is yes. If you refer to "Reset this PC" feature in windows 10, then the answer is no.
Answer: No, Once you select to wipe data restore pc tool will ask to you if erase all or only windows partition.
Source: https://www.neowin.net/forum/topic/1266840-windows-10-reset-this-pc-will-it-delete-files-on-another-partition/
Update
keep in mind, it is always a good practice have a backup of the important data in a safe place (cloud storage, external disk) independently if you have to perform risk operation or not; I mean if you do not have a backup of your data, do it.


Logistic Regression with variables that do not vary

Question: A few questions around constant variables and logistic regression -

Lets say I have a continuous variable, but has only 1 value across the whole data set. I know I should ideally eliminate the variable since it brings no predictive value. Instead of manually doing this for each feature, does Logistic Regression make the coefficient of such variables 0 automatically?
If I use such a variable (that has only one value) in Logistic Regression with L1 regularization, will the regularization force the coefficient to 0?
On similar lines, if I have a categorical variable for which I have 3 levels - first level spans say 60% of the data set, second spans across 35% and the 3rd level at 5%), and I split it into training and testing, there is a good chance that the third level may not end up in the test set, leading us a scenario where we have a variable that has one value in the test set and other in the training set. How do I handle such scenarios ? Does regularization take care of things like this automatically?

ND
Answer: Regarding question 3)
If you want to be sure that both train and test set contain samples from each categorical variables, you can simply divide each subgroup into test and training set and then combine these again.
Regarding question 1) and 2)
The coefficent for a variable with variance zero should be zero, yes. However, whether such a coefficent "automatically" will be set to zero or be excluded from regression depends on the implementation.
If you implement logistic regression yourself, you can post the code and we can discuss specifically.
I recommend you to find an implemented version of logistic regression and test it using toy data. Then you will have your answer, whether or not the coeffient will be set to zero (which i assume).


Do I need transit visa through Netherlands on a British passort and a Ghanaian citizenship card?

Question: I'm travelling on a British passport to Ghana with a Ghanaian citizenship card through the Netherlands. Do I need an airport transit visa?
Comment: @MarkJohnson, either post as answer or find the duplicate and mark as such, do not post answers as comments.
Comment: British passport holders do not require a transit visa while transfering in a Schengen Area airport.
Answer: As a dual citizen usually each of your citizenships can be used when you pass borders, and the Schengen area does not make exceptions for Ghanaian citizens.
So you show your British passport to the airline, (likely next to your Ghanaian citizenship card to show you do not need a visa for the final destination,) and you will be allowed on the flight to Amsterdam, and there you can just follow the signs to your next flight. (There might be security between the gates but that should be all.)
If you have a long layover in Amsterdam you can also leave the airport, as British citizens do not need to apply for a visa and will just get a stamp in their passport.
You can and should double check in the site which is mentioned in the linked question: Do I need a visa to transit (or layover) in the Schengen area?


Is there any way to remove edges causing a loop?

Question: How do I remove/dissolve the selected edges while keeping the geometry?
Every other modeling software I've worked with can do this without any problem but Blender refuses to dissolve/remove them or adds faces if I merge them.
Comment: Blender is not CAD. I made the mistake of trying to use it like CAD after 20 years in CAD, but it's much better to embrace its way of modelling. N-gons aren't bad, unless you want to do deformations or high quality renders.
Comment: The problem is that it's not a "surface" it's an n-gon defined solely by vertices and edges that have to be triangulated somehow under the hood. Blender doesn't know where to start if there's a hole in the middle so there must be an edge somewhere to connect everything in one continuous perimeter.
Comment: Why do you want to have so many n-gons?
Comment: Cause I don't want to have to select 10 co-planar surfaces, I just want to select one surface and modify it. Like you can do in most CAD software.
Comment: To answer your question, `CTRL-X`
Comment: Related https://blender.stackexchange.com/questions/210059/is-there-any-way-to-remove-edges-causing-a-loop https://blender.stackexchange.com/questions/48954/merge-around-a-face
Answer: From what I can glean from here, Blender's representation of a polygonal mesh does not currently permit faces to have holes.
The rule appears to be that a face must be bounded by a single loop of vertices, with no vertex visited more than once, so..

.. a hole can be bounded by two faces, as on the left, but not by one, as on the right. That would mean doubling-back on the radial edge.
The topology of your top surface seems to be as shown in the examples below, a figure-of-eight region with two holes:

In the state you show, the region is divided into 3 faces, as at the top.
It would be possible to divide it into 2 faces, with one edge connecting the holes, as in the middle.
But not by connecting the holes twice, leaving the outer, green, face-with-a-hole.
Answer: Unfortunately, you can't. 3ds max can do it. (editable mesh, select edge, modifier menu/find invisible, then you can convert it to editable poly and that edge won't appear). The problem is blender is always editing meshes with what you see what you get type of approach. Useful for game models however it's terrible for architectural models where you need quick editing texture UVs etc. I don't think it's a bad idea to implement such thing I'm totally fine if pressing H would prompt whether to hide only the edge only or edge and faces connected to it in the future.
Here's a workaround I choose to use if I really need to select group of faces that create a surface quickly, select the faces and assign them a new facemap layer (under object data properties). then when you need to select the whole thing click one of the polygons that you grouped previously, shift g and select facemap.


Climbing Stairs and Calories Burnt

Question: I climb stairs to work (20 floors) every day . The least amount of work my body is doing by gaining potential energy (P.E) = mgh where m is mass , g is acc. due to gravity and h is height . Assuming every floor is 1 metre high . Mass -> 70kg Work Done Comes out to 70*10*20 = 14000J . 1 calorie = 4.2 Joules . So I am burning somewhere around 3000 calories. Right? But this calculation seems way off. I do not feel this tired after climbing 20 floors. What am I missing?
Comment: " **Assuming every floor is 1 metre high**", seems a tad small!
Comment: Work in SI units.
Comment: @jim Conservative Estimates . Makes math easy :)
Answer: Due to an accident of history there are two different units called the calorie and the Calorie - yes, the only difference is the capital C.
The calorie is 4.2J but the Calorie is 4.2kJ, and the calories counted in diets are actually Calories even though they are invariably written on the food packaging with a small c.
So you only used 3 Calories walking up the stairs. You'll need to do a lot more walking to lose weight :-)
Comment: Thanks . I thought I could just do it with climbing stairs . Dang :(
Comment: @RamanSingh: humans aren't very mechanically efficient, so you used a lot more than 3 Calories. But it takes a surprising amount of exercise to burn calories. From memory running uses about 100 Calories per mile, but that's proper running not jogging.
Comment: One important caveat to this is that, to a reasonable first-order approximation and for typical exercise regimes, the amount of energy you burn is *completely unrelated* to the kind of naïve calculations physicists like to do:  That's because, under the same conditions, your body has an efficiency of approximately zero.  So the trick of exercise is not to do useful work, but to force your body to dump more energy as heat.  So $mgh$ is not very useful because there's an enormous 'work dumped into heat' term which is missing.
Answer: John Rennie has explained the problems with units here. Now, you'll burn about a factor 4 more than the work you perform, due to losses when glucose or fats are burned to allow the muscles to do the work. The Gibbs free energy change when glucose or fat reacts with oxygen and changes into water and carbon dioxide gives you the maximum amount of work that can in principle be extracted; it turns out that the human body manages to come quite close to the theoretical maximum of about a quarter of the total energy released in the reaction).
So, you'll burn approximately 12 Kcal. A rule of thumb is that going down requires about half the amount of energy, so that's about 6 Kcal. You can make a decent cardio exercise out of this by running up and down the stairs 25 times during e.g. the lunch break. The 450 Kcal you'll burn is similar to running at a decent pace for half an hour.
Answer: Some good points have been made here. What I think is missing is the step in physics where, after getting an answer, you ask yourself, "Does this make sense given my question?" The reason why 3000 calories is wrong was explained, but 3 kcal doesn't make sense either. Trying to improve upon that and taking the mechanical efficiency of the body helps, but that still doesn't make sense. 20 floors is a long way. 12 or 15 kcal is too low.
Cross-check it this way: How long does it take to climb 20 flights of stairs and what is your average heart rate? A floor typically has 13 stairs. So you climb 260 stairs. By my quick test, that task would take me about 4 minutes and my heart rate would be about 160bpm. For my age and using one of the "standard formulas" (http://www.calories-calculator.net/Calories_Burned_By_Heart_Rate.html --But note: calorie burn is a predictive measurement subject to quite a lot of error), it predicts 68 calories. This would mean if I did it for an hour straight I would burn a little over a thousand calories. That seems high, but then I don't think I could keep that pace for an hour. So we are in the right ballpark.
-->Update: a developer on our team tested this at the gym. He used a stair climber and did 20-floors at 179 watts, burning 64 calories according to the machine. (The machine didn't account for his weight, so there is a margin of error here too.)
So the physics and math question has us stumped by a factor of about 4x-5x.
For weight loss, I suggest using a heart rate monitor and tracking app like FitTrip (disclaimer, my company makes that app, but it is free to track HR and calories). This will help with the practical matters of managing calorie intake and burn. It looks to be the case that, for each pound you want to lose, you may have to climb about 1,200 flights of stairs without increasing food intake.
But, if the point is to continue the rather enjoyable theoretical discussion then we must start looking for energy expenditure not accounted for using a deeper insight.
So, what is the thing we are missing? The gap is not pure mechanical inefficiency (already accounted for) nor heat (that is what mechanical inefficiency turns into, and therefore is also accounted for). This is my hypothesis: Most mechanical efficiency tests are done on bikes, where the body is mostly at rest and the legs are isolated as the generator of work. My guess (which is reinforced by the difference in walking and biking efficiency in this article: https://www.exploratorium.edu/cycling/humanpower1.html) is that a lot of mechanical work is required to hold a body upright, balance, alternate legs and arms, and otherwise move a gelatinous mass up and across stairs in a bipedal fashion. --Very different from if food calories could power lab-created muscles to turn an elevator crank and lift a mass in a purely linear fashion.
If this is true, then the conclusion is that the human body is actually only about 4%-5% efficient at moving itself up flights of stairs.
Does anyone have another hypothesis? It would be interesting to expand our collective understanding.
Answer: mgh/Energy conversion efficiency (η) is the right formula if you think in mechanical terms. An example: 70kgx10m/s2x20m (for 20 meters height) divides to  energy conversion efficiency ( about 25% is maximum for humans) = 14000J/25=560J = 133.84 cal = 0.13 kcal for only 20 meters of height. I am sure that 20 floors is more than that :). The example is correct only in physics terms because the human is a complex biological system.
Comment: Thanks for posting your first answer. Have a look at how you can[format math here](https://physics.stackexchange.com/editing-help) to improve the look and readability of your answers. And in generaltry to be A clear as possible two questions i have for this one is: what did you use the efficiency for here? And there is an s on your calculations that I don't see what it is, also Iam not sure what the first calculation relates to.  Greetings.

Climbing Stairs and Calories Burnt


Should I use additive probability or multiplicative probability in below scenario

Question: I had discussion with my friend(Person A) who is applying for one job assuming he will get interview call as it is through reference
Person A is applying for one job -Probabilty of he getting Job Offer is $\frac12$.(either he gets or don't get)
Me(Person B ) is applying to $5$ jobs each probability of getting each job Offer is $\frac12$ for every interview he attends.
I know these events are independent all can occur at same time.
How do I explain that probability of person B getting job offer is $\frac12*\frac12*\frac12*\frac12*\frac12= \frac{1}{32}$
 which is actually less than probability of person A getting job.Or am I completely wrong will this be a case of additive probability. can some one please explain me
Comment: This is not clear at all.  Can you edit?  If $B$ is applying to five jobs and has, independently, a $\frac 12$ chance of each then $\frac 1{32}$ is the probability of getting (or failing to get)  all $5$.
Answer: The probability that person A gets a job is $\frac{1}{2}$
The probability that person B gets a job is 1-P[B is rejected from ALL 5 jobs]
Hence the probability that person B gets a job is $1-(\frac{1}{2})^{5}=\frac{31}{32}$


Showing that $\lim\limits _{n\to\infty}{n \choose \left\lceil \frac{n}{2}\right\rceil }\cdot2^{-n}=0$ but the matching series does not converge

Question: I want to show that: $$\lim\limits _{n\to\infty}{n \choose \left\lceil \frac{n}{2}\right\rceil }\cdot2^{-n}=0 $$
  And also $${\displaystyle \sum_{n=1}^{\infty}{n \choose \left\lceil \frac{n}{2}\right\rceil }\cdot2^{-n}} $$
  Does not converge. I'm not particularly good with this sort of approximation so I would really appreciate some help.
Comment: First, make life easy by assuming $n$ is even.  Second, I bet they want you to use Stirling's formula http://en.wikipedia.org/wiki/Stirling%27s_approximation
Comment: I tried opening up the binomial coefficient and doing some approximations from above of the result but then I figure that ${n \choose \left\lceil \frac{n}{2}\right\rceil }$ goes to infinity rather than $1$ like I had hoped. So you definitely need to incorporate that $2^{-n}$ in the process. I haven't tried using Stirling though.
Answer: These are the central binomial coefficients.  You can see the wiki page for the estimates $$\frac{2^n}{n+1}\le {n\choose \lceil \frac{n}{2}\rceil} \le \frac{2^n}{\sqrt{1.5n+1}}$$
Multiply through by $2^{-n}$ and you get your terms.  The upper bound gives the first part; the lower bound gives the second part by comparison with the harmonic series.
Comment: How would you formally prove those bounds though?
I would be happy to see how they are obtained from the original form of ${n \choose \left\lceil \frac{n}{2}\right\rceil }$
Comment: Stirling's formula is your friend.
Comment: I'll get to it then, thanks :)


Evaluating contour integrals

Question: I am looking over a past paper for which I do not have the mark scheme for and the question asks to evaluate the following contour integrals: $$\int_{|z|=2} |z+1|^2dz$$ $$\int_{|z|=2} (z+1)^2|dz|$$ I can't see a way to use Cauchy's integral formula and I am unsure how I would go about this using a substitution, help greatly appreciated.
Comment: what does the integral with $|dz|$ even mean
Answer: I don't think you've got any choice but to parametrise the curve, short of knowing a few tricks. For example, the first one is
$$ \int_{|z|=2} (\lvert z \rvert^2 + z + \bar{z} + 1) \, dz. $$
The last term, $1$, is analytic, so integrates to zero on a closed contour by Cauchy's theorem. $z$ is likewise analytic and so integrates to zero. $\lvert z \rvert^2$ is constant on the contour, equal to $4$, so the integral is zero again because a constant is analytic. Lastly, in the same way
$$ \bar{z} = \frac{4}{z}, $$
so the only thing left in the integral is
$$ 4\int_{|z|=2} \frac{dz}{z} = 4 \cdot 2\pi i $$
by the residue theorem (or the Cauchy integral formula, if you prefer). You might notice this is $2i$ times the area inside the circle of radius $2$; a nice thing about $\oint_{\gamma} \bar{z} \, dz$ for simple $\gamma$ is that it gives you $2i$ times the area inside $\gamma$; this is quite easy to prove using Green's theorem.

So the first one was possible to do without parametrising the contour, but I don't think this is possible for the second one: $\lvert dz \rvert = 2 \, d\theta$, where $0\leq\theta<2\pi$ and that's basically the only way to go: $\lvert dz \rvert$ is arc-length, so it's an arc-length integral, not a complex one. We have
$$ (1+z)^2 = (1+2e^{i\theta})^2 = 1+4e^{i\theta}+4e^{2i\theta}, $$
and of course the second two terms integrate to zero over $[0,2\pi)$, so the integral is $1 \cdot \int_0^{2\pi} 2d\theta = 4\pi$.
Comment: Great answer, really helped me to understand how to answer these sorts of questions, +1. Just one question, what do I do if integrating over the circle $|z-1|=1$ for example? Is it the same thing just different singularities or would the method need to be changed?
Comment: If it's a circle with a different centre, a change of variables will suffice to move it to be centred at the origin and the same method applies. Or one can use $\bar{z}-1 = \frac{1}{z-1}$ and so on: it'll come out the same in the end.

Evaluating contour integrals


Attack comparison Pokemon go

Question: Are some weaker attacks better due to speed and less power up required to use them? For instance a 50 attack with 2 short power up bars compared to a 60 attack with one long power up bar. Anyone have any insight here?
Comment: http://gaming.stackexchange.com/questions/275296/whats-better-pokemon-attacking/275318 This might help
Answer: I only have personal experience to back this up, but it seems that the size of the special attack bar has little effect on the time it takes to charge a single segment. The main benefit of having an attack with several bars is that you can save up more special attacks to chain them together, doing a sort of rapid fire for special attacks. This can be useful if your special move is not super effective against the current opponent you're fighting, but will be against the next one in line once you beat the first.

Attack comparison Pokemon go


How to forbid one directory only in TOMOYO (2.5)?

Question: (For example) I want to restrict write access to /home/backup from anybody, except a particular backup script. (To protect from accidental deletion.) For this, I suppose, it is enough to have two domains: <kernel> and </usr/bin/backup-script>. And I need to enable for <kernel> access to everything except write access to /home/backup. How to do that exception? I don't see exclusion rules in TOMOYO policy specification, and the general ideology of TOMOYO is only granting access, not forbidding.
Answer: Acutally no need to exclude kernel.
You can tell though files /home/backup/\*{\*}\* may only be changed if domain "<kernel> /usr/bin/backup-script" does access.
relevant links from Tomoyo Guide:

http://tomoyo.sourceforge.jp/2.5/policy-specification/exception-policy-syntax.html.en#path_group
Chapter 5-8
Comment: If you apply and Enforce a policy for a specific domain you will achive exaclty what you want. Sorry cant explain better -.-
Comment: Problem is how to *forbid* other processes (besides backup) write access to backup data. All processes should have full access *anywhere* **except** `/home/backup/\*{\*}\*`. There is no problem allowing access to backup data for backup script, since in TOMOYO you granting accesss (and only granting).
Comment: I need to restrict  do you understand that? I **can not** just add `/\*{\*}\*` and exclude `/home/backup/\*{\*}\*`, I **should** only add all dirs, excluding `/home/\*{\*}\*`, than in `/home` I should explicitly add every dirs of users, except `/home/backup/\*{\*}\*`. That is tons of rules already. And then every time I add user I should add rule for him. All that fun because TOMOYO is lacking *exclusion* rules.
Answer: Tomoyo has some kind of exclusion:
/home/*-backup is what you need
http://tomoyo.osdn.jp/2.5/policy-specification/expression-rules.html.en#wildcard


Reply to US Design Patent Office Action(amend to lines)

Question: I have received an office action. In this action, the examiner pointed that, in figure 7, there are some solid contour lines that are not shown in Figs. 1-6.
Could i delete these lines directly or amend them to broken lines?
Look forward to your reply!!!
Answer: A basic requirement of design patent application drawings is that all of the views show the same, consistent, item. If a line is solid in one view it needs to solid in other views of the same thing. Design patents can cover alternate embodiments and a feature that is shown as a solid line in one embodiment might be a broken line in another embodiment. An issue you have in amending a drawing is avoiding adding new matter. There is a fine line between a clarification and adding new matter. Fortunately, design application examiners are almost universally helpful and will often look at a faxed proposed drawing on an informal basis before you settle on something you will actually submit.


Hangout problem

Question: My 'A' contact is deleted from my most contacts list on gmail account but still that person is visible on my frequently contacted list in hangout. Please suggest me something because it is very irritating.
Answer: Go in Hangouts -> Frequent contacts -> press the contact you want to delete for 2s -> hide contact.
Hope it will help.

Hangout problem


how to do geometry clean up in paraview?

Question: I have a vtk file which has a bunch of points, I would like to delete a few points because, those distort my geometry (basic geometry clean up), is there a way I can do it in paraview? I just want to delete those points , that is it. I haven't found a way to do it.
Comment: Your question seems to be purely about the use of the Paraview GUI - such product-specific questions are not something this site is good for and should be asked on the [support forum](http://forum.altairhyperworks.com/index.php?/tags/forums/paraview/).
Answer: If you have some way to distinguish between the "good" points and the "bad" points, you can use the Threshold filter to filter on point data to get rid of the undesired points. If you don't have an appropriate point data array to do this on, you can always generate one with either the Calculator filter or the Python Programmable filter.
If you want to move the "bad" points, options include the Smooth, Warp by Scalar and/or Warp by Vector filters.
Comment: Threshold won't work I have an vtk file, it just won't allow to do that. I am able to generate coords array but in no way apply filter from paraview


Two legs on different tickets with Turkish Airlines - is baggage checked through

Question: I'm booking a flight one-way from Ashgabat to Dublin via Istanbul.  If I book the two legs separately, both with Turkish Airlines, it'a about €120 cheaper than booking it as a single (again with Turkish Airlines, no idea why).  Does anyone have an idea if they will still check my baggage through to Dublin, or will I have to collect and re-check in (I have time, but don't want the hassle, as well as the fact I'll probably have to get a visa stamp "on arrival").
Comment: Most full-service airlines will, many LCCs (Low Cost Carriers) won't. I'd expect Turkish Airlines to check through when you show both sets of ticket details, but I'm not certain, so hopefully someone with experience can confirm
Answer: Turkish Airlines has a web page detailing their transfer procedures. In your case:

International transfer passengers flight routes issued on single ticket continuing to a foreign destination with Turkish Airlines
Passengers disembark with only their cabin baggage and proceed directly to the boarding gates without any flight or passport procedures.
Passengers who have not obtained their boarding pass for the connecting flight at the initial point of departure must apply to the Turkish Airlines Transit Check-in desk.

International transfer passengers (flight routes issued on separate ticket) continuing to a foreign destination with Turkish Airlines*
Passengers reclaim their baggage from the international arrivals hall and proceed to the international terminal to apply to the relevant airline counter for check-in procedures.

So if you book separate tickets, you will need to collect your luggage and check it in again. (Seems like an acceptable hassle to me for €120.)
Note that Turkey does not do any passport checks for passengers in transit (staying in the international transit area of the airport), whether they collect their checked luggage or not. You only need a visa if you want to get out of the airport.
In general, booking separate tickets has the downside that if your first flight is delayed and you miss your second flight, the airline disclaims responsibility. With a single ticket, it's always the airline's responsibility to get you to your final destination. In the case of Turkish Airlines, their rules state:

If due to circumstances beyond its control Carrier cancels or delays a flight, is unable to provide previously confirmed space, fails to stop at a passenger's stopover or destination point, or causes the passenger to miss a connecting flight on which the passenger holds a reservation, Carrier shall (…)

I believe that a separate plane ticket (even with the same company) is not considered a "connecting flight" here, so with separate tickets you would be on your own. That may be worth paying €120 more.
Comment: This answer is COMPETENTLY WRONG.  As (basically?) all airports, baggage collection at IST is AFTER passport control.  There is no way to collect your luggage without going through immigration, and absolutely no way to re-check it without being airside.  There ARE transfer desks landside (before re-clearing security) however that will not help with non-interlined baggage.
Comment: Would he be allowed to board the flight from Ashgabat  to Istanbul without being eligible to enter Turkey when he only has an unrelated onward ticket? What if he misses the onward flight and is not allowed to enter Turkey without a visa? Turkey planned to abandon the visa-on-arrival procedure early 2014, but has kept the procedure running on selected airports.If I understand the Turkish MFA visa information page correctly, the visa-on-arrival procedure has been abandoned permanently since Jan 1st, 2015.
Comment: @Dmitry Exactly.  And the "international arrival hall" is AFTER passport control. Which means that someone that needs to collect/re-check their bags needs to go through passport control.  Which means they need a visa (presuming they need one to enter Turkey). The statement "Note that Turkey does not do any passport checks for passengers in transit (staying in the international transit area of the airport), whether they collect their checked luggage or not" simply makes no sense, as there's no way to collect checked luggage AND stay in the transit area.
Comment: With both tickets from the same airline, he _might_ be able to convince the person at check-in to check it through, if everyone is feeling friendly that day.
Comment: FYI (I forgot about this thread after the trip), I simply asked them at check in, and showed both my bookings, and they were able to check my luggage all the way through to Dublin.  Thanks Turkish airlines.
Comment: A handful of full service airlines do protect across two tickets (eg [American Airlines policy](http://www.aa.com/i18n/agency/Booking_Ticketing/Reaccom/oneworld_tkt_policy.jsp)), but most do not
Comment: I had a similar experience when going from India to Singapore via Malaysia. I had 2 tickets, I had a long term visa for Malaysia, just in case.

The agent checked through my luggage to Singapore, even if I had two separate tickets. Catch was, I was able to collect my second leg boarding pass only at Malaysia.
Comment: @Doc But the official instructions require transfer passengers to claim their baggage from the international arrival hall in Turkey! "Our transfer passengers, coming from an international point and continuing to an international destination with Turkish Airlines, whose flight routes are not arranged with a single ticket: Get your baggage from the international arrival hall."
Answer: From the official instructions:

Our transfer passengers, coming from an international point and
continuing to an international destination with Turkish Airlines,
whose flight routes are not arranged with a single ticket* Learn more
Get your baggage from the international arrival hall.  Go to the
international terminal and the related airline's counter for the
check-in procedures of your upcoming flight.
*Excluding passengers whose routes are arranged with a single ticket with a Star Alliance member airline or an airline having a codeshare
flight agreement with Turkish Airlines and passengers having a
connecting flight to Taiwan (TPE-KHH-RMQ) with a foreign airline in
Turkish Airlines operated flights to Hong Kong, Seoul, Singapore,
Tokyo, Bangkok, Shanghai, Guangzhou and Kuala Lumpur.

Source: https://www.turkishairlines.com/en-int/any-questions/transfer-transit-passengers/
But they seem to be completely wrong:

Usually airports register the baggage to the final destination.
It seems that it's not possible to follow the official instructions because you can claim the baggage only after the passport control (if a comment by another user here is correct).
Comment: "international arrival hall" does not imply that you stay in transit. This is basically where you end up after going through passport control. This is to distinguish it from the domestic arrival hall, where you pick up your luggage if you came off a domestic flight.
Answer: You have two separate journeys, even if they are on Turkish Airlines.  The second flight will not have your name as a passenger and thus your luggage will not be transferred.
In fact, your luggage will be tagged only till Istanbul when you check-in. As far as the airline in concerned, you only have a ticket to Turkey, so you need to make sure you are able to enter Turkey. Either you are exempt, or have applied in advance for a transit visa. This is because you will not be allowed to board unless you are able to terminate your journey in Turkey.
Once you land in Istanbul, you will follow the normal passenger that are going to Istanbul - you will follow the arrivals queue rather than the transit queue. You will most likely have to go through immigration, collect your luggage, go through customs and then enter Istanbul.
Then, simply follow the signs for international departure and check in again at the Turkish airline counter for your next flight. Hand them your luggage, this time they will tag it to Lisbon. Present your passport and flight reservation, get your boarding pass, go through security, immigration and then board your next flight.
Make sure you have sufficient time between flights to complete all the formalities and account for any delays.


IE non-compatibility adds in unwanted text when saving data

Question: I have a problem in IE Non-compatibility mode. I have an editorContent container that starts off as follows.

This is the first paragraph

However when I press a button extra stuff is added. At the moment Chrome,FF and IE compatibility mode works. However when I use non-compatibility mode it just does not work. After using it in Chrome it looks like this.

           This is the first paragraph

This works fine and as intended, however when I execute the same function in IE Non-compatibility view I get the following.

This is the first paragraph

This, as you can see,is completely different then above. Below is the function called when I press the button.
$set in this case, is the div id p1.
   $('#add2').click(function() {
          classList = "marked";
          $set.addClass ( "qTip triangle-isosceles-blue ") ;
            $set.attr('title', "marked");

            $('.qTip').qtip({
                suppress: false,
                style: {
                    classes: 'ui-tooltip-green ui-tooltip-shadow'
                }
            });
        });

Any help on why this is happening will be appreciated. Thank you.
Answer: The attributes sizcache and sizset are used by jQuery core.


What controls the home directory in applications like Geeqie and Thunar?

Question: I have a line in my .bashrc that cd's to a specific directory. For as long as I can remember, this only changed the directory in which terminal sessions began. But then at some point recently, GUI applications such as Geeqie and Thunar also began to start in the specific directory. What could have changed?
Answer: Geeqie and Thunar both use functions that utilize g_get_home_dir() from GNOME's glib.
Quoting from g_get_home_dir() in the API Reference:
Gets the current user's home directory.

As with most UNIX tools, this function will return the value of the HOME
environment variable if it is set to an existing absolute path name, falling
back to the passwd file in the case that it is unset.

If the path given in HOME is non-absolute, does not exist, or is not a
directory, the result is undefined.

So check the $HOME variable and your system's passwd file.


Imaginary Contribution to Diagrams with one $\gamma^5$ Vertex

Question: It is possible to write down a Feynman diagram as below for production of a Higgs boson.
I am slightly confused because the fermion-fermion-$Z$ vertex has a factor of $c_V - c_A \gamma^5$, but the $HZZ$ vertex does not have this factor.  When the matrix element is squared, because there is only one factor of $c_V - c_A \gamma^5$ there will be an overall imaginary contribution to the sum, but the matrix element squared must be a real number.  What happens to this contribution?
Another example is the tree-level diagram in the Weinberg model where $e^- e^+$ annihilates to $W^+ W^-$ via an intermediate photon.  The amplitude contains a factor of the form $a + b \gamma^5$, but would this not produce an imaginary contribution when the amplitude is squared?
Edit: The answer might be that when you take the trace a $(1 - \gamma^5 / 2)$ term in the trace gives you a term like $i \epsilon^{\alpha \mu \beta \nu} p'_{\alpha} p_{\beta}$.  This is non-zero when dotted with another term of the same form when squaring the matrix element, but vanishes when summed over on its own.
Edit: Did some reading of papers from the 1980s where they deal with stuff like this and it seems like the part with the $\gamma_{\mu} \gamma_5$ contribution to a vertex is UV divergent, so in the end the contributions cancel out by necessity for the Weinberg model to work.  If not, the $U(1)$ coupling constants for left-handed and right-handed electrons would have to be renormalized separately, which isn't possible because interaction terms between the Higgs boson and electrons would not be gauge invariant.
Answer:
the matrix element squared must be a real number

No, it doesn't, but the modulus of the matrix element squared, $|\mathcal{M}|^2 = \mathcal{M}^\dagger\mathcal{M}$, does :)
Comment: Yes thanks, I think I got confused for some reason.


How to protect a hidden service against DDOS attack?

Question: How to protect a hidden service against DDOS attack? I did some research and found that it is possible to do load balancing with HAProxy. Is there any other solution that could be implemented?
Comment: The same like in clearnet.
Comment: Check this [Blog Torproject](https://blog.torproject.org/blog/new-tor-denial-service-attacks-and-defenses) New Tor Denial of Service Attacks and Defenses
Comment: See also https://serverfault.com/questions/987879/mitigating-a-ddos-attack-on-a-tor-server
Comment: @krang Most Admins protect clearnet sites by giving their https private keys to a third party; I don't think that's going to work for security-critical Onion Services. Consider, for example, the Secure Drop site for the New York Times. That probably shouldn't be fronted by Cloud Flare https://security.stackexchange.com/questions/246542/webserver-ddos-protection-without-giving-away-private-keys-https-tls-ssl
Answer: A DDOS attack is a type of cyber-attack that uses multiple compromised systems to target a single system, such as a server or website. The goal of the attack is to make the targeted system unavailable by flooding it with requests from the attacking systems.
There are many ways to protect a hidden service against DDOS attack. One way is to use an anti-DDoS service like Cloudflare, which provides protection for both HTTP and HTTPS traffic. Another way is to use an anti-DDoS solution like Incapsula, which provides protection for HTTP traffic only. .If your hidden service is not using an anti-DDoS solution like Cloudflare, Incapsula, or Sucuri Security the most important thing you can do is to enable a rate limit on the server. In other words, the server should only accept a certain number of requests per second. .Why are there limits on the number of requests per second?As mentioned in the previous question, it is important to limit the number of requests per second for security reasons. If a hidden service gets DDOSed and it does not have a rate limit, then anyone can make an unlimited number of requests and overwhelm the server. . .
How do I set up a rate limit for my hidden service? .-- If you are using port 80, then you can use the standard Apache httpd configuration file to enable a rate limit. For example, add this line in your Apache httpd configuration file: LimitRequestBody 1000000.-- If you are using port 443 (HTTPS), then you should use the mod_security module to limit request rates. For example, add this line in your mod_security configuration file: SecFilterEngine Off SecFilterRule \ "id:'1011' match => string:10 action => 'deny'SecFilterRule \ "id:'1012' match => string:10 action =>
Answer: You can use EndGame, which was a system designed to protect Onion Services from DDoS attacks.

https://github.com/onionltd/EndGame

In May 2020, Onion Ltd released EndGame on GitHub. It uses nginx frontend proxies ("fronts") to put the users in queues and require them to solve a CAPTCHA (generated with python).
After waiting some seconds, the user is presented with a CAPTCHA from one of the fronts. If the user solves the CAPTCHA correctly, then their session is forwarded to the actual Onion Service backend.
If the CAPTCHA works, then the DDoS will be mitigated against the backend, and the Onion Service administrator only needs to scale-up their fronts. EndGame's README recommends at least 3 fronts.
At the time of writing, EndGame is what's used in many popular Onion Services, such as the Elude Tech Collective and the Dread Forums.
EndGame's README says that it helps mitigate DDoS attacks, but that it "isn't perfect" and suggests that the Tor developers add a POW at the introduction point to make Onion Services more DDoS resilient

EndGame isn't perfect. It can't protect against introduction cell type attacks (the Tor project will need to add POW at the introduction points to fix that). But it does provide good protection and scaling which makes it much harder to take you down overall for whatever people throw at you.

source: https://github.com/onionltd/EndGame/blob/master/README.MD
Further Reading
For more information about protecting Onion Services from DDoS attacks, see the following articles published by the Tor Project:

Jun 2022 https://status.torproject.org/issues/2022-06-09-network-ddos/
Aug 2020 https://blog.torproject.org/stop-the-onion-denial/
Jan 2014 https://blog.torproject.org/new-tor-denial-service-attacks-and-defenses/


language and time (in "arrival")

Question: upon seeing the much discussed movie - arrival: how far can one stretch the sapir-whorf hypothesis? could it transcend space and take over time? could a language, however complicated, once learned allow those who speak it to see events that are about to happen (let alone things that'll happen in 3000 years)? if that should work (?) why would the UG not be able to do the same (sometime in the future, following evolution's path)?
Comment: For a more realistic comparison of the Sapir-Whorf hypothesis and the universal grammar see [related question on Linguistics SE](http://linguistics.stackexchange.com/questions/14673/sapir-whorf-vs-chomsky)
Answer: Linguistic relativity is a thesis that talks about people's perceptions of the world. It doesn't do anything to alter the actual structure of the world. The laws of causality are defined by Einstein's relativity and they tell us that nothing can travel faster than the speed of light, and superluminal messaging is what is required for time travel. Linguistic relativity is a thesis that talks about how language influences, or possibly defines people's thought, not how it influences the causal structure of the world. There's no part of the thesis that gives language the power to restructure physics. Information cannot travel at superluminal speeds so people cannot have cognition of events before they happen. If a language develops to a point where somebody perceives themselves as being able to tell the future, that is a completely different thing than that person actually being able to tell the future.

language and time (in "arrival")


How do I force remove a package in Arch with pacman?

Question: How do I force remove a package in Arch with pacman while other packages still depend upon it.
pacman -R perl-libwww
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: perl-app-cpanminus: requires perl-libwww>=5.828
:: perl-app-pmuninstall: requires perl-libwww
:: perl-app-sd: requires perl-libwww
:: perl-catalyst-action-rest: requires perl-libwww>=2.033
:: perl-catalyst-runtime: requires perl-libwww>=1.64
:: perl-cpan: requires perl-libwww
:: perl-cpan-mini: requires perl-libwww
:: perl-cpan-uploader: requires perl-libwww
:: perl-feed-find: requires perl-libwww
:: perl-http-body: requires perl-libwww
:: perl-http-request-ascgi: requires perl-libwww
:: perl-module-cpants-analyse: requires perl-libwww
:: perl-module-install: requires perl-libwww>=5.812
:: perl-net-trac: requires perl-libwww
:: perl-net-whois-raw: requires perl-libwww
:: perl-prophet: requires perl-libwww
:: perl-rt-client-rest: requires perl-libwww
:: perl-uri-fetch: requires perl-libwww
:: perl-www-mechanize: requires perl-libwww
:: perl-xml-atom: requires perl-libwww
:: perl-xml-feed: requires perl-libwww

basically LWP 6 split a whole bunch of packages, and I need to remove it so I can reinstall it.
Comment: There is no equivalent of apt-get's --reinstall flag?
Comment: @faheem considering that arch hasn't released libwww 6 yet... even if there was it wouldn't work right in this scenario
Comment: @xenoterracide: Sorry, I didn't follow your response at all (I assume libwww is something to do with the package you are trying to install) but please don't feel you need to explain on my behalf. :-)
Comment: @faheem it's [LWP](http://search.cpan.org/dist/libwww-perl-6.02/lib/LWP.pm). but we can normally just reinstall a package by requesting it's install again... that doesn't help in this case though because it's non in arch repo's and I need to uninstall this and upgrade it without using arch repo's, and since the package was split, I had file conflicts.
Comment: @faheem also please note that Arch is not debian, and have no idea how debian's `apt-get --reinstall` works.
Comment: @xenoterracide: You want a more recent version of this perl-www package than is in arch? So you are trying to uninstall the installed arch version to do a local install of the more recent version, or something like that? Why not just make a package? It is probably not difficult.
Comment: @xenoterracide: `apt-get install --reinstall` reinstalls the package without attempting to remove its dependencies. This can be useful in certain circumstances.
Comment: @fatheem ... sigh... that is exactly what I'm doing... but because it has been split into many packages... the new packages conflict with the old and it must be removed before they can be installed. Otherwise there are conflicting files. I don't know how debian handles package file ownership conflicts, but arch and gentoo will both yell at you if another package owns the files and you try to install it. It can be overridden but because of how I made the package... a general overriding would be less easy than removing it and then installing the new.
Answer: You should be able to reinstall the package with a simple:
pacman -S perl-libwww

This will only remove perl-libwww:
pacman -Rdd perl-libwww

Please notice the double -d in the command, if you use --nodeps you have to specify that twice too or combine it with a -d like:
pacman -R --nodeps --nodeps perl-libwww
pacman -Rd --nodeps perl-libwww

This removes all the packages which depend on perl-libwww:
pacman -Rc perl-libwww

From pacman's man page:

-d, --nodeps
Skips dependency version checks. Package names are still checked. Normally, pacman will always check a package's dependency fields to ensure that all dependencies are installed and there are no package conflicts in the system. Specify this option twice to skip all dependency checks.
-c, --cascade
Remove all target packages, as well as all packages that depend on one or more target packages. This operation is recursive, and must be used with care since it can remove many potentially needed packages.
Comment: +1 thanks for -Rc also, more info in [Arch Wiki](https://wiki.archlinux.org/index.php/Pacman#Removing_packages)


Can we make NFT metadata only visible by the Owner?

Question: I would like to know if there is a way on tezos to hide data in the metadata of an nft so that only the owner of the NFT can see it.
or to make information visible only to the owner.
Do you know if it is possible to code smart contracts with this functionality?
Comment: HI, welcome to the tezos stackexchange. Can you please edit your question and provide more information, and maybe some examples, its not clear what you are trying to accomplish
Answer: I can only assume that you maybe mean something like lockt.
With the Lockt tool, you can do this by first visiting lockt.io and syncing your Web3 wallet. Then specify the contract address and token ID(s) of the NFTs that you wish to add unlockable content to; give a name and description to the content to be added, and finally upload the files. Once this is done, you can share the unlockable content web link. Anyone who owns the corresponding NFTs can sync their Web3 wallet upon visiting the link, and access their content.
Source: https://spotlight.tezos.com/lockt-io-a-tool-for-adding-unlockable-content-to-tezos-nfts/
So with lockt you can lock the content of the NFT for the public - making it "private"
Comment: thank you, it's a very interesting application.
I modified my post to be more precise, I would like to know if it is possible to do this directly in a smart contract