1. Лучший говнокод

    В номинации:
    За время:
  2. Си / Говнокод #13180

    +139

    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
    #include <stdio.h>
    #include <stdint.h>
    
    #define foreach(a, b)\
    for(typeof(*(b)) * _shit_begin = (b), * _shit_end = ((_shit_begin) + sizeof((b))/sizeof(*(b))), * (a) = _shit_begin; (a) != _shit_end; ++(a))
      
    int main(void) {
    {
      uint32_t vec[6][3] = {
          {10, 11, 12},
          {20, 21, 22},
          {30, 31, 32},
          {40, 41, 42},
          {50, 51, 52},
          {60, 61, 62},
      };
      foreach(it, vec[2])
        fprintf(stderr, "%u\n", *it);
    }
    {
      uint32_t vec[] = {0, 1, 2, 3, 4, 5};
      foreach(it, vec)
        fprintf(stderr, "%u\n", *it);
    }
    {
      uint8_t vec[] = {0, 1, 2, 3, 4, 5};
      foreach(it, vec)
        fprintf(stderr, "%u\n", *it);
    }
    {
      uint64_t vec[] = {0, 1, 2, 3, 4, 5};
      foreach(it, vec)
        fprintf(stderr, "%lu\n", *it);
    }
      return 0;
    }

    Си++. Инновации, 21-йвек, 11-й год. auto и for(a:b). Прорыв, не то, что в этой питушарской сишке допотопной. А ведь это сишка могла 30лет назад.


    P.S. Не вброс.

    superhackkiller1997, 15 Июня 2013

    Комментарии (460)
  3. C# / Говнокод #13042

    +139

    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
    if (sLastChange.StartsWith("ERROR") && sLastChange != "ERROR_EXPOPR")
     {
       logClass.LogStd("========== DATABAZE RS WITH ELSE EXPOPR ERROR: " + sLastChange, MethodBase.GetCurrentMethod());
     }
     else
     {
       SqlCommand oCommand = oConToCom.CreateCommand();
       oCommand.CommandText = configClass.GetAppConfig(oXml, "ToDB_SqlSelectChangeDestinationAfter");
       string sDateLast = oCommand.ExecuteScalar().ToString();
    
       if (oConFrom.State != ConnectionState.Closed) { try { oConFrom.Close(); } catch { } }
        oConFrom.Open();
        oComDateFrom.CommandText = configClass.GetAppConfig(oXml, "ToDB_SqlSelectChangeSource");
        string sDateFrom = oComDateFrom.ExecuteScalar().ToString();
        if (oConFrom.State != ConnectionState.Closed) { try { oConFrom.Close(); } catch { } }
    
        if (sDateLast == sDateFrom)
        {
           logClass.LogStd("========== DATABAZE EXPOPR WITHOUT CHANGE", MethodBase.GetCurrentMethod());
        }

    устроился на новую работу, все вокруг с кучей сертификатов

    taburetka, 23 Мая 2013

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

    +139

    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
    в етом ИТТ треде мы выяснили что новомодные анальные игрушки для быдляков ПИСТОН и ХАЧКЕЛЬ
    сосут у олдфажных мега языков на все времена C-шки и perl-а все время
    
    лучий вариант на ПИСТОНЕ: http://ideone.com/udDJ9
    (императивный понос)
    2 варианта на ХАЧКЕЛЕ
    1.ебаный пиздец во всех смыслах и имеперативное гавнище: http://ideone.com/M42su
    (сосет у C-шки)
    2. деклашотивное петушение http://ideone.com/0e3qE
    (сосет у декларотивного петушения на perl)
    
    для сравнения
    perl: http://ideone.com/i0ob4 http://ideone.com/olq5B
    C: http://ideone.com/ap43H
    LUA: http://ideone.com/DVdhr http://ideone.com/Xkj4D
    
    http://ideone.com/6cZYq лисп как и ожидалось сонул, ну и возможно ответ неправильный
    (какието черезжопные варианты с 33 кратной вложеностю скобок быле побыстрее но натая хуйне никому не сдалась когда есть простое и самое быстрое решение на C-шке)

    Почему до сих пор не запостили?

    хуита, 18 Мая 2013

    Комментарии (11)
  5. C# / Говнокод #13001

    +139

    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
    class MainClass
        { 
            public static char[,] titato = new char[3, 3] { { ' ', ' ', ' ' }, { ' ', ' ', ' ' }, { ' ', ' ', ' ' } };
            static bool CheckWin(char s)
            {
                if ((titato[0, 0] == titato[1, 1] & titato[1, 1] == titato[2, 2] & titato[0, 0] != ' ') ||
                      (titato[0, 1] == titato[0, 2] & titato[0, 2] == titato[0, 0] & titato[0, 1] != ' ') ||
                       (titato[1, 1] == titato[1, 2] & titato[1, 2] == titato[1, 0] & titato[1, 1] != ' ') ||
                        (titato[2, 1] == titato[2, 2] & titato[2, 2] == titato[2, 0] & titato[2, 1] != ' ') ||
                         (titato[1, 0] == titato[2, 0] & titato[2, 0] == titato[0, 0] & titato[1, 0] != ' ') ||
                          (titato[1, 1] == titato[2, 1] & titato[2, 1] == titato[0, 1] & titato[1, 1] != ' ') ||
                           (titato[1, 2] == titato[2, 2] & titato[2, 2] == titato[0, 2] & titato[1, 2] != ' ') ||
                            (titato[2, 0] == titato[1, 1] & titato[1, 1] == titato[0, 2] & titato[2, 0] != ' '))
                {
                    return true;
                }
                return false;
            } 
            public static void PrintTicTacToe(char s)
            { 
                Console.Clear();            
                Console.Write(" ");            
                Console.BackgroundColor = ConsoleColor.White; 
                for (int i = 0; i < titato.GetLength(0); i++)            {
                     Console.Write(" {0} ", i); 
                } 
                Console.WriteLine(); 
                for (int i = 0; i < titato.GetLength(0); i++)            {
                     Console.BackgroundColor = ConsoleColor.White;
                     Console.Write("{0}", i);
                     for (int j = 0; j < titato.GetLength(1); j++)                { 
                        Console.BackgroundColor = ConsoleColor.Black;
                         if (titato[i, j] == 'x')                    {
                            Console.ForegroundColor = ConsoleColor.Red; 
                        }
                        else if (titato[i, j] == 'o')                    { 
                            Console.ForegroundColor = ConsoleColor.Green; 
                        } 
                        else                    { 
                            Console.ForegroundColor = ConsoleColor.Black;
                         }
                         Console.Write(" {0} ", titato[i, j]); 
                    } 
                    Console.WriteLine(); 
                } 
                Console.BackgroundColor = ConsoleColor.White; 
                Console.ForegroundColor = ConsoleColor.Black;
                if (CheckWin(s))            {
                    Console.WriteLine(s + " win!!!");                
                }            
            }
             public static void PushXO(int i, int j, char s)
            { 
                titato[i, j] = s; 
            }
             public static void Main(string[] args)
            { 
                bool symbolX = true; 
                char s = 'x'; 
                int i = 0, j = 0; 
                do            { 
                    Console.WriteLine("TIC TAC TOE!"); 
                    PrintTicTacToe(s); 
                    if (symbolX == true)                {                    
                        Console.WriteLine("Ходит Х");
                        Console.WriteLine("Введите номер столбца а затем введите номер строки:"); 
                        s = 'x'; 
                        symbolX = false;  
                    } 
                    else                { 
                        Console.WriteLine("Ходит О");
                        Console.WriteLine("Введите номер столбца а затем введите номер строки:");
                        s = 'o';                    
                        symbolX = true; 
                    } 
                     i = int.Parse(Console.ReadLine()); 
    
                    j = int.Parse(Console.ReadLine());
     
                    PushXO(j, i, s);
     
                    //   Console.ReadLine();
     
                    PrintTicTacToe(s);
     
     
                } while (true);
     
            }

    Крестики-нолики

    Psilon, 14 Мая 2013

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

    +139

    1. 001
    2. 002
    3. 003
    4. 004
    5. 005
    6. 006
    7. 007
    8. 008
    9. 009
    10. 010
    11. 011
    12. 012
    13. 013
    14. 014
    15. 015
    16. 016
    17. 017
    18. 018
    19. 019
    20. 020
    21. 021
    22. 022
    23. 023
    24. 024
    25. 025
    26. 026
    27. 027
    28. 028
    29. 029
    30. 030
    31. 031
    32. 032
    33. 033
    34. 034
    35. 035
    36. 036
    37. 037
    38. 038
    39. 039
    40. 040
    41. 041
    42. 042
    43. 043
    44. 044
    45. 045
    46. 046
    47. 047
    48. 048
    49. 049
    50. 050
    51. 051
    52. 052
    53. 053
    54. 054
    55. 055
    56. 056
    57. 057
    58. 058
    59. 059
    60. 060
    61. 061
    62. 062
    63. 063
    64. 064
    65. 065
    66. 066
    67. 067
    68. 068
    69. 069
    70. 070
    71. 071
    72. 072
    73. 073
    74. 074
    75. 075
    76. 076
    77. 077
    78. 078
    79. 079
    80. 080
    81. 081
    82. 082
    83. 083
    84. 084
    85. 085
    86. 086
    87. 087
    88. 088
    89. 089
    90. 090
    91. 091
    92. 092
    93. 093
    94. 094
    95. 095
    96. 096
    97. 097
    98. 098
    99. 099
    100. 100
    <?php
    if(!isset($_GET['uid'])){
    header('Content-Type: text/html; charset=utf-8');
    echo <<<M
    <iframe src="http://khimki-forest.ru/to_new_year.php?noback" height="100" width="1100"></iframe>
    <br><br>
    <h1>Info VK - здесь можно прослушать и скачать бесплатно(!)<br> любые аудиозаписи любого пользователя ВКонтакте!</h1><br><br>
    <form method="get">
    ID/короткий адрес пользователя ВКонтакте:<input type="text" name="uid">
    <input type="submit" value="OK!">
    </form>
    <br><br><h2>Автор системы: <a href="http://vk.com/i_am_angry_bird">Вадим ♦ЗЛАЯ ПТИЧКА♦ Андреев</a>.</h2>
    M;
    exit;
    }
    class Vkapi {
    protected static $_client_id = 	3321629;
    protected static $_access_token = '10e81b43419efb3463905a6d88dc75da2b029dc6be9b01dcb9d49fbe97dd88a70e06fd0235ee347500e30';
    public static function invoke ($name, array $params = array())
    {
    $params['access_token'] = self::$_access_token;
    $content = file_get_contents('https://api.vkontakte.ru/method/'.$name.'?'.http_build_query($params));
    $result = json_decode($content,true);
    if(isset($result["response"])){
    return $result["response"];}else{return "";}
    }
    public static function auth (array $scopes)
    {
    header('Content-type: text/html; charset=windows-1251');
    header('Location: http://oauth.vkontakte.ru/authorize?'.http_build_query(array(
    'client_id' => self::$_client_id,
    'scope' => implode(',', $scopes),
    'redirect_uri' => 'http://api.vkontakte.ru/blank.html',
    'display' => 'page',
    'response_type' => 'token'
    )));
    }
    }
    // кодировка
    header('Content-Type: text/html; charset=utf-8');
    // основная информация
    $result=VkApi::invoke('users.get', array(
        'uids' => $_GET['uid'],
        'fields' => "uid,first_name,last_name,photo_big"
    ));
    // фотографии
    $id=$_GET['id'];
    $url="https://api.vkontakte.ru/method/photos.getAll?owner_id=".$id."&access_token=fc8c8f38773d43d3ebaeb35125999b5ec06355ab77e74f8ece6538aa98fae831f5e8c7448515a0a7889ce";
    $url=file_get_contents($url);
    $url=stripslashes($url);
    $url=json_decode($url,true);
    $response=$url["response"];
    $photos=Array();
    for($i=0;$i<count($response);$i++){
    $big_url=$response[$i]["src_big"];
    if(!$big_url==""){$big_url="http://khimki-forest.ru/resize.php?url=".$big_url."&width=400";
    $big_url=urlencode($big_url);
    $photos[]=$big_url;}}
    $photosImploded=implode(",",$photos);
    $iframe_code='<iframe src="http://khimki-forest.ru/slideshow.php?images='.$photosImploded.'" width="1000" height="600"></iframe>';
    echo <<<PLAYER
    <iframe src="http://khimki-forest.ru/to_new_year.php?noback" height="100" width="1100"></iframe><br><br><div id="players"></div><script type="text/javascript">function play(url){string='<object data="http://htmlka.com/wp-content/uploads/2009/07/player2.swf" type="application/x-shockwave-flash" width=240 height=50><param value="http://htmlka.com/wp-content/uploads/2009/07/player2.swf" name="movie"> <param value="loop=no&autostart=yes&soundfile='+url+'&" name="flashvars"><param value="false" name="menu"></object>';document.getElementById("players").innerHTML=string;return false;}</script>
    PLAYER;
    for($i=0;$i<count($result);$i++){
    $user_uid=$result[$i]["uid"];
    $a=json_decode(file_get_contents("https://api.vkontakte.ru/method/status.get?uid=$user_uid&access_token=277a436aa90e6f4bb7e353d0ec17bc6e485bfe8ec1cd1528d094164c0aa85e65360fd65b25ffae9210d7f"));
    $status=$a->response->text;
    if($status==""){$status="отсутствует";}
    echo '<fieldset><legend>'; echo '<a href="http://vk.com/id'. $result[$i]["uid"] . '">' . $result[$i]["first_name"] . " " . $result[$i]["last_name"] . " (статус: $status)</a>";
    echo '</legend>';
    echo 'Аватар:<br><img src="' . $result[$i]["photo_big"] . '"><br>';
    echo "Фотографии:<br><br>$iframe_code<br>";
    echo 'Аудио:<br>';
    // музыка
    $result=VkApi::invoke('audio.get', array(
        'uid' => $result[$i]["uid"]
    ));
    if(!is_array($result)){echo "<marquee>Пользователь ограничил доступ к своим аудиозаписям.</marquee></fieldset> <br><br><h2>Автор системы: <a href='http://vk.com/i_am_angry_bird'>Вадим ♦ЗЛАЯ ПТИЧКА♦ Андреев</a>.</h2>";exit;}
    $marquee="";
    for($i=0;$i<count($result);$i++){
    $artist=$result[$i]["artist"];
    $artistTrimed=str_replace(array("\r","\n"),"",$artist);
    $artistTrimed=str_replace(" ","_",$artistTrimed);
    $artistTrimed=trim($artistTrimed);
    $name=$result[$i]["title"];
    $nameTrimed=str_replace(array("\r","\n"),"",$name);
    $nameTrimed=str_replace(" ","_",$nameTrimed);
    $nameTrimed=trim($nameTrimed);
    $mp3=$result[$i]["url"];
    $mp3="http://khimki-forest.ru/getMp3.php?url=".$mp3."&artist=".$artistTrimed."&title=".$nameTrimed;
    $i++;
    $count=$i;
    $i--;
    $mp3WithKavyshka='"'.$mp3.'"';
    $marquee=$marquee."    $count. <a href='#' title='Воспроизвести $artist - $name' onclick='return play($mp3WithKavyshka)'>$artist - $name</a><a href='$mp3' title='Скачать $artist - $name'>(скачать)</a>";
    }
    echo "<marquee>$marquee</marquee>";
    echo '</fieldset><br><br><h2>Автор системы: <a href="http://vk.com/i_am_angry_bird">Вадим ♦ЗЛАЯ ПТИЧКА♦ Андреев</a>.</h2>';
    }
    ?>

    Скачивание музыки с ВКонтакте

    angrybird, 11 Марта 2013

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

    +139

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    <?php
    function string_size($string){
    $temporary_file = md5(rand().rand()).".temporary";
    $a=fopen($temporary_file,"w+");
    fwrite($a,$string);
    $size = filesize($temporary_file);
    fclose($a);
    unset($temporary_file);
    return $size;
    }
    ?>

    Аналог функции filesize() для строк.

    angrybird, 11 Марта 2013

    Комментарии (16)
  8. C# / Говнокод #12667

    +139

    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
    for (int i = 0; i < 100; i++)
    {
        string s = i.ToString();
    
        if (s.Length == 1)
        {
            s = "00" + s;
        }
    
        if (s.Length == 2)
        {
            s = "0" + s;
        }
    
        Console.WriteLine(s);
    }

    Из рабочего проекта. Парень не слышал про string.Format("{0:000}", i)

    pewpew, 28 Февраля 2013

    Комментарии (15)
  9. Си / Говнокод #12540

    +139

    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
    long __stdcall wndproc(HWND wnd, unsigned int message, WPARAM wparam, LPARAM lparam)
    {
    	switch(message)
    	{
    	case WM_USER + 100:
    		{
    			char data[128];
    			fill_data(data);
    			PostMessage(wnd, WM_USER + 666,  0, (LPARAM)data);
    			return 0;
    		}
    	case WM_USER + 666:
    		{
    			char * data = (char *)lparam;
    			use_data(data);
    			return 0;
    		}
    //etc

    Wandering of the pointer или как выжить вне стека.

    Xom94ok, 05 Февраля 2013

    Комментарии (26)
  10. Си / Говнокод #12533

    +139

    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
    for( i=0; i<MAX_CHANNELS; i++ )
      {
        ht->ht_Voices[i].vc_Delta=1;
        ht->ht_Voices[i].vc_OverrideTranspose=1000;  // 1.5
        ht->ht_Voices[i].vc_SamplePos=ht->ht_Voices[i].vc_Track=ht->ht_Voices[i].vc_Transpose=ht->ht_Voices[i].vc_NextTrack = ht->ht_Voices[i].vc_NextTranspose = 0;
        ht->ht_Voices[i].vc_ADSRVolume=ht->ht_Voices[i].vc_InstrPeriod=ht->ht_Voices[i].vc_TrackPeriod=ht->ht_Voices[i].vc_VibratoPeriod=ht->ht_Voices[i].vc_NoteMaxVolume=ht->ht_Voices[i].vc_PerfSubVolume=ht->ht_Voices[i].vc_TrackMasterVolume=0;
        ht->ht_Voices[i].vc_NewWaveform=ht->ht_Voices[i].vc_Waveform=ht->ht_Voices[i].vc_PlantSquare=ht->ht_Voices[i].vc_PlantPeriod=ht->ht_Voices[i].vc_IgnoreSquare=0;
        ht->ht_Voices[i].vc_TrackOn=ht->ht_Voices[i].vc_FixedNote=ht->ht_Voices[i].vc_VolumeSlideUp=ht->ht_Voices[i].vc_VolumeSlideDown=ht->ht_Voices[i].vc_HardCut=ht->ht_Voices[i].vc_HardCutRelease=ht->ht_Voices[i].vc_HardCutReleaseF=0;
        ht->ht_Voices[i].vc_PeriodSlideSpeed=ht->ht_Voices[i].vc_PeriodSlidePeriod=ht->ht_Voices[i].vc_PeriodSlideLimit=ht->ht_Voices[i].vc_PeriodSlideOn=ht->ht_Voices[i].vc_PeriodSlideWithLimit=0;
        ht->ht_Voices[i].vc_PeriodPerfSlideSpeed=ht->ht_Voices[i].vc_PeriodPerfSlidePeriod=ht->ht_Voices[i].vc_PeriodPerfSlideOn=ht->ht_Voices[i].vc_VibratoDelay=ht->ht_Voices[i].vc_VibratoCurrent=ht->ht_Voices[i].vc_VibratoDepth=ht->ht_Voices[i].vc_VibratoSpeed=0;
        ht->ht_Voices[i].vc_SquareOn=ht->ht_Voices[i].vc_SquareInit=ht->ht_Voices[i].vc_SquareLowerLimit=ht->ht_Voices[i].vc_SquareUpperLimit=ht->ht_Voices[i].vc_SquarePos=ht->ht_Voices[i].vc_SquareSign=ht->ht_Voices[i].vc_SquareSlidingIn=ht->ht_Voices[i].vc_SquareReverse=0;
        ht->ht_Voices[i].vc_FilterOn=ht->ht_Voices[i].vc_FilterInit=ht->ht_Voices[i].vc_FilterLowerLimit=ht->ht_Voices[i].vc_FilterUpperLimit=ht->ht_Voices[i].vc_FilterPos=ht->ht_Voices[i].vc_FilterSign=ht->ht_Voices[i].vc_FilterSpeed=ht->ht_Voices[i].vc_FilterSlidingIn=ht->ht_Voices[i].vc_IgnoreFilter=0;
        ht->ht_Voices[i].vc_PerfCurrent=ht->ht_Voices[i].vc_PerfSpeed=ht->ht_Voices[i].vc_WaveLength=ht->ht_Voices[i].vc_NoteDelayOn=ht->ht_Voices[i].vc_NoteCutOn=0;
        ht->ht_Voices[i].vc_AudioPeriod=ht->ht_Voices[i].vc_AudioVolume=ht->ht_Voices[i].vc_VoiceVolume=ht->ht_Voices[i].vc_VoicePeriod=ht->ht_Voices[i].vc_VoiceNum=ht->ht_Voices[i].vc_WNRandom=0;
        ht->ht_Voices[i].vc_SquareWait=ht->ht_Voices[i].vc_FilterWait=ht->ht_Voices[i].vc_PerfWait=ht->ht_Voices[i].vc_NoteDelayWait=ht->ht_Voices[i].vc_NoteCutWait=0;
        ht->ht_Voices[i].vc_PerfList=0;
        ht->ht_Voices[i].vc_RingSamplePos=ht->ht_Voices[i].vc_RingDelta=ht->ht_Voices[i].vc_RingPlantPeriod=ht->ht_Voices[i].vc_RingAudioPeriod=ht->ht_Voices[i].vc_RingNewWaveform=ht->ht_Voices[i].vc_RingWaveform=ht->ht_Voices[i].vc_RingFixedPeriod=ht->ht_Voices[i].vc_RingBasePeriod=0;
    
        ht->ht_Voices[i].vc_RingMixSource = NULL;
        ht->ht_Voices[i].vc_RingAudioSource = NULL;
    
        memset(&ht->ht_Voices[i].vc_SquareTempBuffer,0,0x80);
        memset(&ht->ht_Voices[i].vc_ADSR,0,sizeof(struct hvl_envelope));
        memset(&ht->ht_Voices[i].vc_VoiceBuffer,0,0x281);
        memset(&ht->ht_Voices[i].vc_RingVoiceBuffer,0,0x281);
      }

    Щито оно делает?

    Govnocoder#0xFF, 03 Февраля 2013

    Комментарии (12)
  11. C# / Говнокод #12446

    +139

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    List<string> duplicities = new List<string>();
    
          foreach (var localItem in FileCollectionLocal)
          {
            foreach (var remoteItem in FileCollectionRemote)
            {
              if (localItem.FileName == remoteItem.FileName)
              {
                duplicities.Add(localItem.FileName);
              }
            }
          }

    taburetka, 18 Января 2013

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