I keep getting an error in a simple for loop trying to insert value from one array to another. My JS code is as:  var myApp = angular.module('myApp', []); myApp.controller('UserCtrl', function($http) {     let vm = this;     var datetime = [];     var venuename = [];     var venuecity = [];     var venuecountry = [];     var url = [];      var arr = [];     var id = "secret key";     vm.searchText;     var i=0;      vm.getByID = function() {          $http.get("https://rest.bandsintown.com/artists/" + vm.searchText + "?app_id="+id)         .then(response =&gt; {             console.log(response.data)             vm.name = response.data.name             vm.thumb = response.data.thumb_url             vm.fb = response.data.facebook_page_url             vm.up = response.data.upcoming_event_count             $http.get("https://rest.bandsintown.com/artists/" + vm.searchText + "/events" + "?app_id="+id)             .then(response2 =&gt; {                 console.log(response2.data)                 vm.arr = response2.data                 console.log(vm.up)                 console.log(vm.arr[0].datetime)                 console.log(vm.arr[1].datetime)                 for (i = 0; i &lt;=(vm.up-1); i++){                     vm.datetime[i] = vm.arr[i].datetime;                     vm.venuename[i] = vm.arr[i].venue.name;                     vm.venuecity[i] = vm.arr[i].venue.city;                     vm.venuecountry[i] = vm.arr[i].venue.country;                     vm.url[i] = vm.arr[i].url;                 }                 console.log(vm.up)             })         })     } });   The datetime part of the arr returns just as i want it to. I just cant store it into the new array. What im trying to do is that the array 'arr' contains all the objects of concerts of an artist. I want to display the individual details, for that I need to store each element in a new array, and repeat to create and show separate event details. Im a newbie at this and any help would be appreciated. Thanks in advance!
What's the best way of checking if an object property in JavaScript is undefined?
How can I change the date and time on Ubuntu? Hibernate is disabled, hiberfil.sys gets recreated at each boot I have Windows 7 running on a small (40GB) partition, with 4GB ram. This means that the hiberfil.sys file created by Hibernate takes up a significant portion of the available diskspace. I would like to remove it.  I am aware that I can disable Hibernate and remove hiberfil.sys by entering powercfg -h off in an elevated command prompt. This works -- the file is immediately removed, and after doing so, the HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Power\HibernateEnabled key is (correctly) set to 0.  However, the next time I reboot the PC, hiberfil.sys returns from the dead, Hibernate is reenabled, and that registry key has returned to 1.  I'm pretty much at my wits' end with this. Almost everything I can find online related to removing the hiberfil.sys file simply suggests using powercfg to turn off hibernation, and that appears to work for just about everyone. But it just keeps coming back for me! (Like a vampire, sucking up my disk space.) I did find  from someone who seems to have had the same issue, but none of the suggestions there worked for the original poster (or for me). Still, I have tried everything listed there, including:   Disabling hybrid sleep Disabling Hibernate through the command prompt, through the Power Options GUI, and through both (in both orders) Manually changing the HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Power\HibernateEnabled key Pretty much everything else I can think of!   I do want to reiterate that I have no problem removing the file -- that works great. It just comes back after every reboot. I'm about ready to throw in the towel and just run a script on login to disable Hibernate each time, even though that seems like a crazily hacky "solution" . . . but I was hoping someone here could suggest something else, first. I want to prove or disprove this problem: If there exist $\lim\limits_{x\rightarrow \infty} (f'(x)+f(x))=L&lt;\infty$ then $\lim\limits_{x\rightarrow\infty} f(x) =L$.  When I assume problem below:  If there exist $\lim\limits_{x\rightarrow\infty} (f'(x)+f(x)) =L&lt;\infty$, There exists $\lim\limits_{x\rightarrow\infty} f(x)$?  I can use mean-value theorem to show that.  So my question is:     If $\lim\limits_{x\rightarrow\infty} (f'(x)+f(x))=L&lt;\infty$, does $\lim\limits_{x\rightarrow\infty} f(x)$ exist? Are there any rules in baseball which prohibit teams from "borrowing" players via trade? Every season near the trade deadline, we see teams that are out of it trading expensive players and/or free agents-to-be, typically for younger players or prospects.  For example, Matt Garza, set to become a free agent after the season, was traded to the Rangers for a few prospects.  It made sense for the Cubs to trade Garza, because he wasn't under contract any further than this season, and thus doesn't have much value to them.  Compare Garza to someone like Mike Trout, who is likely the most valuable property in baseball, given his skill and inexpensive cost over the next several years.  There's no way the Angels would trade him, because he'll be the cost-controlled centerpiece of the team for years to come.  However, with the Angels out of it this year, what if they wanted to trade Trout to a contender (say the Pirates), but only for the remainder of this season?  That is, they'd get several top prospects now, and would have an agreement with the Pirates that they'd trade him back in the offseason (for something pretty worthless, say for a journeyman minor leaguer).  The Pirates get Trout for the stretch run and are happy to give up a few prospects.  Trout doesn't have much value to the Angels this year, but he has a ton of value for next year.  So they get a few prospects for him, in exchange for the part of his career which has very little value to them.  So in effect, the Pirates are renting or borrowing him for the remainder of 2013.  Why don't trades like this happen?  Are there any rules prohibiting trades like this? Is "Five dollars is all I have" correct? Frequent Write to Non-volatile Memory I am giving a presentation and therefore I am using the  class. I have included some figures and it works, but there is no number after "Figure".  My code:  \documentclass{beamer}  \usepackage{graphicx} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage[english]{babel} \usepackage{listings} \usepackage{xcolor} \usepackage{eso-pic} \usepackage{mathrsfs} \usepackage{url} \usepackage{amssymb} \usepackage{amsmath} \usepackage{multirow} \usepackage{hyperref} \usepackage{booktabs} \usepackage{wallpaper} \usepackage{bbm} \usepackage{cooltooltips} \usepackage{eso-pic} \usepackage{everyshi} \usepackage{calc} \usepackage{graphicx} \usepackage{ifthen} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{animate} \usepackage[singlespacing]{setspace} \usepackage[absolute,overlay]{textpos} \usepackage{enumerate} \usepackage{hyperref} \newenvironment{changemargin}[2]{%   \begin{list}{}{%     \setlength{\topsep}{0pt}%     \setlength{\leftmargin}{#1}%     \setlength{\rightmargin}{#2}%     \setlength{\listparindent}{\parindent}%     \setlength{\itemindent}{\parindent}%     \setlength{\parsep}{\parskip}%   }%   \item[]}{\end{list}}  \setbeamercolor{frametitle}{fg=red,bg=white}  \hypersetup{pdfpagemode=FullScreen} \renewcommand*{\UrlFont}{\normalfont}  \usetheme{Goettingen} \useinnertheme{circles} \beamertemplatenavigationsymbolsempty  \setbeamerfont{page number in head/foot}{size=\large} \setbeamertemplate{footline}[frame number]   %%% \begin{document}  \frame[plain]{ \titlepage }  \setbeamertemplate{background canvas}[default]  \frame{ \frametitle{}  \begin{figure} \begin{center} \includegraphics[scale=0.2]{varweakness} \caption{VaR as a quantile} \end{center} \end{figure}  }   \end{document}   Which gives the following frame with the figure:    (I am not sure what is causing the problem, therefore I did not delete any package.)  How can I get a number, e.g. Figure 1:? 'Wouldn't wake up' vs. 'didn't wake up' I'm reading an article about two pets rescuing their owners. After the cat managed to wake up the mother, she tried to wake up other members but they wouldn't wake up.     Cathy tried to tell her husband and son to leave the house, but they wouldn't wake up.   Why wouldn't and not didn't?   (I checked possible duplicates but they weren't convincing at all. Besides, none of the answers were confirmed. One said would is used for permission and another said it's for emphasis!) What are some good books for learning the concepts of Kinematics, Newton laws, 2D Motion of Object etc.? Polynomials with integer coefficients such that $p(a)=b,p(b)=c,p(c)=a$ Using methods from another class in the main? Awk: if pattern not found add some text at the end of file Why does a 95% Confidence Interval (CI) not imply a 95% chance of containing the mean? It seems that through various related questions here, there is consensus that the "95%" part of what we call a "95% confidence interval" refers to the fact that if we were to exactly replicate our sampling and CI-computation procedures  many times, 95% of thusly computed CIs would contain the population mean. It also seems to be the consensus that this definition does not permit one to conclude from a single 95%CI that there is a 95% chance that the mean falls somewhere within the CI. However, I don't understand how the former doesn't imply the latter insofar as, having imagined many CIs 95% of which contain the population mean, shouldn't our uncertainty (with regards to whether our actually-computed CI contains the population mean or not) force us to use the base-rate of the imagined cases (95%) as our estimate of the probability that our actual case contains the CI?   I've seen posts argue along the lines of "the actually-computed CI either contains the population mean or it doesn't, so its probability is either 1 or 0", but this seems to imply a strange definition of probability that is dependent on unknown states (i.e. a friend flips fair coin, hides the result, and I am disallowed from saying there is a 50% chance that it's heads).  Surely I'm wrong, but I don't see where my logic has gone awry... Norman Window Optimization Can you change the location where windows stores its updates? On my personal home PC I want to change where windows downloads it updates to: C:\ProgramData\Package Cache(in folders with long ID numbers).  When installing Python I found that it needs an update (). The Python installer goes ahead and tries to run the update but can fail with security errors unless run as admin - I don't want to have to run as admin, especially since I am installing to a non-system access area on D:\  So my question is, can I get windows to use a different folder so that I don't need to run with full admin rights?   for example: D:\myWindowsUpdates I'm a citizen of India and I'm travelling to Nepal by air. Is an Aadhaar Card a valid document used for travelling to Nepal by air? Since there are  complex numbers (2 dimensions) and quaternions (4 dimensions), it follows intuitively that there ought to be something in between for 3 dimensions ("triernions").   Yet no one uses these. Why is this? Computing matrix-vector calculus derivatives $x, a$ in $\mathbb R^n$, $A$ in $\mathbb  R^{n\times n}$. Compute $d(x^T a)/dx$ and $d(x^T A x)/dx$.  I'm not sure about how to think about these and how to do these. Can someone explain how to derive the expressions for the two?  Finally, what happens when we have $A$ and $X$, BOTH in $\mathbb R^{n\times n}$, and we want to find $dTrace(XA)/dX$? Should “two weeks vacation” be written “two weeks’ vacation” with a possessive apostrophe? I’ve always understood that the phrase two weeks usually turns into two weeks’ when used as a modifier as in   I’m giving my two weeks’ notice.  I get two weeks’ vacation. (“two weeks’ holiday” for Brits)   with an apostrophe on the word weeks’, indicating that the vacation “belongs” to the weeks.   One way to explain this is the phrase “two weeks of vacation” being contracted to “two weeks’ vacation” – the vacation is “of” the weeks; that is, it is possessed by them.  But I’ve seen a lot of people omit the apostrophe in casual writing, and thinking about it, it seems plausible that the noun vacation would be plainly modified by the adjectival phrase two weeks.  But on the other hand, shouldn’t adjectival phrases be hypenated, namely two-weeks vacation?  Yet that seems wrong, too: the hyphenate should be singular, two-week vacation (like two-tone shoes) because .   touches on this (and references a good ) but doesn’t explain why the plural must be possessive in this case.   suggests that two weeks might be adverbial rather than adjectival, and thus resists being used attributively. But that still doesn’t quite explain this particular muddle of pluralization, possession, and attribution.  Given all this, why should “two weeks vacation” be written “two weeks’ vacation” with a possessive apostrophe? I'm trying to prove that ${n \choose r}$ is equal to ${{n-1} \choose {r-1}}+{{n-1} \choose r}$ when $1\leq r\leq n$.  I suppose I could use the counting rules in probability, perhaps combination= ${{n} \choose {r}}=\frac{n!}{r!(n-r!)}$.  I want to see an actual proof behind this equation.  Does anyone have any ideas?