For example birth rate, death rate in population modelling. Correct me if I'm wrong, but does this mean a certain number of births or deaths over a period of time?   Aslo, rate of change in calculus when dealing with derivatives. Does this mean infinitesimal change with respect to another quantity. How much y changes when we change x quantity. Can someone please give me some laymen term examples to confidently understand this.   I've looked elsewhere online for clarification, but nothing seems to be resolving my Confusion.

If we have a function, say, $y=x^2$, then $dy/dx=2x$. Now $y=1,4,9,16...$ for $x=1,2,3,4...$ and $dy/dx=2,4,6,8...$ for $x=1,2,3,4...$ Now as $dy/dx$ represents rate of change of y w.r.t x but I can't understand how these particluar values of $dy/dx$ represent change ? I mean for x=3, the rate of change is 6. What does it mean ?


I want to get a newly created HTML element that is toggling on and off after click event. Initially this does not show in the DOM when page loads. I have several divs I am looping through, each with a link inside that I want to program to click and capture the new element while it is toggled. How do I go about doing this? var div = document.getElementsByClassName('div');      // get divs              for ( var i =0; i < div.length; i++) {    // loop through each div                      var link = div[i].lastChild;           // get link inside individual div                  link.click();                          // click link    var popup = document.getElementsByClassName('popup');    // capture new div      console.log(popup);                                    // HTMLCollection length is 0       }   I've put the variable y into a loop and comes as undefined. This is a live / toggle DOM event, I just don't know how to go about doing this, to get that element. Thanks

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


Prompted by my , what should one do if they find something that might be a bug but aren't sure? Should these be reported? Ignored? Is there somewhere where there is a "tracker for potential bugs"?

What websites or other resources do users of Blender have available to them to report bugs or problems with the program?  I would like to get this issue cleared in Q&A format so that we can link new users with bug-report-style questions to this post.


She has forgotten how she could open the window.  Vs  She has forgotten how she can open the window?   In a sentence like this, which is correct or better ? could  or can? Why? Thanks!

Most people say I wish I could, I wish you would.    Can we use I wish I can, I wish you will?    I'd like to know what the main differences between the usage of can/will and could/would are when wishing.  Is it related to the subjunctive? Because one says “I wish I were”, not “I wish I am”, so are would and could the subjunctive forms of can and will?  Or is it something else entirely?


I got this error during installation.  The installer encountered an error copying files to the hard disk: [Errno 5] Input/output error This is often due to a faulty CD/DVD disk or drive, or a faulty hard disk. It may help to clean the CD/DVD, to burn the CD/DVD at a lower speed, to clean the CD/DVD drive lens (cleaning kits are often available from electronics suppliers), to check whether the hard disk is old and in need of replacement, or to move the system to a cooler environment.  How can I fix this and what does it mean specifically? I'm installing via USB so it can't be the CD. the laptop is recent so it cant be an old HD.

I downloaded the ISO from , selecting the default "Ubuntu Desktop" option.  The website links the page  which gives instructions how to verify ubuntu.  This seems pretty tedious, and I am wondering how realistic it is that there is a problem with ISO downloaded from the official website. I note that the process of verification itself requires me to download software that is new to me, thus introducing another attack vector on me even as I am closing another one.  For what it's worth, I am planning to use Live USB only and not to fully install Ubuntu. Does that make a difference?


I know that the end product of a master's thesis can be not only a scientific finding, such as the relationship found between certain variables, but also the business plan, or even a concept for a new product or service.  What can be the end product of my PhD dissertation? My idea is to actually to carry out a research project, in other words, to have some 100-200 interviews, collect some qualitative data etc. But can a business plan / model be my actual finding? Can I make a business case, develop that something [and later sell it as a finished product], but still call this everything a PhD by turning the idea into a scientific problem, and having a product as a result / finding?  Can a PhD be an applied research?  Working title: Development of an innovative marketing product (or service) for tourism industry, and understanding a demand for such a product (or service).   Field of study: Marketing / Innovation / Tourism

Few days back while attending a thesis defense, one Professor was asking the defender why does he think, he deserves the degree. I was wondering since then, is there really any general answer for that? or the answer should be given describing my own work and then emphasis them how it is important for research field?  I asked the question here to know your opinion about it and to list down what could be the possible answers to this question.


If a relation is both symmetric and anti-symmetric, isn't it always reflexive? I am supposed to consider a set, S, where some Relation A is both symmetric and anti-symmetric. I thought that anti-symmetric means that if (x, y) is in the relation, then (y, x) cannot be in it unless x = y. So, wouldn't it hold that it is reflexive?

Antisymmetric: $\forall x\forall y[ ((x,y)\in R\land (y, x) \in R) \to x= y]$ reflexive: $\forall x[x∈A\to (x, x)\in R]$  What really is the difference between the two? Wouldn't all antisymmetric relations also be reflexive?


I have two divs with a button which when clicked, changes the class (col-lg-6 to col-lg-1) of a div and adds the sectionMinimized class. I'm trying to make it that when the entire div with the sectionMinimized class is clicked, the console logs "hey". For some reason it doesn't work unless I add the:  $('.sectionMinimized').click(function() {     console.log("HEY!"); });   in the console.  Here's the code:      $('.expand-section').click(function() {     buttonId = $(this).attr('id');     console.log(buttonId);     if(buttonId === 'expandEvent') {         $('.event-section').removeClass('col-lg-6');         $('.event-section').addClass('col-lg-3 order-1');         $('.event-section').find('button').addClass('hidden');         $('.permanent-section').removeClass('col-lg-6');         $('.permanent-section').addClass('col-lg-1 order-2');         $('.event-section').addClass('sectionMinimized');         $('.permanent-section').find('h2').addClass('header-minimize');         $('.permanent-section').find('p').addClass('hidden');         $('.permanent-section').find('button').addClass('hidden');         console.log($('.sectionMinimized').attr('id'));     } else {         $('.permanent-section').removeClass('col-lg-6');         $('.permanent-section').addClass('col-lg-3 order-1');         $('.permanent-section').find('button').addClass('hidden');         $('.event-section').removeClass('col-lg-6');         $('.event-section').addClass('col-lg-1 order-2');         $('.event-section').addClass('sectionMinimized');         $('.event-section').find('h2').addClass('header-minimize');         $('.event-section').find('p').addClass('hidden');         $('.event-section').find('button').addClass('hidden');         console.log($('.sectionMinimized').attr('id'));     } });  $('.sectionMinimized').click(function() {     console.log("HEY!"); });   Can someone advise on how I can get this to run?


I understand how it is that electrons move from one energy state to another, however I've not been able to find anywhere that describes why an atom has any .   Why should an atom of one element have a particular set of energy states and an atom of another element have a different set of energy states?

Given some potential $V$, we have the eigenvalue problem   $$ -\frac{\hbar^2}{2m}\Delta \psi + V\psi = E\psi $$   with the boundary condition   $$ \lim_{|x|\rightarrow \infty} \psi(x) = 0 $$   If we wish to seek solutions for   $$ E < \lim_{|x|\rightarrow \infty}V(x), $$   I find textbooks like Sakurai and others assert that (without proof) set of all such eigenvalues $E$ that admits nontivial solutions is discrete, which gives us liberty to index them with natural numbers (principal quantum numbers). Can anyone help me with a little elaboration of this mathematical fact ? As a student of mathematics, I know that compact operators have discrete spectrums, so for the operator $ T : L^2 \rightarrow L^2 $given as  $$ T(\psi) = -\frac{\hbar^2}{2m}\Delta \psi + V\psi. $$   Are there methods to show that $T$ is compact? Or possibly other ways to establish discreteness of its eigenspectrum?


I am using a .sty file submitted by a journal which puts the section headers in capitals format. However, when i use the following  \usepackage[compact]{titlesec} \titlespacing{\section}{0pt}{*1}{*1} \titlespacing{\subsection}{0pt}{*1}{*1} \titlespacing{\subsubsection}{0pt}{*1}{*1} \titlespacing{\paragraph}{0pt}{*1}{*1} \titlespacing{\subparagraph}{0pt}{*1}{*1}   this formatting is replaced by a format of first letter in capitals, the rest in small lettering. Is there a way to get \titlesec to respect the fonts, lettering, etc of the style file?  Sorry if this question is not very clear.  I am happy to clarify further.

I am trying to change the font and format of heading using titlesec package. However it gives me the following error.    Missing { inserted \tableofcontents <br> Missing { inserted \chapter{Introduction}    The code:  \documentclass[10pt, letterpaper]{report} \usepackage{thesis}   \usepackage{titlesec} \renewcommand{\chaptername}{CHAPTER}{\Large} \titlespacing*{\chapter}{0pt}{0.5in}{0.3in} \titleformat{\chapter}[display]         {\normalfont\Large\centering\uppercase}{\chaptertitlename\ \thechapter}{0pt}{\Large} \titleformat{\section}{\large\bfseries}{\thesection}{1em}{}   \begin{document} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  \tableofcontents  \chapter{Introduction}  Some text.  \end{document}


I tried to show that $\mathbb Q$ with addition is not a cyclic group. Here is the proof: If possible assume that there is $a\in \mathbb Q$ such that $\mathbb Q=\langle a \rangle$. Note that $a\neq 0$. For $1\in \mathbb Q$ we must have $1=ma$ for some $m\in \mathbb Z$. Now for each $n\in \mathbb N$ we must have $\frac {1}{n}=m_n a$  for some $m_n\in \mathbb Z$. Then $1=nm_n a$ for each $n\in \mathbb N$. Then $ma=nm_n a$. Then we get $nm_n-m=0$. So $n$ must divide $m$ for each $n\in \mathbb N$. Then $m$ must be a zero which is not possible. So our supposition is wrong. Hence $\mathbb Q$ is not cyclic. Is this correct?

So i'm trying to understand the proof of:  $\mathbb{Q}$ is not cyclic. So this is the proof:  We proceed by contradiction.  Suppose $\mathbb Q$ is cyclic then it would be generated by a rational number in the form $\frac{a}{b}$ where $a,b \in \mathbb{Z} $ and $a$, $b$ have no common factors. Also, $a,b \neq 0$.   The set $\langle\frac{a}{b}\rangle$ consists of all integer multiples of $\frac{a}{b}$.  Therefore, if $\mathbb{Q}=\langle\frac{a}{b}\rangle$, then $\frac{a}{2b}$ is an integer multiple of $\frac {a}{b}$  PROBLEM: Why is $\frac{a}{2b}$ an integer multiple? or how is it an integer multiple. I'm not seeing it because isn't $\frac{a}{b} \times \frac{a}{b}=\left(\frac{a}{b}\right)^2$  Anyways, here is the rest of the proof:  but if   $c \times \frac{a}{b}=\frac{a}{2b}$ then $c=\frac{1}{2}$ is not an integer.  Thus, $\mathbb{Q}$ cannot be generated by a single rational number and is not cyclic.   If anyone can clarify that would be great. Also, another problem I have is doesn't this show that $\mathbb{Q}-\{0\}$ is not cyclic because I thought $\mathbb{Q}$ under the operation multplication is not a group unless zero is removed.


I am reading Quantum Theory: Concepts and Methods by Asher Peres. Terminology used in the book: $P_{\mu m}$ are "transition probabilities". They are the squares of "transition amplitudes". That is, \begin{equation}| C_{\mu m}|^2 = P_{\mu m}\end{equation} He says on page 40,  Up to this point , nothing was assumed that had any physical consequence. The phases of the transition amplitudes $C_{\mu m}$ still are irrelevant, and we could as well have stayed with the probabilities $P_{\mu m}$. It is only now that we introduce a new physical hypothesis (borrowed from classical wave theory): Law of Composition of Transition amplitudes. The phase of the transition amplitudes can be chosen in such a way that, if several paths are available from the initial state to the final outcome, and if the dynamical process leaves no trace allowing to distinguish which path was taken, the complete amplitude for the final outcome is the sum of the amplitudes for the various paths.  Then on page 43 he says  The amplitudes $C_{\mu m}$ should be considered as the primary, fundamental object, and the probabilities $P_{\mu m}$ should be derived from them, in spite of the fact that the $P_{\mu m}$ are the only quantities that are directly observable.  My Question I don't understand why we work with transition amplitudes instead of probabilities if the probabilities are the only direct obserables. Can someone explain why transition amplitudes are regarded as more fundamental?

Why is the application of probability in  (QM) fundamentally different from its application in other areas? QM applies probability according to the same  as in other areas of physics, engineering, etc.  Why is there a difference?  Naively one would assume one of these possibilities:   It is not the same probability (theory?) It is a matter of interpretation (of the formalism?) Something else?   Many answers (which I am still studying) focus on the fact that the combined probability of two mutually-exclusive events in QM is not equal to the sum of the probabilities of each event (which holds classically by definition). This fact (appears to) makes the formulation of another probability (a quantum one) a necessity.   Yet this again breaks down to assumed independent, if this is not so, the "classic probability" is applicable (as indeed in other areas). This is one of the main points of the question.


Can some one please give me a hint to prove that every group of order $p^2+p$ is not simple?

I want to show that there are no simple groups of order $p^{k}(p+1)$ where $k>0$ and $p$ is a prime number.  So suppose there is such a group. Then if we let $n_{p}$ denote the number of $p$-Sylow subgroups of $G$ we have that $n_{p}=p+1$. Now by letting $G$ act on $Sylow_{P}(G)$ by conjugation we obtain a group homomorphism $G \rightarrow S_{p+1}$. Since $G$ is simple then either $ker(f)$ is trivial or all $G$. Now here's my question: assume $ker(f)=G$ this would imply then that $G$ has a unique $p$-Sylow subgroup no? but then such subgroup is normal which contradicts the fact that $G$ is simple. So the map in fact is injective but then $|G|$ divides $(p+1)!$ which cannot be.  Basically my question is if my argument is correct, namely thta if $ker(f)=g$ implies the existence of a unique $p$-Sylow subgroup which implies such subgroup is normal in $G$ which cannot be. In case this is wrong, how do you argue that $ker(f)$ cannot be all $G$?  Thanks


I need to automate interaction with a website that is initially protected with ReCaptcha. Can I initially manually log in to the website and solve 2FA, then hand-over the existing manually initiated session to the testing application to automatically run through the website tests with my manually authenticated session?

How can I automate "Enter CAPTCHA" using Selenium WebDriver?


I tend to quote command substitutions as shown below even when assigning their output to a variable: var="$(command)"  Is that actually needed though? When does it break? The accepted answer  claims:  DIRNAME="$(dirname $FILE)"  if $FILE contains whitespace or globbing characters [?*.  The link points to Grey Cat Wiki's great page about quoting but that page doesn't mention quoting command substitutions specifically. And while quoting the variable is clearly needed, quoting the command substitution itself doesn't seem to be. However, the same post concludes with:  DIRNAME="$(dirname "$FILE")" is the recommended way. You can replace DIRNAME= with a command and a space without changing anything else, and dirname receives the correct string.  Which is what I've always thought as well and have often ocrrected posts here that didn't quote it. However, the wiki page linked to above also claims that:  There are a few cases where double quotes may be safely omitted: On the right hand side of a simple assignment. You may write foo=$bar without quotes. This is POSIX compliant. [. . . ]  While var=$(command) isn't really a "simple" assignment, I was nevertheless unable to find a case where the quotes were actually necessary: $ var=$(echo "foo bar baz")  ## whitespace works $  echo "$var" foo bar baz  $ var=$(printf "foo\nbar * baz") ## so do globbing characters $ echo "$var" foo bar * baz  $ var1="foo\nbar * baz" $ var=$(printf "$var1")  ## printing a variable doesn't make any difference $ echo "$var"  foo bar * baz  $ var=$(printf '%s\n' "$var1") $ echo "$var" foo\nbar * baz  $ var=$(printf -- '-e %s\n' "$var1") ## strings starting with - also work $ echo "$var" -e foo\nbar * baz  Of course, the quotes are absolutely necessary if the command substitution is being used directly for things like command1 "$(command2)", but that doesn't seem to be the case when assigning to a variable. So, what am I missing? Are the quotes ever needed? What corner case will quoting a command substitution when assigning its return value to a variable protect you from? Or is it always OK to not quote a command substitution if it is the right hand side of a variable assignment operation?

The old advice used to be to double-quote any expression involving a $VARIABLE, at least if one wanted it to be interpreted by the shell as one single item, otherwise, any spaces in the content of $VARIABLE would throw off the shell.  I understand, however, that in more recent versions of shells, double-quoting is no longer always needed (at least for the purpose described above).  For instance, in bash:  % FOO='bar baz' % [ $FOO = 'bar baz' ] && echo OK bash: [: too many arguments % [[ $FOO = 'bar baz' ]] && echo OK OK % touch 'bar baz' % ls $FOO ls: cannot access bar: No such file or directory ls: cannot access baz: No such file or directory   In zsh, on the other hand, the same three commands succeed.  Therefore, based on this experiment, it seems that, in bash, one can omit the double quotes inside [[ ... ]], but not inside [ ... ] nor in command-line arguments, whereas, in zsh, the double quotes may be omitted in all these cases.  But inferring general rules from anecdotal examples like the above is a chancy proposition.  It would be nice to see a summary of when double-quoting is necessary.  I'm primarily interested in zsh, bash, and /bin/sh.


Trying to setup environment for android ROM development, but the libgl1-mesa-glx:i386 package is not installing. Getting error:   Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming.  The following information may help to resolve the situation:  The following packages have unmet dependencies: libcheese-gtk23 : Depends: libclutter-gtk-1.0-0 (>= 0.91.8) but it is not going to be installed                Depends: libcogl15 (>= 1.15.8) but it is not going to be installed libcheese7 : Depends: libclutter-gst-2.0-0 (>= 0.10.0) but it is not going to be installed           Depends: gstreamer1.0-clutter but it is not going to be installed libclutter-1.0-0 : Depends: libcogl-pango15 (>= 1.15.8) but it is not going to be installed                 Depends: libcogl15 (>= 1.15.8) but it is not going to be installed libgl1-mesa-glx:i386 : Depends: libglapi-mesa:i386 (= 10.1.3-0ubuntu0.4)                     Recommends: libgl1-mesa-dri:i386 (>= 7.2) E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.   I'm on Ubuntu 14.04.2. Need help...      Update: Meanwhile I installed libglapi-mesa-lts-saucy:i386    Is it fine now?

I'm getting the following error message when attempting to install libglew-dev,  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  libcheese-gtk23 : Depends: libclutter-gtk-1.0-0 (>= 0.91.8) but it is not going to be installed                    Depends: libcogl15 (>= 1.15.8) but it is not going to be installed  libcheese7 : Depends: libclutter-gst-2.0-0 (>= 0.10.0) but it is not going to be installed               Depends: gstreamer1.0-clutter but it is not going to be installed  libclutter-1.0-0 : Depends: libcogl-pango15 (>= 1.15.8) but it is not going to be installed                     Depends: libcogl15 (>= 1.15.8) but it is not going to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.   All those packages are however apparently already installed.  I have tried all possible solutions in  post, without any luck. I have not added any PPAs. The version of ubuntu is 14.04.2.  I have looked at similar posts, and tried the following:  Running  dpkg --get-selections | grep hold   prints nothing.  sudo apt-get -oDebug::pkgProblemResolver=true install -f   Gives me nothing of interest, 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


I was very confused by this problem, I don't even know what it is asking. Any help would be great :) thanks in advance.

The divisibility rule for $3$ is well-known: if you add up the digits of $n$ and the sum is divisible by $3$, then $n$ is divisible by three.  This is quite helpful for determining if really large numbers are multiples of three, because we can recursively apply this rule:  $$1212582439 \rightarrow 37 \rightarrow 10\rightarrow 1 \implies 3\not\mid 1212582439$$ $$124524 \rightarrow 18 \rightarrow 9 \implies 3\mid 124524$$  This works for as many numbers as I've tried.  However, I'm not sure how this may be proven.  Thus, my question is:     Given a positive integer $n$ and that $3\mid\text{(the sum of the digits of $n$)}$, how may we prove that $3\mid n$?


I'm building a function into the account management software I'm working on that allows the user to "lock" themselves into a mode where all the content/data being displayed is relevant to a single account (chosen by the user).   Currently this is triggered by a button with the name of the feature and a padlock icon.   Right now the state of the padlock icon is tied to the action you're carrying out by clicking it. When the function is off, the action is to lock, and we show a locked padlock.  When the function is on, the action would be to unlock, so we show an unlocked padlock.   There are plenty of other signifiers and confirmations in the mix, so I'm not worried about the icon alone confusing users, but does it make more sense to reverse things and have the icon display the current state rather than the action? e.g. Display as locked when the user is locked into an account, and unlocked when they're not.

I have a quick question about buttons that toggle between two states. (Think Play/Pause, or Shuffle/Regular Play.) As the title says, should the toggle show it's current state or the state to which it will transition?  I think people are used to the Play/Pause convention. But the Shuffle/Regular play might be more confusing if you show the transition state instead of current. For example, the built-in music player on the Xbox 360 does it this way: when it's in shuffle mode, it shows the icon for direct play and vice versa and it always confuses me (am I in shuffle mode or straight play).  I see it this way: Play/Pause is more like action as in begin playing or pause playing. Yes behind the scenes it is a state transition but to the user, there is an action. Whereas Shuffle/Straight Play is an option and it's best to show the current state (and possibly have only one icon and change button to show that the option is enabled/disabled). Thoughts?


Was wondering if someone can help me. I want ti be able to bend this lens around the spiderman faceshell so that it sits flush with the shell. I have tried shrinkwrap and adding depth after but it looks horrible. Any ideas please?  Thanks

I have seen other similar questions but they don't seem to be what I want, please correct me if I'm wrong.  For simplicity: delete the default cube, NumPad7, add cylinder, rotate X 90, then add torus with ext/int 1/0.75 and raise it above the cylinder. It should look like this:.  What I want is to deform the torus against the cylinder, but make it as if it's a projection. This means that, when looked from above, it will look like a normal, undeformed torus (volume changes), but when viewed with NumPad1, it will look like a round-end tube following the curvature of the cylinder, while still having the same round cross-section. To make it worse, my object needs to be deformed by a more complex surface, such as sin(x).  If I'd use soft body, it will look shrinked when looking from above, i.e. it will preserve the volume. If I use shrinkwrap, it either does a projection with its circumference intact, but all flat, or it will project it (similar to what I want), but only the bottom side vertices, like a curtain.  Mesh modifier gets me nowhere since I have to manually tweak the surrounding mesh, and curve modifier also preserves the length/volume, while also squishing the section of the torus at the bending points.  My question(s): is there a way to project (mold) the torus onto the cylinder while preserving it's cross-section? Can this be extended for more complex meshes to be projected or to be projected on?    This is, roughly, what the side view (along Y axis in the 1st pic) would look like after the deforming of the torus:    The unselected shape above is the torus (as it is in the first picture), and the selected shape is what it would look like after the deform, or molding, whatever you want to call it.  And here is what it would look like when seen from above (top view, along Z axis)): i.stack.imgur.com/HVOCo.png (can't add more than 2 pics)  The view would be the same before and after the torus is deformed.


As caramel sauce makes everything better from cakes to brownies, cookies even enhances the flavor of popcorn. I am thinking to make caramel sauce and freeze it, so it can be used as and when required. So can caramel sauce be  frozen? How long does caramel sauce last in the fridge?

I made a butterscotch sauce for a butterbeer cupcake, but I have about a cup of the sauce left.  How long can I leave it in the fridge since it has heavy cream?  Can I freeze it?  I imagine for most purposes, caramel and butterscotch sauces will have the same storage methods.


have run my theme through the Theme checker plugin and it seems upset about use of file_get_contents to get a json url. I've found posts saying i should use wp_remote_get. I'm currently decoding the url with the following:   $url = 'url' . $var; $json =   file_get_contents($url,0,null,null); $output = json_decode($json,true);    The message I get from the Theme Checker is:     WARNING: file_get_contents was found in the file.php possible file operations.   Is it just saying this because there is a function I could possibly use by wordpress or any other reasons? Also how would I use wp_remote_get. I tried a few variations, mostly replacing file_get_contents with wp_remote_get with no luck. Doesn't seem to decode the url at all.

I have a script that pulls the facebook likes via facebook graph and writes them in my DB. However it uses file_get_contents_curl for the request and this is causing problems, so I'd like to use the wp_remote_get() command. I've tried to change it but somehow I can't do it (I don't really have PHP knowledge).  Here's the part of the script:  foreach($posts as $post)     {          $fb = json_decode(file_get_contents_curl('http://graph.facebook.com/?id='.get_permalink($post->ID)));         if( !isset( $fb->likes) && isset($fb->shares) )         {             $fb->likes = $fb->shares;         }         //$fb->likes = isset($fb->likes) ? $fb->likes : 0;         $myfblikes = sprintf("%04s", (int)$fb->likes);         update_post_meta($post->ID, 'fb_likes', $myfblikes);     }


Have found this question multiple times on the forum, but none of the answers were serious enough. So the problem with ubuntu 12.04. LTS server is that after a fresh install you can not install build-essential package. This is what you get:   Reading package lists... Building dependency tree... Reading state information... Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  build-essential : Depends: libc6-dev but it is not going to be installed or                             libc-dev                    Depends: g++ (>= 4:4.4.3) but it is not going to be installed   Things that DON'T help:   apt-get clean apt-get update apt-get -f install apt-get upgrade dpkg --configure -a apt-get autoclean apt-get --fix-missing install build-essential   apt does say that I have "held broken packages", but none of the above commands solves them. After running any of the above commands the summary at the bottom is all zeros (upgraded, newly installed, remove, not upgraded)  uname -a gives:  Linux sorrg01lin 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:42:40 UTC 2014 i686 i686 i386 GNU/Linux   lsb_release -a gives:   Distributor ID: Ubuntu Description:    Ubuntu 12.04.4 LTS Release:    12.04 Codename:   precise

Occasionally, when I'm installing stuff, I get an error like the following:  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this?


I need compatible Ubuntu version no. to install on the following configuration  CPU P4- 512MB RAM   300 MHZ CLOCK FREQU

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


Currently I'm working on a theme, and did some styles and scripts enqueue. When enqueued the scripts, I used wp_register_script() first, and then enqueued with wp_enqueue_script() - because I got that's the proper way of enqueuing the scripts. But in enqueuing the styles, I used only the wp_enqueue_style() with all its parameters. But just now I got  from s_ha_dum saying that using the wp_register_style() would make theme child theme-friendly - I wonder, without the wp_register_style() I's using only the wp_enqueue_style() and my theme's working fine with the enqueued styles. I enqueued them like:  add_action( 'wp_enqueue_scripts', 'wpse20131025_styles' );  function wpse20131025_styles(){      wp_enqueue_style( 'site-styles', get_template_directory_uri() . '/style.css', '', '', 'screen' );     wp_enqueue_style( 'menu-styles', get_template_directory_uri() . '/css/menu.css', '', '', 'screen and (min-device-width: 800px)' );     wp_enqueue_style( 'mobile-menu-styles', get_template_directory_uri() . '/css/mobile-menu.css', '', '', 'screen and (max-device-width: 799px)' );  }   While the wp_enqueue_style() has all the parameters that present in wp_register_style() ($handle, $src, $deps, $ver, $media) then why should I repeat them? Or, what exactly the purpose of wp_register_style() other than wp_enqueue_style()?

I'm having trouble understanding when you need to use wp_register_script(). Currently, I just use something like:  add_action( 'admin_enqueue_scripts', array( $this, 'enqueue' ) ); function enqueue() {     $handle = 'some-handle';     $js = 'http://example.com/my.js';     wp_register_script( $handle, $js );     wp_enqueue_script( $handle ); }   I've done a lot of reading (Codex, blogs, etc.), but can't quite understand when I should register first, or when I should just enqueue. As an example, I noticed TwentyTwelve doesn't register any styles or scripts, it just enqueues them.


When doing a regression on 3 variables to see how they effect electricity usage one variable comes out as not significant but with the correct expected relationship. When I put these 3 variables and add 6 others to it and run the regression again the variable now becomes significant (still with correct relationship), am I doing something wrong or should I change something? Thanks

I have what is probably a simple question, but it is baffling me right now, so I am hoping you can help me out.  I have a least squares regression model, with one independent variable and one dependent variable. The relationship is not significant. Now I add a second independent variable. Now the relationship between the first independent variable and the dependent variable becomes significant.  How does this work? This is probably demonstrating some issue with my understanding, but to me, but I do not see how adding this second independent variable can make the first significant.


I am trying to label a figure outside of the float environment. I am using the command \label{} and \ref{}. Unfortunately, Latex does print the correct number of the figure. Does someone know how to fix this? Thank you in advance! \documentclass{article} \usepackage[utf8]{inputenc}  \title{b} \author{} \date{February 2021}  \begin{document}  \maketitle  \section{Introduction}  \begin{itemize}     \item f     \begin{center}     \includegraphics[width=0.5\textwidth]{Versuchsaufbau.JPG}     \label{fig:Versuchsaufbau}     \captionof{figure}{nj}     \end{center} \end{itemize}  \end{document}

\documentclass{article} \usepackage{algorithm}  \begin{document} \setcounter{section}{54} \section{A section with no label} \begin{algorithm} \label{myalg} \caption{An algorithm with the label `myalg'.} \end{algorithm} Reference to myalg: \ref{myalg}. \end{document}   With this code, the reference givens 55 (the section number); if I move the label after the caption command, I get the correct reference (1).  Why should this be the case? I find it confusing: when thinking about an algorithm as an environment, you expect to be able to label it right after you began it. At the very least I would expect some kind of error or "??" to appear, rather than the previous environment or reference-able entity being used.


I've been given a Schengen visa valid for 1 month.  Unfortunately, I won't be able to travel during the dates I've specified in my application.  What should I do?  Do I just not use the visa?  Or should I let the embassy know so they can cancel it?

I'm granted a one-entry Schengen visa and now I can't go. Will having an unused visa in my travel passport have any consequences like future visas refusal? Do I need to do anything special?


How to use the default fonts (both for Chinese and for English) adopted by \documentclass{standalone} in \documentclass[beamer]{standalone}?    Using \documentclass{standalone}, the fonts are like:    \documentclass{standalone} \usepackage{xeCJK}  \begin{document}   是什么 Semantics \end{document}   Using \documentclass[beamer]{standalone}, the fonts are like:    \documentclass[beamer]{standalone} \usepackage{xeCJK}  \begin{document} \begin{frame}{Frame title}   是什么 Semantics \end{frame} \end{document}

The default beamer font seems to be Computer Modern sans serif. How do I change this to serif?    Note: \setbeamerfont{<element>}{family=\rm} seems to work for specific elements such as title, but I want this to be a global change.


The Booming Blade cantrip's secondary effect states that "[the target] becomes sheathed in booming energy until the start of your next turn. If the target willingly moves before then, it immediately takes 1d8 thunder damage, and the spell ends". We can deduce, then:   That the damage does not trigger when the target is dragged or pushed around via physical means (grappling, shoving, scenario effects, etc.) That the damage does not trigger when the target is dragged or pushed around via magical means (Gust, Eldritch Blast with Grasp of Hadar, Graviturgist's Gravity Well, etc.)   This seems pretty clear. However, what happens when the following cases arise?   The target is ordered to move via the use of Command (assuming they don't know yet that the thunderous aura is damaging). The target is forced to move via the use of Compulsion. The target is invited to move via the use of Suggestion. The target is Turned. The target is Frightened and forced to run via Dissonant Whispers. The target has a Geas that prohibits them from ending a turn next to an enemy if they can avoid it. The target is threatened into leaving the area or else. This one seems "willingly", but are they truly willing if they are panicking because you are telling them you will cut their heads off if they don't run?    seems to suggest that forcing people to move via mind control spells doesn't count as willing. However, , so I was looking for something more solid to make a RAW judgement of this interaction.

So this is something I just found out about that I find odd:   Opportunity attacks—trigger off of movement that uses the creatures movement (action, move action, bonus action, reaction.)  Sentinel—Whenever a creature within 5 ft of you makes an attack at a creature other than you.   Booming blade—If the target willingly moves.   Mental Prison spell—if it moves, attacks through it, or reaches any part of body out of it.   So the “willingly” is different than other rulings for how effects related to movement works. However what exactly fits willing?   Cause fear—nope magic is having them move. Dissonant whispers—same thing. They have to immediately move.   So the creature has to want to move completely of its own accord.   Crown of Madness—Humanoid creature you choose must make a wisdom saving throw. On a fail it is charmed by you. (Next is flavor text so skipping.) While charmed in this way the target must make an attack on a creature other than itself that you mentally choose on each of its turns before moving.  It can act normally if you choose no creature or if none are within reach.   Crown of madness isn't making them move but doesnt specifically say willing.  And if the ruling for willing is movement not caused by magic what about magic causing situations where you take damage if you don't move. Would a creature shimmering with evocation energy be spared because he moved out of the magical blender that is cloud of daggers? If no, then what is the go-to rule for willing movement that I should be using?  In short, what movement counts as willing, and where can it be found? Is moving out of obvious danger caused by magic, willing? Is moving away from an ally so you don't hit them, willing?   If there isn't any actual ruling on willing, that's fine; I'll go back to running it with my interpretation, so that it has same wording as AOO. If there is an actual 5e term or explanation for willing (that isn't Sage Advice), please let me know. I just don't see why it was necessary to put a term in the spell that isn't used anywhere else. I understand it could have been overlooked since it was in a splatbook or has just been ignored since most people probably assume that there is "Forced " and "Willing" movement, with the willing being defined as: any movement from an action, move action, bonus action, or reaction. In same way AOO work.


After calculating the eigenvalues, I get $1040400$ and $0$. Since one of them is $0$, how do I calculate (orthogonal) matrix $U$? $$u_i = \frac{1}{\sqrt{\lambda_i}} A v_i$$ I know there are a similar question here, but when calculation $u_1$ it's a null vector.  So, I don't see how I can find $u_2$.

The question is if you have a situation where one of the singular values is equal to 0 in a singular value decomposition of a matrix, how to do you procede to find the column vector of U corresponding to this singular value?   Usually I found the columns of U with this relation, so let's say that we refer to $\vec{u_2}$ as the U column vector corresponding to singular value equal to 0:  $\vec{u_2} = (1/s_2)Av_2$  Now the as we can see the 0 is in an illegal place, since you can't divide by zero. But if you move it to the left side, I still can't quite see how to find the column of U corresponding to it. Any suggestions?  Here is an example of a matrix that provided this specific challenge  $ A = \left(\begin{array}{rrr} -3 & 1 \\ 6 & -2 \\ 6 & -2 \end{array}\right). $  $ \lambda{_1} = 90$,  $\lambda{_2} = 0$,  $s_1 = 3 \sqrt{10}$,  $s_2 = 0$,  How can one find $\vec{v_2}$ when $\lambda{_2} = 0$? In this case, you know that the eigenvectors of $A^{t} A$ are orthogonal, solve for $\lambda{_2}$ and find the eigenvector if it's orthogonal to the eigenvector corresponding to the first eigenvalue you have your solution.  So we end up with the following normalized column vectors for V, which we can see are orthogonal:  $ \vec{v_1} = \left(\begin{array}{rrr} -3/\sqrt{10} \\ 1/\sqrt{10} \\ \end{array}\right). $  $ \vec{v_2} = \left(\begin{array}{rrr} 1/\sqrt{10} \\ 3/\sqrt{10} \\ \end{array}\right). $


In Star Wars Episode VII: The Force Awakens, the Starkiller Base       eliminated the sun in its own system (as well as the intended target's system).   Would that not have killed everyone on the surface of Starkiller Base and on the targeted planet almost instantly?  Rey and Kylo go on to spend some time fighting on the surface of a planet       that no longer has a sun,    and the planet's shields are certainly down by then.  I have only seen the movie, so I don't know if anything is written about this issue.  Also, I'm willing to understand: "it's just a movie; get over it."    NOTE:       If a sun is drastically reduced, gravity, heat energy and light are, too.  Planets go hurtling out into space, atmosphere's freeze, etc.

How many suns are around Starkiller base in the Force Awakens? Is it just one? If its sucks the power out of one star from the back of the planet how is the front of the planet lit up like the sun is shinning on it when the Rebels attack it? If the weapon is charged shouldn't the plant be in the dark?


I tried to do the second derivative of it to satisfy the harmonic equation of $u_{xx} + u_{yy} = 0$. Second derivative is $u'(g(z) * g''(z) + (g''(z))^2 * u''(g(z))$.

If $f$ is a harmonic function in a domain $D \subset \mathbb{C}$, and $g$ is a conformal mapping of a domain $D_0$ onto $D$, is $f \circ g$ harmonic in $D_0$?   I noticed this question while reading several pdf of lecture notes, and I'm having trouble figuring it out. Can anyone help?  Thank you so much!


I have attached a fiddle link to this question. I need the red dot to be closer to the text. For the first & last item, it works well..but if any item is multi line..it has extra whitespace at the right..i want the dot to be closer to the text for the second item also.I tried flex:0 but it makes the whole text area smaller.Please help!

    1
News Section

   2
Sample123 Organizational announcement

   3
Sample Text

 .container {   width:300px;   padding: .5em 1em;  } .item {   display: flex;  } .icon {   width: 18px;  float: left;  } .text {   display: inline-block;   background: yellow;  } .red {   margin: 0 0 0 0.5rem !important;   background: #FF0000;   padding: 0 !important;   width: .5rem;   height: .5rem;   border-radius: 50%;  }

I have a layout similar to:  <div>     <table>     </table> </div>   I would like for the div to only expand to as wide as my table becomes.


Is there anyway to see the len() of an itertools.Combination or other object, really, without materializing it to a list? I can get the cardinality of combs or permutations with the factorials,... but I want something that generalizes.  Thanks

For example, files, in Python, are iterable - they iterate over the lines in the file. I want to count the number of lines.   One quick way is to do this:  lines = len(list(open(fname)))   However, this loads the whole file into memory (at once). This rather defeats the purpose of an iterator (which only needs to keep the current line in memory).  This doesn't work:  lines = len(line for line in open(fname))   as generators don't have a length.  Is there any way to do this short of defining a count function?  def count(i):     c = 0     for el in i: c += 1     return c   To clarify, I understand that the whole file will have to be read! I just don't want it in memory all at once


Is there any way to boot Windows automatically if it is hibernated in Grub?  I mean is there any way to force the user to boot the hibernated Windows without any choices?

says the following:     Saving an OS can be achieved by running sudo grub-set-default if   DEFAULT=saved is set in /etc/default/grub. It may also be saved if   GRUB_SAVEDEFAULT=true is also set in /etc/default/grub. In this case,   the default OS remains until a new OS is manually selected    from the   GRUB 2 menu or the grub-set-default command is executed.   I put the lines DEFAULT=saved AND GRUB_SAVEDEFAULT=true in /etc/default/grub, and ran sudo grub-set-default.  Here is the output:  $ sudo grub-set-default entry not specified. Usage: grub-set-default [OPTION] entry Set the default boot entry for GRUB.    -h, --help              print this message and exit   -v, --version           print the version information and exit   --boot-directory=DIR    expect GRUB images under the directory DIR/grub                           instead of the /boot/grub directory  ENTRY is a number or a menu item title.  Report bugs to <bug-grub@gnu.org>.   Am I not following the documentation correctly?  What's the correct way to do this?


I'm trying to show that this is true:  Let $X$ be a set and suppose $f$ and $g$ are bounded (real-valued) functions defined on $X$. Then,  $$ \sup_{x \in X}|f(x)g(x)| \leq \sup_{x \in X}|f(x)|\sup_{x \in X}|g(x)| $$  I think I'm pretty close but I'm not sure about the last step. First, since $f$ and $g$ are bounded, all involved suprema exist and are finite. If $a = \sup|f(x)|$ and  $b = \sup|f(x)|$ then it is true that  $$ a \geq |f(x)| \;\;\;\;\;\; b \geq |g(x)| $$ for every $x \in X$. Since none of the quantities involved are negative, this implies $$ a b \geq |f(x)|\cdot |g(x)| \implies \sup|f(x)|\sup|g(x)| \geq |f(x)|\cdot |g(x)| $$  Can I say now that since this last inequality holds for all $x$ that $$ \sup_{x \in X}|f(x)g(x)| = \sup_{x \in X} \left(|f(x)|\cdot |g(x)|\right) \leq \sup_{x \in X}|f(x)|\sup_{x \in X}|g(x)|? $$  Thanks.

The question is based on the following exercise in real analysis:     Assume that $A,B\subset{\Bbb R}$ are both bounded and $x>0$ for all $x\in A\cup B$. Show that $$ \sup(AB)=\sup A\sup B $$   where    $$ AB:=\{ab\in{\Bbb R}:a\in A, b\in B\}. $$   Since $0<a\leq\sup A$ and $0<b\leq\sup B$ for all $a\in A$ and $b\in B$, we have $$ ab\leq\sup A\sup B $$ for all $ab\in AB$ which implies that $\sup AB\leq\sup A\sup B$. I have trouble with another direction: $$ \sup AB\geq\sup A\sup B $$ I was trying to show that for every $\epsilon >0$, $\sup AB-\epsilon \geq \sup A\sup B$. If one uses the definition of supremum, one has the estimates that for every $\epsilon>0$, $$ \sup A-\epsilon\leq a, \quad \sup B-\epsilon\leq b $$ for some $a\in A,\ b\in B$. It follows that $$ \sup A\sup B\leq (a+\epsilon)(b+\epsilon)=ab+\epsilon(a+b)+\epsilon^2\leq \sup AB+\epsilon (a+b)+\epsilon^2 $$ which seems quite close to what I want. How can I go on?


I have weird date format in logs: 2017-01-24T23:52:14  I am trying to convert this string into datetime Python object like this:  date_from_log = datetime.strptime('2017-01-24T23:52:14', '%Y-%m-%dT%I:%M:%S')  but I get:  ValueError: time data ' 2017-01-24T23:25:39 ' does not match format '%Y-%m-%dT%I:%M:%S'  What is wrong?

I need to parse  strings like "2008-09-03T20:56:35.450686Z" into Python's datetime type.  I have found  in the Python standard library, but it is not very convenient.  What is the best way to do this?


I study computing on an advanced level and I need a program that will make it easier to create flowcharts and other diagrams efficiently. I don't need too many features; I just want something that works! I'm aware that there are many website that do exactly what I need but most of the times when I need to draw diagrams I don't have access to the internet

I'm seeking a Mac app for creating basic flowcharts and similar diagrams.   Google has been no help; I've followed dozens of links to apps that either don't exist anymore, I can't find any real reviews of, or that won't run on OS X 10.6.6.  What I'd really like:   A simple and clean interface Basic shapes Automated connectors that stay linked as you move shapes around Inexpensive, preferably under $30 but definitely under $50   What I'm not looking for:   Hundreds of shapes  Default styles that have shadows and textures and such that I have to keep removing Dozens of amazing features that allow you to automatically map databases and draw UML diagrams from code and such (I'm looking at you, Visio) that I have to constantly navigate around to make a few basic diagrams A mind-mapping app with all the features such a thing entails, one that happens to also let you make basic diagrams A full-fledged drawing app where, once again, I have to maneuver around a whole bunch of features and options to get to the basic functions I need.  (I have Illustrator, I love Illustrator, but it's crap for basic flowcharts and other simple diagrams.)   I wouldn't actually use it for flowcharts, but rather basic similar diagrams to show data flow between apps, information flow in a company or other places, that kind of thing.  I recently found out that the drawing portion of Google Docs actually does a pretty good job with the types of diagrams I need to create, but the UI is pretty poor and it obviously requires a constant net connection.


I have Ubuntu 14.04 I need this package   How do I install it?

I need these packages with the latest upstream version backported for ubuntu/natty   libccid_1.4.5-0ubuntu1_amd64.deb libpcsclite1_1.8.1-0ubuntu1_amd64.deb libpcsclite-dev_1.8.1-0ubuntu1_amd64.deb libusb-1.0-0_1.0.9-0ubuntu1_amd64.deb libusb-1.0-0-dev_1.0.9-0ubuntu1_amd64.deb opensc_0.12.2-1ubuntu1ppa1~natty1_amd64.deb pcscd_1.8.1-0ubuntu1_amd64.deb pcsc-tools_1.4.18-0ubuntu1_amd64.deb   I tried to build them from source with update but it failed. I am not an expert at packaging and there are so many tutorials and recipes out there.  Do you know a good and up to date tutorial for backporting Ubuntu packages?  How do I get packages from other releases without having to build them myself?


Very often, when programming in Python, I need to filter the single element in the list.  For this I am using following code pattern:  user1 = {'email': 'admin@example.io', 'role': 'admin'} user2 = {'email': 'xuser@example.io', 'role': 'user'} user3 = {'email': 'yuser@example.io', 'role': 'user'} users = [user1, user2, user3]  temp = [x for x in users if x['role'] == 'admin'] admin = temp[0] if temp else None   Is there more elegant Pythonic way to fit the last two lines into the one ?

I'm sure there's a simpler way of doing this that's just not occurring to me.  I'm calling a bunch of methods that return a list.  The list may be empty.  If the list is non-empty, I want to return the first item; otherwise, I want to return None.  This code works:  my_list = get_list() if len(my_list) > 0: return my_list[0] return None   It seems to me that there should be a simple one-line idiom for doing this, but for the life of me I can't think of it.  Is there?  Edit:  The reason that I'm looking for a one-line expression here is not that I like incredibly terse code, but because I'm having to write a lot of code like this:  x = get_first_list() if x:     # do something with x[0]     # inevitably forget the [0] part, and have a bug to fix y = get_second_list() if y:     # do something with y[0]     # inevitably forget the [0] part AGAIN, and have another bug to fix   What I'd like to be doing can certainly be accomplished with a function (and probably will be):  def first_item(list_or_none):     if list_or_none: return list_or_none[0]  x = first_item(get_first_list()) if x:     # do something with x y = first_item(get_second_list()) if y:     # do something with y   I posted the question because I'm frequently surprised by what simple expressions in Python can do, and I thought that writing a function was a silly thing to do if there was a simple expression could do the trick.  But seeing these answers, it seems like a function is the simple solution.


I have a script which has an array called metaData that includes product IDs and quantities. It looks like this:  "PRD 6060BNDISHRT-CHARCOAL-SMALL": 3, "PRD 6060BNDISHRT-CHARCOAL-MEDIUM": 3, "PRD 6060BNDISHRT-CHARCOAL-LARGE": 4, "PRD 6060BNDISHRT-CHARCOAL-XL": 3, "PRD 6060BNDISHRT-ALLOY-SMALL": 0, "PRD 6060BNDISHRT-ALLOY-MEDIUM": 2, "PRD 6060BNDISHRT-ALLOY-LARGE": 1, "PRD 6060BNDISHRT-ALLOY-XL": 3, "PRD 6060BNDISHRT-BLACK-SMALL": 1, "PRD 6060BNDISHRT-BLACK-MEDIUM": 0, "PRD 6060BNDISHRT-BLACK-LARGE": 0, "PRD 6060BNDISHRT-BLACK-XL": 4, "PRD 6060BNDISHRT-CABERNET-SMALL": 2, "PRD 6060BNDISHRT-CABERNET-MEDIUM": 2, "PRD 6060BNDISHRT-CABERNET-LARGE": 3, "PRD 6060BNDISHRT-CABERNET-XL": 2, "PRD 6060BNDISHRT-NAVY-SMALL": 3, "PRD 6060BNDISHRT-NAVY-MEDIUM": 3, "PRD 6060BNDISHRT-NAVY-LARGE": 0, "PRD 6060BNDISHRT-NAVY-XL": 3   This code:    var stockChicago = metaData;   alert(stockChicago);   results in the above list (or as much as will fit in the alert box).  Now, if I do this, I should get the result of the value for that key (it's the second one on the list), right?:    var stockChicago = metaData["PRD 6060BNDISHRT-CHARCOAL-MEDIUM"];   alert(stockChicago);   I expect the response to be "3," but instead, I just get "undefined." I've tried it without the quotes and have searched everywhere I can think of to figure out what I'm doing wrong. Like I said, I figure it's something very simple, but for the life of me I can't figure it out!

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


I get mentioned error when I click to add To Cart button which takes place in my .xhtml file as follow;  <h:commandButton value="Add to CART" action="#{product.addToCart()}">           <f:ajax execute="@form" render=":cartSize" /> </h:commandButton>   And there here is my bean for addToCart button  package WEB;  import ejb.operations; import entities.Products; import java.io.IOException; import java.io.Serializable; import javax.ejb.EJB; import javax.inject.Named; import javax.enterprise.context.RequestScoped; import javax.faces.bean.ManagedProperty; import javax.faces.context.FacesContext;  /**  *  * @author fet  */ @Named(value = "product") @RequestScoped  public class product  implements Serializable {      @EJB     private operations operations;      @ManagedProperty(value="#(cart)")     cart myCart;      public cart getMyCart() {         return myCart;     }      public void setMyCart(cart myCart) {         this.myCart = myCart;     }       public product() {     }       public String getQuery() {          return FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("query");       }      public void checkIfQueryExists() throws IOException{      if(operations.checkIfQueryExists(getQuery())==0){        FacesContext.getCurrentInstance().getExternalContext().redirect("error.xhtml");      }   }       public Products getProduct(){          return operations.returnProduct(getQuery());       }       public void addToCart(){           String query = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get("query");          myCart.add(operations.returnProduct(query));     } }   Fınally my EJB is;  package ejb;  import entities.Products; import java.util.List; import javax.ejb.Stateless; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext;   /**  *  * @author fet  */ @Stateless public class operations {      @PersistenceContext(unitName = "registerPU")     private EntityManager em;       public List<Products> retrieveProducts() {          return  em.createQuery("SELECT p FROM Products p").getResultList();     }       public int checkIfQueryExists(String query){         List<Products> products= em.createQuery("SELECT p FROM Products p WHERE p.productName = :productName").setParameter("productName", query).getResultList();          return products.size();                   }      public Products returnProduct(String query){          Products product = (Products)em.createQuery("SELECT p FROM Products p WHERE p.productName = :productName").setParameter("productName", query).getSingleResult();          return product;     } }   I dont know why ı am facing with this. do you have any ideas? Thanks!!

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


If the effect of measurement in quantum entanglement occurs instantaneously why can't it be used to transmit classical information faster than light?  I'm based my question off this seemingly well cited Wikipedia article:   Edit: It would seem that my question should be more focused on why we can't use change as a method of data transmission.

It is often stated, particularly in popular physics articles and videos, that if one measures a particle A that is entangled with some other particle B, then this measurement will immediately affect the state of the entangled partner.  For example, if Alice and Bob share an entangled pair of electrons and Alice measures her spin in the $x$ direction, then Bob's spin will also end up spinning in that direction, and similarly if she measures in the $z$ direction. Moreover, the effect will be instantaneous, regardless of the spatial distance between the two particles, which seems at odds with special relativity.  Can I use a scheme like this to communicate faster than light?


I did IT in cycles, but since cycles isn't real time renderer its totally useless for me.  I need to do it in EEVEE or in the Shading tab, but on both I couldn't do it.  Do you guys know how to ?

suppose I have modelled a room like that:   when I look at it from outside like in screenshot, I want the walls whose normals are not going towards my point of view to go transparent. In other words, I want to see the insides of the room so that the walls at which I am looking from outside, go transparent. see the screenshot for illustration, I have just hidden those faces    when I change my point of view, other faces have to go transparent while others become visible.  I think that must be somewhere on the surface but as always my Google skills are too bad to find out


Every vector space admits a Hamel basis by AC. That is there are maximally linear independent sets. But how to prove their cardinalities necessarily agree?  ..I couldn't really find any reference.

I am having a difficulty setting up the proof of the fact that two basis of a vector space have the same cardinality for the infinite-dimentional case. In particular, let $V$ be a vector space over a field $K$ and let $\left\{v_i\right\}_{i \in I}$ be a basis where $I$ is infinite countable. Let $\left\{u_j\right\}_{j \in J}$ be another basis. Then $J$ must be infinite countable as well. Any ideas on how to approach the proof?


Other Questions and Answers address how to check the progress of Spotlight rebuilding its index, previous to El Capitan: Click the Spotlight menu. The menu/panel that appears reports a progress bar if re-indexing is in progress.  In El Capitan, that menu/panel no longer appears. Now a grey box appears in the middle of the screen where we are expected to enter our search words. The re-indexing progress bar no longer appears.

In previous versions of OS X, you could click the Spotlight icon in the menu bar to show the status of the Spotlight indexing, and it would show an estimate ("6 hours left"), along with a progress bar.  I've updated to Yosemite yesterday, and I noticed that Spotlight is not showing some expected results, i.e. files I know to be there, but it just doesn't find them if I type in their name and file type ("kind:excel vacation").  When I start typing in the Yosemite Spotlight window, it shows a small progress bar under the search box, but there's no estimate.    Is there another way to show the progress or an estimation on how long the indexing is going to take?


I've tried to add Chinese input on Ubuntu 16.04,  but it doesn't work.

I use the Ubuntu 16.04 desktop. I could not find the Chinese (Zuyin, bopomofo) on input source list. How can I add the Chinese (Zhuyin, bopomofo) keyboard?


I have a very unfortunate situation in which I have some SQL Server (standard edition) databases living on a small (~120gb) disk, and a transaction log which has grown to 50gb+. Unfortunately, the backup disk is only 45gb. The data itself is across all databases is only ~20gb.  I need to reduce the size of the transaction log to prevent the disk filling up, but I'm unable to back it up because it's too big, and I'm unable to get even temporary space from the server vendor. I've taken a full backup of the data and transferred that out to another machine,   What are my options for reducing the transaction log size?

This one seems to be a common question in most forums and all over the web, it is asked here in many formats that typically sound like this:  In SQL Server -  What are some reasons the transaction log grows so large? Why is my log file so big? What are some ways to prevent this problem from occurring? What do I do when I get myself on track with the underlying cause and want to put my transaction log file to a healthy size?


Actually i am sending ajax requests with in a interval of 4-5 seconds to update a digital display table.   Should i use ajax GET or POST What is ajax cache:true/false If i populate DOM elements(some are marque) after each ajax call(in 4 seconds) then will it affect performance   My code is something like :
 <?php for(i=0; $i<=10; $i++) { ?>
     <span id="span-<?php echo $i;?>-1>	     <span id="span-<?php echo $i;?>-2>>	     <span id="span-<?php echo $i;?>-2>>	     <marque id="td-<?php echo $i;?>-4>></marque>
 <?php } ?>     And array returned as json from server is like  array ( 0 => array('status'=>2), 1 => array('status'=>1,'name'=>'xyz','type'=>'t1','des'=>'jfhj.....'), 2 => array('status'=>1,'name'=>'abc','type'=>'t2','des'=>'llll.....'), 3 => array('status'=>1,'name'=>'def','type'=>'t1','des'=>'ffhj.....'), 4 => array('status'=>2), 5 => array('status'=>1,'name'=>'jkl','type'=>'t4','des'=>'llol.....'), 6 => array('status'=>2), 7 => array('status'=>1,'name'=>'aaa','type'=>'t3','des'=>'lojl.....'), 8 => array('status'=>1,'name'=>'bbb','type'=>'t4','des'=>'loll.....'), 9 => array('status'=>1,'name'=>'lll','type'=>'t1','des'=>'lhol.....'), )

What's the difference when using GET or POST method? Which one is more secure? What are (dis)advantages of each of them?  ()


How do I speed up the process of redrawing layers in a MXD?  I have already tried reloading and indexing the layers.  The layers were created from shapefiles.

I have a polygon shapefile that has a 100MB .dbf, and 500MB .shp file component. The reason it is so large, is that it is  classified as a landbase for a whole district.   Everytime I view the file in ArcCatalog, or ArcMap, and move the view window slightly, the entire file needs to redraw from scratch. I have tried spatial indexing and importing into a geodatabase - neither approach provides any noticable performance improvement with respect to rendering.  Esri's help page suggests that that to improve shapefile performance, the user can . While this would obviously work, I do not want to lose any information. Splitting the file up is not ideal since I am doing a lot of geoprocessing/queries with its entire area. I guess I could avoid viewing the entire area at once - but sometimes, for example, it is good to see what parts of the file a query has selected.  Is there any other approach I could take to improve rendering performance?   (In theory, building shapefile "pyramids" would be ideal - I'm unsure why ArcGIS has never supported such an approach  - at least that I am aware of...)


I'm trying to set up Tamil phonetic in Edubuntu 14.04. I cannot get Tamil phonetic in the text entry list.  How can I fix this?

Is phonetic typing for Tamil available in Ubuntu 12.04?  How can I install it?


(I'm only on The Fellowship of the Ring).  After seeing The Hobbit trilogy (and reading the book) I noticed that some elves are older than others.  How do they age? Why are some older and younger than others if they're immortal?

This is coming from someone who has only briefly read the books a while ago and mostly remembers the film.  Elves are immortal. But they are depicted at different stages of aging. Do they just age up to a certain point and then stop? Or is the aging process just ridiculously slow?   Do they have a childhood? If so, do Elves reproduce similar to mortal men?


How do I install Adventure Game Studio  Editor in Ubuntu 16.04 (Xenial Xerus) ? I am pretty sure it can be built for Linux too, I just am not very experienced in building things from source.

Can .exe and .msi files (Windows software) be installed in Ubuntu?


I need to separate WordPress posts loop in to 2 columns , left ( all odds )  and right ( all evens ) .   Currently I am doing this with 2 separate loops but would like to make it with one  and  would like this to be done by the WP coding standards as much as possible.
     <?php          $row_start = 1;          while ( have_posts() ) : the_post();              if( $row_start % 2  != 0) {// odd                 get_template_part( 'blog','item');             }             ++$row_start;          endwhile;     ?>

     <?php         $row_start = 1;         while ( have_posts() ) : the_post();          if( $row_start % 2 == 0) {// even             get_template_part( 'blog','item');         }         ++$row_start;          endwhile;     ?>
   Any help is appreciated!

I got a loop from internet (I forgot the site) for two column post view. It has a nice CSS for it too. But skipping that for the question now.  <?php $counter = 1; ?>                  <?php query_posts( 'cat=3&showposts=6' ); //Find whether the catID is 3 ?>             <?php while ( have_posts() ) : the_post() ?>                   <?php /* Two Column Support get class */ ?>              <?php $class = ( $counter % 2  ? ' one' : '' ) ?>                  <?php /* Two Column output open the div class */ ?>              <div class="column<?php echo $class;// echo $first; ?>">              <?php news_format(); ?>             </div> <!-- End Two Column Support close div class --> <?php $counter++; //Update counter ?>   It printed my posts into 2 columns like:  ========= | 1 | 2 | --------- | 3 | 4 | --------- | 5 | 6 | =========  It's fine. But I want to print it like this:  ========= |   1   | --------- | 2 | 3 | --------- | 4 | 5 | --------- | 6 | 7 | =========  What the modification I need to do? I can't pass any custom limit into the WordPress' custom loop <?php while ( have_posts() ) : the_post() ?>. It's for a custom theme. I did it, but the problem is, it's showing like:  ========= |   1   | --------- | 1 | 2 | --------- | 3 | 4 | --------- | 5 | 6 | =========   is my whole bunch of code.


Let $a \in \mathbb{C}$, $|a| < 1$. Also let $f(z) = \dfrac{z - a}{1 - \overline{a}z}$.  I am asked to prove that $|f(z)| < 1$ if $|z| < 1$ and that $|f(z)| = 1$ if $|z| = 1$.  What is a good way to proceed on this problem?

Is there anything special with the form:  $$\left|\frac{z-a}{1-\bar{a}{z}}\right|$$ ? With $a$ and $z$ are complex numbers.  In fact, I saw it in a problem:   If $|z| = 1$, prove that $|\frac{z-a}{1-\bar{a}{z}}| = 1$ If $|z| < 1$ and $|a| < 1$, prove that $|\frac{z-a}{1-\bar{a}{z}}| < 1$   I can easily prove the first one with expansion:  $$z=\cos\theta + i\sin \theta \\ a = m +in$$  But it will be terrible to use in the second one. What's more, I found this form a little special so maybe there is some clever trick without using expansion?  Thank you a lot!


I'm looking for a word that is roughly the opposite of "intimidating", but with negative connotations.  I'm not looking for something like "reassuring," more like "wimpy" or "beneath notice" or "unimportant," perhaps even "tempting others to attempt intimidation," but nothing I've found quite fits the bill.  I'm wanting to say something like, "He was a nice enough guy, she thought, but it was an effort just to take notice of him.  He was ???"

What word would describe someone who doesn't generally leave much of an impression on people?


I have the code below which I am having trouble with. I am trying to get a date string and convert to a date object. Then calculate the days between this date and todays date.  The example below should return "6 days" but instead is returning "35 days".  var tmp = '20/11/2013'; var myDateParts = tmp.split("/");                        var oneDay = 24*60*60*1000; var today = new Date(); var secondDate = new Date(myDateParts[2], myDateParts[1], myDateParts[0]); var diffDays = Math.round(Math.abs((secondDate.getTime() - today.getTime()))/(oneDay));  console.log(diffDays+' days');   Can anyone see where I am going wrong.  Thanks

I'm creating an application which lets you define events with a time frame.  I want to automatically fill in the end date when the user selects or changes the start date.  I can't quite figure out, however, how to get the difference between the two times, and then how to create a new end Date using that difference.


I need to set PATH and JAVA_HOME for my Oracle java. Where I can set these environment variables in Ubuntu in general. Where is the best place to set them?

I'm running Ubuntu 11.04. I use the terminal to start a bash session, and I want to add an environment variable:  $r@hajt:~$ env THEVAR=/example   But it's not working. It shows all the variables with THEVAR being the last one, but another call to env does not show THEVAR anymore- env | grep THEVAR returns nothing.  Similarly, scripts with export (export THEVAR=/example) or other variable assignments (THEVAR=/example) don't add the environment variable.  I know I'm doing something wrong, I know it should be something simple, but I just can't find what.  UPDATE: The real meaning of my question was this one:   (Anyway I'll choose the most voted answer and leave the edited title -that wasn't what I was asking)  env runs a program in a modified environment, then dismisses all the changes.


I just downloaded the Snake game by installing the package gnome-nibbles.  I can find it on the terminal but not on the desktop....  Where is it?  How can I add a shortcut to the game on the desktop?

In older versions it was easy to create a launcher on my desktop. All I had to do is right click on my desktop and select the "create launcher" option.  How can I create such launchers now?


I don't know whether this question pertains to physics. But anyways,  here goes... If I were to hover 1m above the ground in a helicopter, would the ground below me change after 1 hr due to the rotation of the earth?

I was reading somewhere about a really cheap way of travelling: using balloons to get ourselves away from the surface of the earth. The idea held that because the earth rotates, we should be able to land in a different place after some time. As we all know, this doesn't happen.  Someone said that the reason why this doesn't happen is because the atmosphere (air, clouds etc.) also revolves around the earth (with the same angular velocity as the earth's rotation). Since we are also part of the atmosphere, our position doesn't change relatively.  Well, I'm not convinced with that answer. Why does the atmosphere rotate along with earth?  Gravitational force is towards the centre of the earth, but I don't see how it's making the atmosphere rotate.


add = '$4.545,45 is less than $5,454.54.'   This command :  re.sub(r'(?<=\d).(?=\d{1,})',',',add)   results in   '$4,5,5,45 is less than $5,4,4,54.'   but  re.sub(r'(?<=\d).(?=\d{2,})',',',add)   results in   '$4,545,45 is less than $5,454,54.'   Second one is correct, Both means convert the one that has digitbefore then full stop then digit , then why {1,} gives weird result.   I checked  as well but still confused.  Also, is there any other way to solve this as well.

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


Is there command in Ubuntu that is equivalent on restarting explorer.exe in Windows?

How do I just restart the nautilus after adding a nautilus script without having to log out.


Suppose $x\in\mathbb{R}^n$ and $A\in\mathbb{R}^{n\times n}$. What is a sufficient condition for $$x, Ax, A^2x, ..., A^{n-1}x$$ being linearly independent?

Problem: Let $A\in M_{n\times n}(\mathbb R)\,$ be a matrix and suppose that a positive number $k\,$ exists such that $A^k = 0\,$ and $A^{k-1} \neq 0$. Suppose that $x=\left[ \begin{matrix} x_1 \\ \vdots \\ x_n \end{matrix} \right]$ is a vector in $\mathbb{R^n}$ such that $A^{k-1} x \neq 0$. Prove that the $k\,$ vectors $\,x,Ax,\dots,A^{k-1}x\,$  are linearly independent.     My attempt: Suppose $x + Ax + \dots + A^{k-1}x = 0$. Multiply both sides with $A^{k-1}$. Then we have $A^{k-1}x + A^k (x + Ax + \dots + A^{k-2}x) = 0 \Leftrightarrow A^{k-1}x = 0 \Leftrightarrow x = 0$   which implies $x + Ax + \dots + A^{k-1}x\,$ is linear independent.    This problem looks quite easy but I want my proof to be checked. Is it correct?


I read in several sources that the Quasi Poisson model and the Negative Binomial, should produce (on average) the same results. I tried a simple example and, although very close to each other, the numbers are not quite the same.  Does this depends on the numerical algorithm or is there something else I am not considering? Thank you phi = 3 a = 1/50 b = 3 x = 1:100  mu = exp(a*x+b)  y = rnbinom(n = length(mu), mu = mu, size = mu/(phi-1)) #random negbin generator  glmQP = glm(y~x, family=quasipoisson) glmNB = glm.nb(y~x)  glmQP glmNB  glmQP$fitted.values glmNB$fitted.values  plot(x, y) lines(x, glmQP$fitted.values, col = "red") lines(x, glmNB$fitted.values, col = "blue")

I'm trying to fit generalized linear models to some sets of count data that might or might not be overdispersed. The two canonical distributions that apply here are the Poisson and Negative Binomial (Negbin), with E.V. $\mu$ and variance   $Var_P = \mu $  $Var_{NB} = \mu + \frac{\mu^2}{\theta} $  which can be fitted in R using glm(..,family=poisson) and glm.nb(...), respectively. There is also the quasipoisson family, which in my understanding is an adjusted Poisson with the same E.V. and variance  $Var_{QP} = \phi\mu$,  i.e. falling somewhere in between Poisson and Negbin. The main problem with the quasipoisson family is that there is no corresponding likelihood for it, and hence a lot of extremely useful statistical tests and fit measures (AIC, LR etcetera) are unavailable.   If you compare the QP and Negbin variances, you might notice that you could equate them by putting $\phi = 1 + \frac{\mu}{\theta}$. Continuing on this logic, you could try to express the quasipoisson distribution as a special case of the Negbin:  $QP\,(\mu,\phi) = NB\,(\mu,\theta = \frac{\mu}{\phi-1})$,  i.e. a Negbin with $\theta$ linearly dependent on $\mu$. I tried to verify this idea by generating a random sequence of numbers according to the above formula and fitting it with glm:  #fix parameters  phi = 3 a = 1/50 b = 3 x = 1:100  #generating points according to an exp-linear curve #this way the default log-link recovers the same parameters for comparison  mu = exp(a*x+b)  y = rnbinom(n = length(mu), mu = mu, size = mu/(phi-1)) #random negbin generator  #fit a generalized linear model y = f(x)   glmQP = glm(y~x, family=quasipoisson) #quasipoisson glmNB = glm.nb(y~x) #negative binomial  > glmQP  Call:  glm(formula = y ~ x, family = quasipoisson)  Coefficients: (Intercept)            x       3.11257      0.01854   (Dispersion parameter for quasipoisson family taken to be 3.613573)  Degrees of Freedom: 99 Total (i.e. Null);  98 Residual Null Deviance:      2097  Residual Deviance: 356.8    AIC: NA  > glmNB  Call:  glm.nb(formula = y ~ x, init.theta = 23.36389741, link = log)  Coefficients: (Intercept)            x       3.10182      0.01873    Degrees of Freedom: 99 Total (i.e. Null);  98 Residual Null Deviance:      578.1  Residual Deviance: 107.8    AIC: 824.7   Both fits reproduce the parameters, and the quasipoisson gives a 'reasonable' estimate for $\phi$. We can now also define an AIC value for the quasipoisson:  df = 3 # three model parameters: a,b, and phi phi.fit = 3.613573 #fitted phi value copied from summary(glmQP) mu.fit = glmQP$fitted.values   #dnbinom = negbin density, log=T returns log probabilities AIC = 2*df - 2*sum(dnbinom(y, mu=mu.fit, size = mu.fit/(phi.fit - 1), log=T)) > AIC [1] 819.329   (I had to manually copy the fitted $\phi$ value from summary(glmQP), as I couldn't find it in the glmQP object)  Since $AIC_{QP} < AIC_{NB}$, this would indicate that the quasipoisson is, unsurprisingly, the better fit; so at least $AIC_{QP}$ does what it should do, and hence it might be a reasonable definition for the AIC (and by extension, likelihood) of a quasipoisson. The big questions I am left with are then   Does this idea make sense? Is my verification based on circular reasoning? The main question for anyone that 'invents' something that seems to be missing from a well established topic: if this idea makes sense, why isn't it already implemented in glm ?   Edit: figure added


I'm copying a lot of folders/subdirectories from one network drive to another, however, the names of these files aren't known and I only want to copy the contents of the folders that have a name match.  Ex: srcdir has folders f1, f3, f4, f9 and destdir has folders f3, f5, and f9: since the names of folders f3 and f9 match, the contents (files and subdirectories) of f3 & f9 found in srcdir will be copied into their respective folders in destdir.   I've tried using xcopy but it only copies the files, and I've also tried   robocopy C:\test1 C:\test2 /u /s   but that skips over everything.  How would I go about copying the contents of a folder from the source network drive into its matching folder in the destination drive? Here's the code I have so far:  @ECHO OFF setlocal EnableDelayedExpansion for /d %%i in ("C:\test1\*") do (   for /d %%j in ("C:\test2\*") do (     set srcdir="%%~nxi"     set destdir="%%~nxj"     if !srcdir! == !destdir! ( robocopy C:\test1 C:\test2 ) else (echo Notsame!)     echo %srcdir%     ping 130.11.160.2   ) )

I'm on Windows 7 Professional, and this is my scenario :  Folder "Asd" (C:\)              Folder "Asd" (D:\) File 1                          File 1  File 2                          File 3  File 3                          File 4 File 4 File 5   I'd like to select the folder on C:\ (without selecting each single file, of course) and copy it over the same folder on D:. Usually, it will copy all files. But what I'm looking for is to copy only files (from C:) that are contained on folder d:.  So in my case I'd like to replace only File 1, File 3 and File 4.  File 2 and File 5 must be ignored.  Is it possible?


Does xinetd comes pre-installed with Kubuntu 12.04? If so, where is the xinet.d directory?  And if not - how do the network processes, that should be awaken by xinetd, work without it?

Can't see it anywhere, is it called something different?


Why isn't it "an adblocker"?  I know that it should be a, but why does an feel so better and is an correct in this case?

Which indefinite article should precede hour — a or an?        an hour     a hour      Does the usage of an vs a depend on the pronunciation — a history, a hobby, but an hour, an honor?


What are the official (provided by Blizzard) resources (forums, websites, in-game mechanics) for guild recruitment or for finding a guild that fits your criteria?

What strategies do you use to find the right guild for you in World of Warcraft? Forums? Trade chat? Should I be willing to realm transfer?


I am getting Exception in thread "main" java.lang.NullPointerException error. I am stuck at this code from so long . Can I get some help? Also when I tried running this code in Hackerank(Since it is a hackerank problem) editor, it worked. I am new to Data structures. So can someone help me in getting this error fixed? This is the error I am getting: Exception in thread "main" java.lang.NullPointerException     at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:225)     at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:123)     at java.base/java.io.FileWriter.<init>(FileWriter.java:66)     at Test/LinkedLists.Solution.main(Solution.java:79)  This is the code: public class Solution {      static class SinglyLinkedListNode {          public int data;          public SinglyLinkedListNode next;                    public SinglyLinkedListNode(int nodeData) {                 this.data = nodeData;                 this.next = null;             }         }     static class SinglyLinkedList {         public SinglyLinkedListNode head;         public SinglyLinkedListNode tail;          public SinglyLinkedList() {             this.head = null;             this.tail = null;      }         public void insertNode(int nodeData) {             SinglyLinkedListNode node = new SinglyLinkedListNode(nodeData);              if (this.head == null) {                 this.head = node;             } else {                 this.tail.next = node;             }              this.tail = node;         }     }      public static void printSinglyLinkedList(SinglyLinkedListNode node, String sep, BufferedWriter bufferedWriter) throws IOException {         while (node != null) {             bufferedWriter.write(String.valueOf(node.data));              node = node.next;              if (node != null) {                 bufferedWriter.write(sep);             }         }     }       static SinglyLinkedListNode insertNodeAtPosition(SinglyLinkedListNode head, int data, int position) {         if (head == null) return null;         SinglyLinkedListNode temp = new SinglyLinkedListNode(data);         if (position == 0) {             temp.next = head;             return temp;         }         SinglyLinkedListNode p = head;         for (int i = 0; i< position-1; i++) {             p = p.next;         }         SinglyLinkedListNode next = p.next;         p.next = temp;         temp.next = next;         return head;     }    private static final Scanner scanner = new Scanner(System.in);      public static void main(String[] args) throws IOException {     BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(System.getenv("OUTPUT_PATH")));      SinglyLinkedList llist = new SinglyLinkedList();      int llistCount = scanner.nextInt();     scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?");      for (int i = 0; i < llistCount; i++) {         int llistItem = scanner.nextInt();         scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?");          llist.insertNode(llistItem);     }      int data = scanner.nextInt();     scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?");      int position = scanner.nextInt();     scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?");      SinglyLinkedListNode llist_head = insertNodeAtPosition(llist.head, data, position);      printSinglyLinkedList(llist_head, " ", bufferedWriter);     bufferedWriter.newLine();      bufferedWriter.close();      scanner.close(); } }

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I have an orthophoto layer (exported from photoscan, drone images) that consist of four bands.   I extracted bands using "split image" order, but I can't understand which of them are NIR, green, red and red edge. How I should understand the output of the split image tool?

I am looking for a way to split multiband images and extract all the bands at once- instead of subsetting one band at a time.   Is there any method in QGIS which could allow for this? I know there are split RGB band tools but I have 8 band files.


What is the simplest biological organism from which a DNA sample has been or could be obtained?  Could the resulting DNA be processed and examined in such a way that the resulting information would give biologists a rudimentary understanding of life's minimal requirements?

Which animal/plant/anything has smallest length genome?


I have a VBA Userform which pulls data from a SQL Server Database. I want to be able to run a SQL Query with an IF statement included & to run a different SELECT query based on the result of the of the IF statement. I've started with a very simplified version to try & get the concept working before getting into anything too big & complicated. In the end scenario I'll be throwing the user a message if the result is a particular result.  When I run the code I get the below error when I get to the line with the Msgbox command.    I've used the Immediate window to check the Recordcount but I get the below error.    It's like the recordset isn't being populated at all.  I've run this query in SQL Server & I get the expected results so the query itself seems to be fine.  Any ideas what I'm doing wrong or if this is just one of the many oddities of VBA?  Set objconn = New ADODB.Connection Set objrs = New ADODB.RecordSet  objconn.Open ConnStr  strsql = "DECLARE @Num tinyint " & _     "SELECT @Num=Number from FNOLTracker.HandlerList WHERE Name='Joe Bloggs' " & _     "IF @Num IS NULL " & _     "BEGIN " & _     "SELECT 'Not There' AS Result " & _     "END " & _     "ELSE " & _     "BEGIN " & _     "SELECT 'There' AS Result " & _     "END"   With objrs     .Open strsql, objconn, adOpenStatic, adLockReadOnly, adCmdText     MsgBox .Fields(0) End With

How do I perform an IF...THEN in an SQL SELECT statement?  For example:  SELECT IF(Obsolete = 'N' OR InStock = 'Y' ? 1 : 0) AS Saleable, * FROM Product


I'm setting up a server that is being used as a hosting server that gets about 500 - 1000 new images per day. Most images are in jpg format, around 200kb - 2mb big. These images are being embedded across 1000-2000 websites using https.  Software wise I'll be using Ubuntu along with ServerPilot.  Considering the server only hosts images for over 1000 websites, the https requests will be high. What should my main focus be on the hardware? CPU, RAM or HDD/SSD?  When it comes to pure https requests for images, what matters more, CPU or RAM?  Will the loading time of an image be noticeable between a server with an SSD and one with HDD?  Here are 2 possible choices.  Option 1   CPU: Intel® Xeon® E3-1275 v5 Quad-Core Skylake  RAM: 64 GB DDR4 ECC HDD: 2 x 4 TB (Raid 1)   Option 2:   CPU: Intel® Core™ i7-3770 Quad-Core RAM: 32 GB DDR3 RAM HDD: 4 x 6 TB SATA 3 Gb/s 7200 rpm (Raid 1)

This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?


"The system network services are not compatible with this version" - ubuntu 14.04... I didn't even update anything thing.I have everything in network manager ....and I'm unable to connect to any network.. my system is dumb now without any network. I just tried to delete the previously connected networks from system-connections.. i tried the following code(I found it on askubuntu.com):   nmcli --fields UUID,TIMESTAMP-REAL con show | grep never |  awk '{print $1}' | while read line; do nmcli con delete uuid  $line;    done    Please help me and know that I'm not connected to a network.so help me in downloading external packages... and gracious!  none of the links on the askubuntu.com helped me!   is there any possibility so I can download and reinstall some softwares!!!

While upgrading today, something caused my wireless network manager to disappear. Not even connecting via wired connection.  This error is being shown by files:  **(nm-applet:2716): WARNING **: Could not initialize NMClient /org/freedesktop/NetworkManager: The name org.freedesktop.NetworkManager was not provided by any .service files   (nm-applet:2716): nm-applet-WARNING **: Error connecting to ModemManager: Error calling StartServiceByName for org.freedesktop.ModemManager1: GDBus.Error:org.freedesktop.DBus.Error.Spawn.ExecFailed: Cannot launch daemon, file not found or permissions invalid   (nm-applet:2716): nm-applet-WARNING **: Could not find ShellVersion property on org.gnome.Shell after 5 tries   (nm-applet:2716): nm-applet-WARNING **: Failed to register as an agent: (2) The name org.freedesktop.NetworkManager was not provided by any .service files    Is there a patch I can download through windows and send through to my ubuntu, or is it a case of having to reload everything? I tried running two versions back but still no internet access.


I tried copy pasting and other things to enable my Telegram on Lubuntu startup.

In Lubuntu, there's no 'Add New Program...' button in Desktop Session Settings. Is there an easy way to add new autostart programs in Lubuntu?


Hey guys I have a question. I play commander and most of my cards are in foreign language. I use google drive to have a picture of the actual card in English. If I go to a tournament am I allowed to use my phone to check the actual meaning of my cards or no?

Am I allowed to look up a card during a game, if it's being played with serious Rules Enforcement? Either to read the full card from the Gatherer, or to try to find the exact card I'm vaguely thinking of.  Two possible scenarios:   An opponent has revealed a card previously, and I want to remember the exact details. (Something like the exact wording of a sorcery, mana cost, keywords on a creature, subtypes, etc. etc.) I have a "name a card and remove it from the opponent's deck" type card, and I want to, say, ask google for "Blue Gearhulk" to remember that it's that that one is called "Torrential Gearhulk".   Obviously, in casual or semi-casual games neither of these are a problem. Any reasonable opponent will just re-reveal the known card (assuming it IS still guaranteed to be known) or will accept "I name the Blue Gearhulk".  Also obviously, it seems unlikely that I (or anyone else) would get to the stage of playing at the REL without knowing the cards too thoroughly for this to be relevant.  But in principle... is it permitted? Or not? (and if not, is there a good reason, or just "we decided 'No'"?)


I have tested for all primes less than  $40,000$ and it seems that, if $p$ is a prime then $p^2+26$ is not. I would like to see a proof or a counter-example.

I am not able to find an answer to the following question:     For which positive even integers $k$ is the integer   $$p^2+k$$ prime, where $p$ is a prime number $\gt5$?


So we have the conclusion that if $X$ and $Y$ are independent, then $g(X)$ and $h(Y)$ are independent (g, h measurable?), is it still true that for general case $X$ independent of $g(Y_1,..Y_n)$, where $Y_i$ are themselves not independent to each other.  I don't see how this is duplicate with that of showing $g(X)$ and $h(Y)$ are independent.  If it is not generally true, can we at least show however, $X$ is independent of the sum of $Y_i$?   Let me add some more condition, what about $X$ and $Y_i$ are all gaussians? And the function $g$ $h$ are nice smooth functions.  Essentially, I just want to show $X$ is independent of sum of $Y_i$.

It's a really simple question. However I didn't see it in books and I tried to find the answer on the web but failed.  If I have two independent random variables, $X_1$ and $X_2$, then I define two other random variables $Y_1$ and $Y_2$, where $Y_1$ = $f_1(X_1)$ and $Y_2$ = $f_2(X_2)$.  Intuitively, $Y_1$ and $Y_2$ should be independent, and I can't find a counter example, but I am not sure. Could anyone tell me whether they are independent? Does it depend on some properties of $f_1$ and $f_2$?  Thank you.


I bought a retina macbook pro yesterday and noticed a "Service battery" warning. It was there for a few hours and now has gone. Should I take it back to the store or do you think it's safe to ignore?  Update: The following day, the laptop battery was completely drained after being 100% the night before (and fully powered down). The "Service battery" warning also re-appeared. I took it back and it was just swapped it for a new one.

Battery warning "Service battery". This warning have appeared in my MacBook Pro (2008) with Snow Leopard. Is there a way to find out what a reason of this warning, without apply to service centre?


I can't figure out why my binary to denary number converter doesn't work. I need a simple solution to demonstrate to GCSE Computer Science students. please help:  static void Main(string[] args) {     string binaryNumber;     int[] placeValues = { 128, 64, 32, 16, 8, 4, 2, 1 };      // Array stores place values of the digits     int denaryNumber = 0;      Console.WriteLine("Please enter an 8-bit binary number: ");     binaryNumber = Console.ReadLine();      // The digits will now be multiplied by the place values     for (int index = 0; index < binaryNumber.Length; index++)     {         denaryNumber = denaryNumber +          (Convert.ToInt32(binaryNumber[index]) * placeValues[index]);     }     Console.WriteLine("\n" + binaryNumber + " = " + denaryNumber);     Console.ReadKey(); }

I have a char in c#:  char foo = '2';   Now I want to get the 2 into an int.  I find that Convert.ToInt32 returns the actual decimal value of the char and not the number 2.  The following will work:  int bar = Convert.ToInt32(new string(foo, 1));   int.parse only works on strings as well.    Is there no native function in C# to go from a char to int without making it a string?  I know this is trivial but it just seems odd that there's nothing native to directly make the conversion.


I was reading a community wiki earlier today and came across something about how you couldn't edit comments because of their class. I would like to know these classes. I have not found an answer in any of those community wikis, and I was browsing in Incognito mode, so my history is gone.  If you are answering, please put the classes in a number list

I didn't know the comments were 'disposable' as I thought they were also contributions covered by the CC-by-sa license. What are their status??  See comment by @joran there


I can say in Spanish,      Yo jugaba al tenis cuando tenía 8 años,   which means     I used to play tennis when I was 8 years old.   I could also ask,     ¿Jugabas tú al tenis cuando tenías 8 años?   whose English counterpart is     Did you play tennis when you were 8 years old?   Sometimes I get stuck, though, since it's hard to ask     Did you use to play tennis ...   Is there a real way to ask a question in the imperfect using the "used to" form of the imperfect?

What is the correct way to convert "used to do" into a question? Since I want to emphasize that the action is not on-going any more, so simple past tense is not a good idea here. Could I say "do xxx use to do" or "did xxx use to do"? Both sound weird to me.  If there is no way to do it. Do you suggest any other alternatives?