1. C# / Говнокод #11793

    +139

    1. 1
    Assert.That(users.Count(), Is.EqualTo(Enumerable.Empty<User>().Count()));

    rk4n, 18 Сентября 2012

    Комментарии (5)
  2. Java / Говнокод #11792

    +120

    1. 1
    2. 2
    3. 3
    4. 4
    final TextField passwordField = UIFactory.createTextField(loginInfo, null);
    passwordField.setWidth(textFieldWidthPx);
    // Yes, they really want the password field to be shown openly.
    // Don't blame me, I'm just following orders!

    Безопасность такая безопасность.

    someone, 18 Сентября 2012

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

    +132

    1. 1
    2. 2
    3. 3
    <style Language="JavaScript">
    ...
    </style>

    WUT

    mr.The, 18 Сентября 2012

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

    +40

    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
    Function DateDiff ($interval,$date1,$date2)
    {
        // получает количество секунд между двумя датами 
        $timedifference = $date2 - $date1;
    
        switch ($interval) {
            case 'w':
                $retval = bcdiv($timedifference,604800);
                break;
            case 'd':
                $retval = bcdiv($timedifference,86400);
                break;
            case 'h':
                $retval =bcdiv($timedifference,3600);
                break
            case 'n':
                $retval = bcdiv($timedifference,60);
                break;
            case 's':
                $retval = $timedifference;
                break;
                
        }
        return $retval;
    
    }

    Не моё, где-то на просторах интернета обнаружил.

    varg242, 18 Сентября 2012

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

    +46

    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
    $confs = array();
    
    		$q = new WP_Query(array('post_type' => 'conference',
    					'posts_per_page' => -1,
    					'meta_key' => 'cd-conference-date-start',
    					'orderby' => 'meta_value_num',
    					'order' => 'DESC'
    					));
    
    		while($q->have_posts()): $q->the_post();
    		$confs[date("Y", get_post_meta($post->ID, 'cd-conference-date-start', true))][] = array('conf_title' => get_the_title(),
    												      'conf_date_start' => get_post_meta($post->ID, 'cd-conference-date-start', true),
    												      'conf_date_end' => get_post_meta($post->ID, 'cd-conference-date-end', true),
    												      'conf_link' => get_permalink(),
    												      'conf_city' => get_post_meta($post->ID, 'cd-conference-city', true),
    												      'conf_icon' => get_the_post_thumbnail()
    												      );
    		endwhile;
    
    		wp_reset_postdata();

    WordPress. Глубже, чем вы себе можете представить.

    varg242, 17 Сентября 2012

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

    +127

    1. 1
    override def text: String = super.text

    https://github.com/scala/scala/blob/master/src/library/scala/xml/Node.scala

    rat4, 17 Сентября 2012

    Комментарии (1)
  7. C++ / Говнокод #11786

    +19

    1. 1
    Lennart lennart=new Lennart;

    Надпись жёлтым цветом на гпавном меню minecraft.

    dos_, 17 Сентября 2012

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

    +57

    1. 1
    if( $data['id_Account'] =! $this->user->Account )

    somnambulism, 17 Сентября 2012

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

    +74

    1. 1
    2. 2
    //переворачиваем массив с ног на голову, отрезаем голову, чтоб осталось 10 элементов и ставим все что осталось на ноги
    $_lasts = array_reverse(array_splice(array_reverse($last_view), 5));

    "казнь" массива

    Mihard, 17 Сентября 2012

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

    +38

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    SkinDog* crateDog()
    {
      return reinterpret_cast<SkinDog*>( new Dog() );
    };
    void deleteDog( SkinDog* pDog)
    {
      delete reinterpret_cast<Dog*>( pDog );
    }
    
    EvilDog::bite() 
    {
      Dog* pDog = mutationDog();

    Не удержался, чтоб не запостить. Сами знаете откуда.

    LispGovno, 17 Сентября 2012

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