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
from django.db.models.loading import get_models | |
for m in get_models(): | |
exec "from %s import %s" % (m.__module__, m.__name__) |
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
drop table extensions_conf; | |
CREATE TABLE extensions_conf ( | |
id serial NOT NULL, | |
context character varying(20) DEFAULT '' NOT NULL, | |
exten character varying(20) DEFAULT '' NOT NULL, | |
priority smallint DEFAULT 0 NOT NULL, | |
app character varying(20) DEFAULT '' NOT NULL, | |
appdata character varying(128) | |
); |
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
World.cpp: | |
m_configs[CONFIG_CHATLOG_BGROUND] = sConfig.GetBoolDefault("ChatLogs.BattleGround", false); | |
+ m_configs[CONFIG_DUAL_SPEC_TIME_DELTA] = sConfig.GetIntDefault("DualSpecTimeDelta", 300); | |
} | |
World.h: | |
CONFIG_VALUE_COUNT | |
+ CONFIG_DUAL_SPEC_TIME_DELTA | |
}; |
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
diff -r 1c6f961459fb src/game/Item.cpp | |
--- a/src/game/Item.cpp Mon Mar 14 23:22:30 2011 +0100 | |
+++ b/src/game/Item.cpp Tue Mar 22 06:49:45 2011 +0300 | |
@@ -891,6 +891,15 @@ | |
Item *pItem = NewItemOrBag(pProto); | |
if (pItem->Create(objmgr.GenerateLowGuid(HIGHGUID_ITEM), item, player)) | |
{ | |
+ /** World of Warcraft Armory **/ | |
+ if (pProto->Quality > 2 && pProto->Flags != 2048 && (pProto->Class == ITEM_CLASS_WEAPON || pProto->Class == ITEM_CLASS_ARMOR) && player) | |
+ { |
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
def f1(x): | |
x = x | |
def f2(y): | |
x += y | |
return x | |
return f2 | |
(defn f1 [x] | |
(let [x (atom x)] | |
(fn [y] |
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
http://common-lisp.net/project/iterate/#examples | |
(loop with max-elt = nil | |
with max-key = 0 | |
for elt in list-of-lists | |
for key = (length elt) do | |
(when (> key max-key) | |
(setq max-elt elt | |
max-key key)) | |
finally (return max-elt)) |
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/python -u | |
import os, sys, time, math | |
local = ['alns', 'lns', 's'] | |
#pipe collectors | |
alns = '' | |
lns = [] | |
s = None |
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
class Singleton(object): | |
__instance = None | |
def __new__(cls, *a, **kva): | |
''' | |
Singleton getter/creator | |
@return: Class instance | |
''' | |
if cls.__instance is None: | |
cls.__instance = object.__new__(cls) | |
else: |
NewerOlder