- 1
std::thread_fence(get_current_memory_order());
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+14
std::thread_fence(get_current_memory_order());
+142
"function"==typeof rep&&(i=rep.call(b,a,i)),typeof i){case"string":return quote(i);case"number":return isFinite(i)?String(i):"null";case"boolean":case"null":return String(i);case"object":if(!i){return"null";}if(gap+=indent,g=[],"[object Array]"===Object.prototype.toString.apply(i)){for(f=i.length,c=0;f>c;c+=1){g[c]=str(c,i)||"null";}return e=0===g.length?"[]":gap?"[\n"+gap+g.join(",\n"+gap)+"\n"+h+"]":"["+g.join(",")+"]",gap=h,e;}if(rep&&"object"==typeof rep){for(f=rep.length,c=0;f>c;c+=1){"string"==typeof rep[c]&&(d=rep[c],e=str(d,i),e&&g.push(quote(d)+(gap?": ":":")+e));}}else{for(d in i){Object.prototype.hasOwnProperty.call(i,d)&&(e=str(d,i),e&&g.push(quote(d)+(gap?": ":":")+e));}}return e=0===g.length?"{}":gap?"{\n"+gap+g.join(",\n"+gap)+"\n"+h+"}":"{"+g.join(",")+"}",gap=h,e;}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null;},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf();});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;"function"!=typeof JSON.stringify&&(JSON.stringify=function(a,b,c){var d;if(gap="",indent="","number"==typeof c){for(d=0;c>d;d+=1){indent+=" ";}}else{"string"==typeof c&&(indent=c);}if(rep=b,!b||"function"==typeof b||"object"==typeof b&&"number"==typeof b.length){return str("",{"":a});}throw new Error("JSON.stringify");}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(a,b){var c,d,e=a[b];if(e&&"object"==typeof e){for(c in e){Object.prototype.hasOwnProperty.call(e,c)&&(d=walk(e,c),void 0!==d?e[c]=d:delete e[c]);}}return reviver.call(a,b,e);}var j;if(text=String(text),cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4);})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,""))){return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;}throw new SyntaxError("JSON.parse");});}(),define("../vendor/json2",function(){}),define("../src/bootstrap",[],function(){var a=function(a,b){var c,d=b.split("."),e=a;c=d.length;for(var f=0;c>f;f++){"undefined"==typeof e[d[f]]&&(e[d[f]]={}),e=e[d[f]];}return e;};"undefined"==typeof BKTAG&&a(window,"BKTAG"),BKTAG.ns=a;var b={createFrame:function(a){var b=document.createElement("iframe");return b.setAttribute("name",a),b.setAttribute("id",a),b.setAttribute("title","bk"),b.style.border="0px",b.style.width="0px",b.style.height="0px","function"==typeof bk_frameLoad&&(b.onload=bk_frameLoad),b.src="javascript:void(0)",b;},checkFrame:function(a){var c="__bkframe";if("undefined"==typeof frames[c]||"undefined"==typeof document.getElementById(c)){var d=b.createFrame(c),e=document.getElementsByTagName("body")[0];e&&e.appendChild(d);}"function"==typeof a&&a();}};return b;}),define("../vendor/htmlparser",[],function(){var a=function(a){for(var b={},c=a.split(","),d=0;d<c.length;d++){b[c[d]]=!0;}return b;},b={leftTrim:function(a){return a.replace(/^\s+/,"");},startTag:/^<(\w+)((?:\s+\w+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,endTag:/^<\/(\w+)[^>]*>/,attr:/(\w+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g,empty:a("area,base,basefont,br,col,frame,hr,img,input,isindex,link,meta,param,embed"),block:a("address,applet,blockquote,button,center,dd,del,dir,div,dl,dt,fieldset,form,frameset,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,NOSCRIPT,object,ol,p,pre,script,SCRIPT,table,tbody,td,tfoot,th,thead,tr,ul"),inline:a("a,abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,code,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,SCRIPT,select,small,span,strike,strong,sub,sup,textarea,tt,u,var"),closeSelf:a("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr"),fillAttrs:a("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected"),special:a("script,SCRIPT,style"),one:a("html,head,body,title"),structure:{link:"head",base:"head"},htmlParser:function(a,c){function d(a,d,f,g){if(b.block[d]){for(;i.last()&&b.inline[i.last()];){e("",i.last());}}if(b.closeSelf[d]&&i.last()==d&&e("",d),g=b.empty[d]||!!g,g||i.push(d),c.start){var h=[];f.replace(b.attr,function(a,c){var d=arguments[2]?arguments[2]:arguments[3]?arguments[3]:arguments[4]?arguments[4]:b.fillAttrs[c]?c:"";h.push({name:c,value:d,escaped:d.replace(/(^|[^\\])"/g,'$1\\"')});}),c.start&&c.start(d,h,g);}}function e(a,b){if(b){for(var d=i.length-1;d>=0&&i[d]!=b;d--){}}else{var d=0;}if(d>=0){for(var e=i.length-1;e>=d;e--){c.end&&c.end(i[e]);}i.length=d;}}var f,g,h,i=[],j=a;for(i.last=function(){return this[this.length-1];};a;){if(g=!0,a=b.leftTrim(a),i.last()&&b.special[i.last()]){var k=new RegExp("</"+i.last()+">","i"),f=a.search(k),l=a.substring(0,f);l.length>0&&(c.chars&&c.chars(l),a=a.replace(l,"")),a=a.replace(k,""),e("",i.last());}else{if(0==a.indexOf("<!--")?(f=a.indexOf("-->"),f>=0&&(c.comment&&c.comment(a.substring(4,f)),a=a.substring(f+3),g=!1)):0==a.indexOf("</")?(h=a.match(b.endTag),h&&(a=a.substring(h[0].length),h[0].replace(b.endTag,e),g=!1)):0==a.indexOf("<")&&(h=a.match(b.startTag),h&&(a=a.substring(h[0].length),h[0].replace(b.startTag,d),g=!1)),g){f=a.indexOf("<");var m=0>f?a:a.substring(0,f);a=0>f?"":a.substring(f),c.chars&&c.chars(m);}}if(a==j){throw"Parse Error: "+a;}j=a;}e();},htmlToDom:function(a,c){var d=[],e=c.documentElement||c.
...
+153
switch ($order[0]['filials_link_type']) {
case 0:
$this->operator_model->send_partner_mail($order_id);
$status = $this->operator_model->send_partner_msg($order_id);
foreach ($status as $value) {
if (!($value)) {
echo "Один из партнеров не получил заказ";
break;
}
}
break;
case 1:
$this->operator_model->send_partner_mail($order_id);
$status = $this->operator_model->send_partner_msg($order_id);
foreach ($status as $value) {
if (!($value)) {
echo "Один из партнеров не получил заказ";
break;
}
}
break;
case 2:
$this->operator_model->send_partner_mail($order_id);
$status = $this->operator_model->send_partner_msg($order_id);
foreach ($status as $value) {
if (!($value)) {
echo "Один из партнеров не получил заказ";
break;
}
}
break;
case 3:
$this->operator_model->send_partner_mail($order_id);
$status = $this->operator_model->send_partner_msg($order_id);
foreach ($status as $value) {
if (!($value)) {
echo "Один из партнеров не получил заказ";
break;
}
}
break;
...
...
}
wtf?? O.o
+116
"{7790769C-0471-11D2-AF11-00C04FA35D02}");},function(a){return a.b("{89820200-ECBD-11CF-8B85-00AA005B4340}");},function(a){return a.b("{283807B5-2C60-11D0-A31D-00AA00B92C03}");},function(a){return a.b("{4F216970-C90C-11D1-B5C7-0000F8051515}");},function(a){return a.b("{44BBA848-CC51-11CF-AAFA-00AA00B6015C}");},function(a){return a.b("{9381D8F2-0288-11D0-9501-00AA00B911A5}");},function(a){return a.b("{4F216970-C90C-11D1-B5C7-0000F8051515}");},function(a){return a.b("{5A8D6EE0-3E18-11D0-821E-444553540000}");},function(a){return a.b("{89820200-ECBD-11CF-8B85-00AA005B4383}");},function(a){return a.b("{08B0E5C0-4FCB-11CF-AAA5-00401C608555}");},function(a){return a.b("{45EA75A0-A269-11D1-B5BF-0000F8051515}");},function(a){return a.b("{DE5AED00-A4BF-11D1-9948-00C04F98BBC9}");},function(a){return a.b("{22D6F312-B0F6-11D0-94AB-0080C74C7E95}");},function(a){return a.b("{44BBA842-CC51-11CF-AAFA-00AA00B6015B}");},function(a){return a.b("{3AF36230-A269-11D1-B5BF-0000F8051515}");},function(a){return a.b("{44BBA840-CC51-11CF-AAFA-00AA00B6015C}");},function(a){return a.b("{CC2A9BA0-3BDD-11D0-821E-444553540000}");},function(a){return a.b("{08B0E5C0-4FCB-11CF-AAA5-00401C608500}");},function(){return eval("navigator.appCodeName");},function(){return eval("navigator.appName");},function(){return eval("navigator.appVersion");},function(a){return a.exec(["navigator.productSub","navigator.appMinorVersion"]);},function(){return eval("navigator.browserLanguage");},function(){return eval("navigator.cookieEnabled");},function(a){return a.exec(["navigator.oscpu","navigator.cpuClass"]);},function(){return eval("navigator.onLine");},function(){return eval("navigator.platform");},function(){return eval("navigator.systemLanguage");},function(){return eval("navigator.userAgent");},function(a){return a.exec(["navigator.language","navigator.userLanguage"]);},function(){return eval("document.defaultCharset");},function(){return eval("document.domain");},function(){return eval("screen.deviceXDPI");},function(){return eval("screen.deviceYDPI");},function(){return eval("screen.fontSmoothingEnabled");},function(){return eval("screen.updateInterval");},function(a){return a.h();},function(a){return a.i(c);},function(){return"@UTC@";},function(a){return a.n(c);},function(a){return a.m();},function(){return eval("screen.width");},function(){return eval("screen.height");},function(a){return a.plugins.Acrobat;},function(a){return a.plugins.Flash;},function(a){return a.plugins.QuickTime;},function(a){return a.plugins["Java Plug-in"];},function(a){return a.plugins.Director;},function(a){return a.plugins.Office;},function(){return(new Date).getTime()-c.getTime();},function(a){return a.e;},function(a){return a.f;},function(){return c.toLocaleString();},function(){return eval("screen.colorDepth");},function(){return eval("window.screen.availWidth");},function(){return eval("window.screen.availHeight");},function(){return eval("window.screen.availLeft");},function(){return eval("window.screen.availTop");},function(a){return a.a("Acrobat");},function(a){return a.a("Adobe SVG");},function(a){return a.a("Authorware");},function(a){return a.a("Citrix ICA");},function(a){return a.a("Director");},function(a){return a.a("Flash");},function(a){return a.a("MapGuide");},function(a){return a.a("MetaStream");},function(a){return a.a("PDFViewer");},function(a){return a.a("QuickTime");},function(a){return a.a("RealOne");},function(a){return a.a("RealPlayer Enterprise");},function(a){return a.a("RealPlayer Plugin");},function(a){return a.a("Seagate Software Report");},function(a){return a.a("Silverlight");},function(a){return a.a("Windows Media");},function(a){return a.a("iPIX");},function(a){return a.a("nppdf.so");},function(a){return a.o();}];this.q();for(var e="",f=0;f<d.length;f++){b&&(e+=this.j(d[f].toString(),'"',"'",!0),e+="=");var g;try{g=d[f](this);}catch(h){g="";}e+=b?g:escape(g),e+=";",b&&(e+="\\n");}return e=this.j(e,escape("@UTC@"),(new Date).getTime());},this.l=function(a){try{if(!a){return this.k();}var b;if(b=this.r(a),null!==b){try{b.value=this.k();}catch(c){b.value=escape(c.message);}}}catch(d){}},this.a=function(a){try{if(navigator.plugins&&navigator.plugins.length){for(var b=0;b<navigator.plugins.length;b++){var c=navigator.plugins[b];if(c.name.indexOf(a)>=0){return c.name+(c.description?"|"+c.description:"");}}}}catch(d){}return"";},this.o=function(){var a=document.createElement("span");a.innerHTML=" ",a.style.position="absolute",a.style.left="-9999px",document.body.appendChild(a);var b=a.offsetHeight;return document.body.removeChild(a),b;};};try{fortyone.c=document.createElement("span"),"undefined"!=typeof fortyone.c.addBehavior&&fortyone.c.addBehavior("#default#clientCaps");}catch(i){}window.fortyone=fortyone,window.fortyone.collect=fortyone.l,define("../vendor/fortyone",function(){}),"object"!=typeof JSON&&(JSON={}),function(){function f(a){return 10>a?"0"+a:a;}function quote(a){return escapable.lastIndex=0,escapable.test(a)?'"'+a.replace(escapable,function(a){var b=meta[a];return"string"==typeof b?b:"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4);})+'"':'"'+a+'"';}function str(a,b){var c,d,e,f,g,h=gap,i=b[a];switch(i&&"object"==typeof i&&"function"==typeof i.toJSON&&(i=i.toJSON(a)),
...
+142
/* 3.0.17-73642 */
!function(){function createCookie(a,b,c){if(c){var d=new Date;d.setTime(d.getTime()+1000*60*60*24*c);var e="; expires="+d.toGMTString();}else{var e="";}document.cookie=a+"="+b+e+"; path=/";}function readCookie(a){for(var b=a+"=",c=document.cookie.split(";"),d=0;d<c.length;d++){for(var e=c[d];" "==e.charAt(0);){e=e.substring(1,e.length);}if(0==e.indexOf(b)){return e.substring(b.length,e.length);}}return null;}function eraseCookie(a){createCookie(a,"",-1);}var requirejs,require,define;!function(a){function b(a,b){var c,d,e,f,g,h,i,j=b&&b.split("/"),k=m.map,l=k&&k["*"]||{};if(a&&"."===a.charAt(0)&&b){for(j=j.slice(0,j.length-1),a=j.concat(a.split("/")),g=0;i=a[g];g++){if("."===i){a.splice(g,1),g-=1;}else{if(".."===i){if(1===g&&(".."===a[2]||".."===a[0])){return !0;}g>0&&(a.splice(g-1,2),g-=2);}}}a=a.join("/");}if((j||l)&&k){for(c=a.split("/"),g=c.length;g>0;g-=1){if(d=c.slice(0,g).join("/"),j){for(h=j.length;h>0;h-=1){if(e=k[j.slice(0,h).join("/")],e&&(e=e[d])){f=e;break;}}}if(f=f||l[d]){c.splice(0,g,f),a=c.join("/");break;}}}return a;}function c(b,c){return function(){return j.apply(a,o.call(arguments,0).concat([b,c]));};}function d(a){return function(c){return b(c,a);};}function e(a){return function(b){k[a]=b;};}function f(b){if(l.hasOwnProperty(b)){var c=l[b];delete l[b],n[b]=!0,i.apply(a,c);}if(!k.hasOwnProperty(b)){throw new Error("No "+b);}return k[b];}function g(a,c){var e,g,h=a.indexOf("!");return -1!==h?(e=b(a.slice(0,h),c),a=a.slice(h+1),g=f(e),a=g&&g.normalize?g.normalize(a,d(c)):b(a,c)):a=b(a,c),{f:e?e+"!"+a:a,n:a,p:g};}function h(a){return function(){return m&&m.config&&m.config[a]||{};};}var i,j,k={},l={},m={},n={},o=[].slice;i=function(b,d,i,j){var m,o,p,q,r,s,t=[];if(j=j||b,"function"==typeof i){for(d=!d.length&&i.length?["require","exports","module"]:d,s=0;s<d.length;s++){if(r=g(d[s],j),p=r.f,"require"===p){t[s]=c(b);}else{if("exports"===p){t[s]=k[b]={},m=!0;}else{if("module"===p){o=t[s]={id:b,uri:"",exports:k[b],config:h(b)};}else{if(k.hasOwnProperty(p)||l.hasOwnProperty(p)){t[s]=f(p);}else{if(r.p){r.p.load(r.n,c(j,!0),e(p),{}),t[s]=k[p];}else{if(!n[p]){throw new Error(b+" missing "+p);}}}}}}}q=i.apply(k[b],t),b&&(o&&o.exports!==a&&o.exports!==k[b]?k[b]=o.exports:q===a&&m||(k[b]=q));}else{b&&(k[b]=i);}},requirejs=require=j=function(b,c,d,e){return"string"==typeof b?f(g(b,c).f):(b.splice||(m=b,c.splice?(b=c,c=d,d=null):b=a),c=c||function(){},e?i(a,b,c,d):setTimeout(function(){i(a,b,c,d);},15),j);},j.config=function(a){return m=a,j;},define=function(a,b,c){b.splice||(c=b,b=[]),l[a]=[a,b,c];},define.amd={jQuery:!0};}(),define("../vendor/almond",function(){}),fortyone=new function(){this.e=new Date(2005,0,15).getTimezoneOffset(),this.f=new Date(2005,6,15).getTimezoneOffset(),this.plugins=[],this.d={Flash:["ShockwaveFlash.ShockwaveFlash",function(a){return a.getVariable("$version");}],Director:["SWCtl.SWCtl",function(a){return a.ShockwaveVersion("");}]},this.r=function(a){var b;try{b=document.getElementById(a);}catch(c){}if(null===b||"undefined"==typeof b){try{b=document.getElementsByName(a)[0];}catch(d){}}if(null===b||"undefined"==typeof b){for(var e=0;e<document.forms.length;e++){for(var f=document.forms[e],g=0;g<f.elements.length;g++){var h=f[g];if(h.name===a||h.id===a){return h;}}}}return b;},this.b=function(a){var b="";try{"undefined"!=typeof this.c.getComponentVersion&&(b=this.c.getComponentVersion(a,"ComponentID"));}catch(c){a=c.message.length,a=a>40?40:a,b=escape(c.message.substr(0,a));}return b;},this.exec=function(b){for(var c=0;c<b.length;c++){try{var d=eval(b[c]);if(d){return d;}}catch(e){}}return"";},this.p=function(a){var b="";try{if(navigator.plugins&&navigator.plugins.length){var c=RegExp(a+".* ([0-9._]+)");for(a=0;a<navigator.plugins.length;a++){var d=c.exec(navigator.plugins[a].name);null===d&&(d=c.exec(navigator.plugins[a].description)),d&&(b=d[1]);}}else{if(window.ActiveXObject&&this.d[a]){try{var e=new ActiveXObject(this.d[a][0]);b=this.d[a][1](e);}catch(f){b="";}}}}catch(g){b=g.message;}return b;},this.q=function(){for(var a=["Acrobat","Flash","QuickTime","Java Plug-in","Director","Office"],b=0;b<a.length;b++){var c=a[b];this.plugins[c]=this.p(c);}},this.g=function(){return Math.abs(this.e-this.f);},this.h=function(){return 0!==this.g();},this.i=function(a){var b=Math.min(this.e,this.f);return this.h()&&a.getTimezoneOffset()===b;},this.n=function(a){var b=0;return b=0,this.i(a)&&(b=this.g()),b=-(a.getTimezoneOffset()+b)/60;},this.j=function(a,b,c,d){"boolean"!=typeof d&&(d=!1);for(var e,f=!0;(e=a.indexOf(b))>=0&&(d||f);){a=a.substr(0,e)+c+a.substr(e+b.length),f=!1;}return a;},this.m=function(){return new Date(2005,5,7,21,33,44,888).toLocaleString();},this.k=function(b){var c=new Date,d=[function(){return"TF1";},function(){return"015";},function(){return ScriptEngineMajorVersion();},function(){return ScriptEngineMinorVersion();},function(){return ScriptEngineBuildVersion();},function(a){return a.b(
йарасна зажыгаюць
+123
(function(win) {
var hostname_as_int = parseInt((location.hostname || "local").substring(0,10), 36);
if (typeof win['dpx_'+hostname_as_int] != 'undefined') {
win['dpx_'+hostname_as_int].run();
return; }
var dpx = {
sifi_pixel_url: '//i.simpli.fi/dpx?',
pixels_url: 'http://i.simpli.fi/p?',
pixels: [],
matching_pixels: [],
protocol: (location.protocol == 'https:') ? 'https:' : "http:",
pixels_to_drop: [],
dropping_pixels: false,
rescue_pixel: null,
company_id: '',
run: function() {
dpx.drop_pixels(); },
drop_pixels: function() {
var sifi_pixels = dpx.get_sifi_pixels();
for (var i = sifi_pixels.length-1; i >= 0; i--) {
dpx.add_sifi_pixel(sifi_pixels[i]); }
if (dpx.does_allow_matching() && !dpx.already_dropped_matching) {
dpx.get_matching_pixels(); } else {
dpx._drop_matching_pixels(); } },
get_sifi_pixels: function() {
var nodes = document.scripts || document.getElementsByTagName('script'),
pixels = [];
for (var i = nodes.length-1; i >= 0; i--) {
var node = nodes[i],
src = node.src || '';
if (src.indexOf('/dpx.js') > 0 && !node.getAttribute('data-sifi-parsed')) {
node.setAttribute('data-sifi-parsed', true);
var params = dpx.get_query_string(src);
dpx.company_id = (params.match(/cid=(\d+)/) || [])[1] || dpx.company_id
pixels.push(params);
dpx.pixels.push(params); } }
return pixels; },
add_sifi_pixel: function(params) {
params += "&cbri=" + Math.floor(Math.random()*(new Date().getTime()));
params += "&referrer=" + escape(document.referrer);
dpx.pixels_to_drop.push(dpx.sifi_pixel_url + params); },
get_matching_pixels: function() {
var script = document.createElement('script');
script.src = dpx.pixels_url + 'cid=' + dpx.company_id + '&cb=dpx_' + hostname_as_int + '._hp';
document.body.appendChild(script);
},
get_query_string: function(src) {
var str = src.substr(src.indexOf('dpx.js?')+7);
return str;
},
_hp: function(pixels) {
dpx.matching_pixels = pixels && pixels['pixels'] || [];
dpx._drop_matching_pixels();
},
_drop_matching_pixels: function() {
if (dpx.does_allow_matching() && !dpx.already_dropped_matching) {
for (var i = dpx.matching_pixels.length-1; i >= 0; i--) {
dpx.pixels_to_drop.push(dpx.matching_pixels[i]);
}
dpx.already_dropped_matching = true;
}
dpx._next_pixel();
},
_next_pixel: function() {
if (dpx.pixels_to_drop.length == 0) return;
var src = dpx.pixels_to_drop.shift(),
img = new Image();
img.onload = img.onerror = function() {
dpx.rescue_pixel = null;
dpx._next_pixel();
};
img.src = dpx.protocol + src;
dpx.rescue_pixel = setTimeout(function() {
img.onload = img.onerror = null;
dpx._next_pixel();
},1000); },
does_allow_matching: function() {
if (typeof dpx.allow_matching != 'undefined') return dpx.allow_matching;
if (dpx.protocol == 'https:') {
dpx.allow_matching = false;
return false;
}
for (var i = dpx.pixels.length-1; i >= 0; i--) {
var params = dpx.pixels[i];
if (params.indexOf('m=0') > 0) {
dpx.allow_matching = false;
return false; } }
dpx.allow_matching = true;
return true; } };
win['dpx_'+hostname_as_int] = dpx;
if (!document.body) {
if (window.addEventListener) {
window.addEventListener('load', dpx.run, false);
} else if (window.attachEvent) {
window.attachEvent('onload', dpx.run);
}
} else {
dpx.run(); }})(window);
ты их в дверь - они в окно
+126
%% Evaluate function Func() for all subscribers to Key
public_message(SubscrPid, Message) ->
gen_server:cast(SubscrPid, {public_message, Message}).
К слову об актуальных комментариях.
+161
static function anyToTimestamp($date) {
// 2009-09-03 12:10:55
if (preg_match('/^([0-9]{4})\-([0-9]{2})\-([0-9]{2})(?: ([0-9]{2})\:([0-9]{2})\:([0-9]{2}))?$/', $date, $arr)) {
$ts = mktime($arr[4], $arr[5], $arr[6], $arr[2], $arr[3], $arr[1]);
// 03.04.2008 10:12:11
} elseif (preg_match('/^([0-9]{1,2})\.([0-9]{1,2})\.([0-9]{4})(?: ([0-9]{1,2})\:([0-9]{1,2})(?:\:([0-9]{2}))?)?$/', $date, $arr)) {
$ts = mktime($arr[4], $arr[5], $arr[6], $arr[2], $arr[1], $arr[3]);
// MySQL timestamp YYYYMMDDHHMISS
} elseif (preg_match('/^\d{14}$/', $date)) {
$ts = mktime(substr($string, 8, 2), substr($string, 10, 2), substr($string, 12, 2), substr($string, 4, 2), substr($string, 6, 2),
substr($string, 0, 4));
// PHP timestamp
} elseif (is_int($date)) {
$ts = $date;
// давно заметил, что предыдущее условие не всегда срабатывает. добавил условие ниже. если передается timestamp 100% сработает
}elseif(strlen((int)$date)>=10 && is_int((int)$date)) {
$ts = $date;
}
return ($ts && $ts!=-1)?$ts:null;
}
Копаюсь как обычно в проекте, а этот довольно большой на протяжении нескольких лет над ним трудились разные программисты.
Причем бывает читаю смешные комментарии.
Однако весь смысл не в этом как вы уже поняли.
−117
//try setting up POST request, if failed settle with GET
try {
if (url_variables == null || (params && params.method == URLRequestMethod.GET)) throw new ArgumentError();
url_request.data = url_variables;
url_request.method = URLRequestMethod.POST;
}
catch(er:Error) {
url_request.url = url;
url_request.method = URLRequestMethod.GET;
}
Ветвление с помощью try..catch.
Возьму себе на заметку.
+141
private void pictureBox1_Paint(object sender, PaintEventArgs e)
{
//Перегруженый метод Paint
//Если нужно будет работать с графиксом в других методах (рисовать на нем в других методах)
//сделайте его глобальным
//Graphics gr = this.CreateGraphics();//Создаем объект графикс из окна
Graphics gr = e.Graphics;
int w = this.ClientSize.Width;//размеры клиентской области
int h = this.ClientSize.Height;//размеры клиентской области
int widthLines = 20;//Ширина клетки
int heightLines = 20;//Высота клетки
for(int i = 0; i < w; i += widthLines)
{
//Вертикальные линии
gr.DrawLine(new Pen(Brushes.Blue), new Point(i + widthLines, 0), new Point(i + widthLines, h));
//Горизонтальные линии
gr.DrawLine(new Pen(Brushes.Blue), new Point(0, i + heightLines), new Point(w, i + heightLines));
}
//Graphics gr = e.Graphics;
graf_func();
Pen p = new Pen(Color.Red, 3);// цвет линии и ширина
Point p1 = new Point(10, data_graf_x[0]);// первая точка
Point p2 = new Point(20, data_graf_x[1]);// вторая точка 1-y 2-x 1
Point p3 = new Point(30, data_graf_x[2]);// вторая точка 1-y 2-x 2
Point p4 = new Point(40, data_graf_x[3]);// вторая точка 1-y 2-x 3
Point p5 = new Point(50, data_graf_x[4]);// вторая точка 1-y 2-x
Point p6 = new Point(60, data_graf_x[5]);// вторая точка 1-y 2-x
Point p7 = new Point(70, data_graf_x[6]);// вторая точка 1-y 2-x
Point p8 = new Point(80, data_graf_x[7]);// вторая точка 1-y 2-x
Point p9 = new Point(90, data_graf_x[8]);// вторая точка 1-y 2-x
Point p10 = new Point(100, data_graf_x[9]);// вторая точка 1-y 2-x
Point p11 = new Point(110, data_graf_x[10]);// вторая точка 1-y 2-x
Point p12 = new Point(120, data_graf_x[11]);// вторая точка 1-y 2-x
Point p13 = new Point(130, data_graf_x[12]);// вторая точка 1-y 2-x
Point p14 = new Point(140, data_graf_x[13]);// вторая точка 1-y 2-x
Point p15 = new Point(150, data_graf_x[14]);// вторая точка 1-y 2-x
Point p16 = new Point(160, data_graf_x[15]);// вторая точка 1-y 2-x
Point p17 = new Point(170, data_graf_x[16]);// вторая точка 1-y 2-x
Point p18 = new Point(180, data_graf_x[17]);// вторая точка 1-y 2-x
Point p19 = new Point(190, data_graf_x[18]);// вторая точка 1-y 2-x
Point p20 = new Point(200, data_graf_x[19]);// вторая точка 1-y 2-x
Point p21 = new Point(210, data_graf_x[20]);// вторая точка 1-y 2-x
Point p22 = new Point(220, data_graf_x[21]);// первая точка
Point p23 = new Point(230, data_graf_x[22]);// вторая точка 1-y 2-x 1
Point p24 = new Point(240, data_graf_x[23]);// вторая точка 1-y 2-x 2
Point p25 = new Point(250, data_graf_x[24]);// вторая точка 1-y 2-x 3
Point p26 = new Point(260, data_graf_x[25]);// вторая точка 1-y 2-x
Point p27 = new Point(270, data_graf_x[26]);// вторая точка 1-y 2-x
Point p28 = new Point(280, data_graf_x[27]);// вторая точка 1-y 2-x
Point p29 = new Point(290, data_graf_x[28]);// вторая точка 1-y 2-x
Point p30 = new Point(300, data_graf_x[29]);// вторая точка 1-y 2-x
Point p31 = new Point(310, data_graf_x[30]);// вторая точка 1-y 2-x
//...
Point p180 = new Point(900, data_graf_y[89]);// вторая точка 1-y 2-x
Point[] my_point =
{
p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,p21,p22,p23,p24,p25,p26,p27,p28,p29,p30,
p31,p32,p33,p34,p35,p36,p37,p38,p39,p40,p41,p42,p43,p44,p45,p46,p47,p48,p49,p50,p51,p52,p53,p54,p55,p56,p57,p58,p59,p60,
p61,p62,p63,p64,p65,p66,p67,p68,p69,p70,p71,p72,p73,p74,p75,p76,p77,p78,p79,p80,p81,p82,p83,p84,p85,p86,p87,p88,p89,p90
};
Point[] my_point1 =
{
p91,p92,p93,p94,p95,p96,p97,p98,p99,p100,p101,p102,p103,p104,p105,p106,p107,p108,p109,p110,p111,p112,p113,p114,p115,p116,p117,p118,p119,p120,
p121,p122,p123,p124,p125,p126,p127,p128,p129,p130,p131,p132,p133, p134,p135,p136,p137,p138,p139,p140,p141,p142,p143,p144,p145,p146,p147,p148,p149,p150,
p151,p152,p153,p154,p155,p156,p157,p158,p159,p160,p161,p162,p163,p164,p165,p166,p167,p168,p169,p170,p171,p172,p173,p174,p175,p176,p177,p178,p179,p180
};
p180... мама дорогая... Боюсб даже представить, сколько временина это ушло, не говоря про ресурс клавиш ctlr, c и v.
При попытке добавить хотя бы 100 строк (из 200) пишет "Такой длинный код врядли может быть смешным. Пожалуйста, ограничьтесь сотней строк и 6000 символами."
Даже забавно
источник творения
http://www.cyberforum.ru/csharp-beginners/thread1069910.html