1. Си / Говнокод #6884

    +130

    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
    MACROFIRE-MACRO 5.0.0
    
    [Info]
    Name = 
    Hotkey = 
    Repeat = 1
    
    [Macro]
    ButtonsPress = Circle
    Delay = 66
    ButtonsRelease = Circle
    Delay = 83
    ButtonsPress = Circle
    Delay = 83
    ButtonsRelease = Circle
    Delay = 50
    ButtonsPress = Circle
    Delay = 66
    ButtonsRelease = Circle
    Delay = 66
    ButtonsPress = Circle
    Delay = 83
    ButtonsRelease = Circle
    Delay = 66
    ButtonsPress = Down
    Delay = 50
    ButtonsPress = Right
    Delay = 83
    ButtonsRelease = Down
    ButtonsPress = Square
    Delay = 116
    ButtonsRelease = Right
    ButtonsRelease = Square
    Delay = 266
    ButtonsPress = RTrigger
    Delay = 83
    ButtonsRelease = RTrigger
    Delay = 50
    ButtonsPress = Circle
    Delay = 66
    ButtonsRelease = Circle
    Delay = 83
    ButtonsPress = Circle
    Delay = 66
    ButtonsRelease = Circle
    Delay = 66
    ButtonsPress = Circle
    Delay = 66
    ButtonsRelease = Circle
    Delay = 49
    ButtonsPress = Circle
    Delay = 83
    ButtonsRelease = Circle
    Delay = 66
    ButtonsPress = Circle
    Delay = 50
    ButtonsRelease = Circle
    Delay = 66
    ButtonsPress = Circle
    Delay = 100
    ButtonsChange = Down
    Delay = 83
    ButtonsPress = Right
    Delay = 66
    ButtonsRelease = Down
    Delay = 100
    ButtonsPress = Triangle
    ButtonsRelease = Right
    Delay = 83
    ButtonsRelease = Triangle
    Delay = 917
    ButtonsPress = Down
    Delay = 200
    ButtonsPress = Circle
    Delay = 83
    ButtonsRelease = Circle
    Delay = 66
    ButtonsPress = Circle
    Delay = 66
    ButtonsRelease = Circle
    Delay = 83
    ButtonsPress = Circle
    Delay = 133
    ButtonsRelease = Circle
    Delay = 50
    ButtonsRelease = Down
    Delay = 83
    ButtonsPress = Left
    ButtonsPress = Up
    Delay = 166
    ButtonsChange = Left + Circle
    ButtonsRelease = Left
    Delay = 116
    ButtonsRelease = Circle

    Lambda-11 Challenge 6

    minlexx, 07 Июня 2011

    Комментарии (24)
  2. SQL / Говнокод #6883

    −121

    1. 1
    2. 2
    3. 3
    4. 4
    update RPout
    set ReserveCalculated = round((Base * ElementNorm) /100.0 + 1e-9, 2) * 
    sign(convert(money, floor(Base * ElementNorm) / 100.0)) * sign( 1 + 
    sign(convert(money, floor(Base * ElementNorm) / 100.0)))

    Отрицательные значения изменить на ноль плюс феерическая работа с типами данных.

    Blackened, 07 Июня 2011

    Комментарии (6)
  3. Java / Говнокод #6882

    +73

    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
    elem = request.getParameter("max_price");
        if ((elem != null) && (elem.trim().length() != 0)) {
          filter.setMax_price_id(elem);
          switch (Integer.parseInt(elem))
          {
          case 1:
            filter.setMax_price("price <= 10000");
            break;
          case 2:
            filter.setMax_price("price > 10000 and price <= 20000");
            break;
          case 3:
            filter.setMax_price("price > 20000 and price <= 30000");
            break;
          case 4:
            filter.setMax_price("price > 30000 and price <= 40000");
            break;
          case 5:
            filter.setMax_price("price > 50000");
          }
        }

    получение диапазона цен

    kakon, 07 Июня 2011

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

    +160

    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
    function message($mess,$font,$border,$backgr){
    $bsize = '2';
    if ($font == "" || $border == "" || $backgr == "" ){
    $font   = '#ffffff';
    $border = 'none';
    $backgr = 'none';
    $backgr = 'none';
    $bsize = '0';
    }
    //exit();
    echo $top_pan.'<br>
    <div align="center">
    <div align="center"
    style="width: 60%; border-width: '.$bsize.'; border-style: solid;color: '.$font.'; border-color: '.$border.'; background-color: '.$backgr.';">'
    .$mess.'</div></div>'.$bottom_pan;
    
    }

    Оттуда же.
    А вообще там все можно выкладывать.

    7ion, 07 Июня 2011

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

    +161

    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
    <?php
    /*
    =====================================================
     Esay Engne Site CMS
    -----------------------------------------------------
     http://ees-co.com
    -----------------------------------------------------
     Copyright © 2010 - 2011  EES
    =====================================================
     Назначение: просмотр offline сайта
    =====================================================
    */
    
    require_once("engine/class/security_mod.php");
    $status_a = "000";
    require_once("index.php");
    
    ?>

    Esay Enigme MKS
    offline.php из корня системы.
    Долго думал.

    7ion, 07 Июня 2011

    Комментарии (10)
  6. Python / Говнокод #6879

    −167

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    9. 9
    def word(long):
       s=''
       for j in range(0,long):
          lit =  struct.unpack('c',plik.read(1))[0]
          if ord(lit)!=0:
             s+=lit
             if len(s)>300:
                break
       return s

    WGH, 06 Июня 2011

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

    +161

    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
    <? 
    	//------------------------------------------//
    	// Рисуем кнопку с цифирками xD 			//
    	//------------------------------------------//
    	
    	// Берём конфиг и библиотеки
    	$db_db		=	"hoster1129_mc";  		// Имя  базы  данных  
        $db_user	=	"hoster1129_mc";  		// Пользователь  сервера  баз  данных  
        $db_pass	=	"SH3vOp4m";  		// Пароль  
        $db_server	=	"localhost";  		// Имя  сервера 
    	
    	$red		=	"80"; 		// RGB(Red)
    	$green		=	"80"; 		// RGB(Green)
    	$blue		=	"80"; 		// RGB(Blue)
    	
    	//$count		= 	"123";	
    	
    	// Проверим соединение с базой
    	$link = @mysql_connect($db_server, $db_user, $db_pass);  
    	if(!$link)
    	{	
    	die('Невозможно подключится к MySQL базе');	
    	}
    	
    	//Убираем кол-во
    	$count = "0";
    	//Берем кол-во серверов с базы
    	$link = mysql_connect($db_server, $db_user, $db_pass);  
    	if(!$link)  die("MySQL Error");  
    	mysql_select_db($db_db)  or  die("MySQL Error");  
    	$query = "SELECT  *  FROM  ats_stats";  
    	$result = mysql_query($query,  $link)  or  die(mysql_error()); 
    	//Цикль
    	while($info = mysql_fetch_array($result))  
    	{
    		if($_GET['username'] == $info['username'])
    		{
    		$count = $info['num_ratings'];
    		break;
    		}
    	}
    	//Рисуем))
    	header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
    	header("Cache-Control: no-store, no-cache, must-revalidate");
    	header("Cache-Control: post-check=0, pre-check=0", false);
    	header("Pragma: no-cache");
    	header("Content-type: image/png");
    
    	//Устанавливаем переменные
    	$whatthefuck = mb_strlen($count);
    	$image = ImageCreateFromPNG('vote.png');
    	$color = ImageColorAllocate($image,$red,$green,$blue);
    	
    	//Проверяем кол-во символов
    	if($whatthefuck == 1)
    	{
    	ImageString($image,3,62,15,$count,$color);
    	}
    	elseif($whatthefuck == 2)
    	{
    	ImageString($image,3,58,15,$count,$color);
    	}
    	elseif($whatthefuck == 3)
    	{
    	ImageString($image,3,55,15,$count,$color);
    	}
    	elseif($whatthefuck == 4)
    	{
    	ImageString($image,3,51,15,$count,$color);
    	}
    	elseif($whatthefuck == 5)
    	{
    	ImageString($image,3,48,15,$count,$color);
    	}	
    	else
    	{
    	ImageString($image,3,50,15,"WTF?!",$color);
    	}
    
    	//Выводим картинку
    	ImagePNG($image);
    ?>

    Скрипт должен выводить число голосов по имени.

    Enelar, 06 Июня 2011

    Комментарии (44)
  8. Си / Говнокод #6877

    +143

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    switch (options & (PCRE_BSR_ANYCRLF|PCRE_BSR_UNICODE))
      {
      case 0:
      case PCRE_BSR_ANYCRLF:
      case PCRE_BSR_UNICODE:
      break;
      default: errorcode = ERR56; goto PCRE_EARLY_ERROR_RETURN;
      }

    Выкидываем три варианта, обрабатываем один.

    blueboar2, 06 Июня 2011

    Комментарии (21)
  9. 1C / Говнокод #6876

    −144

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    Процедура ЗаполнитьНажатие(Элемент)	
    	Если Период_планирования="" или Структурное_подразделение.Пустая() или Плановая_потребность_в_кадрах.Пустая() или Начальник_ППО.Пустая() или Начальник_отдела_кадров.Пустая() тогда
    	ks = Новый COMОбъект ("WScript.Shell");
    	ks.popup("Заполните все необходимые риквизиты верхней части!", 1, "Внимание", 64); 
    	Возврат;
    конецесли;

    Из студенческих работ :)

    r3nya, 06 Июня 2011

    Комментарии (21)
  10. C++ / Говнокод #6875

    +160

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    template <class Type, unsigned long Dim> inline MStreamTextIn&
      MStreamTextIn::operator >>(const MMVector<Type, Dim>& o_value)
      {
      for (unsigned long i = 0; i < Dim; i++)
        GetBaseStream() >> i_value[i];
      return *this;
      }

    copy-paste & templates
    o_vlaue == i_value it's magic

    VladislavKurmaz, 06 Июня 2011

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