- 1
- 2
$Fp = join("", file("Logs.txt"));
$Fp1 = explode("\r\n\r\n", $Fp);
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+136.9
$Fp = join("", file("Logs.txt"));
$Fp1 = explode("\r\n\r\n", $Fp);
Норм сиги
+140.1
//cache control side box detect
if ((USE_CACHE == 'true') && empty($SID) && ($column['cfgtitle'] == 'categories1.php') ) {
echo tep_cache_categories_box();
} else if ((USE_CACHE == 'true') && empty($SID) && ($column['cfgtitle'] == 'categories.php') ) {
echo tep_cache_categories_box();
} else if ((USE_CACHE == 'true') && empty($SID) && ($column['cfgtitle'] == 'categories2.php') ) {
echo tep_cache_categories_box1();
} else if ((USE_CACHE == 'true') && empty($SID) && ($column['cfgtitle'] == 'categories3.php') ) {
echo tep_cache_categories_box3();
} else if ((USE_CACHE == 'true') && empty($SID) && ($column['cfgtitle'] == 'categories4.php') ) {
echo tep_cache_categories_box4();
} else if ((USE_CACHE == 'true') && empty($SID) && ($column['cfgtitle'] == 'categories5.php') ) {
echo tep_cache_categories_box5();
} else if ((USE_CACHE == 'true') && empty($SID) && ($column['cfgtitle'] == 'coolmenu.php') ) {
echo tep_cache_coolmenu();
} else if ((USE_CACHE == 'true') && empty($SID) && ($column['cfgtitle'] == 'manufacturers.php') ) {
echo tep_cache_manufacturers_box();
} else {
require(DIR_FS_TEMPLATE_BOXES . '/' . $column['cfgtitle']);
}
Хотите интернет-магазин? Не спрашивайте про крелоад.
+133.8
iplist += "<ul id='iplist'>";
jsonData="[";
for(var i=0;i<selections.length;i++) {
jsonData += Ext.util.JSON.encode(selections[i])+",";
iplist += "<li>" + selections[i] + "; </li>";
}
jsonData = jsonData.substring(0,jsonData.length-1) + "]";
iplist += "</ul>";
win.show();
Ext.get("list").update(iplist);
win.hide();
win.show();
В ExtJS не хотел обновляться компонент окна.
−854
select * from Etbagent where id=555
слово хуй
+167.3
GLOBAL $_SERVER;
GLOBAL $_COOKIE;
.......
Вот переделывал код одного товариша, и так и не смог понять зачем вот эти строчки он добавлял в КАЖДЫЙ файл
+154
package com.photoholding.processimage.eugene;
import java.awt.Point;
import java.awt.Rectangle;
import magick.ImageInfo;
import magick.MagickException;
import magick.MagickImage;
public class ProcessA {
private MagickImage img;
private String text;
private String imageOrigin;
private String fout;
private String fmount;
private final String tmpImg = "tmpIM.jpg";
private final String tmpMnt = "tmpMounted.jpg";
private final int width = 1607;
private final int height = 1205;
public ProcessA( String txt, String fin, String fout, String fmount ){
if( txt.length() > 52 ){
System.out.println( "error: text string more than 52" );
System.exit(0);
}
this.text = txt;
this.img = getImage( fin );
this.imageOrigin = fin;
this.fmount = fmount;
this.fout = fout;
}
private MagickImage getImage( String fin2 ) {
MagickImage im = null;
try {
im = new MagickImage( new ImageInfo( fin2 ) );
} catch ( MagickException e ) {
e.printStackTrace();
return null;
}
return im;
}
public boolean doProcess(){
try {
scaleGenerally();
annotateMounted();
montage();
} catch ( Exception e ) {
e.printStackTrace();
return false;
}
return true;
}
private void montage() throws Exception {
MagickProcessing mp = new MagickProcessing();
mp.montage( tmpMnt, tmpImg, fout );
}
private void annotateMounted() throws Exception {
MagickProcessing mp = new MagickProcessing();
mp.annotateImage( text, new Point( 115, 1195 - ( 598 - ( ( text.length() / 2 ) * 23 ) ) ), fmount, tmpMnt );
}
protected boolean scaleGenerally() throws Exception {
int h = img.getDimension().height;
int w = img.getDimension().width;
MagickProcessing mp = new MagickProcessing();
if( h > w ){
if ( !mp.rotateANDscale( "1607x", imageOrigin, tmpImg )) return false;
img = getImage( tmpImg );
h = img.getDimension().height;
w = img.getDimension().width;
if( h < height ){
if( !mp.rotateANDscale( "x1205", imageOrigin, tmpImg )) return false;
img = getImage( tmpImg );
h = img.getDimension().height;
w = img.getDimension().width;
}
if( !mp.crop( new Rectangle( ( w - width ) / 2, 0, 1607, 1205 ), tmpImg, tmpImg )) return false;
} else {
if( !mp.scaleImage( "1607x", imageOrigin, tmpImg ) ) return false;
img = getImage( tmpImg );
h = img.getDimension().height;
w = img.getDimension().width;
if( h < height ){
if( !mp.scaleImage( "x1205", imageOrigin, tmpImg ) ) return false;
if( !mp.crop( new Rectangle( ( w - width ) / 2, 0, 1607, 1205 ), tmpImg, tmpImg ) ) return false;
} else if( h > height ){
if( !mp.crop( new Rectangle( 0, (int)( h - height ) / 2, width, height ), tmpImg, tmpImg )) return false;
}
}
return true;
}
}
постановка задачи - нужен метод для вращения изображений
−272.6
set DISK=none
set BOOTFLAG=boot666s.tmp
echo This file is used to determine current drive letter. It should be deleted. >\%BOOTFLAG%
if not exist \%BOOTFLAG% goto readOnly
echo Wait please, searching for current drive letter.
for %%d in ( C D E F G H I J K L M N O P Q R S T U V W X Y Z ) do if exist %%d:\%BOOTFLAG% set DISK=%%d
Это из батника bootinst.bat LiveCD Slax6. Он должен сделать флешку бутабельной. При всем уважении... И да, добавьте CMD в список языков.
+152
if (count($auction)<1) return false; // backup
ппц
+140
<?php
define ("CONST", "govno");
while (CONST=="GOVNO") { echo '<a href="http://govnokod.ru">Govnokod</a><br>'; flush(); }
?>
гыгыгыгыгыгы
+144.1
... and p.products_group_access like '%,". $customer_group_id.",%'
OR
p.products_group_access like '%,". $customer_group_id."'
OR
p.products_group_access like '". $customer_group_id.",%'
OR
p.products_group_access = '". $customer_group_id."')";
REGEXP уже не рулят