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
{ | |
"mouse_features.arrivalTime": { | |
$lt: 0 | |
} | |
} |
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
SELECT YourColumn, COUNT(*) TotalCount | |
FROM YourTable | |
GROUP BY YourColumn | |
HAVING COUNT(*) > 1 | |
ORDER BY COUNT(*) DESC |
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
final BasicDBObject query = new BasicDBObject(); | |
List<BasicDBObject> obj = new ArrayList<BasicDBObject>(); | |
obj.add(new BasicDBObject("name", person.getName())); | |
obj.add(new BasicDBObject("age", person.getAge())); | |
query.put("$and", obj); | |
BasicDBObject increment = new BasicDBObject(); | |
increment.put("$inc", new BasicDBObject().append("quantity", 1)); | |
increment.put("$set", new BasicDBObject("person", person)); |
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
#!/bin/bash | |
FILES=/mnt/dumps/queue/* | |
for f in $FILES | |
do | |
echo "Processing $f file..." | |
java -jar LogReader tmr $f localhost | |
done |
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
//equivalent of "select count (distinct fieldName) from someTable" | |
db.someCollection.aggregate([{ $group: { _id: "$fieldName"} },{ $group: { _id: 1, count: { $sum: 1 } } } ]) |
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
{ | |
"bold_folder_labels": true, | |
"caret_style": "smooth", | |
"color_scheme": "Packages/User/base16-eighties.dark (SL).tmTheme", | |
"font_face": "Source Code Pro", | |
"font_size": 12, | |
"ignored_packages": | |
[ | |
"CodeFormatter", | |
"Vintage" |
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
# Go into the project root | |
cd ~/my-project | |
# Create a branch which only contains commits for the children of 'foo' | |
git subtree split --prefix=foo --branch=foo-only | |
# Remove 'foo' from the project | |
git rm -rf ./foo | |
# Create a git repo for 'foo' (assuming we already created it on github) |
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
{ | |
"CONFIG": "BIBRM_CONFIG", | |
"START": { | |
"type": "LIST_ALL", | |
"linkTo": "Vertragsposition" | |
}, | |
"SUBJECTS": [ | |
{ | |
"uri": "bibrm:AnnualContractData", | |
"pos": { |
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
{ | |
"CONFIG": "BIBRM_CONFIG", | |
"START": { | |
"type": "LIST_ALL", | |
"linkTo": "Vertragsjahresdaten" | |
}, | |
"SUBJECTS": [ | |
{ | |
"uri": "bibrm:AnnualContractData", | |
"pos": { |
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
{ | |
"CONFIG": "BIBRM_CONFIG", | |
"START": { | |
"type": "LIST_ALL", | |
"linkTo": "Vertragsbasisdaten" | |
}, | |
"SUBJECTS": [ | |
{ | |
"uri": "bibrm:BasicContractData", | |
"pos": { |
OlderNewer