Why was Bilbo not discovered by Sauron during his extended stay with the Wood Elves?

Currently reading The Hobbit to my daughter, and we came to the Barrels out of Bond chapter where the Dwarves are captured and imprisoned by the Wood Elves. Bilbo sneaks in with his magic ring of invisibility and eventually sets them all free.  But here's what piqued my curiosity: in the chapter it makes clear that Bilbo wore the one ring constantly for a very extended period of time: it specifically states he was down there at least two weeks and then - it's much less clear - possibly for even longer while he came up with and implemented his plan to rescue the Dwarves.  However in The Lord of the Rings, Frodo is constantly terrified of putting on the ring lest he (and the ring) should be located by Sauron. So why does Bilbo, wearing the ring for several weeks, escape detection?  The obvious thought is that Sauron was simply not powerful enough at this time. But that seems a pretty thin claim in many ways. Sauron was powerful enough to be "recognised" as a dangerous sorcerer in his guise as the Necromancer, and to start to gather his followers together. You'd have thought that simply locating the Ring would require a pitiful amount of comparative effort.  Furthermore I believe it's implied in The Lord of the Rings that it becomes increasingly dangerous to use the Ring the closer it gets to its maker (I don't have a reference for this - might be my imagination). If so, things become even more inexplicable since Thranduil's palace wasn't actually all that far from Dol Guldur, where Sauron was holed up.  Any explanation? Or do we have to chalk it up to the poetic license due to a world in development?


I've got two functions, each with a variable called s (In this case). When I instantiate one function it's fine, but when I instantiate the other one right after, the second one overrides the first's s.  Code:  t1 = function(){     s = 2;      Object.defineProperty(this, "test", {         value: function(){             console.log(s);         },         configurable: false     }); } t2 = function(){     s = 42;      Object.defineProperty(this, "test", {         value: function(){             console.log(s);         },         configurable: false     }); }  var t = new t1() t.test(); // 2  var y = new t2(); y.test(); // 42  t.test(); // 42   Why is this, and how can I fix it?


A pair of alien "door-to-door salesmen" comes down to Earth and meets a citizen. They show him some interesting but unsuitable wares, and then a small, cylindrical device that softens any metal that it is applied to, to the point where a person could manipulate steel like putty. The metal can be hardened again after the desired shape is attained. Very useful for hobby sculpture, the traders say. The Earthman "drives a hard bargain" -- in reality, both sides are satisfied -- for a promised delivery of, say, ten thousand of these devices.   But it turns out that the device isn't hard to duplicate, and soon anyone who wants one can have one. Pranksters are a problem, and as railways are softened and a suspension bridge is left sagging, more than just an irritant. By the time the traders return, many years later (the deal didn't include a due date), terrestrial civilization has collapsed and tribesmen threaten them with stone-tipped spears. They look at each other and one says, more or less, "What are we going to do with a cargo of ten thousand metal softeners?"  I read this English-language story probably in an anthology during the 1960s, or at latest the 70s.


Plot data points with 'linespoints' but lines should have gaps

I have asked following question on stackexchange regarding a gnuplot solution: .  The question is about using following linestyle for data plots:    Gnuplot apparently has issues by blanking-out of the underlying curves and currently there is no solution within gnuplot.  Can pgfplots plot in a similar way without this issue?


How to make foam with bubbles (beer, bath)

My goal is create realistic foam. I mean really realistic foam with bubbles, no only SSS shader and done :-).   Use particle system's is not enough, because bubbles overlaps and black artifact's appear.  Any ideas? Some reference images and something about bubbles:    EDIT:  I want this for 360° turntable animation. Bubbles and foam does not to be animated, but should be good keep reasonable render time.  Of course, if someone know how to make it animated I glad to learn it and I'm sure I'm not only one. But my priority is realistic look, not animation.  Only for clarification: I don't need to know how to make bubbles in beer (there is very good tutorial by Andy Price), please focus only on foam. Beer is not important.


How to prove the following statement: $\frac{1}{1-p}=\sum_{k=0}^\infty {p^k}$

I am revising for an exam and I am facing the following statement: $\frac{1}{1-p}=\sum_{k=0}^\infty {p^k}$  Unfortunately, I was not able to figure out why this is the case. May somebody of you quickly help me? I appreciate it a lot for a detailed explanation!


I have upgraded my mega ring, it's 8:15 and I can't find any mega stones. Is this a glitch? Will i have to restart my game, or buy a new one maybe? I've tried finding all of the stones on many occasions but to no avail. I'VE ALREADY UPGRADED MY MEGA RING AND ITS AFTER 8 AND BEFORE 9. Why is this happening?


Should I allow 'allow_url_fopen' in PHP?

We have a couple of developers asking for allow_url_fopen to be enabled on our server. What's the norm these days and if libcurl is enabled is there really any good reason to allow?  Environment is: Windows 2003, PHP 5.2.6, FastCGI


After battling a black screen and a boot loop I was able to boot my PC successfully. After using it a couple days, I understood that it doesn't connect to the internet anymore. And by that I mean it could ping 8.8.8.8 but none of the apps including the browser could connect to anything. I could not update any of the apps either as the update module gave me an error for unmet dependencies.  I tried a couple fixes without success.   I decided to say f it and install it fresh after backing up my files. Now that I'm trying to boot my PC and it's not going past the logo screen. What is the fix?


How to prove that a simple graph having 11 or more vertices or its complement is not planar?

It is an exercise on a book again. If a simple graph $G$ has 11 or more vertices,then either G or its complement  $\overline { G } $ is not planar.  How to begin with this? Induction?  Thanks for your help!


Finding a function $\mathbb{N} \to \mathbb{N}$ that is surjective but not injective.

The mapping is supposed to be from $\mathbb{N}$ to $\mathbb{N}$.  I'm still trying to understand if this is possible, I mean if it was from $\mathbb{R}$ to $\mathbb{N}$, I guess $x^2$ would work.


Can I be sued if I have a similar logo to a company

My logo is a similar looking diamond like this one of Diamond Supply Co. It's a really similar shape, but the inside markings are different, so my question is would I be sued if I have a similar logo?  BTW: I am in the same business as this brand (clothing)


How to access an Object property's name?

I am just wondering how can i get the property names from a js object. for example, in this case, how can i get "Athlete", "muscle-soreness" and "sleep-quality" ?   {     "athlete": [         "Jamie Anderson"     ],     "muscle-soreness": [         "5"     ],     "sleep-quality": [         "5"     ] }


i use spark-shell to run a simple code:   val sqlContext = new org.apache.spark.sql.SQLContext(sc) val test_data = sqlContext.read.json("music.json") test_data.registerTempTable("test_data") val temp1 = sqlContext.sql("select user.id_str as userid, text from test_data") val temp2 = temp1.map(t => (t.getAs[String]("userid"),t.getAs[String]("text").split('@').length-1))   Until here,it is all right. Then i want to save the result:  temp2.saveAsTextFile("test")   Then it comes out:      16/05/18 20:05:14 ERROR Executor: Exception in task 1.0 in stage 15.0 (TID 23) java.lang.NullPointerException     at scala.collection.immutable.StringLike$class.split(StringLike.scala:201)     at scala.collection.immutable.StringOps.split(StringOps.scala:31)     at $line62.$read$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$anonfun$1.apply(<console>:31)     at $line62.$read$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$iwC$$anonfun$1.apply(<console>:31)     at scala.collection.Iterator$$anon$11.next(Iterator.scala:328)     at scala.collection.Iterator$$anon$11.next(Iterator.scala:328)     at org.apache.spark.rdd.PairRDDFunctions$$anonfun$saveAsHadoopDataset$1$$anonfun$13$$anonfun$apply$6.apply$mcV$sp(PairRDDFunctions.scala:1198)     at org.apache.spark.rdd.PairRDDFunctions$$anonfun$saveAsHadoopDataset$1$$anonfun$13$$anonfun$apply$6.apply(PairRDDFunctions.scala:1197)     at org.apache.spark.rdd.PairRDDFunctions$$anonfun$saveAsHadoopDataset$1$$anonfun$13$$anonfun$apply$6.apply(PairRDDFunctions.scala:1197)     at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1250)     at org.apache.spark.rdd.PairRDDFunctions$$anonfun$saveAsHadoopDataset$1$$anonfun$13.apply(PairRDDFunctions.scala:1205)     at org.apache.spark.rdd.PairRDDFunctions$$anonfun$saveAsHadoopDataset$1$$anonfun$13.apply(PairRDDFunctions.scala:1185)   I have little experience using java. I wonder whether the problem is from my scala code or there is something wrong with config?


Regular Expression - Find all matches after string but before character

I have such a string :  CN=whatevername,OU=whatever1,OU=whatever2,DC=domain,DC=com   And I'm trying to get which is following "OU" until next comma. So in my example, I would like to receive "whatever1" and "whatever2".  I have tried this but it returns me the rest of the string until last comma.  (?<=OU=).*(?=,)   Thank you.


Evaluate integral of $\ln(\sqrt{x^2+1}+x)$

Evaluate: $\displaystyle\int\limits^{\cssId{upper-bound-mathjax}{\class{placeholder}{}}}_{\cssId{lower-bound-mathjax}{\class{placeholder}{}}} \ln\left(x+\sqrt{1+x^2}\right)\,\cssId{int-var-mathjax}{\mathrm{d}x}$   As of now, I am able to simplify it to   $\displaystyle\int\ln\left(x\right)   +  \int\ln\left(\sqrt{x^2+\dfrac{1}{x^2}}+1\right)$  Edit: The answer is  $x\ln\left(\sqrt{1+{x^2}}+x\right) - (\sqrt{1+{x^2}}) + C$


Does it make sense to create swap partitions for new installations nowadways?

For a desktop installation in a new and shiny laptop (let's say 16gb ram and ssd hd), does it make sense to have a swap partition?


Finding a limit using change of variable- how come it works?

I'm a student just starting calculus in college, and my math skills are pretty stale.  So... how come finding limits using change of variable works?  For example: $$\lim_{x \to 1}\frac{x\cos(x-1) -1}{x-1}$$  A way to solve this is to invent "out of thin air" $t = x-1$, and then the limit above is equal to: $$\lim_{t \to 0}\frac{(t + 1)\cos(t) - 1}{t}$$  How come this works? A limit is not an algebraic equation. what about domains of definition?  We are actually finding a different limit of a different function in a different place, how come they are equal (in general)?    just to clarify I'm not asking about this specific example. I'm asking in general, when can you do this to find limits? when not? and why?


Why are place names in some old books a capital letter followed by dashes, and what is this phenomenon called?

This is something very odd I have noticed in some older books, most recently in "Crime and Punishment" by Dostoyevsky.  Place names, when not specifically essential or well-known, are made up of one letter followed by a line of underscores (i.e. "X_____").  I think I recall reading something similar in another older work, possibly by Jane Austin?  Apologies if this is a duplicate; I've searched quite extensively and can't seem to figure it out.  I don't know a name for this, so can't search easily for it.


How can I prove the Bounded Convergence Theorem if pointwise convergence was changed to convergence in measure ??

This is from real analysis royden... State and prove the Bounded Convergence Theorem if "pointwise convergence" is replaced by "convergence in measure" this is the The Bounded Convergence Theorem Let $(fn)$ be a sequence of measurable functions on a set of finite measure $E$. Suppose ${fn}$ is uniformly pointwise bounded on $E$, that is, there is a number $M > 0$ for which $| fn |< M$ on $E$ for all $n$. If ${ fn } \rightarrow f $pointwise on E, then $\lim_{n \to \infty}  \int fn = \int f$ ? now how do we prove it if point wise convergence was changed to convergence in measure.  Definition Let {fn} be a sequence of measurable functions on E and f a measurable function on E for which f and each fn is finite a.e. on E. The sequence { fn} is said to converge in measure on E to f provided for each gamma > 0, limit as n goes to infinity m{ x belongs to E: |fn(x)-f(x)|>gama)}=0 Please I need help with the proof if you can give me the whole proof or hints please ASAP thanks in advance.


I have a US Xbox 360 (E series, for inquiring minds). From what I've read on , the 360 does NOT have a universal switching supply, but rather a 100-127V supply for US consoles (and presumably Japan, Canada, etc), and 220-240V supply for other countries using the appropriate voltage.  I'm looking at using a 220-110 step-down converter but have three concerns:  1) Power in Beijing is 220V/50Hz, correct? Will the Xbox 360 power supply care about the 50Hz/60Hz difference?  2) Will a 200W converter be sufficient? That should give 67% built-in overhead (the E series power supply is rated at 120W) but I want to be sure.  3) I will be staying in an apartment (not a motel/hotel); do most homes/apartments in Beijing have a universal outlet like , or only the AU/CN type outlets like ? Most converters I can find online that are grounded (the 360 power supply complains if it's not properly grounded, and I feel more comfortable having such a setup properly grounded anyways) have either a US/NEMA plug or a Euro/Schuko plug and I need to know whether I might need an outlet adapter.  Has anyone successfully used a US console in a 220V/50Hz country with a converter? I know the games are region-specific, but will have US games with me so that's not a concern.


What is going on the background of Decision Trees?

I'm trying to figure out what's going on in Decision Tree's background. I understand the Decision Tree's on classification problem but I don't understand the Regression problem on Decision Tree's.  What is going on the background in Regression problem with using Decision Tree?  For example, in the simple data,     (x1,x2,x3 labels,y output)   3.2,4.7,5.3,13.2 2.1,3.9,6.7,12.7 2.4,3.8,5.5,11.7 2.7,3.9,5.8,12.4   How can I draw the decision tree?How can I determine the rule of each nodes of the tree and what is the leaf nodes values?


Number of non negative integer solutions with additional restriction

Find the number of non negative integer solutions to $$x_1+x_2+....x_k=n$$ with the additional constraints $$x_i < s,  \forall i \in [1,k], i\in Z$$  This is how I tried.  The number of non negative integer solutions to $x_1+x_2+....x_k=n$ without the constraints is: (Call it $A_0$)  $$ n+k-1 \choose k-1 $$ This can be found using standard ball & stick argument.  We need to apply Inclusion Exclusion Principle Now:  Let $P_i$ be the property that the $i^{th}$ $x_i$ violates the constraints. Then let $A_i$ be the set of non negative integer solution of $x_1+x_2+....x_k=n$ with the additional constraint $x_i < s$ does not hold. i.e $x_i \geq s$ Then |$A_i$| is $n-s+k-1 \choose k-1$ (Is this correct?)  The number of required solution is then: $$|A_0| - |A_1 \cap .... \cap A_K|$$  Then by Inclusion Exclusion Principle: $|A_1 \cap .... \cap A_K|$ can be calculated   Now how to proceed from here? How do I get my final answer in terms of $n,k,s$


How can I add the Appendix to the tables of content?

I'm using the appendix package and the following lines in LaTeX:  \begin{appendix} \section{Supplementary Figures and Tables} \section{Selected Derivations and Proofs}  \end{appendix}   This yields to the following entry in the tables of content:   Supplementary Figures and Tables   XI Selected Derivations and Proofs    XII   However, it would be nice to have something of the following form in the tables of content:  Appendix   Supplementary Figures and Tables   XI Selected Derivations and Proofs    XII   So basically, I would like to have the title Appendix to show up in the tables of content but without a page number.


Permission denied error executing C++ files stored in a windows 7 (NTFS) partition

I am a newbie to ubuntu and trying to compile and run C++ programs in Ubuntu terminal and in CodeBlocks (Ubuntu 14.04). I get the permission denied error when executing. I understand that the file/folder permissions are the issue here. I tried using chmod to allow executable permission to my cpp folder, which is a folder in one of my my windows partitions (win 7, dual booting).   chmod -R 777 /media/sandun/Data/cpp/   It doesn't give an error but not working. I searched more and more and found that I should mount the partition in ubuntu which is given in the link below.  I didn't try that yet. I am wondering whether it will work or effect the file system on windows partition. Or is there any other alternative? Thanks a lot.


ASUS PU301LA Ubuntu Installation: NMI: watchdog: BUG: soft lockup - CPU#0 stuck for 22s!

Ok so I'm trying to install ubuntu onto my laptop that I've just received. The error in the title occurs as soon as I click install ubuntu. Once or twice its let me get further than for example it allowed me to 'Try ubuntu without installing' once and its also gone through the full installation once however on booting on installing the error in the title occurs and there is no clear reason as to why that is on various posts with the same issues (on other websites).  Some people have stated that it has something to do with the power supply and others are stating that its fixed by updating the kernal however I cannot update the kernel without actually managing to load linux and of course its a laptop so changing the power supply is out of the question.  Does anybody have a clear fix as to why it won't install?


Please tell me which choice below (or rather a better choice that I need to know) works better in my sentences in informal English:     I got myself out on a limb. I need to clear my check by tomorrow. No matter how, I must ............ 2 million bucks by tomorrow.   a) line up [to prepare, organize, or arrange something]  b) hook up [hook somebody up with something to help someone get something that they need or want]  c) fix up [to arrange for someone to have something that they need]  For me, all three options work in this sense with the same meaning and informality degree.


Product of all elements in finite abelian group equals its own inverse

Let $G = \{e, a_1, a_2, \dots, a_n\}$ be a finite abelian group and let $S$ be the set of all the elements of $G$ which are not equal to their own inverse. The set $S$ can be divided up into pairs so that each element is paired off with its own inverse. Prove that $(a_1 a_2 \dots a_n)^2 = e$.   Every $x$ in $G$, outside $S$ abides by $x^2 = e.$   Let $a_i$ be in $S$. Since $G$ is abelian, we have  $a_ia_i^{-1} = a_i^{-1}a_i$  $e = a_i^{-1}a_i$  Since $a_i^{-1} = a_i$, $a_i^2 = e.$  Thus, $\dots a_i^2a_j^2\ldots a_n^2 = e.$  Does that make sense?  edit:  We need to prove $a_1a_2...a_na_1a_2...a_n = e$, right? Let $a_i$ be in $G \setminus S$. Then $(a_i)^2$ is $e$, is it? If we rearrange the elements on the left side of the equation above according to what belongs to $S$ and what belongs to $G \setminus S$ and take the product of all the $(a_i)^2$, then every element belonging to $G \setminus S$ will  be cancelled in the right side of $a_1a_2...a_na_1a_2...a_n = e$. So, we only need to consider the elements in $S$. Suppose $a_j \in S$. Let $a_k$ be the inverse of $a_j$. We need to prove $(a_j)^2 \cdot (a_k)^2 = a_j \cdot a_j \cdot a_k \cdot a_k = e$. Since $S$ is abelian , $a_j \cdot a_j \cdot a_k \cdot a_k$ can be rearranged as $a_j \cdot a_k \cdot a_j \cdot a_k$ which is $e$.


Let $f\in C^2(\mathbb [0,1],\mathbb [0,1])$ such that $f(0)=f'(0)=f'(1)=0$ and $f(1)=1$ Prove that  $\max_{[0,1]}|f''|\geq 4$  Progress Applying Cauchy mean value theorem three times proves the existence of  $\xi\in (0,1)$ such that $f'(\xi)=1$ $\eta\in(\xi,1)$ such that $\displaystyle f''(\eta)=\frac{1}{\xi-1} <0$ $\beta\in(0,\xi)$ such that $\displaystyle f''(\beta)=\frac{1}{\xi}>0$  If $\displaystyle \xi\leq \frac{1}{4}$ or $\displaystyle \xi\geq \frac{3}{4}$, we're done. What about other cases ? I haven't used the continuity of $f''$ yet...


Is there no way to use Google Translate to translate InDesign files? I would like to translate my text boxes from English to a few other languages, and save each language as a different file.


How to append to title via functions.php for auto-posting plugin

What I've got so far  I've finally got the functions.php plugin to append a string to custom post titles of a certain post type with this function:  function append_album_review_to_title( $title ) {     global $post;     $text = 'Album Review: ';      if ( get_post_type( $post->ID ) == 'album_review' && in_the_loop() ){         return $text . $title;     }     else {         return $title;     } } if(function_exists('add_filter')) {     add_filter('the_title', 'append_album_review_to_title'); }   and though it does almost everything I need it to, it still doesn't append the string to titles as they are posted via auto-posting plugins.  The Problem  The plugin I am using is NextScripts: Social Networks Auto Poster and everywhere I can see the title, the desired string is appended but when this plugin auto-posts, the string is not appended.  The Question  How can I change my function to also apply to the titles as they are output by auto-posting plugins?    UPDATE 1  Why in_the_loop()?  I use in_the_loop() because if I don't, the string gets appended to seemingly every link on the page.   I think this may happen because the post_type I am appending to is a custom type.   I just tried removing it, and of course "Album Review: " was added to every single link on the page.  Will %FULLTITLE% only work with manual <meta>s?  I tried using %FULLTITLE% without manual <meta> tags as you described, but it doesn't seem to append the string.  The reason why I bothered to try it this way is because YOAST plugin (as you said) not only already includes these tags, but because it already appends "Album Review: " to the title where necessary.  So, when I inspect source, in the <head>, the tags are like:  <meta property="og:title" content="Album Review: [the rest of title]">  Is YOAST's appending not enough, and I need to do the manual tags?  (Apologies for this form of communication; WordPress StackExchange still won't allow me to comment or upvote.)


Focal length measurement and definition in DSLR cameras

So i am a bit confused when it comes to focal length in DSLR cameras. According to multiple sources online i found and as per NIKON "It is a calculation of an optical distance from the point where light rays converge to form a sharp image of an object to the digital sensor or 35mm film at the focal plane in the camera".  However according to other explanations it is the distance from the lens to the point where light converges  Therefore my first question is this. If the focal length is the distance from the convergence point to your camera sensor and since the image is the sharpest where the refracted beams of light meet how is the image not blurry since the location of the "intersection" is different from the location of the sensor.  Therefore to put it plainly, since through the pentaprism we are viewing a perfectly clear/focused image is the converging point at the prism, the sensor  or somewhere else. Lets keep it simple by talking about a 50 mm lens.  Secondly how is technically and inside the camera the refraction amount by the lens translated to a wide angle or telephoto lens.  I apologise for the confusion.  Thank you


How to print a user's first name and last name in a Lightning Component?

 Owner Information

$User.FirstName

$User.LastName


I have a requirement, if I execute a script ./123 with an arguments of empty path, say /usr/share/linux-headers-3.16.0-34-generic/.tmp_versions(this directory is empty). It should display "directory is empty"  My code is:  #!/bin/bash dir="$1"  if [ $# -ne 1 ] then     echo "please pass arguments"  exit fi  if [ -e $dir ] then printf "minimum file size: %s\n\t%s\n" \  $(du $dir -hab | sort -n -r | tail -1)  printf "maximum file size: %s\n\t%s\n" \  $(du $dir -ab | sort -n | tail -1)  printf "average file size: %s" du $dir -sk | awk '{s+=$1}END{print s/NR}' else    echo " directory doesn't exists" fi  if [ -d "ls -A $dir" ]  then     echo " directory is  empty" fi   I have an error displays like, if I execute the script name ./123 /usr/src/linux-headers-3.16.0-34-generic/.tmp_versions (this directory is empty).  minimum file size: 4096     /usr/src/linux-headers-3.16.0-34-generic/.tmp_versions maximum file size: 4096     /usr/src/linux-headers-3.16.0-34-generic/.tmp_versions average file size: 4   instead of showing output only "directory is empty" its shows the above output  The below output has to be display if I exceute the script with correct arguments( I mean with correct directory path). say ./123 /usr/share  minimum file size: 196         /usr/share     maximum file size: 14096         /usr/share     average file size: 4000   my expected output is: ./123 /usr/src/linux-headers-3.16.0-34-generic/.tmp_versions  directory is empty.


Why is the "Arnold Schwarzenegger" terminator referred to by two different product numbers (T-101, T-800)?

In the original film, The Terminator, Schwarzenegger's character was a "Cyberdyne Systems Model 101". Likewise for Terminator 2 & 3.  However, in the video game adaptation of Terminator 3, this same cyborg is referred to as a T-800. Terminator: Salvation reused this same model name.  Was there ever an explanation as to how this paradox originated? Or was this just the most embarrassing fluke in film writing history?


l = [1,2,3,4,5,6,7,8,9,10]   I have a list and I need to print 5 elements per line to get:  1 2 3 4 5 6 7 8 9 10   I tried everything but I'm stuck, help!


is it possible to have a chaotic evil paladin?

My party has a chaotic evil paladin in it. He is constantly trying to kill other members of the party and it's getting really annoying.  Is it even possible for him to be a chaotic evil paladin, according to the rules?


Why does glass/plastic reflect with a dark background

This might be a possible duplicate( I couldn't find a similar question though).  While travelling through trains/cars, we often pass through non-luminous  patches,as in tunnels or even at night. What I noticed, was that in such cases, the glass tends to act more like a mirror. I can partially see outside, and partly see my own reflection.   To generalise this observation: A transmitting medium like glass or plastic sheets, tend to behave like mirrors, whenever there is an imbalance in illumination on its opposing transmission surfaces, the light being reflected on whichever side there is a higher illumination. Is this statement correct by and large? And what could be the reason to it? Thanks!


Install Ubuntu18.04.3 on this year's Acer Helios 300 Predator PH315-52 laptop

I bought an  (NVIDIA GTX, 1 TB SSD, i7, 16 GB RAM). I want to install Ubuntu with a bootable USB, as I did in my last laptop, but I have read that I will have trouble with NVIDIA and WiFi conflicts.   Also, this machine has some apps that are not available on Linux, such as PredatorSense (fan control), and Waves MaxxAudio (sound control equalizer).   Does anyone knows about a method to install Ubuntu on this machine?


Prior to the 3-day limit for HNQ, what was the longest amount of time a question stayed on HNQ?

There is now a 3-day limit for the HNQ.  But what was the longest amount of time that a question stayed on the HNQ for prior to that limit being instituted? I'd imagine some questions having stayed on the HNQ for well over a week.


Finding value of $c$ such that the range of the rational function $f(x) = \frac{x^2 + x + c}{x^2 + 2x + c}$ does not contain $[-1, -\frac{1}{3}]$

I am comfortable when I am asked to calculate the range of a rational function, but how do we do the reverse? I came across this problem.  If $$f(x)= \frac{x^2 + x + c}{x^2 + 2x + c}$$ then find the value of $c$ for which the range of $f(x)$ does not contain $[-1, -\frac{1}{3}]$.


Following code is not legal:  // .cpp file  {   using namespace X;   char text[] = {someENUMinX, someOtherENUMinX, ... }; }   The {} block gives error when used that way. How to accomplish this? I.e. to have ability to use whole namespace for some portion of variable declarations.  To put it in other way: is it possible to revoke using namespace? I have like 40 members in each namespace, and would like to switch to them during defining variables.  PS.: I am sorry for multiple edits. The question can be deleted if it's a problem.


I often see a lot of articles that say that rooting can brick your phone and render it useless like a brick, hence the name brick. But anyone who's ever fiddled around in rooting phones and installing ROMS surely knows that if you fail a ROM installation or root, the device can easily be saved by flashing a clean ROM. So what do all those articles mean by 'bricking'? Is there a way to brick a phone to the point that it doesn't even boot to the bootloader and let you install a custom recovery?


Stuck on a recursively defined converging sequence problem.

I am given a simple quadratic equation $$x^2-x-c=0, x>0, c>0$$ and then we define a sequence $\{x_n\}$ with $x_1>0$ fixed and then, if $n$ is an index for which $x_n$ has been defined, we define $$x_{n+1}=\sqrt{c+x_n}$$.  With that I am asked to prove that $\{x_n\}$ converges monotonically to the solution of the polynomial.  I've done quite a bit of scratch work. Obviously we can solve the quadratic and the positive solution is $\frac{1+\sqrt{5}}{2}$. I have an inkling that the equation is decreasing and so I tried working with $x_{n+1}-x_{n+2}$ to show that the difference is positive but I didn't come up with anything useful.  I did realize that if I simply write out the limit we see that $$\lim_{n\rightarrow\infty}[(\sqrt{c+x_{n+1}})^2)-\sqrt{c+x_{n+1}}-c]=\lim_{n\rightarrow\infty}[x_{n+1}-\sqrt{c+x_{n+1}}]$$  So if we want this final limit to go to zero then all I really need is $x_n$ to be monotonically decreasing since it is clearly bounded below by zero since $c$ and $x_1$ were taken to be positive.


Squaring the plane with consecutive integer squares. And a related arrangement.

Q1. I was fiddling around with squaring-the-square type algebraic maths, and came up with a family of arrangements of $n^2 $squares, with sides $1,2\ldots n^2$ (n odd). Which seems like it would work with ANY odd $n$. It's so simple, surely it's well-known, but I haven't seen it in my (brief) web travels. I have a page with pics  of the $n=7,9,11$ versions, and description of how to construct them.  It seems the same method could square the plane, well, fill greater than any specified area, no matter how huge, at least. Which is what 'infinite' means, practically, isn't it? Anyway, it seems, if somehow not known (which it must be, surely - if anyone has links etc to where it's discussed I would be very grateful) then it's another way of squaring the plane.  Q2. Each of these arrangements can be extended, but the ones I've tried (5 or 6) have a little gap to the south-east, (i.e. where the squares don't fit neatly together) but otherwise can be extended forever. Is there an n for which there is no gap? There are more than 1 of each sized square in this arrangement, but still, it would be a nice tessellation with integer squares. 's a picture of the 7x7 version extended, and detail of the centre.


Difference between "introduction to" and "introduction of"

What exactly is the difference between "introduction to" and "introduction of"?  For example: should it be "Introduction to the problem" or "Introduction of the problem"?


Book recommendation on Quantum Mechanics which is a bit mathematically aligned and gives good introduction to Hilbert Space for beginners

I am a 4th-year undergraduate student and I have fully read R. Shankar's book on Quantum Mechanics and Griffiths book Quantum Mechanics. I have also done a bit of the Application of QM on multielectron systems,molecules, etc.  Not going ahead in the application part, I want to focus on the foundations of QM part which I find really interesting. But I have very limited knowledge of mathematics. I have read Curtis "An introduction to Linear Algebra", Gallian "Group Theory"(1-10 chapters only) and have a little bit of knowledge on differential geometry.  With this as my Mathematical background, which would be the best book (a bit mathematical) for introduction to Quantum Mechanics which includes an introduction to Hilbert Space and functional analysis?  PS: My question is specifically for the ones who have limited mathematical knowledge in contrast to answers which assumes you have done graduate level mathematics.


why there is exclamation mark on wi fi. I am facing problem after upgrading to lollipop 5.0

I have a Micromax AQ4501 mobile phone. I am getting an exclamation mark over the Wi-Fi icon. And I am unable to connect to Wi-Fi thereafter.  I have been facing this problem since a few days after I upgraded my phone to Lollipop 5.0. I tried many things like:   switching off and then on,  replacing SIM from slot 1 to slot 2,  switching mobile data and Wi-Fi connection on and then off   but all in vain.   I called the Google call center but they were also unable to help me.   I am able to use internet through mobile internet, but unable to use Wi-Fi with this phone. My Wi-Fi is working fine on other gadgets like my laptop.   How can I resolve this problem?


Why was the Triwizard Cup used as the portkey?

In Harry Potter and the Goblet of Fire the Triwizard Cup was used as the portkey to send Harry and Cedric to the graveyard in Little Hangleton to face Voldemort.    Why was the Triwizard Cup chosen?    Couldn't Crouch Jr. have used anything as a portkey; which would have been much easier and without as much risk (after all of their planning Cedric almost ended up getting the cup first).


Connected compact covering space of torus is homeomorphic to $S^1\times S^1$

I'm trying to prove the next result:     Let $X$ be a connected covering space of the torus   $T:=\mathbb{R}^2/\mathbb{Z}^2$. If $X$ is compact then It is   homeomorphic to a product of two circles.   Probably the most direct way of proving this is to show that there are only $3$ possible connected covering spaces of $T$, to know: $\mathbb{R}\times\mathbb{R}$, $\mathbb{R}\times S^1$ and $S^1\times S^1$ (the last one is the only one which is compact, so the result follows). As far as I know this can be deduced from the classification theorem of covering spaces (see ), however I need to prove first:   $\mathbb{R}^2$ is the universal covering space of $T=\mathbb{R}^2/\mathbb{Z}^2$ The fibers of this covering by the subgroups of $\pi_1(T)$ are precisely those $3$ spaces (up to conjugacy).   I'd appreciate any hints to prove these two facts, or any ideas to prove the main result in a simpler way. Thanks in advance.


Dell Vostro 15 3590 laptop compatibility with Ubuntu dual boot with Windows 10

I am planning to buy a new Dell Vostro 15 3590 laptop which will be preinstalled with Windows 10. So I want to know whether it will be compatible with Ubuntu or Linux distributions for dual boot. This question is because I am unable to install dual boot on my Acer Aspire A315-56 laptop as hard disk was never recognized by the Ubuntu installer. And I have read somewhere in Dell forums that AHCI SATA mode will soon be not available on newer laptops. Already HP and Lenovo have disabled it and RAID is the chosen option by manufacturers. I am worried whether Dell Vostro will be one of that kind and Linux can't be installed there. Linux guys should find easy possibility of installation with RAID option as this will be most normal case in future. Thanks in advance guys.


Unable to locate VLC package in my repositories?

When I try to install VLC using apt-get, I get the following error:  parameswaran@parameswaran-Compaq-Presario-CQ61-Notebook-PC:~$ sudo apt-get install vlc [sudo] password for parameswaran:  Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package vlc   It's happening in my Ubuntu i386 Compaq Presario cq61, and I'm new Ubuntu user.  Somebody please tell me how to solve this issue and install packages in my laptop?


Problems copying files with spaces inside the file name in a bash script

I have the following function inside a BASH script (running under Ubuntu 12.x), which would copy over a file with spaces inside the file name. It's not working. I've tried many different combinations, with "', with \", etc. How do I get this to work? Thanks!  function copy_docs() {     source_directory=/mnt/someplace     release_directory=/doc/someotherplace      cp ${source_directory}/"Some file with spaces.txt" ${release_directory}/  }   This is what I'm getting as output (from nearly all permutations):  cp: cannot stat `/mnt/someplace/some': No such file or directory cp: cannot stat `file': No such file or directory cp: cannot stat `with': No such file or directory cp: cannot stat `spaces': No such file or directory


Why is it that Android still can't be installed as regular OS?

Are there any technical or others reasons why Android is still a firmware and not an OS which can be just installed without a lot of hassle?  Why there is no universal image which could detect appropriate drivers (kernel modules), partition NAND in some standard way and configure boot loader to boot updated OS version?  What stops Google from making a real (less firmware-like) OS (an OS for small ARM, x86 etc. devices)?


Why bother making a distinction between IDs and classes in HTML/CSS?

I think I understand how IDs and classes are used (IDs for a single element on an HTML page, classes for many elements). But why bother with IDs in the first place; why not just use classes for everything?


Interpretations of the Axiom of Regularity in ZFC

I am currently studying the Zermelo-Fraenekl Set Theory and I have some problems with understanding the Axiom of Regularity:  Firstly, I found this version of the axiom on Wiki   I understand that x and y are all referring to sets. Then there is a problem: Consider the set {1,2,3}. This set is non-empty but there not does exist a "y" in x such that "y intersects x" is the empty set because none of the members of x are sets (In this case, it does not make sense to talk about "y intersect x" since intersection is a binary connective between two sets).  Secondly, here is another version of this axiom:    I have some troubles with understanding the second part of this experssion (after the implication arrow). Why is this version equivalent to the version above? Thanks so much if someone could give a hand. I really appreciate!


bash builtin command read  is said to accept input from stdin, but why does the following not read in anything?  $ printf "%s" "a   b" | read line $ printf "%s" "$line" $   Thanks.


What's the catch with biweekly mortgage payments?

I just bought a house. Now I'm getting ads in the mail every day or two trying to get me to sign up to pay my mortgage bi-weekly (every two weeks) or weekly instead of monthly. In their words I could cut seven years and thousands of dollars off what I pay in long term. It seems like I would be paying the exact same amount of money, also.  I know "if something sounds too good to be true then probably it is". But I cannot figure out why in this case. What is the catch? Or is this something I should be signing up for ASAP?


Showing that the roots of a polynomial with descending positive coefficients lie in the unit disc.

Let $P(z)=a_0+a_1z+\cdots+a_nz^n$ be a polynomial whose coefficients satisfy $$0<a_0<a_1<\cdots<a_n.$$  I want to show that the roots of $P$ live in unit disc. The obvious idea is to use Rouche's theorem, but that doesn't quite work here, at least with the choice $f(z)=a_nz^n, g(z)=$ (the rest).  Any ideas?


Prove that a subpace of all functions from a set $S$ to a field $F$ has a basis $f_1,...,f_n$ which is dual with some elements $x_1,...,x_n$.

Let $S$ be a set, $F$ a field, and $V(S;F)$ the space of all functions from $S$ into $F$, with the usual function addition and scalar multiplication. Let $W$ be any $n$-dimensional subspace of $V(S;F)$. Show that there exist points $x_1,...,x_n$ in $S$ and functions $f_1,...,f_n$ in $W$ such that $f_i(x_j)=\delta_{ij}$, where $\delta_{ij} = 1$ if $i=j$, and $\delta_{ij} = 0$ otherwise (i.e. the delta function is the Kronecker delta function).  If $S$ were an $n$-dimensional subspace, then the result is true. But I am not sure how to proceed. I was considering the set $(S^0)^0$, which is spanned by $S$, but I am sure where this leads me.  Edit: I found that, since $(S^0)^0$ is a subspace, we can find some $n$ points of a basis $a_1,...,a_n$ of that subspace such that its dual is $f_1,...,f_n$, and each $a$ of which is a linear combination of some elements in $S$. If those $a_i$ elements are in $S$, we are done. But I am having trouble proving the result if at least one $a_i$ is not in $S$.


Symmetrical object won't rotate on axis evenly

This is a wheel with bones and constraints to help it roll and turn. I don't know what I did in the process, but my wheel no longer rotates symmetrically like it used to despite not manipulating it at all.   I've tried Origin to Geometry, Cursor to Center, and resetting the Rotation, but it doesn't fix the problem.   Is there a way to fix my wheel's rotation?


Is there a secure cryptosystem that can be performed mentally?

I, myself, do not plan on getting into a situation where I would be unable to use a computer in order to communicate securely.  However, I can think of many practical situations in which mental cryptography would be useful.  Is there a secure cryptosystem that is simple enough to be performed mentally?  Clearly, one of the challenges is remembering >100 bits of entropy to leverage, but I am assuming that this can be done beforehand.  How susceptible would any such system be to side channel attacks (like trash rummaging)?


Assigning Approvers through Apex at each step (Dynamically) of a Multistep Approval

Scenario is given below. On Account, I have an approval process. and it's multistep approval. Let's assume its a 2 step approval. but in the approval steps, No approvers are mentioned. for the approvers, we are not having user lookups on Account but We have an Account Role object (Child of Account) from where approvers will be picked up dynamically based on the role (field on the object level) of the user. Now suppose in the Account Role we have 3 users (3 records which contains user with the role) with the role Manager so in that case, approvers in the "first step" will be these 3 users and any of them can approve the record, and once approved the record will go in the next step to be approved. Now I want to assign approvers dynamically in each step of the approval as explained in the above scenario. Can I call the same defined approval in apex and then in apex set the approvers in different steps and fire the approval?? Any suggestions would be appreciated. Thanks.


What is the exact precondition to be able to get/buy/find Stack overflow T-shirt-s?

I saw some questions here about them. How can I get one? I did not find any webshop where they are distributed.  Edit: I did not ask about the store I asked about how can I get the T-shirts?


Why is the outer loop of nested cross validation needed?

I have read several threads and articles about the need to use nested cross validation when, for example, choosing between different machine learning algorithms. Here are two describing the use of nested cross validation in algorithm selection: , .   I am aware that the process of nested cross validation in selecting between, for example different algorithms, is as follows (for the case of k fold CV):   The inner loop CV uses the 'outer loop' training sets, to find the optimal hyperparameter. The optimal hyperparameter is chosen based on its test performance on the 'inner loop' test folds. Here we loop over a selection of different hyperparamter values. If we performed 5 fold CV in the inner loop, then each hyperparameter's 'score' is the average of the scores from testing it on the 5 'inner loop test' folds.  The 'inner loop' gives us our best hyperparameter. We then train a model on the 'outer loop' training data (which we earlier split inside the 'inner loop') and calculate its test performance on the 'outer loop' test fold.  This entire process is repeated for as many 'outer loop' folds we are using. So, if we were doing 5 fold 'outer loop' CV, we could (depending on model stability) end up with 5 different hyper parameters.   Once this is repeated for these 'outer loop' folds, we take the average of all the 'outer loop' test fold scores to get the overall test performance of that particular algorithm. This is repeated for all the algorithms we are comparing. The one with the best score is taken forward.    I know the purpose of separating the model selection (done in the inner loop) and performance estimation (done on the outer loop) is to avoid biasing the results somehow, but i don't understand why. I have looked at several threads on here but cant get my head around it (e.g.  , )  Take the following example of where normal (say 5 fold) cross-validation is used. This would involve the following steps:   Split data into 5 folds Select the first algorithm to test. Take a given value form the selection of hyperparameter values we wish to test, and train it on the 4 training folds. Calculate a test score using the remaining test fold. Repeat for all 5 folds. Average all 5 test scores to get the average test score for that hyperparameter.  Repeat this for all values of the hyperparameter. The one with the best test score is carried forward.  Repeat this for all the algorithms we wish to test. Compare the average test scores for each algorithm and the one with the best test score gets carried forward.   I can't seem to understand why the above method, which doesn't require nested cross validation is not sufficient?  I guess the question is, why do we need to separate the model selection and performance estimation steps into the inner and outer loops? I can't see the benefits of this compared to doing both at the same time, which is what the second set of steps described does.  UPDATE I've come across a video which explains the reasoning very well:


I know this has been a common problem but the answers provided to other questions haven't helped with my current issue.  When trying to run a file called srf2obj I get the "command not found" response.  I can see that the file is there. "file srf2obj" returns: GNU awk script, ASCII text executable   OS is installed on Virtualbox.  Any help would be great, thanks.


I'm wondering whether it's possible to downgrade sfdx-cli to use an earlier version?  I'm trying to debug an issue with using it in pipeline scripts.  When I run sfdx version --core I get sfdx-cli 7.28.7 (core) .    If I run  sfdx version I get  sfdx-cli/7.28.7-7bceba6f24 darwin-x64 node-v10.15.3 .  If I do cat package.json inside the actual package dir for sfdx-cli after doing npm install sfdx-cli@7.26.0 I get  "sfdx-cli": "^7.26.0"  Why does it then show that the version is 7.28.7?  How can I force the lower version to have preference?  I do understand that this question is not really salesforce specific but hopefully someone has run into the same problem.


When was the k-means clustering algorithm first used?

K-means is probably one of the most used algorithms for clustering. I was looking for bibliography for its first use, but it has been around a lot, so what's the first one?  Also, when was the algorithm first named "k-means"?


What is it called when someone doesn't want to share stuff/feelings to others, even close ones, in fear of being judged?

Is there a phrase, word, or a term for this condition? And I'm not specifically talking about fear of intimacy, I'm asking for something more general. Such as not sharing stuff with friends, family, in fear of being judged.


Is the word "management" singular or plural?

Possible Duplicate:          Which one of the following is correct?     Management gets its ideas from its employees.   Management gets their ideas from their employees.


How to display whole file with #include statements

Suppose I have file main.txt which contains following:    Some text  #include fragment1.txt  Some other text  #include fragment2.txt"  Some other text    where fragment1.txt and fragment2.txt looks like this:  fragment1.txt:    This is content of fragment1    fragment2.txt:    This is content of fragment2    Question: How to display whole main.txt file with "expanded" included files, like this:    Some text  This is content of fragment1  Some other text  This is content of fragment2  Some other text    Thanks


Problem with Ubuntu windows. Thick Color Noise border

Random Color Noise Border Ubuntu 16 I am getting a noise border on my Ubuntu 16 machine. Any ideas?    Thanks!


Is it better for the battery to leave the iPad plugged when charging is done?

I charge my iPad. Later, I notice that the battery is charged at 100 %.  Now, what is better to preserve the battery capacity ?   Unplugging the cable.  Leaving the cable plugged.    The answer may vary depending on whether I leave the iPad sleeping or whether I use the iPad.


Solution of the congruence $103a\equiv 1\mod 101$?

How do I find a solution to the congruence $103a\equiv 1\mod 101$?


CORS issue with OpenLayers3 getGetFeatureInfoUrl

In an Angular directive I'm trying to create an Information tool with OpenLayers 3 using the getGetFeatureInfoUrl method. I've set up a function which is using $http to return the info as JSON:   //GetFeatureInfo         scope.getinfo = function() {             var wmsSource = new ol.source.TileWMS({               url: 'http://xxxxxx.com:8080/geoserver/yyyy/wms',               params: {'LAYERS': 'zzzzz'},               serverType: 'geoserver'             });              var wmsLayer = new ol.layer.Tile({               source: wmsSource             });              map.on('singleclick', function(evt) {               //document.getElementById('info').innerHTML = '';               var viewResolution = /** @type {number} */ (view.getResolution());               var url = wmsSource.getGetFeatureInfoUrl(                   evt.coordinate, viewResolution, 'EPSG:3857',                   {'INFO_FORMAT': 'application/json',                     'propertyName': 'formal_en'});               if (url) {                   console.log('here');                    var parser = new ol.format.GeoJSON();                     $http({                     url: url,                     dataType: 'jsonp',                     jsonpCallback: 'parseResponse'                     }).then(function(response) {                      var result = parser.readFeatures(response);                     if (result.length) {                         var info =[];                         for (var i = 0, ii = result.length; i < ii; ++i) {                             info.push(result[i].get('formal_en'));                             }                              console.log(info);                           } else {                              console.log('info else');                     }                   });               } //             });         };   This is the error code from Console: Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at . (Reason: CORS header 'Access-Control-Allow-Origin' missing).  from what I understand I have to add a filter. I have tried adding this to end of C:\Program Files (x86)\GeoServer 2.9.0\webapps\geoserver\WEB-INF\web.xml   <filter>     <filter-name>cross-origin</filter-name>     <filter-class>org.eclipse.jetty.servlets.CrossOriginFilter</filter-class> </filter> <filter-mapping>     <filter-name>cross-origin</filter-name>     <url-pattern>/*</url-pattern> </filter-mapping>   ... and then restarting GeoServer but then GeoServer stopped working. Is this the correct way to fix the issue and if so am I editing web.xml correctly? Can anyone help please?


Why do I have 'glitched' areas in my render after enabling denoising?

I am a newbie to blender and i found a 'Denoiser' option and decided to use it. I found out its function but it seems to create these 'glitched' areas in one of my  renders. What are they and how do i fix it?


Can I calculate sensor size from pixel dimensions and number (to find angle of view)?

I read up an equation on Wikipedia i.e. a camera's angle of view can be found from the following equation  angle of view = 2 arctan ( d / 2f )   where f = focal length and d  = size of film or sensor.   I am now trying to find the field of view of this camera . The size of the sensor / film is not given but what are given are the pixel size and the resolution. Would the sensor size simply be the pixel size * the number of pixels along the width / rows ? I also have only the focal length in pixels and was wondering how i can convert it to mm.  This is an image taken by that camera btw.


Unable to mount filesystem as read-write in recovery mode

I deleted two unused user accounts. Now I am unable to login even into my own account. I rebooted in recovery mode in the root shell and tried to restore the back-up of /etc/passwd. However, the filesystem is read-only!  I can only access root shell via recovery.  Can you help me?


Error: Font \l_tmpa_font has only 8 fontdimen parameters

I get the above error when I try to use my main font for the math letters. If I leave out the \sqrt[3]{2} bit, it works but gives a load of complaints about not having the OpenType feature 'Style=MathScriptScript' (+ssty) available in Calluna. (If you don't have Calluna: TeX Gyre Pagella shows the same  behaviour.) What can I do?  \documentclass{article} \usepackage{xltxtra} \usepackage{fontspec} \setmainfont{Calluna}% \setsansfont{Calluna Sans} \usepackage{unicode-math} \setmathfont{TeX Gyre Termes Math} % If one ore more of the following three lines are included ... % \setmathfont[range=\mathup/{latin,Latin}]{Calluna} % \setmathfont[range=\mathit/{latin,Latin}]{Calluna-Italic} % \setmathfont[range=\mathbfup/{latin,Latin}]{Calluna-Bold} \begin{document}\noindent\LARGE      % ... this would still work, but fontspec will nag about missing +ssty:     $a = -\frac{1}{2}$\\     % ... but this won't work at all:     $a = -\frac{1}{\sqrt[3]{2}}$ \end{document}


Double become long again when save to array

I wish to save some Double to an array, and I just need to have 2 decimal places Double. So I rounded the origin double to 2 decimal places, and when I print the rounded Double, the result is correct. However when I save these Double to an array and print the Double, the result becomes many decimal place.   What should I do to force only 2 decimal Double in the array?  For example:  Double -> 2.344563343534   // Original value   rounded -> 2.35            // Rounded value I want   After I save the rounded Double to array and print:  Double in array -> 2.34444444444444   // I hope this value only in 2 decimal place.


LaTeX doesn't show negative sign in exponent

Writing the code  The weight decay was set to $1 \times {10^{−4}}$ for Model 8 and $5\times 10^{−4}$.   the negative sign is missing.    And these are the packages I'm using  \usepackage{jmlr2e} \usepackage{indentfirst} % Definitions of handy macros can go here \usepackage{float} \usepackage{underscore} \restylefloat{table} \newcommand{\dataset}{{\cal D}} \newcommand{\fracpartial}[2]{\frac{\partial #1}{\partial  #2}}


How to run QGIS plugin from python script

I would like to access external QGIS plugins through a python script. I have been able to access the built in QGIS processing and vector toolbox, but have been unsuccessful with external plugins such as the topology checker plugin. I have tried this both using the built in QGIS python console, and an external IDE, but attempts have failed.  I am sure that there is a way to do this, has someone done this before?


Find the values of $\alpha$ and $\beta$ for which the function $f$ is of bounded variation on $[0,1]$?

The question is :     Let $f : [0,1] \longrightarrow \mathbb {R}$ be defined by    $f(x) = x^{\alpha} \sin {\frac {1} {x^{\beta}}}$ , whenever $x \in (0,1]$ and $=0$ , whenever $x = 0$.  Then find the values of $\alpha$ and $\beta$ for which $f$ becomes a function of bounded variation on $[0,1]$.  Please give me a right way to proceed.Thank you in advance.  I have just obtained the result which is  $\alpha > 2$ and $\beta < \alpha - 2$.Is it correct at all?Please verify it.


Theorem environment with hanging indentation

I would like to define a theorem environment with custom layout. In particular, I want the body of the theorem to be indented, like this  Text body. Text body. Text body.  Theorem 1 (Pythagoras).     Let a,b,c the sides of a rectangular triangle.     Without loss of generality, we assume that  a<b<c .     Then, the following equality holds:            a^2 + b^2 = c^2  More text. And even more text.   This is similar to the quote environment, I believe.  How can I do this?  Preferably, I would like to use the existing \newtheorem command, but that's not mandatory.


Adding word "Chapter" into Table of Contents for only numbered chapter entries

I'm trying to use the titletoc package to add the word "Chapter" only to my numbered entries in my Table of Contents. I'm using a report document class. I'm really close (I think), I just need to know how to align the numberless entries with the word "Chapter" from the numbered entries.   Here's what I've got:  \usepackage{titletoc}%  \titlecontents{chapter}% <section-type>   [0pt]% <left>   {}% <above-code>   {\bfseries\chaptername\ \thecontentslabel\quad}% <numbered-entry-format>   {\bfseries}% <numberless-entry-format>   {\bfseries\hfill\contentspage}% <filler-page-format>   Which gives me:    I'd like to align those numberless chapters on the left hand side with the word "Chapter". Also, I'm receiving \hbox warnings for the page numbers with four or more characters (such as viii) and am not sure what to do about those. I'm new to LaTeX and am at a loss. I tried looking through the titletoc documentation but was unsuccessful. Thanks in advance!   EDIT: As requested, here is a MWE:  \documentclass[12pt]{report} \usepackage[utf8]{inputenc}  \usepackage{titletoc}%  \titlecontents{chapter}% <section-type>   [0pt]% <left>   {}% <above-code>   {\bfseries\chaptername\ \thecontentslabel:\quad}% <numbered-entry-format>   {\bfseries}% <numberless-entry-format>   {\bfseries\hfill\contentspage}% <filler-page-format>  \usepackage{lipsum}  \usepackage{setspace}  \begin{document}  \pagenumbering{roman}       \clearpage                   \setcounter{page}{2}          \chapter*{Abstract} \addcontentsline{toc}{chapter}{\numberline{}Abstract} \lipsum[1]  \chapter*{Acknowledgements} \addcontentsline{toc}{chapter}{\numberline{}Acknowledgements} \lipsum[1]  \begin{doublespace} \renewcommand*{\contentsname}{Table of Contents} \tableofcontents \addcontentsline{toc}{chapter}{\numberline{}Table of Contents} \end{doublespace}  \pagenumbering{arabic} %\setcounter{page}{255}  % % Uncomment to see \hbox warnings due to long TOC page number  \chapter{Introduction} \lipsum[1] \section{Section one} \lipsum[1]  \chapter{Second Chapter} \lipsum[1] \section{Another section} \lipsum[1]  \end{document}   Note: remove the comment to receive the \hbox warnings. Thanks again


Why the differential equation ${dx \over dt}= \sqrt x, x(0)=0 $ has infinitely many solutions?

How can I show that the differential equation:     $${dx \over dt }=\sqrt x, x(0)=0$$   has infinitely many solutions.   One solution will be $x={t^2 \over 4}$


This might seem ridiculous, but I realised that, years after I watched the film, I've still no idea to whom the title was referring. Who was it?   Anakin - not realising his hidden (phantom) side? Darth Maul - an unknown character, stalking phantom-like after Anakin? Palpatine - hiding (again, like a phantom) his true intentions? Jar Jar Binks - as ?   Seriously - who was "The Phantom Menace"?


I am writing a paper and the citation in APA format. I am using \cite{authoryear} for the indirect citation e.g. Paraphrased summary of the ideas (lastNameofAuthor1, year)  What should I do for a direct citation according to lastNameofAuthor1(year) paraphrased idea?  Please don't ask me to follow the first format, if you don't know the workaround. sometimes it is natural to write ideas directly quoting the author.


I am currently doing on a project based on ordering system.   Here's the entity class for "orders" :   package fourFinger.entity;  import java.util.Date;  import javax.swing.JComboBox;  public class Orders {   private int orderId;  private int tableNo ;  private int numPax;  private Date orderDate;   private double totalAmount; public Orders( int tableNo, int numPax, Date orderDate, double totalAmount) {     super();     //this.orderId = order  Id;     this.tableNo = tableNo;     this.numPax = numPax;     this.orderDate = orderDate;      this.totalAmount = totalAmount; }  public Orders( int orderId, int tableNo, int numPax, Date orderDate, double totalAmount) {     this(tableNo, numPax, orderDate, totalAmount );     this.orderId = orderId;  }   public int getOrderId() {     return orderId; } public void setOrderId(int orderId) {     this.orderId = orderId; } public int getTableNo() {     return tableNo; } public void setTableNo(int tableNo) {     this.tableNo = tableNo; } public int getNumPax() {     return numPax; } public void setNumPax(int numPax) {     this.numPax = numPax; } public Date getOrderDate() {     return orderDate; } public void setOrderDate(Date orderDate) {     this.orderDate = orderDate; }  public double getTotalAmount() {     return totalAmount; } public void setTotalAmount(double totalAmount) {     this.totalAmount = totalAmount; }   My OrdersDA that connects to database :   public static int createOrders(Orders orders) {     // declare local variables     int orderID ;     DBController db = new DBController();     String dbQuery;     PreparedStatement pstmt;      // step 1 - establish connection to database     db.getConnection();      // step 2 - declare the SQL statement     dbQuery = "INSERT INTO orders (orderId, tableNo, numPax, orderDate , totalAmount) VALUES(?, ?, ?, ? , ?)";     pstmt = (PreparedStatement) db.getPreparedStatement(dbQuery);     orderID = getNextOrderId();     // step 3 - to insert record using executeUpdate method     try {         pstmt.setInt(1,orderID );         pstmt.setInt(2, orders.getTableNo());         pstmt.setInt(3, orders.getNumPax());         pstmt.setDate(4, (Date)orders.getOrderDate());         pstmt.setDouble(5, orders.getTotalAmount());           if (pstmt.executeUpdate() == 1)              return orderID;         pstmt.close();     } catch (Exception e) {         e.printStackTrace();     }      // step 4 - close connection     db.terminate();      return -1; }   There will be an error on :         pstmt.setDate(4, (Date)orders.getOrderDate()); and states that java.util.Date cannot be cast to java.sql.Date   My main method when creating orders :    private void actionPerformedOrder() {   //retrieve user input     String numPax = (String) cbNoPax.getSelectedItem();     String tableNo= (String)cb_tableno.getSelectedItem();    Date orderDate = new Date();       orders=newOrders(Integer.parseInt(tableNo),Integer.parseInt(numPax)   ,orderDate, totalAmount);    int orderID = OrdersDA.createOrders(orders);      }   Do you have any ideas where have i went wrong? Your help will be appreciated!


I have noticed that TeX Live 2017 has been released. But I am using 2016 version. Is there any way to upgrade 2016 to 2017 without installing fully 2017 version?


I know this seems like a good idea, but this far into the game you should be able to tell from network behavior that I'm not a spammer…  I had a compound question. I broke it up because breaking it up was possible—it probably isn't even necessary in that it wouldn't otherwise get closed. Now I doubt either of my questions will be easily answered, but it stinks when you want to run (irl) to have to wait on a question timer which means posting one at a later time. Can't we fight spammers more effectively in a different way?  You know it's my intent to ask the question (or you'd give me a captcha). You also know that historically my questions have been   Can't we find a way to make this not stupid?


Space within galaxies. Is it stuck by the gravity of the galaxy or expanding and "slipping past"?

I understand that the inter-galactic space is expanding but galaxies themselves are not. What is happening to the space within a galaxy? Is it fixed by the gravity of the galaxy or is it expanding and moving out around it?  Using the coins on a balloon analogy, is the balloon surface under the coins (galaxies) stuck to the coin and constrained or is it free to expand out, slipping underneath the coins leaving them in the same place (and the same size)?


I don't want to type sudo cp in the terminal every time I copy files to /usr. How do I do this in the GUI? I have already added myself to the root group, but the "paste" button in the context menu remains inactive:


How long are older point-releases of LTS supported?

Ubuntu LTS versions receive 5 years of support.  Occasionally, new point-releases are made for LTS versions.  For example, Ubuntu 14.04.1 LTS was released on July 24 2014, which replaces 14.04.  How long are security updates provided for the original 14.04 release (or other LTS versions)?  The  has no end of life date defined for 14.04.  Edit:  that point-releases are just snapshots of the bug fixes released so far, thus all versions receive the same duration of support.


Is $f(x,y) = |xy|$ differentiable in $(0,0)$? I have no idea how to approach this problem.


Decision Trees and Regression - Can predicted values be outside range of training data?

When it comes to decision trees, can the predicted value lay outside of the range of the training data?  For example, if the training data set range of the target variable is 0-100, when I generate my model and apply it to something else, can my values be -5?  or 150?  Given that my understanding of decision tree regression is that it is still a rules based - left/right progression and that at the bottom of the tree in the training set it can never see a value outside a certain range, it will never be able to predict it?


How can I create the pop out symbol in latex?  Signifies that something is a link. I used a latex symbol finder but it tells me the closest match is the male gender symbol, which I guess is pretty similar but not entirely. Hoping there is just a command for this so that I don't have to draw it myself. Thanks


Moment of inertia of a rotating black hole

The moment of inertia of a massive object about a given axis describes how its mass is distributed about that axis. I understand that a rotating black hole of a given mass and angular velocity possesses angular momentum, and one would think that it therefore possesses a certain moment of inertia about its axis of rotation. My question is this: can knowledge of that moment of inertia tell us anything about how the black hole's mass is distributed about its axis of rotation?


Get the name of a parent function from an anonymous child function

I was wondering if I can get the name of a function from a nested function. I have tried with __FUNCTION__ but the way I am doing it I do not get the expected result, I think it is due to a scope problem. Suppose I have the following: public function function_1($arguments) {      if (is_array($arguments)) {          return array_map(function ($argument) {              // Here I would like __FUNCTION__ to return the string functon_1              // to refer to the name of the parent function.              return call_user_func_array([$this, __FUNCTION__], [$argument]);          }, $arguments);      }       return $arguments; }  Thank you very much in advance for any help you can give me. EDIT 1 For now I have managed to get the expected result as follows: public function function_1($arguments) {      $callback = __FUNCTION__;       if (is_array($arguments)) {          return array_map(function ($argument) use ($callback) {              // Here I would like __FUNCTION__ to return the string functon_1              // to refer to the name of the parent function.              return call_user_func_array([$this, $callback], [$argument]);          }, $arguments);      }       return $arguments; }


Uncaught ReferenceError: div2 is not defined

Developing an Etch-A-Sketch project using JavaScript - run into an issue which I'm not entirely sure about. Trying to attach an event to div2 however - it doesn't seem to be defined even though I have assigned const div2 = document.createElement('div') inside a for loop which creates a 16 x 16 grid:  ]  for(let i = 0; i < 16; i++){     const div =  document.createElement('div');     div.style.cssText = 'border: 1px solid black; flex: 1';     container.appendChild(div);      for (let j = 0; j < 16; j++){         const div2 = document.createElement('div');         div2.classList.add('square');         div.style.display = 'flex';         div.appendChild(div2);         } }      div2.addEventListener('mouseover', function(){ let randomColor = colors[Math.floor(Math.random() * colors.length)];  if(randomColor === '1'){     div2.style.changeBackground = 'red'; } else if(randomColor === '2'){     div2.style.changeBackground = 'blue'; } else if(randomColor === '3'){     div2.style.changeBackground = 'yellow'; } else if(randomColor === '4'){     div2.style.changeBackground = 'orange'; } else{     div2.style.changeBackground = 'green'; }   });  I also tried attaching the same event to square which is a class grabbed using a querySelector - however that returns null - 'Uncaught TypeError: square.addEventListener is not a function'. My overall aim is to have the user hover over a square on the grid and have the grid change colour when the cursor goes over it.


I was wondering if there is any possibility that a vector field is irrotational and solenoidal at the same time. Can you help me out? I think I can't see the correct interpretation. I think that if, given a vector field A, it is solenoidal, it can't be irrotational. Could you give me some arguments?


How can I address the path/file I just specified again?

Say I'll start writing  sudo cp /etc/var/more/evenMORE/fileABC   and as the target of the copying, I'd like to define the same folder, except just a different filename (whether it is a new name like "randomNAME" or an iteration of the file "fileABC-backup01" shall be irrelevant). How can I reuse the input file so that I do not have to write it out again? Is this even possible?


I was wondering how you'd go about creating a visible cone of light that fades

I was wondering if it was possible to do something like  but also apply the effect used in  to the cone of light in Cycles.  I was told by someone else that I need volumetrics, but I'm not quite sure how to do this.


What is simplest way to read a file into String?

I am trying to read a simple text file into a String. Of course there is the usual way of getting the input stream and iterating with readLine() and reading contents into String.   Having done this hundreds of times in past, I just wondered how can I do this in minimum lines of code? Isn't there something in java like String fileContents = XXX.readFile(myFile/*File*/) .. rather anything that looks as simple as this?  I know there are libraries like Apache Commons IO which provide such simplifications or even I can write a simple Util class to do this. But all that I wonder is - this is a so frequent operation that everyone needs then why doesn't Java provide such simple function? Isn't there really a single method somewhere to read a file into string with some default or specified encoding?


What is the runtime of a regex_search() operation in c++?

I've looked at the  for the C++11 regex library and can't seem to find anything on the runtime of its regex_search() method. Suppose I have a string of length n and a pattern of length m, how can I analyze the complexity of this search?  Below is an example of using this method to find and print occurrences where the string is of an alphabetical letter and a digit:  How do I find the runtime of this?  string s = "h2ello1"; regex re("[a-z]{1}[0-9]{1}"); smatch m;  while(regex_search(s,m,re)){     cout << m[0] << endl;     m.suffix().str(); };    EDIT: A lot of the previous questions mention "to build a Deterministic Finite Automaton" which can lead to the runtime but I'm only using a C++11 library. Is it the same implementation? I know it's definitely not linear time because it is pretty slow.


Circumscribe all circles in field of circles

I'm making a program that consists of a bunch of placable/moveable items in space, and each item has an invisible circle encompassing its size. The items can be parented to other items, so for each parent item I also want the smallest possible outer circle that encompasses the extent of all its children. For example, if I had a parent item at (0,0) with size 1, and a child at (4, 0) also size 1, the outermost points would be (-1, 0) and (5, 0) therefore the outer circle would be at (2, 0) with radius 6.  My question is: what's the most efficient way for the program get this circle if it has several arbitrarily placed/sized circles to look at, most of which are probably irrelevant? So essentially how do I get the 2 or 3 outermost points and circumscribe them?  Also, this project is actually in a 3D world so really it would all be spheres... I just figure it'd be easier to start with circles and add a dimension once I understand the simpler version


Is there a way to ignore whitespace inside of the value of a  tag?

I'm creating a project where I have a Django server sending JSON data to a template which has Vue.js running on it. The JSON data is sending values with a trailing space after them which is causing problems. I'd like to remove them on the HTML page if possible.  I've tried using Javascript.trim() on the JSON data which didn't seem to have any effect. I also can't strip the entire JSON file of whitespace, since some values need to have whitespace in them.  I am trying to remove whitespace from {"keyword" : "value"} sets. The "value" section sometimes has "value " or " value" in them.  This won't work <option value="And">And</option>  But this will <option value="And ">And</option>   The JSON object contains  "keyword": "And "   Instead of  "keyword": "And"   I expect the  tag to work regardless of the whitespace surrounding the value in the data.  Edit: I can't use Javascript's trim() function, since there are dozens of occurences of the issue in the JSON data. Looping through the data and trimming each individual string would significantly increase the load times for the page.  Edit2:  <b-form-select for="action-text" v-model="step.keyword" class="mx-3">     <option value="Given ">Given</option>     <option value="When ">When</option>     <option value="Then ">Then</option>     <option value="And ">And</option>     <option value="But ">But</option> </b-form-select>   Where in this would I do as needed trimming?


What's the name of signal encoding used by WS2812 LEDs?

The WS2812b color LED uses some kind of duty cycle encoding to encode three states:   one zero reset   This can be seen in the following figure:   (Source: )  What's the name of the used encoding?  It's not classic Pulse Width Modulation (PWM).  Edit: While this question  asks for a name of a similar modulation, it does not give a name for the modulation.


I believe every ordinal numbers $\alpha$ can be written as $\alpha=\lambda+n$ for a limit ordinal $\lambda$ and a natural number $n$. Is this true? Is it easy to see? Is there some terminology for the $\lambda$ and the $n$, something like limit part and natural part? (in analogy to integer and fractional part of reals)


Mixing squared textboxes and rounded buttons

Is it bad UX to make rounded button and squared text box, and which is the best to do?


How can I make a wifi hotspot with Ubuntu?

In the computer I'm currently using, I have 2 partitions, one with Windows 10 and one with Ubuntu 18.04 LTS. In the Windows partition I sometimes use the computer as a wifi hotspot, and I was wondering if there was a way I could do that with the Ubuntu partition. My computer is a HP Pavilion Power Laptop 15-CB001LA. Thanks in advance!  Edit: What I meant was that I want to use the computer as a hotspot while still using the wifi in the computer, as in I'm browsing anything but I want to connect another device for it to be able to connect, while still being able to continue using wifi in my computer


Can gedit split view to compare code like Notepad?

I have written two file.m, I want to compare it, in Notepad, I can use a split view in the same window.


I've added the (f)cronjob  */1 * * * * DISPLAY=:0 notify-send testing   to display a notification every minute, but it doesn't work; why not? (Using i3.)


How to adjust line numbers of algorithm2e package?

When using line numbers in the algorithm2e package, the line numbers are placed left of the text block, not directly below the text. See page 5 of the .  Is it possible to place them below the text ?  Update: Line numbering now:     Input ...    Output ... 1: Code ...   Line numbering I want:  Input ... Output ... 1: Code ...


Window functions cause awful execution plan when called from a view with external parametrized 'where' clause

I had this issue long time ago, I found a workaround which suited me and forgot about it.  But now there's  on SO so I'm willing to bring this problem up.  There's a view that joins few tables in a very straightforward way (orders + order lines).    When queried without a where clause, the view returns several million lines. However, noone ever calls it like that. The usual query is  select * from that_nasty_view where order_number = 123456;   This returns about 10 records out of 5m.  An important thing: the view contains a window function, rank(), which is partitioned exactly by the field using which the view is always queried:  rank() over (partition by order_number order by detail_line_number)   Now, if this view is queried with literal parameters in the query string, exactly as shown above, it returns the rows instantly. The execution plan is fine:   Index seek on both tables using the indices on order_number (returns 10 rows). Calculating windows over the returned tiny result. Selecting.   However, when the view is called in a parametrized way, things get nasty:   Index scan on all tables ignoring indices. Returns 5m rows. Huge join. Calculating windows over all partitions (about 500k windows). Filter to take 10 rows out of 5m. Select   This happens in all cases when parameters are involved. It can be SSMS:  declare @order_number int = 123456; select * from that_nasty_view where order_number = @order_number;   It can be an ODBC client, such as Excel:  select * from that_nasty_view where order_number = ?   Or it can be any other client that uses parameters and not sql concatenation.  If the window function is removed from the view, it runs perfectly quickly, regardless of whether or not it's queried with parameters.  My workaround was to remove the offending function and reapply it at a later stage.  But, what gives? Is it genuinely a bug in how SQL Server 2008 handles window functions?


After upgrading to fedora 27 can execute binary file

So this is a specific binary file. I had both in my laptop and my desktop a software called IVMs-4200 from hikvision I dont think they support anymore this software for linux, since I can find it on their website.  Well the thing is that I had fedora 23 and 22 and the software worked fine, i formatted both machines and installed fedora 27. I kept both home files from the previous installation so I just had the software untouched in my home folder.  And I can no longer execute the binary file I get this  $ ./iVMS-4200  bash: ./iVMS-4200: No such file or directory   but the file is there, if I click on it nothing happens  $ ls ChannelPicture  ClientRestore.xml  iVMS-4200  Linux  log  Log  maintain  NetSys.db  PlugIns  translations   with sh I get this  $ sh ./iVMS-4200  ./iVMS-4200: ./iVMS-4200: cannot execute binary file   I wish I could get a longer explanation if a library is missing but I get only this.  I dont know why it tells me that there is  no such file or directory  $ /home/jdc/Programas/Camaras/iVMS-4200  bash: /home/jdc/Programas/Camaras/iVMS-4200: No such file or directory   It has execution permits  $ ls -al total 11300 drwxrwxr-x. 10 jdc jdc     4096 Jun 30  2016 . drwxr-xr-x.  9 jdc jdc     4096 Feb 15 00:12 .. drwxrwxr-x.  4 jdc jdc     4096 Jul 27  2015 ChannelPicture -rw-rw-r--.  1 jdc jdc      219 Sep 21  2015 ClientRestore.xml -rwxr-xr-x.  1 jdc jdc 11438896 Aug 28  2013 iVMS-4200 drwxrwxr-x.  6 jdc jdc     4096 Jul 27  2015 Linux drwxrw-r--.  3 jdc jdc     4096 Jul 27  2015 log drwxrw-r--.  2 jdc jdc     4096 Jul 27  2015 Log drwxrwxr-x.  3 jdc jdc     4096 Jun 30  2016 maintain -rw-r--r--.  1 jdc jdc    83968 Jun 30  2016 NetSys.db drwxrwxr-x.  3 jdc jdc     4096 Jul 27  2015 PlugIns drwxrwxr-x.  6 jdc jdc     4096 Jun 28  2013 .svn drwxrwxr-x.  3 jdc jdc     4096 Aug 28  2013 translations   Running the command file  $ file iVMS-4200  iVMS-4200: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=1478ff289251b33cdc12e229efd816d50add28a9, not stripped


How to discover the package a utility belongs to

I installed CUDA using the official .deb form the NVIDIA homepage. But I ran into some trubles and wanted to redo the installation to ensure that every step along the way worked as expected.   Thus I 'apt-get purge cuda...'  But now I still have nvcc which confuses me as I expected it to belong to the cuda package.  How do I figure out which package nvcc belongs to?


Asking for more information on a question or answer

When asking for more information on a question or answer, it's not uncommon to see something along the lines of "Let me just use my crystal ball" or another such remark, to indicate that the person asking the question (which is the more common instance of this) or providing an answer needs to give more information or code because the question or answer simply does not give the information needed, probably skirting around important chunks of code.  Is there a better way to ask for more information? Perhaps a system could be implemented in which a viewing user can "request" more information, users who request more information are displayed on the question or answer as having done so and the user who asked or answered is notified. When the question or answer is updated, everyone who requested more information is notified as well.


Extend Careers to other sites (like Ask Ubuntu), not just Stack Overflow

There are many useful communities on  besides , like , , which are used by many talented and expert users (in a particular field). Why don't these communities have a career website and why doesn't Careers provide job opportunities to users of these communities in their respective fields? It would be great if Careers would extend its approach to  for Linux Jobs and  for System administration jobs.


I wrote two pieces of code, almost exactly the same, but one runs much faster than the other (Java)

I ran this segment of code: (outer loop runs 100 times, inner loop runs 1 billion times.)  long l = 0;  for(int i = 0; i < 100; i++)     for(int j = 0; j < 1000000000; j++)         l++;  System.out.println(l);   This took around 11-12 seconds when I ran it.  Then I ran this segment of code:  long l = 0; int i = 0, j = 0;  for(; i < 100; i++)     for(; j < 1000000000; j++)         l++;  System.out.println(l);   and this took about 100 ms (0.1 seconds) whenever I ran it.  Does anyone have any idea why there's a big difference? My theory is that for every value of 'i', the inner for loop has to initialize j again, which gives it more operations to do, so it makes sense that it takes longer. However, the difference is huge (by about 100 times), and with other similar tests, the same thing doesn't happen.  If you want to see it yourself, this is how I timed it:  class Main {     static long start, end;     public static void main(String[] args) {         start();          long l = 0;         int i = 0, j = 0;          for(; i < 100; i++)             for(; j < 1000000000; j++)                 l++;          System.out.println(l);          end();         print();     }      public static void start() {         start = System.currentTimeMillis();     }      public static void end() {         end = System.currentTimeMillis();     }      public static void print() {         System.out.println((end -  start) + " ms.");     } }


Message: file_get_contents(../../../test.js): failed to open stream: No such file or directory

I'm trying to list the size of JS files on a website by adding website URL using PHP language.  But it can't read links that contain something like ../


There is one line of C++ code shown below. return ::as_Register(value() >> 1);  I just want to know what's the meaning of the '::' which has nothing before it. Is it the C++ syntax? Can there be nothing before '::'? Such as return ::myMalloc(size)? The code is from jdk8 openjdk/hotspot/src/cpu/x86/vm/vmreg_x86.inline.hpp. I am deeply studying the JDK.


How can I disable globbing for URL arguments in Zsh?

I just wanted to download a YouTube video using youtube-dl, however, zsh interprets the questionmark ? (which separates the query part of the URL) as a globbing wildcard operator (which matches any single character) and thus it aborts the command with the following error message:   $ youtube-dl https://www.youtube.com/watch?v=eDSESarTQXk zsh: no matches found: https://www.youtube.com/watch?v=eDSESarTQXk   Is there a way to make zsh recognize URLs, perhaps using regular expression, so that it doesn’t try to glob them?


Per  I try to write callbacks (mostly for learning purposes before I proceed to promises) The Right Way(tm).  OK so I have this:  "use strict";  var fs = require('fs');  var readFileDone = function(err, data) {     if(err) return console.error(err);     console.log('read done');     writeFile(null, data); };   var writeFile = function(err, data) {     if(err) return console.error(err);     var ws = fs.createWriteStream('/tmp/copy.txt')     ws.end(data, 'utf-8', writeFileDone); };  var writeFileDone = function(err, data) {     console.log('writing file done'); };  fs.readFile('test_underscore1.js', readFileDone);   I run this using ST3's build system I defined for Javascript like so:  {   "cmd": ["/usr/bin/nodejs", "$file"],   "selector": "source.js" }   Now the problem: if I move line fs.readFile('test_underscore1.js', readFileDone); above callback definitions, it does not run (no output in console and the file in /tmp does not get created either).  Why is that? After all, Javascript is supposed to parse entire file including function definitions before running? Therefore, the position of the line calling fs.readFile should not matter?


I've some trouble understanding how to interpret the ROC and it's area under the curve for a classification task.  In general, the higher the AUC the better the model can classify true as true and false as false, independently from the threshold value, correct?  If AUC = 1 you can say that there is a threshold where True positiv rate (Recall) is 100%, meaning all true observations are predicted as true and False Positive Rate is zero, meaning that there is no predicted true value that is actually false. Moreover the TPR is always 100% for every threshold, only the FPR increases. Is this correct?  What about imbalanced data? So if I have 95 data points of class 1 and 5 of class 2 and my classifier always predicts class 1, i would still have a accuracy of 95%. So I understand why the accuracy is not good for that case. But what about the AUC? Is it meaningful if I have imbalanced data? Would this classifier achieve a high or low AUC value? Does it matter which class i choose to be the "true" one?  I looked through some blogs. Some say yes, some say no. Can anyone explain it with an example for a better understanding?  Thank you! Cheers!


Recently in an episode of 'House of cards' they bring up the joke     "Two freshmen girls are moving into their dorm room together. One of them's from Georgia, one of them's from Connecticut. The girl from Connecticut's helping her mother put up curtains. Girl from Georgia turns to them and says, "Hi. Where y'all from?" Girl from Connecticut says, "We're from a place where we know not to end a sentence with a preposition." The girl from Georgia says, "Oh, beg my pardon. Where y'all from...cunt?"   Now, i suppose the punchline has something to do with the not-preposition, but what i don't get is why the Connecticut girl even considers that a sentence cannot end with a preposition? Is there any reason for stating that prepositions can't be on the end of a sentence? And if not, what is the punchline of this joke?  If this joke's punchline is not pertaining to English language or if this is not a grammatical joke, i'm sorry and will remove the question.


Best practices for source file line lengths?

Are there any best practices for how long to make your lines in your source file?  I'm also interested if there are best practices for it if there aren't any LaTeX-specific best practices.  I originally typed my LaTeX files like I was in Word:    each paragraph on its own line.   However, I eventually found that to be rather cumbersome and so I switched to one sentence per line (around the same time I moved from Dropbox to git).   That was large improvement for me.  Since I tend to write long sentences and like my footnotes, I tried an experiment in a file:    break lines after commas as well as after periods.   So far, it seems that this method would require a good bit of manual clean-up, since it produces some very short lines and there are still overly-long lines in the file.   What methods have you found to be the best for keeping your source's line lengths reasonable?


In what subfields and how far can the naive limit $c\rightarrow\infty$ of special relativity be carried?

Even if many interesting similarities between the classical and the quantum mechanical framework have been worked out, e.g. in the subject of deformation quantization, in general, there are some mathematical problems. And in the conventional formulation, you don't want to make things like $\hbar\rightarrow 0$ for the expression $P=-\text i\hbar\tfrac{\partial}{\partial x}$.   In special relativity there are many formulas where one optains the non-relativistic formula by taking the naive limit $c\rightarrow \infty$, e.g.  $$\vec p=\frac{m\vec v}{\sqrt{1-|v|/c}}\ \rightarrow\ \frac{m\vec v}{\sqrt{1-0}}=m\vec v.$$  I wonder if it is know that you can always do that. Is there a formulation of special relativity (maybe it's the standard one already), where the starting assumptions/axioms/representations of objects of discourse involve the constant $c$, and as you take them with you to do all the standard derivations, you always end up with results which reduce to the Newtonian mechanics if you take that limit?


Transfer subtype Descriptions form long integer value into a string at new diffrent field

I need to convert entire geodatebase into shp files.One of the layers have 30 subtypes. I want and maintain the subtype data. Is there a way to Automatically populate the name of the subtype (Transfer subtype Descriptions)in to a new string field in order to not do it manually and not lussing the subtype data ?


I need toSolve this proof for complex numbers

Proof that If $$ \sum_{n=1}^{\infty} z_{n} $$  converges, then  $$\lim _{n \rightarrow \infty} z_{n}=0 $$ Prove for complex numbers  Given an infinite sequence $z_{1}, z_{2}, z_{3}, \ldots ., $ let $$ S_{N}=z_{1}+z_{2}+\cdots+z_{N} $$ We call the sequence $ S_{1}, S_{2}, S_{3}, \ldots $ an infinite series, which we denote $$ \sum_{n=1}^{\infty} z_{n} $$ We call $ S_{N} $ a partial sum. If $ S_{N} $ converges with $S=\lim _{N \rightarrow \infty} S_{N}, $then we say $\sum_{n=1}^{\infty} z_{n} $ converges and write $$ \sum_{n=1}^{\infty} z_{n}=S $$ If $S_{N} $ does not converge, we say $\sum_{n=1}^{\infty} z_{n}$ diverges. Suppose $z_{n}=x_{n}+i y_{n} $ and $S=X+i Y . $ Then it follows from previous results that $$ \sum_{n=1}^{\infty} z_{n}=S $$ and only if $$ \sum_{n=1}^{\infty} x_{n}=X \text { and } \sum_{i=1}^{\infty} y_{n}=Y $$ If $$ \sum_{n=1}^{\infty} z_{n} $$  converges, then  $$\lim _{n \rightarrow \infty} z_{n}=0 $$ Proof. Let  $$S=\sum_{n=1}^{\infty} z_{n} $$  and $$S_{N}=\sum_{n=1}^{N} z_{n} . $$Then $$ \lim _{N \rightarrow \infty} z_{N}=\lim _{N \rightarrow \infty}\left(S_{N}-S_{N-1}\right)=S-S=0 $$ Let $\sum_{n=1}^{\infty} z_{n} $ be a series with $ \operatorname{sum} S $ and $ N^{th} $  $ \operatorname{sum} S_{N}= $ $ \sum_{n=1}^{N} z_{n} . $ The remainder $\rho_{N} $ after $ N  terms Is ( \rho_{N}=S-S_{N}   Notice that series $\sum_{n=1}^{\infty} z_{n} $ converges to ( S ) if and only if sequence Want to know that. Is this proof right or can i shorten this proof? If anyother easy way to proof please provide


Syntax Error: unexpected end of file — Bash script

I am trying to create an spritz app. Everything was working fine, but since yesterday I keep getting this error:     ./spritz: line 176: syntax error: unexpected end of file   I have checked the script file and everything seems perfect. I am confused, I have an if statement at last and it looks correct! Here is the last portion:  #checks if speed is 150 157 if [[ $2 -eq 150 ]]; 158 then 159 starttime=$SECONDS 160      FS=$'\n' 161      for j in `grep --color=always -iP '\b[^aeiou\s]*[aeiou][^aeiou\s]*\K[aeiou]' $1`; 162      do 163            #Reads the text file in the centre of the screen 164            echo "                                                    ___________________" 165            echo "                                                             $j"; 166            echo "                                                    ___________________" 167            echo "                                                                               Speed 150 wpm" 168            sleep  0.9; 169            clear; 170       done 171 endtime=$(($SECONDS - $starttime)) 172            echo "You read $words_read words in $endtime seconds!" 173       exit 8 174 fi   What could cause that error?


Low income level investing - most promising option to start out?

I grew up really poor, my parents were terrible with money and I want to make sure now that I have a family of my own that I don't follow the same path and leave nothing but a life of hard work and not a lot of hope for my daughter. I don't have a lot of funds and want to start investing in more than just my 401k but I'm really not sure which option(s) would work best for my family.  We have about 500.00 which we could start investing. Mostly spend our time paycheck to paycheck so extra money is rare for us.  Is there a good rule to follow about what types of investing to focus on with a lower amounts of assets? I've looked into a few things and to be honest my head starts spinning but I'll briefly put in what I've looked into   Precious metals, but I don't feel like what I could afford (silver) has enough growth to bother and everything I've found charges way more than what listings show the value at. Robo-advisors didn't sound appealing after hearing ads for STASH but I came across Wealthfront with seemed to have a much better system, I just don't know what kind of return I could hope for from a service like this vs me doing it on my own. High rate savings account, I feel like this is the safest bet but I've been told that it tends to require more than what I have. Mutual funds, my dad father was a freelance insurance salesman (I'm really not sure why but somehow the companies he worked for were connected to mutual funds) and always praised these, but he also fell for 4 money marketing schemes so I've never really trusted his judgment with finances. Personal stock investing, this mostly left me feeling like I was looking at latin, so outside of me trying to invest in a company I know by name that might continue to do well (all of those seem like their shares are insanely expensive for me), I feel like I was just playing really, really long game of roulette waiting for the the ball to drop. ???? I don't know the name of this one, I worked with a guy who was becoming a trader for this type of stock-esque investments, but roughly equated to buying oil or other raw goods that are just sitting on barges out at sea and waiting for the price become good enough to bring inland.   Sorry for the jumble of information, thanks in advance for any helpful tips!


What are the conditions for a clean night sky? With plenty stars?

You know.. at some places of Earth, the night sky looks like this: (right?) However, you might definitely know that, at some other places, the night sky looks like this: (source: ) Have you seen any stars from the last one? So, I was wondering, what are exactly the right conditions, such that the night sky will be like in the first image? To be able to see plenty of stars? Evidently needs to have no clouds. But, what else? It needs thin atmosphere? No city lights? No suspended pollutants? Needs that certain molecules are not there? No light scattering? No light pollution? So, what are the some of the important conditions that has to happen? And why?  Some remarks: Now,  answer blames on light pollution from cities. However, during a general blackout some time ago, which sizable areas had no light (over 700Km radius), sure, I could see more stars than before, but never such a great sky. So, maybe light pollution has its contribution, but it is the only factor? Besides, this answer itself acknowledges in the end, that this depends on several factors. And so, I guess I wish a more complete answer.