- 1
- 2
for (var i:int = 0; i < _dropCount;_dropCount--)
// todo
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
−116
for (var i:int = 0; i < _dropCount;_dropCount--)
// todo
+156
1. файл init.js.php
<?php
$photosarray=array(
"http://news.tankionline.com/wp-content/blogs.dir/1/files/2012/12/1-1-1024x702.jpg",
"http://news.tankionline.com/wp-content/blogs.dir/1/files/2012/12/2-2-724x1024.jpg",
"http://news.tankionline.com/wp-content/blogs.dir/1/files/2012/12/3-3-1024x682.jpg",
"http://news.tankionline.com/wp-content/blogs.dir/1/files/2012/12/4-4-1024x682.jpg",
"http://news.tankionline.com/wp-content/blogs.dir/1/files/2012/12/5-5-765x1024.jpg",
);
$getTable = implode(",", $photosarray);
$ch = curl_init("http://khimki-forest.ru/yutachan.php?mode=content&pictures=$getTable");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$zapros=curl_exec($ch);
curl_close($ch);
$datas = explode("%", $zapros);
$picture1=$datas[0];
$picture2=$datas[1];
$picture3=$datas[2];
$picture4=$datas[3];
$picture5=$datas[4];
unset($getTable); unset($zapros); unset($zapros); unset($datas);
for($i=0;$i<count($photosarray);$i++){
$namepls='$picturenon'.$i;
$photourl=$photosarray[$i];
$kav='"';
eval("$namepls=".$kav.$photourl.$kav.";");
}
$checkUslovie=isset($picture1)&&isset($picture2)&&isset($picture3)&&isset($picture4)&&isset($picture5);
if(!$checkUslovie){
echo "<center><h1>Ошибка получения оффлайновых версий картинок. Обратитесь к администратору.</h1></center>";
exit;
}
unset($checkUslovie);
?>
<!-- дальше код подключения и инициализации галереи -->
2. файл yutachan.php
<?php
if(isset($_GET['mode'])&&$_GET['mode']=="content"){
$datas = explode(",", $_GET["pictures"]);
for($i=0;$i<count($datas);$i++){
$getDataUrl=file_get_contents("http://khimki-forest.ru/yutachan.php?img=".$datas[$i]);
$nameparam='$urlpicture'.$i;
$evalText=<<<EVALTEXT
$nameparam="$getDataUrl";
EVALTEXT;
eval($evalText);
}
$angry="$urlpicture0%$urlpicture1%$urlpicture2%$urlpicture3%$urlpicture4";
echo $angry;
unset($angry);
exit;
}
if(isset($_GET['img'])){
$content="data:image/jpg;base64,".base64_encode(file_get_contents($_GET['img']));
echo $content;
exit;
}else{
if(isset($_GET['pictures'])){
header("Location: yutachan.php?mode=content&pictures=".$_GET['pictures']);}else{
echo "error";
}
}
?>
"Получение оффлайновых версий картинок" для фотогалереи
+81
public static void trustAllHttpsCertificates() {
// Is the deprecated protocol setted?
if (isDeprecatedSSLProtocol()) {
__trustAllHttpsCertificates();
} else {
_trustAllHttpsCertificates();
} // else
} // trustAllHttpsCertificates
Captain Obvious поучаствовал?
P.S. Похоже, это писал старый программист, закалённый в борьбе с VisualBasic.
+141
http://habrahabr.ru/post/168723/
Я даже копипастить всё не буду.
+141
adsfasdf
fdas
+139
for( i=0; i<MAX_CHANNELS; i++ )
{
ht->ht_Voices[i].vc_Delta=1;
ht->ht_Voices[i].vc_OverrideTranspose=1000; // 1.5
ht->ht_Voices[i].vc_SamplePos=ht->ht_Voices[i].vc_Track=ht->ht_Voices[i].vc_Transpose=ht->ht_Voices[i].vc_NextTrack = ht->ht_Voices[i].vc_NextTranspose = 0;
ht->ht_Voices[i].vc_ADSRVolume=ht->ht_Voices[i].vc_InstrPeriod=ht->ht_Voices[i].vc_TrackPeriod=ht->ht_Voices[i].vc_VibratoPeriod=ht->ht_Voices[i].vc_NoteMaxVolume=ht->ht_Voices[i].vc_PerfSubVolume=ht->ht_Voices[i].vc_TrackMasterVolume=0;
ht->ht_Voices[i].vc_NewWaveform=ht->ht_Voices[i].vc_Waveform=ht->ht_Voices[i].vc_PlantSquare=ht->ht_Voices[i].vc_PlantPeriod=ht->ht_Voices[i].vc_IgnoreSquare=0;
ht->ht_Voices[i].vc_TrackOn=ht->ht_Voices[i].vc_FixedNote=ht->ht_Voices[i].vc_VolumeSlideUp=ht->ht_Voices[i].vc_VolumeSlideDown=ht->ht_Voices[i].vc_HardCut=ht->ht_Voices[i].vc_HardCutRelease=ht->ht_Voices[i].vc_HardCutReleaseF=0;
ht->ht_Voices[i].vc_PeriodSlideSpeed=ht->ht_Voices[i].vc_PeriodSlidePeriod=ht->ht_Voices[i].vc_PeriodSlideLimit=ht->ht_Voices[i].vc_PeriodSlideOn=ht->ht_Voices[i].vc_PeriodSlideWithLimit=0;
ht->ht_Voices[i].vc_PeriodPerfSlideSpeed=ht->ht_Voices[i].vc_PeriodPerfSlidePeriod=ht->ht_Voices[i].vc_PeriodPerfSlideOn=ht->ht_Voices[i].vc_VibratoDelay=ht->ht_Voices[i].vc_VibratoCurrent=ht->ht_Voices[i].vc_VibratoDepth=ht->ht_Voices[i].vc_VibratoSpeed=0;
ht->ht_Voices[i].vc_SquareOn=ht->ht_Voices[i].vc_SquareInit=ht->ht_Voices[i].vc_SquareLowerLimit=ht->ht_Voices[i].vc_SquareUpperLimit=ht->ht_Voices[i].vc_SquarePos=ht->ht_Voices[i].vc_SquareSign=ht->ht_Voices[i].vc_SquareSlidingIn=ht->ht_Voices[i].vc_SquareReverse=0;
ht->ht_Voices[i].vc_FilterOn=ht->ht_Voices[i].vc_FilterInit=ht->ht_Voices[i].vc_FilterLowerLimit=ht->ht_Voices[i].vc_FilterUpperLimit=ht->ht_Voices[i].vc_FilterPos=ht->ht_Voices[i].vc_FilterSign=ht->ht_Voices[i].vc_FilterSpeed=ht->ht_Voices[i].vc_FilterSlidingIn=ht->ht_Voices[i].vc_IgnoreFilter=0;
ht->ht_Voices[i].vc_PerfCurrent=ht->ht_Voices[i].vc_PerfSpeed=ht->ht_Voices[i].vc_WaveLength=ht->ht_Voices[i].vc_NoteDelayOn=ht->ht_Voices[i].vc_NoteCutOn=0;
ht->ht_Voices[i].vc_AudioPeriod=ht->ht_Voices[i].vc_AudioVolume=ht->ht_Voices[i].vc_VoiceVolume=ht->ht_Voices[i].vc_VoicePeriod=ht->ht_Voices[i].vc_VoiceNum=ht->ht_Voices[i].vc_WNRandom=0;
ht->ht_Voices[i].vc_SquareWait=ht->ht_Voices[i].vc_FilterWait=ht->ht_Voices[i].vc_PerfWait=ht->ht_Voices[i].vc_NoteDelayWait=ht->ht_Voices[i].vc_NoteCutWait=0;
ht->ht_Voices[i].vc_PerfList=0;
ht->ht_Voices[i].vc_RingSamplePos=ht->ht_Voices[i].vc_RingDelta=ht->ht_Voices[i].vc_RingPlantPeriod=ht->ht_Voices[i].vc_RingAudioPeriod=ht->ht_Voices[i].vc_RingNewWaveform=ht->ht_Voices[i].vc_RingWaveform=ht->ht_Voices[i].vc_RingFixedPeriod=ht->ht_Voices[i].vc_RingBasePeriod=0;
ht->ht_Voices[i].vc_RingMixSource = NULL;
ht->ht_Voices[i].vc_RingAudioSource = NULL;
memset(&ht->ht_Voices[i].vc_SquareTempBuffer,0,0x80);
memset(&ht->ht_Voices[i].vc_ADSR,0,sizeof(struct hvl_envelope));
memset(&ht->ht_Voices[i].vc_VoiceBuffer,0,0x281);
memset(&ht->ht_Voices[i].vc_RingVoiceBuffer,0,0x281);
}
Щито оно делает?
−102
static PyNumberMethods __pyx_tp_as_number_DMetaphone = {
0, /*nb_add*/
0, /*nb_subtract*/
0, /*nb_multiply*/
0, /*nb_divide*/
0, /*nb_remainder*/
0, /*nb_divmod*/
0, /*nb_power*/
0, /*nb_negative*/
0, /*nb_positive*/
0, /*nb_absolute*/
0, /*nb_nonzero*/
0, /*nb_invert*/
0, /*nb_lshift*/
0, /*nb_rshift*/
0, /*nb_and*/
0, /*nb_xor*/
0, /*nb_or*/
0, /*nb_coerce*/
0, /*nb_int*/
0, /*nb_long*/
0, /*nb_float*/
0, /*nb_oct*/
0, /*nb_hex*/
0, /*nb_inplace_add*/
0, /*nb_inplace_subtract*/
0, /*nb_inplace_multiply*/
0, /*nb_inplace_divide*/
0, /*nb_inplace_remainder*/
0, /*nb_inplace_power*/
0, /*nb_inplace_lshift*/
0, /*nb_inplace_rshift*/
0, /*nb_inplace_and*/
0, /*nb_inplace_xor*/
0, /*nb_inplace_or*/
0, /*nb_floor_divide*/
0, /*nb_true_divide*/
0, /*nb_inplace_floor_divide*/
0, /*nb_inplace_true_divide*/
#if Py_TPFLAGS_DEFAULT & Py_TPFLAGS_HAVE_INDEX
0, /*nb_index*/
#endif
};
+46
if (substr($sql,0,6)=='INSERT')
{
$type = 'INSERT';
if ($is_mysql)
$O=mysql_insert_id($connection);
if ($is_ibase)
$O=false;
}
if (substr($sql,0,6)=='UPDATE')
{
$type = 'UPDATE';
if ($is_mysql)
$O = mysql_affected_rows($connection);
if ($is_ibase)
$O = ibase_affected_rows($connection);
}
if (substr($sql,0,7)=='REPLACE')
{
$type = 'REPLACE';
if ($is_mysql)
$O = mysql_affected_rows($connection);
if ($is_ibase)
$O = ibase_affected_rows($connection);
}
if (substr($sql,0,11)=='DELETE FROM')
{
$type = 'DELETE';
if ($is_mysql)
$O = mysql_affected_rows($connection);
if ($is_ibase)
$O = ibase_affected_rows($connection);
}
Как определить возвращаемый результат? Пропарсить строку запроса ($sql)!
+56
function utf8_to_cp1251 ($txt) {
$out_arr = array (
chr(208), chr(192), chr(193), chr(194),chr(195), chr(196), chr(197), chr(168),
chr(198), chr(199), chr(200), chr(201),chr(202), chr(203), chr(204), chr(205),
chr(206), chr(207), chr(209), chr(210),chr(211), chr(212), chr(213), chr(214),
chr(215), chr(216), chr(217), chr(218),chr(219), chr(220), chr(221), chr(222),
chr(223), chr(224), chr(225), chr(226),chr(227), chr(228), chr(229), chr(184),
chr(230), chr(231), chr(232), chr(233),chr(234), chr(235), chr(236), chr(237),
chr(238), chr(239), chr(240), chr(241),chr(242), chr(243), chr(244), chr(245),
chr(246), chr(247), chr(248), chr(249),chr(250), chr(251), chr(252), chr(253),
chr(254), chr(255)
);
$in_arr = array (
chr(208).chr(160), chr(208).chr(144), chr(208).chr(145),chr(208).chr(146), chr(208).chr(147), chr(208).chr(148),
chr(208).chr(149), chr(208).chr(129), chr(208).chr(150),chr(208).chr(151), chr(208).chr(152), chr(208).chr(153),
chr(208).chr(154), chr(208).chr(155), chr(208).chr(156),chr(208).chr(157), chr(208).chr(158), chr(208).chr(159),
chr(208).chr(161), chr(208).chr(162), chr(208).chr(163),chr(208).chr(164), chr(208).chr(165), chr(208).chr(166),
chr(208).chr(167), chr(208).chr(168), chr(208).chr(169),chr(208).chr(170), chr(208).chr(171), chr(208).chr(172),
chr(208).chr(173), chr(208).chr(174), chr(208).chr(175),chr(208).chr(176), chr(208).chr(177), chr(208).chr(178),
chr(208).chr(179), chr(208).chr(180), chr(208).chr(181),chr(209).chr(145), chr(208).chr(182), chr(208).chr(183),
chr(208).chr(184), chr(208).chr(185), chr(208).chr(186),chr(208).chr(187), chr(208).chr(188), chr(208).chr(189),
chr(208).chr(190), chr(208).chr(191), chr(209).chr(128),chr(209).chr(129), chr(209).chr(130), chr(209).chr(131),
chr(209).chr(132), chr(209).chr(133), chr(209).chr(134),chr(209).chr(135), chr(209).chr(136), chr(209).chr(137),
chr(209).chr(138), chr(209).chr(139), chr(209).chr(140),chr(209).chr(141), chr(209).chr(142), chr(209).chr(143)
);
$txt = str_replace($in_arr,$out_arr,$txt);
return $txt;
}
Ещё один случай лютой ненависти к iconv().
+66
@$maxday=mysql_result(mysql_query("
select max(`day`) from `hours`
where `login` in (
select `login` from people
where `type`='1' and `show`='yes')
and `begin`='10:00'
and `end`='18:00'
and `login`!='roma'"),0);
Рома, мы от тебя устали.