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

    +137

    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
    rem ID generator
    :idgen
    set nsmb=36
    set idstr=
    for /l %%i in (1,1,8) do call :rsadd
    echo ID=%idstr%
    exit /b
    
    rem Random symbol adding [0-9a-z]
    :rsadd
    set r=%random%
    set /a c=r-r/nsmb*nsmb
    if %c% lss 10 set idstr=%idstr%%c%
    if %c% == 10 set idstr=%idstr%a
    if %c% == 11 set idstr=%idstr%b
    if %c% == 12 set idstr=%idstr%c
    if %c% == 13 set idstr=%idstr%d
    if %c% == 14 set idstr=%idstr%e
    if %c% == 15 set idstr=%idstr%f
    if %c% == 16 set idstr=%idstr%g
    if %c% == 17 set idstr=%idstr%h
    if %c% == 18 set idstr=%idstr%i
    if %c% == 19 set idstr=%idstr%j
    if %c% == 20 set idstr=%idstr%k
    if %c% == 21 set idstr=%idstr%l
    if %c% == 22 set idstr=%idstr%m
    if %c% == 23 set idstr=%idstr%n
    if %c% == 24 set idstr=%idstr%o
    if %c% == 25 set idstr=%idstr%p
    if %c% == 26 set idstr=%idstr%q
    if %c% == 27 set idstr=%idstr%r
    if %c% == 28 set idstr=%idstr%s
    if %c% == 29 set idstr=%idstr%t
    if %c% == 30 set idstr=%idstr%u
    if %c% == 31 set idstr=%idstr%v
    if %c% == 32 set idstr=%idstr%w
    if %c% == 33 set idstr=%idstr%x
    if %c% == 34 set idstr=%idstr%y
    if %c% == 35 set idstr=%idstr%z
    exit /b

    Windows shell

    Собственноручно написанное. Нашел, разбирая старые скрипты.

    vp2729, 25 Июня 2011

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

    +135

    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
    (+ 3 5)
    (* 5 6 7)
    (kupitj bulochnaja baton)
    
    Можно записать выражения и посложнее:
    (kupitj bulochnaja baton (+ 2 1))
    «Купи в булочной батоны: два плюс ещё один». Просто, не правда ли? Давайте двигаться дальше.
    
    
    (define (privet imja)
      (display "Privet ")
      (display imja)
      (display "!")
      (newline))
    (define (polzovatel)
      (write "Predstavtes:")
      (read))
    (privet (polzovatel))

    Нашел этот пиздец в Введение в язык Scheme для школьников, сначала подумал что автор таким образом заставляет работать мозг школьника(пища все таки) но нет подобное продолжается. К сожалению полной версии "учебника" не имею надеюсь подобное затрагивает только вступление и дальше будет лучше..
    З.ы думаю первый говнокод на Scheme....(:

    Epik, 25 Июня 2011

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

    +134

    1. 1
    http://www.govnodesign.ru/

    Видали?=)

    1_and_0, 24 Июня 2011

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

    +136

    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
    <td colspan="3" rowspan="2">
    	<script>
    		if(hsub>0){
    			document.write(
    	'<table id=tans width=669 height=109 border=0 cellpadding=0 cellspacing=0 style=position:absolute;top:'+(ah-hsub)+'px>')
    		}else{
    			document.write(
    	'<table id=tans width=669 height=109 border=0 cellpadding=0 cellspacing=0>')
    		}
    	</script>
    	<noscript>
    		<table id=tans width=669 height=109 border=0 cellpadding=0 cellspacing=0>
    	</noscript>
    <tr>

    Нет слов!

    Joe_MD, 22 Июня 2011

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

    +131

    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
    (defparameter n 2)
    (setf middle (make-array 2 :initial-element 0))
    (defparameter v 7)
    (setf tr (make-array `(,(+ 1 n) ,n) :initial-element 4))
    (setf ftr (make-array 3 :initial-element 1))
    (defun pow (x n)
    (cond((= n 0) 1)((= n 1) x)(T (* x (pow x (- n 1))))))
    (defun f1 (x y)
    (+ (* (pow v 2) (pow x 2))
    (* (/ v (+ v 1)) x)
    (* 15 (+ v 1) (pow y 2))
    (* -1 2 v y) (* 4 v)))
    
    (defun sigma1 (a)
    (* a (/ (+ (sqrt (+ n 1)) (- n 1))
    (* n (sqrt 2))) ))
    
    (defun sigma2 (a)
    (* a (/ (+ (sqrt (+ n 1)) -1)
    (* n (sqrt 2))) ))
    
    (defun setp (a)
    (loop for i from 1 to n do
    (loop for j from 0 to (- n 1) do
    (cond
    ((= (- i 1) j) (setf (aref tr i j) (+ (aref tr 0 0) (sigma2 a))))
    (T (setf (aref tr i j) (+ (aref tr 0 1) (sigma1 a))))))))
    
    (defun evalfun ()
    (loop for i from 0 to n do
    (setf (aref ftr i) (f1 (aref tr i '0) (aref tr i '1)))
    (format t "The functions in dot ~$:~$~$" `(,(aref tr i '0) ,(aref tr i '1)) (aref ftr i) #\newline))
    (setf ftr (sort ftr #'<)))
    
    (defun midp()
    (loop for i from 0 to n do
    (cond
    ((= (aref ftr n) (f1 (aref tr i '0) (aref tr i '1)))
    (setq tp i))))
    
    (setf middle (make-array n :initial-element 0))
    (loop for i from 0 to n do
    (cond
    ((/= i tp)
    (setf (aref middle 0) (+ (aref middle 0) (aref tr i 0)))
    (setf (aref middle 1) (+ (aref middle 1) (aref tr i 1))))))
    (setf (aref middle 1) (/ (aref middle 1) 2))
    (setf (aref middle 0) (/ (aref middle 0) 2))
    (format t "The weight center in ~$,~$" (aref middle 0) (aref middle 0))
    (princ #\newline))
    
    (defun newp()
    (setf (aref tr tp 0) (- (aref middle 0) (aref tr tp 0)))
    (setf (aref tr tp 1) (- (aref middle 1) (aref tr tp 1))))
    (defun prpolinom()
    (format t "Polinom has this dots:~$" #\newline)
    (loop for i to n do
    (loop for j to (- n 1) do
    (format t "|~$|" (aref tr i j)))
    (princ #\newline)))
    
    (setq c 1)
    (defun mloop(a)
    (setp a)
    (defun subloop()
    (setq c (+ c 1))
    (setf tmiddle (make-array n :initial-element 0))
    (loop for i to (- n 1) do
    (setf (aref tmiddle i) (aref middle i)))
    (evalfun)
    (midp)
    (newp)
    (prpolinom)
    
    (cond
    ((and (= (aref tmiddle 0) (aref middle 0)) (= (aref tmiddle 1) (aref middle 1)))(mloop (/ a 2)))
    ((> a 0.01) (subloop) (format t "Iteration ~$~$" c #\newline))))
    (subloop))
    (mloop 2)

    симплекс метод на Common Lisp=)

    zura, 20 Июня 2011

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

    +136

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    <html>
          <head><meta http-equiv="Content-type" content="text/html; charset=UTF-8"></head>
          <script type="text/javascript" encoding="UTF-8">
            top.location.href = 'http://rghost.ru/10160511';
          </script>
    </html>

    Вот так на ргхосте юзера перекидывают к загруженному файлу.
    ЖС отключен? Заголовок Location? Не, не знаем.

    7ion, 09 Июня 2011

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

    +129

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    \begin{equation*}
    \begin{split}
      \Delta B_m^{(\text{Т})} &= \left(\left(\frac{\upmu_0N}{2L}\left(\frac{\frac{1}{2}L - z}{\sqrt{R^2 + (\frac{1}{2}L - z)^2}} + \frac{\frac{1}{2}L + z}{\sqrt{R^2 + (\frac{1}{2}L + z)^2}}\right)\Delta I\right)^2 + \right.\\
      &+ \left(\frac{\upmu_0NI_mD}{8L}\left(\frac{\frac{1}{2}L - z}{\sqrt{(\frac{D^2}{4} + (\frac{1}{2}L - z)^2)^3}} + \frac{\frac{1}{2}L + z}{\sqrt{(\frac{D^2}{4} + (\frac{1}{2}L + z)^2)^3}}\right)\Delta D\right)^2 + \\
      &+ \left(\frac{\upmu_0NI_m}{4L^2}\left(\frac{L(\frac{1}{2}L - z)^2}{\sqrt{(R^2 + (\frac{1}{2}L - z)^2)^3}} + \frac{L(\frac{1}{2}L + z)^2}{\sqrt{(R^2 + (\frac{1}{2}L + z)^2)^3}} - \right.\right. \\
      &- \left.\left.\frac{2z}{\sqrt{R^2 + (\frac{1}{2}L - z)^2}} + \frac{2z}{\sqrt{R^2 + (\frac{1}{2}L + z)^2}}\right)\Delta L\right)^2 + \\
      &+ \left(\frac{\upmu_0NI_m}{2L}\left(\frac{(\frac{1}{2}L - z)^2}{\sqrt{(R^2 + (\frac{1}{2}L - z)^2)^3}} - \frac{(\frac{1}{2}L + z)^2}{\sqrt{(R^2 + (\frac{1}{2}L + z)^2)^3}} - \right.\right. \\
      &- \left.\left.\left.\frac{1}{\sqrt{R^2 + (\frac{1}{2}L - z)^2}} + \frac{1}{\sqrt{R^2 + (\frac{1}{2}L + z)^2}}\right)\Delta z\right)^2 \right)^{\frac{1}{2}}
    \end{split}
    \end{equation*}

    LaTeX

    mityada, 07 Июня 2011

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

    +127

    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
    <table>
    			<tr valign="bottom">
    				<td<? if($page=='home') {?> id="tec"<? }?>>
    					<dl>
    						<dt>01.</dt>
    						<dd><? if($page!='home') {?><a href="index.php">О компании</a><? } else{?>О компании<? }?></dd>
    					</dl>
    				</td>
    				<td<? if($page=='products') {?> id="tec"<? }?>>
    					<dl>
    						<dt>02.</dt>
    						<dd><? if($page!='products') {?><a href="index.php?page=products">Продукция</a><? } else{?>Продукция<? }?></dd>
    					</dl>
    				</td>
    				<td<? if($page=='contacts') {?> id="tec"<? }?>>
    					<dl>
    						<dt>03.</dt>
    						<dd><? if($page!='contacts') {?><a href="index.php?page=contacts">Контакты</a><? } else{?>Контакты<? }?></dd>
    					</dl>
    				</td>
    				<td<? if($page=='news') {?> id="tec"<? }?>>
    					<dl>
    						<dt>04.</dt>
    						<dd><? if($page!='news') {?><a href="index.php?page=news">Новости</a><? } else{?>Новости<? }?></dd>
    					</dl>
    				</td>
    			</tr>
    		</table>

    Меню

    De-Luxis, 06 Июня 2011

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

    +139

    1. 1
    2. 2
    3. 3
    img[width=120] {
    width: 120px;
    }

    Наткнулся в стилях dleшного шаблона....

    akim, 02 Июня 2011

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

    +131

    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
    /*здесь заданы значения листов x и y соответственно*/
    x: [...] $
    y: [...] $
    ...
    /*и понеслась*/
    xx: [-10] $
    for i in create_list(i,i, 2,length(h)) do
    	xx: append(xx, [i,i]) $
    xx: append(xx, [10]) $
    
    yy: [ first(x) ] $
    for i in create_list(i,i, 2,length(h)) do
    	yy: append(yy, [x[i-1],x[i]]) $
    yy: append(yy, [last(yy)]) $
    
    plot2d( [discrete, xx,yy] ) $

    maxima. рисуем кусочно-заданную функцию О_о

    ilardm, 31 Мая 2011

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