- 1
- 2
var result = resultDate.ToString("yyyy-MM-dd");
result = result.Replace("-", "");
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+116
var result = resultDate.ToString("yyyy-MM-dd");
result = result.Replace("-", "");
+146
$module=(!empty($_GET['mod']))?$_GET['mod']:"static";
if(is_file("modules/".$module.".class.php"))
{
include_once("modules/".$module.".class.php");
}
else
{
include_once("modules/error.class.php");
}
от такая хитрожопая система, позволяющая подгружать "модули"
+168
var count = response.data.length;
var all_count = count;
if(all_count > count) {
count = all_count - count;
}
Уличная магия. О_о (Мапед не мой)
+157
function writemsg(msg, colors)
{
length = msg.length;
i=0;
while(i<length)
{
document.getElementById("msgbox").innerHTML = document.getElementById("msgbox").innerHTML + "<br><font color="+colors[i]+">"+msg[i]+"</font>";
i=i+1; //z
}
return true;
}
+169
public function Add()
{
$db->query ('DELETE FROM ' . $this->_table . ' WHERE clientId=' . $this->clientId . ' AND memberId=' . $this->userId);
$db->query ('INSERT INTO ' . $this->_table . ' SET clientId=' . $this->clientId . ', memberId=' . $this->userId);
return true;
}
без комментариев
+147
if(@$_GET['modul']=="logout"){
//code
}
ленивый мудак
+159
Boolean.prototype.toLocaleString = function () { return this; return this ? 'Yes' : 'No' }
пукнул...
+158
Object.prototype.addEvent = function (type, handler) {
for (var i = 0; i < this.length; i++) {
this[i]['on' + type] += ';' + (handler + '').replace(/function.+?\{/, '').replace(/}$/, '');
}
return this;
};
+129
Author: decker <decker@personal-army> 2010-06-19 05:39:42
Committer: decker <decker@personal-army> 2010-06-19 05:39:42
fix potential race in reservation id generation
@@ -97,7 +98,7 @@ public class VmInstances extends AbstractNamedRegistry<VmInstance> {
do {
MessageDigest digest = Hashes.Digest.MD5.get();
digest.reset();
- digest.update( Long.toString( rsvId + launchIndex + System.currentTimeMillis() ).getBytes() );
+ digest.update( Long.toString( rsvId + launchIndex + System.nanoTime( ) ).getBytes() );
Adler32 hash = new Adler32();
hash.reset();
Вот так суровые калифорнийцы сурово чинят race...
−92
if html_content.product_id == 11 || html_content.product_id == 8 || html_content.product_id == 15 || html_content.product_id == 20
@terms_and_conditions = Page.find(212).contents
else
@terms_and_conditions = Page.find(213).contents
end