- 1
- 2
- 3
- 4
- 5
// This is an example of an exported function.
SCCONNECT_API int fnSCConnect(void)
{
return 42;
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+11
// This is an example of an exported function.
SCCONNECT_API int fnSCConnect(void)
{
return 42;
}
Не говно, но не мог промолчать!
Вот такой шаблон функции генерирует MSVC при создании DLL.
MSVC даёт ответ на самый главный вопрос жизни, вселенной и всего такого!
0
Вот это да! Идеально, Вы можете отправлять
Результат :
10/10
Официальный тред операции «Говно на вентилятор»
Запилил почту, теперь надо:
1) Придумать тему и текст (https://i.imgur.com/2zNp5ke.jpg);
2) Организовать ПО для рассылки;
3) Запустить и разослать;
4) ?????
5) Говно!
0
add bp, 4 ; 83C504
lea bp, [bp + 4] ; 8D6E04
А они ещё говорят, что первого байта для всех КОПов не хватает, и ввели дополнительный.
+71
public static int activeThreadsCount(List<Thread> threadList)
{
int i = 0;
for (Thread thread : threadList)
{
i += thread.isAlive() ? 1 : 0;
}
return i;
}
+34
#include "xsmell.hpp"
#include <iostream>
TAG(html, NO_ATTRIBS);
TAG(head, NO_ATTRIBS);
TAG(title, NO_ATTRIBS);
TAG(body, NO_ATTRIBS);
TAG(p, NO_ATTRIBS);
TAG(a, ATTRIB(href));
TAG(img, ATTRIB(src), ATTRIB(alt));
int main()
{
using namespace xsmell;
document doc =
_
<html>_
<head>_
<title>"XSMELL demo"<!title>_
<!head>_
<body>_
<p>"Yesssssssssssssssss!"<!p>_
<img .src("chucknorris.png") .alt("sneezing eyes open")>_ <!img>_
<!body>_
<!html>
_;
std::cout << doc << '\n';
return 0;
}
C++ умеет HTML не хуже этих ваших похапешечек ;)
https://bitbucket.org/edd/xsmell/src
+107.5
/// <summary>
/// Check if this char is digit
/// </summary>
/// <param name="symbol">Some char</param>
/// <returns>True if is digit</returns>
private static bool IsDigit(char symbol)
{
List<char> digits = new List<char>();
digits.Add('0');
digits.Add('1');
digits.Add('2');
digits.Add('3');
digits.Add('4');
digits.Add('5');
digits.Add('6');
digits.Add('7');
digits.Add('8');
digits.Add('9');
return digits.Contains(symbol);
}
так сказать код от велосипедиста, сделал свой IsDigit() хотя уже есть char.IsDigit()
0
IT Оффтоп #235
#205: https://govnokod.ru/28986 https://govnokod.xyz/_28986
#206: https://govnokod.ru/28991 https://govnokod.xyz/_28991
#207: https://govnokod.ru/29002 https://govnokod.xyz/_29002
#208: https://govnokod.ru/29060 https://govnokod.xyz/_29060
#209: https://govnokod.ru/29070 https://govnokod.xyz/_29070
#210: https://govnokod.ru/29079 https://govnokod.xyz/_29079
#211: https://govnokod.ru/29092 https://govnokod.xyz/_29092
#212: https://govnokod.ru/29093 https://govnokod.xyz/_29093
#213: https://govnokod.ru/29104 https://govnokod.xyz/_29104
#214: https://govnokod.ru/29114 https://govnokod.xyz/_29114
#215: https://govnokod.ru/29125 https://govnokod.xyz/_29125
#216: https://govnokod.ru/29132 https://govnokod.xyz/_29132
#217: https://govnokod.ru/29147 https://govnokod.xyz/_29147
#218: https://govnokod.ru/29156 https://govnokod.xyz/_29156
#219: https://govnokod.ru/29166 https://govnokod.xyz/_29166
#220: https://govnokod.ru/29181 https://govnokod.xyz/_29181
#221: https://govnokod.ru/29185 https://govnokod.xyz/_29185
#222: https://govnokod.ru/29190 https://govnokod.xyz/_29190
#223: https://govnokod.ru/29203 https://govnokod.xyz/_29203
#224: https://govnokod.ru/29211 https://govnokod.xyz/_29211
#225: https://govnokod.ru/29212 https://govnokod.xyz/_29212
#226: https://govnokod.ru/29218 https://govnokod.xyz/_29218
#227: https://govnokod.ru/29220 https://govnokod.xyz/_29220
#228: https://govnokod.ru/29230 https://govnokod.xyz/_29230
#229: https://govnokod.ru/29235 https://govnokod.xyz/_29235
#230: https://govnokod.ru/29241 https://govnokod.xyz/_29241
#231: https://govnokod.ru/29246 https://govnokod.xyz/_29246
#232: https://govnokod.ru/29249 https://govnokod.xyz/_29249
#233: https://govnokod.ru/29253 https://govnokod.xyz/_29253
#234: https://govnokod.ru/29259 https://govnokod.xyz/_29259
+139
...
// GRAY SCALE:
#define ER_COLOR_BLACK_DEEP3 ccc3(0, 0, 0)
#define ER_COLOR_BLACK_DEEP4 ccc4(0, 0, 0, 255)
#define ER_COLOR_BLACK3 ccc3(38, 38, 38)
#define ER_COLOR_BLACK4 ccc4(38, 38, 38, 255)
#define ER_COLOR_SIDEMENU_SELECTED3 ccc3(47, 47, 47)
#define ER_COLOR_LETTER_VIEW3 ccc3(51, 51, 51)
#define ER_COLOR_SIDEBAR_BG3 ccc3(58, 58, 58)
#define ER_COLOR_SIDEBAR_BG4 ccc4(58, 58, 58, 255)
#define ER_COLOR_BAR_BG_GRAY3 ccc3(82, 82, 82)
#define ER_COLOR_AUTHOR_NAME3 ccc3(103, 103, 103)
#define ER_COLOR_SIDE_WIDGET3 ccc3(255, 255, 255)
#define ER_COLOR_SIDE_WIDGET4 ccc4(255, 255, 255, 255)
#define ER_COLOR_GRAY_TUT3 ccc3(115, 115, 115)
#define ER_COLOR_GRAY3 ccc3(130, 130, 130)
#define ER_COLOR_PULL_LABEL3 ccc3(142, 142, 142)
#define ER_COLOR_SEND_BG4 ccc4(158, 158, 158, 255)
#define ER_COLOR_SEND_BG3 ccc3(158, 158, 158)
#define ER_COLOR_BADGE_GRAY3 ccc3(149, 149, 149)
#define ER_COLOR_BADGE_GRAY4 ccc4(149, 149, 149, 255)
#define ER_COLOR_SEPARATOR3 ccc3(195, 195, 195)
#define ER_COLOR_LABELS_GRAY3 ccc3(170, 170, 170)
#define ER_COLOR_AUTHOR_CAPTION3 ccc3(173, 173, 173)
#define ER_COLOR_SAFE_EXIT_BG4 ccc4(189, 189, 189, 255)
#define ER_COLOR_SAFE_EXIT_BG3 ccc3(189, 189, 189)
#define ER_COLOR_MENU_GRAY_ONE3 ccc3(204, 204, 204)
#define ER_COLOR_PUSHED_ELEMENT3 ccc3(205, 205, 205)
#define ER_COLOR_GRAY_208_3 ccc3(208, 208, 208)
#define ER_COLOR_GRAY_208_4 ccc4(208, 208, 208, 255)
#define ER_COLOR_MENU_GRAY_TWO3 ccc3(216, 216, 216)
#define ER_COLOR_NEW_GAME_BACK3 ccc3(216, 216, 216)
#define ER_COLOR_NEW_GAME_BACK4 ccc4(216, 216, 216, 255)
#define ER_COLOR_WHITE_222_3 ccc3(222, 222, 222)
#define ER_COLOR_WHITE_232_3 ccc3(232, 232, 232)
#define ER_COLOR_WHITE_MY_PLATE3 ccc3(243, 243, 243)
#define ER_COLOR_WHITE_INTRO4 ccc4(232, 232, 232, 255)
#define ER_COLOR_WHITE3 ccc3(255, 255, 255)
#define ER_COLOR_WHITE4 ccc4(255, 255, 255, 255)
50 оттенков серого в нашем приложении.
0
Тестовый тред, можно игнорить
0
Бесконечный оффтоп имени kcalbа #2
K C A L B K C A L B
C C C C
A + A +
L + L +
B K C A L B K C A L B
K C K C
C A C A
A L A L
L B L B
K C A L K K C A L B K
C C C C
+ A + A
+ L + L
K C A L B K C A L B
Бесконечный оффтоп имени kcalba #1 https://govnokod.ru/28122 https://govnokod.xyz/_28122/