Concatenate command of an external shell software in python

I had a look in many different answers, but none of them solve my problem.  I'm writing a python script to run an external software (written in fortran and compiled) that thakes itself some arguments.  This is the structure of the folder:  a.out (-> the compiled and running software) zbtest.lst zbtest.bud zbtest.nam   In a normal shell session, when running ./a.out the program starts and ask me in sequence the zbtest.lst, zbtest.bud, zbtest.nam files.  Now, how can I concatenate the command that runs the compiled software and give in sequence the file asked?  Once in the correct directory and after reading many answers, I tried with:  import subprocess subprocess.Popen('./a.out ; zbtest.lst ; zbtest.bud ; zbtest.nam', shell = True)   but it seems that only the first argument is taken (./a.out). The prompt of the software runs well, but it keeps asking me the 3 files listed.  I have no idea how to do that..   Thanks!


MacBook Pro 13" Touch bar permanently blank

I'm on a new 2019 MacBook pro 13”. The TouchID fingerprint sensor is working. But my touch bar has gone completely blank. I tried restarting my MacBook Pro but it did not help.    I've also done a factory reset, SMC, NVRAM/PRAM and an Apple diagnostics, hoping to fix the problem but it did not work.  After re-install macOs, I was able to see touch bar configuration on System Preferences -> Keyboard menu:    I am not able to see touch bar option and it is completely dark black.  I tried resetting the touchbar through the terminal by using the below syntax:   sudo pkill “TouchBarServer” sudo pkill "Touch Bar Agent" sudo pkill ControlStripAgent   I have tried to verify whether they are running by using below command and could not find any process running.   ps -A | grep -i "touch bar agent" ps -A | grep -i "controlstrip”   I can see the control strip and touch bar server is running in activity monitor:      I could see this is a common issues across mac book pro and customer don’t have any proper fix for it.


I made some code that looks like this:  int foo, bar1 = 4, bar2 = 7;  foo = bar1, bar2; // Look at this expression.  printf("%d", foo);   Compiled it with GCC, with -Wall and -Wextra. The output was 4.  Apart from being ugly, is this expression undefined behaviour, or is foo always set to bar1?


Replacing *any string* dynamically with POSIX shell

I'm developing a POSIX compliant script in which I want to do a dynamic replace of strings, something like:  sed "s/${pattern}/${replace}/g"   Problem: if the pattern includes the delimiting character, sed returns error, and I want to be able to use all possible characters.     Attempt (with regex): using a non printable delimiter character:  ( Edited to  syntax)  d=$(printf '\1') sed "s${d}${pattern}${d}${replace}${d}g"   Probably not portable.      Attempt (with regex): if pattern contains a certain delimiter, uses another delimiter  (edited: now in POSIX-WAY):  test "${pattern#*$delim}" != "${pattern}" && delim='@' sed "s${delim}${pattern}${delim}${replace}${delim}g"   Not bad but if the pattern contain both / more @ sed would return error.      Edited Solution (without regex): Following , escaping chars related to regular expressions.  pattern=$(printf '%s\n' "${pattern}" | sed 's:[][\/.^$*]:\\&:g')  replace=$(printf '%s\n' "${replace}" | sed 's:[\/&]:\\&:g;$!s/$/\\/')    Is there a better POSIX compliant solution with or without sed?


am trying to build a basic android application with registration form appears once the application is running, it crashes when i run on the emulator this is my code  onCreate code inside main    protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.signup);         Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);         setSupportActionBar(toolbar);          tv1 = (TextView) findViewById(R.id.textView1);         tv2 = (TextView) findViewById(R.id.textView2);         tv3 = (TextView) findViewById(R.id.textView3);          et1 = (EditText) findViewById(R.id.email);         et2 = (EditText) findViewById(R.id.name);         et3 = (EditText) findViewById(R.id.password);          submit = (Button) findViewById(R.id.register);          submit.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                  String email = et1.getText().toString();                 String name = et2.getText().toString();                 String password = et3.getText().toString();                  //Some code running             }         });   this is the console log  and here is showing that the problem is with the onClockListenr am trying to call  02-05 18:11:46.275 2121-2121/? E/AndroidRuntime: FATAL EXCEPTION: main                                              Process: com.example.mazinalmaskari.twitter, PID: 2121                                              java.lang.RuntimeException: Unable to start activity   ComponentInfo{com.example.mazinalmaskari.twitter/com.example.mazinalmaskari.twitter.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference   Button attribute inside signup.xml file  <Button     android:id="@+id/register"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:layout_marginTop="20dp"     android:layout_marginBottom="30dp"     android:paddingLeft="20dp"     android:paddingRight="20dp"     android:layout_centerHorizontal="true"     android:layout_below="@+id/password"     android:text="Register"     android:textSize="15dp"     android:textColor="@android:color/white"/>   why is the app crashing -_-


New three-tiered badge idea: Explainer →Refiner → Illuminator

The difference between a poor or meh question and a stellar question can often simply be someone understanding it and providing it a great answer. I can't begin to count the number of times I've justified re-opening a question as a moderator by saying:     Look at the answer it got, though. This isn't something we want deleted, this is something we want fixed, because it's obviously valuable. Someone with domain knowledge can easily edit that question based on the answer it received.   This doesn't only apply to borderline-poor or poor questions – sometimes a good edit means the difference between 100 and 10,000 people finding something through typing things into Google. Good titles are hard.   We think we've come up with a way to provide incentive for good, opportunistic edits to happen more often, ideally without questions needing to go through closure or collecting a centimeter of dust before they do. What if we simply rewarded folks that answered and edited questions with a special, relatively difficult to earn badge?  Let's say that you answer something, and:   You edit the question 12 hours before or after answering it. This allows you to edit now, answer later — or answer now and edit later, when you have the time. Your edit isn't rolled back, or outright rejected if it was a suggested edit The question is not closed for any reason, even simply being a duplicate Your answer has a score of 1 or higher   … then you've done something that we probably want to recognize. You understood something, you provided the knowledge that you have, and then you provided an edit to make sure that more people in need of this knowledge can find it, while raising the overall quality of the site.  Here's the proposed tiers for the badge (within the above stated criteria):   Explainer (Bronze): Answered & edited 10  questions Refiner (Silver): Answered & edited 50 questions Illuminator (Gold): Answered & edited 500 questions   We think this is going to be pretty hard to game. You can't go leaving streaks of terse snark all over the place on questions you know are going to be closed anyway, and junk edits aren't going to fly.  We're talking about rewarding folks that take a tiny bit more time out of their day just to write a more descriptive title so that folks can find the awesome answer that they wrote. Just doing that alone can make a big difference. Sure, it's a tad hard to get at the gold level, but it's supposed to be. If you routinely edit questions that you answer and have done so for some time, you'd probably get it the day we roll it out.  While this is technically something that we came up with on the quality initiative ( | ) — this badge could be earned on all of our sites.  What do you think? What did we miss? What could be better about the idea?


How do you earn opportunites to review journals or conference papers?

Critical reading is a very useful skill for most PhD students (and postdocs and researchers in general).  Instead of assuming that everything you read in a scientific paper is right, it's useful to learn how to evaluate the paper critically: e.g., to question its content, to identify shortcomings and limitations and ways it could be improved.  Experience with reviewing papers is a powerful way to gain experience at critical reading of papers. Writing reviews for journals and/or conference helps a PhD student learn to get better at reading a paper with a critical perspective.  Unfortunately, review opportunities for PhD students are rare.  For instance, it is rare for PhD students to be invited to serve on program committees or asked to review papers. In addition, some may think that PhD students are not competent enough to write correct reviews of scientific papers.  How does one solve this problem?  How can a PhD student get opportunities to practice reviewing papers?  What would you suggest to a PhD student who wants to do some reviews?


Sum with binomial coefficients: $\sum_{k=0}^{n}{2n\choose 2k}$

I'm repeating material for test and I came across the example that I can not do. How to calculate this sum: $\displaystyle\sum_{k=0}^{n}{2n\choose 2k}$?


Why Multiple Inheritance is discouraged in c++? And as we all know java doesn't support Multiple inheritance. Why is that?


He's been here quite a couple of times.   Would this be a natural thing to say?  How many times would you say that "quite a couple of times" are? (I know there's no precise answer to it)


Suppose that $Y\subset X$ are connected spaces and suppose that $A$ and $B$ are separation of $X-Y$. Prove that the union $Y\cup A$ is connected.  I want to prove by contradiction.Firstly I assume there exists a separation of $Y\cup A$,say $C\cup D$ .Then since $Y$ is connected,then $Y$ must belong to $C$ or $D$. Whithout loss of generality,we can suppose $Y\subset C$.I guess $C\cup B$ and $D\cup A$　should be the separation of $X$.But I don't know how to prove it in formal mathematics.


I'm talking with someone and I want to know what they think about a specific topic (which was discussed priviously), which of the following should I use:   What are your thoughts on that   or   What are your thoughts on this


When a color LCD/LED display is off it is black, when on it is colored. What color to light is an LCD/LED display

When a modern display using pixels is turned on its colors are different than the black that the screen is actually made up of. When put in light, such as sunlight, does the screen react to the color that the screen is currently displaying or to the actual black pixels it's made up of. That is to say does it heat up as a uniform black object, or if the screen is  displaying white will it heat up slower reflecting the fact that the screen is displaying white (or any other color for that matter).


How did Snape end up becoming the servant of Lord Voldemort in the very beginning?

I am not very much into the Harry Potter books but have watched every part of the movies like a hundred times and couldn't find how Snape ended up becoming the servant of the Dark Lord for the very first time.


I study Economics and this is a statistic problem I am trying to solve - without great success, unfortunately.   "A machine has a defect rate of 6%. a) Chosen at random 4 pieces (with replacement) from the production flow, compute the probability that none is defective.  b) In the event that extractions are performed 60, compute the probability that there is at least one defective part"   I have no idea how to answer the first question. What logical processes can I use?  Regarding the second question, I thought of using the binomial random variable with n = 60 and p = 0.06.  Then: P (X> = 1) = 1 - P (X <1) = 1 - P (X = 0) = 1 - [(binomial coefficient 60 and 0) * (0.06) ^ 0 * (0.94) ^ 60 = 1 - 0.02446 = 0.97558   Can somebody show me how to do it and explain the logical process behind it? Thank you.


Hyperref Link Spans a Pagebreak, Looks Ugly

I'm using hyperref for links in pdflatex and I have the following problem: when a bibliography citation spans across a page-break (which usually occurs with long author names), then an additional green link frame is visible at the footer and the link links the whole header of the following page.  Code (with the list of all packages I'm using):  \documentclass[a4paper,12pt,oneside]{book}  \synctex=1 % synchronize with texmaker  \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc} \usepackage[left=3.5cm, right=2cm, top=3.5cm, bottom=2.5cm]{geometry} % sizes \usepackage{newcent}  % font, Century Schoolbook \usepackage{graphicx} % include graphics \usepackage{setspace} % control line spacing \usepackage{amssymb}  % math \usepackage{amsmath}  % math \usepackage{amsthm}   % theorems \usepackage{cite}     % numeric citations \usepackage{epigraph} % quotations \usepackage{booktabs} % nice looking tables \usepackage{url}      % recognize urls \usepackage{hyperref} % links in PDF \usepackage{enumitem} % enhanced enumerations \usepackage{fancyhdr} % fancy headers and footers \usepackage{color}    % allow colors \usepackage{pdfpages} % include assignment PDFs \usepackage{texshade} % sequence alignments   \usepackage{lipsum} % just for the sake of this example  \fancyhead{} \fancyhead[LO]{\nouppercase{\textsc{\leftmark}}} \fancyhead[RO]{\nouppercase{\textsc{\thepage}}} \fancyfoot{} \setlength{\headheight}{15pt}  \begin{document}  \onehalfspacing \mainmatter \pagestyle{fancy}  \chapter{An Example Chapter}  \lipsum Stuff stuff stuff stuff stuff stuff Stuff stuff stuff stuff stuff stuff Stuff stuff stuff \cite{reference} Stuff stuff stuff stuff stuff stuff Stuff stuff stuff stuff stuff stuff Stuff stuff stuff  \bibliographystyle{apalike} \bibliography{references}  \end{document}   BibTeX file references.bib:  @Article{reference,    Author="LongSurnameOfTheFirstAuthor, D.  and LongSurnameOfTheSecondAuthor, R. ",    Title="Example text",    Journal="Journal of example articles",    Year="2004",    Volume="21",    Number="12",    Pages="2326--2339",    Month="Dec",    Note={[DOI:\href{http://www.example.com}{example}]} }   Output:    How can I get rid of this?  I'm using pdfTeX 3.1415926-1.40.10-2.2 (TeX Live 2009/Debian) and BibTeX 0.99c (TeX Live 2009/Debian).


I've been messing around with Unity and broke something, how do I "start over"?


Prove that if for every $x \in \mathbb{R}^N$ $Ax=Bx$ then $A=B$

How can I quickly prove that if for every $x \in \mathbb{R}^N$ $$Ax=Bx$$ then $A=B$ ? Where $A,B\in \mathbb{R}^{N\times N}$. Normally I would multiply both sides by inverse of $x$, however vectors have no inverse, so I am not sure how to prove it.


Finite ring extension and number of maximal ideals

I want to understand why the following is true:     Let $S \subseteq R$ be commutative rings with $1$ and assume that $R$ is finitely generated as an $S$-module by at most $k$ elements. For every maximal ideal $M$ of $S$ there are at most $k$ maximal ideals of $R$ lying over $M$.   So let $T$ be a maximal ideal of $R$ lying over $M$ then $T \cap S = M$. Now it can be shown that $R/T$ is a finitely generated $S/M$-module. Hence $R/T$ is Artinian and thus it has finitely many maximal ideals. From here I have two questions:  1) Why from this follows that there can be only finitely many $T$ lying over $M$? I suspect they are using some correspondence which I don't see.  2) Why exactly at most $k$ ?  Can you please explain?


I wounder to know what is the basic idea of field theory? Field theory wants to concern what aspects, and formulate what problems in nature?


I'm using on Windows machine:  plink -C -L 3333:<internal-server-ip>:80 -N -i keyfile.ppk <user>@<mydomain>  where <mydomain> is an ubuntu 14.04.2 LTS with SSH and keyfile-only remote logins.  I noticed that I can actually port forward to anything behind the NAT on my network through <mydomain> server. I need a guide on how to limit this possibility in such a way, that <user> would be able to port forward only to specific <internal-server-ip> or group thereof?


What kind of game is Flappy Bird/Swing Copters?

The games  and , both created by Dong Ngyuyen, have very similar play mechanics.  Both require the player to navigate a character through gaps in walls, and require very little else, scoring mainly by how far the player can go before an inevitable crash as the player character automatically scrolls through the game.  Other games have similar game mechanics:  is a similar game, and other short ios and flash games follow a similar style of play - seeing how long a player can persevere in a level that automatically scrolls.  What is the name or genre for this type of wall-avoiding game that seems so prolific in short ios/flash games like these?


With the package anyfontsize I can use the command \fontsize{}{}. But the second argument seems to be without any effect. I read  that it is related to the line space. It doesn't work.  \documentclass{article} \usepackage{anyfontsize} \begin{document}  {\fontsize{1cm}{1cm}\selectfont First test : I need to put some text here.}  \bigskip  {\fontsize{1cm}{2cm}\selectfont Second test : I need to put some text here --- does it work?}  \end{document}     Any clue?


I'm a beginner at photography and own a Canon 20D with two lens; a 50mm prime and a 17mm-85mm zoom.  I've purchases all my filters at 67mm to fit my zoom lens and use a  to use them with my prime lens.  I'm looking at buying a . My question is, will the same principal work? Can I buy a 67mm wide angle lens and use it on my 52mm prime without any trouble.  One of the reasons for the purchase of a wide angle is my cropped sensor makes the 50mm prime rather close - I'm hoping the wide angle will make it easier to capture more.  Many thanks for any help in advance. Pete


Yours or you... which pronoun should be used here?

"Happiness is.. Having friends with the same mental disorders as yours."  I was just wondering if this sentace is grammatical or should it be "you" at the end?  Either way; it's very funny!  Thanks


My name includes space - How do I enter my username when typing command?

My username in Minecraft is sun solar arrow. This name includes spaces. Situation - When I want to get OP privilege, a user who has OP privilege will enter: /op sun solar arrow  But my username includes spaces. So it shows an error message:  Invaild syntax  How do I enter my username?


VSE playback frame rate drops down with effects

Am learning Blender for video editing and having a great time with it (brain hurts a bit, though).   Have added the gamma cross effect to a project and it is all working beautifully, except ... as the fade in happens using the gamma cross, the frame rate drops to 25fps. The project is in 50fps.   All worked fine with no dropped frames at 50fps prior to adding the effect.   On Xubuntu-core 15.10 and Blender 2.74. GTX 970, 16Gb RAM and i7 6700.  TIA and just ask if any further info required.


Could a Homorphus Charm Change a Werewolf Back Into a Human Before the Moon Cycle Ends?

‘Nice loud howl, Harry – exactly – and then, if you’ll believe it, I pounced – like this – slammed [the werewolf] to the floor – thus – with one hand, I managed to hold him down – with my other, I put my wand to his throat – I then screwed up my remaining strength and performed the immensely complex Homorphus Charm – he let out a piteous moan – go on, Harry – higher than that – good – the fur vanished – the fangs shrank – and he turned back into a man. Simple, yet effective – and another village will remember me forever as the hero who delivered them from the monthly terror of werewolf attacks.’   Gilderoy Lockhart - Chamber of Secrets - chapter 10 - The Rogue Bludger   Yeah, yeah. I know: consider the source! We all know Gilderoy Lockhart is a fake and a fraud in that he took credit for other heroic wizards' work. However, it occurred to me that in order to sell his books, he would have had to have written accurate and real spells and charms and potions, etc, into the books, or else everyone would have known right away that he was a turkey.   So is it possible there's an actual Homorphus Charm that will change a werewolf back into a human before the werewolf's moon cycle is over? If so, why on earth would they not have used it on Remus Lupin (for Lupin's safety) or Fenrir Greyback (for the community's safety)?


What is your interpretation of Laplace operator? When evaluating Laplacian of some scalar field at a given point one can get a value. What does this value tell us about the field or it's behaviour in the given spot?  I can grasp the meaning of gradient and divergence. But viewing Laplace operator as divergence of gradient gives me interpretation "sources of gradient" which to be honest doesn't make sense to me.  It seems a bit easier to interpret Laplacian in certain physical situations or to interpret Laplace's equation, that might be a good place to start. Or misleading. I seek an interpretation that would be as universal as gradients interpretation seems to me - applicable, correct and understandable on any scalar field.


Terminal command to bring up shutdown dialog?

I know how to shutdown a Mac from Terminal, but is there a way to actually bring up the shutdown dialog you get from Apple → Shut Down…?


Proof for recurrence relation of laguerre polynomials

How can I prove the following recurrence relation for Laguerre polynomials. $$ (n+1)L_{n+1}(x)=(2n+1-x)L_n(x)-nL_{n-1}(x) $$ please help me. thanks


So I have some data that would be obvious to be used in a boxplot. However, I tend to think boxplots are quite boring, and not very drawing - visualization wise at least.  So basically my data would follow the same idea as:    So I just wanted to ask if there were a more beautiful way of presenting data as this without using boxplots. Again, something that draws the reader a bit more.


JavaScript events does not seem to work for newly created elements

var post = '

';  post = post + '
<a class="a_unames" href="#" usr_data[1] + '';  post = post + 'Delete this post<input type="hidden" value="'+ result[1] + '"/>

';  p_type.after(post); // append the post here using jquery    What I did is, when user posts some data, I don't want the entire page to refresh. So I have sent the data to server using ajax request and also appended the post contents to the page, using jQuery. But the event:  $("span.bu_delpost").click(function(){ // see 3rd line, span class='bu_delpost'     var d_postid =  $(this).find("input").val();    var p_type = $("#inp_type").val();      $.post("ajax/ajx_dpost.php",{d_post:d_postid,type:p_type},function(result){                alert(result)                 });  });   does not seem to work for appended posts but it seems to work for the posts which are loaded at the beginning from the database.  Why does this event does not work for the newly added span element? However CSS properties seems to work for this newly added elements but not the JavaScript events.  Note: The JavaScript events are written in jquery.posts.js file and are included to the html file using


Will older Adobe Applications (CS5/CS6) work with Mojave?

I have some Adobe applications that I use for occasional work (Photoshop, Illustrator, Lightroom, Acrobat).  These are the versions prior to the CC version (Creative Cloud) and they work on El Capitan through High Sierra.  I don't do enough graphics work justify the cost of a monthly CC license and these older version have been more than enough for what I want to do.  Now, with the new Metal framework of Mojave, will the Adobe Apps continue to function?  Contacting Adobe results in a support call that (magically) turns into a sales call for CC.  Has anyone tested Adobe CS5 or 6 products on Mojave beta as of yet and if so, what were the results?


How is the taxable value of a goat determined?

I was reading an  over on Law.SE, and it made me wonder about how the IRS calculates tax on barter transactions.  Lets say that I do a job in January, and get paid for my work with 20 goats and when I received the payment, goats were worth about $100 each.  Later that year, in October, I do another job of about the same value, but this time I get paid with 5 goats.  The goat market has gone absolutely crazy and they are now worth about $400 a head.  In December, the goat bubble officially popped, and they're down to $20 each.  I didn't earn any goats in December, but this market downturn might be important.  So, for the year, my taxable income was 25 goats.  How would I, or more importantly, how would the IRS allow me to calculate taxes on my earnings?  Would I have to prove the market value of the goat when I received payment?  Can I claim that I only earned 25 * $20 since that's what the goats are worth now?  Note:  Assume that this small income is taxable as if I just made $50k/year.  I realize that with such a small earning taxes wouldn't normally be due and I'd be living in poverty with my goats, but that's not a part of my question.


Biblatex Error: Missing \begin{document}

I am trying to add a bibliograph to my document but I keep encountering the same error. My mwe is:  \documentclass{article} \usepackage{biblatex} \addbibresource{refs.bib} \begin{document} \cite{Lettenmeier.2017} \end{document}   And I get the following error:  ! LaTeX Error: Missing \begin{document}.  See the LaTeX manual or LaTeX Companion for explanation. Type  H <return>  for immediate help.  ...                                                l.3776   australian,newzealand}  ?   I checked the biblatex.sty and the lite it refers to is:  \DeclareCaseLangs{%   american,british,canadian,   english,USenglish,UKenglish,   australian,newzealand}   I already tried adding the babel package:  \usepackage[american]{babel}   But I get the same error. Does anyone have a clue what I might be doing wrong?  My refs.bib file looks like:  @article{Lettenmeier.2017,  author = {Lettenmeier, P. and Kolb, S. and Sata, N. and Fallisch, A. and Zielke, L. and Thiele, S. and Gago, A. S. and Friedrich, K. A.},  year = {2017},  title = {{Comprehensive investigation of novel pore-graded gas diffusion layers for high-performance and cost-effective proton exchange membrane electrolyzers}},  pages = {2521--2533},  volume = {10},  number = {12},  issn = {1754-5692},  journal = {{Energy {\&} Environmental Science}},  doi = {\url{10.1039/C7EE01240C}} }   Cheers.


If $f\in H^2(\mathbb R^2)$, I want to show that   $||f||_{L^\infty}\le c||f||_{H^1} [1+\ln(1+||f||_{H^2})]$  How can I get the "ln"? and how can I make it into a product of $H^1$ and $H^2$ norm?  It is actually one of my Real variables's project. So how can I do this inequality in an relativly "elementary" way?


I need to prove that for every integer $a>0$ there is a unique representation $a=r*s^2$ where $r$ is not dividable by any square:  there is no $d>1$ such that $d^2|r$  What I tried is to show a as a unique multiplication of primes and then show the case that a is odd or not, but didn't get anywhere.. any help will be appriciated


I believe the purpose of a tuning fork is to produce a single pure frequency of vibration.  How do two coupled vibrating prongs isolate a single frequency?  Is it possible to produce the same effect using only 1 prong?  Can a single prong not generate a pure frequency?  Does the addition of more prongs produce a "more pure" frequency?  The two prong system only supports a single standing wave mode, why is that?


Are there any consumer-grade waterproofing solutions?

Is there a common solution to protecting electronics from water by coating conductors in dielectric material?  I figured you could just cover everything in thin layer of hot glue, but there might be a more added mass -effective way, like spraying hot silicone on the electronics.  I heard a few years back some company in the US provided a service of coating Iphone insides with a silicone spray or something, which made them water resistant to some extent. I don't live there, so I didn't have a chance to try it myself, though. Anyway, this is a service, and I'm looking for something I could apply myself.  I don't visit home depot nearly often enough to keep up with the technological advancements, so maybe I just missed it.


First of all I'm reposting this question as at the previous one I haven't got the   satisfactory answer. The problem is : If $G$ be a group and $H, K\le G$.  $\mid G:H\mid$ and $\mid G:K\mid$ are co-prime.Show that $G=HK$.  My attempt to to prove this : First considering a map $\phi :L_1\rightarrow L_2×L_3$ where $L_1, L_2$ and $L_3$ are left cosets of $H\cap K, H$ and $K$ respectively. Now ,just proving that this map is injective and will be surjective iff $G=HK$shows that $\mid G:H\cap K\mid=\mid G:H\mid \mid G:K\mid$. Now the result $lcm(\mid G:H\mid,\mid G:K\mid)\le \mid G:H\cap K\mid \le \mid G:H\mid \mid G:K\mid$ implies the required result.But my question is how to prove the required result without going through the mapping part.I have posted the result previously, but haven't got the satisfactory answer.Please help me to prove this.


I have this question here:  I chose 500 then before accepting decided that was too much and halfed it, but now I just want the answer so I'd like to raise it to 500 but I can't find how to it. Also it's just such an irritating problem that I'd give all my rep away if I could to the clever person who has the answer. It would be nice to have a few minutes after creating the bounty to be able to raise it. But for now could a mod or something please raise it for me to 500.


Thats my . I loaded this to PostgreSQL DB using PostGIS shape file loader. I ran pgr_anlayzeGraph() on it and found it had a lot of isolated segments.  Next I ran pgr_nodeNetwork() to create a new table 'ways_ways'. I made the topology  for it and ran the following query in Qgis sql window.   SELECT * FROM ways_ways JOIN (SELECT seq, id1 AS node, id2 AS edge, cost FROM  pgr_astar('SELECT id, source, target, cost, x1, y1, x2, y2 FROM ways_ways',  1, 108, false, false) )AS route ON ways_ways.id = route.node;   Given below are the screenshots: Original floorplan and the prescribed route  query ouput   Clearly , I don't have a continuous output. I ran pgr_analyseGraph on ways_ways to find that it has no more isolated segments . It has 51 deadends, which is acceptable.   Did I miss any step in pgrouting? Is there anyway to see which node has id 1 and id 108 in qgis?  i ran the same query in another map(which i downloaded) and got output for all possible source and target ids. So how can i create a way(a route) that is completely noded?


What is the chronological order of all the FNAF games (and book)?

Basically, I'm trying to find out the correct order of the FNAF games, including the book, which seems to be the last.  Since there are five games out now, a lot of timelines are obsolete and don't include the FNAF Silver Eyes book.


Suppose a pin can be set to three modes, high (5V), low (0V), and high impedance (?V). What is the voltage associated with high impedance? I.e. if I stuck a probe on a pin set to high impedance, what voltage would I read?  Does high impedance mean no current? If so, does that mean voltage measured would be 0 because of V=IR? If so, how would you differentiate high impedance and logic level low?


Outputting a result from a blank JTextField

I have an issue with Java interface. How can I make a JTextfield that is left blank return an integer result, as a default? I have tried doing it like this:  if ( txtDescuentoCI.getText( ) == "" )         return 0;     else         return Integer.parseInt( txtDescuentoCI.getText( ) );   It won't work, though. Any ideas?


How do I install, update and remove GNOME Shell Extensions?

I am running Ubuntu GNOME and would like to know how exactly I can install, uninstall, upgrade, deactivate, and activate GNOME Shell Extensions.


Distribution of the magnitude of samples from the multivariate gaussian distribution

Let $\mathbf{X}\sim \mathcal{N}(0,I)$ be an $n-$dimensional standard Gaussian vector. We know that  $$\begin{align} ||\mathbf{X}||^2&=\sum_{i=1}^nX_i^2\sim\chi^2_n\\ ||\mathbf{X}||&=\sqrt{\sum_{i=1}^nX_i^2}\sim\chi_n\\ \end{align}$$  Suppose the components are correlated, i.e., we consider $\mathbf{Y}\sim \mathcal{N}(0,\Sigma)$ where $\Sigma$ is positive definite. We know that $||\mathbf{Y}||^2$ has the . Is there also a corresponding generalized chi distribution for $||\mathbf{Y}||$? If so, is there some asymptotic result on the mean of such a distribution for $n\to\infty$? This is related to       But here the components of the random vector are neither independent or identically distributed.


Shape of tank for which water level falls at constant velocity

Greeting, I am working on a problem that involves optimizing the shape of a tank so that the level drops at a constant rate.  Problem and my attempt  Working on the problem, here is what I know. There is an axially symmetrical tank whose wall shape is given by $f(z) = R(\frac{z}{H})^n$ which is shown in the figure. The spigot of the tank has cross-sectional area, a and there is no vena contracta. What I need to do is find $n$ so I can satisfy these conditions.   Here is what I have done so far to start on the problem. I am assuming that the area where the spigot is in the tank will not have any significant effects on the total volume of the tank if I integrate.  Doing a mass balance on the tank I get that    $In-out+Generation = Accumulation$ where $Generation; In = 0$  $-\rho Q_{out}=\frac{\rho dV}{dT}$ as a consequence of the mass balance. And since density is constant $-Q_{out}=\frac{dV}{dT}$ To get $Q_{out}$ use the fact that $u_2a = Q_{out}$ Using Bernoulli's Equation to get an expression for $u_2$. Between 1 and 2 I get $\frac{u_1^2}2+gz_1+\frac{P_1}{\rho}=\frac{u_2^2}2+gz_2+\frac{P_2}{\rho}$  Using the relation that $P_1=P_2=P_{atm}$ (4) can be simplified to $\frac{u_1^2}2+gz_1+=\frac{u_2^2}2+gz_2$ and saying that $u_1 = \frac{dz}{dt}$ I now have $\frac{\frac{dz}{dt}^2}2+gz_1+=\frac{u_2^2}2+gz_2$ Solving (5) for $u_2$ I get that $u_2 = \frac{dz}{dt} + \sqrt{2g(z_1-z_2)}$    My issue  This is where I start to run into issues relating what I know. I know that $\frac{dz}{dt} = constant$ and I know that I need to solve for $n$ in the $f(z)$ function. I am guess that do solve equation (2) for the volume of the tank which is $a_t\frac{dz}{dt}$. I assume since $\frac{dz}{dt}$ is present on both sides it will cancel out. Why does the rate of the flow even matter though? Why is it not valid just to say that the velocity of the water in the tank will be irrelevant in comparison to the velocity coming out of the spigot? Typically that is a valid assumption, or am I in correct in that?   And one small struggle is getting the area of the tank by just knowing $f(z)$. It has been a while since I've done calculus. The first thought in my mind is a solid of revolution. I think that $f(z)$ is a function that relates z and radius so $r = f(z) = R(\frac{z}{H})^n$ and if so, would I be doing $V = \int_a^b \pi r^2 dz$ which is $ V = \int_a^b \pi R(\frac{z}{H})^n dz$? This integral seems very difficult to calculate though and leads me to believe that I have done something wrong. Any push in the right direction would be greatly appreciated!


configure DNS to access local servers using public address

I have a domain and DNS server set up using Windows Server 2012 R2. The local domain is a subdomain of my public one, and I have a forward lookup zone configured for it in my DNS server.  i.e.   local: lan.publicdomainname.com public: publicdomainname.com   The DNS records for publicdomainname.com are stored with the public DNS on the registrar. (godaddy in this case). lan.publicdomainname.com is not stored with that DNS server.  I have several local servers that are listed on the public DNS as subdomains.   for eample:   server1.publicdomainname.com server2.publicdomainname.com   These can be accessed using those URLs from outside the local network just fine, but don't work while connected to the LAN.   Should I be adding a new Forward Lookup Zone to my internal DNS server named publicdomainename.com?  edit:  Seems like I should either be using hairpin NAT or split DNS. From what I understand a hairpin NAT causes extra processing to be done on the router for local traffic, and a split DNS requires an extra set of records to manage. for just 3 or 4 servers, which methods is better? Are there canonical guides to set each of these up? (on Windows 2012 and tomato/linux router respectively)


How to extract elevation data from ASTER/SRTM?

I just want to know if there are any other tools available in QGIS apart from the Point Sampling tool to extract elevation data from ASTER/SRTM/CartoDEM (for India) data? When I convert these images to XYZ, I can see 1 to 2m differences in certain points with respect to the Point Sampling tool results. More over, the results obtained through point sampling are integers, not decimals like that of the extracted XYZ.


Is the speed of sound modelled by a linear equation?

A cannonball is launched from a point 100 m above ground, at a speed of 20 m/s. This is modelled by the equation $h(t)=-4.9t^2 +20t +100$ The speed of sound (of the cannonball is) 380m/s If a person sitting directly underneath the cannonball runs as soon as they hear the sound do they escape the cannon? My main question is "$y=-380x+100$" the correct equation to model the cannon's sound?


Group Policy: Block access to \\localhost\C$

We have a restricted Windows 7 computer that hides and prevents non-admin users from accessing the C Drive using the following policies:       However, they are able to circumvent this by typing the following into Explorer: \\localhost\C$  How can I disable this path but allow other UNC paths. For example they are allowed to access a shared folder on a different computer. eg. \\192.168.2.1\SharedTransfer  Note: Simply Enabling the Group Policy: Remove Run menu from Start Menu will not work as this blocks all UNC paths.  Update  The user, called Site User, is not a member of the Administrator group directly or indirectly. It is only a member of the group Users.  Accessed the following from: Control Panel\All Control Panel Items\Administrative Tools\Computer Management (Local) > System Tools > Local Users and Groups   Local Users and Groups  - Groups       - Administators              - Administrator              - Service User (our admin user)       - Users              - NT AUTHORITY\Auntenticated Users (S-1-5-11)              - NT AUTHORITY\INTERACTIVE (S-1-5-4)              - Site User (user account in question)


Windows 10 memory leak after update [Wfpn / ntoskrnl.exe]

Notice: I have already read  and followed the steps in it, but I can't figure out what is causing the leak. What I'm looking for here is help in singling out the problem.  As you can see from the title of the question I've encountered a memory leak in Windows 10 after the latest update (Creator's Update I believe). The first thing I did was open the task manager, where I've noticed unpaged memory taking up about 13GB of RAM.   I went through the Poolmon/Pooltag/findstr process only to get garbage on the cmd   I then tried to use Xperf to find out what was happening, but I'm still unsure as to what I'm looking at. The root cause seems to be the kernel image, and I find that hard to believe. Here's the output of Xperf as seen in WPA:   I've had a similar problem in the past on Windows 10 that was caused by Killer Networking drivers, but this time around that doesn't seem to be the culpript.   If anyone is able to help me out it would be greatly appreciated!  EDIT: I state in the first paragraph that this question is different from the one being suggested by the mod (I even link that very question). I had already taken all the steps in the answer to that question and still couldn't track down which driver was causing the issue, hence I was asking for users to help me find which one was the problematic one.


How can I do this using Gradient Tool in illustrator?

I want to do that using gradient tool but things eventually go wrong< so what should I do ?


If eggs were left out of the fridge a few hours can they still be used as long as they are cooked thoroughy?

I don't usually have food delivered. However due to circumstances my eggs were delivered to my home and I have no idea how long they were sitting in the car as the driver had multiple stops I assume.  It was somewhere between one and three hours I assume. The FDA says 2 hours out of the fridge tops. If it turns out it was three hours then as long as they are thoroughly cooked are they safe to eat?


Are there other grammatical ways to say, "I'm reading a novel of Steinbeck's"?

I would like to ask why the following sentence is only possible according to grammatical rules:     I'm reading a novel of Steinbeck's   What's wrong with "I'm reading a novel of Steinbeck" or "I'm reading Steinbeck's novel"?


Using GParted to remove windows partition

I'm currently dual-booting to either Ubuntu 10.10 or Windows XP. However, I rarely use windows and would like to remove it.  I've use the Ubuntu live CD to access GParted. I've also deleted the windows partitions (I think), which were labeled both ntfs and fat32.  I'm just not sure how to extend the Ubuntu partition to cover the unallocated space. Furthermore, how do I deal with the 'key' designations, which state that a partition is busy.  Help!


Is it "what are the differences or what's the difference" when we compare three things? I am wondering if we can use the singular in the situation when we compare 3 things instead of 2 as we normally do.     What's the difference between this, that and that other thing?      What are the differences between this, that and that other thing?


Would be possible to use Ubuntu Phone with Nokia N9? MeeGo OS didn't meet any expectation. I'd love to keep my phone but replace MeeGo with Ubuntu.


I've been thinking in changing my v-brakes to disc brakes. Now that my rear v-brake can't brake anymore I think that it is time change it. I've already seen . My frame is prepared for disc and, as I don't want to change my brake lever, I'll go with mechanical brakes (does  look ok?);  The only problem is the rear wheel hub that has not the six holes for the disk. Is it ok if I just change the rear wheel hub and keep the front one?


Where to get community-based feedback on my photos online?

Where can I post my photos and get reviews, comments, and critiques from the community, in order to learn to become a better photographer?  Here is a list of places to get feedback.  Please use answer wikis to comment and rate each one.    As you get more advanced you might also want to try out photo contests, both online and local.


Where does the Kullback-Leibler come from?

Let $p(x)$ be some "true" distribution which we want to model using a simpler distribution $q(x)$. Why is the KL divergence $$KL(q||p)=\int q(x)\log{\frac{q(x)}{p(x)}}$$ a good way to represents the loss of information in using $q$ instead of $p$? Is the KL divergence some "ad hoc method" or it has a deeper meaning? Shouldn't be the entropy difference $$H(q)-H(p)$$ the right quantity to use?


Find the summation of given expression: $\sum_{k=1}^n k^3\binom nk$

I am trying to solve the following question which is Ex3 from Arthur Engel, Problem Solving strategies. Here is the question: $\sum_{k=1}^n k^3 {n \choose k}$ and asks to find the sum. I am sincerely having a hard time trying to figure out how to solve it and get $n^2 (n+3)(2)^{n-3}$. I would really appreciate if someone could show the step-by-step process. Thank you!


Anything Wrong with my Light box Design?

I am creating a custom box that will contain 3 * 400 watt metal halide bulbs (1200 watt total). The box will remain closed for 60 minutes, open for the next 60 minutes, then closed, then open and so on.. for a period of 10 hours. The box will open/close from the the front panel (the "door") using Arduino and Servo motors.   Since the bulbs will be generating a lot of heat I will attach a Duct Fan at 240 CFM on top of the box (is the top the best place to put it?). Something like this:   The box itself will be made out of wood so I will coat it with a heat resistant spray from the inside so it doesn't catch on fire. Something like this:   When the box is open I will need the box to emit as much light as possible. Therefore, I will coat the inside with a reflective substance (something like this: ) so all light rays are dispersed from the box..  What do you think?  Thanks


Why are there greyed / dimmed / faded questions now?

I just refreshed the [iphone]-tag-site, and I'm seeing all kinds of questions with what appears to be a grey overlay (see image). What is this for/why am I seeing this? I have never seen anything like this before..


I've asked a duplicate question. Now what?

I asked a duplicate question and the community flagged it as duplicate. So I accepted it as duplicate. Now what? Am I supposed to delete it? I ask this because even after accepting that it is a duplicate, people are down voting.


Good tips for first-time Power Grid players?

Disclaimer: I know there's already been some discussion on this topic, but I'm going to ask the question anyway because I've never played the game before, and thus, have yet to use my copy of Power Grid in the context of actually playing the game.   What are some general tips for people who have never played before to get started and have an actual idea of what they're doing in Power Grid? Also, what are some tips for explaining the game to people who have also never played the game before?  P.S. Sorry if this question seems like it's been asked before (and thus, horribly redundant), and altogether a dumb question


I am here to ask something that I think it is interesting, first I just read about the shrinkage using the Ridge or Lasso regression by using the lambda as the penalty to introduce a little bias that reduces a large amount of variance. From here why lambda is doing is it flatter the slope that makes me think what if it does the opposite thing. It increases the slope by change the lambda < 0, I know we don't do that in shrinkage so my question is can it be beneficial for lambda < 0 in some expansion instead of shrinkage?. Are there any case it can be applied?


Connection times (with customs) in Charlotte

Is 1h25' enough time to go through customs and immigration in CLT (coming from Rome Fiumicino) before a connecting domestic flight? I have an Italian passport and I am not an US citizen or resident.  If the answer is "probably no", I assume it will be the airline's responsibility to reschedule me on a later flight, if both my flights are operated by the same company and sold on the same e-ticket --- am I correct?


I have a question about econometrics in general. If I have a regression with an interaction between two dummies, do I need to have those dummies separated in the regression too. I have this regression: is this right? $$ y_i=\beta_0 + \beta_1d\_sex_i*d\_country_i +\beta_2d\_country_i + \varepsilon_i $$ or do I need to do this: $$ y_i=\beta_0 + \beta_1d\_sex_i*d\_country_i +\beta_2d\_country_i + \beta_3d\_sex + \varepsilon_i $$


Heteroscedastic errors in logistic GLM - a problem?

I am fitting a logistic GLM (assumed binomial distribution) with a random intercept and slope: DV ~ 1 + IV + (1+IV|subject)  The DV is the number of successes of 200 Bernoulli trials. I want to extract the subject-wise intercepts and use them for an ANOVA to check whether the intercepts differ with treatment levels. I'm not concerned about inference in my GLM I strictly use it to extract intercepts for the ANOVA. The residuals of my logistic regression show clear heteroscedasticity of the residuals:  I checked if the residuals vary systematically with IV levels, but this is not the case. Now, I have read different accounts of the heteroscedasticity problem in logistic regression and some people say that it's not a problem and even expected, however I'm still worrying that this will cause trouble for my second level ANOVA. I'd be glad if someone could help me in assessing the gravity of this heteroscedasticity problem and whether I should worry about it.


I am trying to utilize c++ in embeded application. and i ran into a theoretical problem  Given that i have no dynamic allocation i dont use "new" operator. The question is regarding calling constructor for object and destructor.   I would like to put my object at x address in memory. i declare it like that:   Foo *myClass = (Foo *) 0x1; //for example //I guess i need to call constructor manually ? myClass->myClass();   So what would be a solution to call the constructor other then manually invoke it. Should i just make a new operator my self ? for example  void * operator new(size_t size, uint32_t address) {   return (void *)(address);  }   compiler used arm-none-eabi-g++, target armv7-m


How do I edit a class within a dll with one program in order to have the information accessed in another?

I am trying to create 2 programs that have common code. I need one to add or delete data to/from an array that can be read by the other. Right now I have created a dll that has the class, but my problem is that I don't know how to properly instantiate it so that both programs will be using the same data. Both processes would not be running at the same time.


Is there a word for when an action has an effect opposite to the one intended?

Is there a word or phrase to express the concept of an action having the opposite effect of the expected outcome?  For example, a drug taken to cure headaches that actually causes headaches, or an advertising campaign designed to deter smoking that leads to an increase in smoking.


Why are passports checked at the check-in counter, Immigration and even at the gate?

I was wondering, why there are passport checks at the check-in counter, Immigration and even at the gate?    For example, I was at Istanbul flying to either UK or US. There's a security check at the check-in counter asking a bunch of questions about my immigration status - even more than the Immigration officer at the border. Also, at the gate, there's also Security officer checking my immigration status and passport asking the same questions.    I thought that would be the responsibility of an Immigration officer rather than some third party company?   The thing I'm curious the most is they don't even know which countries this passport can go to with or without visa. They have to go back to the counter and check with the system which takes a long time. I was wondering why they hire these kind of companies to slow down the process?


Help proving exercise on sequences in Bartle's Elements

Self learning Analysis and found the following exercise in Bartle's Elements of Real Analysis:     Let $X = (x_n)$ be a sequence of strictly positive real numbers such   that $\lim \left({\frac {x_{n + 1}} {x_n}} \right) \lt 1.$Show that   for some $r$ with $0\lt r \lt 1$ and some $C \gt 0 $ we have $ \ 0 \lt  x_n \lt Cr^n$ for all sufficiently large $n \in \Bbb N$. Use this to   show that $\lim(x_n) = 0.$   Now I haven't proven any significant results concerning sequences and hence am required to solve this problem with basically nothing but the definition of a limit.   I am not getting too far with this because I cannot see a way to get there with a direct implication and I cannot for the life of me negate "for all sufficiently large $n$" in the context of the sentence above.   Would be extremely grateful if someone could help me out.  What I've done so far:  We know that $l = \lim \left({\frac {x_{n + 1}} {x_n}} \right) \lt 1$. If $l \lt 0$ we can find a neighbourhood of $l$ entirely contained in $(-\infty, 0)$ which would contain no elements of the sequence $  \left({\frac {x_{n + 1}} {x_n}} \right) $ all of whose elements are positive leading to a contradiction. This implies $l \ge 0.$  We can pick $ 0 \lt  \epsilon \lt 1 - l$. There is $m \in \Bbb N$ such that   $$n \ge m \implies \left|{\frac {x_{n + 1}} {x_n} - l}\right| \lt \epsilon \implies \frac {x_{n + 1}} {x_n} \lt \epsilon + l \lt 1 \implies x_{n + 1} \lt x_n$$      Also can someone tell me if $\lim (x_n) = 0$ necessarily? Doesn't   $\left({2 + \frac 1 n}\right) $ satisfy the given conditions??


Import functionality is working fine on live server but not on localhost in Java

I am getting this stack trace while clicking on import button on web-page, It is working fine on live server but not on localhost in Java, Is it any configuration issue in localhost?   Dec 21, 2015 12:46:32 PM org.apache.catalina.core.StandardWrapperValve  invoke SEVERE: Servlet.service() for servlet [action] in context with  path [/tools/wse/wmi] threw exception java.lang.NullPointerException     at  org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:441)     at  org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:320)     at  org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)     at  org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)     at  org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)     at  javax.servlet.http.HttpServlet.service(HttpServlet.java:728)   at  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)     at  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)     at  org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:151)     at  org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)     at  org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)     at  tools.wse.model.conf.AuthenticationFilter.doFilter(AuthenticationFilter.java:192)   Here is code:  public void doFilter(     ServletRequest req,     ServletResponse resp,     FilterChain chain)     throws ServletException, IOException {      HttpServletRequest request = (HttpServletRequest) req;     HttpServletResponse response = (HttpServletResponse) resp;     request.setAttribute(TapestryFilter.REGISTRY_CONTEXT_NAME, servletContext.getAttribute(TapestryFilter.REGISTRY_CONTEXT_NAME));     //for multi-charset support     request.setCharacterEncoding("utf-8");      UserToken userToken = (UserToken) request.getSession().getAttribute(WebKeys.USER_TOKEN);     //check user authorization     if (userToken == null || request.getParameter(LOGIN_TEST_BUTTON)!=null) {      //not coming inside if block      //code of if block     }     else {         chain.doFilter(req, resp);//Error in this line 192     ConnectionTracker.logUnclosedConnectionErrors(request.getPathInfo());     } }


How can I remove a string from the beginning of each line of text?

I grab the contents of a directory with du -a /test1 | cut -f2 and get this:  /test1/file1 /test1/directory1 /test1/directory1/file2   My hope is to use something like cut, sed, or grep to say "whatever $(pwd) is, chop that off the front of the output."  For instance, if /test1/ contained another directory named 'test1', I'd want to retain that sub-directory in my output, so if I had:  /test1/test1/   my output would ideally be   test1/   Thank you for your help.  EDIT: I have tried the tips outlined in . I can get output similar to what my example looks for, but it either takes out more than one instance of /test1 per line or it only operates on the first line of the variable.  It's not acting the same as "For the beginning of each line, remove $(pwd), but only once per-line"  The  answer is only working on the very first line of my multi-line variable.  The topic of multi-line variables are not addressed in the answer given.  Their solution works because the PATH variable doesn't contain newlines.  In my case, it only works on the first line of the variable which is not the desired output.


How to increase /root partition using GPARTED

I have a dual boot Windows + Ubuntu machine. There is plenty of space in my /home partition and recently I got an error message showing that I have low disk space in /root. I want to resize my /root an put some of the space from /home into /root. Unfortunately I cannot find the /root in GParted. Here is an image of the GParted screen.


Could someone help me with netflix on Ubuntu 14.04 desktop. Pipelight does not work. When I go to the netflix desktop application it opens firefox, and shows the series, but when I click to play a screen appears telling me:    You're almost ready and only need to install the microsoft silverlight plugin.    Pipelight itself is installed and enabled but I saw in the window on the desktop opens netflix portion plugins complements the pipelight appears with this error  Pipelight Error (silverlight5.1)! Something went wrong, check the terminal output libpipelight-silverlight5.1.so application/x-pipelight-error-silverlight5.1   (Error during initialization: pipelighterror-silverlight5.1)   If I open Firefox by other plugins and see the pipelight okay, this error does not appear.


Explanation on when the possessive should be used instead of an attributive noun

How would you explain to a person who is learning English, and whose native language does not have attributive nouns, when the possessive should be used instead of an attributive noun?  In particular, how would you explain it referring to the following list of sentences?   Today's news is bad This week's schedule has been changed Tomorrow's lunch will be at the French restaurant This year's report will be communicated in the reunion room Last summer's vacations were memorable Last year's meetings were a complete disaster


What is the best references / books to get familiar with machine learning algorithms?

I'm just starting off as a data scientist and i need to understand how regression, random forest and much more.. algorithms function under the hood, the maths behind them and when to use them. I started with some MOOC courses but not a fan, it's just not my style of learning as i need practical examples or books i can dive into with detailed examples i can just apply myself after understanding how each algorithm works and some 20 mins vids with scarce maths explanation is not what i aim for, i've done some research and ended up with these books:  -python for data analysis  -Python Crash Course  -oreilly hands on machine learning with scikit learn and tensorflow  -automate the boring stuff with python  kindly note that i have some python experience(less than a year) and  unfamiliar with tensorflow , keras, scikit-learn etc..   Kindly also note that i didn't mention any maths books to explain how the machine learning algorithms work so i'm open to suggestions  .


Persisting lack of clarity on the operation of the Citizen Patrol badge

Today, I received the Citizen Patrol badge. This came as a surprise, and arose from a slightly odd set of circumstances. I therefore looked here on Meta for clarification, and found  about the badge. From these it seems that there was (and is) some uncertainty about how this badge operates. Could the description of the badge be edited to reflect how it ACTUALLY works. I would also appreciate a clear description of this badge here on Meta.  The circumstances under which my badge were awarded were:  I raised a flag for moderator attention on a  I had asked as, in the light of further thinking about the problem in the light of the first answer, I had realised that it was a damn stupid question. I raised the flag so as to obtain advice from the moderators, which I duly obtained and acted upon. I have now been awarded the Citizen Patrol badge for this action, which either shows that I had misunderstood the basis for this badge, or was inadvertently "gaming" the system.


LENOVO IdeaPad (U430 Touch) only charges up to 59%

I just installed Ubuntu 14.04 LTS on my LENOVO IdeaPad U430 Touch. How come the battery just charges up to 59%? I also have Win8 on another partion and it easily reaches 100%.  I tried "" but nothing changed. I've read some complaints from people who have a similar problem but they all have ThinkPads and there's a special modul for "TLP" where you can control the charging threshold.  What to do?


$x$ is a vector and $A$ is a matrix and I'm confused as to how to find the partial derivatives of $x^TAx$ with respect to $x_1$, $x_2$, etc.


Get:1 http://in.archive.ubuntu.com/ubuntu bionic InRelease [250 B] Err:1 http://in.archive.ubuntu.com/ubuntu bionic InRelease                        Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?) Hit:2 https://packages.microsoft.com/repos/vscode stable InRelease              Get:3 http://security.ubuntu.com/ubuntu bionic-security InRelease [250 B]       Err:3 http://security.ubuntu.com/ubuntu bionic-security InRelease                 Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?) Err:4 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease           Cannot initiate the connection to ppa.launchpad.net:80 (2001:67c:1560:8008::15). - connect (101: Network is unreachable) Could not connect to ppa.launchpad.net:80 (91.189.95.83), connection timed out Err:5 http://dl.google.com/linux/chrome/deb stable InRelease                      Cannot initiate the connection to dl.google.com:80 (2404:6800:4007:80a::200e). - connect (101: Network is unreachable) Could not connect to dl.google.com:80 (172.217.160.142), connection timed out Err:6 http://in.archive.ubuntu.com/ubuntu bionic-updates InRelease                Cannot initiate the connection to in.archive.ubuntu.com:80 (2403:8940:3:1::f). - connect (101: Network is unreachable) Could not connect to in.archive.ubuntu.com:80 (43.255.166.254), connection timed out [IP: 43.255.166.254 80] Err:7 http://in.archive.ubuntu.com/ubuntu bionic-backports InRelease   Cannot initiate the connection to in.archive.ubuntu.com:80 (2403:8940:3:1::f). - connect (101: Network is unreachable) [IP: 43.255.166.254 80] Reading package lists... Done E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/bionic/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?) E: The repository 'http://in.archive.ubuntu.com/ubuntu bionic InRelease' is not signed. N: Updating from such a repository can't be done securely and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?) E: The repository 'http://security.ubuntu.com/ubuntu bionic-security InRelease' is no longer signed. N: Updating from such a repository can't be done securely and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.


I played several hours a started three different worlds in Minecraft, but I have never found any sugar canes. I read on Minecraft wiki to search near water but still no luck. Do you have more hints? Is it possible to re-create an environment that allow sugar canes to naturally grow?


Prove that subsequence converges to limsup

Given a sequence of real numbers, $\{ x_n \}_{n=1}^{\infty}$, let $\alpha =$ limsup$x_n$ and $\beta = $ liminf$x_n$.   Prove that there exists a subsequence $\{ x_{n_k}\}$ that converges to $\alpha$ as $k \rightarrow \infty$.   Not sure how to start this without since I'm not given that the subsequence is bounded..


I am in the middle of creating a game, and users can steal cars.  However, when it comes to clicking "steal car", I need to make the better cars more difficult to steal (car 1 being the most difficult, car 2 being the next difficult...etc).  I have a set of random probability at the moment within my PHP script, although it doesn't seem to work.  It feels as though each car is as equally difficult to steal.  As a side note, you will see that each car produces it's own picture once stolen.  Can someone help?  Thanks!  if($query1>="3"){   $random_car = rand (0,99);   if (($random_car)>98) {$car = $car_1; $pic = $car1_pic;} else { if (($random_car)>97) {$car = $car_2; $pic = $car2_pic;} else { if (($random_car)>94) {$car = $car_3; $pic = $car3_pic;} else { if (($random_car)>86) {$car = $car_4; $pic = $car4_pic;} else { if (($random_car)>77) {$car = $car_5; $pic = $car5_pic;} else { if (($random_car)>72) {$car = $car_6; $pic = $car6_pic;} else { if (($random_car)>65) {$car = $car_7; $pic = $car7_pic;} else { if (($random_car)>58) {$car = $car_8; $pic = $car8_pic;} else { if (($random_car)>48) {$car = $car_9; $pic = $car9_pic;} else { if (($random_car)>35) {$car = $car_10; $pic = $car10_pic;} else { if (($random_car)>19) {$car = $car_11; $pic = $car11_pic;} else { if (($random_car)>1) {$car = $car_12; $pic = $car12_pic;} else {  $car = $car_13; $pic = $car13_pic;  }//car 12 else }//car 11 else }//car 10 else }//car 9 else }//car 8 else }//car 7 else }//car 6 else }//car 5 else }//car 4 else }//car 3 else }//car 2 else }//car 1 else


How do I add a class node to a generic linked list?

I'm making a generic linked list and I have to make two sets of data.  First file is "auto.txt" which contains information about cars in the following format:  Brand Model Year   Second file is "moto.txt" which contains information about motorcycles in the following format:  Brand Model Year Engine   I made a two-way linked list and I need to make two lists, one containing the motorcycles and other containing cars. However, I get the following errors:  cannot convert from 'L3_Console.Car' to 'T' cannot convert from 'L3_Console.Motorcycle' to 'T'   This is my code:  class Program {     static void Main(string[] args)     {         GenList<Car> Cars = Read<Car>("auto.txt");         GenList<Motorcycle> Motorcycles = Read<Motorcycle>("moto.txt");     }      public static GenList<T> Read<T>(string Failas)     {         GenList<T> List = new GenList<T>();         using (StreamReader reader = new StreamReader(File.Open(Failas, FileMode.Open), Encoding.GetEncoding(1257)))         {             string line;             while ((line = reader.ReadLine()) != null)             {                 string[] parts = line.Split(' ');                 if (typeof(T) == typeof(Car)) List.Add(new Car(parts[0],parts[1],int.Parse(parts[2]))); //error here                 else if (typeof(T) == typeof(Motorcycle)) List.Add(new Motorcycle(parts[0], parts[1], int.Parse(parts[2]),parts[3])); //error here             }         }         return List;     } }  public sealed class GenList<T> {     private sealed class Node<T>     {         public T Data { get; set; }         public Node<T> Previous { get; set; }         public Node<T> Next { get; set; }          public Node() { }          public Node(T data, Node<T> adr_p, Node<T> adr_n)         {             Data = data;             Previous = adr_p;             Next = adr_n;         }     }      private Node<T> start;     private Node<T> end;     private Node<T> current;       public GenList()     {         this.start = null;         this.end = null;         this.current = null;     }      public void Add(T data)     {         var dd = new Node<T>(data, null, start);         if (start != null)             start.Previous = dd;         else end = dd;         start = dd;     }  } public class Car {     public string Brand { get; private set; }     public string Model { get; private set; }     public int Year { get; private set; }      public Car(string brand, string model, int year)     {         Brand = brand;         Model = model;         Year = year;     } } public class Motorcycle {     public string Brand { get; private set; }     public string Model { get; private set; }     public int Year { get; private set; }     public string Engine { get; private set; }      public Motorcycle(string brand, string model, int year,string engine)     {         Brand = brand;         Model = model;         Year = year;         Engine = engine;     } }   How do I properly add a new node to the list, containing a class which depends on how the function was called? Thank you


Is there really a difference between crop and FF sensors anymore in regards to pic quality?

It seem to me that everything is a numbers game. Better lens better ISO technologies better more modern camera etc etc. These days a canon 80D ...Is it really that much different picture quality then a 5Dm4? Say I have a sigma 18 to 35 1.8 lens on a canon 80d.- Is a full frame realllyyy THAT much better picture quality?


What do you use to monitor and deploy linux config files?

I'm working in an environment where multiple groups share servers. I was wondering what tools are used to check if configurations files were modified, maybe able to say who modified them, and revert them to original? And tools for deploying configuration files across multiple servers to make sure everything is in sync.  I realize that process can be developed and I can lock down access but I am looking for a validity check tool for now. Regarding deployments/sync of configurations, is the answer to just have a revision control system like git/svn with puppet, ansible, or chef running at an interval?  Thank you.


Is there any difference between the following two forms?

I'm reading right now a paper related to the state of Hybrid Electric Vehicle (HEV) and Battery Electric Vehicle (BEV) and I saw:     BEVs produce no pollutants such as particulates, (...)   What is the difference between this form and the use of: BEVs don't produce pollutants such as particulates, (...)  As far as I know, It's very common to use the first form in papers or textbooks. Why? Is it about formality, rule of scientific papers or something related to grammar figures?  Thank you for your answers.


Is there a SHA-256 value which hashes to itself?

Getting curious about SHA-256 cycles (what happens if you hash a value repeatedly), I came across this question:    The first answer suggests that using a 7-bit hash, it's possible to find a value that hashes to itself. See the red dot which isn't part of a loop but on its own:    I assume from the diagram, this means if I apply the 7-bit hashing function to this value, the output matches the input. So my question is if such values are possible in SHA-256, and if anyone knows what value(s) hash to themselves or has ever found one of those values.


I am doing an experiment for a school project which consists of blowing into 6 different bottles to create different notes/harmonics. Each bottle is filled with different volumes of water to create a different sound. I have to calculate the theoretical frequency of each, but I do not know how.


Will my iPad get damaged if I connect it to a 18W power bank instead of the 10W charger in the box?

I just bought a 6th generation iPad 2018 and was given a 10W charger along with it. I was wondering if I could use an 18W power bank to charge it. Will it damage my iPad?


What is the size of $\{(x_1,\ldots,x_n)\in\mathbb{R}^n:x_1+\cdots+x_n0\}$?

Is there an easy way to compute the size (Lebesgue measure) of the set $$S_n(a):=\{(x_1,\ldots,x_n)\in\mathbb{R}^n:x_1+\cdots+x_n<a\text{, and }x_i>0\}.$$ Using integration I computed that $$m(S_n(a))=\frac{a^n}{n!}.$$ But the computation is tedious, and I was wondering if there are more concise/direct ways of proving it.  Computation: $$ \begin{align} m(S_n(a)) &= \int_0^a\int_0^{a-x_1}\cdots\int_0^{a-x_1-\cdots-x_{n-1}}dx_n\cdots dx_1 \\ &= \int_0^a\int_0^{a-x_1}\cdots\int_0^{a-x_1-\cdots-x_{n-2}}(a-x_1-\cdots-x_{n-1})dx_{n-1}\cdots dx_1 \\ &= \int_0^a\int_0^{a-x_1}\cdots\int_0^{a-x_1-\cdots-x_{n-3}}\frac{-1}{2}(a-x_1-\cdots-x_{n-1})^2\big|_0^{a-x_1-\cdots-x_{n-2}}dx_{n-2}\cdots dx_1\\ &=\int_0^a\int_0^{a-x_1}\cdots\int_0^{a-x_1-\cdots-x_{n-3}}\frac{1}{2}(a-x_1-\cdots-x_{n-2})^2dx_{n-2}\cdots dx_1\\ \end{align} $$ and so on...


In this, I aim to discern (parse[?]) these, grammatically, and have them complete. May these seem grammatically discerned, properly?     She (subject, argument) did (auxiliary verb) not (auxiliary adverb) go (verb).   I aim to think of this, as a complete interrogative.     Did (auxiliary verb) she (subject, argument) not (auxiliary adverb) go (verb)?      Did (auxiliary verb) not (auxiliary adverb) she (subject, argument) go (verb)?      Did (auxiliary adverb) she (subject, argument) go (verb) not (auxiliary adverb)?   May these seem discerned grammatically properly?     Did (auxiliary adverb) she (subject, argument) go (verb) not (auxiliary adverb)?   And, may this additionally seem syntactically proper?


vi shortcuts on bash on mac not working e.g. CTRL + E, CTRL + A

I have used vi as my main text editor for years now on Linux (and a few years back Mac too) and on my brand new Mac (running 10.8.4) I find when trying to edit a file using vi in Terminal I can not use the standard vi shortcuts e.g. using 'CTRL + E' to navigate to the end of a line. Instead the shortcut is set to the vim shortcut which is '$' to navigate to the end of a line. I a using bash. How can I get the standard vi shortcuts?


I am giving -8 to +8 V supply to the op-amp. So, output of the op-amp is varying from (-8 to +8) V. I want to give this to ADS1115 ADC module. But the ADC module's max. Vin is 5.5 V.   I decided to use voltage divider. What I need is one voltage divider circuit which gives the output that ranges from 0-5 V, when we give the -8 to +8 V as Vin.   Problem here is negative voltage of -8 V. How can I over come this problem ?


Laptop was slow so I tried to be smart and do factory reset. Picked the option to delete hard disk including partition without backing up. On laptop, laptop ask for system file. Don't have it.  Don't know what to do please help. I bet I deleted windows and also don't have the disk.


After arriving at JFK on an international flight, what happens with my through-checked baggage?

I have booked a flight from Athens to Raleigh-Durham. I have to change airplanes 3 times. The first two flights are with Qatar Airways and the third with American Airlines. My final destination is Raleigh-Durham.  Do I have to collect my baggage and go through Customs and Immigration at the JFK airport before getting the flight to Raleigh-Durham? Do I have to re-check my bags?  The e-ticket says under the baggage allowance that my baggage will be send from ATH to RDU.


Difference between 'struct' and 'typedef struct' in C++?

In C++, is there any difference between:  struct Foo { ... };   and:  typedef struct { ... } Foo;


Creating 9.3 version of geodatabase in ArcMap 10?

Under the What's new for geodatabases in ArcGIS 10 Esri talks about an optional parameter that allows you to create a 9.3 geodatabase in version 10.    I cannot find any other info.    Any help on how to get to this "optional parameter" working?


Proving $n^\epsilon > \log(n)$ for sufficiently large $n$

I'd like to show that for all $\epsilon > 0$, there exists an $N$ such that for all $n \geq N$ the following holds: $n^\epsilon > \log(n)$. I'm having trouble justifying this.   My intuition says this should hold. Writing $n = 2^k$ gives an inequality of the form $(2^\epsilon)^k > k$. This should hold for sufficiently large $k$ (and therefore $n$) because $2^\epsilon > 1$, so the function $(2^\epsilon)^k$ grows much faster than $k$. (This is also the approach described in  question.)   However, I was wondering if there is a more "rigorous" way to justify this inequality.


In this  it is explained that  records are immutable by default  But records can be used just like a normal class: using System;  record A {     public int u;     public int U     {         set { u = value; }     }     internal void f() => u++; } record Program {     static void Main()     {         A x = new A() { u = 1000 };         x.U = 100;         x.f();         Console.WriteLine(x);         Console.ReadKey();     } }  What is meant by the immutability of a record?


Which should I choose: The factory roof or the roof of the factory?  Are there some grammar/rules about the difference? What case should I use the first sentence in? What case should I use the second sentence in?   Thanks in advance


Proving that $\sum_{j=0}^n(-1)^j\binom{n}{j} = \binom{n}{0} - \binom{n}{1} + ... \pm \binom{n}{n}=0$

The equation to be proved is: $\sum_{j=0}^n(-1)^j\dbinom{n}{j} = \dbinom{n}{0} - \dbinom{n}{1} + ... \pm \dbinom{n}{n}=0$  But if i take the base case ($n = 1$) i get  $\sum_{j=0}^n(-1)^j\dbinom{n}{j} = \dbinom{n}{0} - \dbinom{n}{1}$  But this evaluates to $\frac{n!}{0!n!} - \frac{n!}{1!(n-1)!}$  I don't think the above statement evaluates to zero. Could this be an error? The book is Spivak's Calculus and the problem is 2-3(e)(ii)


Find the most occurring number in a List

Is there a quick and nice way using linq?


Unable to install most major packages; Unmet dependencies and cannot be fixed

I just did a fresh install of Ubuntu 14.04 64-bit, and it seems that most major packages I attempt to install (among them being Skype, Steam/Steam-Launcher, WINE, etc.), give an "unmet dependencies" error and refuse to install.   I have looked at several other questions of a similar description (many duplicates) but none of the solutions worked and I have not yet found someone with this specific issue.  Installing Skype:  stere0123@stere0123-THINKPAD-U14:~$ sudo apt-get install skype Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  skype : Depends: skype-bin E: Unable to correct problems, you have held broken packages. stere0123@stere0123-THINKPAD-U14:~$    I get similar errors with some other packages I've tried as well. Any help would be greatly appreciated as this problem is currently crippling this system!


I need a lot of independent planes (like 200x300), but creating them programmatically with a loop took a lot of time (with bpy.ops.mesh.primitive_plane() or with vertices and faces). But creating one grid with subdivisions is very cheap. My problem is, that the vertices of the subdivision planes are connected and i need them independent (having each inner vertice four times).  So i would ask you, if there is an option to divide an grid in many independent planes?


I am travelling from Chennai to Portland, USA via San Francisco International Airport (SFO). Do I need to collect my baggage at SFO and re-check it before boarding the flight to Portland?


There's .   As the prime numbers that are $1\bmod4$ can be divided into the sum of two squares, will the squared numbers be unique?  For example, $41=4^2+5^2$ and the squared numbers will be 4 and 5.


How is the x coordinate of a "point at infinity" encoded in a Secp256k1 signature?

I'm testing an implementation of Bitcoin, which uses the curve Secp256k1 for ECDSA, and I want to see how it handles the point at infinity ($0$) if present in a signature. For example, r could be the x coordinate of the encoding of the point at infinity.   How is the $0$ encoded? Can it be encoded?  I found that bouncycastle prefixes the encoding of 0 with 0x00, and has some other defined prefixes (ECCurve.decodePoint()) but I don't known how this information applies (or even if it does apply to) to the encoding of $(r,s)$. This info seems to be in the X9.62 standard.


bash - True if the length of string is (non)zero?

# touch $$ # gzip $$ # gzip --test $$.gz # echo $? 0 # OUT=$(gzip --test $$.gz) # echo $OUT  # if [ -z $OUT ] ; then echo $$ ; fi 26521 # if [ -n $OUT ] ; then echo $$ ; fi 26521 #      from bash(1)      -z string           True if the length of string is zero.    string    -n string           True if the length of string is non-zero.    I'm confused, how is it zero and non-zero at the same time? How does one do check against if key has a value (using bash)?


In order to take an electron out of a certain energy level in an atom, that electron must absorb a photon with an exact value of energy corresponding to that specific level. How is this possible given the fact that this would require infinite precision ? For example, an electron might require 10.12345eV, but a photon might have 10.123456789eV.  So how does any interaction ever takes place ?


looking for a sensor that activates when hit by a certain note

The reason may seem a bit silly, but anyway: I am trying to turn a violin steampunk. I have never done this before and I'm not the best at engineering, so could someone help? The circuitry doesn't have to be invisible (cables showing etc. are A-okay), but it would be cool if I could find something to light up LEDs when a certain note is played. Does anyone have any ideas?


I used the following code to draw a picture. I want to make the region insde (0,7), (0,11),(3,8),(3,4) to be red, and the region above it to be gray, but I don't know how to do this.   \documentclass{article} \usepackage{tikz} \begin{document} \pagestyle{empty} \begin{tikzpicture}[scale=0.5]  \draw (1.05cm,2pt) node[above];  %  {$\displaystyle\int_0^{3/2} \!\!x^2\mathrm{d}x$};  \draw[style=help lines] (0,0) grid (3.9,11.9);   % [step=0.25cm]      (1,2) grid +(1,1);  \draw[->] (-1,0) -- (4,0) node[right] {$i$}; \draw[->] (0,-1) -- (0,12) node[above] {$j$};  \foreach \x/\xtext in {1/1, 2/2, 3/3} \draw[shift={(\x,0)}] (0pt,2pt) -- (0pt,-2pt) node[below] {$\xtext$};  \foreach \y/\ytext in {1/, 2/, 3/,4/,5/,6/,7/7,8/, 9/, 10/, 11/11} \draw[shift={(0,\y)}] (2pt,0pt) -- (-2pt,0pt) node[left] {$\ytext$};  \draw  {(0,11) -- (3,8)} node[below right] ; \draw  {(0,7) -- (3,4)} node[below right] ; \draw  {(3,8) -- (3,4)} node[below right] ; \end{tikzpicture}  \end{document}


Is it acceptable to re-raise an issue that was closed as status-bydesign at a time when SE's requirements were different?

As a particular example,  was closed as  back in 2009, when Stack Exchange didn't exist, and Stack Overflow was a site exclusively for programmers. Now that Stack Exchange exists, there are parts of the network (like Japanese.SE, where intra-"word" bolding is used and tokens like word_word_word aren't) that have requirements that I'm sure Jeff never anticipated when he gave  to that question.   Would it be acceptable for me to raise that issue again as either a  or  on MSO?


Can I install Ubuntu on a Windows 8.1 computer? That computer is the one I currently use.


What are the diffrence between the quality of top 20 universities PhD programs over top 70s for USA?

I  am a Computer Science M.Sc. Student in a university in a developing country. I am planning to apply for PhD this year. Actually my main reasons to not continue my PhD here, are the issues related to my country economics and infrastructures. Poor dorm conditions, no funded PhD, unstable internet, no proper study place in university are some of them where decrease the quality and contributions of a PhD student and I think that those issues will be solved by the migration to USA itself and is not related to the rank of the destination university. to make my question clear, actually I want to know what are the benefits of a top 20 university in USA saying, Caltech over a top 70 university saying, Oregon State University .please note that I am not asking about the after-graduation job perspective, I mean What are the effects on the quality and contributions of a PhD student that studies in a top-20 instead of a top-70 university.  P.S: if it matters ranks are according to the US News portal.


I got it as the set {sqrt(1/4^x) : x Є Z - {0} }


What SQL syntax would split this column into three new columns (split would be on the underscore)?  There are other columns in the table, but I would like to split these into three (underscore based).


For $z,w\in \mathbb{C}$, we define $\log(z) = \log(|z|) + i \arg(z)$ and $z^w = e^{w\log(z)}$. We have \begin{align*} i^i & = e^{i\log(i)}\\ & = e^{i(\log(1) + i(\pi/2 + 2k\pi))}, & k\in \mathbb{Z}\\ & = e^{-(\pi/2 + 2k\pi))}, & k\in \mathbb{Z}\\ & = e^{-\pi(2k + 1/2)}, & k \in \mathbb{Z}. \end{align*}  Is this correct?


Do Windows memory optimizers actually work (on Windows 10)?

Note: this is not an opinion based question, and I do not want any opinion based answers.  Microsoft have had long enough by now to optimize Windows, build in garbage collectors, etc  Does anyone know of a scientific study, preferably by a reputable technical site or magazine, which shows some advantage of a "memory optimization tool" over just letting Windows 10 do its own thing?  Science, please. Measurements. No "I feel ..."  or "it seems ..."


Getting null pointer exception when try to write data second time in loop using selenium

I am writing to data in excel , My process is :   Get data from website Store data into Array Write into excel   Problem :   It writes data first time perfectly , But second time when it reaches to Write() function , it fires null pointer exception.  I have checked by debug that data is in array but not writing second time.  Code :  public static void Write_To_Excel() throws IOException     {           int lastrow = 0;         FileInputStream input = new FileInputStream("E:\\Data.xls");         Workbook wb = new HSSFWorkbook(input);         Sheet sh = wb.getSheet("sheet1");         Row row = sh.getRow(0);         lastrow = sh.getLastRowNum();            for(int c=0;c<URLs.size();c++)         {              System.out.println(URLs.get(c).toString());             //driver.findElement(By.cssSelector("body")).sendKeys(Keys.CONTROL +"\t");             driver.get(URLs.get(c).toString());                   String Name = driver.findElement(By.id("ProductOverrideName")).getAttribute("value");                  String Manufacturer = driver.findElement(By.id("ManufacturerName")).getAttribute("value");                  String MPN = driver.findElement(By.id("ProductManufacturerPartNumber")).getAttribute("value");                  String Size = driver.findElement(By.id("SizeName")).getAttribute("value");                  String Color = driver.findElement(By.id("ColorName")).getAttribute("value");                  String Option = driver.findElement(By.id("OptionName")).getAttribute("value");                  String Mkeywords = driver.findElement(By.id("ProductOverrideMetaKeywords")).getAttribute("value");                  String Mdesc = driver.findElement(By.id("ProductOverrideMetaDescription")).getAttribute("value");                   driver.switchTo().frame(0);                   String Desc = driver.findElement(By.xpath("/html/body")).getText();                  driver.switchTo().defaultContent();                   ProductData = new ArrayList<String>();                   ProductData.add(Name);                  ProductData.add(Manufacturer);                  ProductData.add(MPN);                  ProductData.add(Size);                  ProductData.add(Color);                  ProductData.add(Option);                  ProductData.add(Mkeywords);                  ProductData.add(Mdesc);                  ProductData.add(Desc);                   lastrow = sh.getLastRowNum();                  Row newrow = sh.getRow(lastrow);                  newrow = sh.createRow(lastrow+1);                     for(int d=0;d<ProductData.size();d++)                  {                      try{                       System.out.println(ProductData.get(d).toString());                      Cell cell = newrow.createCell(d);                      cell.setCellValue(ProductData.get(d).toString());                    }catch(Exception E)                  {                       E.printStackTrace();                  }                   }                   input.close();                   try{                   FileOutputStream webdata = new FileOutputStream ("E:\\Data.xls");                   wb.write(webdata);                   wb.close();                    }catch(Exception E)                   {                       E.printStackTrace();                   }              }          }   First time everything works fine , When it comes second time at wb.write(webdata); , It fires null pointer exception.


Why doesn't current leak to ground (DC)?

In the circuit shown below, I am considering ground to be ideal earth ground (stays at 0V no matter how much current it absorbs). It is my understanding that current flows when there is a potential difference. Thus, I would expect current to flow to both the negative terminal of the battery and to ground. Why wouldn't current leak to ground? I am looking for a physics explanation.  The following two questions have addressed this issue (, ), but I am unsatisfied with the answers given. Specifically, one of the answers noted that the voltage source must have an equal out flow and in flow of current to sustainably generate an EMF. I don't see how this would affect whether or not current would leak to ground. Consider a source that doesn't have that constraint (it can infinitely output electrons with some set potential).  Thank you!!


test fails because of TestMethod do not support getContent call

My below test fails because of Run Failures: TestRangehoodObjectionSheet.RangehoodObjectionSheetTest Methods defined as TestMethod do not support getContent call. I added the Blob thinking it might resolve but it doesn't work. What could be the problem here? Have I used the Blob correctly?  @isTest public with sharing class TestRangehoodObjectionSheet {      static testMethod void RangehoodObjectionSheetTest() {             String Build                = NBATRecords.getIdFromDeveloperName('Plan_Reviews__c','Building_Plan_Review');             Account a = new Account(Name = 'Test1' ,Type = 'Lead Acct',BillingState = 'CA',Industry = 'Business Services');             insert a;              Establishment_Record__c er = new Establishment_Record__c(Account__c=a.Id ,Project_Name__c = 'TestPreet',PremiseStreet__c='Manhattan ave',PremiseBorough__c='Manhattan',PremiseState__c='NY',PremisePostalCode__c='11102',Referral_Source__c='311',Data_Source__c='CAMIS',Phase__c='Initiate',Business_Status__c='Open' );             insert er;              Application__c ap = new Application__c(Establishment_Record__c=er.Id,Job_Number__c='222222222');             insert ap;              Plan_Reviews__c pr = new Plan_Reviews__c(Application__c =ap.Id ,DOB_Job_Number__c='222222222',RecordTypeId =Build,Objections__c='Pipe size not indicated');             insert pr;             PageReference pageRef = Page.RangehoodObjectionSheet;              Test.setCurrentPage(pageRef);               Blob content = Test.isRunningTest() ? Blob.valueOf('UNIT.TEST') : pageRef.getContent();              Plan_Reviews__c              p   = new Plan_Reviews__c(id=pr.Id);                ApexPages.StandardController sc  = new ApexPages.standardController(p);             System.assertNotEquals(sc,null);             RangehoodObjectionExtention    ext = new RangehoodObjectionExtention(sc);              ext.Savecopy();       } }   Actual class for the test:  public with sharing class RangehoodObjectionExtention { private final ApexPages.StandardController controller; private final Id                           planreviewID; public String imageURL{get;set;} public List<String> objlist {get;set;}  public string currentdate {get; set;}    public RangehoodObjectionExtention (ApexPages.StandardController stdController) {         controller   = stdController;         planreviewID = (Id)controller.getRecord().get('Id');         Date dt = Date.today();         currentdate = dt.format();         list<Plan_Reviews__c> prlist = [select FDNY_Objections__c from Plan_Reviews__c where id = :planreviewID limit 1];         string obj;         for(Plan_Reviews__c pr: prlist){            obj = pr.FDNY_Objections__c;             }         if(obj!=null){            list<string> objections = obj.split(';');             integer i =1;            objlist = new list<string>();            for(string o : objections){               objlist.add(i++ +'. '+o);            }         }         imageURL='/servlet/servlet.FileDownload?file=';         List< document > documentList=[select name from document where Name='RangehoodObjectionLogo'];         if(documentList.size()>0)         {            imageURL=imageURL+documentList[0].id;         }       }          public PageReference Savecopy(){       PageReference p = Page.RangehoodObjectionSheet;       blob b = ApexPages.currentPage().getContentAsPDF ();       Attachment a = new Attachment();       a.body = b;       a.name = 'Rangehood Objection sheet Issued '+currentdate+'.pdf';       a.parentid = planreviewID;        insert a;        PageReference pref = new PageReference('/'+planreviewID);       return pref;    } }


I have a Moto luxe that I wish change because its too slow. Can I change my android on a Moto luxe cell phone for the Ubuntu?  Thanks


Why didn't Dumbledore tell the Order about Horcruxes?

We know that Harry didn't have to destroy the Horcruxes himself:     "Ron - ?"   The sword flashed, plunged: Harry threw himself out of the way, there was a clang of metal and a long, drawn-out scream. Harry whirled around, slipping in the snow, wand held ready to defend himself: but there was nothing to fight.   -Harry Potter and the Deathly Hallows, Chapter 19 ("The Silver Doe"), by J.K. Rowling   So why didn't Dumbledore tell any of the Order about the Horcruxes? Did he think it would be too dangerous? Did he not trust them?


Reading the extension of files in a directory with Java?

I have a simple program that reads all the files from a given directory into an array. The array is then looped through and the file names listed in a JFrame as individual JLabels.   I am also able to read the file extension using this code:                   String extension = "";                 int i = FileName.lastIndexOf('.');                 if (i > 0) {                     extension = FileName.substring(i+1);                 }   This works fine, however when I try to use the extension in an if statement like this:                      if(extension == "java")                      {                         System.out.println(FileName);                      }                      else                     {                       System.out.println("error");                     }   all i get is error statements in the console, even though there are several java files in the directory (as can be seen in the results JFrame!)  Can anyone tell me what the problem is? Thanks!


My textbook exercise asks the question      "Electric field lines cannot be discontinuous. Explain."    I thought about something related to potential and stuff like that to somehow show that they cannot be discontinuous but I see no problem with that? Why can't potential not be defined at a point? Has it something to do with nature or what?