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
if (isset($_POST['login']) AND isset($_POST['password']) AND !empty($_POST['login']) AND !empty($_POST['password'])) { | |
if ($loginArray = Application::$cache->get('login')){ | |
var_dump($loginArray); | |
if(array_key_exists($_SERVER['REMOTE_ADDR'], $loginArray)){ | |
if($loginArray[$_SERVER['REMOTE_ADDR']]["nb"] >= 7){ | |
$timeLeft = (time () - $loginArray[$_SERVER['REMOTE_ADDR']]["lastTime"]) /60; | |
if($timeLeft >= 5) { | |
$loginArray[$_SERVER['REMOTE_ADDR']]["nb"] = 0; | |
User::login(); | |
} |
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
package kohana.game.entities.maps.pathfinding; | |
import java.awt.Point; | |
import java.util.Arrays; | |
import org.apache.commons.lang3.ArrayUtils; | |
/** | |
* | |
* @author MelanchoŁia MØ | |
*/ |
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 static <T> Comparator<T> Compose( | |
final Comparator<? super T> primary, | |
final Comparator<? super T> secondary | |
) { | |
return (T a, T b) -> { | |
int result = primary.compare(a, b); | |
return result == 0 ? secondary.compare(a, b) : result; | |
}; | |
} |
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
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; |
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
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.*; |
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
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 |
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
/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 |
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
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); |
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 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) | |
{ |
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
package koh.glicko; | |
import org.apache.commons.lang3.builder.ToStringBuilder; | |
import java.util.ArrayList; | |
/** | |
* Created by Melancholia on 3/18/16. | |
*/ | |
public class Glicko2Player { |
OlderNewer