We can run:
php -d memory_limit=-1 $(which composer) update
Or change the php.ini settings:
php -i | grep php.ini
// In this example you can see how to create a FormData from an object. | |
// This, in conjunction with axios, can be used to send an image to the back-end. | |
var formData = new FormData() | |
formData.append('_method', 'PUT') | |
for (const [key, value] of Object.entries(myObject)) { | |
formData.append(key, JSON.stringify(value)) | |
} | |
if (this.image != null) formData.append('image', this.image) |
We can run:
php -d memory_limit=-1 $(which composer) update
Or change the php.ini settings:
php -i | grep php.ini
If you're able to use ES6 JavaScript features, you can use Computed Property Names to handle this very easily:
var key = 'DYNAMIC_KEY',
obj = {
[key]: 'ES6!'
};
console.log(obj);
// > { 'DYNAMIC_KEY': 'ES6!' }
I have a JavaScript object. Is there a built-in or accepted best practice way to get the length of this object?
var size = Object.keys(myObj).length;
# indicate this is the root of the project | |
root = true | |
########################################################### | |
; common | |
########################################################### | |
[*] | |
charset = utf-8 |