This file contains hidden or 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 com.vexpro.moda; | |
import org.hibernate.cfg.Configuration; | |
import org.hibernate.tool.hbm2ddl.SchemaExport; | |
import java.io.File; | |
import java.net.URL; | |
import java.util.ArrayList; | |
import java.util.List; |
This file contains hidden or 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
import java.lang.reflect.Method | |
import sbt._ | |
import sbt.Keys._ | |
import sbt.testing.Logger | |
////******************************** | |
//// Common settings across XXXXXXXX | |
////******************************** | |
object Common { |
This file contains hidden or 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 whatever.utils | |
import java.text.DateFormat; | |
import java.text.SimpleDateFormat; | |
import java.util.Date; | |
public class DateUtils { | |
// Simple thread safe date formatter | |
private static class ConcurrentDateFormat extends ThreadLocal<DateFormat> { |
This file contains hidden or 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 com.puppycloud.game.cheat; | |
import java.security.MessageDigest; | |
import javax.crypto.Cipher; | |
import javax.crypto.Mac; | |
import javax.crypto.spec.IvParameterSpec; | |
import javax.crypto.spec.SecretKeySpec; | |
public class Crypto { |
This file contains hidden or 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
$json_obj = json_decode($json, false); | |
ob_start(); | |
$fp = fopen('php://output', 'w'); | |
$header_included = false; | |
foreach ($json_obj as $lines) { | |
if ($header_included === false) { | |
fputcsv($fp, array_keys((array) $lines)); | |
$header_included = true; | |
} | |
$line = array(); |
This file contains hidden or 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
1. JSON Game Data: | |
var gamedata = {"hash":"52260a1b3dd69ed623b5fbb045bf2b06","data":{"version":7,"Players":[{"v":1,"pid":1,"bestScore":1981650,"bestScoreNoResurrection":456180,"bestCoinScore":3857,"bestSpecialCurrencyScore":2,"bestDistanceScore":10270,"lifetimePlays":109,"lifetimeCoins":57585,"lifetimeSpecialCurrency":23,"lifetimeDistance":224673,"coinCount":1085,"specialCurrencyCount":1,"activePlayerCharacter":0,"gameCenterNeedsUpdate":true,"artifactsPurchased":[0,1,5,6,2,3,10,25,7,4,11,8,35,36,30,26,20],"artifactsDiscovered":[],"objectives":[2,1,0,6,5,3,4,7,9,11,10,8,16,17,18,14,23,24,22,21],"powersPurchased":[0,4],"randomSeed":-1118273536,"numberResurectsUsed":0,"hashID":null,"Buffs":[],"objectivesActiveData":[{"Title":"9 Lives","IconNamePre":"","IconName":"","DescriptionPre":"Use 'Save Me' 9 times","Description":"Used 'Save Me' 9 times","Points":1,"Hidden":false,"CanEarnMoreThanOnce":false,"Difficulty":30,"T":"Resurrects","TT":"OverTime","FT":"None","SV":9,"EarnedSV":6,"PID":27,"GCID":"com.imangi.templer |
This file contains hidden or 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 div = document.getElementById("id"); | |
function domEventListener(e) { | |
var caller = domEventListener.caller; | |
if (e.attrName == 'style' && e.newValue.indexOf('height') >= 0) { | |
alert(caller); | |
} | |
}; | |
div.addEventListener('DOMAttrModified', domEventListener); |
This file contains hidden or 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 org.ddth.game; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
import java.nio.ByteBuffer; | |
import java.nio.ByteOrder; |
This file contains hidden or 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
// A websocket server wrapper that uses alternative websocket library for different protocol clients | |
// This is an enhanced version listed in https://gist.github.com/1148686 | |
var http = require('http'), | |
events = require('events'), | |
util = require('util'), | |
WebSocketRequest = require('node-websocket').request, | |
ws = require('node-websocket-server'), | |
Connection = require('node-websocket-server/lib/ws/connection'); |
This file contains hidden or 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
// See: www.exaflop.org/docs/cgafaq/cga1.html | |
// Let the point be C (Cx,Cy) and the line be AB (Ax,Ay) to (Bx,By). | |
// Let P be the point of perpendicular projection of C on AB. The parameter | |
// r, which indicates P's position along AB, is computed by the dot product | |
// of AC and AB divided by the square of the length of AB: | |
// AC dot AB | |
// r = --------- | |
// ||AB||^2 | |
// | |
// r has the following meaning: |
NewerOlder