I have a label that I want to center in the page and I have a parent set to 100% width and the actual element set to a block display and the margin set to auto. If I set the element's width to a small value then it does actually center it, however the element stays static as I resize the window when I want it to adapt to the window size. The element I want to center is under the class "label_"   .container {   display: block;   width: 100%; }  .label_ {   border: 1px solid red;   display: block;   color: white;   z-index: 11;   margin: 0 auto;   font-family: "Handlee";   font-size: 50px; } <form>
     Username     <input id="username" type="text" placeholder="Username">
 </form>

How can I horizontally center a
 within another
 using CSS?

Foo foo


I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


Intuitively how does the LASSO method select its variables?  Is it based on standard econometrics?

I've been reading , and I would like to know why the Lasso provides variable selection and ridge regression doesn't.  Both methods minimize the residual sum of squares and have a constraint on the possible values of the parameters $\beta$. For the Lasso, the constraint is $||\beta||_1 \le t$, whereas for ridge it is $||\beta||_2 \le t$, for some $t$.  I've seen the diamond vs ellipse picture in the book and I have some intuition as for why the Lasso can hit the corners of the constrained region, which implies that one of the coefficients is set to zero. However, my intuition is rather weak, and I'm not convinced. It should be easy to see, but I don't know why this is true.  So I guess I'm looking for a mathematical justification, or an intuitive explanation of why the contours of the residual sum of squares are likely to hit the corners of the  $||\beta||_1$ constrained region (whereas this situation is unlikely if the constraint is $||\beta||_2$).


I tried removing doubles and nothing happened. Not sure what else to try

While rendering a mesh with smooth shading on, I get a dark region/shadow on certain faces. The effect is more evident when smooth shading is applied to a mesh containing ngons, with the ngons turning black when rendered.   The blackening effect is visible in the viewport too.  How can I solve this problem?


I’m 19 and working as a stripper part time right now and I make 60k a year, and I plan on doing so for the next 7 years. I have 15k saved up, but it’s just in a bank account.   I’m also in college majoring in nursing. I have scholarships and my parents are paying for the rest of my school costs so I won’t have any student loans. I don’t have any debt or loans or anything, and I’m pretty frugal.  I don’t know anything about investing or stocks, so I was wondering what I should do?   I’ve heard about Roth IRAs and how it’s beneficial for young workers whose tax brackets will go up later in life, but would it be good for me since nurses make not much more than I’m making right now?    What other kinds of options are there for low risk high interest?

I am young, just started my career, and looking to begin investing so I can make my money work for me. I'm still living like I did in college (occasional purchase on myself, but most of it goes into savings) and I would like to take the extra money and invest it.   What would you suggest are the best options for me to begin? I was considering getting a personal investor [a financial advisor] for perhaps a year or so, but I've heard that they really are not worth the money. I wanted to get the input of the great minds here.


I just found a  lg box of vacuum packed halibut fillets in my freezer. Been there at least 8 yrs. safe to eat?  Worth a lot of money!

How do I know if a given food or ingredient I have is still good, or if I should discard it?  How can I best preserve a food or ingredient?     This broad question is intended as a "general reference" question to quickly answer many how long will food keep for? questions. Please feel free to edit this question to expand and clarify as needed.


I have been using model averaging and model selection bases on AIC and BIC for a while. I have recently discover the stepwise regression technique and I found a lots of people critize this methods.   Why stepwise regression is to avoid ? Is it just only because you may not capture interaction between variable and therefore loose informations ?  Thank you

I would like to implement an algorithm for automatic model selection.  I am thinking of doing stepwise regression but anything will do (it has to be based on linear regressions though).   My problem is that I am unable to find a methodology, or an open source implementation (I am woking in java). The methodology I have in mind would be something like:   calculate the correlation matrix of all the factors pick the factors that have a low correlation to each other remove the factors that have a low t-stat add other factors (still based on the low correlation factor found in 2.). reiterate several times until some criterion (e.g AIC) is over a certain threshold or cannot or we can't find a larger value.   I realize there is an R implementation for this (stepAIC), but I find the code quite hard to understand. Also I have not been able to find articles describing the stepwise regression.


I have a company webpage at "example1.com" and was developing a new webpage at "exemple2.com" (because it was everything already set).   When I finished the page, I updated my "example1.com". So, at this time both "example1.com" and "example2.com" had the exactly same code.  Couple of day later I disabled my "example2.com" site by removing its DNS configs.  But... The root page on google was indexed on "example2.com" and when I removed this domain (and forbidden google to index them at the search console), my root page from "example1.com" didnt get indexed.  So... I have all my pages from "example1.com" indexed (about 6 pages), and my root page isnt indexed... I already try the manual index at search console, but nothing until this moment...  Any tips on how I can solve this? Or this is one of the cases that I just need to wait a month or so?  Thanks!!

This is a general, community wiki  question and answer pair intended to address any questions   concerning the reasons a site or specific site contents do not appear   in search engine results.      If your question was closed as a duplicate of this question and you   feel that the information provided here does not provide a sufficient   answer, please open a discussion on .   My site (or specific pages on my site) is not appearing in search engine results.  Why isn't my content indexed and what can I do about it?


I want to perform file operations(fread, fwrite... etc) with a array(char*, but if is possible with any type also will be good).  I know that i can do it with sprintf and sscanf, but i no want use these. Why? i are writing a Intel 8080 emulator, and i are writing the RAM, so i will read more that individual chars, read ints and so on.  I want use fread and fwrite because you can give them the size of the elements, with sprintf and sscanf you can use format, but i must write code for every type.  At this moment i don't have any issues, nor much code, i only want know if my question has a answer, else i will see how convert a array of char to other data type...  Resuming, i can use char* as FILE* ?.    Sorry for my bat English...

Is there any way to create a memory buffer as a FILE*. In TiXml it can print the xml to a FILE* but i cant seem to make it print to a memory buffer.


Suppose $f(z)$ is analytic in a neighborhood of  the origin and $\sum_{i=1}^\infty f^{(n)}(0)$ converges. Prove that $f(z)$ extends to be an entire function. From the given information I can guess that $f$ has a Taylor extension in the neighborhood of $0$, but how can we say that it is expandable to an entire function? Please tell me how can we prove that $f$ is entire. AS  the answers to this question does not provide me satisfactory answer

I recently came across the result that if $g$ is holomorphic in a neighbourhood of a point $z_0$ and  $$\sum_{n=0}^{\infty }{g^{(n)}(z_0)} $$ converges then $g $ is an entire function. Now, my doubt is if the above series is absolutely convergent then can we say something more about $g$, like say $g$ is a polynomial? I could not find any non-polynomial  entire function( I tried with functions like $e^z$, $\sin z $, et al), whose successive derivatives converge absolutely as series. Any help please?


I have a type String that looks like '["123", 123, "testing"]'.  How do I change that String into type Array?

Given a string of JSON data, how can I safely turn that string into a JavaScript object?  Obviously I can do this unsafely with something like:  var obj = eval("(" + json + ')');   but that leaves me vulnerable to the JSON string containing other code, which it seems very dangerous to simply eval.


At first it would seem that if $p{\implies}q$ means "$p$ implies $q$", then if $p$ is false then the entire statement doesn't make sense. It looks like if we have no way of knowing whether $p$ implies $q$ or not, since $p$ was never a real thing in the first place. It would seem that the statement wouldn't have either "true" or "false" value, but rather "undecided".  Why did mathematicians decide to give this statement a "false" value?

I am studying entailment in classical first-order logic.  The Truth Table we have been presented with for the statement $(p \Rightarrow q)\;$ (a.k.a. '$p$ implies $q$') is: $$\begin{array}{|c|c|c|} \hline p&q&p\Rightarrow q\\ \hline T&T&T\\ T&F&F\\ F&T&T\\ F&F&T\\\hline \end{array}$$  I 'get' lines 1, 2, and 3, but I do not understand line 4.      Why is the statement $(p \Rightarrow q)$ True if both p and q are False?  We have also been told that $(p \Rightarrow q)$ is logically equivalent to $(~p || q)$ (that is $\lnot p \lor q$).  Stemming from my lack of understanding of line 4 of the Truth Table, I do not understand why this equivalence is accurate.       Administrative note. You may experience being directed here even though your question was actually about line 3 of the truth table instead. In that case, see the companion question  And even if your original worry was about line 4, it might be useful to skim the other question anyway; many of the answers to either question attempt to explain both lines.


I have a hard time doing this proof.  Can anyone help me?     Show that the following pairs of sets S and T are equinumerous by finding a   specific bijection between the sets in each pair.      $S = [0,1]$ and $T = [0,1)$

How to define a bijection between $(0,1)$ and $(0,1]$?   Or any other open and closed intervals?   If the intervals are both open like $(-1,2)\text{ and }(-5,4)$ I do a cheap trick (don't know if that's how you're supposed to do it): I make a function $f : (-1, 2)\rightarrow (-5, 4)$ of the form $f(x)=mx+b$ by \begin{align*} -5 = f(-1) &= m(-1)+b \\ 4 = f(2) &= m(2) + b \end{align*} Solving for $m$ and $b$ I find $m=3\text{ and }b=-2$ so then $f(x)=3x-2.$  Then I show that $f$ is a bijection by showing that it is injective and surjective.


Could someone please help me.  I was wondering if I have to use "that" in the following sentence:     I'm sure your friends will likely call you on your birthday.   Should there be a "that" between sure and friends?  Thank you.

"For someone used to the tiny creatures we get in England it was something of a shock."  I think, in this sentence, relative pronouns before some words have been omitted. I know rules of omitting relative pronouns, but in this case I have failed to understand before which words relative pronouns can be placed to understand the sentence perfectly, which has been stated above. Please, explain the rules of omitting relative pronouns with the help of the sentence stated above, so that I can be able to understand this type of sentences easily. You can also use other sentences to explain this fact clearly.  Thanks to everyone.


– Schematic created using   In the circuit shown if current is flowing from negative side of battery to positive side how multimeter can know the existence of resistor before electrons in wire hits the resistor?  I mean how multimeter measures current before it reaches the resistor? How it knows that a resistor exists?

With the following circuits as examples :    and    How will the current I know how much to flow? Would any other wave travel first in the circuit and then come back and say so much current should flow?


I am following a course on stochastic processes. One question is to Calculate  $$lim_{n\to \infty} \sum^n_{i=0} e^{-n} \frac{n^i}{i!}$$ I see that it looks like the expected value of $e^{-n} \frac{n^{i+1}}{i!}$ but i don't know how to proceed.  I tried to use mathematica but i'm not sure this is correct.     Solve[Integrate[E^(-n) n^(i + 1)/Factorial[i], {n, 0, x}] ==      1/2 Integrate[       E^(-n) n^(i + 1)/Factorial[i], {n, 0, Infinity}] , x, Reals]   Thanks in advance

I'm supposed to calculate: $$\lim_{n\to\infty} e^{-n} \sum_{k=0}^{n} \frac{n^k}{k!}$$ By using WolframAlpha, I might guess that the limit is $\frac{1}{2}$, which is a pretty interesting and nice result. I wonder in which ways we may approach it.


I'm trying to add a github project to my CV, but I can't add it because it's not actually owned by my "earlz" username, but rather is branched off into its own "team". Although, right now, I am the creator of the repo and only contributor. How can I add this project to my CV?   And just for reference, my github name is Earlz, and the project I'm trying to add is this:

On Careers, when you try to add open source GitHub entries, it shows you repos which you own or are owned by an organization which you collaborate on.    This would be fine with me; that just means that there isn't any fancy fetching of the project details via the API.  However, it isn't possible to add any GitHub projects via the "other" button; it throws the error "Please use our GitHub page (/import/github/88888) to add Github projects.".  Which means that I can only link to a small subset of the projects available on GitHub, even though I can link to almost anything else on the Internet via the other option.  Could the restriction on GitHub links in the "other" form be removed? It could instead be replaced with a non-blocking "warning" sort of thing.  Alternatively, keep a textbox at the bottom of the GitHub repo list where I can enter my own repo.


Following prepared statement returns no result if I try like search('samsung').  public function search($searchFor) {         try{             //connect to db             $pdo = $this->_db->connect();             //set up SQL and bind parameters                         $sql = "select * from item where itemName like '%:searchfor%' or description like '%:searchfor%'";             $stmt = $pdo->prepare($sql);             $stmt->bindParam(':searchfor', $searchFor, PDO::PARAM_STR);             //execute SQL             $rows = $this->_db->executeSQL($stmt);             return $rows;         }         catch (PDOException $e)         {             throw $e;         }     }   $rows return an empty array. But if I try   select * from item where itemName like '%samsung%' or description like '%samsung%;   it returns a matched item and works as expected.  I found  $sql = "select * from item where itemName like :searchfor or description like :searchfor"; $stmt = $pdo->prepare($sql); $stmt->bindValue(":searchfor", "%$searchFor%");   works. I had to use bindValue instead. This was a totally different issue in that the SQL was correct but I used bindParam instead of bindValue (which is the correct method), hence this is not a duplicate.

Here's my attempt at it:  $query = $database->prepare('SELECT * FROM table WHERE column LIKE "?%"');  $query->execute(array('value'));  while ($results = $query->fetch())  {     echo $results['column']; }


I try to run SP Flash Tool under Ubuntu MATE but after I chmod +x the executable file, I get this error:  bash: ./flash_tool: cannot execute binary file: Exec format error bash: ./flash_tool.sh: Permission denied   Anyone have any idea why?

I'm trying to run a program, but an error happens like this:  bash: ./program: cannot execute binary file: Exec format error   The result of file program was:  program: ELF-32-bit LSB executable, ARM, EABI4 version 1 (SYSV), dynamically linked(uses share libs), for GNU/LINUX 2.6.16, not stripped   How can I fix this error?  I'm using Ubuntu 14.04.2 (amd64) with VMware. I also tried with Ubuntu i386, but result was same.


Today i was working on a problem on a ring with goes as follows. Let A be a ring, prove that any element of A has either $0,1$ or an infinity of left inverses. I think i found a proof of this statement, but the official solution looks nothing like mine. It is said that i should show that if any element has two distinct left inverses then there's an infinity of them (which i did) by considering the kernel of $f:x\rightarrow ax$. My try goes as follow: let $x,y$ be such inverses then for all $p,q\in\mathbb Z$ satisfying $p+q=1$, $px+qy$ is another left inverse, because : $(px+qy)a=p+q=1$. And for all $p\in\mathbb Z$ we have : $px-(p-1)y=(p-1)x-(p-2)y$ that implies $x=y$. Hence there are infinitely many distinct elements of the form $px+qy$. Is my proof flawed ?

There's a theorem of Kaplansky that states that if an element $u$ of a ring has more than one right inverse, then it in fact has infinitely many. I could prove this by assuming $v$ is a right inverse, and then showing that the elements $v+(1-vu)u^n$ are right inverses for all $n$ and distinct.  To see they're distinct, I suppose $v+(1-vu)u^n=v+(1-vu)u^m$ for distinct $n$ and $m$. I suppose $n>m$. Since $u$ is cancellable on the right, this implies $(1-vu)u^{n-m}=1-vu$. Then $(1-vu)u^{n-m-1}u+vu=((1-vu)u^{n-m-1}+v)u=1$, so $u$ has a left inverse, but then $u$ would be a unit, and hence have only one right inverse.  Does the same theorem hold in monoids, or is there some counterexample?


I want to use regex on the jsf (.xhtml) page. When i want to use regex i keep getting this error    SyntaxError: unterminated parenthetical   and my code is   var data2 = ($("#data").val()).replace(/User(/g,"{");   I use regex earlier in php pages but never get such error.

I am tired of always trying to guess, if I should escape special characters like '()[]{}|' etc. when using many implementations of regexps.  It is different with, for example, Python, sed, grep, awk, Perl, rename, Apache, find and so on. Is there any rule set which tells when I should, and when I should not, escape special characters? Does it depend on the regexp type, like PCRE, POSIX or extended regexps?


How can one be able to type all contemporary letters in Dutch language on ubuntu or debian using ibus and a standard English qwerty keyboard? E.g., the letter "ó" in the word "vóór" (means "before"). Solutions meeting the following conditions are strongly preferred:  A Dutch input module (not German or something else). Installable via a .deb package or Ubuntu package manager. No mouse action is required to input these letters.  I am using a standard English qwerty keyboard with ibus input framework. Ibus Preferences -> Input Method -> Add has only a Dutch; Flemish - Belgian module available for Dutch that appears to be unable to achieve what I am asking for (although ö, ô and è can be typed).

Currently I use the character palette applet in gnome panel to put special characters into text.  This is okay, but I have to stop typing, select the character I want from the applet and then copy and paste.  Is there a way to simply type special characters with different key combinations? If so, how do I do it?


Consider the angular momentum operator $\hat{L_x}=\hat y\hat{p}_z-\hat{z}\hat{p}_y$ and the potential operator $\hat{V}$ where the potential $\hat{V}=\hat{V}(\hat{r})$ is spherically symmetric.  It can be shown that $[\hat {L}_x, \hat {V}] = \hat y [\hat {p}_z, \hat V]-\hat z [\hat {p}_y, \hat V]. $ I tried showing this myself and found that this is only true if $$[\hat y, \hat V]=0  $$ and $$[\hat z, \hat V]=0. $$  Why are the last two equations equal to zero?

I'm trying to show, for the Hamiltonian $H = \vec{P}^2/2m + V(\vec{X})$, that $[\vec{L}^2,H]=0$ if $V(\vec{X}) = V(|\vec{X}|)$, and I pretty much almost have it, there's just one thing I'm getting messed up on.  So what I did was: $$ [\vec{L}^2,H] = [L_x^2 + L_y^2 + L_z^2, \frac{\vec{P}^2}{2m} + V(\vec{X})] = [L_x^2 + L_y^2 + L_z^2, \frac{\vec{P}^2}{2m} + V(|\vec{X}|) ] $$ $$ = [L_x^2,\frac{\vec{P}^2}{2m} + V(|\vec{X}|)] + [L_y^2,\frac{\vec{P}^2}{2m} + V(|\vec{X}|)] + [L_z^2,\frac{\vec{P}^2}{2m} + V(|\vec{X}|)] $$ Looking at the $L_x^2$ component: $$ \rightarrow [L_x^2,\frac{\vec{P}^2}{2m} + V(|\vec{X}|)] = \frac{1}{2m}[L_x^2,P^2] + [L_x^2,V(|\vec{X}|)] $$  $$ = \frac{1}{2m}[L_x^2,P_x^2+P_y^2+P_z^2] + [L_x^2,V(|\vec{X}|)] $$  $$ = \frac{1}{2m} \bigg( [L_x^2,P_x^2]+[L_x^2,P_y^2]+[L_x^2,P_z^2] \bigg) + [L_x^2,V(|\vec{X}|)] $$  Now for the momentum parts, that's a lot of tedious work that I won't type up, but at the end of the day, I get that $$ [L_x^2,P_x^2]=[L_x^2,P_y^2]=[L_x^2,P_z^2]=0 $$ and similarly for $[L_y^2,P^2]=0$ and $[L_z^2,P^2]=0$. My problem is this, for this to work out, I need $$ [L_x^2,V(|\vec{X}|)] = 0 $$ and similarly $$ [L_y^2,V(|\vec{X}|)]=[L_z^2,V(|\vec{X}|)]=0 $$ but I don't really understand why that would be the case? Any insight would be appreciated.


I am trying to get Don't starve for my Samsung Chromebook with Ubuntu and I can't figure out if i can play it since it's a .rar file. If anybody knows please let me know.

How can I install a tarbz2 package. Example: I have downloaded firefox 8 tar.bz2 . I want to know a general method for installation of tar.bz2 package.


Let $a,b \in \mathbb {Z} $ and let $m$ be an integer greater than $2$. I found a counterexample to the equation  $$(a+b)\mathrm {mod} m = a\mathrm {mod} m + b \mathrm {mod} m $$  where $m>2$. But that was only after I thought I had proven that the equation does hold, so I was wondering if someone could point out to me where the flaw is in the following.  If we divide $a $ and $b $ by $m $, then we have by the division algorithm  $$a=mc+x $$ $$b=md+y $$  Adding the equations together renders  $$a+b=me+(x+y) $$  And since $a\mathrm {mod} m + b \mathrm {mod} m= x+y $, then from the third equation, it seemes that the proposition holds.

modular arithmetic  How Can I prove (a+b) mod m = (a mod m) + (b mod m)) mod m ?


If mashed bananas are accidentally left on the counter overnight can they still be used for baking?

If I left food out of the refrigerator for some period of time, is it still safe? If I left it out too long, can I salvage it by cooking it more?


I've been asked a question by a student - it's off the beaten track, and I am struggling to get a definitive answer, even off other physics teachers... If we have an open tube, so open at both ends, how can we end up with a standing wave being formed in this tube? How can the initial wave reflect back and cause the formation of a standing wave? I have my own ideas - but i am never happy with going with what i think, i always try and get the idea validated and hopefully approved! Cheers, Marc'

We know that standing waves are created when any wave traveling along the medium will reflect back when they reach the end. But in an open organ pipe, there is nothing to oppose the wave and reflect it back. So then how are standing waves created in such a case? In standing waves where is the pressure greater, at nodes or anti-nodes?


I've been seeing a surge in the number of "Crawled - currently not indexed" pages in search console recently. Screenshot below:  When I look in detail to URLs one by one, I see that some of them are crawled but not fetched, like below:  Site's average response time to googlebot seems to be in the range of 200-300 ms. What can be a reason for these crawls but no fetches?

This is a general, community wiki  question and answer pair intended to address any questions   concerning the reasons a site or specific site contents do not appear   in search engine results.      If your question was closed as a duplicate of this question and you   feel that the information provided here does not provide a sufficient   answer, please open a discussion on .   My site (or specific pages on my site) is not appearing in search engine results.  Why isn't my content indexed and what can I do about it?


I am trying to bake texture for a model, and I get the infamous error "No objects or images to bake to". I have done a lot of googling to try and solve this, and in particular I have read pretty much every post related to that on this forum. It does not help and I still get the error. Here below are some details - please ask for more if necessary. Any help would be hugely appreciated.   Set up: I have an obj file, in the same folder as an mtl file along with a jpg picture for the texutre.   Import: I open up Blender 2.7 on Linux, default mode, delete the cube and subsequently import the obj file; I can see it alright and I recenter it.   Texture: in the materials and texture tabs, I select the jpg image for texture, so that when I set the viewport shading to texture I see the texture on the 3D model view.   Bake: making sure that coordinates is set to UV and that Map is set to UVMap in the Mappin dropdown menu of the Texture tab, I then go to the Render tab to the Bake dropdown menu. I click the Bake to Color vertices and choose Texture in the rollout. Clicking bake then yields the error.   Details: I make sure that the object is selected, both in the 3D viewport and in the Outliner. In the latter, the icons are on (the eye, the pointer and the camera). I have also been careful enough to open up a second subwindow for the UV/Image editor, and in there I select the jpg image for texture that is in the folder, and I can see the UV map alright. Also, this is all with the Blender Render engine, not with cycles.   What I have in mind after all this, and the reason I want to do it, is that I ultimately want to export the model to a ply file in a way that all vertices are listed together with an RGB color for each vertex, which is impossible currently (because color/texture is associated to faces of the mesh and not to vertices), even if I tick the "include vertex color" option in the ply export.   Thanks a looot in advance. I am absolutely out of resources here.   Gustavo  Edit: the thread  is different I believe. My question is more specific. However the answer to that thread does include what I was missing: adding a set of vertex colors under the object data tab.

This is frustrating for me. The UV-textures to vertex cols add-on doesn't seem to work despite the specific instructions. Any other tutorials I can find are either very old or very poor.  I'd like to know how to do this in Blender 2.79. I need vertex colors in my ambient occlusion for use in Shader Forge.


var ninja = (function(){     function Ninja(){};     return new Ninja(); })();   Why is the function above encapsulated in parentheses and why is there a (); at the end?  I think it's a constructor function because of the (); at the end, but why is the object wrapped in parentheses?

How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?  I have seen  given on Wikipedia, but unfortunately it did not help.


I've installed it, I can run it via the terminal, I also can find it via search (comes up as untitled - Sublime Text) and lock it to the launcher, but when I right click a file and try to choose sublime as the application it's not in the list. I've tried setting it as default via the instructions given  , but that didn't help. I've set it as the default editor for git commits, but that doesn't work either. I've checked that it's in the path: subl sits in /usr/bin and echo $PATH returns:  /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin   Anyone having the same issue?

I am running Ubuntu 15.10.  My /usr/share/applications/sublime_text.desktop contains the following:  [Desktop Entry] Version=1.0 Type=Application Name=Sublime Text GenericName=Text Editor Comment=Sophisticated text editor for code, markup and prose Exec=/opt/sublime_text/sublime_text %F Terminal=false MimeType=text/plain; Icon=sublime-text Categories=TextEditor;Development; StartupNotify=true Actions=Window;Document;  [Desktop Action Window] Name=New Window Exec=/opt/sublime_text/sublime_text -n OnlyShowIn=Unity;  [Desktop Action Document] Name=New File Exec=/opt/sublime_text/sublime_text --command new_file OnlyShowIn=Unity;   When I right-click on a markdown file (xxx.md) in Gnome Files (formerly "Nautilus"), I cannot see "Sublime Text" as a choice, even when I select "View All Applications".  I even tried adding %F to the lines Exec=/opt/sublime_text/sublime_text -n and Exec=/opt/sublime_text/sublime_text --command new_file in the [Desktop Action Window] and [Desktop Action Document], respectively, but it did not change anything.  I even ran sudo update-desktop-database.  What am I doing wrong?


I am having a code that says:  #include<stdio.h>  typedef struct string{     char *ch_ptr; }str_t;  #define newdef(a,b) \     char a ## sumthing[b * sizeof(str_t)]; \     str_t *a = (str_t *)a ## sumthing  main(){     newdef(input,5);     /*     some lines of code */ }   Optional changes to code:  #include<stdio.h>  typedef struct string{     char *ch_ptr; }str_t;  #define newdef(a,b) \     char a ## sumthing[b * sizeof(str_t)]; \     str_t *var1 = (str_t *)a ## sumthing  main(){     newdef(input,5)="Hello";     printf("%s\n",input);     /*     some lines of code */ }   Can anyone explain what this code segment means? Is input in this code a string (hope not) or a variable? If a variable then why doesn't the compiler throw an undeclared variable error?

As mentioned in many of my previous questions, I'm working through K&R, and am currently into the preprocessor. One of the more interesting things — something I never knew before from any of my prior attempts to learn C — is the ## preprocessor operator. According to K&R:     The preprocessor operator ##   provides a way to concatenate actual   arguments during macro expansion. If a   parameter in the replacement text is   adjacent to a ##, the parameter is   replaced by the actual argument, the   ## and surrounding white space are   removed, and the result is re-scanned.   For example, the macro paste   concatenates its two arguments:      #define  paste(front, back)  front ## back      so paste(name, 1) creates the token   name1.   How and why would someone use this in the real world? What are practical examples of its use, and are there gotchas to consider?


My Area51 site proposal, , just got into commitment phase two days ago. Why does it show that I have 69K reputation, when I actually have 9.7K?

What does the total reputation field on Area51 represent?  It's obviously not the total of the user's reputation on the various sites, as that is the number listed as user reputation.


I learned that it's common to do dimensionality reduction before clustering. But, is there any situation that it is better to do clustering first, and then do dimensionality reduction?

I am trying to perform document-level clustering. I constructed the term-document frequency matrix and I am trying to cluster these high dimensional vectors using k-means. Instead of directly clustering, what I did was to first apply LSA's (Latent Semantic Analysis) singular vector decomposition to obtain the U,S,Vt matrices, selected a suitable threshold using the scree plot and applied clustering on the reduced matrices (specifically Vt because it gives me a concept-document information) which seemed to be giving me good results.   I've heard some people say SVD (singular vector decomposition) is clustering (by using cosine similarity measure etc.) and was not sure if I could apply k-means on the output of SVD. I thought it was logically correct because SVD is a dimensionality reduction technique, gives me a bunch of new vectors. k-means, on the other hand, will take the number of clusters as the input and divide these vectors into the specified number of clusters. Is this procedure flawed or are there ways in which this can be improved? Any suggestions?


I am locked out of my Samsung Galaxy y Duos Lite and I have forgotten my password. USB debugging is not turned on. Is there any way to backup my sms onto my pc??

I have an Android device which is running Android 4.0.3 (or something like that).  My little brother decided to try and guess my lock screen pattern the other day, and ended up locking me out.   I have since been unable to log back in to the tablet using my Google Account details. I provided the correct login details, however it says they are incorrect. Could this be connected to the fact I have no internet connection?  I have no internet connection as the device is WiFi only, and the WiFi is currently turned off. I cannot turn it on, as I am locked out.  How can I log back into my tablet without wiping the user data?


Suppose $f_{-a}(x)$ is the pdf for $N(-a,\sigma^2)$ and $f_{a}(x)$ is the pdf for $N(a,\sigma^2)$. Let $f(x)=0.5f_{-a}(x)+0.5f_{a}(x)$ be the mixture density. Is $c=0$ the unique center for $f(x)$ in the sense that $f(x)=f(2c-x)$ for any $x$? My guess is that it is the unique center, but I don't know how to rigorously show it. Thanks!

I am trying to show that the central moment of a symmetric distribution:     $${\bf f}_x{\bf (a+x)} = {\bf f}_x{\bf(a-x)}$$ is zero for odd numbers. So for instance the third central moment $${\bf E[(X-u)^3] = 0}.$$ I started by trying to show that $${\bf E[(X-u)^3] = E[X^3] -3uE[X^2] + 3u^2E[X] - u^3}.$$ I am not sure where to go from here, any suggestions? Is there a better way to go about proving this?


I started by converting the following $\sum_{n=0}^\infty \frac{n^3}{n!}$ into  $$\sum_{n=1}^\infty \frac{n(n-1)(n-2)}{n!} + \frac{3n(n-1)}{n!} + \frac{n}{n!}.$$ Did i get it right and where should I go from here ?

I have to find the sum of the following series:  $$\sum\limits_{n=1}^\infty \frac{n^3}{n!}$$  I know how to prove the convergence of this series, but how do i find the sum. I can't use the properties of derivation or integration of the series, i have to do it using the definition that a series converges iff it's sequence of partial sum converges.


I need to use filtered subscription using lightning:empAPI for Push Topic notifications. But it does not work with Id filter after records page refresh (F5) whereas when it subscribes on the first place the notifications are coming in. Does it mean that only one active filtered subscription has to exist for the record and user session? If so how can I unsubscribe prior the component is reloaded and new subscription is initiated during refresh (F5).                       <aura:attribute name="channel" type="String" default="{!'/topic/QuoteProcessing?Id=' + v.recordId}"/> <!--<aura:attribute name="channel" type="String" default="/topic/QuoteProcessing"/>--> <aura:handler name="init" value="{!this}" action="{!c.doInit}" closable="false"/>  // doInit just executes helper.subscribe helper.subscribe(component, event);  // helper.subscribe subscribe : function(component, event) {         const empApi = component.find('empApi');         const channel = component.get('v.channel');         const replayId = -1;         //var Qchannel = '/topic/QuoteProcessing?Id='+component.get('v.recordId');         // Subscribe to an event         //console.log('Qchannel '+Qchannel);         empApi.subscribe(channel, replayId, $A.getCallback(eventReceived => {             console.log('Received event ', JSON.stringify(eventReceived));               $A.get('e.force:refreshView').fire();               var toastEvent = $A.get("e.force:showToast");             toastEvent.setParams({             mode : "dismissable",                 message : "Processing  - "+eventReceived.data.sobject.ProcessingStatus__c,                 type : "info",                 duration : 8000             });             toastEvent.fire();            }))         .then(subscription => {             console.log('Subscribed to channel ', subscription.channel);             console.log('subscription ', JSON.stringify(subscription));             component.set('v.subscription', subscription);         });             empApi.onError($A.getCallback(error => {             console.log('EMP API error from subscribe: '+ JSON.stringify(error));         }));        }   PushTopic query contains Id and the field I am changing in SELECT clause. Subscription is established but notifications are not coming.

I have a very simple component:  PushTopicTest.cmp <aura:component implements="flexipage:availableForAllPageTypes" access="global">     <lightning:empApi aura:id="empApi"/>     <aura:handler name="init" value="{!this}" action="{!c.onInit}"/> </aura:component>    PushTopicTestController.js ({     onInit: function(component, event, helper) {         var empApi = component.find("empApi");         empApi.setDebugFlag(true);         empApi.subscribe("/topic/AccountChanges?Id=0011t0000033C9QAAU", -1, function(message) {             console.log("Event Received : " + JSON.stringify(message));         });     } })   I also have PushTopic created like this:   What I am trying to do, is to only receive events for specific record Id. Based on documentation this should work: "/topic/AccountChanges?Id=0011t0000033C9QAAU", but it doesn't.   "/topic/AccountChanges" works though.  I've tried Id='0011t0000033C9QAAU' aswell, but no luck.  Do you know if it is possible at all?


I like the way the author Igor Sokolnikoff numbers his sections and equations, and would like to mimic this style in my own book. The section number is never reset. For example chapter one ends with section 17, and chapter two begins with section 18. Also equations are numbered according to section, not chapter, as (17.1), (17.2), etc.  I am using MikTex, pdflatex Thank You!

Some document elements (e.g., figures in the book class) are numbered per chapter (figure 1.1, 1.2, 2.1, ...). How can I achieve continuous numbering (figure 1, 2, 3, ...)?  And vice versa: Some document elements (e.g., figures in the article class) are numbered continuously. How can I achieve per-section numbering?  \documentclass{book}% for "vice versa" variant, replace `book` with `article`  \begin{document}  \chapter{foo}% for "vice versa" variant, replace `\chapter` with `\section`  \begin{figure} \centering \rule{1cm}{1cm}% placeholder for graphic \caption{A figure} \end{figure}  \end{document}   Bonus question: Is it possible to adjust the numbering of the sectioning headings themselves? Can I, e.g., switch from per-chapter to continuous numbering of sections in the book class?


How did their spaceship escape the black hole Gargantua?

Some things have confused me about the black hole in Interstellar. Namely:   How did Cooper ever leave the black hole once he was inside it? How was Cooper able to suspend in the tesseract? Something allowed him to decelerate.  How was the AI machine able to send Cooper messages considering messages are EM waves and a black hole's gravity is such that it will suck EM waves into the singularity?


System:   macOS Sierra 10.12.6    Raw input(example):  . ├── f1.md ├── f2.md ├── f3.md ├── f4.txt ├── f5.csv └── f6.doc  0 directories, 6 files   In a test folder, there are 6 files.  Expected output:  . ├── all.tar ├── f1.md ├── f2.md ├── f3.md ├── f4.txt ├── f5.csv └── f6.doc  0 directories, 7 files   Trying and Problem:  tar -cvf all.tar f1.md f2.md f3.md f4.txt f5.csv f6.doc    Though I get the result from the above method but I have to inputing all file names and the compressed file name, which is inconvenient. For example , I can select all files and right click, then choose compressed option without inputing all.tar (I don't mind the .tar filenames.)  Hope:  command-line method without inputing specific file names.

Is it possible to use tar to compress a folder without giving the filename of the archive to store in?  Normally you use:  tar -zcvf prog-1-jan-2005.tar.gz /home/jerry/prog   I want to do something like  tar -zcvf /home/jerry/prog   and have it create prog.tar.gz


I'm not sure what to do here. It seems like Morera's Theorem, but even then I'm not sure how to choose the triangular path.

This is a problem from Complex Variable (Conway's book) 2nd ed.  (Section 4.4) 9. Show that if $f: \mathbb{C}\to\mathbb{C}$ is a continuous function such that $f$ is analytic off $[-1,1]$ then $f$ is an entire function.  I already have a solution by Morera's theorem that split this problem in 5 cases. I think this solution is too long and I'm trying to solve this using a different approach. Any ideas ?


We already have one developer license, but want to buy one more developer license.  Is it possible under the same Apple ID?  We want to buy one more license under same company name, same Apple ID.  Basically Apple ID (having agent role) is legal owner. So under the same Apple ID, we wanted to buy a 2nd license.  If no, what are the alternate ways?

we already have one developer license. Now we want to buy one more developer license. Is it possible under the same AppleID? We want to buy one more license under the same company name , same apple Id, basically apple ID(having agent role) is legal owner. So under same apple id wanted to buy 2nd license.  If no what are the alternate ways...  Please note  Entity Type: Company / Organization


I am a bit confused about the creation of SPF records.  I have my hosting domain: hosting.mydomain.com, this is the hostname of the actual server running postfix etc.  I have configured my DNS like this:  mydomain.com @       A    1.2.3.4 (mail  server IP) @       MX   10 mail.mydomain.com @       TXT  v=spf1 mx a a:hosting.mydomain.com ~all hosting A    @ mail    A    1.2.3.4 (mail server IP)   Now do I need to include the a:hosting.mydomain.com in my SPF record?  And when I have another domain on the same server configured like this:  otherdomain.com @       A    9.8.7.6 (web server) @       MX   10 mail.otherdomain.com @       TXT  v=spf1 mx a ~all mail    A    1.2.3.4 (mail server IP)   Does this SPF record need to include a:hosting.mydomain.com  I am running Webmin/Virtualmin but hosting the DNS external. When I send email through the webmail the sender is always hosting.mydomain.com.  Are these SPF records correct?

This is a  about setting up .     I have an office with many computers that share a single external ip (I'm unsure if the address is static or dynamic). Each computer connects to our mail server via IMAP using outlook. Email is sent and received by those computers, and some users send and receive email on their mobile phones as well.  I am using  to generate an SPF record and I'm unsure about some of the fields in the wizard, specifically:   Enter any other domains who may send or relay mail for this domain Enter any IP addresses in CIDR format for netblocks that originate or relay mail for this domain Enter any other hosts which can send or relay mail for this domain How stringent should SPF-aware MTA's treat this?   the first few questions i'm fairly certain about... hope i have given enough info.


If I throw a clock towards a black hole, its time slows down, it is redshifted, and according to many theories it never reaches the event horizon from my point of view. How is it then, that a star can fall into a black hole, and be observed to do so by me (by its emission of gravitational waves)?

I've read a lot of conflicting answers in these forums. However, today saw the awesome announcement of gravitational waves. Two black holes merged:   Not only that, they merged FAST. In 1/5th of a second revolving around each other 250 times a second. The entire event was quicker than a heartbeat. Moreover, we observed this happening as distant outsiders. So now we can say for sure:   Objects approaching the event horizon DO NOT appear to slow down Black holes CAN merge in a finite (and quick) amount of time And all this is wrt a frame of reference far, far away   To quote the NYTimes article:  One of them was 36 times as massive as the sun, the other 29. As they approached the end, at half the speed of light, they were circling each other 250 times a second.  And then the ringing stopped as the two holes coalesced into a single black hole, a trapdoor in space with the equivalent mass of 62 suns. All in a fifth of a second, Earth time.  However, everything I've read so far has let me to believe that an outside observer should never be able to measure the collision happening in a finite time. So what exactly is happening here? I must have read at lest 5 different versions of this so far everywhere in these forums over the past several years.


There are a lot of free videos on . For example  list. There are also a lot of free Webinars that are open to every one.   I do not have access to internet at all times. I would like to watch some videos offline.   Do you know what is the format of these videos, and how can I download them?

I am trying to download a Flash video, so I can try to convert it to a normal DVD.  (.)  Is it possible to download this video?  If so, how could I do this?


On English Language & Usage, I noticed that even the  user has hats.    In its case, how is the hat it is wearing selected?

Why does ? And more importantly: why does she not wear them?    Please, show some goddamn holiday spirit! Can we get Community to wear her hats, either randomly or through popular vote?


I'm looking into tax free shopping in Japan and I noticed that if I decide to buy consumables tax free then I cannot eat them on the spot. From my understanding, if I buy consumable products at these stores they will give me a sealed bag with my consumables which I have to wait until I leave the country to open it. Why can't I just open up the bag when I leave the store? What is the reason to have that tax free rule implemented?  Edit: I explained the situation more in detail to differentiate between buying from a duty free spot in the airport than tax free shops. If they work the same way let me know.

I am not one for buying things in airports but recently my wife asked me to get her an alcoholic beverage while flying from the USA to Ireland (JFK-DUB). I made the purchase in JFK and was surprised to be told I had to collect it when departing for my flight as I board the plane. The sales assistant's English wasn't their best so I may have misheard and my Yorkshire twang may have thrown her, but I was somewhat surprised as to why I couldn't carry the bag myself to the plane.  Is there a law that prevents me from carrying my purchase to the plane or is this an added service I was charged, which I was duped into paying?  When boarding the plane there were several others who had to pick up their sealed duty free bags (why sealed?) so it wasn't just me. No explanation was given.


I'm looking for a DVD authoring application for Ubuntu 19.04 DeVeDeNG works, but I'm not happy with the main menu.  Bombono works great in 18.04, but not 19.04.  Any other suggestions for an application that works in 19.04?  The question is not duplicated because it is a question after DVD authoring and not DVD burning.

I have tried countless cd/dvd burning software on ubuntu 12.04 and none of them work for me,  any ideas guys?   I've tried tovidgui, bombono dvd,and mestelix, they are all so very confusing is there any program like dvdflick that is just straight to the point?


I'm new to Python, so please bear with me. Why isn't Python throwing an error when it compiles the following code. def b_search(left, right):     while left <= right:         mid = left + (right-left)//2          if nums[mid] == target:             return mid         if nums[mid] < target:             left = whatever         else:             right = mid-1     return -1  Wondering how there's no error even though 'nums' isn't defined, and neither is 'whatever', nor 'target'. Thanks!

What exactly are the Python scoping rules?  If I have some code:  code1 class Foo:    code2    def spam.....       code3       for code4..:        code5        x()   Where is x found?  Some possible choices include the list below:   In the enclosing source file In the class namespace In the function definition In the for loop index variable Inside the for loop   Also there is the context during execution, when the function spam is passed somewhere else. And maybe  pass a bit differently?  There must be a simple reference or algorithm somewhere.  It's a confusing world for intermediate Python programmers.


Why is ch pronounced as "Q", as in choir, and are there any other instances where ch is used as the letter "Q"?

Is there a rule to understand how the group "Cha" has to be pronounced?  "Character" sounds with a hard first syllable, while "Charm" sound softer, but I don't find how to tell which sound to use before earing someone saying the word. It could be because of the double consonant "rm" vs "ra"? Or is it just a matter of knowing the rule for every single word?  EDIT: More specifically, let's talk about UK English pronunciation.


$\vec F=m\vec a$ ,for moving object with 10 $km/s$ in a constant manner ,where acceleration is zero. ie No force on object ?

As a layman, i can calculate approx "displacement" just by observing the moving object. And accurately by using a simple "scale". Similarly, again, I can calculate angle from origin by using displacement in $x$ and $y$ dimensions. Similarly I can use a stopwatch and scale to understand velocity.  But when I read about , first of all it confuses with the english word "force", we use in real life. To some extent I am sure, it has nothing to do with that. So exactly what is it in the real sense. How can a layman, see force as, just like he can see displacement or angle? Or force is just a quantity defined by physicists to simplify the combinations of $ma$, they might be facing every time. And thus came up with term "force" ( which is similar in spelling to english word in oxford dictionary). And lastly, why not force has just been called as something proportional to mass and it's displacement or velocity. Why something at the level of change of velocity has been used to define it.


For example, given the differential equation $\dfrac{\mathrm{d}y}{\mathrm{d}x}=y\tag*{}$ We do, $\dfrac{\mathrm{d}y}{y}=\mathrm{d}x\tag{*}$ At which point we go and integrate both sides. Is there a rigorous justification for being able to go to $(*)?$

I see an equation like this:  $$y\frac{\textrm{d}y}{\textrm{d}x} = e^x$$  and solve it by "separating variables" like this:  $$y\textrm{d}y = e^x\textrm{d}x$$ $$\int y\textrm{d}y = \int e^x\textrm{d}x$$ $$y^2/2  = e^x + c$$  What am I doing when I solve an equation this way?  Because $\textrm{d}y/\textrm{d}x$ actually means  $$\lim_{\Delta x \to 0} \frac{\Delta y}{\Delta x}$$  they are not really separate entities I can multiply around algebraically.    I can check the solution when I'm done this procedure, and I've never run into problems with it.  Nonetheless, what is the justification behind it?  What I thought of to do in this particular case is write  $$\int y \frac{\textrm{d}y}{\textrm{d}x}\textrm{d}x = \int e^x\textrm{d}x$$ $$\int \frac{\textrm{d}}{\textrm{d}x}(y^2/2)\textrm{d}x = e^x + c$$  then by the fundamental theorem of calculus  $$y^2/2 = e^x + c$$  Is this correct?  Will such a procedure work every time I can find a way to separate variables?


Cannot really figure out how to create such a list:  1) List item  2) List item  3) List item  Here's what I have to use so far:  \begin{enumerate}     \item[1)] List item     \item[2)] List item     \item[3)] List item \end{enumerate}   Without these [1)]..[3)] dots appear instead of parentheses.

Is there a guide out there on how to customize the enumerate and itemize instances in my code?  (I'm using the Memoir class in LaTeX for Windows, and I have the enumitem package included.)  I want to mess with the margins and spacings to make my lists look a little less "LaTeX-default"...


I am tasked with generating an email address for new users in our environment who may have special characters (such as an umlaut and accents) in their full names.  While some email systems can handle these characters I am being told to generate email addresses that can convert these characters to a standard ASCII format.  So for example, John Señior would be created as john.senior@...  and Jane Fraü would be created as jane.frau@...  Has anyone found a regex expression or library that can handle such a requirement.  UPDATE - I am planning on performing the replacement in PowerShell, but could use any Windows compiled libraries as well.

I'm trying to convert some strings that are in French Canadian and basically, I'd like to be able to take out the French accent marks in the letters while keeping the letter. (E.g. convert é to e, so crème brûlée would become creme brulee)  What is the best method for achieving this?


How do I add a new empty line to the beginning of a file under MacOS and Linux?   I have tried the below command and it produces a new line character under MacOS  sed -i.bak '1s/^/TESTe\n/' test.py

I've been looking around sed command to add text into a file in a specific line. This works adding text after line 1:  sed '1 a\   But I want to add it before line 1. It would be:  sed '0 a\   but I get this error: invalid usage of line address 0.  Any suggestion?


Let $\mathcal{M}_{n,p}(\mathbb{K})$ be the set of matrices $n\times p$ with coefficients in $\mathbb{K}$.  Let $A\in\mathcal{M}_{n,p}(\mathbb{Q})$.  We suppose there exists a non zero solution $X\in\mathcal{M}_{p,1}(\mathbb{R})$ to $AX=0$. ($0$ denotes $[0]_{p,1}$)  Show that there exists a non zero solution $X'\in\mathcal{}_{p,1}(\mathbb{Q})$ to $AX'=0$  PS : This is NOT a duplicate of , which gives a zero solution in my case.    I've tried building up the system of linear equations linked to $AX=0$.  I got the result for simple small square matrices, but I can't manage to generalize it to all the matrices.

Let $A ∈ M_{m\times n}(\mathbb{Q})$ and $B ∈ \mathbb{Q}^m$. Suppose that the system of linear equations $AX = B$ has a solution in $\mathbb{R}^n$. Does it necessarily have a solution in $\mathbb{Q}^n$?  Where do I start?    I feel I can use this to :  $$x_i=\frac{1}{a'_{ii}}\left(b'_i - \sum_{j=i+1}^{k} a'_{ij} x_j \right).$$    Here is a thought that just crossed my mind, but I'm not sure if this is legal:  Suppose $Y\in \{\mathbb{R}\setminus \mathbb{Q}\}^n$ and $Y'\in\mathbb{Q}^n$ are solutions to $AX=B$. Then $AY=AY'=B$, or $A(Y-Y')=A(Y+(-Y'))=0$, but  addition between $\{\mathbb{R}\setminus \mathbb{Q}\}^n$ and $\mathbb{Q}^n$ is . . .


(i) $Y^\emptyset$ has exactly one element, namely $\emptyset$, whether $Y$ is empty or not, and (ii) if $X$ is not empty, then $\emptyset^X$ is empty.  How do you prove these statements to be true?

Let $ D = 2^\mathbb{N} $, i.e., D is the set of all sets of natural numbers.   What's the meaning of this definition? Intuitively, I would suggest that $ D = \{1,2,4,...\} $ but the explanation "set of all sets" leads me to the guess that this is wrong.


Execute permission can be reasoned as a special program access control mechanism. The search permission on the other hand is described like this in the POSIX specification for an error code for open     [EACCES]   Search permission is denied on a component of the path prefix, or ...   and for fchdir     [EACCES]   Search permission is denied for the directory referenced by fildes.   Why is search permission mandatory for `cd'ing or traversing down a directory? What security rationale was there? Why does it has to be separate from read permission?

In my CMS, I noticed that directories need the executable bit (+x) set for the user to open them. Why is the execute permission required to read a directory, and how do directory permissions in Linux work?


In how many ways can you arrange all letters in the word MISSISSIPPI so that  1) all four I’s are together?  2) two P’s are NOT next to each other?  3) no two I’s are next to each other?

"How many ways are there to arrange the letters in the word 'MISSISSIPPI' in such     a way that there are no three consonants in a row?"  I am thinking like this. The following are 'slots' for the letters of our word: _ _ _ _ _ _ _ _ _ _ _.  There are 21 consonants in total (English). The first slot as 21 possibilities, the second also has 21, but the third has only 5 possibilities. So how many ways can I place vowels within this word... I don't know.  I can try to enumerate all of the place the I's can go, but there has to be a better way than doing that.


I've tried placing tainted blocks, fibrous taint, all of it. What do I do?

I'm trying to make taint spread to a certain area in my world, as in, to a small NPC structure. Is there any way I can do this? I even tried using MCEdit to set the biome, but there's no "enter biome ID" thing, and Tainted Land isn't listed.


I am a foreign student with a Canadian Resident Permit. I intend to travel back to my country for a holiday and will come back to Canada to pursue my study. My flight to my country (Zambia) is through Seattle in the USA where I need to change plane. Do I need a US visa to transit even though I am not getting out of the airport?

In Europe usually you don't need to go through immigration to change planes (unless you are entering/exiting Schengen). Is it the case in the US as well? May I catch a connecting flight on one of the US airports if I don't have US visa?


I recently bought a bunch of new hard drives, servers and other items. What is a good way to stress test the hard to ensure it won't crash in the first week?  I've read and heard that if hardware is to break it will be within the first week typically

Here's what would be ideal:   A list of all the hardware components potentially found on one's computer A method (or list of methods) for testing each of these The accuracy of these methods   My personal requests are:  -How to test your motherboard -How to test your wireless receiving apparatus -How to test CD/DVD-RW drive -How to test your laptop battery -How to test your Heat sink(s)? -How to test the effectiveness of your fan(s)   Favorite answers: OS-independent tests which GUARANTEE the concerned hardware works PERFECTLY


I am posting this question from my Windows desktop, because as of this morning my laptop is no longer even an internet accessible device, and doesn't even seem to think it's supposed to be an internet accessible device.  My OS is Ubuntu 14.04, 64 bit. The laptop is an Asus X551CA, and I got it in 2013 April.  Last night, I installed a routine Ubuntu update. I then restarted my computer. This morning, I have no internet. Like, at all. When I open up Firefox, every single tab says it failed to load the requested page. At the top right corner of the screen, there isn't even an internet icon. I tried connecting my ethernet cable, but it didn't even react at all.  I tried restarting like three or four times. It doesn't help. The internet is still missing.  I tried the following terminal commands, as suggested by responders to .  sudo service networking restart  sudo service networking force-reload  sudo dhclient  sudo apt-get update   Each one returned errors.  The first one returned this.  stop: Job failed while stopping start: Job is already running: networking   The second one returned this.  reload: Job is not running: networking   The third one returned this.  avahi-daemon stop/waiting   And the fourth one, after spitting out a large wall of text, then returned this.  W: GPG error: http://deb.opera.com stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 63F7D4AFF6D61D45   I have no idea what to do. It's the very end of the semester, and I have a research project that I need to complete by the end of monday. So it is, to say the least, absolutely imperative that my internet be working soon. Please, please help.

When I started my laptop, there was no network service, and also no network icon in the top bar. It gives an error when I start OS like "Sorry, Ubuntu 14.04 experienced an internal error". When I click details, it says the error is occurred in the executable path usr/sbin/NetworkManager. Also, when I try to enter Network in the System Settings, it says "the system network services are not compatible with this version"  How can I solve this shocking issue?  p.s. I didn't install any third party packages/apps related with networking. Only system updates are installed.


Let $f$ continuous at $[0,2]$ with $f(0)=f(2)$.Check if there are $x_{1},x_{2} \in [0,2]$ such that $x_{1}-x_{2}=1$ and $f(x_{1})=f(x_{2})$ . How can I do this?

Let $f \in C[0,1]$ and $f(0)=f(1)$.   How do we prove $\exists a \in [0,1/2]$ such that $f(a)=f(a+1/2)$?  In fact, for every positive integer $n$, there is some $a$, such that $f(a) = f(a+\frac{1}{n})$.  For any other non-zero real $r$ (i.e not of the form $\frac{1}{n}$), there is a continuous function $f \in C[0,1]$, such that $f(0) = f(1)$ and $f(a) \neq f(a+r)$ for any $a$.  This is called the Universal Chord Theorem and is due to Paul Levy.  Note: the accepted answer answers only the first question, so please read the other answers too, and also this answer by Arturo to a different question:     This is being repurposed in an effort to cut down on duplicates, see here: .  and here: .


Okay so basically, what I want to do, is convert the decimal part of number(678.5123) which is 0.5123 into a whole number(5123). However, if you run the code yourself, you'll see that it stops and it outputs 51229999999 etc. Basically, it's wrong, and I don't know why. Any insights as to where I screwed up and why would be very much appreciated.  #include <stdio.h> #include <math.h> int main() { int omg, numTimes = 10; double thisIs, holderThis, number = 678.5123; thisIs = number - floor(number); printf("%lf\n", thisIs); int x = (floor(thisIs) == thisIs); while (x != 1) {     x = (floor(thisIs) == thisIs);     thisIs *= 10;     printf("%lf %lf\n", thisIs, floor(thisIs); } while(number - floor(number) != 0)     number *= 10.00; printf("%lf", thisIs); return 0; }

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


How can I see a read out of my CPU or in general how much my laptop is overheating? I tried this () where all the temperature info is shown when you type "sensors", but I'm not getting anything -   I have Ubuntu 14.04 and I don't know anything about it so what can be the problem? I also noticed I can't run new programs like Blender (donloaded as as ZIP so it doesn't require instalation). How can I check if I have a limited version of the OS because I believe it shouldn't work like this. Here's the program folder -   I'm just plain confused, please help!


Given an enum parameter list as PHP string, eg $list = "'A', 'B'" how to verify this is  1) valid and  2) safe?  What kind of characters are allowed in an enum? Can I verify this with a regex?

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


Before line break  After line break   An empty line between two sentences usually gets me a line break without any additional spacing. For some reason, on the second page of the same chapter, there is additional spacing after each line break and also more spacing after \\.  Why is that? Is TeX somehow trying to fill the page before the following section? I'd like to constantly have no extra spacing after line breaks and \\.

Here is the thing, I have always used a blank space between paragraphs in order to tell latex that there is a new paragraph. But there is someone I work with very often that keeps using \\ to break a line after a paragraph...  This is really annoying so I wanted to know if there is a real advantage of using \\ over just leaving a space.  Note that I am not referring to the paragraph environment, but to the simple term paragraph.


I searched through many discussion on Physics Stack Exchange about "Why observation cause collapse of wave function?" and I am totally confused. Is it already solved by modern quantum physics?  I know that the real cause is act of measurement. So collapse of electron wave function is caused by interaction between this electron and photon from detector used for measurement? It sound quite clear for me, that the "interaction" cause collapse, am I right? So where is the catch? Because there are so many discussion about it, some peoples points that consciousness cause collapse... I don't where the real problem is if the answer is so simple: "interaction"?  From the other hand, if we send photons to interact with electron, without measuring it, will it still cause collapse?  UPDATE, after marking as duplicate:  I know that the act of measurement cause collapse of wave function. Basically measurement means probing sample electron with photon and that interaction cause collapse, am I right? So what about other particles in environment, will those particles cause wave function collapse?   Going one stop further:  In double slit experiment with electron, if we don't measure electron state but rather than that we interact with if via laser - bombard it with photons, still there are no measurements! Will it cause collapse of electron wave function?

In one of the first lectures on QM we are always taught about Young's experiment and how particles behave either as waves or as particles depending on whether or not they are being observed. I want to know what about observation causes this change?


We already have loads of prior duplicate data in our salesforce.com records. Say close to 5000 among 100000 records . Our new requirement states to prevent any new data being saved as another duplicate to 100000 ones that are already existing. I tried using a workflow, but only duplicate data to ones created after the work flow is getting prevented, isn't working for the ones prior. Also we have fields A and B to be jointly unique for this to be a duplicate.  Suggestions are welcome.

I need to see an apex code of trigger, on say object 'Account' to prevent any new records from saving. Existing records do have duplicates but we cannot clean/ remove the data, as the requirement has come midway.  The unique feature applies to 2 fields say A(picklist) and B(text) of object Account, (concatenated) where A is a picklist, having values 1,2,3,4 where we need only values (TEXT) 1,2,3 of A to be unique alongside (concatenated with) text field B, and not the value 4.  Again, the requirement is to prevent any new records from saving which match any of the existing records. Duplicates within the existing records can be ignored.  Thanks in advance.


How is free body diagram of a block on an inclined plane different than that of a vertical circle (string connected to a block doing circular motion in vertical direction) and a banked road  Because there are two types of results in both cases:- T(tension)/N(Normal Reaction) cos [some angle]= mg And  Mg cos[some angle]= N/T !()

Normally, if an object of mass $m$ is inclined to the horizontal at an angle $b$, we set the reaction force of the object on the inclined plane as $R = mg\cos{b}$ (if we resolve the force of gravity so the line of action coming out of the plane is perpendicular to it).  However in circular motion*. it's assumed that $R\cos{b} = mg$. In the example above, one would have to do this in order to arrive to the correct answer, instead of $R = mg\cos{b}$. Using $R = mg\cos{b}$ seems natural enough, as I am resolving vertically, however, both equations would produce two different values for $R$. Why is this?   To show what I mean: If we set the reaction force in this question as $mg\cos{a}$, then the centripetal force will be $mg\cos{b}\cos(\pi/2-b) = mg\cos{b}\sin{b} = \frac{1}{2}mg\sin(2b)$   Whereas If we use $R\cos{b} = mg$, $R = mg\sec{b}$ and the centripetal force will be $mg\sec{b}\sin{b} = mg\tan{b}$. This will end up with two different values for the radius of the circular motion, and hence two different final answers.  *In the circular motion questions I've seen in my mechanics module


Is somehow possible to run Ubuntu with both graphics cards like in Windows ? I tested Linux Mint and he recognized both graphic cards and at details about my computer it was showing them both, but in Ubuntu only shows Intel (integrated).I like Ubuntu and I wish I could use both cards on it because I need power on video and photo editing. I apologize if the question is stupid, I'm new in the Linux world.  My computer (Acer 5755g from 2011) details are :   Procesor      : Intel® Core™ i5-2410M CPU @ 2.30GHz Ram           : 8 GB Video         : Nvidia 540m 2gb and Intel (integrated) Hdd           : 650 GB. OS            : Ubuntu 13.04 the 64 bit version.

I am considering buying a Dell XPS 15 laptop. The laptop has a Nvidia 420m card which should work with Linux but I keep reading that the Nvidia Optimus technology isn't supported on Linux. I am not really interested in switching from Nvidia to Intel to save power but need to know that the Nvidia card will in fact work if I installed Ubuntu.  If anyone has experience using a Nvidia card with Optimus technology or even better the exact laptop in question (Dell XPS 15 with 1GB NVIDIA® GeForce®  GT 420M) it would be great.  A major problem holding people back from adopting Linux is this sort of hardware issue. I am a long term Ubuntu user and supporter who can't afford to make a mistake with a purchase like this. I don't want to spend £500+ to find I have no graphics acceleration because Windows 7 is not an option.


I occasionally open an incognito window on my  just to check if there are any interesting questions on tags I have ignored. Today a large number of negatively-scored posts have been edited, and when I visited the homepage I saw only 3 posts, instead of the expected 15 (see image below).  Checking against the most recently active questions page, these 3 are the only non-negatively rated questions in the most recently active 15 questions. Does it make sense to filter out the negative questions after picking the set of 15?  It seems counter-intuitive to me, and I would instead expect to see the most recently active 15 questions that are not negative. (It also doesn't look great to show a potential new user just 3 questions; the site looks a bit abandoned.)

At the moment questions on the homepage are loaded by the top N most recent and then ones with a score of -4 or less are filtered out. This doesn't make much difference for a user who is logged in but consider anonymous users; their home page is only 15 questions in length. If someone was to edit several posts that bump to the top with a score of -4 or less then the home page looks tiny. At the moment on SFF, for example, the homepage for anonymous users only shows 9 questions:  At one point it only showed 3 questions (a few weeks back):  Can the filtering logic be changed to before the questions are loaded to appear on the homepage?


I am on the bash shell and I want the output of a command to appear directly in the command prompt that appears after the command has executed !  Example of what I envision it, to illustrate my idea:  locate create_tables.sql|MAGIC_command user@localhost:~# /usr/share/doc/phpmyadmin/create_tables.sql   Now, using comman dsubstitution like this  sudo $(locate create-tables.sql)   works but  immediately executes the output, I'd like to be able to edit it before. Is there a way?

I managed to do this  echo -n "command" > /dev/tty1  The letters appear, and the cursor moves, but they are "ghosts" – if you hit Enter, nothing happens (they are not in stdin).  Edit:  In the middle of the below screenshot, you see why I see the use of this. (The line with a red caption, right below the line with a yellow caption.) As it is now, you are not really "editing" the note text; you are just asked to write a new text, which will replace the text of the note you are (not really) editing. Thus, I thought it could be remedied by simply pasting the old text into the tty: if the user hits enter, no modification is made. (This program is in Perl/MySQL, but I thought it would be more interesting to ask for a general solution than "how do I do this in Perl".)    Edit 2:  Here is the Perl code, that uses the C code below (works exactly as intended), as well as a new screenshot – hopefully this will clarify things beyond doubt :) Again, look at the middle of the screenshot, where the edit is made to the note text - this time around, the old text is there, for example if you just wanted to fix a typo, you won't have to retype the entire note text.  my $edit_note_text = $edit_note_data[2]; print BOLD, RED, " new text: ", RESET; system("writevt /dev/tty \"$edit_note_text\""); my $new_text = <$in>; $new_text = fix_input($new_text); my $set_text = "UPDATE notes SET note = \"$new_text\" WHERE id = $edit_note_id"; $db->do($set_text);


If a system requires a patch that I found upstream, how can I tell which version of an Ubuntu package contains the commit that includes that patch?

Let us consider the example of Clang. ABI compatibility of Clang diverged from GCC5 and compiling things with Clang became quite a challenge in Ubuntu 16.04. At some point, .  Clang 3.8 is also available in Ubuntu repos, and when I add  myself and update source list and try to install Clang-3.8, the version from Ubuntu repos gets installed as the latest (apt is set to always prefer the highest version).  Without trying to compile code with it to see what happens, is there a good way to check if that patch is already in the Ubuntu repos or not?


The most recent "fixs" that I have found and tried to no avail.  first things first secure boot was deactivated then the following steps were taken.  sudo apt update  sudo apt dist-upgrade  reboot  no luck, also tried.  sudo apt-get update  sudo apt-get install broadcom-sta-dkms  reboot  no luck again  as well as others that have seemed to fix the problem for other people but still not me. I have installed pastebin and have run   wget -N -t 5 -T 10  && \  chmod +x wireless-info && \  ./wireless-info  as another forum suggested but I am unsure where to go or what to do next. Help please!

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


Can someone explain why the geometric mean is less than the logarithmic mean? $$\sqrt{ab} \leq  \frac{b-a}{\log b-\log a} $$

I have seen the following inequality  $$ \frac{x - y}{\log x - \log y} > \sqrt{xy} \ , \quad \forall x>y $$ be stated as a near "obvious" fact in another , on the site.  The inequality is very cute, but so far I have not been able to prove it.  It reminds me of the Lipschitz inequality, but has some minor differences. Also Jensens inequality comes to mind. Is there something obvious I am missing, or is this ineqality not as easy to prove as it looks?


Experimentally I know that two monocromatic beams of different colors or orthogonal polarizers do not interfere with each other (so the interference coefficient is zero). Theoretically, why does that happen? Thanks in advance!

The book I'm reading about optics says at some point that "each color (wavelength) contained in the white light interferes only with itself". But why is this so?  Edit: I moved the rest of the question .


In regard to these questions        and      I would like to know, how I can customize the pasting of additional brackets.  Example: Instead of showing , Latex should display  when I use \autoref.  Minimal coding example:  \documentclass[journal,comsoc]{IEEEtran} \usepackage[T1]{fontenc}% optional T1 font encoding \usepackage{graphicx} \usepackage{amsmath} \usepackage{url} \usepackage{enumitem} \usepackage{setspace} \usepackage{color,soul} \usepackage{siunitx} \usepackage{float} \usepackage{subcaption} \usepackage{cleveref} \usepackage{hyperref} \interdisplaylinepenalty=2500  \usepackage[cmintegrals]{newtxmath}  \begin{document}  \begin{figure}[htbp!]      \centering      \begin{subfigure}{0.2\textwidth}         \includegraphics[width=\textwidth]{Pictures1}         \caption{Nice image1}         \label{fig:NiceImage1}     \end{subfigure}     \hfill     \begin{subfigure}{0.2\textwidth}         \includegraphics[width=\textwidth]{Pictures2}         \caption{Nice image 2}         \label{fig:NiceImage2}     \end{subfigure}      \caption{Two images}      \label{fig:NiceImage}  \end{figure}   \autoref{fig:NiceImage1} % Latex should display and reference to Figure 1(a)   \end{document}   I am sorry, if this is a duplicate of an already answered question!

\usepackage{subcaption}     \begin{figure}[t]     \begin{subfigure}{1\linewidth}     Figure1     \caption{Hello}~\label{fig:TBS}     \end{subfigure}     \begin{subfigure}{1\linewidth}     Figure2     \caption{Hello1}     \end{subfigure}~\label{fig:TBSCompensate}     \caption{BigHello}     \end{figure}   Following is the what appears:    When I use Figure~\ref{fig:TBS} to refer the figure It appears Figure 2a in the pdf, I wish that it could appear as Figure 2(a), is the a way to tweat the formatting of caption for subfigure?


I'm working on a lighting product catalogue with products from many overseas suppliers. In regards to colour temperature, some of them put a space character before Kelvin symbol, some not:     4000K, 5600K     or       4000 K, 5600 K   Is there any official recommendation here?  Edit: It was suggested that this question is a duplicate of similar question related to computer symbols, suggesting it depends on style, and I happily agreed and considered that question as answered. However just now I've just found that there actually is an official recommendation related to SI unit symbols. Which makes the situation different than with units of computer storage.

Forgive me if this has already been asked, I could not find it via search.  My question is this: what is the proper way to append computer storage abbreviations to a number? For example, a 500 gigabyte hard disk drive will usually be spelled as "500GB" on web sites, with no space, but occasionally I see "500 GB", with a space between the number and the unit. Putting a space between the number and the abbreviation makes more sense to me, but since  does not put a space between them, I am not sure. Which is the proper way?


How can I have two different profiles, with two different skins, in Minecraft? My two daughters want to play, and I don't want to download two copies of the game, or buy two accounts. They would be playing from different computers, too.

I just bought Minecraft. Now, my brother wants to play with me but my Mom doesn't want to buy another. We use the same Wifi network. Can we do this?


If I were to win the election, I would restore the vitality of downtown area.  In the above sentence, I understand that it's a hypothetical situation so it comes with "I were" and "I would". However, I don't understand the use of "were to". What is the intended meaning of "were to" here.

The Prime Minister said: "I have indicated in opening remarks that I do not intend to be Prime Ministerial candidate if the UPA were to come to power after the general elections. BJP leader Narendra Modi will prove to be "disastrous" for India if he were to become the Prime Minister, Prime Minister Manmohan Singh said.  What does the use of were to in above sentences indicate? If I don't use were to, does it then mean something different? Or can I use only were instead?


I am facing a peculiar issue while making changes to lightning web component. Once the changes are done and deployed on to higher orgs, for some users the new javascript changes are not reflecting and the LWC is executing the older version of the javascript. Since Salesforce caches the definition of the LWC, it executes the outdated version of the javacript which is stored in the browser cache.  The issue is resolved only by clearing the browser cache for all the impacted users which is not a feasible solution for production. Is there a way that the definition for LWC can be refreshed from the server so that the LWC always executes the latest code?

I am developing a LWC, using Visual Studio, so I am frequently deploying JS, HTML and CSS file to the org. As a browser I use Chrome (latest version) under Windows 10.  What I am seeing: not updated or even previous versions of JS/HTML/CSS being active instead of the most recent sources. As a standard procedure I press Ctrl-F5 everytime the deploy is completed, but that is not always enough. Sometimes I have to restart the browser and even then it does not always work.  What is a sure-fire way of making the browser use the latest sources?


I started using sed to replace text in files, to make it easier to mass change the contents of files, and I have each value that needs to be set as a variable with BASH and the replacement as a function that calls all of the variables to replace the existing text. Example~  sed -i -e "s/$answer/$FORME $answer/g" ~$answer.txt   $answer is the variable input with the command in terminal. $FORME is a variable that is defined depending on the input of $answer, however $FORME contains "/" and I have been browsing online and can't find a way to replace using variables that contain special characters. When I try to use the command on $answer's that create $FORME with a special character displays this error:  sed: -e expression #1, char 15: unknown option to `s'   I'm assuming that means that the special character in $FORME is registered as part of the actual command, not a string to replace. Please help!  Thanks in advance!

I have a script that reads a text stream and generates a file of sed commands that is later run with sed -f. The generated sed commands are like:  s/cid:image002\.gif@01CC3D46\.926E77E0/https:\/\/mysite.com\/files\/1922/g s/cid:image003\.gif@01CC3D46\.926E77E0/https:\/\/mysite.com\/files\/1923/g s/cid:image004\.jpg@01CC3D46\.926E77E0/https:\/\/mysite.com\/files\/1924/g   Assume the script which generates the sed commands is something like:  while read cid fileid do     cidpat="$(echo $cid | sed -e s/\\./\\\\./g)"     echo 's/'"$cidpat"'/https:\/\/mysite.com\/files\/'"$fileid"'/g' >> sedscr done   How can I improve the script to ensure all regex metacharacters in the cid string are escaped and interpolated properly?


I need to find a string element in my array but when I check to see, it always comes up as found, even if its not the case. I am trying to call a method.      String name = "";     boolean result = false;        if (option == 5)             {         System.out.println("Please enter a students name");         name = input.next();          linearSearch(student);           if (result = true)         {System.out.println(name+" found in element ");}          else         {System.out.println(name+" not found in element ");}       }   public static boolean linearSearch(String b[]) { String key = null; boolean searchReturn = false; for(int i = 0; i < b.length; i++) {     //if key is found - return position of key i.e. n     if( b[i] == key)     searchReturn = true; }  return searchReturn;

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I cannot figure out, why the exact same Python code is giving different results in Java. I mean is there any difference in the array handling of the two languages or something that I am missing in the following codes.   In the following codes (i.e., trying to solve ), java  gets accepted while Python gets rejected. I checked out for possible failure cases: for uniquePaths(7,3) Python is returning result 7 but Java is returning 28 (which is the correct answer).   I tried to debug and find for any possible differences in the code that's causing the difference, but no luck.   Can anyone please provide some insight for such behavior or any mistake on my implementation? Thank you   ** Java Code** ::  class Solution {     public int uniquePaths(int m, int n) {         int[][] dp = new int[m+1][n+1];           return pathHelper(1,1,m, n, dp);     }      private int pathHelper(int loc_x, int loc_y, int m, int n, int[][] dp){         if(loc_x==m && loc_y==n)return 1;          if(loc_x >m || loc_y>n)return 0;          if(dp[loc_x][loc_y] != 0)return dp[loc_x][loc_y];          int count = pathHelper(loc_x + 1, loc_y, m, n, dp) + pathHelper(loc_x, loc_y+1, m, n, dp) ;          dp[loc_x][loc_y] = count;          return count;       } }   Python Code ::  class Solution(object):     def uniquePaths(self, m, n):         dp = [[0]*(n+1)]*(m+1)          return self.pathHelper(1,1,m, n, dp)      def pathHelper(self, loc_x, loc_y,  m, n, dp):         if(loc_x==m and loc_y==n):             return 1          if(loc_x >m or loc_y>n):             return 0           if(dp[loc_x][loc_y] != 0):             return dp[loc_x][loc_y]          count = self.pathHelper(loc_x + 1, loc_y, m, n, dp) + self.pathHelper(loc_x, loc_y+1, m, n, dp)          dp[loc_x][loc_y] = count          return count

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


Let $x_{n} = \sqrt{1 +\sqrt{2 + \sqrt{3 + \dots \sqrt{n}}}}$.  show $\lim_{n \rightarrow \infty} x_{n}$ exists.  To do this the problem has been broken down into three pieces:  a) Show that $x_{n} < x_{n+1}$ (I've completed this)  b) Establish $(x_{n + 1})^2 <  1 + \sqrt{2} x_{n}$ Hint: square $x_{n+1}$ and factor a 2 out of the square root. (Having trouble with this)  c) Conclude that $x_{n} \leq 2$ and thus  $\lim_{n \rightarrow \infty} x_{n}$ exists. (Having trouble with this)  Attempts  Starting with part b):  After following the hint and doing some algebra the problem has been reduced to trying to establish that:  $$\sqrt{3 + \dots \sqrt{n + \sqrt{n+1}}} < 2 \cdot \sqrt{2 + \sqrt{3 + \dots \sqrt{n}}}$$  At this point we were given a "fact" that $\sqrt{2n} \leq n-1$  Here is where the confusion lies for me. I know I'm supposed to get a chain of inequalities, but I can't seem to breakdown the expression into the necessary parts. Some help here would be nice.  Part c):  I am stumped. Mainly because I'm not sure how to show that this is bounded above. I get the implication that once we establish that this sequence is bounded above, then by the monotone convergence theorem we can establish the sequence converges. My issue here is that at least on the surface taking the limit of the sequence $x_{n}$ it would seem that the  value would extend beyond 2 because I am summing up an infinite amount of objects. So....How should I proceed?

Let $x_{n} = \sqrt{1 + \sqrt{2 + \sqrt{3 + ...+\sqrt{n}}}}$  a) Show that $x_{n} < x_{n+1}$  b) Show that  $x_{n+1}^{2} \leq 1+ \sqrt{2} x_{n}$  Hint : Square $x_{n+1}$ and factor a 2 out of the square root  c) Hence Show that  $x_{n}$ is bounded above by 2. Deduce that $\lim\limits_{n\to \infty} x_{n}$ exists.  Any help? I don't know where to start.


The idiom 'Cross your Ts and dot your Is' is often written with apostrophes as though they were in the possessive forms:     Cross your T's and dot your I's   It's ubiquitous online, even on dictionary websites. But I don't understand why the apostrophes and don't know the rule of grammar that permits it. Can someone please explain the correct rule that governs writing it to me?

When writing (a blog post, script, etc..) what is the proper way to indicate two or more instances of a single letter? For instance, in Monty Python's Bookshop Sketch:     C: I wonder if you might have a copy of "Rarnaby Budge"?      P: No, as I say, we're right out of Edmund Wells!      C: No, not Edmund Wells - Charles Dikkens.      P: (pause - eagerly) Charles Dickens??      C: Yes.      P: (excitedly) You mean "Barnaby Rudge"!      C: No, "Rarnaby Budge" by Charles Dikkens.  That's Dikkens with two Ks, the      well-known Dutch author.      P: (slight pause) No, well we don't have "Rarnaby Budge" by Charles Dikkens      with two Ks, the well-known Dutch author, and perhaps to save time I      should add that we don't have "Karnaby Fudge" by Darles Chickens, or      "Farmer of Sludge" by Marles Pickens, or even "Stickwick Stapers" by Farles      Wickens with four M's and a silent Q!!!!!  Why don't you try W. H. Smith's?      C: Ah did, They sent me here.   I had always believed that plural never uses an apostrophe before the 's' (it's only used for possession), but I have rarely seen in written material the format "four Ms". (On a side note, whoever wrote  also used "two Ks".)  On a side note, and perhaps this should be a separate question, if a Compact Disc is a CD, then two Compact Discs would be two CDs right? (I see "CD's" written everywhere)


I inherited a Java-Application with many many hardcoded Strings that should have been localized. THe code-base is huge and I need an overview about all the used hardcoded String values in the code. Is there a tool (or an IDE-function; I use Eclipse and IntelliJ IDEA) that extracts all strings from Java-classes?

I have a rather big number of source files that I need parse and extract all string literals and put them in a file as play old java constant. For exemple:  Label l = new Label("Cat");   Would become:  Label l = new Label(Constants.CAT);   And in Constants.java I would have:  public final static String CAT = "Cat";   I do not want the strings to be externalized in a property text file. One reason is for consistency and code readability. The other is that our client code uses GWT, which does not support Java property text file mechanism.  I could write some sort of parser (using ant replace task maybe)? But I wondered if an IDE already does this sort of thing automatically.


I have 3 levels in my information architecture for my hamburger mobile menu. First level: 5 items Second level: 8 - 10 items in total Third level: 6 items Would you use an accordion style or a sequential drill down menu? and why?

I have 3 levels in my information architecture for my desktop dashboard. In the vertical navigation which measures H:500px W:200px I have;   Top level: 8 items Second level: 9 items in total (one of my top level item has 7 second levels) Third level: 12 items   Would you use an accordion style (which will make the menu long when expanded) or a sequential drill down menu? and why?  Cheers,  Chris


$$L=\lim_{x\to 1^{-}} \prod_{n=0}^{\infty} \left (\frac{1+x^{n+1}}{1+x^n}\right)^{x^n}$$ I found this limit as below $$L=\exp\left[ \lim_{x\to 1^{-}}\sum_{n=1}^{\infty}x^n \ln  \left (\frac{1+x^{n+1}}{1+x^n}\right)\right]=\exp\left[ \lim_{h\to 0}\sum_{n=1}^{\infty}(1-h)^n \ln  \left (\frac{1+(1-h)^{n+1}}{1+(1-h)^n}\right)\right]$$ Using binomial approximation: $(1+z)^\nu \approx (1+\nu z)$ where $|z|$ is as small as we please. Then $$L=\exp\left[ \lim_{h\to 0}\sum_{n=0}^{\infty}(1-h)^n \ln  \left (\frac{2-h(n+1)}{2-hn}\right)\right]=\exp\left[ \lim_{h\to 0}\sum_{n=0}^{\infty}(1-h)^n \ln \left (\frac{1-h(n+1)/2}{1-hn/2}\right)\right]$$ $$L=\exp \left[\lim_{h\to 0} \sum_{n=0}^{\infty}(1-h)^n \ln[(1-(n+1)h/2)(1+hn/2)]\right]$$ $$L=\exp \left[\lim_{h\to 0} \sum_{n=0}^{\infty}(1-h)^n \ln[1-h/2-h^2(n^2+n)/4]\right]=$$ $$L=\exp \left[\lim_{h\to 0} \sum_{n=0}^{\infty}(1-h)^n \ln[1-h/2]\right]=\exp \left[\lim_{h\to 0} (-h/2)\sum_{n=0}^{\infty}(1-h)^n\right]$$ $$\implies L=\exp \left[\lim_{h\to 0} (-h/2)\frac{1}{1-1+h}\right].$$ Finally, $$L=e^{-1/2}.$$ I would like to know if this answer is correct? Somehow numerical results do not seem to support this result!

Compute : $$L=\lim_{x\to 1^-} \left(\prod_{n=0}^{\infty} \left(\frac {1+x^{n+1}}{1+x^n}\right)^{x^n}\right)$$   My try:   Writing out the first few terms I noticed that the limit can be expressed as $$L=\lim_{x\to 1^-} \frac 12\left(\prod_{n=1}^{\infty} (1+x^n)^{x^{n-1} -x^n}\right)$$ $$L=\frac 12\lim_{x\to 1^-} \left(\prod_{n=1}^{\infty} (1+x^n)^{x^{n-1}}\right)^{1-x}$$  Converting to exponential form I get $$L=\frac 12 \exp {\left(\lim_{x\to 1^-} (1-x)\sum_{n=1}^{\infty} \left(x^{n-1}\ln(1+x^n)\right)\right)}$$  And got stuck here. I did try to use approximation $\ln x\sim x$ hereon to get final answer as $\frac {\sqrt e}{2}$ but I think it was improper to use approximation and hence I believe that the answer I got is flawed. I also noticed that the form I obtained is quite similar to be used for a Riemann Sum but I didn't get a way to tackle the problem using that way.  Can someone please help me with this problem....


Lets say I have this simple object:  var User = {     name: 'Hans',     get_name: function(){return this.name},      street: 'Kings',     postcode: '482932',     city: 'New York' }   For a better overview, I would like to do something like this:  var User = {     name: 'Hans',     get_name: function(){return this.name}, };  //Adress Information User.add({     street: 'Kings',     postcode: '482932',     city: 'New York' });   As expected this doesn´t work. To achieve somthing similar I could write:  User.street = 'Kings'; User.postcode = '482932'; .......   But I would like to add several attributes at the same time. Is there a handy function for it? Thanks

I need to be able to merge two (very simple) JavaScript objects at runtime.  For example I'd like to:  var obj1 = { food: 'pizza', car: 'ford' } var obj2 = { animal: 'dog' }  obj1.merge(obj2);  //obj1 now has three properties: food, car, and animal   Does anyone have a script for this or know of a built in way to do this?  I do not need recursion, and I do not need to merge functions, just methods on flat objects.


In Thor: Ragnarok, we see Thor and The Valkyrie discuss about his returning to Asgard. She says if Hela is truly there then Asgard is doomed. She also went on to say "Hela draws her power from Asgard as well as you." Is this true and if so what is the case now that Asgard is destroyed?

In Thor: Ragnarok, Valkyrie told Thor this about Hela:  Her power comes from Asgard the same as yours  Thor's plan was to unleash Surtur who destroys Asgard, which weakens Hela allowing Surtur to kill her. But why didn't that weakened Thor as well? We saw him later in Avengers: Infinity War very powerful.


In the scene in Harry Potter and the Deathly Hallows: Part 1 where multiple Harrys are created with polyjuice potions, why was the choice to become multiple Harrys?  Wouldn't random muggles be far easier to smuggle than multiple Harrys?  Why was Harry the face of choice?

In Harry Potter and the Deathly Hallows Part 1, it is shown that members of the Order of Phoenix come to rescue Harry from his house at Privet Drive. There, they all drink Polyjuice Potion and assume the form of Harry to confuse death eaters in identifying who is the real Harry.  An obvious, more safe, better choice would be to change Harry into someone else. Maybe a muggle, like his cousin Dudley. And then, safely take him to the Weasleys, maybe apparating. That way, death eaters won't ever find out. Isn't that correct?  Why didn't they take this path, and follow a rather complicated and risky one?


I know I can check the currently installed non-free software with the following command (assuming aptitude is FOSS):  aptitude search '?installed (?section(restricted) | ?section(multiverse))'   And I can remove the "restricted" and "multiverse" sources (and not add any PPA's) to keep that list empty. I'm assuming from this point, whenever I apt install something, that something is either in the allowed sources or it is not found.  Is this enough? Does this make sure all software I'm running (in Ubuntu) is open-source?

When installing Ubuntu, you get a Free software only option.  Does that Free software only  option mean Free as in beer  or Free as in freedom?  When I say free as in freedom, I mean  type of freedom.    Image source:


I am trying to create example of GUI that's delete files and/or directories When user clicks on Button, but I see that files deleted permanently, How to make it moves to recycle bin instead of this    if (File_path.getText().isEmpty()) {         JOptionPane.showMessageDialog(null, "Please select a file or directory", "Info", JOptionPane.INFORMATION_MESSAGE);     } else {         File FileName = new File(File_path.getText());         boolean FileDeleted = FileName.delete();         if (FileDeleted == true) {             JOptionPane.showMessageDialog(null, "File Deleted Successfully", "Info", JOptionPane.INFORMATION_MESSAGE);         } else {             JOptionPane.showMessageDialog(null, "File Not Found", "Info", JOptionPane.INFORMATION_MESSAGE);         }     }

Java is the key here. I need to be able to delete files but users expect to be able to "undelete" from the recycle bin.  As far as I can tell this isn't possible.  Anyone know otherwise?


How can I remove the number of a chapter (preface) both in the table of contents and the first page of this chapter?

I'm using the report document class for a thesis, and I need to add things like "Acknowledgements" and an "Introduction". I noticed that there is an \abstract command which would have been wonderful if applied similarly. How do I add these without messing up the chapters' numbering while being picked up by the ToC in proper order and page numbering?