- 1
- 2
- 3
- 4
removeTSdbTables(con, yesIknowWhatIamDoing=FALSE)
dropTStable(con, Table, yesIknowWhatIamDoing=FALSE)
The arument yesIknowWhatIamDoing defaults to FALSE and must be set to TRUE or the function will return an error.
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+120
removeTSdbTables(con, yesIknowWhatIamDoing=FALSE)
dropTStable(con, Table, yesIknowWhatIamDoing=FALSE)
The arument yesIknowWhatIamDoing defaults to FALSE and must be set to TRUE or the function will return an error.
http://www.inside-r.org/packages/cran/TSsql/docs/dropTStable
+127
// ------- CLICKING STUFF IN CONTAINERS -------
if ((!( src in usr.contents ) && (((!( isturf(src) ) && (!( isturf(src.loc) ) && (src.loc && !( isturf(src.loc.loc) )))) || !( isturf(usr.loc) )) && (src.loc != usr.loc && (!( istype(src, /obj/screen) ) && !( usr.contents.Find(src.loc) ))))))
if (istype(usr, /mob/living/silicon/ai))
var/mob/living/silicon/ai/ai = usr
if (ai.control_disabled || ai.malfhacking)
return
else
return
Взято из кода обработки нажатия одной опенсорсной онлайн-игрушки. Зачем, за что и почему?
+125
http://coliru.stacked-crooked.com/a/a5ba510a2075393f
Под другим ником опубликовал чуть раньше:
http://govnokod.ru/12937
+128
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<dict>
<key>author</key>
<string>Nobody</string>
<key>name</key>
<string>my-theme</string>
<key>settings</key>
<array>
<!-- ... -->
<dict>
<key>name</key>
<string>Attribute</string>
<key>scope</key>
<string>entity.other.attribute-name</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#006E28</string>
</dict>
</dict>
<!-- ... -->
</array>
</dict>
</plist>
XML. Такой загадочный и энтерпрайзный.
// Цветовая схема для Sublime Text (или TextMate)
+126
cnt_queue_files()->
Command = "ls "++code:lib_dir(messaging, priv)++" | grep -v ^l | wc -l",
case catch list_to_integer(string:strip(os:cmd(Command), right, $\n)) of
X when is_integer(X) -> X;
_ -> 0
end.
clear_queue_files()->
Command = "rm "++code:lib_dir(messaging, priv)++"/*",
os:cmd(Command).
create_empty_queue_file()->
Command = "touch "++code:lib_dir(messaging, priv)++"/~"++?COLD_HALT_EXCHANGE++".que",
os:cmd(Command).
Ну просто похапе какое-то.
+127
% restarter.erl
-module(restarter).
% Save it to restart the node!
% где-то в коде при запуске приложения
....
ok = sync:go(),
sync:onsync(fun(Mods) ->
case lists:member(restarter, Mods) of
true ->
lager:warning("Restarting node!"),
init:restart();
_ -> ok
end
end),
....
Клуб веселых и находчивых эрлангеров.
Придумал такую фичу: если мне во время разработки надо перезапустить тестовую ноду, я просто жму сохранить в открытом файле restarter.erl
Sync подхватывает пересохраненный файл, компилит его и вызывает коллбэк со списком измененных модулей. Собственно, если рестартер среди них, то нода перезапускается :)
+119
"По какой-то причине не удается завершить установку вин 8.1"
Информативное сообщение при апдейте 8.0 -> 8.1.
+141
getElementsByTagName("body")[0].appendChild(c),frames.__bkframe.location.replace(B);}}}),e.shift(),"undefined"!=typeof r.ignoreOutsideIframe&&r.ignoreOutsideIframe===!1){e.unshift("ret=jsht"),B=A+"?"+e.join("&"),B=B.substr(0,2000);var G=document.createElement("script");G.src=B,G.type="text/javascript",document.getElementsByTagName("body").item(0).appendChild(G);}}"function"==typeof j&&j(),e=[];}}};for(var i in h){h.hasOwnProperty(i)&&(window.BKTAG[i]=h[i]);}return"function"==typeof window.bk_async&&window.setTimeout(function(){bk_async();},0),h;}),define("../src/aliases",["../src/core"],function(){window.BKTAG.addCtxParam=function(a,b){return BKTAG.addParam("phint",a,b),BKTAG;},window.BKTAG.addBkParam=function(a,b){return BKTAG.addParam("phint","__bk_"+a,b),BKTAG;},window.BKTAG.addPageCtx=window.bk_addPageCtx=window.BKTAG.addUserCtx=window.bk_addUserCtx=function(a,b){return BKTAG.addParam("phint",a,b),BKTAG;},window.BKTAG.doJSTag=window.bk_doJSTag=function(a,b,c){BKTAG.doTag(a,b,!1,null,c);},window.BKTAG.doJSTag2=window.bk_doJSTag2=function(a,b){BKTAG.doTag(a,b);},window.BKTAG.doCarsJSTag=window.bk_doCarsJSTag=function(a,b){BKTAG.doTag(a,b,!0);},window.BKTAG.doPartnerAltTag=window.bk_doPartnerAltTag=function(a,b,c){("undefined"==typeof c||null===c)&&(c=0),BKTAG.doTag(a,b,!1,c);},window.BKTAG.doCallbackTag=window.bk_doCallbackTag=function(a,b,c,d){BKTAG.doTag(a,0,!1,null,c,b,d);},window.BKTAG.doCallbackTagWithTimeOut=window.bk_doCallbackTagWithTimeOut=function(a,b,c,d,e){BKTAG.doTag(a,0,!1,null,c,b,d,e);},window.BKTAG.sendData=function(a){BKTAG.doTag(a);};}),define("mobile",["../vendor/fortyone","../vendor/json2","../src/core","../src/aliases"],function(){}),require("mobile");}();BKTAG.version="3.0.17";
the end
+142
string"==typeof a[d]||"number"==typeof a[d]||"boolean"==typeof a[d])&&bk_addPageCtx(d,a[d]);}}},doTag:function(i,j,k,l,m,n,o,p,q){var r={site:i,limit:j,excludeBkParams:k,partnerID:l,allowMultipleCalls:m,callback:n,allData:o,timeOut:p,ignoreOutsideIframe:q};for(var s in g){g.hasOwnProperty(s)&&"undefined"!=typeof window["bk_"+g[s]]&&(r[s]=window["bk_"+g[s]]);}if("object"==typeof i){for(var t in g){g.hasOwnProperty(t)&&"undefined"!=typeof i[g[t]]&&(r[t]=i[g[t]]);}}if(!(r.suppressMultipleCalls===!0||"undefined"!=typeof f&&f&&r.allowMultipleCalls!==!0)){f=!0,void 0===r.timeOut&&(r.timeOut=1000),e.unshift("ret="+(r.callback?"js":"html"));var u="undefined"!=typeof r.partnerID&&null!==r.partnerID;u&&e.unshift("partner="+encodeURIComponent(r.partnerID));var v={2607:1,2834:1,2894:1,3316:1,3317:1,3318:1,3319:1,3321:1,3322:1,3323:1,3324:1,3325:1,3326:1,3327:1,3328:1,3329:1,3330:1,3331:1,3332:1,3333:1,3334:1,3338:1,3339:1,3340:1,3341:1,3344:1,3345:1,3346:1,3348:1};if(!r.excludeBkParams&&!r.excludeTitle&&""!==document.title&&h.addBkParam("t",document.title),!r.excludeBkParams&&!r.excludeKeywords&&h.addBkParam("k",b.getKwds()),!r.excludeBkParams&&!r.excludeReferrer&&"referrer" in document&&""!==document.referrer&&h.addBkParam("pr",document.referrer),!r.excludeBkParams&&!r.excludeLocation&&h.addBkParam("l",window.location.toString()),r.callback?h.addParam("jscb",encodeURIComponent(r.callback)):"undefined"!=typeof r.limit&&h.addParam("limit",encodeURIComponent(r.limit)),r.allData===!0&&h.addParam("data","all"),r.disableMobile!==!0&&r.suppressStatidPayload!==!0&&(b.isMobile()||c>d||r.sendStatidPayload||-1!==window.location.search.indexOf("force=bkfpd"))&&"undefined"!=typeof fortyone&&"undefined"!=typeof numis&&(h.addParam("bkfpd",fortyone.collect()),h.addParam("bknms",numis.collect())),r.suppressEventScheduling!==!0&&r.eventScheduling===!0&&b.addEvent("message",function(a){if("http://tags.bluekai.com"===a.origin){var b=document.getElementById("__bkframe"),c=function(a){return function(){b.contentWindow.postMessage(JSON.stringify({event:a}),"*"),b.contentWindow.postMessage(JSON.stringify({schedule:"run"}),"*");};},d=JSON.parse(a.data);if(d.status&&"loaded"===d.status&&b.contentWindow.postMessage(JSON.stringify({get:"events"}),"*"),d.scheduled){var e=JSON.parse(d.scheduled);for(var f in e){var g="window"===e[f]?window:document.getElementById(e[f]);g.addEventListener(f,c(f),!1);}}d.status&&"complete"===d.status&&b.contentWindow.postMessage(JSON.stringify({status:"ack"}),"*");}},!1),r.suppressFirstParty!==!0&&r.useFirstParty&&(readCookie("bkrid")||createCookie("bkrid",Math.floor(Math.random()*Math.pow(2,31)),180),readCookie("bkrid")&&h.addParam("bkrid",encodeURIComponent(readCookie("bkrid")))),(b.isDebug()||r.isDebug)&&h.addParam("debug","1"),!r.excludeBkParams&&"undefined"!=typeof r.paramList&&h.getGlobals(r.paramList),!r.excludeBkParams&&"undefined"!=typeof r.jsList&&h.getGlobals(r.jsList),!r.excludeBkParams&&"undefined"!=typeof r.metaVars){for(var w=0;w<r.metaVars.length;w++){var x=b.getMeta(r.metaVars[w]);null!==x&&h.addBkParam(r.metaVars[w],x);}}r.suppressCacheBusting!==!0&&h.addParam("r",parseInt(99999999*Math.random(),10));var y="https://stags.bluekai.com/",z="http://tags.bluekai.com/",A=("https:"===document.location.protocol?r.pixelSecure?r.pixelSecure:y:r.pixelUrl?r.pixelUrl:z)+(u?"psite":"site")+"/"+r.site,B=A+"?"+e.join("&");if(r.limitGetLength&&(B=B.substr(0,2000)),BKTAG._dest=h._dest=B,r.callback){if(r.useImage){var C=document.createElement("span");C.style.display="none";var D=document.getElementsByTagName("body")[0];D.appendChild(C);var E=document.createElement("img");E.src=h._dest,C.appendChild(E);}else{var F=document.createElement("script");F.type="text/javascript",F.src=h._dest,F.id="__bk_script__",v[""+i]&&setTimeout(function(){var a=document.getElementById("__bk_script__");a&&(a.removeNode?a.removeNode(!0):a.parentNode.removeChild(a));},r.timeOut),document.getElementsByTagName("head")[0].appendChild(F);}}else{if(a.checkFrame(function(){if(r.useMultipleIframes){var b=a.createFrame("__bkframe_"+r.site+"_"+(new Date).valueOf());b.className="__bkframe_site_"+r.site,b.src=B,document.getElementsByTagName("body")[0].appendChild(b);}else{if(frames&&frames.__bkframe){frames.__bkframe.location.replace(B);}else{var c=a.createFrame("__bkframe");document.
...
+142
getOwnerDocument&&c.getOwnerDocument()||c;if(!e&&c.createElement&&function(){var a=c.createElement("html"),b=c.createElement("head");b.appendChild(c.createElement("title")),a.appendChild(b),a.appendChild(c.createElement("body")),c.appendChild(a);}(),c.getElementsByTagName){for(var f in b.one){b.one[f]=c.getElementsByTagName(f)[0];}}var g=b.one.body;b.htmlParser(a,{start:function(a,e,f){if(b.one[a]){return g=b.one[a],void 0;}for(var h=c.createElement(a),i=0;i<e.length;i++){h.setAttribute(e[i].name,e[i].value);}b.structure[a]&&"boolean"!=typeof _one[b.structure[a]]?b.one[b.structure[a]].appendChild(h):g&&g.appendChild&&(window.addEventListener||"NOSCRIPT"!=g.tagName)&&g.appendChild(h),f||(d.push(h),g=h);},end:function(){d.length-=1,g=d.length>0?d[d.length-1]:b.one.body;},chars:function(a){if(window.addEventListener){var b=c.createTextNode(a);g.appendChild(b);}else{g.text=a;}},comment:function(){}});}};return b;}),define("../src/utils",["../src/bootstrap","../vendor/htmlparser"],function(a,b){var c={getKwds:function(){var a,b=document.getElementsByTagName("meta"),c=[],d=b.length;for(a=0;d>a;a++){b[a].name&&"keywords"===b[a].name.toLowerCase()&&""!==b[a].content&&c.push(b[a].content);}return c.join(",");},getMeta:function(a){for(var b=document.getElementsByTagName("meta"),c=b.length,d=0;c>d;d++){var e=b[d];if(e.name.toLowerCase()===a.toLowerCase()&&""!==e.content){return e.content;}}return null;},scriptWithOnload:function(a,b){var c=document.createElement("script");return c.src=a,c.onloadDone=!1,c.onload=function(){c.onloadDone||(c.onloadDone=!0,"function"==typeof b&&b());},c.onreadystatechange=function(){("loaded"===c.readyState||"complete"===c.readyState)&&!c.onloadDone&&(c.onloadDone=!0,"function"==typeof b&&b());},c;},isMobile:function(){var a=!1,b=["Mobile","Tablet","Handheld","Android","iPhone","Kindle","Silk","Nokia","Symbian","BlackBerry"];for(var c in b){if(-1!==navigator.userAgent.indexOf(b[c])){a=!0;break;}}return a;},isDebug:function(){var a=!1;return"undefined"!=typeof window.location&&"undefined"!=typeof window.location.search&&-1!==window.location.search.indexOf("debug=1")&&(a=!0),a;},addEvent:function(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent("on"+b,function(b){return c.call(a,b);});}};return window.BKTAG.htmlToDom=b.htmlToDom,window.BKTAG.util=c,c;}),define("../vendor/cookies",function(){});var hashers={java:function(a){for(var b=31,c=0,d=0,e=0;e<a.length;e++){d=b*d+a.charCodeAt(e)<<c;}return d;},javaHex:function(a){return Math.abs(hashers.java(a)).toString(16);}},indexes={1:"dtzpmk".split("")},encoders={indexed_comma:function(a){for(var b=[a],c=indexes[a],d=0;d<c.length;d++){var e=signifiers[c[d]][0];b.push(encodeURIComponent(e?e:""));}return b.join(",");}},signifiers={a:[navigator.userAgent,"userAgent"],e:[function(){return hashers.javaHex(navigator.userAgent);}(),"userAgent hashed"],d:[[screen.width,screen.height,screen.colorDepth].join(""),"Screen concat"],t:[(new Date).getTime(),"Time"],z:[(new Date).getTimezoneOffset(),"Timezone"],n:[function(){for(var a in navigator){var b=[];return"string"==typeof navigator[a]&&b.push(navigator[a]),b.join("");}}(),"Navigator"],p:[function(){for(var a=[],b=0,c=navigator.plugins;b<c.length;b++){a.push(c[b].name);}return hashers.javaHex(a.join(","));}(),"Plugins hashed"],pv:[function(){for(var a=0,b=0,c=navigator.plugins;b<c.length;b++){var d=c[b].description.match(/\d+(.\d+){1,3}/);d&&(a+=d[0]);}return a;}(),"Plugin version concat"],m:[function(){for(var a=[],b=0,c=navigator.mimeTypes;b<c.length;b++){a.push(c[b].description);}return hashers.javaHex(a.join(","));}(),"mimeTypes hashed"],l:[navigator.language,"language"],k:[navigator.cookieEnabled?1:0,"cookies"],ps:[navigator.productSub,"productSub"],u:[navigator.cpuClass,"cpuClass"],g:[navigator.browserLanguage,"browserLanguage"],s:[document.defaultCharset,"charset"]},numis={collect:function(a,b){var c=a||"indexed_comma",d=b||1;return encoders[c](d);}};define("../vendor/numis",function(){}),define("../src/core",["../src/bootstrap","../src/utils","../vendor/cookies","../vendor/numis"],function(a,b){var c=0.1,d=Math.random(),e=(Math.random(),[]),f=!1,g={site:"site_id",limit:"pixel_limit",excludeBkParams:"ignore_meta",excludeTitle:"exclude_title",excludeKeywords:"exclude_keywords",excludeReferrer:"exclude_referrer",excludeLocation:"exclude_location",partnerID:"partner_id",allowMultipleCalls:"allow_multiple_calls",suppressMultipleCalls:"suppress_multiple_calls",callback:"callback",useImage:"use_image",useMultipleIframes:"use_multiple_iframes",allData:"all_data",timeOut:"timeout",ignoreOutsideIframe:"ignore_outside_iframe",eventScheduling:"event_scheduling",suppressEventScheduling:"suppress_event_scheduling",suppressCacheBusting:"suppress_cache_bustin",pixelUrl:"pixel_url",pixelSecure:"pixel_secure",useFirstParty:"use_first_party",suppressFirstParty:"suppress_first_party",sendStatidPayload:"send_statid_payload",suppressStatidPayload:"suppress_statid_payload",metaVars:"meta_vars",jsList:"js_list",paramList:"param_list",useMobile:"use_mobile",disableMobile:"disable_mobile",isDebug:"is_debug",limitGetLength:"limit_get_length"},h={_dest:null,addParam:function(a,b,c){return"undefined"!=typeof varMap&&varMap[b]&&(b=varMap[b]),"undefined"!=typeof c?e.push(a+"="+encodeURIComponent(b+"="+c)):e.push(a+"="+b),BKTAG;},addBkParam:function(a,b){if("string"==typeof a&&"string"==typeof b){h.addParam("phint","__bk_"+a,b);}else{for(var c in a){a.hasOwnProperty(c)&&"string"==typeof a[c]&&h.addParam("phint","__bk_"+c,a[c]);}}return BKTAG;},_reset:function(){f=!1,e=[];for(var a in g){g.hasOwnProperty(a)&&delete window["bk_"+g[a]];}return BKTAG;},params:function(){return e;},getGlobals:function(a){if(a.length){for(var b=0;b<a.length;b++){var c=a[b];"undefined"!=typeof window[c]&&""!==c&&""!==window[c]&&bk_addPageCtx(c,window[c]);}}else{for(var d in a){a.hasOwnProperty(d)&&"string"==typeof d&&(
...