really strange one this.  I'm calling an AJAX call which returns an array of items using JSON (should be 5).  In the success function I console.log the response which shows me the array which has 5 items.  (5) [{…}, {…}, {…}, {…}, {…}]     0: {id: "9232eef2-f66b-4a63-94dd-448271e9d4d0", title: "Dr"}     1: {id: "3d27249e-d825-4e51-8032-0ffbe8ec839d", title: "Miss"}     2: {id: "01d4f5c1-f19f-4390-9e01-7cd4cd501d07", title: "Mr"}     3: {id: "20b9bb71-fa48-4597-ab91-0028e7cb123f", title: "Mrs"}     4: {id: "89029583-6549-45a3-93fe-6ec32a73381e", title: "Ms"}     length: 5   When I perform a loop I get the following results for title:  11:50:24.320 stage-1.php:241 Dr 11:50:24.320 stage-1.php:241 Miss 11:50:24.320 stage-1.php:241 Mr 11:50:24.320 stage-1.php:241 Mrs 11:50:24.320 stage-1.php:241 Ms 11:50:24.320 stage-1.php:241 undefined   So I console log the k  11:52:10.685 stage-1.php:241 0 11:52:10.685 stage-1.php:241 1 11:52:10.685 stage-1.php:241 2 11:52:10.685 stage-1.php:241 3 11:52:10.686 stage-1.php:241 4 11:52:10.686 stage-1.php:241 clean   My code is this:  $.ajax({     type: "GET",     url: "/assets/core/php/ajaxCalls/optionFields/getData-v2.php",     dataType: "JSON",     data: {        optionFieldTypeID: "bb5ac90b-22c0-438d-8b75-d2cb23bb6df3"     },      success: function (response) {         console.log(response);         for (var k in response) {              console.log(response[k]["title"]);              console.log(k);          }     }   });   I guess I'm doing something really obviously wrong but can't see it - any ideas?
I've been told not to use for...in with arrays in JavaScript. Why not?
I use a 7805 for a project where the circuit needs a higher current (~2.8&nbsp;A) at 5&nbsp;V. So I assume that if I use both ICs in parallel I can increase the maximum current capacity. Would it work? How do you make an image emission without washing out the image? I am trying to make a computer monitor. This means I have to have an image texture for the screen. My image texture is currently connected to an Emission BSDF shader. Unfortunately, when the emission is bright enough to emit light, the image is white-washed. I tried adding a Brightness/contrast node to the image before pushing it into the Emission BSDF, but it seems to directly counter the Emission's strength.  The desired light level   The desired image brightness Pausing/stopping and starting/resuming Java TimerTask continuously? VirtualBox 5.0.40 crashes the whole host since update to kernel 4.13.0-26-generic I received the updates through normal Software Updater, 10-Jan-2018. After this VirtualBox would not start any VM, complaining about dkms and asking to make modprobe vboxdrv. Following the advice I reinstalled virtualbox-dkms with:  sudo apt-get --reinstall install virtualbox-dkms   After this and a reboot I tried to start a VM which freezed the whole machine and a hard reboot was necessary.  Is there a way to make VirtualBox work with the latest kernels?  EDIT:  As suggested by N0rbert, the command:  apt-cache policy `dpkg -S VirtualBox | head -n1 | sed -e 's/://g' | awk '{print $1}'`  gives:   virtualbox-qt:   Installed: 5.0.40-dfsg-0ubuntu1.16.04.2   Candidate: 5.0.40-dfsg-0ubuntu1.16.04.2   Version table:  *** 5.0.40-dfsg-0ubuntu1.16.04.2 500         500 http://fr.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages         100 /var/lib/dpkg/status      5.0.18-dfsg-2build1 500         500 http://fr.archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages   EDIT (on 29-Mar-2018): Issue is resolved for me, with the Ubuntu Ubdate from today. I have seen that it had some virtualbox-updates, therefore I tried to boot with the most recent kernel again. Then I had to run  sudo apt-get --reinstall install virtualbox-dkms  And after this my virtual machines in VirtualBox started working without crashing the whole computer. Finally! Logical Volume, Physical Volume and Volume Groups Proving that two matrices are congruent, in order to establish a rank and signature result. Having trouble indexing and executing a query in O (log n) time.  The query includes an INNER JOIN, an ORDER BY, and an equality operation. If I understand the laws of databases correctly, a query can be indexed and executed in O (log n) time (or thereabouts) if a non-equality operator is not used on more than one column. In this case, I believe the INNER JOIN does count as an equality operator and the non-equality operator would be the ORDER BY portion of the query. This table has upwards of 10,000,000 rows and needs to handle several reads and writes per second.  Using PostgreSQL. This is what the table looks like. As you can see, the column 'Names' is a list property and it is the column that the INNER JOIN goes against:  Age Names                       Date 34  ['carla', 'john', 'sam']    3/13/2011 26  ['json', 'cindy', 'joel']   3/13/2011 72  ['beth', 'amber', 'susie']  3/13/2011 14  ['john', 'jim', 'debie']    3/13/2011   This is the query that we are trying to do:  SELECT * FROM the_table WHERE Age==26 AND Names=='john' ORDER BY Date   My background is from using App Engine's Big Table, so I've used equality operators here to indicate that 'john' should be one of the names in the Names column. This would be an acceptable query in GAE's big table, it would execute in O (log N) time as all Big Table queries are reqyured to do. I am assuming there is a way to do this in PostgreSQL as well since PostgreSQL accepts list data types as columns.  Is this possible to do in PostgreSQL?  If so, how should the index be set up (we can't figure out how to set up an index that takes into account the three properties)? The title word filter is one of the worst ideas ever implemented on SO There are numerous (, , ) questions concerning this problem. I realize this is a borderline duplicate, but I'll re-iterate the futility of this particular filter and why it should be outright removed from Stack Overflow.  Do you know how effective this is in preventing users who just don't care from posting questions with bad titles? 100% ineffective. What do these users do?   Replace it with a synonym: "issue," "trouble," "predicament," "botheration" or what have you. Or worse, they simply work around the filter by deliberately misspelling the word or inserting space or punctuation:    () ?    and the coup de grâce:      I mean, even Jeff . This adds zero value to the title. In fact, it looks worse. Why, oh why are people  to scrap a bad feature? All this does is:   Prevent people who have a  to use the word "problem" in the title from posting questions with an appropriate title. Break the search feature because of workarounds or the need to use less descriptive titles than the error itself   This is an extraordinarily useless (and harmful) feature. Please, for the love of Cthulhu,  remove, eliminate, abolish, eradicate, extirpate this "feature" from Stack Overflow.    Bonus:     So I can't mention the Halting Problem in the title? – Keith Thompson Nov 1 at 19:05      @KeithThompson Maybe it's a "Halting Issue". Or "Need help with Halting". Or the "Halting thing in Computability Theory". – slhck Nov 1 at 19:14 How can I highlight text before a character with listing? A guide to moderating comments How to batch watermark JPG files? I have around 15,000 JPG files that need to be watermarked. Is there any way to process these images en masse and add a watermark?  The images may be different sizes, I want the watermark placed in the center of the images. Turning live() into on() in jQuery Best explanation of Ruby blocks? Ubuntu boots from USB but get GRUB rescue after installation I can boot Ubuntu from USB, but when I took the USB stick out of the laptop and booted again, I got an error saying   Error: unknown filesystem. grub rescue&gt;   What can I do to fix this? How do I put an image texture on a material in Cycles? I am creating a model of a glass and I would like to put a drawing on it (a png picture).  I know how to do it using Blender Render, but not with Cycles Render. Help :) R: Trouble using SMOTE package "invalid 'labels'" Using SMOTE package from DMwR library. After loading the data frame, I try to perform sampling as follows :   crime_bal$target &lt;- as.factor(crime_bal$target) crime_bal &lt;- SMOTE(target ~ .,crime_bal,perc.under = 200, perc.over = 100)   But it always ends up to this error :   Error in factor(newCases[, a], levels = 1:nlevels(data[, a]), labels = levels(data[,  :    invalid 'labels'; length 0 should be 1 or 2 In addition: Warning messages: 1: NAs introduced by coercion  2: NAs introduced by coercion    Details of my dataset :   &gt; summary(crime_bal)      text               url            target    Length:6326        Length:6326        0:5994    Class :character   Class :character   1: 332    Mode  :character   Mode  :character   Why do I always end up with the error? No direct object in 'give thee faithfully to follow' ? (1670 UK, Isaac Penington) Turn a string into a valid filename? I have a string that I want to use as a filename, so I want to remove all characters that wouldn't be allowed in filenames, using Python.  I'd rather be strict than otherwise, so let's say I want to retain only letters, digits, and a small set of other characters like "_-.() ". What's the most elegant solution?  The filename needs to be valid on multiple operating systems (Windows, Linux and Mac OS) - it's an MP3 file in my library with the song title as the filename, and is shared and backed up between 3 machines. How can I position my div at the bottom of its container? Given the following HTML:   &lt;div id="container"&gt;   &lt;!-- Other elements here --&gt;   &lt;div id="copyright"&gt;     Copyright Foo web designs   &lt;/div&gt; &lt;/div&gt;    I would like #copyright to stick to the bottom of #container. Can I achieve this without using absolute positioning? I am not talking about mirrors, just a plain window made of glass like material. Would it be possible to allow light pass only in one direction but not the other?