Arch Linux is a lightweight distribution of Linux, designed to be user-oriented as opposed to beginner-friendly. Arch's guiding principals are self-education and experimentation, and there is little to no hand-holding when using it. Installing Arch Linux is a bit more complex than some of the more "friendly" distributions, but it won't take as long as you might think.
function chunkString(str, length) {
return str.match(new RegExp('.{1,' + length + '}', 'g'));
}
fastest solution:
function chunkString(str, len) {
var size = Math.ceil(str.length/len),
ret = new Array(size),
offset, i;
for (i = 0; i < size; i++) {
offset = i * len;
ret[i] = str.substring(offset, offset + len);
}
return ret;
}
Here is an example on how to make a dynamic data collection form HTML form.
$('form.ajax').on("submit", function() {
// get form attributes
var that = $(this),
url = that.attr('action'),
type = that.attr('method'),
data = {};
// get all name attributes
that.find('[name]').each(function(index, value) {
var that = $(this),
name = that.attr('name'),
value = that.val();
// append all values form the name attributes
data[name] = value;
});
// do the ajax request
$.ajax({
url: url,
type: type,
data: data,
success: function(response) {
console.log(response);
}
});
// prevents the default behavior for submit
return false;
});
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-8-jdk
sudo update-alternatives --config java
sudo update-alternatives --config javac
java -version