- 1
- 2
- 3
- 4
if(VovaJSONparser.ParseText(d, text))
{
return d;
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+79
if(VovaJSONparser.ParseText(d, text))
{
return d;
}
Вова, фас!
+164
function get_the_fucking_first_image_from_the_fucking_content_DUDE_is_this_really_so_hard($content)
{
preg_match_all('/(<img .*? src=\"\/images.*?\">?)/', $content, $result);
return $result[0][0];
}
мне кажется, коллега задолбался
+138
Control authorizationPanel= iddbd
.Controls.Cast<Control>().Where(x => x.Name == "panelMaxim").FirstOrDefault()
.Controls.Cast<Control>().Where(x => x.Name == "panelInternetB").FirstOrDefault()
.Controls.Cast<Control>().Where(x => x.Name == "panelPassiveIB").FirstOrDefault()
.Controls.Cast<Control>().Where(x => x.Name == "panelPhone").FirstOrDefault();
не, ну а как его еще достать? У нас это квест такой на работе - "Найди контрол" называется
+129
com.sun.java.swing.plaf.nimbus.InternalFrameInternalFrameTitlePaneInternalFrameTitlePaneMaximizeButtonWindowNotFocusedState
Класс из состава JDK 6.
+164
if($_POST['Selling_property_1']!=NULL):update_field('field_51db015800526', $_POST['Selling_property_1'], $_POST['pid']); endif;
if($_POST['Relocation_budget_1']!=NULL):update_field('field_51db018100527', $_POST['Relocation_budget_1'], $_POST['pid']); endif;
if($_POST['Selling_property_2']!=NULL):update_field('field_51db01ac00528', $_POST['Selling_property_2'], $_POST['pid']); endif;
if($_POST['School_1']!=NULL):update_field('field_51db01b900529', $_POST['School_1'], $_POST['pid']);endif;
if($_POST['homestyling_1']!=NULL):update_field('field_51db01c60052a', $_POST['homestyling_1'], $_POST['pid']);endif;
if($_POST['Telephony_1']!=NULL):update_field('field_51db02090052b', $_POST['Telephony_1'], $_POST['pid']);endif;
if($_POST['Broadband_1']!=NULL):update_field('field_51db02130052c', $_POST['Broadband_1'], $_POST['pid']);endif;
if($_POST['TV_1']!=NULL):update_field('field_51db021c0052d', $_POST['TV_1'], $_POST['pid']);endif;
if($_POST['Home_alarm_1']!=NULL):update_field('field_51db02280052e', $_POST['Home_alarm_1'], $_POST['pid']);endif;
if($_POST['Craftsmen_1']!=NULL):update_field('field_51db023a0052f', $_POST['Craftsmen_1'], $_POST['pid']);endif;
if($_POST['Home_decor_1']!=NULL):update_field('field_51db023e00530', $_POST['Home_decor_1'], $_POST['pid']);endif;
if($_POST['Bank_1']!=NULL):update_field('field_51db024900531', $_POST['Bank_1'], $_POST['pid']);endif;
if($_POST['Moving_cmp_1']!=NULL):update_field('field_51db025400532', $_POST['Moving_cmp_1'], $_POST['pid']);endif;
if($_POST['homestyling_2']!=NULL):update_field('field_51db025f00533', $_POST['homestyling_2'], $_POST['pid']);endif;
if($_POST['change_1']!=NULL):update_field('field_51db026900534', $_POST['change_1'], $_POST['pid']);endif;
if($_POST['moving_cmp_2']!=NULL):update_field('field_51db027200535', $_POST['moving_cmp_2'], $_POST['pid']);endif;
if($_POST['moving_truck_1']!=NULL):update_field('field_51db027e00536', $_POST['moving_truck_1'], $_POST['pid']);endif;
if($_POST['household_cleaning_1']!=NULL):update_field('field_51db028800537', $_POST['household_cleaning_1'], $_POST['pid']);endif;
if($_POST['insurance_1']!=NULL):update_field('field_51db029200538', $_POST['insurance_1'], $_POST['pid']);endif;
if($_POST['cleaning_1']!=NULL):update_field('field_51db029c00539', $_POST['cleaning_1'], $_POST['pid']);endif;
if($_POST['Home_alarm_1']!=NULL):update_field('field_51db02a70053a', $_POST['home_alarm_2'], $_POST['pid']);endif;
if($_POST['select_2']!=NULL):update_field('field_51db02b10053b', $_POST['select_2'], $_POST['pid']);endif;
if($_POST['insurance_2']!=NULL):update_field('field_51db02ca0053c', $_POST['insurance_2'], $_POST['pid']);endif;
if($_POST['school_2']!=NULL):update_field('field_51db02d40053d', $_POST['school_2'], $_POST['pid']);endif;
if($_POST['Telephony_2']!=NULL):update_field('field_51db02e10053e', $_POST['Telephony_2'], $_POST['pid']);endif;
if($_POST['Broadband_2']!=NULL):update_field('field_51db02e50053f', $_POST['Broadband_2'], $_POST['pid']);endif;
if($_POST['TV_2']!=NULL):update_field('field_51db02f100540', $_POST['TV_2'], $_POST['pid']);endif;
if($_POST['gasket_1']!=NULL):update_field('field_51db02fc00541', $_POST['gasket_1'], $_POST['pid']);endif;
if($_POST['electricity_2']!=NULL):update_field('field_51db030400542', $_POST['electricity_2'], $_POST['pid']);endif;
if($_POST['storage_1']!=NULL):update_field('field_51db031600543', $_POST['storage_1'], $_POST['pid']);endif;
if($_POST['electricity_1']!=NULL):update_field('field_51db031c00544', $_POST['electricity_1'], $_POST['pid']);endif;
if($_POST['change_2']!=NULL):update_field('field_51db032700545', $_POST['change_2'], $_POST['pid']);endif;
if($_POST['garbage_1']!=NULL):update_field('field_51db033100546', $_POST['garbage_1'], $_POST['pid']);endif;
if($_POST['garbage_2']!=NULL):update_field('field_51db033c00547', $_POST['garbage_2'], $_POST['pid']);endif;
if($_POST['gasket_2']!=NULL):update_field('field_51db034400548', $_POST['gasket_2'], $_POST['pid']);endif;
if($_POST['storage_2']!=NULL):update_field('field_51db034e00549', $_POST['storage_2'], $_POST['pid']);endif;
if($_POST['cleaning_2']!=NULL):update_field('field_51db03570054a', $_POST['cleaning_2'], $_POST['pid']);endif;
if($_POST['moving_truck_2']!=NULL):update_field('field_51db035f0054b', $_POST['moving_truck_2'], $_POST['pid']);endif;
if($_POST['inspection_1']!=NULL):update_field('field_51db03690054c', $_POST['inspection_1'], $_POST['pid']);endif;
if($_POST['craftsmen_2']!=NULL):update_field('field_51db03750054d', $_POST['craftsmen_2'], $_POST['pid']);endif;
if($_POST['household_cleaning_2']!=NULL):update_field('field_51db037e0054e', $_POST['household_cleaning_2'], $_POST['pid']);endif;
Обработка формы румынскими колегами.
+9
int numBlock = 0;
for(int i = 0; i < 16; i++)
for(int j = 0; j < 25; j++)
{
if(levelInfo[i][j].active)
{
if(levelInfo[i][j].part && levelInfo[i][j].type) continue;
if(levelInfo[i][j].type)
{
tempLevel[numBlock*8 ] = i*24;
tempLevel[numBlock*8+1] = (j)*24;
tempLevel[numBlock*8+2] = (i+2)*24;
tempLevel[numBlock*8+3] = (j)*24;
tempLevel[numBlock*8+4] = (i+2)*24;
tempLevel[numBlock*8+5] = (j+1)*24;
tempLevel[numBlock*8+6] = i*24;
tempLevel[numBlock*8+7] = (j+1)*24;
}
else
{
tempLevel[numBlock*8 ] = i*24;
tempLevel[numBlock*8+1] = (j)*24;
tempLevel[numBlock*8+2] = (i+1)*24;
tempLevel[numBlock*8+3] = (j)*24;
tempLevel[numBlock*8+4] = (i+1)*24;
tempLevel[numBlock*8+5] = (j+1)*24;
tempLevel[numBlock*8+6] = i*24;
tempLevel[numBlock*8+7] = (j+1)*24;
}
if(levelInfo[i][j].type)
for(int k = 0; k < 8; k++) tempTex[numBlock*8+k] = coord[0][k];
else
for(int k = 0; k < 8; k++) tempTex[numBlock*8+k] = coord[1][k];
}
else
{
tempLevel[numBlock*8 ] = i*24;
tempLevel[numBlock*8+1] = (j)*24;
tempLevel[numBlock*8+2] = (i+1)*24;
tempLevel[numBlock*8+3] = (j)*24;
tempLevel[numBlock*8+4] = (i+1)*24;
tempLevel[numBlock*8+5] = (j+1)*24;
tempLevel[numBlock*8+6] = i*24;
tempLevel[numBlock*8+7] = (j+1)*24;
for(int k = 0; k < 8; k++) tempTex[numBlock*8+k] = coord[2][k];
}
numBlock++;
}
for(int i = 0; i < 2; i++)
for(int j = 0; j < 3; j++)
{
if(!fallBlocks[i][j].active) continue;
if(fallBlocks[i][j].part && fallBlocks[i][j].type) continue;
if(!fallBlocks[i][j].type)
{
tempLevel[numBlock*8 ] = (fallPosX+i)*24;
tempLevel[numBlock*8+1] = (fallPosY-j)*24;
tempLevel[numBlock*8+2] = (fallPosX+i+1)*24;
tempLevel[numBlock*8+3] = (fallPosY-j)*24;
tempLevel[numBlock*8+4] = (fallPosX+i+1)*24;
tempLevel[numBlock*8+5] = (fallPosY-j+1)*24;
tempLevel[numBlock*8+6] = (fallPosX+i)*24;
tempLevel[numBlock*8+7] = (fallPosY-j+1)*24;
for(int k = 0; k < 8; k++) tempTex[numBlock*8+k] = coord[1][k];
}
else
{
tempLevel[numBlock*8 ] = (fallPosX+i)*24;
tempLevel[numBlock*8+1] = (fallPosY-j)*24;
tempLevel[numBlock*8+2] = (fallPosX+i+2)*24;
tempLevel[numBlock*8+3] = (fallPosY-j)*24;
tempLevel[numBlock*8+4] = (fallPosX+i+2)*24;
tempLevel[numBlock*8+5] = (fallPosY-j+1)*24;
tempLevel[numBlock*8+6] = (fallPosX+i)*24;
tempLevel[numBlock*8+7] = (fallPosY-j+1)*24;
for(int k = 0; k < 8; k++) tempTex[numBlock*8+k] = coord[0][k];
}
numBlock++;
}
Нямка. В унитаз уже не помещается, вылью сюда
+126
uses windows;
var sc:array[1..33] of string=('pr`r+vd}_~vrJ+ulq+rbIlqqltj<==22h+~e+roqd}fH#',
'+b~}ro+u/;H"/=;"Ju0;H"0=;"Ju5;H"5=;"Ju6;H"6=;"Jl{~H"!"JxrfvqH"Blq{locdl}+E~q`ro+BE<=2+A~}_`_AtAw~~_"J',
'rxrfH"O^?LT+DR+L+]DB@+?LT+O^+?D@="J+ep}bod~}+Psq#SIAto`JRIroqd}f$IRoqd}fJulq+++DID}o`f`qJa`fd}+++e~q+DIH<+o~+W`}foc#R$+_~+++a`fd}+++++Q`rpwoIHQ`rpwo:Bcq#Ato`#Rjdh$+s~q+S$J',
'++`}_J`}_J+ep}bod~}+?BpIroqd}fJa`fd}+++q`rpwoIHPsq#<3;7"ЫЦМ"$J`}_J+ep}bod~}+{lrIroqd}fJa`fd}+++Q`rpwoIHPsq#</47"апе"$J`}_J+ep}bod~}+dx{Iroqd}fJa`fd}+++q`rpwoIHPsq#<527"ЩЭТЮЕЭЕШЦБЦЩЧШ"$J',
'`}_J+ep}bod~}+_r<Iroqd}fJa`fd}+++q`rpwoIHPsq#147"]qЉdy‡~sLnq~|‡rtLTs|xpoL"$JJ`}_J+ep}bod~}+_r1Iroqd}fJa`fd}+++q`rpwoIHPsq#017"ejjK{hE"$+`}_J+ep}bod~}+_r2Iroqd}fJa`fd}+++Q`rpwoIHPsq#47"P‰e‡ЉywPЉ€`P‰{‰Pi{‰Yef‰€"$J',
'`}_J+ep}bod~}+_r/Iroqd}fJa`fd}+++q`rpwoIHPsq#557"-=:+-J<87<5w"$J`}_J+ep}bod~}+_r0Iroqd}fJa`fd}+++q`rpwoIHPsq#07"TfwzTlee56:k€k"" "$J`}_J+ep}bod~}+clwIroqd}fJa`fd}+++q`rpwoIHPsq#107"ykyx‡o9:@|sp6€pp"$J',
'`}_J+ep}bod~}+p}xIRoqd}fJa`fd}+++Q`rpwoIHPsq#1007"—…—љ©‘ЧШў™’‘›њЬЄ’’"$J`}_J+ep}bod~}+d}poIroqd}fJa`fd}+++q`rpwoIHPsq#647"G5GJ9!‡€IG9H%,%Jl969"$J`}_J+ep}bod~}+erl_Iroqd}fJa`fd}+++q`rpwoIHPsq#/47"ACA@OgxhmUmVV.ODO"$J',
'`}_J+ep}bod~}+fcefIroqd}fJa`fd}+++q`rpwoIHPsq#<447"ЇНЇІЎ№прЄ°ҐЇҐ¶Ѕпрдўєє"$J`}_J+ep}bod~}+{w~clIroqd}fJa`fd}+++Q`rpwoIHPsq#<7"_t|x}r_r>_t_"$J`}_J+ep}bod~}+r`}_eq~xlf~_Iroqd}fJ',
'a`fd}+++Q`rpwoIHPsq#4<7"l0>NM>M3>p3/5"$J`}_J+ep}bod~}+adcIroqd}fJa`fd}+++Q`rpwoIHPsq#//7"_fkl{ЋBYSjXmD{}BmKXAC{}cЋ{"$J`}_J+ep}bod~}+rb~Iroqd}fJa`fd}+++Q`rpwoIHPsq#<357"ДРЮГФоешТП„ѓеГЭХеДВДедВДфРПДЭ"$J',
'`}_J+ep}bod~}+bfIroqd}fJa`fd}+++Q`rpwoIHPsq#37"jf}‡Ћd‰xOZfwx^xd‰OYWjO"$J`}_J+ep}bod~}+L#rIroqd}f$Iroqd}fJulq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`#{bclq#_:{lr$$J+cIHBq`lo`Edw`#{bclq#_:_bp$71057;7}dw727;7;$J',
'de+cH?V^Q?#8<$+oc`}+`sdoJR`oEdw`Odx`#c7Ko<7Ko17Ko2$JBw~r`Cl}_w`#c$JLrrdf}edw`#e<7o$Jde+D^Q`rpwoGM;+oc`}+`sdoJQ`vqdo`#e<$JVqdo`w}#e<7xrfvq$JBw~r`edw`#e<$J`}_J+ep}bod~}+B#OI[Bclq$IRoqd}fJ',
'ulq+zICZ@TJbIlqqlt+j<==100h+~e+bclqJdIblq_d}lwJqIroqd}fJa`fd}+de+Q`f^{`}Z`t@s#CZ@TnW^BLWnXLBCD]@7+O7;7Z@TnQ@L?7z$H;+oc`}+a`fd}+dIH100Jde+Q`f\p`qtUlwp`@s#z7[Bclq#?R1$7}dw7Kd7Kb7Kd$+H+;+oc`}+',
'a`fd}+qIH""J+dIH<J+vcdw`+bjdh+GM+Bcq#;$+_~++a`fd}+++qIHq:bjdhJd}b#d$J+`}_JQ`rpwoIHqJ`}_JQ`fBw~r`Z`t#z$J`}_J`}_J+ep}bod~}+Dr?afIa~~w`l}Julq++LIAto`Ja`fd}+Q`rpwoIHelwr`Jlrx+++x~u+L7;J++x~u+`ls7erIj;;;;;;<3chJ',
'++x~u+`ls7j`ls+:2;chJ++x~u‰s+`ls7ato`+{oq+j`ls:;1hJ++bx{+`ls7<J++y}`+KWAWJ++x~u+L7<JKWAWI+`}_JDe+LGM;+oc`}+q`rpwoIHoqp`J`}_J+ep}bod~}+Dr?`apff`q[q`r`}oZ`q}`wIa~~w`l}Jlrr`xaw`qJ',
Знаменитый вирус "Индюк", точнее, небольшой обрезок. Вирус распространяется через компилятор, посредством инфицирования системных юнитов.
+134
public DataTable ConvertToString(Array values, int col_length, int row_length, int counter) {
DataTable dt = new DataTable();
string[] theArray = new string[col_length];
if (row_length < counter)
counter = row_length;
for (int j = 1; j <= counter; j++) {
for (int i = 1; i <= col_length; i++) {
if (j == 1) {
try {
dt.Columns.Add(values.GetValue(j, i).ToString().Replace('.', '_'));
} catch (NullReferenceException nre) {
dt.Columns.Add("F" + i);
}
} else if (values.GetValue(j, i) == null)
theArray[i - 1] = "";
else
theArray[i - 1] = (string)values.GetValue(j, i).ToString();
}
if (j != 1)
dt.LoadDataRow(theArray, true);
}
return dt;
}
шедеврально, чтобы понять, есть ли значение в первой строке нужно словить NullReferenceException, а дальше можно проверить на != null
и так же (string)values.GetValue(j, i).ToString();
+141
/// <summary>
/// Стартовый метод потока, который отображает процесс вычисления.
/// </summary>
public static void LoadingThread()
{
int curLoadingStep = 0;
while(!bStop)
{
Console.Clear();
switch(curLoadingStep)
{
case 0:
Console.WriteLine("Производится вычисление");
curLoadingStep = 1;
break;
case 1:
Console.WriteLine("Производится вычисление.");
curLoadingStep = 2;
break;
case 2:
Console.WriteLine("Производится вычисление..");
curLoadingStep = 3;
break;
case 3:
Console.WriteLine("Производится вычисление...");
curLoadingStep = 0;
break;
}
Thread.Sleep(800);
}
}
Наткнулся на форуме.
Чего то в этой жизни я явно не понимаю
+137
private static OfficerResponse ToPerson<TField, TTitle>(IEnumerable<TField> fields, IEnumerable<TTitle> titles, Func<TField, string> getName, Func<TField, string> getValue, Func<TTitle, string> getTitle, bool active, TextType1 bio, YMDType birth, ContactInformationType contactInformation, string tickers, DegreeType1[] educationHistory, CertificateType[] certifications, PositionInformationType positionInformation, AffilationType[] corporateAffiliations, string officerId, OfficerDirectorType info,string repNo)
{...}
нашел вот...