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
// Old way of writing it | |
List<PartFilter> partFilters = FilterQueryBuilder.getFilters(PartFilter.class, clonedFilters); | |
for (PartFilter f : partFilters) { | |
if (f.getPartTerms() != null) { | |
f.getPartTerms().remove("sub_category"); | |
} | |
} | |
// New way with Java 8 Stream API and Lambda functions | |
FilterQueryBuilder.getFilters(PartFilter.class, clonedFilters).stream() |
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
gpio.read(pin, function(err, value) { | |
if (err) throw err; | |
console.log(value); | |
}); | |
function getX (callback) { | |
gpio.read(pin, function (err, value) { | |
if (err) throw err; | |
callback(value); | |
}); |
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 spawn = require('child_process').spawn, | |
aws2js = require('aws2js'), | |
http = require('http'), | |
urlutil = require('url') | |
mime = require('mime'), | |
Buffers = require('buffers'); | |
var settings = { | |
s3: { | |
key: 'key', |
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
# Magical Items | |
- Staff +5 thundering (bag) | |
- Dagger +5 (keen dagger) (bag) | |
- Belt - Giant's strength +4 (Chris) | |
- Bracers - armor +8 (Joe) | |
- Gloves of Dexterity +4 (Joe) | |
- (3) rings | |
- ring of protection +5 (Steve) | |
- ring of evasion (Chris) | |
- ring of freedom of movement (Steve) |