Skip to content

Instantly share code, notes, and snippets.

🚩
Layer 8

MelanchoŁia SharpMan

🚩
Layer 8
View GitHub Profile
View Multimodal Test Data Set.js
//1-Count high speeds: Find the number of speeds > 100 in the data set.
db.agg_w_loopdata.find( { speed: { $gt: 100 } } ).count()
//2-Volume: Find the total volume for the station Foster NB for Sept 21, 2011.
db.agg_w_loopdata.aggregate([
{ $match:
View LowReceive.as
protected function lowReceive(_arg_1:IDataInput):INetworkMessage
{
var _local_2:INetworkMessage;
var _local_3:uint;
var _local_4:uint;
var _local_5:uint;
if (!this._splittedPacket){
if (_arg_1.bytesAvailable < 2){
if (DEBUG_LOW_LEVEL_VERBOSE){
_log.info((("Not enought data to read the header, byte available : " + _arg_1.bytesAvailable) + " (needed : 2)"));
View .sh
# Vider les tables actuelles
iptables -t filter -F
# Vider les r�gles personnelles
iptables -t filter -X
# Zero counters
iptables -t filter -Z
iptables --policy INPUT ACCEPT
View .java
package koh.glicko;
import org.apache.commons.lang3.builder.ToStringBuilder;
import java.util.ArrayList;
/**
* Created by Melancholia on 3/18/16.
*/
public class Glicko2Player {
View .as
public function writeVarShort(param1:int) : void
{
var _loc5_:* = 0;
if(param1 > SHORT_MAX_VALUE || param1 < SHORT_MIN_VALUE)
{
throw new Error("Forbidden value");
}
var _loc2_:ByteArray = new ByteArray();
if(param1 >= 0 && param1 <= MASK_01111111)
{
View .java
private static MapPoint getBestNextPortal(MapPoint param1, MapPoint[] param2) {
Point refCoord = null;
Point nudge = null;
MapPoint refCell = param1;
MapPoint[] closests = param2;
if (closests.length < 2) {
throw new Error("closests should have a size of 2.");
} else {
refCoord = refCell.coordinates();
nudge = new Point(refCoord.x, refCoord.y + 1);
@SharpMan
SharpMan / as
Created Dec 2, 2015
BasicACKMessage blend
View as
/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/bin/java -Didea.launcher.port=7535 "-Didea.launcher.bin.path=/Users/Melancholia/Desktop/IntelliJ IDEA 15 CE.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/Java
View gist:a25548c8487eeceb293c
koh.d2o.d2oEntity@214c265e[name=BreedRoleByBreed,pakage=com.ankamagames.dofus.datacenter.breeds,classId=1,fields={koh.d2o.FieldDefinition@7ba4f24f[fieldName=breedId,fieldType=Int],koh.d2o.FieldDefinition@4dd8dc3[fieldName=roleId,fieldType=Int],koh.d2o.FieldDefinition@6d03e736[fieldName=descriptionId,fieldType=I18N],koh.d2o.FieldDefinition@378bf509[fieldName=value,fieldType=Int],koh.d2o.FieldDefinition@5fd0d5ae[fieldName=order,fieldType=Int]}]
koh.d2o.d2oEntity@2d98a335[name=Breed,pakage=com.ankamagames.dofus.datacenter.breeds,classId=2,fields={koh.d2o.FieldDefinition@7ef20235[fieldName=id,fieldType=Int],koh.d2o.FieldDefinition@27d6c5e0[fieldName=shortNameId,fieldType=I18N],koh.d2o.FieldDefinition@4f3f5b24[fieldName=longNameId,fieldType=I18N],koh.d2o.FieldDefinition@15aeb7ab[fieldName=descriptionId,fieldType=I18N],koh.d2o.FieldDefinition@7b23ec81[fieldName=gameplayDescriptionId,fieldType=I18N],koh.d2o.FieldDefinition@6acbcfc0[fieldName=maleLook,fieldType=String],koh.d2o.FieldDefinition@3feba861[fieldName=femal
View ParallelStream.java
package koh.concurrency;
import java.util.Comparator;
import java.util.Iterator;
import java.util.Optional;
import java.util.Spliterator;
import java.util.concurrent.Callable;
import java.util.concurrent.ForkJoinPool;
import java.util.function.*;
import java.util.stream.*;
View gist:894e8f9606649c5d493e
package koh.protocol.client.codec;
import java.util.Date;
import koh.protocol.MessageQueue;
import koh.protocol.client.Message;
import koh.protocol.messages.handshake.ProtocolRequired;
import org.apache.mina.core.buffer.CachedBufferAllocator;
import org.apache.mina.core.buffer.IoBuffer;
import org.apache.mina.core.buffer.IoBufferAllocator;
import org.apache.mina.core.session.IoSession;
You can’t perform that action at this time.