RegExp:
/(.([a-zA-Z]+\(["'][a-zA-Z-]+["']\))){2,}/g
Test values:
Obj.prop.methodX("val").methodY("val");
this.get("someClass").addClass("full");
# nmap | |
PORT STATE SERVICE VERSION | |
21/tcp open ftp | |
22/tcp open ssh | |
# iostat | |
Linux 3.13.0-43-generic 01/10/15 _x86_64_ (4 CPU) | |
avg-cpu: %user %nice %system %iowait %steal %idle | |
0.58 0.00 0.24 5.31 0.00 93.87 |
docker run hello-world | |
docker-machine upgrade dev |
// Converting JSON To Map With Java 8 Without Dependencies. | |
// Starting with JDK 8u60+ the built-in Nashorn engine is capable to convert Json content into java.util.Map. | |
// No external dependencies are required for parsing, | |
// Origin: http://adam-bien.com/roller/abien/entry/converting_json_to_map_with | |
import java.io.IOException; | |
import java.nio.file.Files; | |
import java.nio.file.Paths; | |
import java.util.Map; | |
import javax.script.ScriptEngine; |
// taken from http://stackoverflow.com/questions/55611/javascript-private-methods | |
function Restaurant() { | |
var myPrivateVar; | |
var private_stuff = function() { // Only visible inside Restaurant() | |
myPrivateVar = "I can set this here!"; | |
} | |
this.use_restroom = function() { // use_restroom is visible to all |
collapse events taborder | |
opacity: 0 No Yes Yes | |
visibility: hidden No No No | |
visibility: collapse * No No | |
display: none Yes No No | |
* Yes inside a table element, otherwise No. | |
taken from http://stackoverflow.com/questions/272360/does-opacity0-have-exactly-the-same-effect-as-visibilityhidden |
// taken from http://stackoverflow.com/questions/3011600/clear-javascript-console-in-google-chrome | |
if (typeof console._commandLineAPI !== 'undefined') { | |
console.API = console._commandLineAPI; | |
} else if (typeof console._inspectorCommandLineAPI !== 'undefined') { | |
console.API = console._inspectorCommandLineAPI; | |
} else if (typeof console.clear !== 'undefined') { | |
console.API = console; | |
} |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>HTML5 Template</title> | |
<meta name="description" content="HTML5"> | |
<meta name="author" content="Author"> |
#!/usr/bin/python | |
import cgi, cgitb, os, sys | |
import commands | |
cgitb.enable(); # formats errors in HTML | |
form = cgi.FieldStorage() | |
sys.stderr = sys.stdout | |
print "Content-type: text/html" | |
var Timeout = { | |
_timeouts: {}, | |
set: function(name, func, time){ | |
this.clear(name); | |
this._timeouts[name] = {pending: true, func: func}; | |
var tobj = this._timeouts[name]; | |
tobj.timeout = setTimeout(function() | |
{ | |
/* setTimeout normally passes an accuracy report on some browsers, this just forwards that. */ | |
tobj.func.call(arguments); |