start new:
tmux
start new with session name:
tmux new -s myname
for line in yourString:gmatch("([^\n]*)\n?") do | |
-- do something | |
end |
{ | |
"AL": "Alabama", | |
"AK": "Alaska", | |
"AS": "American Samoa", | |
"AZ": "Arizona", | |
"AR": "Arkansas", | |
"CA": "California", | |
"CO": "Colorado", | |
"CT": "Connecticut", | |
"DE": "Delaware", |
var reg = /^[a-z]$/; | |
console.log('case 01: typeof /^[a-z]$/ returns %s', typeof reg); | |
console.log('case 02: /^[a-z]$/ instanceof RegExp returns %s', reg instanceof RegExp); | |
console.log('case 03: /^[a-z]$/.constructor.name === "RegExp" returns %s', reg.constructor.name === 'RegExp'); | |
var util = require('util'), | |
vm = require('vm'), | |
sandbox = { u: reg }; |
// Converts an ArrayBuffer directly to base64, without any intermediate 'convert to string then | |
// use window.btoa' step. According to my tests, this appears to be a faster approach: | |
// http://jsperf.com/encoding-xhr-image-data/5 | |
/* | |
MIT LICENSE | |
Copyright 2011 Jon Leighton | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |