1. C++ / Говнокод #8509

    +1000

    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
    int *element_iskomoi_posledovatelnosti;
     int tempNum = 1;
    element_iskomoi_posledovatelnosti = new int [maxim];
       
        int k=index_pervogo_elementa_posledovatelnosti;
        element_iskomoi_posledovatelnosti[0]=arr[k];
        printf(" element_iskomoi_posledovatelnosti[%i]=%i\n ",1, element_iskomoi_posledovatelnosti[0]);
     
        for (int j=index_pervogo_elementa_posledovatelnosti; j< n ; j++ )
        if (arr[k]<arr[j]) 
        {
           element_iskomoi_posledovatelnosti[tempNum]=arr[j];
           printf(" element_iskomoi_posledovatelnosti[%i]=%i\n ",tempNum+1, element_iskomoi_posledovatelnosti[tempNum++]);
           k=j;
         }
    }

    Crazy_penguin, 13 Ноября 2011

    Комментарии (70)
  2. C++ / Говнокод #8488

    +1003

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    /c/Qt/4.7.4/src/plugins/bearer/symbian/symbianengine.cpp:1336..1344
    
    // Waits for 2..6 seconds.
    void SymbianEngine::updateConfigurationsAfterRandomTime()
    {
        int iTimeToWait = qMax(1000, (qAbs(qrand()) % 68) * 100);
    #ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
        qDebug("QNCM waiting random time: %d ms", iTimeToWait);
    #endif
        QTimer::singleShot(iTimeToWait, this, SLOT(delayedConfigurationUpdate()));
    }

    68 будет в самый раз, да.

    overloop, 11 Ноября 2011

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

    +989

    1. 1
    char* mData=new char[MAX_STRING_LENGTH+1];

    Кто сможет перечислить все ошибки в этом говнокоде?

    Говногость, 11 Ноября 2011

    Комментарии (37)
  4. C++ / Говнокод #8477

    +1001

    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
    Matrix Matrix::inverse ()
    {
    	Matrix Temp;
    
    
    	Matrix A;
    
    	Matrix AL(4,4);
    
    	int c1,c2;
    
    
    
    	for (int i = 0; i < 5; i++)
    	for (int j = 0; j < 5; j++)
    	{
    		c1 = 0;
    
    		for (int k = 0; k < 5; k++)
    		{
    			if (k == i) continue;
    			c2 = 0;
    			for (int l = 0; l < 5; l++)
    			{
    				if (l == j) continue;
    				AL[c1][c2] = array[k][l];
    				c2++;
    			}
    			c1++;
    		}
    
    		A[i][j] = pow(-1,static_cast<double>(i + j + 2))*AL.determinant();
    	}
    	
    	for (int i = 0; i < 5; i++)
    	for (int j = 0; j < 5; j++)
    	{
    		Temp[i][j] = 1/determinant()*A[i][j];
    	}
    
    
    	return Temp;
    }

    цените, алгоритм обратной матрицы

    bartimeus33nt10, 11 Ноября 2011

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

    +168

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    8. 8
    9. 9
    QTime time;
    
    QString name =  (time.currentTime()).toString();
    
    for (int i = 2; i <= 5; i = i+3)
    {
    	name.remove(i,1);
    	name.insert(i,".");
    }

    вот так вот, ребятишки.

    bartimeus33nt10, 10 Ноября 2011

    Комментарии (9)
  6. C++ / Говнокод #8458

    +148

    1. 1
    http://dobrochan.ru/src/png/1009/тролфейс5.png

    i͞f̩̙͚̺̖͖͑͒̎͢ ̛̤̣͇͉̔ͅ(͟(͓̣rͪ̄͑̂̇͆ͣ͢e͙͓͍͒̀s̬̪̫̼̬̗̾̈͡ ͓̥̔ͪ=̺̭̄ͪ̂͟ ̞̥̳̤͉̂͊͗sͩͮ̏́̚eͦ̓ͯt̬̲̞̬̭̿̇̎̑́̚s̑ͬ͌͌ͨo̧̖͙ ͚̮͍̻͋ͧ̇c͓̝͈͙͉̞͒ͩ͋ͮ̚͞k̟̩͍̗̺͎̈̽͂̽̇ͦͦ͢ͅo͈̫͍ ̠̭̓ͣ̆ͩ̚p̴̻̰͇͇̀̃t̡́ͦ͊̎ͩ̊(̥̞̞̫̎̽̾̾ͫ.͈͎̤͉̲̙ ̠ͥ͒̐̃ͣ̑̀.̔.ͬͨͪ̽.̲̭̲͙̇)̧̫͙͇̜̜̩̘ͭ̈́̆̽̉ ̮̯̜͉̼̜̲ͬ͑̽̃ͭ̐=̳̥̗̰̘͚͝=̧̳̙ ̬̰̔ͨͨͧͯ-͘1̮̻̦̘͉̗͑)ͫ̒)͉̲̤̝ͣ̐ͩ̆͑

    AnimeGovno-_-, 08 Ноября 2011

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

    +147

    1. 1
    http://www.viva64.com/media/images/content/a/ReactOS_ru/image1.png

    Ḅ̩̝͓̆ͦͮ̅ͧ̏́ͅȌ̘̫ͯO̮̐̋ͪ̽̇ͯ̅L̸̜̯̩͗ ͔͕̦̗ͧͭ̕F̴̘͔̝̱̫̾ͫÄ̧̭̯͉̩̜̮͇́̍ͤS̮̦̰̺̗͈͆̄̄̓̚T̎̄͏̥̩͍̠̬͖ͅC̝̽̽̋ͅA̼̖̘̿ͧ̓͡L̝̝͚͚̬̓͌L̞͌
    ̿͊͆͏̫I̪̿ͮͦ͊ͮ̓̈͡n͖̱̾ͦ́͌tẸ͕̬̱̰̗̘̊͐̎ͨ̆̓ņͦ͐̽̄ͭ̆g̝͆G̬̝̲͙̼̞r̶͔̩̗̯̘̯͑ͤ͛͐̈a̫̥͇̠̗̪̔ͧ̾̾̎͜d̙̯̖͈̬ͤͤͭ͟i̢͇̥̰͔̙̺̿͛e̤̠͛̋ͭn̳͕̺͖ͨ̽̃ͬ͊̾t͖̰͓͎̼ͦ̓̑͂̚̚͜F̡̞̘̯̜i̪͕̪̲̝̬̫̋ͫ̔͌̒ͯ̿l̟͉̆l͔͔͙̗̖̄̒ͪ͑ͬ̍̍T̥͕̙̀r̮̜͓̽̉̎ͧ̈ͦͅȉ̢̹̲̝̤̫̳ͮ̆a̢̺̤͔̤ͬͮͪ̽̐̈̈n̫̄͝g̢͈̗̖ͦ̔̓ͯͫ͑̋l̡̟̬͚͍̐ͥ͐ͪ͗̽̏e͌ͫ̉͆ͪ̆͏(̳̺̪̯̎͑̓.̵̊̊ͪ͛̾ͩ̚.̔ͩ͝.̻̫̟̙ͣ̍͒͞)͍̻̠̯ͬ͛̄̕
    ̧̥̬̩̖̤ͯͪ̂̚{̲̻̪
    ͉ͬ͋͒̎͟ ̽͛ͤ̇͟ ͍̭̻̬̹̲̇̀̍ͫ̒͂͝.̲̬̳̦̀̄͐̔́̓.̬͓̭̊̏̅ͩ͊.͙͕̠̰͓̘
    ̸̤͉̬͓̲̠ͮ́ͯ̃͑ͥ ̲̥̝̞̝͓̂͐ ̑͋̾̿Ṣ̸͔̗̖̳̱͍̊̈͑̃W͔̳̰̫̿A͉̬͙͎͂̔̇ͫͨ̾́P͂ͯ(̂̓v̟̲̦̪̖̻̎͂́2͇̤̔,̧̺͎̞̞̈́̍v̘̟͕͚̘̞ͧ̒͊ͦ̚ͅ3̤̩̙̬̘̯̼,̣̰͕͑̂͌͆̉̍͢tͩ̏ͮ͋͌̆ͯ)̜̳̖̈́̎̏̏̎ͦ;̫̻̪̞̼̟̆͐̐ͨ̀̾̉
    ͛ ̹̮͓͎̑͆̌͂́ ̙̟̦̤.ͤ̎ͧ̀ͅ.̥̼̠̮͉̰̀.̧̥͙̻̲
    ̖̬̫̣̙̅̽̋̔ͤ̏̇}̵̬̞̻̜̮̟ͣ̄ͧͦ̊

    AnimeGovno-_-, 08 Ноября 2011

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

    +143

    1. 1
    2. 2
    3. 3
    4. 4
    5. 5
    6. 6
    7. 7
    #̧̟̖ͣͫ̀͂ͪ̈͐̓d͕̠͙̱̆ͫ͐͂ͦ͋ͪ͂́̚͟e̵̷̤̙̎ͤ̂ͦ̍f̛̦̙͖̣̞̠͓̻͓ͪ̏͞į̸̨̳͖ͮͦͥ͋n͈̝͓ͨ͑͐́ē̖͇̦̥̗̝̫ͩ̇ͥ̔̄ͩ́ ͔͎̰̫̖̬̜͎̄͛̀̓̕͜͞M̱̞͇̳̰̰͓̀̑͋̃ͦE͐̐̊͂̔ͪ̉͌͠͏̘̜̩M̥̩̼̯̘͒ͬ̍̉̕͠S͍̬̪ͦ̈́̐̀̄ͧ̋̓̂̀Ẻ̗̮͎̜̣͛͂͢T̷̤̤ͭ̋̃͜͞_͚̝̖̲̗̱͚̓̏̀B̅͒͆̉̏̚҉̩̱Z͐ͣ̎ͥ̓̄̄̋҉̨̙̤E̗̩͇̘͕̮̩͈͔̓̓̔R̮͖̱̥͉͖̪̅̇̂ͅO̴̗̗̺̓ͧ̏̈́͘(͈̟̱̞ͭ̏̐p̥̭̹̯̮͐͒̈́ͫ͊̀͐͋,̢̲̼ͯͣ̒̾͢l̵̦̗̬̳͔͎̞̒̿̈̃ͮͧ̍͢ͅ)̫̦̱̜̐͑ͪͫ̎͐ͧ̏ ̘̮̟͓̭̺ͤͫͧ̊͒͒ͨ́͟mͬ̓̄̑͏̰͍͓e̸̛̯̬͙̗̠̮ͩ̽ͫ̍̓ͤ͑̽͊́ͅm̛̩̖̯͉̱ͩ͑̀̋͡͡s̴̡̤̻͍̳͙͉ͤ͆͆ͫͤ̓̏͊ͅe̢͔̖̦͐̊̎́̚t̷̏͂͏͔̗̠͞(̪̼͈̮͇̤̓͊ͫͥͮ͡(͕̠̼̠͙̣ͯ̌ͤ̈́̇̌̚͡͞ͅp̨̙̩̼͈͊̀)͕͙͖̦̔̂̌̽ͪͨ̚̚͝ͅ,̢̤͓͙͈̝͙ͯ̋̅̓̋ͩ͋ ̩̈́̅̀̚͟͝ͅ0͔̦͖̣̜̎ͭ̈ͪ͑͒ͣ͟͞,̯̰̤͖̭̼͗̆ͧ̋͗̾ͥ͞͝ ̟̞̼͈̰̍̃̈́ͧ̿͊̒̽ͤͅ(̨͚̰̄͛́͆̉ͩͧ̉́͘l̐҉̘̥̼͉͔̤͎̘͟)̩̜̹̯͕̫̈̔ͩ̀͢)̴̘̗̰͖̘͉̈̉͑̇͛̂̐̚
    ̸͙̝͍̓̏̇̎̏ͣ̃̂
    ̨͇̭̅̽͆ͥ̕ç͇̫̼͓̩͓̘ͥͨ̌̄͠h͓̣̰̜̳̔̈ạ̫̝̝̥̟͐ͣ̎͆̔̏͗̾r͕̰̮͍̹͙ͫ̉̅͋͋ ͎̩̳͓̍ͣ̉͒͒̚͞*̿ͫͨ̅͏̞̮̥̣͚̩̟͘S̨̾̊͠҉͈̫H̹̫͍ͧ͑́̌̚A̷̭̤̹̼̞͚̯̫̳ͦ̾́ͭ̂ͭͣ̚̚3̶̱̮́̎̑̅ͪͭͫͭ̚8̸̙̺͖̺̹̝̠͆̃̎͗ͬ̈́͢ͅ4̴̝̼̗̳̦̠͛͊́̽̈̔_̗̳̺ͯͭ̏͂̿̀E̜͉̲̮͆͐͐̊̊ͯͮ̅͆͜n̒͗ͪ̇ͫ̌̈ͣ͆͏̢̠̥̰̙̭͍̺d͑ͬ̈́ͬ͆ͩ͏͏̮̻(̵̠̣̳̟̀̇̎́͒̉͋̿̀̕S̪͈̙͚͎͎̗͂̅ͥ̌ͥ̎ͦ͟͡͝H͍̪̲͎̮͇̩̺̓ͣ̀͗͑̈́͢Ą̺̮̓̃ͥ3̈́̃͐ͯ͂͝͏͚͍8͋̓̍̔̑̋҉̬̝̝̥̝4̢̛̙̗̤͔̓ͦ͊ͤ_̩̼̗̝̫͓͚̯̍̈ͬ̄̉̚C̶̨̲̟̦ͣͯ̒ͪ͡Ț̡͇̼̌͗̉̽͞X̡̤͕̆ͪͮ͜*̷̼ͤ͐ ̵̨͇̭̼̽͛̽͂̑c̴̱̦͙̊͑͂ͧ̑͊̀õ̢̠̬̮̌̏ņ̟̝̠̣̰̠̟̤͂ͩ̔ͭ̽̀͟͡t̳̮̘̭͓̠̲͋͑̇ͬ́͢͝e͚̱̙ͤͣͨ͋͊͞x̱̠̎̉̒͊t̅ͩ̽̎̾͆҉̟͇͕̰̯̖̳,̓ͦͬ͑̉͒ͪ̌́҉̵̦̠͇̹̭̳ ̴̡̫̟̼̩͓͉̅͛ͪ̽c̍ͪ̑̍͂ͨ͏̵͇̱̞̩̰͈̭̺̦͢h̝̣͈͈̘̟̜͚ͭͮͮͣ͂̑̒͜aͣ̏͌҉͏͚̜r̳̩͇͌ͨ̏̉ͬ͗͛͟͢ ̛̪͉̽̔ͦͤ͛͆̎ͭ͡b͔͕̪̳͚̤͎̏̿u͕̠̣͓̺̓̇̃ͬͦ̔͝f̷̦͑ͥ͞f̢͉̪̉̈̓͒ͫ̌̀̕ȩ̠̬̺̩͔ͮ̾͑ͫ͘ṟ̵̝̫̜̯̇͐ͤ̑ͥͪ̽͊̅͜͞[̵͎͕̻̲̰͕̓̐̅͑ͭ̚͢͟]̵̱̰͙͖͎̇̾̈̓ͤͦͭͅͅ)̛̗̞̘̉͌ͤ̔̚͠ ̢̗̜̔́ͫ̊ͩ̈́͠͝{̡͖̯̦̦͔̤ͣ͆̓
    ̶̡͚̰͚̦͖̟̳͙̻̑͒̈́͢ ̫̞̗̞͇̣̫̭̘̌̊͗̾̂͑͐̀̕͢ ̸͕̞̅ͩ.̡̡͓͆͠.̧̲͙̜̼̤̙̫̌̓ͭ́͌͜͜ͅ.̶̣̬̦̫̲̻̔͒̌͘͟
    ̸̺̊ͯ̿ͫ ̶̡̣̣͈̄͊̂̓͋̊͐̇̚ͅ ̷̲̞̹̳̮̞͓̗̉̑͝ͅM̨͍̥̃̆̇͋̈́́Ē͙̯͓͕̳̖͇͔̐̚͝M̨̛͓̦̰̩̏͂̉̃͂̂̇͂Ş̶̵̘̗̮̦̘ͯ͑̈ͫͮͫͬͧE̠͋̀̅́T̢͚̖͓̰̥͉̮͙ͧͬ͑_̨̝̼̣ͭͨ͊̇B̖̙̟̲͉̱̈́͊̑̿ͧẔ̴̊͂ͭ̈͆͊̆͗̒͘͝ͅĘ̛̘ͦ̋̃͂Rͮ̈ͯ̊͐̎͛̂̚̕҉̣͈Ọ̺̇ͥ͛̄ͮͤ(̣̭̰̟̫́̓͌̀̂ͬͬ̓͜͡c̵̪̜̱̭̫̯̣ͪ̃͂̆ͦ͑͑́͞o̶̺̪̬̭̲̟̟͛͟n͓̮͈̉̓͛͛ͯ͗͝t͚̙̝̩͈̣̮͂͌͋ͭ͋̒ͮȩ̧̭͍͓̘͛̅̈͜ẋ̡̛͔͖͙̦̼̾͂̃̈́͌t͑ͤͮ̑̏̋̿̆͡͏̯̝,̢̨̘̬͈̰̺ͬ̆̓̃ͅ ̢̛͈͙̘͎̏ͭ̆͜s͚̩̓̔̏̋͡i̷̫̻͔̮͍̲̩̜͈ͤ̀͒̊͊̂͠͠z̨͈͙͚͈̫̅ͭ͆ͤ͊͒͛́͝e̱̗̰̳͍͙̜̦ͮͭ͡͞͡ǫ̴̺͇͚̬͖̰ͪ̿̽ͣ̃̄f̌ͫ͊͋̃͌͏͏̪̰̳͔̥̜̳̝͞(̧̖̖͉̰̙̬ͬͨ́̊̾͝c͍̰̣̰̑̂̃ͮ͗̒̈́̍͜o͓̦̿͌͊ͬ͊̓̀̚̚͝n̵̩̑͆̉̑̔̚͞t̛̼̮̙͚͕͕̫ͩ͊͟e̿͊ͫ͌ͫͥ̐͢҉̜̜͉͚x̸̡̖͈͋̓ͭͭ̒t̵̲̣̩̘͚̓̿̎̈́̄ͬͅ)̟̩̬̣̮̲͌̃͘͢͝)ͣ́̽̚͝҉̙͍̼͙͇̰;̧̨̜͎͓̰̦̂̓̄́
    ͆̑̈́͢҉͎̬͔̻͓̱ ̼͈͇͕̬̱̌̋͐ͦͣ̃́̚̚̕̕ ̥̞͉̳̭̬͕̦̉̕̕.̶̻̤̊͗͊ͨ͡.̷̞̱̤̖̼̫̹̈̃͒ͬ̽̌́̓.̡̘̥ͤ̀͛́ͮ̎̿ͫ
    ͍̠̝̰̲̪̆̆̓͐ͣ̀̏̀}͛̍͒́̂̉̓͏̷͚̦̣̖̤̥̹̬

    AnimeGovno-_-, 08 Ноября 2011

    Комментарии (22)
  9. C++ / Говнокод #8433

    +147

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    class Object 
    { 
      #ifdef EDITOR_MODE 
      wchar[] name; 
      #endif
    
      UINT[] id;  // {21,64,567} 
    public: 
      UINT GetID(){return id[0];}; 
      UINT GetParentID(){return id[1];}; 
    };

    AnimeGovno-_-, 06 Ноября 2011

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

    +147

    1. 1
    mostr["гоблин"].adddialog(dialog);

    Гейдев, ну ты понел.

    AnimeGovno-_-, 06 Ноября 2011

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