Getting started:
Related tutorials:
Getting started:
Related tutorials:
| <?php | |
| $values = []; | |
| foreach ($nodes as $node) { | |
| $values[] = [ | |
| 'name' => $node['name'], | |
| 'birthDate' => $node['birthDate'] | |
| ]; | |
| } |
| // by_value_of_key | |
| // e.g. array = [{index: 3, sortProp: 'aaa'}, {index: 1, sortProp: 'ccc'}, {index: 2, sortProp: 'bbb'}] | |
| var sortProp = "keyToSortByItsValues" | |
| array.sort(function (left, right) { | |
| let a = left[sortProp]; | |
| let b = right[sortProp]; | |
| if (a !== b) { | |
| if (a > b || a === void 0) return -1; | |
| if (a < b || b === void 0) return 1; | |
| } |
| DELETE t1 FROM table t1 | |
| INNER JOIN table t2 | |
| ON t2.refID = t1.refID | |
| AND t2.ID < t1.ID |
I hereby claim:
To claim this, I am signing this object:
| /* | |
| Something likes find_in_set('a,b,c', 'a,b,c,d') | |
| We can use OR: | |
| find_in_set('a', 'a,b,c,d') OR find_in_set('b', 'a,b,c,d') OR find_in_set('b', 'a,b,c,d') | |
| */ | |
| WHERE CONCAT(",", `setcolumn`, ",") REGEXP ",(val1|val2|val3)," |
| // https://gomakethings.com/check-if-two-arrays-or-objects-are-equal-with-javascript/ | |
| var isEqual = function (value, other) { | |
| // Get the value type | |
| var type = Object.prototype.toString.call(value); | |
| // If the two objects are not the same type, return false | |
| if (type !== Object.prototype.toString.call(other)) return false; | |
| // If items are not an object or array, return false |
Attention Wamp/Wordpress/windows users. I had this issue for hours and not even the correct answer was doing it for me, because I was editing the wrong php.ini file because the question was answered to XAMPP and not for WAMP users, even though the question was for WAMP.
here's what I did
Download the certificate bundle.
Put it inside of C:\wamp64\bin\php\your php version\extras\ssl
| var dates=[]; | |
| dates.push(new Date("2011/06/25")); | |
| dates.push(new Date("2011/06/26")); | |
| dates.push(new Date("2011/06/27")); | |
| dates.push(new Date("2011/06/28")); | |
| var maxDate=new Date(Math.max.apply(null,dates)); | |
| var minDate=new Date(Math.min.apply(null,dates)); |
| /* preventCopy() | |
| * Prevents user from copying the text from form fields, either by copy/cut or dragging and dropping text. | |
| * Binds preventDefault() to oncopy and oncut events. | |
| * Binds event that makes all fields in selector readonly for onmousedown event. (Doesn't make target field readonly.) | |
| * Binds event that removes readonly for onmouseup event. | |
| * MSIE bug requires a user to click twice after readonly has been removed. Focus() doesn't work, use select(). | |
| * I specifically allowed pasting because the issue is really the copying. | |
| * @param selector string required - jQuery selector for form field(s). As allowed by jQuery, this is typically a list of selectors in one string. | |
| * @return void | |
| */ |