How do you import multiple VCF or CSV Files to Google Contacts

Question: I was trying to find a way to import multiple VCF/CSV contacts to Google Contacts in one shot, instead of adding one by one.
Answer: Source:
http://www.groovypost.com/howto/howto/import-multiple-contacts-into-gmail-from-outlook-mail-thunderbird-vcf-csv/
Combining Multiple .VCF or .CSV Files for Importing
Unfortunately, there isn't any batch import for vcf and csv contacts in Gmail. A workaround for this is to take all your vCard or exported contact files and combine them into a single file and then upload that one master file.
Steps for Windows
Step 1: Launch a command prompt by Clicking the Start button and typing Cmd and pressing Enter.
Step 2: Go to the directory where your exported contacts are located.
Step 3: Type:
COPY *.csv combinedfile.csv

and Press Enter. Or, if you're combining .vcf files, type
COPY *.vcf combinedfile.vcf

and Press Enter.

Step 4:
Next steps are pretty straightforward, go to contacts, click on More -> Import, and select the appropriate option. Upload the file and you are done!
Combining Exported Contacts in OS X
To perform this same task in OS X, launch Terminal, go to the directory that has your exported contacts and type:
fmt -sp *.vcf > combinedfile.vcf

…or
fmt -sp *.csv > combinedfile.csv

Comment: I tried the windows trick, but google didn't like the new combined.vcf file and wouldn't import it.
Answer: Open powershell and type cat *.vcf > .\merge\merge.vcf


Help with trying to understand Voltage controlled current sources

Question: I have been looking for weeks for an article or anything that could explain to me how a voltage controlled current source works. I want to know if it's possible to create a VCCS that changes according to a function. What I mean by this is if you can make it so that if the voltage changes according to a function the current changes how you want it to. Can anyone explain to me how a VCCS works and how to make it work according to a function?
Comment: VCCS are mostly used as a theoretical abstractions to model specific circuits, like transistors and amplifiers. Not a real devices. But of course you can come up with something approximating similar behavior physically.
Comment: DAC is not a current source...
Comment: Sort of - most easily in the digital domain, but you can compute some functions with op-amps.
Comment: Yep, its called a DAC
Comment: @EugeneSh., some DACs are.
Comment: You could always look at a current mirror e.g https://wiki.analog.com/university/courses/electronics/text/chapter-11
Comment: Look up Howland Current Pump
Answer: One possible way to do it:

simulate this circuit – Schematic created using CircuitLab
$$I(R_2)=\frac{U_1}{R_1}$$
This works because the current into the + and - inputs of the OP-AMP is zero (by definition) and the voltage between them is also zero (by definition). As the OP-AMP is used as a buffer (- input directly connected to output), the voltage at R1 is U1, so the current through R1 is
$$I(R_1)=\frac{U_1}{R_1}$$
and because there's no way out for that current (by definition), that's also the current through R2. Regardless of the value of R2.
Answer: I use this type of voltage controlled current sink for exciting strain gauge bridges and other resistive sensors: -

It works by using negative feedback - the current taken by load is sensed by Rsense and the op-amp adjusts the current (if in error) so that the output current is always Vin/Rsense. It has high compliance up to several hundreds of kHz if that is important. To obtain current control down to 0 mA you will need to use an op-amp whose inputs work down to 0V. Also available using a MOSFET: -

The extra two resistors are usually added when the sense resistor is fairly low in value and the gate capacitance becomes somewhat problematic however, most op-amps will drive the MOSFET without the need for the two resistors and extra capacitor.
Once you have understood that you can make a current source by using a PNP/Pch transistor connected to the positive rail: -

The down side is that your input reference voltage is relative to the positive rail. You also need an op-amp whose inputs are capable of working at the positive rail so that you can set Iout to be as low as 0 mA.
And, you can use another VCCS to obtain a ground reference: -

This uses MOSFETs instead of BJTs and works slightly better in that there is no base current error in the final Iout.
You can even make a bipolar current source using a slightly different topology: -
Answer: A voltage controlled current source is a block of components that produces a current (usually) proportional to the input voltage. Real current sources have access to limited voltage so they won't blow up the universe if left open, they'll just limit at the maximum voltage (or maybe arc over some connections).
In order to have a different relationship than proportionality (maybe plus an offset), you can introduce additional elements, usually at the input, but it's also possible at the output, of the current source that have nonlinear behavior. For example, you could have a log amplifier that produced a voltage proportional to the logarithm of the input voltage (with some scaling and offset) and then then feed that voltage to the VCCS to give you a current proportional to the log of the input voltage.
Whether this is done (in between the analog in and out) in the analog domain or digital domain is more-or-less immaterial, at least in theory.
In some cases you might be able to combine the two functions into a single circuit block.
Below is a simple example of a simple and very inexpensive current source that produces an output current that is related to the logarithm of the magnitude of the input voltage (note that it's temperature sensitive so it may not be ideal for precise applications, also the input voltage should be negative only).

simulate this circuit – Schematic created using CircuitLab
In the above schematic, the output of OA1 is the log-related voltage, and OA2 converts that input voltage into an output current, proportional to the input voltage divided by the emitter resistor R3 value.
Answer: There are voltage-controlled current sources (VCCS) in integrated form (of course, non-ideal - with a finite but large output resistance): Operational Transconductance Amplifiers (OTA). If you start a google-search for "OTA" you will see many circuit realizations.
The transfer characteristics (transconductance, g=Iout/Vin) can be controlled with an externally applied current Iabc (amplifier bias current)
Examples: LT1228, Max435, Max 436, LM13600 and LM13700.
More than that, there is a very versatile IC (AD844) which can work as (a) an OTA or (b) as a current-Conveyor (CC) or (c) as a Current-feedback amplifier (CFA).
Answer:
how a voltage controlled current source works
the voltage changes according to a function [and] the current changes
  how you want it to
how a VCCS works
how to make it work according to a function

Lots of slightly different questions and I'm not going to take them all on. Since two others have already attempted to use opamps (which are black boxes) and since one direction of your questions might be taken to want to understand how a VCCS works, I thought I'd provide a few more primitive thoughts to show you why opamps are often used to create more generalized forms. You can then decide which direction you want to take in learning more.
Probably the most primitive (one part) form of an imperfect VCCS is just a BJT:

simulate this circuit – Schematic created using CircuitLab
Here, you can apply a voltage between the base and emitter and this will control the current through the LOAD shown there.
There are lots of problems, though:

The required voltage is proportional to the logarithm of the desired current. Spehro has made use of this fact in his circuit, in fact. So whether or not this is desirable is a matter of what you are trying to do.
The source voltage must also provide sufficient base current to handle the BJT's recombination current in the base region.
The required voltage is also temperature-dependent. So the current will vary quite a bit with only small changes in the BJT temperature.
The required voltage also varies by individual part and part family.
The Early Effect also affects the output current.
It only works with positive voltages (NPN here) over a narrow range.
At low output currents (relative to the nominal range for the BJT), recombination of carriers at the surface and in the emitter-base space-charge layer, plus the formation of emitter-base surface channels, also affect the output.
At high output currents, the growing significance of injected minority carriers into the base region also affects the output current.

One of the more pronounced problems is that very tiny changes in the base-emitter voltage lead to large changes in the collector current. And there are more effects, all of which make it fairly difficult to use without wrapping it with a closed loop control system (which entirely removes the advantage of being a single part.)
It's rare to see this applied, except in circuits such as Spehro's (not so common) or in current mirrors (very common.)

An improvement can be easily had, though. You can include a resistor in the emitter leg:

simulate this circuit
In this case, the input voltage (less a \$V_{BE}\$ drop) is applied across the emitter resistor. This causes a specific emitter current that depends upon that voltage, which is then available (most of it) for the LOAD. No longer is the control voltage proportional to the logarithm of the desired current -- but now there is a simple proportionality between the two that is expressed by \$R_1\$as in: \$I_{OUT}\approx \tfrac{1}{R_1}\cdot\left(V_{IN}-V_{BE}\right)\$. The resistor provides a local, negative feedback here, which is why this works. Using local negative feedback makes this is a lot more useful in an otherwise open-loop situation. Relevant voltages for this circuit are often a lot easier to apply (than in the first case.)
This circuit also has many of the problems of the earlier circuit. But their impact is often reduced quite a bit. For example, it is still temperature-dependent. But since this impacts \$V_{BE}\$ and since \$V_{BE}\$ is often only a small percentage of the supply voltage, the current varies much, much less from a designed value than in the first case.
Circuits become much, much more complex before you start getting closer to an ideal VCCS. No circuit reaches the ideal, of course. But over some desired range of operation, they can do a credible approximation of one.

I've shown you just two very simple cases with BJTs. It's possible to do similar things with MOSFETs and JFETs. The details vary, as do the problems that may complicate a resulting solution circuit. This is one of the reasons why designers reach for opamps here. Much of the heavy lifting work (as well as the myriad advantages that come when you are designing an entire circuit on the same substrate; only one of which is that nearby temperatures can be taken is similar) has been done for you and where you have very large values of open loop gain to apply in a closed circuit to achieve your goals.
The main point here is that, within a limited range of input voltages and output currents and to some reasonable approximation, a VCCS can be had. But like anything else in the real world, it's all a matter of balancing appropriate compromises. Ideals, in the macro-world we live in (as opposed to the quantum world we don't), don't exist. But we can work to get arbitrarily close, when that is important enough.


Taking time off for continuous learning

Question: I make it a point to attend some professional software development conferences every year; I consider this continuous learning. I usually end up taking my own vacation time to do so. Should I ask the company to allow me to go without using up my vacation time? I mean I ultimately believe that my career is my responsibility but my firm will benefit from me attending conferences too so it doesn't seem completely unreasonable to ask them to help me out by giving me time off so I don't have to use up vacation time.
Answer: Ask. What have you got to lose? In the worst case, you have to continue to use your holidays. But any half-decent company should allow it.
If it's a week or less per year, and you're not asking for the cost of the conference itself, I wouldn't have any issue with it. The improvement in your morale as a result of personal improvement would be enough to justify the time.
If you were asking for the conference costs then you'd have to tell me what the company gains from it. But it wouldn't be a difficult sell. In all the times I've lobbied for this kind of training for people who work for me, I've never been rejected.
Comment: +1 This answer says much of what I would have said. All that I would add is that in companies I have worked for (or now, when I'm in charge!), when you receive reimbursement for professional development, it's assumed that's your job that day and you don't need to burn vacation hours.  However, if you don't get reimbursement, you just have to have that conversation so that it's clear you're doing that activity instead of sitting at your desk that day.
Comment: +1 - Most decent companies will pay all the expenses to send their employees to conferences. They know it helps to retain their talent and keeps up morale. Of course making a case for how it will help with your current work will certainly raise its priority in the overhead budget.
Answer: You should definitely look to get that time off covered.
It's not "Time Off", it's "Time On, learning skills and improving in order to be of greater value to the organization" :)
If the company does not have a clearly defined plan to keep you current in the ever changing swirl of technologies and skills needed, you should definitely push hard for the elements of one.  It's usually not too hard to sell such a plan with clear repeated requests that focus on the value in:

advanced skills for the current technologies being used.
continuous training in new and emergency technologies and skills.
retaining and attracting employees.
encouraging an environment of learning and change.
giving employees a break from repeated tasks.
employees getting a chance to look at different or bigger viewpoints.

Taking time off for continuous learning


How to redirect file output to a different directory?

Question: I have a program that regularly outputs files to a directory, let's say /a/b. I am utterly unable to change where these files are outputted. But for me to use them, I must first move them to, let's say, /c/d, an already existing directory. I'm growing tired of regularly moving over the file contents, so is there some way to redirect everything written in that directory to another? I've already tried ln -s but with my limited knowledge of the linking command I couldn't accomplish anything. Changing any code of the program is not possible. Thanks for the help.
Answer: short of being able to delete /a/b directory, your ln -s command will not give you anything.
but if you can find a few seconds that nothing is writing to this /a/b directory, you can do this :
cd /a
rm -r b   # make sure you have a backup of the contents of this directory
ln -s /c/d b

now any application who will write into /a/b, will be directed to write these files into /c/d, provided they have write rights.
Comment: Okay, that seems like it would work, but one more question - `/c/d` is in a different partition. I need the data to write to this partition (in order to save space on the other), does `ln -s` perform this function?
Comment: the `-s` in the command means symbolic link and symbolic links do not have to be in the same partition. That limitation is for the hard links which has to be in the same filesystem
Answer: Here:
while :; do cp /a/b/* /c/d/; sleep 60; done

It copies the entire content of /a/b/ to /c/d/ every 60 seconds.
It does have a drawback: If the files are big (more than a few GB?) then copying might take a while. If this is a problem, comment and I'll implement something optimised for big files (with tail -f) which will also redirect the content in real time


Marketing Cloud - Does Corporate License include FTP and SFTP?

Question: as in the question I wonder whether MC Corporate License include FTP and SFTP?
From this link is not very clear. Is there an official comparison page between the different licences?
Thanks
Comment: Based on the comparison chart, I will at least not assume Basic has SFTP. When you look at the other features, there is a lack of Automation Studio. And you will have difficulty creating import automation without it. You might still be able to drop large files on FTP and import it manually to a Data Extension, but I don't see as a very useful feature on it's own.
Answer: Yes, each Marketing Cloud BU comes with an "enhanced" (s)FTP connected to it.
Most of my client have corporate editions, we use sFTP for all of them - without that, SFMC would have a rather large feature gap.
Have not seen an edition below corporate in the flesh, and this documentation says "contact your representative": https://help.salesforce.com/s/articleView?id=sf.mc_es_enhanced_ftp_guide.htm&type=5
...but from experience - corporate and above, definite yes.
And to reiterate: I would also be very surprised if lower editions didn't have it.


In the top left corner there is a Tibetan Buddhist praying. Can you translate this prayer?

Question:
So, apparently, this won't let me post unless I have thirty characters, so I'm going to ask the same question in the comments. In the above image, a Tibetan Buddhist is praying (or speaking, what have you) in the top left corner. Can you translate this prayer?
Answer: Actually, it doesn't look like Tibetan, but rather like Sanskrit or Pali. It's a little hard to make out, but it could be part of the Prajna-Paramita (Heart) Sutra.
Having said that, Buddhism (and especially Mahayana Buddhism from which this Sutra originates) has little to do with faith. As opposed to the Abrahamic religions depicted here, Mahayana Buddhism is experiential, not axiomatic. The Buddha famously said in the Kalama Sutra:

Do not go upon what has been acquired by repeated hearing,
  nor upon tradition,
  nor upon rumor,
  nor upon what is in a scripture,
  nor upon surmise,
  nor upon an axiom,
  nor upon specious reasoning,
  nor upon a bias towards a notion that has been pondered over,
  nor upon another's seeming ability,
  nor upon the consideration, The monk is our teacher.


Add image files while building kivy executable using pyinstaller

Question: I wanted to create an ubuntu executable of my kivy project using pyinstaller. I have used kivy language in the project. With kivy language, I have added some images in the project. Now I wanted to make an executable. It makes executable and the executable also works fine with remaining project, except that images are not visible.
I wanted to add the images which are in the resources folder. I don't really know how could I add these files in the project. I tries --add-data method, but that also doesn't work.
Comment: Please show the code you have to insert the images.
Answer: You do need to add the image with either the --add-data or with the datas element in your .spec file. Then you also need to make sure that your code can find the images. I use the following code when my images are in a resources folder:
if getattr(sys, 'frozen', False):
    # this is a Pyinstaller bundle
    kivy.resources.resource_add_path(sys._MEIPASS)
    kivy.resources.resource_add_path(os.path.join(sys._MEIPASS, 'resources'))

And then access the image files using:
image_file_name = kivy.resources.resource_find('someImage.png')

Comment: Can you please tell me where is pyinstaller bundle code should be in. i.e. tell me the file name, to add the code.
Comment: The first piece of code (the check for a Pyinstaller bundle) should go in the main python script of your project (the one that defines your App class).  You will need an `import sys` before that code, but otherwise it could be near the top of that file, outside of any class.
Comment: Ok. got it. Thanks for the answer.


Why is the British government so determined to arrest Julian Assange?

Question: The UK government has put the Ecuadorian embassy in London on surveillance for years now. AFAIK, Wikileaks has not released any documents damaging to the UK government. Nor has it released any documents that hurt the current US president. Why, then, does the UK government refuse to move on? Activities of Wikileaks seem to continue even after his house arrest, so what's the point?
Comment: Is it the UK Government, or the Police and the Courts?
Comment: [Related question](https://law.stackexchange.com/q/26781/10336) about a possible deseudation.
Comment: 20K+ views, an answer with more than 100 upvotes and still not enough attention :)
Answer: The UK government is not above the law. UK law requires the government to pursue fugitives. There is no tradition in the UK of allowing fugitives to go free if they are able to remain free for a long enough time. Instead, there is a tradition of the rule of Law, and the expectation that the government will act to uphold the Law.
The case is exceptional because Ecuador has chosen to offer sanctuary in its embassy. It is unusual for the UK police to be unable to arrest someone whose location is well known.
Comment: All governments are above the law. Governments routinely violate their own laws. As an example of the UK government acting above the law, see the movie "In the Name of the Father" or the Wiki entry for [Guildford Four](https://en.wikipedia.org/wiki/Guildford_Four_and_Maguire_Seven).
Comment: This answer applies to all fugitives, but fails to answer the question of why the UK govt. seems so determined to arrest this particular fugitive.
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/74277/discussion-on-answer-by-james-k-why-is-the-british-government-so-determined-to-a).
Comment: Because he was right there, in London, but temporarily out of reach. What he did was offensive to Britain. And it would have been very embarrassing for the government if he had been able to leave the embassy of Ecuador in the night and jump on a flight to Australia.
Answer: Ok, let's get this down straight.
The Guardian, 2017-04-21: The US attorney general has explicity said that getting Assange is a priority.
Sydney Morning Herald, 2012-09-27: The US military has declared Assange and Wikileaks an "enemy of state".
Independent, 2010-12-17: After 7 months of isolation detention, Manning is offered a plea bargain if (s)he, erm, voluntarily names Assange as fellow conspirator.
Wikipedia: The USA has since 2003 a completely one-sided extradition treaty with the UK which allows UK citizens to be extradited without contestable evidence, but not US citizens in return.
Wikipedia: Gary McKinnon was a Scottish hacker which hacked himself into US systems. After the 2003 treaty McKinnon was told that seven charges are held against him, each worth 8-10 years prison, but he might get only 3-4 years at all if he, erm, voluntarily travels to the US. No guarantee was given. Given that the government very nearly extradited one of their own citizens, Assange fears are fully justified.
The Guardian, 2018-02-11: Sweden does not want to press charges anymore since 2013, but the Crown Protection Service tried to sway them. In an answer that refers to the suggestion that the case could be closed as early as August 2012, the CPS lawyer is quoted as: "Don't you dare get cold feet!!!".
The Guardian, 2013-07-03: A hidden microphone was found 2013 in the embassy where Assange resides.
The Telegraph, 2013-05-21: Officers of the GCHQ itself said in internal e-mails that the charges against Assange reek like a fit-up.
The Guardian, 2017-11-10: The CPS admitted having destroyed evidence, notably emails in 2014!
The Guardian, 2017-05-19: The Swedish prosecutors no longer want extradition as of 2017. The international warrant of arrest has been revoked. There are no rape charges anymore.
The Guardian, 2018-02-13: The whole affair is now that they charge Assange with skipping bail for an extradition request that does not exist anymore.
For further information I refer to the excellent answer by James Wood who presented the ruling.
There are still many people who are claiming that the UK only follows the law, so I have researched if there is something, you know, unusual about the behavior concerning Assange. You know, something which indicates that Assange is not treated like a common criminal.

The Guardian, 2012-08-15: The UK threatened to enter the Ecuadorian embassy by force. AFAIK no country has ever dared to speak out such a threat before, not even the USA/USSR during the Cold War.
Prize question: What have Aung Sang Suu Kyi (Burma), Anwar Ibrahim (Malaysia) and Jason Rezaian, Washington Post journalist (Iran) in common? They are all people which have been detained and where the Office of the United Nations High Commissioner for Human Rights pressed for their release. In all these cases both Sweden and the UK supported the decisions. Now the very same Working Group for Arbitrary Detention came to the conclusion that Assange is detained unlawfully. The UK ignored the decision.
The maximum sentence for skipping bail in the UK before a Magistrate Court is three months, the alleged sexual assault is insofar irrelevant for the UK as it is Sweden's responsibility. As the London Metropolitan Police has clearly stated since a while, they have problems with rising criminality and budget cuts. While the article is from 2017, an overview of other earlier articles indicate that Londoners know that shoplifting, theft, burglary and assault is less and less prosecuted or investigated. But Assange's alleged sexual assault and bail skipping must be very important because the Met surrounded the embassy with up to 50 (!) policemen 24 hours a day, 7 days a week which until August 12th, 2015 summed up to a notable 12.6 million pound bill. One commenter pointed out an article in which the Met claimed the costs were covered by the budget for diplomatic protection. The little problem with this answer is that there is a responsible unit, the Diplomatic Protection Group (Special Operations 6), now the PaDP, which is recognizable by driving red cars and being heavily armed. But the policemen guarding the embassy are not part of the group because they are missing the heavy armament necessary for the service. And against whom should they "protect" the Ecuadorian/Colombian embassy exactly?

So the claim that the UK is "just following the law" is baseless. The claim that it is about sexual assault is baseless.
And now someone can tell me why it is not unusual that a government pays millions of pounds to track a fugitive (give a counterexample, please), that evidence is destroyed on purpose and that after the original country has dropped the arrest warrant, the UK judge admits that the British arrest warrant is now solely for skipping bail. They explicitly say that seven years in an embassy is an insufficient "punishment" for skipping bail.
Based on the former conclusions the reason is obvious for me: The US government has either strongarmed the UK that they want Assange and threatened repercussions or convinced the UK that sooner or later Wikileaks will publish dirty laundry about UK politicians so they should persecute him in their own interest. Possibly both.
ADDITION:
I adjusted this addition now because there have been now clarifications posted on other answers. Please see the edit review to see the old version.
Some claimed that the charges are not dropped, this has been refuted now. I also reviewed the headlines and the text again.
At some of the more hostile commenters: Knowing that it is a hot topic, I deliberately sourced every statement on which my conclusions are based.  In your accusations, claims and scorchers you did not come up with a single sourced statement of your own. No word about misbehavior on the government side (destroying evidence, remember?). It would have been given a much better impression if you were providing facts and evidence to prove that I am wrong, so I believe your actual behavior has bolstered my case. Thank you.
REMARK:
Have now reworked the answer again and put some other info together.
ADDENDUM:
A commenter had remarked that the selection of my sources is rather limited. I absolutely invite everyone to make their own research and look out for other sources to get a more rounded view. Note what they claim, what sources are presented and what conclusions are made. Look out for things who may be misrepresented here or contradict your own sources.
Comment: Having jumped bail, you can't choose where to spend your sentence, hence why the judge rejected his claim that he'd already been sufficiently punished.
Comment: Your range of sources is... limited. Referencing other sites might bolster your claims - it just looks here like the Guardian supports your view so you have cherry picked them. Also, the claim at the end "you did not come up with a single sourced statement of your own", because @Valorum provided a link to a BBC article. Please stop ignoring the evidence you requested!
Comment: "The Guardian, 2017-05-19: The Swedish prosecutors no longer want extradition as of 2017. The international warrant of arrest has been revoked. There are no rape charges anymore." - three of the four allegations are now time barred, the allegation of rape will be time barred in 2020. Sweden sees no point in continuing to pursue the rape allegation while Assange remains in the embassy, and the prosecutor said they could reopen the investigation if Assange leaves the embassy before 2020.
Comment: "shoplifting, theft, burglary and assault is less and less prosecuted or investigated" - some of us regard sexual assault as a more serious matter than shoplifting. However, maybe someone who puts sexual assault in quotation marks, such as yourself, does not.
Comment: Just to be clear, there haven't been "felonies" in England for some time, so there being no felony is true, but trivial. You might want to adjust your answer. The bail act offence is unusual in that it may be tried either summarily or as criminal contempt.
Comment: "In all these cases both Sweden and the UK supported the decisions. " - which citation supports this claim?
Comment: I really appreciate you using so many sources, but your interpretation of most of them is really flawed, ie The Indy (2010) does not mention "voluntarily," that's your reading, & since you put it in itals, you seem already convinced that it is fishy. I notice there is no quote. The following wiki item is odd in that JA is not a US citizen, so irrelevant? The "cold feet" is odd in that the context is missing but you make it seem like a direct line to Swedish prosecutors. The Tele article shows that some employees (unnamed) talked about it that way, not that anyone official said that. etc.
Comment: @Valorum: While you are correct that you cannot choose where to spend the sentence, in fact the UK has problems with overfilled prisons so ankle bracelets are more and more used and skipping bail is rarely punished with the maximum sentence. *If the UK wanted to resolve the problem, Assange could have accepted punishment in return for a guarantee to be not extradited*. So it is disingenious to suggest Assange could simply leave which would expose him to the danger of a supermax prison or a [secret CIA prison](http://www.latimes.com/world/europe/la-fg-poland-cia-blacksite-20150510-story.html).
Comment: I would not assume that any of the allegations are now time barred. It's not that there is no prosecution because the Swedish police is dragging their feet, but because the suspect has done a runner. I can't find details about Sweden, but there are countries where the clock stops running the second that you flee from justice.
Comment: @gnasher729, the Swedish Prosecution Authority said the allegations were time barred in a press release. That's currently unavailable but see para 45, Assange, An Application By (Cancel an Arrest Warrant : Ruling No. 2) [2018] EW Misc B3 (MagC) (11 February 2018)  http://www.bailii.org/ew/cases/Misc/2018/B3.html: "Mr Assange's failure to return has already led to three of the accusations becoming time barred in August 2015.  The fourth accusation of rape ("lesser degree" as it was termed by the Swedish authorities) would have become time barred in 2020 had the request not been withdrawn."
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/74278/discussion-on-answer-by-thorsten-s-why-is-the-british-government-so-determined).
Comment: @FrancisDavey I reworked the answer. Valorum: Concerning your earlier argument that the 24/7 surveillance was already in budget and therefore not unusual,..., well, this has backfired. After a little research I found out that those units for diplomatic protection are easily identifiable (see text) and those units actually guarding the embassy are **not** those units. But nice try.
Comment: Let us [continue this discussion in chat](https://chat.stackexchange.com/rooms/74327/discussion-between-thorsten-s-and-andrew-grimm).
Comment: @Tim See the addendum at the end. I striked through the sentence now after Valorum provided one link. What you may have missed is that I actually addressed Valorums claim quoting a Met speaker that the big extra costs were funded by the diplomatic protection fund and that the policemen have patrolled the street where embassies are standing anyway *before your comment*. The BBC link is here (see third bullet), I pointed out in a comment answer that there are *no other embassies in the vicinity* and that the guarding policemen do not look like the elite protection unit used for this purpose.
Comment: @ThorstenS. That's a reasonable response. However, I would not be surprised if some of the policemen already within that budget / department don't look different - although I have no evidence for that. Thank you for removing the aforementioned sentence.
Comment: @ThorstenS. - In that case, pursuing Assange has actually *saved* the taxpayer money if they were able to put some of the (expensive) Embassy Protection Officers back into normal rotation.
Comment: Also, what possible motive could the British Govt have to accept pre-conditions before he gives himself up for bail? Sounds like a very slippery slope as well as probably being illegal....
Comment: "a completely one-sided" - the source you cited didn't use the word "completely".
Answer: The UK courts have issued an arrest warrant for Julian Assange - for failing to surrender whilst on bail. Assange took this matter to Westminster Magistrates' Court relatively recently. It's well worth reading the full rulings by Emma Arbuthnot, the Senior District Judge.
There are two ruling documents, the first document focuses on if the arrest warrant it still valid, whilst the second focuses on if it is still in the public interest to arrest Assange. The ruling documents are a little lengthy, and very much legal documents. I am not a lawyer. As best I can, I have attempted to extract what seems to be the key details.
First Ruling
I believe the contents of the first ruling document can be reasonably summarised as; Julian Assange should be arrested - for failing to surrender whilst on bail. The fact that the thing he was on bail for - extradition to Sweden - was later withdrawn isn't important.

AN APPLICATION BY JULIAN ASSANGE TO CANCEL AN ARREST WARRANT
RULING OF THE SENIOR DISTRICT JUDGE (THE CHIEF MAGISTRATE)
EMMA ARBUTHNOT,
6TH FEBRUARY 2018
Introduction

This is an application made ... that I withdraw an arrest warrant issued at this court when Mr Assange did not surrender for extradition
  to Sweden.

Background

The extradition of Mr Assange to Sweden was ordered by this court  on 24th February 2011.  Various appeals were then dismissed and on
  28th June 2012 a notice to surrender to Belgravia Police Station was
  served on Mr Assange who by then was resident in the Ecuadorian
  embassy.  He did not attend the police station and a warrant for his
  arrest was subsequently issued by this court.

On 26th May 2017 following discontinuance of the underlying Swedish proceedings and the cancellation of the arrest warrant issued in
  Sweden, the European Arrest Warrant was withdrawn before Westminster
  Magistrates' Court

Issue

The sole issue for me to consider at this stage is whether the warrant ... can remain in force when the extradition proceedings have
  terminated.

Decision

If a person who is on bail fails without reasonable cause to surrender he  shall be guilty of an offence. On a straightforward
  reading of the section, which makes no mention of any underlying
  proceedings, 1. Mr Assange has been released on bail, 2. He has failed
  to surrender and 3. If he has no reasonable cause he will be guilty of
  an offence.

Mr Assange failed to surrender to custody and the court decided to issue a warrant for his arrest.

... It is not uncommon for Bail Act offences to be pursued when the substantive proceedings are no longer in existence.

... I am not persuaded that the warrant should be withdrawn.

Second Ruling
There is too much to reproduce here but the ruling goes into a detailed explanation of the public interest points which are worth a read.  I believe this ruling can be reasonably summarised as; it is still in the public interest to arrest Assange.
Edit: I've added additional extracts from the ruling regarding the considerations given to rendition and extradition. I believe the distinction, is that the first is a transparent legal process, whilst the later is a covert action.
Edit: I've added additional extracts related to United Nations' Human Rights Council Working Group on Arbitrary Detention. That section of the ruling is rather lengthy, I have chosen to highlight those elements which I feel most accurately represent the section.

AN APPLICATION BY JULIAN ASSANGE
RULING OF THE SENIOR DISTRICT JUDGE (THE CHIEF MAGISTRATE) EMMA ARBUTHNOT
RULING NO. 2
13TH FEBRUARY 2018
Issue

This application ... that I consider whether it is in the public interest that proceedings against Julian Assange should be
  initiated... [arrest].

He contends that the court should now find that any proceedings for failing to surrender are disproportionate and not in the public
  interest and that in the circumstances the [arrest warrant] should be
  withdrawn.

Decision
The first point [Mr Assange had reasonable grounds for taking the course he did because he feared being sent to the United States]

I accept that Mr Assange had expressed fears of being returned to the United States from a very early stage in the Swedish extradition
  proceedings but, absent any evidence from Mr Assange on oath, I do not
  find that Mr Assange's fears were reasonable. I do not accept that
  Sweden would have rendered Mr Assange to the United States. If that
  had happened there would have been a diplomatic crisis between the
  United Kingdom, Sweden and the United States which would have affected
  international relationships and extradition proceedings between the
  states.

Rather than rendering Mr Assange to the United States, if the US had initiated a request to extradite Mr Assange from Sweden, Sweden
  would have contacted this court and the judiciary here would have had
  to consider the request. Mr Assange would then have been able to raise
  any bars to extradition including fair trial and conditions of
  detention.

The second point [that the UN Human Rights Council Working Group on
  Arbitrary Detention ruled that Mr Assange's situation in the
  Ecuadorian Embassy was disproportionate and unreasonable.]

I have read the Opinion. The group appears to have based its conclusions on some misunderstandings of what occurred after Mr
  Assange's arrest.

... what I can say is that the Working Group was quite wrong when it implied that Mr Assange had been left outside the cloak of legal protection.

... the "house arrest" and "harsh restrictions" referred to by the Working Group ... were proposed by Mr Assange himself.

It is true that he has restricted freedom in the Ecuadorian Embassy, but...he can leave the embassy whenever he wishes...I suspect
  if one were to ask one of the men incarcerated in Wandsworth Prison
  whether conditions in the Ecuadorian Embassy were akin to a remand in
  custody, the prisoner would dispute the Working Group's assertion.

My reading of the Working Group's opinion led me to look at the dissenting opinion of one of the members of the Working Group. ... He
  said of Mr Assange's situation that it was self-confinement ... and
  was not within the mandate of the Group.

I do not find that Mr Assange's stay in the Embassy is inappropriate, unjust, unpredictable, unreasonable, unnecessary or
  disproportionate.

For reasons which must be clear I give little weight to the views of the Working Group.

Conclusion

Mr Summers says Mr Assange fears being rendered to the United States by Sweden. There is no evidence that that was going to happen.
  He would not have been rendered by this country to the United States
  nor by Sweden. ...

I have found above that Mr Assange's failure to surrender has impeded the course of justice and has led finally to the case being
  dropped as it cannot be continued unless he returned to Sweden. ...

... I must look at the impact on public confidence in the criminal justice system if Mr Assange is allowed to avoid a warrant for his
  arrest by staying out of reach of the police for years in conditions
  which are nothing like a prison. ...

The impression I have ... is that he is a man who wants to impose his terms on the course of justice ... He appears to consider himself
  above the normal rules of law and wants justice only if it goes in his
  favour.

... I find arrest is a proportionate response even though Mr Assange has restricted his own freedom for a number of years.
  Defendants on bail up and down the country ... come to court to face
  the consequences of their own choices. He should have the courage to
  do so too.

It is certainly not against the public interest to proceed. ...

Edit: I have changed the formatting as in some cases markdown was incorrectly numbering elements. The numbering now correctly reflects the original source, this may mean references in the comments below are incorrect. Apologies.
Comment: Thank you very much for providing the court case and making the effort to extract the important parts.
Comment: Ruling 2 point 59 is the clincher for me.
Comment: @JamesWood how about the [US's one-sided extradition treaty with the UK where the US can have people extradited from Britain without prima facie evidence](https://en.wikipedia.org/wiki/UK%E2%80%93US_extradition_treaty_of_2003)? Seems like a legit reason to fear extradition. Not to mention that the UK has the image of being the US's lap dog, which doesn't really help their case, either.
Comment: Ruling 2 point 61 is more important. "Defendants on bail up and down the country" do not reasonably expect that US will request extradition probably within hours. US want his head. Also, +1.
Comment: Apparently "Stepping out of this embassy means I get whisked off to a black site never to be seen again" is not considered reasonable cause.
Comment: @JamesWood, the judge simply means that if Assange testified about his fears then the judge might (or might not) find Assange's fears reasonable.

In terms of extradition from the UK to Sweden then extradition from Sweden to the USA, at the first hearings in December 2010 Assange's own defence witness said that couldn't happen. Assange / his legal team did not pursue that line of argument again in the subsequent two appeals (but his supporters often mention it). So far as I'm aware, this was the first time it has been mentioned in court since December 2010.
Comment: @JamesWood Yes, I've read a full text. Point 57 in full says that legally he will be either extradited to US or not; and how it could happen. Again, I expect that a new US extradition request would appear and would be approved as quickly as process of law allows (outlined in the source).
Comment: @kubanczyk, Yes I agree, very much possible. I think the point of the court is that extradition proceedings to the US - which as far as I know have never been initiated - would be subject to full legal process and Assange can present his case like anyone else.
Comment: @TomLint, ruling 2, 14; the judge accepts that Assange expressed fears of being extradited, but did not find them reasonable. It's not clear to me if that means; the fear isn't a reasonable excuse, or the fear itself isn't reasonable. If the first, makes sense I think - fear of extradition doesn't mean you can break the law. If the later, perhaps they aren't reasonable fears because; Assange didn't give evidence under oath, or the US hasn't started extradition procedures and prosecution maybe [difficult.](http://www.bbc.co.uk/news/world-us-canada-11952817)
Comment: @corsiKa, FWIW, in the ruling I don't believe Assange expressed a fear of being 'whisked off to a black site'. If you are referring to rendition, then in ruling 2, 14 the judge suggests such an event is very unlikely, I would agree given Assange's well known public status.
Comment: @kubanczyk yet see point 57 of the same ruling
Comment: @kubanczyk  I've added some additional extracts regarding the rendering & extradition aspects.
Comment: @benxyzzy I've added some additional extracts regarding the rendering & extradition aspects.
Comment: "*I suspect if one were to ask one of the men incarcerated in Wandsworth Prison whether conditions in the Ecuadorian Embassy were akin to a remand in custody, the prisoner would dispute the Working Group's assertion*" - Can they just nip out onto the balcony for a bit of fresh air when they feel like it? :-)
Comment: @JamesWood I'm not sure I can agree with ruling 2, 14. Past experience indicates there would be no "diplomatic crisis" and likely no consequences for the US should any unlawful things happen. Sadly, the law is near-impossibly flexible when the US are involved.
Answer: They're just following the laws.
In 2010 a European Arrest Warrant was issued for Julian Assange to face charges of sexual assault in Sweden. As a member of the European Union at the time, the United Kingdom was obligated to execute this warrant, and arrest and extradite Assange for trial, unless it was found to be unlawful. He was arrested, and released on bail. Assange appealed the extradition, but failed; it was found to be lawful.
Assange then violated the terms of his bail by fleeing to the Ecuadorian embassy. This is a crime typically resulting in jail time, and this crime was against the UK government itself, not a foreign one. Today, the original charges of sexual assault are not being actively pursued, but the bail violation remains and is not subject to any statute of limitations.
There is nothing unusual about the UK government's actions here that requires political explanation. It would be very unusual if they decided to "move on" and drop charges against a man who is unambiguously guilty (of bail violation) and whose location they know, just because they are not able to physically access him to perform the arrest.
Comment: @MartinArgerami - I suspect that the amount of money spent by the UK government may also be proportional to the amount of media coverage. If they let Assange get away, it sets a widely reported precedent that you can get away with skipping bail. No-one in power wants that!
Comment: "They are *just* following the laws". Do I need to assume that the UK government spends millions to follow every single fugitive?
Comment: @MartinArgerami They probably spend a proportionate amount per unit time that a fugitive is on the run in a location known and observable by police. Assange has pushed that time further than most people, but the application of police policy doesn't seem inconsistent with typical.
Comment: @AndyT Exactly, skipping bail is an extraordinary crime and the very best efforts must be exerted to prevent such a precedent. This is nothing like a minor inconvenience like [a case of child pornography which has left unturned for 30 years and the police can not even *remember* investigating it. Dossier? What dossier?](https://en.wikipedia.org/wiki/Westminster_paedophile_dossier).
Comment: I don't think any charges have been dropped, the Swedish courts just don't do anything actively at the moment (which would be pointless as long as Assange is in the Ecuadorian embassy). If he leaves and gets arrested for jumping jail, these charges are very likely to come back. I can't find details for Sweden, but in many places statute of limitations doesn't apply if you flee from justice.
Comment: @gnasher729 Thanks. Weaseled the wording to stop saying they were dropped.
Comment: Was it really a crime against UK **government**, or more a violation of criminal **law**?
Comment: @Jens crimes in the UK are against the Crown
Answer: To save face. Allowing him to leave after spending millions of Pounds on effectively detaining him would be viewed as a loss by the government. It would also be a sign that people can evade the law and "get away with it", although some would argue that being stuck in the embassy is itself a punishment.
When the government eventually changes it is possible that a different party could allow him to leave in the name of saving money, but even then would likely be criticised for allowing someone wanted for skipping bail to escape justice.
Comment: Comments are not for extended discussion; this conversation has been [moved to chat](https://chat.stackexchange.com/rooms/74279/discussion-on-answer-by-user-why-is-the-british-government-so-determined-to-arre).
Answer: On paper the UK wants him for escaping extradition to Sweden over the two rape charges he got over there. He did this, as you know, by seeking refuge into the Ecuador embassy instead of showing up during his hearing in court. Call it rule of law or saving face as has been done in the two answers so far if you feel like slapping a name on it.
In practice it's murkier.
Assange reportedly suspects there are sealed indictments against him in the US. If that is true, he'd get arrested and extradited to the US the moment he steps out of the embassy. And let's get real, Sessions and Trump aren't exactly friendly to Assange:

Asked whether it was a priority for the justice department to arrest Assange "once and for all", Sessions told a press conference in El Paso, Texas, on Thursday: "We are going to step up our effort and already are stepping up our efforts on all leaks. This is a matter that's gone beyond anything I'm aware of. We have professionals that have been in the security business of the United States for many years that are shocked by the number of leaks and some of them are quite serious."
He added: "So yes, it is a priority. We've already begun to step up our efforts and whenever a case can be made, we will seek to put some people in jail."

It certainly doesn't help that May is courting the US to boot, with an eye on signing some kind of trade agreement with the US after Brexit.
At any rate, the point is that Assange isn't willing to take the risk of stepping out, presumably until he has some kind of guarantee of safe passage to some final destination.
Comment: @JeremyBanks: The question is "Why is the British government so determined to arrest Julian Assange?". Not mentioning what's at stake in the background strikes me as disingenuous at best.
Comment: The question isn't "Why does Assanage want to avoid arrest?", but that's 95% of your answer. The question is "Why does the government want to arrest him?", and the answer is simply "Because that's what they'd do in any situation with a fleeing convict in a known location". Invoking Assange's speculation about what else will happen following his arrest is just an irrelevant tangent when the grounds for arrest are already established in a non-exceptional way.
Comment: This answer explains *why* [this other answer](https://politics.stackexchange.com/a/28334/8460).
Answer: Part of the rule of law, is to ensure that a person complies with the law.
UK law states that if someone is required to attend court, and is allowed to go their own way on the understanding they will attend the court when the case is ready to be heard, but then deliberately avoids doing so, that is an offence - a crime - in its own right. It doesn't matter what they were originally due to attend for or even if that case was dropped, the failure to honour their obligation to attend a court, is itself a new crime, for which they will be heard and judged.
In that sense it's a bit like the kid who steals cookies or takes loose change from their parents' drawer, and then lies about doing so. Not unreasonably even if the cookies were unimportant or the change recovered, the parents may well emphasise that the lying was the really serious thing.
This is similar. Whether he was right or wrong about the Swedish case and US intentions (and I rather suspect he was right, though we may never know), he knowingly committed a separate crime by failing to attend after bail. He did it because he felt overall it would be better to do so, for him.  Nobody is above the law and whether or not he felt his hand to be forced (and whatever one might think of him personally), that was a crime in its own right. To be let off it would send the wrong message.
Morally, if his calculation was that skipping bail was worth it to avoid the US, then he made a calculation that it was worth restricted living in an embassy and breaching his bail (breaking his word to the UK court), to get rid of the perceived/actual risk of a US extradition and life sentence. He now has to honour the cost of what he calculated (or what he should have known would be the cost of it).
For what it's worth, my personal feeling is that candidly, given what he expected/expects to avoid, this is minor and he should just accept it once he feels safe to leave his refuge - it will reflect well on him.
Comment: @GeoffreyBrent In some countries like Mexico, Belgium, Austria and Germany the law has the preposition that people have a right to be free, so evading justice while being not guilty of the charged crime automatically voids any sentence connected with the original charge once being not guilty is established. These countries also established that people have a right to have an urge for freedom and it is the sole responsibility for the government to restrain them, so escaping prison without causing bodily harm or excessive property damage is not punished itself. But as it is the UK...
Comment: I'm reminded of an old Australian case where a prisoner serving time for some offence managed to escape before being recaptured. Subsequently he won an appeal against the conviction for which he had originally been imprisoned - but he stayed in jail, because of crimes relating to the escape attempt. It didn't matter that the original cause of his imprisonment had since been overturned; courts expect that people will go through *legal* channels to seek redress for such things.
Comment: The opposite view isn't that people don't have the right to be free; it is that *even free people* are expected to submit to and respect the law of the land.
Answer: The question seems based on the premise that the UK does not have any reason to arrest Assange other than Assange's / Wikileaks' publishing activities. But Assange was the subject of a European Arrest Warrant, upheld by three UK courts, for allegations of four sexual offences including one of rape, which the UK was obliged to comply with. And now he is accused of absconding from bail (he was on bail pending appeal against and execution of the warrant, when he sought asylum in the embassy). These are things for which an arrest would normally be sought.
Answer: A general answer.  Other answers already dwell on the specific legal mechanics and strategems of prosecution.
Some of the British Government, (and  its ally the US Government), hate Assange and what Wikileaks was able to do, because widespread malfeasance breeds a perverse love of secrecy.  The degree of acrimony seems inversely proportional to the actual merit of a given piece of information's classification:

Had Assange done what the Rosenbergs did, (shared technical secrets about a super-weapon), nobody would be asking a question like this, because the question itself would be absurd.

But most of the leaks are tediously banal, and much of the rest of the leaks tend to imply errors, malfeasance, and corruption petty and larger, neither of which have any good civic reasons to remain secrets.  Those persons exposed and embarrassed wish to draw public attention away from their assorted shames by pretending Assange's deeds are equivalent to sharing technical secrets about a super-weapon.
Comment: Hypothesis: the downvoters believe that verbs such as *"love"* and *"hate"* cannot properly be applied to nations.


Script to copy from fileserver to sharepoint and monitor

Question: I am new at powershell scripting. I am asking for help. I have to create a script to upload folders from a fileserver to sharepoint. The script must monitoring that location( folder). And when a new folder is created ( at the same location on the server) run.
Answer: I am not sure can you hook up to the folder creation event. But what you could do is to have PowerShell set up as windows scheduled tasks. Have an csv file with existing folders to compare. If the comparison shows difference then create new folders and update the csv file. You could set it up in the scheduler to run every few minutes, it won't be real time but close to.
Comment: Thank you for your reply. The task is not about scheduled tasks. I have got the uploading script, but I do not know how to search for new folder.Similar to this one.                                .$cred = (Get-Credential firstname.lastname@example.com)

$sourceFiles = '\\fileshare\users\charles'

$sourcePackage = 'C:\migration\CharlesDocumentsPackage_source'

$targetPackage = 'C:\migration\CharlesDocumentsPackage_target'

$targetWeb = 'https://contoso-my.sharepoint.com/personal/charles_contoso_com'

$targetDocLib = 'Documents'
Comment: I set up a wacher         SET FOLDER TO WATCH
    $watcher = New-Object System.IO.FileSystemWatcher
    $watcher.Path = "filesrevre"
    $watcher.Filter = "*"
    $watcher.EnableRaisingEvents = $true

### DEFINE ACTIONS AFTER AN EVENT IS DETECTED
    $action = { Start-Process powershell -Argument "the script"
              }
### DECIDE WHICH EVENTS SHOULD BE WATCHED
    Register-ObjectEvent $watcher "Created" -Action $action
    while ($true) {sleep 20}
Comment: The point is when someone create a new folder on the fileserver to go automatically to sharepoint. The script should compare/search for new folder


Why does the piston 2 not accelerate faster than piston 1 when piston 1 is pushed?

Question: Let say there are two pistons, $p_1$ and $p_2$ such that $p1$ has lesser area at its base and $p_2$ has larger area at its base. Then, by pascals law(pressure remains same everywhere on surface bounding fluid) we get more force on $p_2$ than applied upon $p_1$. It should mean that acceleration $(p_1)$ $<$ acceleration $(p_2)$ when mass of both is same. But why this doesn't happen as predicted here?
Answer: I guess there is a gravity, acting on pistons?
If yes, the accelerations of pistons really will be different. Small piston will go down, large piston will go up, not only accelerations will be different, but even directions of accelerations will be different.
It would not be quote difficult to calculate actual accelerations in this case, because the system is not static any more.
If the system is stationary (or everything moves very slowly) there must be some other forces acting on pistons. Total of these forces should result in 0 acceleration of each piston.
Comment: You can neglect that gravity kind of thing
Answer: Pascal's Law applies to the initial and final static states of the two pistons.  It is not valid when the fluids are accelerating.
The assumption in the law is that the pressure at any level in the fluid is the same in all directions. For the  fluid to accelerate in the connecting tube (B in the figure) there needs to be a pressure differential along the tube.
Hope this helps.
Comment: Would that pressure be still there in moving fluid? I am thinking if this pressure is applying pressure at my brain and creating confusion
Comment: For the fluid to accelerate, there needs to be pressure difference.
Answer: Assume the pistons are light enough so that the gravity on them can be neglected.
When they are in equilibrium, we can see that the liquid pressure from bottom is equal to the atomsphere pressure from above.
Now, we want both of them to accelerate under the liquid pressure. This can be done by removing the atomsphere pressure or by increasing the liquid pressure (e.g. press the pistons hard and then release them suddenly).
Then, at the releasing point, the pistons would accelerate according to your description. But the acceleration will stop as long as the liquid is no longer pressed.
Therefore I think the described phenomenon could happen, but not very usual to observe. Because it is hard to make a continuous acceleration.
Comment: I'm not sure how do you define the input and output works. If you are meaning the process of pressing p1 to accelerate p2, I would like to notice you that the acceleration of p1 is determined by the difference of external force and liquid pressure. In this case the acceleration of p1 and p2 is not directly related.
Comment: Thanks! I also thought similar to this. F2 is not continuously applied on p2 since the base of p2 looses contact when accelerated more than fluid
Comment: "Therefore I think the described phenomenon could happen, but not very usual to observe. Because it is hard to make a continuous acceleration" - No, I don't think so. Don't you think it would be a failure of law of conservation of energy. You can assume a small time at which you think the p2 is accelerate and in that time interval we will get a violation of law since the output is more
Answer: This is simple
$A_1 v_1 = A_2 v_2$
Differentiating
$A_1 a_1 = A_2 a_2$
So $a_2\lt a_1$ since $A_2 \gt A_1$
Comment: Thiss is not the explanation rather it is a derivation using the fact that V•A must remain same. But the question is about why the acceleration or velocity becomes less in terms of Force acting on them
Comment: Question is " since force on P2 is more than P1 it's acceleration should be more than P1"and I think what I wrote clearly explain why it is not.


django template filter ,use 2 or more filter like pipe

Question: I want to use more than one filter on template like below:
value: {{ record.status|cut:"build:"|add:"5" }}

where record.status would be build:n, 0 < n< 100
but I want to add this value a base value 5.
I tried above code, it only take effect on the first filter,
so I did not get the value plus 5.
Does django only support one filter?
Thanks
Comment: But anyway it is not the right way to do it. What is record? Model instance? Just add another method to it to do the task, write a good docstring for it, and it will be clean and maintainable solution.
Comment: And what does it output?
Comment: if record.status is build:53, it only output 53 but not 58
Comment: Just tested it, works fine for me (for string "build:53").
Comment: sorry,I tried again, it works, I am not sure why I got wrong value yesterday, thanks you all
Answer: First, the answer for your question "Does django only support one filter?" is that
Django does support almost unlimited number of chained filters (depends on your platform and ability to write that number of chained filters of course =) . Take some code for example (not proof but it makes sense), it is actually a template '{{ x|add:1|add:1|...10000 in all...|add:1 }}'
>>> from django.template import *
>>> t = Template('{{ x|'+'|'.join(['add:1']*10000)+' }}')
>>> t.render(Context({'x':0}))
u'10000'

Second, please check the template to ensure that you are using built-in version of cut and add; also check the output value after the cut to ensure it can be coerced to int w/o raising exception.
I've just checked and found that even the Django 0.95 supports this usage:
def add(value, arg):
    "Adds the arg to the value"
    return int(value) + int(arg)

Answer: Chaining filters is supported. If you want to figure why it doesn't work, then what I'd do is:

install ipdb
in django/templates/defaultfilters.py, find "def add", and put "import ipdb; ipdb.set_trace()" at the top of the function
open the page in the browser again, you should be able to follow the execution of the code from the terminal that runs runserver and figure why you're not getting the expected results

An easier way is to make your own template filter. It could look like
from django.template import Library

register = Library()

@register.filter
def cut_and_add(value, cut, add):
    value = value.replace(cut, '')
    value = int(value) + add
    return value

Suppose you saved this in yourapp/templatetags/your_templatetags.py (and that yourapp/templatetags/__init__.py exists - it can be empty). Then you would use it in the template as such:
{% load your_templatetags %}

{{ record.status|cut_and_add:"build:",5 }}

Of course, this is untested, pseudo code. But with a little effort you could get it to work.
Comment: And I think add "will first try to coerce both values to integers". Oh, I not just think, [I know](https://docs.djangoproject.com/en/dev/ref/templates/builtins/#add).
Comment: It *tries*, indeed. I added instruction on how to debug the add filter. I have been myself confronted to this issue but it's been some time since then and I don't remember how I resolved it. So, I think it's possible that it doesn't work as expected for some reason . Thanks for your feedback.


Cisco swtich stacked NTP configure

Question: I have two cisco switches (WS-C3850-12XS-E) stacked by stack cable. I want to configure ntp on them.
How to configure ntp on those about time synchronization?
Comment: Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer.
Answer: You configure a stack as a single switch, not two separate switches. Simply log into the stack and configure NTP:

ntp server ip-address [version number] [key key-id] [source interface-type interface-number] [prefer]

There are other options and configurations for NTP, but the above command will configure the switch stack to use a particular NTP server.
You can refer to Basic System Management Configuration Guide, Cisco IOS XE Release 2, Setting Time and Calendar Services for more information.

Cisco swtich stacked NTP configure


how to detect the origin of a hacker attempting to breach or who has sucesfully breached a network or system

Question: In the case of detecting that a system is infected with a root-kit, what if any thing can be done to trace route the origins of the remote out going packets to attempt to find out where the attacker was logging in from? I ask this question as more of a curiosity and as a wonder how in the professional world a hacker would be caught. I see a lot of articles stating that the attacker has been caught, but what is the procedure?
Answer: As a rule, this is a fruitless endeavor.
It is very uncommon for a hacker to log in from his home IP or from any server directly traceable back to him. It's far more common for hackers to use previously-hacked targets as jump-off points for future attacks. Often attackers will also use other relays (such as IRC bouncers or public IRC networks) to relay commands to infected servers.
You can often trace the attack back to the server from which the attack was launched, but that almost certainly will not belong to the perpetrator. Theoretically you can get the logs from that server and attempt to trace the attack hop-by-hop. But in practice, this never happens. Often the attacks cross political borders making this sort of cooperation effectively impossible. Furthermore, even if you can trace his original IP, it will many times belong to a location not directly traceable to him, such as a coffee shop or an internet cafe.
But if you have the logs, it can be helpful to get the IP address of the last hop primarily because you can then analyze all traffic logs relating to that IP to see how and when the attack happened, and to help you identify additional attack components that you may have missed.
As for how these hackers get caught
Very rarely is the attack actually traced directly back to the perpetrator, as covering your tracks is reasonably simple. Instead, attackers are found by other means. For example: tracking someone bragging about the attack on IRC, analyzing the use of stolen information, identifying the twitter account of someone who took credit for the attack, or plain old snitching by ex-friends or informants.
Comment: +1 for explaining the real reason the feds catch such hackers. This is how a lot of Anonymous / LulzSec members got caught. Their signature taste for the theatrical turns out to be one of their biggest downfalls.
Comment: related link: http://security.stackexchange.com/questions/2231/why-is-it-difficult-to-catch-anonymous-or-lulzsec-groups
Answer: Generally this is not possible without the help of ISP. IP traceback is a name given to any method for reliably determining the origin of a packet on the Internet. Since the source IP address of a packet is not authenticated or most probably proxied. The problem of finding the source of a packet is called the IP traceback problem. IP Traceback is a critical ability for identifying sources of attacks and instituting protection measures for the Internet. There are number of techniques proposed most popular are

Probabilistic packet marking:
probabilistically marking packets as they traverse routers through
the Internet. The router mark the packet with either the router's IP
address or the edges of the path that the packet traversed to reach
the router.
Deterministic packet marking:
This technique attempt to put a single mark on inbound packets at the
point of network ingress. Their idea is to put, with random
probability of .5, the upper or lower half of the IP address of the
ingress interface into the fragment id field of the packet, and then
set a reserve bit indicating which portion of the address is
contained in the fragment field. By using this approach they claim to
be able to obtain 0 false positives with .99 probability after only 7
packets.
Comment: Since TCP connections can't reasonably be spoofed, there's not a whole lot of difficulty in determining which IP the traffic came from. The *real* problem is that even though you can get the IP, that address doesn't usually represent anything useful, since it's generally not the attacker's computer.
Comment: [TCP Session](http://en.wikipedia.org/wiki/Session_hijacking) has been comprised both passively and actively. If source-routing is turned off, the hacker can use blind hijacking, whereby it guesses the responses of the two machines. Thus, the hacker can send a command, but can never see the response. However, a common command would be to set a password allowing access from somewhere else on the net. A hacker can also be "inline" between B and C using a sniffing program to watch the conversation. This is known as a "man-in-the-middle attack".
Comment: Rooting a server is generally a much more involved process than can be reasonably accomplished by blind hijacking, where at best you can insert a single packet, maybe two, into the middle of a perfectly predictable TCP stream -- and certainly something that requires more than just sniffing traffic. So while a limited amount of TCP infiltration is possible, it's not really relevant to this question.
Answer: IP tracing, as others have stated, will not be helpful. What can be helpful is all the other data you can collect, like the code of uploaded files and other actions performed by the attacker.
For instance, I ran a honeypot that captured all downloaded files and keystrokes. From the code in the botnet he installed, the download location of the code, and the passwords he used, I was able to trace the person directly. I had enough information to correlate that I discovered his name, work email and phone number, and his favorite coffee shop in his hometown in Romania (thank you, Facebook).
As smart as he was, he used his full name as a password when he created a new user on my system, used a download location that he set up himself, and he used a pseudonym that he also used on a social networking site that he deleted, but Google had cached.
That's the kind of information law enforcement needs to catch an attacker.


Is there any regular geometrical structure with maximum surface area and minimum volume?

Question: I am interested to know a geometrical structure with  maximum surface area and  minimum volume. According to me double napped cone may have such property as surface area of a cone is $\pi rl +\pi r^2$ and its volume is $\pi r^2h/3$, where $r$=radius of the base of cone, $l$=lateral height of cone, $h$=height of cone.
Comment: Some fractals suggest themselves
Answer: I know one of such structures. It is a plane. :-)
Comment: Yes I m agree with u, but sorry for that I forgot to mention the dimension of the above geometrical structure and actually it should be at least 3-dimensional.
Comment: It seems that this restriction does not change the infimum of volume (0) and the supremum of surface area $(\infty)$, but makes them unattainable by bounded convex bodies. But the volume can be done abitrary large, and, simultaneously, the surface area can be done arbitrary small nonzero, by any sufficiently "flat" and "stetched" body. For instance, by the pyramid with the vertices $(-n,-n,0)$, $(-n,n,0)$, $(n,-n,0)$, $(n,-n,0)$ and $(0,0,1/n)$.
Comment: Thank u for such a beautiful example. As n approaches to infinity volume of the pyramid tends to zero and the surface area approaches to infinity.
Comment: Oops, for the volume zero limit the fifth vertex should be $(0,0,1/(n^3))$ instead of $(0,0,1/n)$.
Comment: Yes actually volume of pyramid is a^2*h/3, if fifth vertex is (0,0,1/n^3) then volume becomes 2/3n.
Answer: look up a Menger Sponge on wikipedia
Comment: Hi, welcome to math.SE. Usually when writing answers here, it's best to add a bit of explanation beyond just "go look here." Even if it's only this much you can also improve it by furnishing the link you are speaking of. You can do this by wrapping the linked text in square brackets and following them immediately with the url wrapped in parentheses.
Comment: Please try to describe as much here as possible in order to make the answer self-contained. As it stands, this is more of a comment than an answer.
Answer: You might want to use a labyrinth (taking a 2D one and giving its walls thickness and height to make it 3D). the more complex it is, the more surface you have, while keeping the volume under control (by limiting the walls' thickness and height).
But the ideal would be a fractal : their surface tends to the infinite while their volume tends to zero.
these are objects that are infinitely fractioned (they have a "broken" aspect in all scales)
examples: Sierpinsky pyramid, menger sponge as user82834 mentioned, fractal trees, Mandelbulb (I'm not sure about the last one though) and many others.
if you want a "regular" geometrical figure, you can limit a fractal to its first iterations, so you won't have any infinities appearing in your calculations.


What's a good color picking webapp?

Question: I'm looking for a decent color picking webapp. Hopefully it's not something that's bloated like a full fledged image editor or color scheme generator.
It should support hex values, and allow you to choose a color with a visual interface.
Answer: I have 2, to recommend; these recommendations came to me from a successful designer and user experience expert.

http://www.colourlovers.com/

... a creative community where people from around the world create
and share colors, palettes and patterns, discuss the latest trends and explore colorful
articles... All in the spirit of love.

and

http://kuler.adobe.com/

... discover Adobe® Kuler™ — the web-hosted application for generating color themes that can inspire any project. No matter what you're creating, with Kuler you can experiment quickly with color variations and browse thousands of themes from the Kuler community.

I have used kuler myself and enjoyed what it outputs and how it works.
Comment: Kuler is the best.. because you have a set of five and you can use thema as a theme :D
Answer: Helps you pick sets of colors:
http://colorschemedesigner.com
Answer: Can you get much simpler than ColorPicker.com?
Answer: I've also had some luck with kuler. Another site I've bookmarked, but never done much with, is http://www.colorotate.org/
Answer: This is one of my favorites: Name that color. Very simple and effective, i've used it heaps.
Answer: a very simple one I use often:
http://html-color-codes.info
Answer: Colr.org
Instead of the usual 'here's a random selection of mixed color puke on a pallet, you can upload an image and it dynamically generates the pallet if colors from the image and floats them on top.
It also has other options like scraping a webpage for a color pallet.
Answer: Check this out:http://www.colourlovers.com/copaso/ColorPaletteSoftware
Answer: I like Visibone - http://www.visibone.com/colorlab
Lost my boomarks in a recent update, or I'd link to the color switcher app I found several years back.
Answer: Colour Schemer is a simple to use and provides a range of colours.

What's a good color picking webapp?


Do the notes of triads created from key signatures stay within that signature

Question: F sharp minor has
F# G# A B C# D E and finally ending on F# again
I know chord progressions follow as
Major minor minor major major minor diminished
But my g# minor triad goes G# B D# but D sharp doesn't exist in the f sharp minor scale so what am i doing wrong?
Comment: "what am I doing wrong": assuming that chords must be built only with notes that are found in the diatonic scale.  In other words, the answer to the question given in the title is "no," but that's too short for an answer.
Answer: Caught out by the fact that there are several different minor scales!
There are the natural, harmonic and melodic minors. And chords are different depending on which is used. In fact, in F♯ minor, the notes are F♯, G♯, A, B, C♯, D, D♯, E, E♯,(yes, E♯, not F), when all three scales are included. So there's your elusive D♯!
D♯ belongs to the rising melodic minor scale in Classical terms; in the melodic minor scale in jazz terms. The scale you referenced is the natural minor.
So - simple answer - NO. The key signature for minor keys is somewhat misleading - only specifically referring to the notes found in the relative natural minor.
Comment: I would note that historically the three types of minor scale were invented after the fact to explain the fact that chords were frequently built using both the minor and major sixths and sevenths above the tonic.  This happened for a number of reasons of which none was "because there are three kinds of minor scale" (because at the time there weren't; they hadn't yet been invented).  The approach of starting with the scale and seeing what chords are available is of limited use.  Still, for someone who is taking that approach, this is the right answer.
Answer: In MAJOR scales:
the major chords are on the 415 notes.
the minor chords are on the 263.
the diminished chord is on the 7.

In (natural) MINOR scales:
the MINOR chords are on the 415 notes.
the diminished chord is on the 2.
the MAJOR chords are on the 637.

Answer: The chord pattern you've described — major, minor, minor, major, major, minor, diminished — applies to major scales. The pattern for (natural) minor scales is minor, diminished, major, minor, minor, major, major.
So, yes, triads within a key signature are built following the key signature, with the exceptions @Tim noted regarding melodic and harmonic minor.
For a complete listing of minor-scale triads given the different types of minor scales, see Triads derived from the different types of minor scales.
Comment: OP listed chords in order using relative major  of A.
Comment: @Tim Yes, I know what OP did. That, I believe, is the mistake. Had OP listed the chords in the "correct" order, it would have been clear that the ii chord should be diminished rather than minor.
Comment: I see where you've answered it from. We both answered, in different ways, I believe. Although I really don't know which 'minor' in the list OP started with, writing it starting with major..  But both G#m and G#o are available.
Comment: @Tim exactly, which is why I referenced both your answer, which makes the multiple availability clear, as well as the linked question, which adds even more explicit detail.
Answer:
Do the notes of triads created from key signatures stay within that signature

Well, exactly as you word it "yes." If you are only using the tones of the key signature to make the triad, the chords will all be within that key signature.
However, if you worded it more like...

Does music with a key signature always use chord created from only the tone of the key signature?

...the answer is "no."
Tones from outside the key signature are called chromatic and are used all the time. Usually chromatic tones are used according to a number of conventions, but that is really a topic to learn more completely through the study of a good, college level harmony textbook.

F sharp minor has F# G# A B C# D E and finally ending on F# again I know chord progressions follow as Major minor minor major major minor diminished But my g# minor triad goes G# B D# but D sharp doesn't exist in the f sharp minor scale so what am i doing wrong?

This... Major minor minor major major minor diminished is the pattern of diatonic triads in a major key.
In a minor key the pattern is... Minor diminished major minor minor major major. I hasten to add that pattern is normally extended with a diminished triad on the leading tone one half step below the tonic and a major triad on the dominant scale degree, among others.
You can play G#m as the chord rooted on G# in the key F# minor if you want, but that chord when diatonic to the key signature of F# minor will be G#dim.


How to install ktechlab?

Question: How to install ktechlab in Ubuntu 11.10?
Comment: It was removed because it relies on old KDE 3.x libraries. see https://bugs.launchpad.net/ubuntu/+bug/727386 - according to that bug you can install the deb package from maverick.
Comment: There used to be a package in Ubuntu repositories, but it's not available for Oneiric.  I wonder why was it removed.
Comment: How about some alternative to it?
Comment: I trid many alternatives , but Did'nt got a perfect replacement
Comment: See if [this](http://en.wikipedia.org/wiki/Comparison_of_EDA_Software) or [this](http://alternativeto.net/software/ktechlab/) could help
Comment: @abcd did you try to install the deb from maverick as Alistair suggested?
Comment: @lumbric The expected behavior would be that it wouldn't install, because it depends on packages that cannot be installed (because they conflict with corresponding `qt4` packages). Still worth a try though.
Answer: Compiling and Installing the latest ktechlab on Ubuntu 11.10+
This will get the latest, KDE4-port-in-progress ktechlab installed on Ubuntu 11.10 (and probably 12.04). Getting it to work may be a different story since I'm not familiar with the software. This assumes you are at the top-level of your home directory:

sudo apt-get install git kdelibs5-dev kdevplatform-dev qt4-dev-tools cmake libglib2.0-dev
mkdir git-ktechlab && cd git-ktechlab
git clone git://github.com/ktechlab/ktechlab.git
cd ktechlab
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=debugfull -DCMAKE_INSTALL_PREFIX=/usr/local/
make
sudo make install
kbuildsycoca4 &> /dev/null
update-mime-database /usr/share/mime

And then run with ktechlab. Note that it segfaults for me when clicking "New" but appears to open existing projects successfully.

Alternately, short of setting up a virtual machine running Lucid, the other option may be to create a Lucid chroot, bind your home directory to it and set the X display appropriately so that ktechlab 0.3.x is running "natively" on your 11.10 display.

Somewhat off-topic: I've never used ktechlab, but have quite a bit of experience with embedded programming, in particular PICs; but most of it was using MPLAB (and a little gpsim) along with the ICD2 (in-circuit debugger) instead of a simulator. Perhaps an ICD might work for your purposes?
Answer: Ubuntu 64bits 12.04
With this script you can solved it:
http://elpuig.xeill.net/Members/rborrell/ktechlab-in-ubuntu
Answer: Since the work of porting ktechlab has been, unfortunately, done in the spare time of the developers, it may be a very long time before we can use it in the latest versions of Ubuntu (Kubuntu, Xubuntu, etc).
However I came across this very interesting "how-to".
It made sense and I am in the process of following the instructions to install lucid
in a chroot jail to run ktechlab.   It explains how you can configure it to set an icon on your desktop and a simple click from 12.04.
The site is in Portuguese, however if you use chromium-browser (and maybe others) you can translate it. Be careful with cut and pasting commands as the English translation of the commands added spaces. Just copy and paste in terminal the original text.
do each step in order.
Here is the site:
Click this link: How-to install ktechlab using chroot for Ubuntu 12.04
There is also a YouTube video here.
Comment: Whilst this may theoretically answer the question, [it would be preferable](http://meta.stackexchange.com/q/8259) to include the essential parts of the answer here, and provide the link for reference.
Answer: For those who like and need elaborations of electronic circuits with simulation of operation to facilitate the development we have again the ktechlab that was stopped for some time in its development, and only now it was released in .tar.xz which is the compressed source code which can be extracted for eventual compilation.

After a setback to put it to work, I ended up compiling, installing and creating a package in .deb format where in my tests it worked perfectly on the Ubuntu 17.04 base of KDu4 and the base Kubuntu 18.04 of KDu5 Alpha4. I believe it will work normally in other Debian-based distros.

Ktechlab Application Reference: https://sourceforge.net/projects/ktechlab/?source=directory
Download reference: https://sourceforge.net/projects/kduxp/files/Pacotes/Eletronica/KtechLab/KtechLab4.0/
Ktechlab packaging 0.40: https://ufpr.dl.sourceforge.net/project/kduxp/Pacotes/Eletronica/KtechLab/KtechLab4.0/KtechLab0.40.1-build_20180303-1_amd64.deb To install, click and install or from the terminal: sudo apt update && sudo apt install -f  && sudo apt install ./KtechLab0.40.1-build_20180303-1_amd64.deb or sudo dpkg -i KtechLab0.40.1-build_20180303-1_amd64.deb
Script for compilation of the source code (warning, from a workbook) Basic dependencies: git libqt4-dev kdelibs5-dev cmake https://ufpr.dl.sourceforge.net/project/kduxp/Pacotes/Eletronica/KtechLab/ KtechLab4.0 / Install-ktechLab-KDu4

How to install ktechlab?


Tips for negotiation from Buddhism

Question: What are the teachings from Pali canon on negotiation in a business or social context? I have read tips such as not to make a false negative attitude on someone's property and acquire it. It is a form of stealing. Or sometimes the buyer will make techniques not to pay the real value. It is also a form of stealing according to Buddhist texts. So my concern is on how to negotiate on things/price such that all the parties involved get happy. I will be really grateful for an answer with some references from Pali Canon or from the teachings of a Buddhist scholar. Thanks in advance.
Answer: In the Sigalovada Sutta the Buddha gives the following advice regarding wealth creation

He who acquires his wealth in harmless ways
like to a bee that honey gathers,
riches mount up for him
like ant hill's rapid growth

So the bee gains from the flower and the flower remains as radiant as ever after the bee has visited. The bee doesn't just buzz off leaving the flower an absolute wreck. From that I would suggest that the important point is that during the negotiation neither party is harmed at the end. Negotiation is a part of business and a part of life that many lay followers must engage in but nevertheless it is an activity that should not cause harm.
As an aside, Bhikkhu Basnagoda Rahula's book The Buddha's teaching on Prosperity gives much more of the Buddhas advice on wealth and wealth creation which you may find interesting.
Comment: Thank you for the perfect answer, I really needed the answer for this, I think I got the core of the verse after your explanation, "neither party is harmed at the end". It's the necessary condition in negotiation. Value for one or more parties may be a contributing factor for an exchange. Thank you again for the clean and perfect answer!

Tips for negotiation from Buddhism


Why should we use quantum mechanics to study solid state physics and not classical mechanics?

Question: I have seen many approaches to studying solid state physics and many of them use quantum mechanics, but why do we use it and not classical mechanics?
Comment: I think you'll find that every single one of the answers to this question amounts to, "because the description in terms of classical mechanics doesn't work," i.e., it doesn't make correct predictions about the behavior of solids, such as its thermal and electrical properties. Can you be more specific with your question?
Comment: Because you need to use quantum mechanics to get solid state physics "right"...
Comment: It depends a lot on the properties that you want to study. Classical molecular dynamics is often used when quantum mechanics is not necessary. On the other hand low temperature behaviours can often make quantum mechanic properties pop right out.
Answer: The gold standard in physics is experiment.  A theory is only useful if it produces results that match experiment within desired limits.
We use quantum mechanics because it produces results which match those of experiment.
Classical mechanics does not reproduce those results so we do not use it.  It predicts qualitative and quantitative results which are simply wrong.  A trivial example is that classical theories do not model the molecular bonding of atoms (or even single atoms) satisfactorily.  It's not that you cannot use classical mechanics at all, it's that classical mechanics fails too often and the models are often very contrived and not consistent.  Quantum theory "covers all the bases".
Answer: It all started classical. Drude made his theory of conductivity, and showed that $\sigma = n e^2\tau/m$, $\tau$ being "characteristic scattering time". What is it? Time is not an intrinsic property of a material. The more proper quantity is the mean free length $\lambda$ which can be thought of as typical distance between scattering centers; then $\tau = \lambda/v$, $v$ being the speed of electrons. But what is it? Drude was thinking of electrons as a sort of classical gas for which we all know how to calculate a typical $v_{typical} \propto \sqrt{T}$. But such temperature behavior was in clear contradiction with what we observe in metals. The worst thing is that even the absolute value is orders of magnitude off. The typical speeds of electrons in metals at room temperatures (as calculated from conductivity) correspond to tens of thousands of Kelvins.
Pauli has solved this riddle by applying his exclusion principle for metals and everything made perfect sense. Landau came later to show how Pauli principle makes sure you can treat electrons as a gas of almost free electrons despite humongous Coulomb repulsion between them. So you see, you have to use QM to have at least crudely sensible understanding of them.
Answer: Quantum mechanics is used to analyze the inner workings not only of solids, but every other phase state, like liquids, gas, plasma and even bose-Einstein condensate. The reason behind is that at the microscopic level (or sometimes at macroscopic as well, as in case of BEC),- classical physics fails to describe behavior of system. For example classical electromagnetism can't explain discrete emission spectrum of elements.
Comment: To name a quantum mechanical description of a phenomenon in solid state physics: The BCS theory of superconductivity.
Answer: Answerers who've said "because that's how you match experimental reality" are right - that is, in the end, the most important test of any physical model.
However, there is also a theoretical answer: for classical mechanics to be a decent approximation, one needs the length scale on which the wavefunction varies to be small compared with the length scale on which the potential varies.  Although the Pauli exclusion principle requires the electrons to stack up (the Fermi liquid) into states with quite small wavelengths, even the shortest-wavelength ones (the Fermi surface) still have a length scale of variation of the wavefunction that's of the same order as, not small compared with, the size of the unit cell of the material.  The potential varies on the length scale of the unit cell (and possibly on some smaller length scales too), so the condition for classical mechanics to be OK is not met.
Answer: Quantum mechanic was motivated (in part) by solid state physics. It is often said that the ultraviolet catastrophe was the main issue with classical physics. But, arguably, the first issue was that of the heat capacity (and equipartition). The black-body started to be a matter of concern, during 1895 I think. But the heat capacity troubled the physicists since 1885...
In classical mechanics, each quadratic degree of freedom of a system contributes to the energy: $\frac{1}{2}kT$. Since the heat capacity is: $$C_v = \frac{\partial E}{\partial T}$$
it's an easy thing to calculate from the energy. Now, in diatomic gases, we have a lot of degree of freedom which are quadratic. The translation energy ($\vec p^2/2m\rightarrow$ 3 degrees of freedom), the rotation ($\vec L^2/2I\rightarrow$ 2 degrees of freedom for the 2 Euler angles) and the vibration (which also accounts for 2 degrees of freedom), in total, this gives:
$$C_v = \frac{3}{2}kT + \frac{2}{2}kT + \frac{2}{2}kT = \frac{7}{2}kT$$
In reality, we measured $C_v\simeq\frac{5}{2}kT$. Smart people like Jeans tried to fix this by modifying the equipartition (he argued that some degrees of freedom would take a large time to equilibrate, like the rotation ones or the vibration ones. Implying that the equipartition wouldn't hold for a "finite time" for every degrees of freedom and that we could omit some of them...).
But the real fix was found by Einstein in his 1907 paper. He showed that  "quantising" the energy of the atoms in a crystal would result in the correct heat capacity (forgetting Fermi, Debye and others which built upon his theory, remarquably, Einstein gave at the end of his paper the issues that had to be solved in order to get a better result, and they were exactly the ones fixed by his contemporary). Basically the vibrating degree of freedom is frozen.  The solid, at ambient temperature doesn't have enough energy to excite the first vibrating energy level. This means that we can, kind off, omit it in the calculation of the energy. Off course, this is an hand waving argument, the real thing is the fully quantum description.
Comment: I'd  interested to know why you choose 1885 for recognition of problems with heat capacity of gases.
Comment: @PhilipWood I can't find a source sorry and I read it a long time ago so maybe it's not even right. We we look at "mainstream" physicist like Kelvin, Jeans or Meyer, they start to talk about it between 1895 and 1900: https://gilles.montambaux.com/files/histoire-physique/Kelvin-1900-Nineteenth%20century%20clouds.pdf Nonetheless, methods allowing precise measurement of the specific capacity were available during the 1880s: https://en.wikisource.org/wiki/1911_Encyclop%C3%A6dia_Britannica/Calorimetry and I think Wüllner was one of the pioneer of this things. But again, I might be mistaken.
Comment: Kelvin starts to understand and question the Boltzmann theory of gases during 1890 (here is an article where he uses it in, in relation with equipartition https://www.jstor.org/stable/115104 ), but he was known to be a conservative. So in order to find the first one to talk about these issues you might want to look at more obscure phycists. But I don't remember the source..
Comment: Many thanks for getting back. I seem to remember my statistical mechanics professor (Cyril Domb) telling us that James Clerk Maxwell (died 1879) had noted the lower-than-expected molar heat capacities.


Library to detect and parse browser information

Question: I have a requirement where I need to store various bits of browser information such as Brand (eg IE, Chrome..), Model (eg IE, Chrome), Browser Version (eg 22.214.171.124),  OS Version (eg Windows 7, OSX, Linux), Flash version info ect.  For mobile detection, I'm using WURFL which uses the user agent string and has great support for mobile devices, but not so much for desktop web browsers.  I'm using the web patch with WURFL, but to make it useful I would have to add my own override patch to provide some of the items listed above.  Is this the best way to do this?  Or has anyone found a library out there more suited to this kind of task.  If WURFL is the best way to do this, is there an updated and maintained web patch that's more comprehensive than the one provided on the WURFL site?
Answer: Based on information received directly from ScientiaMobile the next minor release (estimated at a couple of weeks from the date of this post) of the API will improve the quality of web browser detection and that they are considering including the web patch within the main repository removing the need for a separate patch file.