- 1
find $PWD -maxdepth 0 2>/dev/null
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
−135
find $PWD -maxdepth 0 2>/dev/null
Вместо "ls"...
+98
dmauto.tout.FieldByName('nomer').AsString:= inttostr(inc(strtoint(dmauto.tout.FieldByName('nomer').AsString)));
+183
private static function IIf($itr, $truu, $falss) {
if($itr)
return $truu;
else
return $falss;
}
Думаю, такое надо вносить в coding conventions...
+167
$fileContent=file_get_contents($this->rootPath.'app/'.$this->interface.$this->handler.$this->p_h.'.php');
if (preg_match('/class\s{1,}\b'.$this->handler.$this->p_h.'\b/i', $fileContent,$matches)) {
.............
if (preg_match('/function\s{1,}\b'.$this->action.$this->p_a.'\b/i', $fileContent,$matches)) {
$class=$this->handler.$this->p_h;
$action=$this->action.$this->p_a;
$this->includeClass($class,$action);
return;
.............
Так мы проверяем наличие медота в классе ((
+163
if(preg_match("#puid=(\d+)#si",$_SERVER['REQUEST_URI'],$m)) {
$parent_user_id = $m[1];
................
Получаем $_GET
+159
function summArray($arr)
{
$summ = 0;
foreach($arr as $a) {
$summ += intval($a);
}
return $summ;
}
+166
function trimzero($i){
$i=trim($i);
if(is_string($i) && strlen($i)>1){
while(ereg("^0",$i))
$i=ereg_replace("^0",'',$i);
}
return $i;
}
+100
int wmain()
{
_rmCfg rmCfg;
double tt;
int i;
String *filePath=S"C:\\rm\\rm.cfg";
String * sqlstr;
rmCfg.isread=0;
String * dir[];
DateTime dt;
if (File::Exists(filePath))
{
StreamReader *sr= new StreamReader(filePath);
rmCfg.gosanPath=sr->ReadLine();
rmCfg.iakServer=sr->ReadLine();
rmCfg.iakUser=sr->ReadLine();
rmCfg.iakPassword=sr->ReadLine();
rmCfg.trackId=sr->ReadLine()->ToInt32(0);
// rmCfg.trName=sr->ReadLine();
Console::WriteLine(S"Viewing directory: ");
Console::Write(rmCfg.gosanPath);
Console::WriteLine();
Писано было на втором фреймворке. Так бы и продолжал писать, если бы товарищ не намекнул про сериализацию.
+164
<?php
$count =300;
define('MAXPROCESS',$count);
$count дальше естественно нигде не используется..
+130
//Сам скрипт
#!/bin/sh
cat /opt/chtag/truechars > /opt/chtag/tf
printf " $1@" >> /opt/chtag/tf
mp3info -p "%t" "$1">> /opt/chtag/tf
/opt/chtag/a.out < /opt/chtag/tf > /opt/chtag/t3
sh /opt/chtag/t3
//truechars
абвгдеёжзийклмнопрстуфхцчшщьыъэюяАБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЬЫЪЭЮЯ
//Исходники a.out
#include <iostream>
using namespace std;
int main()
{
int i,j;
string name,s,as="",truec;
cin >> truec;
cin >> s;
while(!cin.eof()) {as+=" "+s; cin >> s;}
name=as.substr(1,as.find("@",0)-1);
as=as.substr(as.find("'")+1);
for(i=0; i<truec.size(); i++)
{
if(as.find(truec[i],0)<truec.size())
{
cout << "printf \"" << name << " OK!\\n\"" << endl;
return 0;
}
}
cout << "printf \""<<name<<"\\'s tags will be changed...\\nBefore\\n\";\n"
"mp3info \""<< name << "\";\n"
"mid3iconv -e CP1251 -d --remove-v1 \""<< name << "\";\n"
"printf \"Now\\n\"\nmp3info \"" << name << "\""
<< endl;
return 0;
}
Вообще должен кодировку в русских тэгах в mp3 нормальной делать...