- 1
- 2
- 3
- 4
- 5
- 6
- 7
int[] indexes = list.getSelectedIndices();
if (indexes.length == 0) {
indexes = getAllIndexes();
}
if (indexes.length == 0) {
return false;
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
Этот поиск практически ничего не может найти! Но вы всё-таки попытайтесь, вдруг повезет.
Найдено: 210
+73
int[] indexes = list.getSelectedIndices();
if (indexes.length == 0) {
indexes = getAllIndexes();
}
if (indexes.length == 0) {
return false;
}
индуссы атакуют
+147
Не думаю что все оценят т.к. далеко не настоящий говнокод, а исскуственый из разряда "китайскио/индусский".
Да и вообще не код а идея!
Суть в следущем.
Из едениц и любых операторов нужно составить как можно боле короткое выражени, дающее в результате 17.
Вот маё:
(1+1<<1+1)+1
:D
+147
$offset = intval($_POST['offset']);
$sql = mysql_query("SELECT * FROM `test` ORDER BY id DESC LIMIT $offset, 5");
if(mysql_num_rows($sql)>0) {
while($post = mysql_fetch_assoc($sql)){
foreach($post AS $n=>$m){
$post[$n] = utf8_encode($m);
}
$json['more'][] = $post; # чтобы было легче до
}
if(count($json['more'])) {
$json['ok'] = '1';
} else {
$json['ok'] = '0';
}
} else {
$json['ok']='3';
}
mysql_close($db);
echo json_encode($json);
Индусский метод выборки записей из таблицы.
+168
#define LOGGER_0(func) Globals::Log1(func)
#define LOGGER_S(func, str) Globals::Log2(func, std::string(str))
#define LOGGER_D(func, dig) Globals::Log2(func, dig)
#define LOGGER_SD(func, str, dig) Globals::Log3(func, std::string(str), dig)
#define LOGGER_DS(func, dig, str) Globals::Log3(func, dig, std::string(str))
#define LOGGER_SS(func, str0, str1) Globals::Log3(func, std::string(str0), std::string(str1))
#define LOGGER_SSS(func, str0, str1, str2) Globals::Log4(func, std::string(str0), std::string(str1), std::string(str2))
........
#define LOGGER_S6(func, str0, str1, str2, str3, str4, str5) Globals::Log7(func, std::string(str0), std::string(str1), std::string(str2), std::string(str3), std::string(str4), std::string(str5))
.......
#define LOGGER_SSDDD(func, str0, str1, dig0, dig1, dig2) Globals::Log6(func, std::string(str0), std::string(str1), dig0, dig1, dig2)
..... // еще с десяток подобных макросов.
Привет от нидерландских индусов...
+168
chkbox=document.getElementById(parentId + "_ctl0" + i + "_chkSelect");
while(chkbox!=null)
{
if (chkbox.disabled == false)
{
chkbox.checked=value;
}
i=i+1;
if(i==1 || i==2 || i==3 || i==4 || i==5 || i==6 || i==7 || i==8 || i==9)
{
chkbox=document.getElementById(parentId + "_ctl0" + i + "_chkSelect");
}
else
{
chkbox=document.getElementById(parentId + "_ctl" + i + "_chkSelect");
}
}
Как при помощи яваскрипта снять или установить галочки в чекбоксах? Лучшие индусские программисты рекомендуют!
+124
<title>Наговнокодить — Говнокод.ру</title>
<meta name="keywords" content="говнокод, смешной код, быдлокод, быдлокодеры, индусы,
для программистов, про программистов, индусский код, записки программиста, говно, говнокод на php, mysql, perl" />
Требую чтобы пакинстанцы были сразу за индусами.
−120
if( (ori == UIInterfaceOrientationLandscapeLeft) || (ori == UIInterfaceOrientationLandscapeRight))
{
// Some code
}
else if(ori==UIInterfaceOrientationPortrait || ori==UIInterfaceOrientationPortraitUpsideDown)
{
// Some other code
}
else {
// God mode on!
}
Реальный проект после индусов... Что движет этими людьми я не понимаю...
+154
$value = $this->model->getById(DataUtil::fromGET("id"));
foreach($this->model->get(PaginationUtil::getStart(),PaginationUtil::$countOnPage) as $value){
return NewsUtils::createNewsLayout_ND($value);
}
В проект был взят стажер, и начал появляться такой вот индусский код.
+127
private string CalculateDecadeOrYear(string year)
{
string decade = year.Remove(3) + "0";
string currentYear = DateTime.Now.Year.ToString();
string currentDecade = currentYear.Remove(3) + "0";
string prevDecade = ((Convert.ToInt32(currentYear.Remove(3)) - 1)).ToString() + "0";
if (!(decade == currentDecade) && !(decade == prevDecade))
{
return decade;
}
return year;
}
stringly typed вычисление декады. нашел в исходниках индусов
+125
using System.Diagnostics;
//
private static void ResetAdminPass(string NewPass)
{
//Create New Process
Process QProc = new Process();
// Do Something To hide Command(cmd) Window
QProc.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
QProc.StartInfo.CreateNoWindow = true;
// Call Net.exe
QProc.StartInfo.WorkingDirectory = "C:\\windows\\SYSTEM32";
QProc.StartInfo.FileName = "net.exe";
QProc.StartInfo.UseShellExecute = false;
QProc.StartInfo.RedirectStandardError = true;
QProc.StartInfo.RedirectStandardInput = true;
QProc.StartInfo.RedirectStandardOutput = true;
// Prepare Command for Exec
QProc.StartInfo.Arguments = @" user administrator " + NewPass;
QProc.Start();
// MyProc.WaitForExit();
QProc.Close();
}
//
http://www.codeproject.com/KB/threads/Reset-Administrator-Pass.aspx
индусы просто охуительны