1. Pascal / Говнокод #23100

    0

    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
    function IsExecutablePacked(FileName: WideString): Boolean;
    var
    i: Cardinal;
    CompressionRatio: Double;
    Count: Cardinal;
    MathX: array [0 .. 255] of Integer;
    FileStream: TFileStream;
    Buffer: PAnsiChar;
    FileHandle: THandle;
    begin
    Result := False;
    try
    FileHandle := 0;
    FileHandle := CreateFileW(PWideChar(FileName), GENERIC_READ, FILE_SHARE_READ or FILE_SHARE_DELETE, nil, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
    if (FileHandle <> 0) and FileExists(FileName) then
    begin
    try
    FileStream := TFileStream.Create(FileHandle);
    Count := FileStream.Seek(0, soFromEnd);
    try
    GetMem(Buffer, Count);
    FileStream.Seek(0, soFromBeginning);
    FileStream.Read(Buffer^, Count);
    CompressionRatio := 0;
    FillChar(MathX, Sizeof(MathX), 0);
    for i := 0 to Count - 1 do
    Inc(MathX[Windows.PByte(DWORD(Buffer) + (i))^]);
    for i := 0 to 255 do
    if MathX > 0 then
    CompressionRatio := CompressionRatio - Log2(MathX / Count) * MathX;
    finally
    FreeMem(Buffer, Count);
    end;
    CompressionRatio := (Count * 8) / CompressionRatio;
    CompressionRatio := 100 / CompressionRatio;
    if CompressionRatio > 97 then
    Result := True;
    finally
    FileStream.Free;
    end;
    end;
    finally
    end;
    end;

    "Ис Эксекутабле Пуцкед" - форматирование сохранено.

    antipattern, 04 Июня 2017

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

    0

    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
    /* Стили для вспалывающих окон */
    	#back_call,#back_call1,#letter_us,#letter_us_2{display:none;position:fixed;top:0;bottom:0;left:0;right:0;width:100%;height:100%;background:url('../images/pop_up_bg.jpg') center center no-repeat;background-size:cover;overflow:auto;z-index:11500}
    		#bcc_table,#bcc_table1, #bcc_table-cell,#bcc_table-cell, #lu_table, #lu_table-cell,#lu_table_2, #lu_table-cell_2{width:100%;min-height:100%}
    		#bcc_table,#bcc_table1,#lu_table,#lu_table_2{display:table}
    			#bcc_table-cell,#bcc_table-cell1,#lu_table-cell,#lu_table-cell_2{display:table-cell;vertical-align:middle;text-align:center}
    				#bcc_registration-form,#bcc_registration-form1,#lu_registration-form,#lu_registration-form_2{display:inline-block;width:1000px;min-height:637px;padding:30px}
    				#bcc_registration-form>div,#bcc_registration-form1>div,#lu_registration-form>div,#lu_registration-form_2>div{position:relative}
    .bcc_wrapper h1,.lu_wrapper h1,.lu_wrapper h1{color:#84c8eb;margin-bottom:45px;font-family:'Yeseva One';text-transform:uppercase;font-size:31px;line-height:32px;letter-spacing:2px;margin-top:9px;text-align:center;margin-right:93px}
    				.bcc_wrapper .bc_close_link,.lu_wrapper .lu_close_link,.lu_wrapper .lu_close_link{display:inline-block;position:absolute;top:5px;right:0;width:40px;height:40px;text-indent:-9999px;background:url('../images/close_link_bg.jpg') center center no-repeat}
    					.bcc_wrapper .bc_close_link:hover,.lu_wrapper .lu_close_link:hover,.lu_wrapper .lu_close_link:hover{box-shadow:0 0 50px rgba(132, 200, 235,0.3), 0 0 50px rgba(132, 200, 235,0.3), 0 0 50px rgba(132, 200, 235,0.3)}
    					.div_bc_form_wrapper,.div_lu_form_wrapper,.div_lu_form_wrapper{margin-right:152px}
    						#mcf7_inp_wrapp_cb .wpcf7-response-output,#mcf7_inp_wrapp_lu .wpcf7-response-output,#mcf7_inp_wrapp_lu_2 .wpcf7-response-output{color:#fff;text-align:center;font-family:'gotham_light';font-size:15px;line-height:31px;word-spacing:1px;margin-bottom:15px}
    							.bcc_wrapper #mcf7_inp_wrapp_cb p,.lu_wrapper #mcf7_inp_wrapp_lu p,.lu_wrapper #mcf7_inp_wrapp_lu_2 p{height:51px;margin-bottom:55px;text-align:justify}
    							.bcc_wrapper #mcf7_inp_wrapp_cb p{margin:0}
    								.bcc_wrapper #mcf7_inp_wrapp_cb p span.lu_wrapper #mcf7_inp_wrapp_lu p span,.lu_wrapper #mcf7_inp_wrapp_lu_2 p span{display:inline-block}
    								.bcc_wrapper #mcf7_inp_wrapp_cb p span:nth-child(1),.lu_wrapper #mcf7_inp_wrapp_lu p span:nth-child(1),.lu_wrapper #mcf7_inp_wrapp_lu_2 p span:nth-child(1){float:left;margin-right:15px}
    								.bcc_wrapper #mcf7_inp_wrapp_cb p span:nth-child(2),.lu_wrapper #mcf7_inp_wrapp_lu p span:nth-child(2),.lu_wrapper #mcf7_inp_wrapp_lu_2 p span:nth-child(2){float:left}
    								.bcc_wrapper #mcf7_inp_wrapp_cb p span:nth-child(3),.lu_wrapper #mcf7_inp_wrapp_lu p span:nth-child(3),.lu_wrapper #mcf7_inp_wrapp_lu_2 p span:nth-child(3){float:right}
    								.bcc_wrapper #mcf7_inp_wrapp_cb p span input,.lu_wrapper #mcf7_inp_wrapp_lu p span input,.lu_wrapper #mcf7_inp_wrapp_lu_2 p span input{display:inline-block;box-sizing:border-box;border:1px solid #fff;background-color:transparent;height:50px;border-radius:5px;font-size:18px;line-height:19px;letter-spacing:1px;color:#fff;font-family:'gotham_light';padding:0 19px}
    								.bcc_wrapper #mcf7_inp_wrapp_cb p span input+span,#bcc-form .screen-reader-response,.lu_wrapper #mcf7_inp_wrapp_lu p span input+span,.lu_wrapper #mcf7_inp_wrapp_lu_2 p span input+span,#lu-form .screen-reader-response,#letter_us_2 .screen-reader-response{display:none}
    								.bcc_wrapper #mcf7_inp_wrapp_cb p span:nth-child(1) input,.bcc_wrapper #mcf7_inp_wrapp_cb p span:nth-child(2) input,.lu_wrapper #mcf7_inp_wrapp_lu p span:nth-child(1) input,.lu_wrapper #mcf7_inp_wrapp_lu_2 p span:nth-child(1) input,.lu_wrapper #mcf7_inp_wrapp_lu p span:nth-child(2) input,.lu_wrapper #mcf7_inp_wrapp_lu_2 p span:nth-child(2) input{width:266px}
    								.bcc_wrapper #mcf7_inp_wrapp_cb p span:nth-child(3) input,.lu_wrapper #mcf7_inp_wrapp_lu p span:nth-child(3) input,.lu_wrapper #mcf7_inp_wrapp_lu_2 p span:nth-child(3) input{width:288px}
    								.bcc_wrapper #mcf7_sbm_wrapp,.lu_wrapper #mcf7_sbm_wrapp_lu,.lu_wrapper #mcf7_sbm_wrapp_lu_2{text-align:center}
    									.bcc_wrapper #mcf7_sbm_wrapp img{float:right}
    									.bcc_wrapper #mcf7_sbm_wrapp{margin-top: 83px;}
    									.lu_wrapper #mcf7_sbm_wrapp_lu img,.lu_wrapper #mcf7_sbm_wrapp_lu_2 img{float:right;margin-top:107px}
    									.bcc_wrapper #mcf7_sbm_wrapp input,.lu_wrapper #mcf7_sbm_wrapp_lu input,.lu_wrapper #mcf7_sbm_wrapp_lu_2 input{display:inline-block;background-color:transparent;border:1px solid #fff;width:370px;height:80px;cursor:pointer;text-align:center;margin-top:107px;text-transform:uppercase;font-size:19px;line-height:19px;letter-spacing:5px;color:#fff;font-family:'gotham_light';word-spacing:2px}
    									.bcc_wrapper #mcf7_sbm_wrapp input{margin:0}
    									.bcc_wrapper #mcf7_sbm_wrapp input:hover,.lu_wrapper #mcf7_sbm_wrapp_lu input:hover,.lu_wrapper #mcf7_sbm_wrapp_lu_2 input:hover{text-shadow:0 0 15px rgba(132, 200, 235, 0.7), 0 0 15px rgba(132, 200, 235, 0.7), 0 0 15px rgba(132, 200, 235, 0.7)}
    								#required_fields_1,#required_fields_3,#required_fields_4,#required_fields_5,#required_fields_6,#required_fields_7{color:#fff;font-family:gotham_light;font-size:15px;line-height:31px;word-spacing:1px;text-align:center}
    						#lu_registration-form #mcf7_ta_wrapp_lu span,#lu_registration-form_2 #mcf7_ta_wrapp_lu_2 span{display:block;height:256px;box-sizing:border-box;padding:16px 17px;border:1px solid #fff;border-radius:5px;}
    						#lu_registration-form #mcf7_ta_wrapp_lu span textarea,#lu_registration-form_2 #mcf7_ta_wrapp_lu_2 span textarea{background-color:transparent;width:100%;height:100%;font-size:18px;line-height:19px;letter-spacing:1px;color:#fff;font-family:'gotham_light'}

    Выполняю заказы. На Битрих.

    nazivin, 02 Июня 2017

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

    0

    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
    body{
    	background: gray;
    	text-align: center;
    }
    #serials{
    	text-align: center;
    }
    #search{
    	font-weight: bold;
    	border-radius: 0px 20px 20px 0px;
    }
    #search:hover{
    	color: white;
    }	
    input{
    	border-radius: 20px 0px 0px 20px;
    	text-align: center;
    }
    input, #search{
    	border: grey;
    	background: #9e9e9e !important;
    	font-size: 20px;
    	padding: 10px 20px 10px 10px;
    	outline: none;
    	color: white;
    }

    tiarait, 02 Июня 2017

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

    0

    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
    function try_to_date(p_value in varchar2)
    return date
    is
      l_date date;                  
      
      l_fmt sys.odcivarchar2list := sys.odcivarchar2list('DD.MM.YYYY', 'YYYY/MM/DD', 'YYYY.MM.DD', 'dd.mm.yyyy', 'yyyy/mm/dd', 'yyyy.mm.dd');
    begin
    
      for i in 1..l_fmt.count loop  
        begin
          l_date := to_date(p_value, l_fmt(i));    
          return l_date;
        exception
        when OTHERS then null;    
        end;
      end loop;
      
      return null;  
      
    end;

    n1919, 02 Июня 2017

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

    0

    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
    <div>
        <div class="advantages-box">
        <div class="container">
            <div class="row">
                <h2>Наши преимущества</h2>
                <div class="col-xs-6 col-md-3 col-sm-3 advantage-item">
                    <div class="img-box">
    				<i class="fa fa-truck" aria-hidden="true"></i>
                       </div>
                    <p>Бесплатный выезд специалиста</p>
                </div>
                <div class="col-xs-6 col-md-3 col-sm-3 advantage-item">
                    <div class="img-box">
                         <i class="fa fa-rocket" aria-hidden="true"></i>
                    </div>
                    <p>Современный дизайн</p>
                </div>
                <div class="col-xs-6 col-md-3 col-sm-3 advantage-item">
                    <div class="img-box">
                        <i class="fa fa-rub" aria-hidden="true"></i>
                    </div>
                    <p>Доступная стоимость</p>
                </div>
                <div class="col-xs-6 col-md-3 col-sm-3advantage-item">
                    <div class="img-box">
                        <i class="fa fa-cubes" aria-hidden="true"></i>
                    </div>
                    <p>Услуги по монтажу камня</p>
                </div>
    			<div class="col-xs-6 col-md-4 col-sm-4 advantage-item">
                    <div class="img-box">
                         <i class="fa fa-thumbs-up" aria-hidden="true"></i>
                    </div>
                    <p>Гарантия качества</p>
    				</div>
    			<div class="col-xs-6 col-md-4 col-sm-4 advantage-item">
                    <div class="img-box">
                         <i class="fa fa-area-chart" aria-hidden="true"></i>
                    </div>
                    <p>Гибкая система скидок</p>
    				</div>
    			<div class="col-xs-6 col-md-4 col-sm-4  advantage-item">
                    <div class="img-box">
                         <i class="fa fa-universal-access" aria-hidden="true"></i>
                    </div>
                    <p>Индивидуальное изготовление
    камня по Вашим эскизам         
    </p>
    		
            </div>
        </div>
    </div></div>

    snegoviktlt, 01 Июня 2017

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

    0

    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
    <div class="advantages-box">
          <div class="container">
             <div class="row">
                <h2>Наши услуги</h2>
                <div class="col-md-3 col-sm-6 col-md-offset-2 advantage-item">
                   <div class="img-box">
                      <p><a href="http://sergio-pietra.ru/delivery.html"><img alt="" src="http://sergio-pietra.ru/image/catalog/SERGIO/bistrayadostavka1.png"</p>
                      <p>Доставка камня</p>
    			  </div>
               
                </div>
                <div class="col-md-3 col-sm-6 advantage-item">
                   <div class="img-box">
                      <p><a href="http://sergio-pietra.ru/podgotovitelnie-raboty.html"><img alt="" src="http://sergio-pietra.ru/image/catalog/SERGIO/pogotovka.png"</p>
                   <p>Подготовительные работы</p>
    			  </div>
                  
                </div>
                <div class="col-md-3 col-sm-6 advantage-item">
                   <div class="img-box">
                      <p><a href="http://sergio-pietra.ru/ukladka-dekorativnogo-kamnya.html"><img alt="" src="http://sergio-pietra.ru/image/catalog/SERGIO/usluga.png"</p>
                      <p>Услуги монтажа</p>
    			   </div>
                
                </div>
             </div>
          </div>
       </div>

    snegoviktlt, 01 Июня 2017

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

    +2

    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
    /**
         * Установка условий проверки корректности дат на начальную дату
         * */
        setConditionOne(date1, date2) {
            if ( (date1[2] > date2[2]) && (date1[1] >= date2[1]) && (date1[0] < date2[0]) )
                return false;
            else if ( (date1[2] > date2[2]) && (date1[1] >= date2[1]) && (date1[0] >= date2[0]) )
                return true;
            else if ( (date1[2] == date2[2]) && (date1[1] > date2[1]) && (date1[0] == date2[0]) )
                return true;
            else if ( (date1[2] > date2[2]) && (date1[1] > date2[1]) )
                return true;
            else if (date1[2] > date2[2] && (date1[1] > date2[1]) && (date1[0] > date2[0]) )
                return true;
            else if ( (date1[2] < date2[2] ) && (date1[1] > date2[1]) && (date1[0] < date2[0]))
                return false;
            else if ( (date1[2] <= date2[2] ) && ( date1[1] > date2[1]) && (date1[0] <= date2[0]) )
                return true;
            else if ( (date1[2] > date2[2] ) && ( date1[1] >= date2[1]) && (date1[0] < date2[0]) )
                return false;
            else if ( (date1[0] > date2[0]) )
                return true;
            else if ( (date1[2] == date2[2] ) && ( date1[1] > date2[1]) && (date1[0] == date2[0]) )
                return true;
            else if ( (date1[2] > date2[2] ) && ( date1[1] > date2[1]) && (date1[0] == date2[0]) )
                return true;
            else if ( (date1[2] > date2[2] ) && ( date1[1] == date2[1]) && (date1[0] == date2[0]) )
                return true;
            else
                return false;
        }
    
       /**
         * Установка условий проверки корректности дат на конечную дату
         * */
        setConditionTwo(date1, date2) {
            if ( (date1[2] > date2[2]) && (date1[1] >= date2[1]) && (date1[0] < date2[0]) )
                return false;
            else if ( (date1[2] > date2[2]) && (date1[1] >= date2[1]) && (date1[0] >= date2[0]) )
                return true;
            else if ( (date1[2] == date2[2]) && (date1[1] > date2[1]) && (date1[0] >= date2[0]) )
                return true;
            else if ( (date1[2] > date2[2]) && (date1[1] > date2[1]) )
                return true;
            else if ( date1[2] > date2[2] && (date1[1] > date2[1]) && (date1[0] > date2[0]) )
                return true;
            else if ( (date1[2] < date2[2] ) && (date1[1] > date2[1]) && (date1[0] < date2[0]) )
                return false;
            else if ( (date1[2] > date2[2] ) && ( date1[1] >= date2[1]) && (date1[0] < date2[0]) )
                return false;
            else if ( (date1[2] <= date2[2] ) && ( date1[1] > date2[1]) && (date1[0] <= date2[0]) )
                return true;
            else if ( (date1[0] > date2[0]) )
                return true;
            else if ( (date1[2] > date2[2] ) && ( date1[1] > date2[1]) && (date1[0] == date2[0]) )
                return true;
            else
                return false;
        }

    Сравнение двух дат.

    kliment1986, 01 Июня 2017

    Комментарии (0)
  8. Python / Говнокод #23092

    −2

    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
    from threading import Thread 
    from time import sleep
    
    for i in range(4):
        print(type(i))
        def f(i):
            if int(i) == 1:
                print('i=',i)
            
            elif i == 2:
                print('i=',i)
            
            elif i == 3:
                print('i=', i)
            
        t = Thread(target=f, args=(i,))
        t.start()
        sleep(1)
        print(i)

    dmitriiweb, 01 Июня 2017

    Комментарии (3)
  9. SQL / Говнокод #23091

    −1

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    cTemp := trim(to_char(xxx.VALUE, '999999.90'));
    if substr(cTemp, 1, 1) = '.' then
      sText := '0'||cTemp;
    else
      sText := cTemp;
    end if;

    PL/SQL, я блять выучил маски!

    ColvirBydlokod, 31 Мая 2017

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

    −1

    1. 1
    2. 2
    3. 3
    if (typeof $el.html() !== "undefined") {
        //...
    }

    Проверка на существование элемента...

    vasya, 31 Мая 2017

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