Hi I am new to JavaScript and have been doing some practice stuff. I am struggling with looping through an Object's properties and appending each property to the DOM. Can someone provide some guidance please? I tried piecing this together through other questions but not sure where I am going wrong?  var person = {     firstName: "john",     lastName: "doe",     age: 45,     placeOfBirth: "somewhere" }  for(var i = 0; i &lt; person.length; i++) {     if(hasOwnProperty(person[i])) {         var p = document.createElement("p");         p.innerHTML = person[i];         document.body.appendChild(p)     } }
I have a JavaScript object like the following:  var p = {     "p1": "value1",     "p2": "value2",     "p3": "value3" };   Now I want to loop through all p elements (p1, p2, p3...) And get their keys and values. How can I do that?  I can modify the JavaScript object if necessary. My ultimate goal is to loop through some key value pairs and if possible I want to avoid using eval.
Equivalent Definitions of the Operator Norm I have a few questions regarding CAN bus load  Is there any derived equation/formula to calculate the bus load?  I need transmit below frames(Assume Standard frame format) at baud rate 500 kbps on the bus 5ms  ----- 50 frames. 10ms ----- 10 frames. 100ms ---- 30 frmaes. Event messages ---- 10 frames.   How to calculate bus load, does anyone knows kindly illustrate the same?  What is the maximum bus load on CAN bus? Loopback to forwarded Public IP address from local network - Hairpin NAT I'm new to the ICS os, coming from Gingerbread from another phone. The phone's quite nice and fast when I first used it, but just this morning it started exhibiting weird actions. Camera360 doesn't open up automatically when I click it, the Camera closes for no reason, Pocket restarts when an article has an image, and TTPod resets the song to the previous song on my widget in the middle of a new song I'm playing.  I checked out the ram, and and was surprised to see 500+ mb used, 0 mb available. I looked at the list of programs and I see the usual culprits like Facebook, but the ram they're using doesn't add up to 500+ mb. Yeah, I know that the whole ram indicated isn't usable by the apps, but I don't think I've done anything to warrant the 0 mb. I close my apps. There are times when there's free 4 to 5 mb, but I think that too shouldn't be the case. I tried installing Advance Task Killer, it listed less than 10 apps, killed it, still the ram is what it is above.   I did a reboot, and now it reads 300+ mb usage, 200 something free.   What can I do? How do I ensure an app's closed on ICS? I installed GoLaucher because it has a handy task killer and I can see the ram freed in an instant, but I would like to know if there's a better way to handle the RAM. How do I debug when the system freezes or when it crashes back to login? I am fairly new to Ubuntu and I was wonder what a good way is to debug when something crashes?   For example: I installed 11.04 and the default media player banshee makes my laptop crash after a few minutes of playing music. Since the system completely freezes and there is not error message it's hard to find out what is wrong.  Second problem I have is that sometimes the system crashes to login. I am suspecting it to be a Chromium or Flash but I am not 100% sure.  So anybody got some tips on how to debug stuff like this? I want to prove that: $\ln(x+1)&lt; x$.  My idea is to define:  $f(x) = \ln(x+1) - x$, so:  $f'(x) = \dfrac1{1+x} - 1  = \dfrac{-x}{1+x} &lt; 0, \text{ for }x &gt;0$.  Which leads to $f(x)&lt;f(0)$, so $\ln (x+1)-x&lt;0$.  Is that a valid proof? Any other ideas?  Thanks. Deleting an element from an array in PHP If I have NM cable running into a junction box, can I strip the sheath of the NM cable starting inside the junction box and run the conductors without a sheath through conduit that is connected to the junction box? I understand that the wiring you'd typically use through conduit is THHN or NM (if you want to use the conduit solely as protection).  But I'd like to be able to take this incoming NM cable and have it's conductors only continue on through conduit along with some other THHN that's coming from another source. The individual conductors of the NM cable while not labeled can still be traced back to where the sheathing ends, so technically the conductors are still identifiable as to what they are. If need be, I could splice the NM conductors to THHN wire in the junction box, but I don't see a reason to add a splice where I don't think it's needed. My reasoning for why I think this should be OK is that if you terminate NM cable in a panel, you typically have a foot or so of the conductors without the sheath and there's nothing identifying those other than tracing it back to the sheath it came from. Please add TeX rendering on the Android app I have a matrix which is kind of symmetrical with the other diagonal, i.e., something like  $$A = \left[ \begin{array}{c c c c}    a &amp; b &amp; c &amp; d \\    e &amp; f &amp; g &amp; c \\    h &amp; i &amp; f &amp; b \\    j &amp; h &amp; e &amp; a  \end{array} \right]$$  Does this matrix have a special name in literature? What are it's properties?  And a matrix that is symmetrical by both diagonals   $$A = \left[ \begin{array}{c c c c}    a &amp; b &amp; c &amp; d \\    b &amp; e &amp; f &amp; c \\    c &amp; f &amp; e &amp; b \\    d &amp; c &amp; b &amp; a  \end{array} \right]$$  What's the name of it? Any interesting properties? How do you handle multiple instances of setTimeout()? What is the most recommended/best way to stop multiple instances of a setTimeout function from being created (in javascript)?  An example (psuedo code):  function mouseClick() {    moveDiv("div_0001", mouseX, mouseY); }  function moveDiv(objID, destX, destY) {    //some code that moves the div closer to destination    ...    ...    ...     setTimeout("moveDiv(objID, destX, destY)", 1000);    ...    ...    ... }   My issue is that if the user clicks the mouse multiple times, I have multiple instances of moveDiv() getting called.  The option I have seen is to create a flag, that only allows the timeout to be called if no other instance is available...is that the best way to go?  I hope that makes it clear.... For each $y \in \mathbb{R}$ either no $x$ with $f(x) = y$ or two such values of $x$. Show that $f$ is discontinuous. This is from Apostol's Mathematical Analysis.  Let $f$ be a function defined in $[0, 1]$ such that for each real number $y$ either there is no value of $x \in [0, 1]$ such that $f(x) = y$ or there are exactly two such values of $x$. Prove that a) $f$ must be discontinuous on $[0, 1]$. b) $f$ has an infinite number of discontinuities in $[0, 1]$.  Long back I had tried to solve the problem. I reasoned for a) as follows: Suppose that $f$ is continuous and let $m, M$ be its minimum and maximum values on $[0, 1]$. Clearly if $m = M$ then $f$ is constant and clearly for every $x \in [0, 1]$ we have $f(x) = m = M$ which contradicts given property of $f$. So we must have $m &lt; M$. Clearly there are now four distinct points $a, b, c, d$ in $[0, 1]$ such that $f(a) = f(b) = m, f(c) = f(d) = M$. By checking possible linear orderings of $a, b, c, d$ I could find a find a value of $y \in (m, M)$ for which there exist more than 2 values of $x$ such that $f(x) = y$. However this approach looks very clumsy and I suspect much simpler and easier proof is possible. Part b) seemed bit complex and my only guess was that probably $f$ was discontinuous on each subinterval of $[0, 1]$ but I could not prove this claim (may be the claim is wrong!). Perhaps there is a simpler solution to this part of the problem. Apostol's also asks to provide an example of such a function. Any hints on the overall problem will be appreciated.  Update: After looking at Marc's answer, I think I have found a way to show that there are infinitely many discontinuities. Earlier the solution was a part of the question itself but it made the question look quite lengthy hence I moved it to a separate answer. JavaScript OR (||) variable assignment explanation With Glade Designer that lets you set up Gtk-Ui's you can check the option that windows are not shown in the launcher. If I take a look at the ui-file generated by Glade, it says &lt;property name="skip_taskbar_hint"&gt;True&lt;/property&gt;. In gtk code this hint is  window.set_property('skip-taskbar-hint', True). However I believe that this option is not exclusively Gtk-specific, and want to apply this one on my PyQt4-app. The Ubuntu window manager must be able to receive that hint, otherwise I would see the window of a gtk-application i use (stickynotes-indicator). So there MUST be a way of doing this in Qt or any other language, right?  Does anybody know such an option? Python or Qt syntax, doesn't matter! I was having a look at an old question of mine when I browsed the  from the timeline. I scrolled downwards and realized the Review completed panel comes along for the ride. While that might be , tags flowing over top of it as pictured below probably isn't.  Here's a .gif of the Question and Duplicate tabs flowing over it as well. Note that the timeline button also flows over. If vote buttons are present, they will also flow over it.  Reproduced on Chrome and Microsoft Edge. Update Per  by Tiago Martins Peres, this issue also happens in other Review types, namely Late Answers, First Posts and Low Quality Posts. In addition to that, it is causing the action buttons on reviews to become unclickable if you scroll low enough.  As a temporary workaround, you can use 's , which  this issue. GridView sorting: SortDirection always Ascending Should individual letters be preceded with "an"? I was reading a comic book and I noticed that the author used "an A" and "an N" in a particular phrase (screenshot below). While I understand the usage of "An A" here (A being a vowel and what not) and "N" having a pronunciation which has a sound similar to "A".  Since most of English alphabets have pronunciations which start with a syllable similar to one of the vowels or semi-vowels; is it OK to prefix the letters using "An"?  For eg. An X, or An Y.        Zenescope's Grimm Fairy Tales - Werewolves: The Hunger, page #8 (Click to enlarge) Integration of the cardinal sine It is said that the integral of the cardinal sine is $1$. How do I integrate the cardinal sine? $$ \int_{-\infty}^{\infty} \frac{\sin(a)}{a} \, {\rm d} a $$ CSS to make HTML page footer stay at bottom of the page with a minimum height, but not overlap the page I have the following page (deadlink: http://www.workingstorage.com/Sample.htm ) that has a footer which I can't make sit at the bottom of the page. I want the footer to  stick to the window bottom when the page is short and the screen is not filled, and stay at the document end and move down as normal when there is more than a screenful of content (instead of overlapping the content).  The CSS is inherited and befuddles me. I can't seem to change it properly to put a minimum height on the content or make the footer go to the bottom. I'm trying to delete some old flow which are inactive via workbench. DestructiveChanges.xml &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; &lt;Package xmlns=&quot;http://soap.sforce.com/2006/04/metadata&quot;&gt;     &lt;types&gt;         &lt;members&gt;Advanced_Round_Robin&lt;/members&gt;         &lt;name&gt;Flow&lt;/name&gt;     &lt;/types&gt;Ï &lt;/Package&gt;  package.xml &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt; &lt;Package xmlns=&quot;http://soap.sforce.com/2006/04/metadata&quot;&gt;       &lt;version&gt;48.0&lt;/version&gt; &lt;/Package&gt;  I've added both file in zip and in workbench when I deploy using this zip file I get below error.  insufficient access rights on cross-reference id   What permission I need to have to perform this action? Also is there way I can delete few version of same flow only? Like keep only last 3-4 version and delete all previous version of given flow? Thank you.