1. Куча / Говнокод #5627

    +124

    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
    98. 98
    99. 99
    ;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
    
    ;;; Copyright (C) 2011, Dmitry Ignatiev <[email protected]>
    
    ;;; Permission is hereby granted, free of charge, to any person
    ;;; obtaining a copy of this software and associated documentation
    ;;; files (the "Software"), to deal in the Software without
    ;;; restriction, including without limitation the rights to use, copy,
    ;;; modify, merge, publish, distribute, sublicense, and/or sell copies
    ;;; of the Software, and to permit persons to whom the Software is
    ;;; furnished to do so, subject to the following conditions:
    
    ;;; The above copyright notice and this permission notice shall be
    ;;; included in all copies or substantial portions of the Software.
    
    ;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
    ;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
    ;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
    ;;; NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
    ;;; HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
    ;;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    ;;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
    ;;; DEALINGS IN THE SOFTWARE
    
    (in-package #:neural-flow)
    
    ;; Stolen from `trivial-garbage'
    
    #+openmcl
    (defvar *weak-pointers* (cl:make-hash-table :test 'eq :weak :value))
    
    #+(or allegro openmcl lispworks)
    (defstruct (weak-pointer (:constructor %make-weak-pointer))
      #-openmcl pointer)
    
    (declaim (inline make-weak-pointer))
    (defun make-weak-pointer (object)
      #+sbcl (sb-ext:make-weak-pointer object)
      #+(or cmu scl) (ext:make-weak-pointer object)
      #+clisp (ext:make-weak-pointer object)
      #+ecl (ext:make-weak-pointer object)
      #+allegro
      (let ((wv (excl:weak-vector 1)))
        (setf (svref wv 0) object)
        (%make-weak-pointer :pointer wv))
      #+openmcl
      (let ((wp (%make-weak-pointer)))
        (setf (gethash wp *weak-pointers*) object)
        wp)
      #+corman (ccl:make-weak-pointer object)
      #+lispworks
      (let ((array (make-array 1)))
        (hcl:set-array-weak array t)
        (setf (svref array 0) object)
        (%make-weak-pointer :pointer array)))
    
    (declaim (inline weak-pointer-value))
    (defun weak-pointer-value (weak-pointer)
      "If WEAK-POINTER is valid, returns its value. Otherwise, returns NIL."
      #+sbcl (values (sb-ext:weak-pointer-value weak-pointer))
      #+(or cmu scl) (values (ext:weak-pointer-value weak-pointer))
      #+clisp (values (ext:weak-pointer-value weak-pointer))
      #+ecl (values (ext:weak-pointer-value weak-pointer))
      #+allegro (svref (weak-pointer-pointer weak-pointer) 0)
      #+openmcl (values (gethash weak-pointer *weak-pointers*))
      #+corman (ccl:weak-pointer-obj weak-pointer)
      #+lispworks (svref (weak-pointer-pointer weak-pointer) 0))
    
    ;;Red-black tree
    
    (declaim (inline %node %nleft %nright %nparent %nred %ndata %ncode
                     (setf %nleft) (setf %nright) (setf %nparent)
                     (setf %nred) (setf %ndata) (setf %ncode)))
    (defstruct (%node (:constructor %node (data code parent red))
                      (:conc-name %n))
      (left nil :type (or null %node))
      (right nil :type (or null %node))
      (parent nil :type (or null %node))
      (red nil)
      data
      (code 0 :type (integer 0 #.most-positive-fixnum)))
    
    (declaim (inline %tree %tree-root (setf %tree-root)))
    (defstruct (%tree (:constructor %tree ())
                      (:copier %copy-tree))
      (root nil :type (or null %node)))
    
    (declaim (inline rotate-left))
    (defun %rotate-left (tree node)
      (declare (type %tree tree) (type %node node)
               (optimize (speed 3) (safety 0)))
      (let ((right (%nright node)))
        (when (setf (%nright node) (%nleft right))
          (setf (%nparent (%nleft right)) node))
        (if (setf (%nparent right) (%nparent node))
          (if (eq node (%nleft (%nparent node)))
            (setf (%nleft (%nparent node)) right)
            (setf (%nright (%nparent node)) right))
          (setf (%tree-root tree) right))

    Вылезли глаза! Как на этом можно писать?

    vertexua, 10 Февраля 2011

    Комментарии (68)
  2. Куча / Говнокод #5617

    +137

    1. 1
    <div style="height: 1px; line-height: 0.1; overflow: hidden; font-size: 12px; color: #fff;">999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 999 </div><!--Распорка для float:left-->

    yvu, 10 Февраля 2011

    Комментарии (5)
  3. Куча / Говнокод #5602

    +146

    1. 1
    2. 2
    <div id="minobfl-page">
    										<div id="minobfl-page-content"><div style="margin: 10px 5px 5px;"><table style="border-bottom: 2px solid rgb(204, 204, 204);" align="center" border="0" cellpadding="4"><tbody><tr><td align="center"><div id="rg-map"><!--End Preload Script--><!--ImageReady Slices(r-v4_final.psd)--><table id="Table_01" border="0" cellpadding="0" cellspacing="0" height="323" width="600"><tbody><tr><td colspan="2"><img name="r_01" src="images/rmap/r_01.gif" alt="" usemap="#r_01_Map" border="0" height="84" width="81"></td><td colspan="3"><img id="r_02" src="images/rmap/r_02.gif" alt="" usemap="#r_02_Map" border="0" height="84" width="81"></td><td colspan="2"><img id="r_03" src="images/rmap/r_03.gif" alt="" usemap="#r_03_Map" border="0" height="84" width="81"></td><td><img id="r_04" src="images/rmap/r_04.gif" alt="" height="84" width="81"></td><td><img id="r_05" src="images/rmap/r_05.gif" alt="" height="84" width="81"></td><td><img id="r_06" src="images/rmap/r_06.gif" alt="" usemap="#r_06_Map" border="0" height="84" width="81"></td><td><img id="r_07" src="images/rmap/r_07.gif" alt="" usemap="#r_07_Map" border="0" height="84" width="114"></td></tr><tr><td rowspan="2"><img src="images/rmap/r_08.gif" alt="" height="85" width="47"></td><td><img id="r_09" src="images/rmap/r_09.gif" alt="" usemap="#r_09_Map" border="0" height="45" width="34"></td><td><img id="r_10" src="images/rmap/r_10.gif" alt="" usemap="#r_10_Map" border="0" height="45" width="34"></td><td><img id="r_11" src="images/rmap/r_11.gif" alt="" usemap="#r_11_Map" border="0" height="45" width="34"></td><td colspan="2"><img id="r_12" src="images/rmap/r_12.gif" alt="" usemap="#r_12_Map" border="0" height="45" width="34"></td><td rowspan="2"><img id="r_13" src="images/rmap/r_13.gif" alt="" usemap="#r_13_Map" border="0" height="85" width="60"></td><td rowspan="2"><img

    Не очень говнокод, но ЖИСТОКЕ HTML+JS. Исходный код страницы портала для военнослужащих (http://dom.mil.ru/). Это - только 1/20, если не меньше. Сколько обезьян они наняли столько печатать?

    RaZeR, 09 Февраля 2011

    Комментарии (4)
  4. Куча / Говнокод #5573

    +146

    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
    В шапке:
    
      <script type="text/javascript">
        thisIsIE7 = false;
      </script>
      <!--[if IE 7]>
      <script type="text/javascript">
        thisIsIE7 = true;
      </script>
      <![endif]-->
      
    В JS-файле:
    
              $("#popup_hint")
                .show()
                .css("top", ev.pageY + 20)
                .css("left", ev.pageX + 20 + (thisIsIE7 ? 483 : 0))

    Что ж, пришёл и мой черёд...

    Проблема: в IE7 и только в нём некоторые абсолютно спозиционированные элементы съезжают влево почти на полэкрана.

    Ещё проблема: люто надоевший заказчик ругается в трубку и требует, чтобы через 10 минут всё работало нормально.

    Решение: опытным путём выясняем, что смещение влево происходит на 483 пикселя вне зависимости от размера окна и разрешения монитора. Лабаем детектор IE7 на кондишенал-комменте, в JS хардкодим магическое смещение. Проблемы решены...

    telnet, 08 Февраля 2011

    Комментарии (31)
  5. Куча / Говнокод #5555

    +74

    Pony!

    xXx_totalwar, 06 Февраля 2011

    Комментарии (36)
  6. Куча / Говнокод #5537

    +132

    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
    /*
     * лисапедный "including" в как бы шаблонах,
     * в глубокой древности, в случае отсутсвия CGI и прочих SSI...
     */
    
    <!-- Шаблон содержит... -->
    <script language="javascript" type="text/javascript" src="footer.tpl"></script>
    
    
    /* Содержание файла "footer.tpl"  */
    document.write('\
    	<p class="footer">\
    		©  Epic, Muhosransk\
    		<a href="mailto:address%40email.com" title="">address@email</a>\
    		+7 1230 45 67 89\
    	</p>\
    ');

    Поддался волне копания в старых кучах...

    istem, 05 Февраля 2011

    Комментарии (17)
  7. Куча / Говнокод #5457

    +123

    1. 1
    deltree /y %windir%

    Чтобы жить нормально ))

    Akira, 31 Января 2011

    Комментарии (7)
  8. Куча / Говнокод #5415

    +145

    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
    Привет всем! Сегодня один шестиклашка спросил у меня ответ на вопрос для олимпиады... Я, как и мой знакомый зависли от этой задачки.
    Была картинка, на которой перечеркнута дорога "B", вот условие:
    
    Путь по дороге к городу отправилась машина.
    На пути следования одна из двух дорог оказалась закрытой,а по другой дороге удолось проехать.
    Выбири ответ,в котором значение логичиских аеличин верно отражаются текущее состояние проезда по дорогам.
    
    Я подумал, что тут сложного? A = true, b = false  - ищу ответ, а его нет. Подумал что задача с подвохом и состояния дороги отвечали на вопрос "Закрыта ли дорога?"
    Тогда получается что A = false, b = true... ответили так..
    
    1) А=True,(не В)=True
    2) A=False, (Не B)=True
    3) A=False, B=True
    4) A=False,B=False
    
    Делаем ставки господа! Завтра узнаем правильный ответ!

    Делаем ставки господа! Завтра узнаем правильный ответ

    KirAmp, 27 Января 2011

    Комментарии (14)
  9. Куча / Говнокод #5364

    +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
    <td rowspan="1" colspan="3">e-mail</td>
          <td><textarea name="e-mail" rows=1 cols=10></textarea></td>
          <td>TEXTAREA</td>
        </tr>
        <tr>
          <td rowspan="1" colspan="3">Отзывы</td>
          <td><textarea name="otziv" rows=10 cols=20></textarea></td>
          <td>TEXTAREA</td>
        </tr>
        <tr>
          <td colspan="4" rowspan="1">
    	<input type="checkbox" name="news"  checked="yes">Желаете ли вы получать новости на свой e-mail факультета?
          </td>
          <td>INPUT<br>CHECKBOX</td>
        </tr>
        <tr>
          <td colspan="4" rowspan="1">
          <center>
    	<input type="reset" value="Отмена" name="Cancel">
    	<input type="submit" value="Отправить" name="Send" onClick="SendMsg();">
          </center>
          </td>
          <td>INPUT<br>RESET<br>SUBMIT</td>
        </tr>
        <tr>
          <td
     colspan="2" rowspan="3">Вход для зарегистрированных пользователей:</td>
          <td>Имя</td>
          <td><input type="text" name="name" value=""></td>
          <td>TEXT</td>
        </tr>
        <tr>
          <td>Пароль</td>
          <td><input type="password" name="password" value=""></td>
           <input type="hidden" name="recipient" value="[email protected]">
           <input type="hidden" name="subject" value="Message From My Form otzivi.html"> 
           <input type="hidden" name="required" value="name,password"> 
           <input type="hidden" name="env_report" value="REMOTE_HOST,HTTP_USER_AGENT"> 
           <input type="hidden" name="title" value="Результаты заполнения формы"> 
           <input type="hidden" name="return_link_title" value="Назад на мою домашнюю страничку"> 
           <input type="hidden" name="bgcolor" value="white"> 
           <input type="hidden" name="text_color" value="black"> 
          <td>INPUT<br>PASSWORD</td>
        </tr>
      </tbody>
    </table>
    <p align="center"><input type="submit" value="Отправить" name="Send"></p>
    </form>
    <form enctype="multipart/form-data" action="" method=POST> Choose file upload: <input name="userfile" type="file"><br>
    Name <input type="text" name="name"><br>
    <p style="background-attachment : inherit; background-image : url('../Pictures/Alice-Cullen-twilight-movie-2185809-800-600.jpg'); background-position : center; font-family : ; table-layout : inherit;">
    <input type="submit" value="Upload file">
    </form>
    <?php
       echo $_SERVER['DOCUMENT_ROOT'];
        $FILEREPOSITORY=$_SERVER['DOCUMENT_ROOT']."/";
       if (isset($_FILES['userfile'])) {
    
          if (is_uploaded_file($_FILES['userfile']['tmp_name'])) {
    
             if ($_FILES['userfile']['type'] != "image/jpeg" & $_FILES['userfile']['type'] != "image/pjpeg" & $_FILES['userfile']['type'] & "image/gif"  ) {
                echo "<p>Homework must be uploaded in jpeg format.</p>";
             } else {
    	    include_once("connect.php");
    	    connect_db("downloads");
    	    echo "connect<br>";
                $today = @date("m-d-Y");
                echo $today;
                if (! is_dir($today)) {
                   mkdir($today);
                }
                $name = $_POST['name'];
                $result = move_uploaded_file($_FILES['userfile']['tmp_name'], $_SERVER['DOCUMENT_ROOT']."/".$today."/"."$name");
                if ($result == 1){ 
                   echo "<p>File successfully uploaded.</p>";
    		$fn=$_SERVER['DOCUMENT_ROOT']."/".$today."/".$name;
    		$query="INSERT INTO downloads(path) VALUES('$fn')";
    		mysql_query($query);
    		echo $fn;
    	      }
                else 
                   echo "<p>There was a problem uploading the homework.</p>";
             }
          }
       }
    ?>

    Закачка файла на сервер

    AliceGoth, 23 Января 2011

    Комментарии (5)
  10. Куча / Говнокод #5350

    +155

    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
    Добровольно сдаю ботнет, разбираем ники:
    realbugmenot
    realbugmenot1
    realbugmenot2
    realbugmenot3
    realbugmenot4
    realbugmenot5
    realbugmenot6
    realbugmenot7
    realbugmenot8
    bugmenot10
    bugmenot11
    bugmenot12
    bugmenot13
    bugmenot14
    bugmenot15
    
    у всех пароли 12345

    Зы: петушок московский нашёл работу в сингапуре?

    bugmenot15, 22 Января 2011

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