- 1
- 2
- 3
- 4
- 5
- 6
- 7
if (File.Exists(local)) {
if (Connect()) {
if (ftpConnection.Exists(remote)) {
//code
}
}
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+109
if (File.Exists(local)) {
if (Connect()) {
if (ftpConnection.Exists(remote)) {
//code
}
}
}
+158
$('#home').click(function(){
$.get("q.php", { id: 1 }, function(data){
$('#content').html(data);
});
});
$('#programz').click(function(){
$.get("q.php", { id: 2 }, function(data){
$('#content').html(data);
});
});
$('#contactz').click(function(){
$.get("q.php", { id: 3 }, function(data){
$('#content').html(data);
});
});
$('#aboutazz').click(function(){
$.get("q.php", { id: 4 }, function(data){
$('#content').html(data);
});
});
$('#chatz').click(function(){
$.get("q.php", { id: 5 }, function(data){
$('#content').html(data);
});
});
$('#advertisement').click(function(){
$.get("q.php", { id: 6 }, function(data){
$('#content').html(data);
});
Jquery во всей красе.
+78
public Boolean checkPermission(String login, Integer nIdObject, String sObjectSSCode, Integer nIdOperation, String sOperationSSCode, String sSubsystemCode)
Вот так Windows разъедает мозг разработчиков. Венгерская запись прокралась в Java-код. Да и Boolean с Integer не совсем в тему.
И, конечно, метод нужно было назвать
hasPermission
.
+168
function b_desc($value){
return ($value);
}
function a_id($value){
return $value;
}
function a_name($value){
return $value;
}
function b_name($value){
return ($value);
}
function b_alias($value){
return ($value);
}
function c_name($value){
return ($value);
}
function c_id($value){
return ($value);
}
function c_level($value){
return ($value);
}
function g_id($value){
return ($value);
}
function g_name($value){
return ($value);
}
function g_desc($value){
return ($value);
}
function g_appointment($value){
return ($value);
}
function g_tech_desc($value){
return ($value);
}
Функции для отбработки значений, полученных из БД. Одно поле — одна функция. Выполняются все хором для каждой записи.
+114
static Queue<string> getProxiesFromFile(string filename)
{
Queue<string> temp=new Queue<string>();
System.IO.StreamReader file;
string line;
// Read the file and display it line by line.
if (filename == null)
{
file = new System.IO.StreamReader("proxy.txt");
}
else
{
try
{
file = new System.IO.StreamReader(filename);
}
catch (FileNotFoundException)
{
throw;
}
}
while ((line = file.ReadLine()) != null)
{
temp.Enqueue (line);
Console.WriteLine(line);
}
return temp;
}
Считываем файл построчно и заносим в Queue<string> .
+146
<span id="#spanforum"></span>
Забавно ;)
+147
int __fastcall TForm1::iscomm(AnsiString str)
{
int i=1;
while (str[i]==' ')
i++;
if (str[i]=='#')
{
return 1;
}
else
{
return 0;
};
};
+147
cout<<"enterX"<<endl;
cin >>x;
x = 0.125;
+147
uint32_t getuint32(char *p){
return (*p<<24)|(*(p+1)<<16)|(*(p+2)<<8)|(*(p+3));
}
+147
if(dOper1p->Caption == "-0")
dOper1p->Caption = "+0";
if(dOper2p->Caption == "-0")
dOper2p->Caption = "+0";
if(dOper1m->Caption == "-0.0")
dOper1m->Caption = "+0.0";
if(dOper2m->Caption == "-0.0")
dOper2m->Caption = "+0.0";