This content moved here: https://exploringjs.com/impatient-js/ch_arrays.html#quickref-arrays
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object GetUser: Template() { | |
var id by SqlInt | |
var name by SqlString | |
override fun query() = """ | |
(select * from users where name = $name and id = $id) | |
union | |
(select * from deleted_user where id = $id) | |
""" | |
} |
Minimal steps required to create a custom elemenet in Polymer 1.0, without any aid from tools like Yeoman and Gulp.
I have used the Quick tour of Polymer as a reference.
- Install Node.
Most of us won’t be able to use/deploy JDK 8 in production for a looong time. But that shouldn’t stop us from using it, right?
It should be possible to sneak in JDK 8 in the back way, the same way we snuck in Groovy and other libraries we wanted to use.
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Table of Contents
- DISCLAIMER 2. Status 3. Introduction 4. Security issues 5. DNS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class FaultInterceptor extends AbstractSoapInterceptor { | |
public FaultInterceptor() { | |
super(Phase.MARSHAL); | |
} | |
@Override | |
public void handleMessage(SoapMessage message) throws Fault { | |
Fault fault = (Fault) message.getContent(Exception.class); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
beforeEach(function() { | |
this.addMatchers({ | |
toBeInstanceOf: function(expectedInstance) { | |
var actual = this.actual; | |
var notText = this.isNot ? " not" : ""; | |
this.message = function() { | |
return "Expected " + actual.constructor.name + notText + " is instance of " + expectedInstance.name; | |
}; | |
return actual instanceof expectedInstance; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var flattenObject = function(ob) { | |
var toReturn = {}; | |
for (var i in ob) { | |
if (!ob.hasOwnProperty(i)) continue; | |
if ((typeof ob[i]) == 'object') { | |
var flatObject = flattenObject(ob[i]); | |
for (var x in flatObject) { | |
if (!flatObject.hasOwnProperty(x)) continue; |