- 1
-
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+1
-
#
## #### #### ##### ######
# # # # # # # #
# # #### # # #####
# ### # # ##### #
# ### # # # # # # #
##### ### #### #### # # #
# # ###### ##### # ###### # #### ## ##### # #### # #
# # # # # # # # # # # # # # # # ## #
# # ##### # # # ##### # # # # # # # # # # #
# # # ##### # # # # ###### # # # # # # #
# # # # # # # # # # # # # # # # # ##
## ###### # # # # # #### # # # # #### # #
###### ##### ##### #### #####
# # # # # # # # #
##### # # # # # # # #
# ##### ##### # # #####
# # # # # # # # #
###### # # # # #### # #
−2
if(spForActiveActivityDetect.getBoolean( "active", false) == false) {
Intent cabinetManagerAct = new Intent(this, EmployeeCabinetActivity.class );
finish();
startActivity(cabinetManagerAct );
}else {
//...
}
Равно ли getBoolen из false false ?
по мне, заслуженное звание: топ - говенная проверка из говен, так как особенно выносит мозг
0
FILE_TYPES_EXTENSIONS.each do |t, e|
if e.include? extension
return t
elsif e.any? {|_e| _e.is_a? Hash}
if _t = e.reduce({}) { |m, x| m = m.merge(x) if x.is_a?(Hash); m }.find{|_t, _e| _e.include? extension}
return retrieve_parent ? t : _t.first
end
end
end
nil
только создатель поймет, насрал и пропал
0
#include<iostream>
#include<fstream>
#include<vector>
using namespace std;
string rec(const string str, char c){return str;} //syntax error : missing ';' before identifier 'rec', ')' before 'const', ')', ';' before '{',
//'str' : undeclared identifier, 'rec': identifier not found
void cer(){} //'cer' : local function definitions are illegal
main(){ //'main': identifier not found
string s, d="Math.cos",a; //missing '}' before identifier 's', ';' before identifier 's', 's', 'd', 'a' : undeclared identifier
ifstream fin;
vector<string> mas; // 'std::vector' : 'string' is not a valid template type argument for parameter '_Ty', 'mas' : unknown size
//'std::vector' : no appropriate default constructor available
fin.open(mDocWrite); //'void std::basic_ifstream<char,std::char_traits<char>>::open(const char *,std::ios_base::open_mode)' :
//cannot convert argument 1 from 'nsAutoPtr<nsHtml5Tokenizer>' to 'const wchar_t *'
//No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
//if (fin.is_open()) cout<<"1";else cout<<"0";
while(fin>>s) //'s' : undeclared identifier, fatal error C1903: unable to recover from previous error(s); stopping compilation
{bool f=0;
for(int i=0; i<s.size(); ++i)
if (s[i]==d[0])
{
f=1;
for (int j=0; j<s.size()&&j<d.size(); ++j)
if (d[j]!=s[i+j]) f=0;
if (f)
{
a.clear();
for (int j=0; j<i; ++j)
a=a+s[j];
a=a+"0.5*";
for (int j=i; j<s.size(); ++j)
a=a+s[j];
}
}
if (f) {mas.push_back("\n");mas.push_back(a);mas.push_back("\n");}
else mas.push_back(s);
s=rec(s,'0');
}
ofstream fout;
fout.open(mDocWrite);
for (int i=0; i<mas.size(); ++i) fout<<mas[i]<<"\t";
}
предполагалось, что код будет уменьшать cos угла в два раза, но при компиляции выдает ошибки, логику большинства которых не могу понять. Ошибки указал в коде. Подскажите, что не так.
−3
Dies irae, dies illa
solvet saeclum in favilla
teste David cum Sibylla
Quantus tremor est futurus
quando judex est venturus
cuncta stricte discussurus
Tuba mirum spargens sonum
Per sepulcra regionum,
Coget omnes ante thronum.
Mors stupebit et natura
Cum resurget creatura
judicanti responsura
Liber scriptus proferetur
in quo totum continetur
unde mundus judicetur
Judex ergo cum sedebit
quidquid latet apparebit
nil inultum remanebit
Quid sum miser tunc dicturus
quem patronum rogaturus
cum vix justus sit securus?
Rex tremendae majestatis,
qui salvandos salvas gratis,
salva me, fons pietatis.
Recordare, Jesu pie,
quod sum causa tuae viae:
ne me perdas illa die.
Quaerens me sedisti lassus;
redemisti crucem passus.
Tantus labor non sit cassus.
Juste Judex ultionis
donum fac remissionis
ante diem rationis.
Ingemisco tanquam reus:
culpa rubet vultus meus.
supplicanti parce, Deus.
Qui Mariam absolvisti
et latronem exaudisti,
mihi quoque spem dedisti.
Preces meae non sunt dignae,
sed tu bonus fac benigne,
ne perenni cremer igne.
Inter oves locum praesta
et ab haedis me sequestra,
statuens in parte dextra.
Confutatis maledictis
flammis acribus addictis,
voca me cum benedictis.
Oro supplex et acclinis
cor contritum quasi cinis,
gere curam mei finis.
Lacrimosa dies illa
qua resurget ex favilla
judicandus homo reus.
huic ergo parce, Deus.
Pie Jesu Domine,
dona eis requiem.
Amen.
yet_another_one_shit, 666_N33D135
Милосердный Господи Админе,
Даруй им покой!
Админь.
−2
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Kabel Deutschland, digitale Belegung, Frequenzen, Kanäle, Sender" />
Вся страница тут https://helpdesk.kdgforum.de/sendb/belegung.html
Ебучий lxml при попытке парсить документ в неправильной кодировке (Невалидный utf8, в meta name="keywords" содержимое в однобайтовой кодировке. Как такое получили - другой вопрос) тихо сваливается в какую-то однобайтовую кодировку. Браузер всё показывает нормально. Несмотря на xhtml, который вроде должен заставлять строго парсить.
−5
Перепись долбоёбов.
Отписываемся в комментах.
−4
Как называется физическая сеть, разбитая на подсети?
(man dhcpd.conf)
−2
if type(colType) == type(0): # it's a length
Библиотека csv, встроенная в питон.
−6
class Foo {
// ...
private:
std::vector<int> v1_;
std::vector<int> v2_;
void bar( const std::vector<int>& v );
public:
void doAction( int choice ) {
if ( choice == 1 )
bar( v1_ );
else
bar( v2_ );
}
};
Почему передавать поля класса в свои же методы по ссылке\указателю -- это говнокод?
Как этого избегать, чтобы получилось универсальней?