Skip to content

Instantly share code, notes, and snippets.

View bendem's full-sized avatar
🥕

bendem bendem

🥕
View GitHub Profile
@bendem
bendem / rot.sql
Last active December 31, 2015 13:19
Rot3 - PL/SQL.sql
-- ---------------------------------------------
-- @Author: bendem
-- @Date: 2013-12-13 10:13:47
-- @Last Modified by: bendem
-- @Last Modified time: 2013-12-16 19:34:14
-- ---------------------------------------------
CREATE OR REPLACE PROCEDURE rot3(
parm_str in varchar2,
parm_ret out varchar2
-- ----------------------------------------------
-- @Author: bendem
-- @Date: 2013-12-16 08:23:17
-- @Last Modified by: bendem
-- @Last Modified time: 2013-12-16 11:27:06
-- ----------------------------------------------
CREATE OR REPLACE TRIGGER ResulatsDecision
BEFORE INSERT ON Resultats
FOR EACH ROW
-- ----------------------------------------------
-- @Author: bendem
-- @Date: 2013-12-16 08:24:05
-- @Last Modified by: bendem
-- @Last Modified time: 2013-12-16 13:37:09
-- ----------------------------------------------
CREATE OR REPLACE TRIGGER PlanningDistance
BEFORE INSERT OR UPDATE OF Distance, Jour ON Planning
FOR EACH ROW
-- ----------------------------------------------
-- @Author: bendem
-- @Date: 2013-12-16 11:28:14
-- @Last Modified by: bendem
-- @Last Modified time: 2013-12-16 12:01:35
-- ----------------------------------------------
CREATE OR REPLACE TRIGGER NageursCategorie
BEFORE INSERT OR UPDATE ON Nageurs
FOR EACH ROW
-- ----------------------------------------------
-- @Author: bendem
-- @Date: 2013-12-17 12:10:38
-- @Last Modified by: bendem
-- @Last Modified time: 2013-12-19 12:07:26
-- ----------------------------------------------
CREATE OR REPLACE TRIGGER BeforeRow
BEFORE UPDATE ON TestProc
FOR EACH ROW
@bendem
bendem / CookTimeSetter.java
Last active August 6, 2017 07:01
Used to set the cookTime for bukkit
import org.bukkit.block.Furnace;
import org.bukkit.event.block.BlockPlaceEvent;
import org.bukkit.event.inventory.FurnaceBurnEvent;
import org.bukkit.event.inventory.FurnaceSmeltEvent;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.inventory.FurnaceInventory;
@bendem
bendem / gameloop.md
Created January 28, 2014 21:01
How a game loop is filled...

How a game loop is filled...

final int FPS = 60;
// 1 secondes divisée en 60 frames;
final long timeForAFrame = 1 000 000 000 / 60;

long beginTime = CurrentTime();

doSomeStuff();
/**
* @author bendem
*/
public abstract class AbstractRepeatingTask implements Runnable {
private final long time;
private long delay = 0;
private final Thread thread;
private volatile boolean cancelled = false;
private volatile boolean idling = false;
@bendem
bendem / jkc.py
Last active August 29, 2015 14:05
a = '0f69b410ccc810c9450186a010eff110f05510ccc910c8eb10ccd30186a010c8ea10effa10cd3710f05f10cd360186a010c94e10cd3710f3d80186a010ccd210f05510cd2d10eff010effb0186a010cd3710f05e10c94510effa0186a010f05410ccc810c9450186a010cd2c10c8e110f3e210f3d90186a010c94410cd3710c94f018af6'
def split(s, size):
return [s[i:i+size] for i in range(0, len(s), size)]
c = ''.join([chr(int(str(int(c, 16)), 2)) for c in split(a, 6)])
print(c)