- 1
- 2
$ if [ "0" != "0" ]; then make i8086gui;else echo "GTK GUI is disabled - may be you lack of gtk!";fi;
GTK GUI is disabled - may be you lack of gtk!
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
−145
$ if [ "0" != "0" ]; then make i8086gui;else echo "GTK GUI is disabled - may be you lack of gtk!";fi;
GTK GUI is disabled - may be you lack of gtk!
Странная какая-то проверка наличия GTK в мєйкфайле...
+145
<?
// Функция для того, чтобы иЗ***оВаТь текст
$str = 'бросайте вы корявить текст';
function koryavka ($t){
$c = strlen($t);
for($i=0;$i<$c;$i++) {
$t[$i] = (is_int($i/2)) ? strtoupper($t[$i]) : $t[$i];
$ret[] = $t[$i];
}
return implode('',$ret);
}
echo koryavka ($str);
?>
−858
create function is_numeric (
@a varchar(100)
) returns int as begin
declare @retval int
set @a = replace(@a, '0', '')
set @a = replace(@a, '1', '')
set @a = replace(@a, '2', '')
set @a = replace(@a, '3', '')
set @a = replace(@a, '4', '')
set @a = replace(@a, '5', '')
set @a = replace(@a, '6', '')
set @a = replace(@a, '7', '')
set @a = replace(@a, '8', '')
set @a = replace(@a, '9', '')
set @a = replace(@a, '.', '')
if len(rtrim(ltrim(@a))) > 0 set @retval = 0
else set @retval = 1
return @retval
end
Вот такая хитрая скалярная функция была найдена в недрах сопровождаемой системы. Согласно ей "...42...42..." -- это число, такие дела.
+154
http://vkontakte.ru/
<noscript><meta http-equiv="refresh" content="0; URL=/badbrowser.php"></noscript>
http://vkontakte.ru/badbrowser.php
<script type="text/javascript">
<!--
//window.checkbrowser = true;
if (window.checkbrowser) {
try {
if (new XMLHttpRequest()) {
location.replace('/');
}
} catch(e) {
try {
if (new ActiveXObject('Msxml2.XMLHTTP')) {
location.replace('/');
}
} catch(e) {}
try {
if (new ActiveXObject('Microsoft.XMLHTTP')) {
location.replace('/');
}
} catch(e) {}
}
}
-->
</script>
Вот так суровые вконтактостроители отправляют на йуг пользователей NoScript.
+159
public static function encode($value, $cycleCheck = false, $options = array())
{
$encoder = new self(($cycleCheck) ? true : false, $options);
return $encoder->_encodeValue($value);
}
Zend Framework, Zend_Json_Encoder
+76
for (int j = 0; j < fieldsToRemove.size(); j++) {
if (fieldsToDelete.getField(j).getKind().equals("GroupField")) {
resFieldContr.remove(j--);
}
}
собственно цикл.
нашел в рабочем проекте
+84
http://svn.codehaus.org/groovy/trunk/groovy/groovy-core/src/main/org/codehaus/groovy/runtime/ArrayUtil.java
/*
* Copyright 2003-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codehaus.groovy.runtime;
public class ArrayUtil {
private static final Object[] EMPTY = new Object[0]
;
public static Object[] createArray() {
return EMPTY;
}
public static Object[] createArray(Object arg0) {
return new Object[]{
arg0};
}
public static Object[] createArray(Object arg0, Object arg1) {
return new Object[]{
arg0, arg1};
}
public static Object[] createArray(Object arg0, Object arg1, Object arg2) {
return new Object[]{
arg0, arg1, arg2};
}
public static Object[] createArray(Object arg0, Object arg1, Object arg2, Object arg3) {
return new Object[]{
arg0, arg1, arg2, arg3};
}
public static Object[] createArray(Object arg0, Object arg1, Object arg2, Object arg3, Object arg4) {
return new Object[]{
arg0, arg1, arg2, arg3, arg4};
}
public static Object[] createArray(Object arg0, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5) {
return new Object[]{
arg0, arg1, arg2, arg3, arg4, arg5};
}
public static Object[] createArray(Object arg0, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5, Object arg6) {
return new Object[]{
arg0, arg1, arg2, arg3, arg4, arg5, arg6};
}
............
+170
$fh = fopen($filename, r);
while(($str = fread($fh, 1024)) != null) $fsize += strlen($str);
Вот так теперь в PHP принято определять размер файла.
−178
if <fr_Pipeline1."OPERNAME"> = 'Тупаков Н.В.' then Memo50.Text:='Телефон: 350-24-53';
if <fr_Pipeline1."OPERNAME"> = 'Абрамовна Мария Н.' then Memo50.Text:='Телефон: 531-39-86';
if <fr_Pipeline1."OPERNAME"> = 'Кошкина Р.Ф.' then Memo50.Text:='Телефон: 170-83-28';
if <fr_Pipeline1."OPERNAME"> = 'Шабанов Д.Л.' then Memo50.Text:='Телефон: 981-04-61';
if <fr_Pipeline1."OPERNAME"> = 'Ирискина Рита Н.' then Memo50.Text:='Телефон: 330-58-55';
if <fr_Pipeline1."OPERNAME"> = 'Бъенсе Н.Б.' then Memo50.Text:='Телефон: 761-77-93';
if <fr_Pipeline1."OPERNAME"> = 'Батрудинова О.П.' then Memo50.Text:='Телефон: 580-55-42';
if <fr_Pipeline1."OPERNAME"> = 'Кудина Д.М.' then Memo50.Text:='Телефон: 440-61-62';
Повторение мать учения :))
+145
$ptn = "^[а-яА-Я]{1,}$";
$str = "т";
ereg($ptn, $str, $matches);
print_r($matches);
Почему не видит русской маленькой буквы "т". Это из-зи юникода? ПХП - говно значит