- 1
- 2
if (channel->leftover < 0) // if nothing left over for next time:
printk("ERRRRRRRRRRRRRRRRRRRRRRRRRRRR\n");
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+134
if (channel->leftover < 0) // if nothing left over for next time:
printk("ERRRRRRRRRRRRRRRRRRRRRRRRRRRR\n");
RRRRRRRRRRRRRRetard.
+73
if (K_fire && select == 1 || K_rightbutton && select == 1) {
GAME_MODE = 9;
K_fire = false;
K_rightbutton = false;
select = 1;
}
if (K_fire && select == 2 || K_rightbutton && select == 2) {
GAME_MODE = 11;
FistPaint = true;
K_fire = false;
K_rightbutton = false;
select = 1;
}
if (K_fire && select == 3 || K_rightbutton && select == 3) {
GAME_MODE = 8;
K_fire = false;
K_rightbutton = false;
select = 1;
}
if (K_fire && select == 4 || K_rightbutton && select == 4) {
GAME_MODE = 12;
FistPaint = true;
K_fire = false;
K_rightbutton = false;
select = 1;
}
if (K_fire && select == 5 || K_rightbutton && select == 5) {
GAME_MODE = 13;
K_fire = false;
K_rightbutton = false;
}
if (K_leftbutton) {
GAME_MODE = 13;
K_leftbutton = false;
}
Обработка выбора пункта в главном меню какой-то игры на java me
+161
if (($arrRoleInHold = $this->syncByToken($token)) && (!$arrRoleInHold)) {
throw new Exception('');
}
хорошее условие!
+156
if (!!window.Worker){
var worker = new Worker('worker.js');
worker.postMessage('Hellow World');
worker.onmessage = function (e){
alert(e.data);
};
}
Из статьи на швабре: /post/132785/
+107
var a : int64;
begin
assign(input, 'input.txt'); reset(input);
assign(output, 'output.txt'); rewrite(output);
read(a);
if a=25 then write ('2.7182818284590452353602875');
if a=24 then write ('2.718281828459045235360288');
if a=23 then write ('2.71828182845904523536029');
if a=22 then write ('2.7182818284590452353603');
if a=21 then write ('2.718281828459045235360');
if a=20 then write ('2.71828182845904523536');
if a=19 then write ('2.7182818284590452354');
if a=18 then write ('2.718281828459045235');
if a=17 then write ('2.71828182845904524');
if a=16 then write ('2.7182818284590452');
if a=15 then write ('2.718281828459045');
if a=14 then write ('2.71828182845905');
if a=13 then write ('2.7182818284590');
if a=12 then write ('2.718281828459');
if a=11 then write ('2.71828182846');
if a=10 then write ('2.7182818285');
if a=9 then write ('2.718281828');
if a=8 then write ('2.71828183');
if a=7 then write ('2.7182818');
if a=6 then write ('2.718282');
if a=5 then write ('2.71828');
if a=4 then write ('2.7183');
if a=3 then write ('2.718');
if a=2 then write ('2.72');
if a=1 then write ('2.7');
if a=0 then write ('3')
end.
Вывод числа e с заданной точностью
+135
/// <summary>
/// Converts to number.
/// </summary>
/// <param name="value">The value.</param>
/// <returns>System.String.</returns>
public static string convertToNumber(string value) {
string mvalue = "0";
string wildchars = @"~!@#$%^&*()_+={}[]|\/?><,`:;'";
bool chknegative = false;
if (value == null)
value = "";
try {
if (value == "") {
mvalue = "0";
}
for (var i = 0; i < wildchars.Length; i++) {
string wildchar = wildchars.Substring(i, 1);
//chknegative = value.Contains(wildchar);
mvalue = value.Replace(wildchar, "");
value = mvalue;
}
chknegative = value.Contains("-");
if (chknegative) {
mvalue = value.Replace("-", "");
mvalue = "-" + mvalue;
}
else {
mvalue = value;
}
}
catch {
mvalue = "0";
}
return mvalue;
}
−404
UIImageView *footerWhite1PxLineThatOnlyAndersWillNotice = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"sidebar_line_white"]];
ох уж этот Андерс!
+155
express_static = express.static(static_files.file_path)
app.use('/files', (req, res, next) ->
if Math.random() > app.failureProbability
express_static.handle(req, res, next)
else
# server failure or timeout
if Math.random() < 0.5
console.log('\x1B[31mRandom failure\x1B[0m')
res.send(500, 'Fuck you')
else
console.log('\x1B[31mRandom timeout\x1B[0m')
)
а вот так мы тестируем сетевую нагрузку (нода, кофе)
+132
var resultList = new List<CentralBankRateData>();
using (var resultSet = m_Service.GetCursOnDate(request.Date))
using (var reader = new DataTableReader(resultSet.Tables["ValuteCursOnDate"]))
while (reader.Read())
resultList.Add(new CentralBankRateData
{
Name = (string) reader["Vname"],
Nominal = (decimal) reader["Vnom"],
Rate = (decimal) reader["Vcurs"],
NumberCode = (int) reader["Vcode"],
StringCode = (string) reader["VchCode"]
});
Какой Центробанк, такая и валюта. m_Service типа DailyInfoSoap, это сервис отдачи курсов валют. А еще у них получение актуального списка БИКов возможно только в древнейшем формате dBASE.
+153
// В чем смысл переменной knc?
var knc = 0;
var k_fr = parent.document.getElementById(kph);
if (k_fr) {
knc = 1;
}
Маленький кусочек говнокода.
Не сказал бы что тут что-то феноменальное, но подобная логика на всем проекте
"Мы создали переменную для проверки для того что бы проверить переменную для проверки"