- 1
- 2
- 3
- 4
WHILE LEFT(@newstr,1)=' '
BEGIN
SET @newstr=SUBSTRING(@newstr,2,LEN(@newstr))
END
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
−46.4
WHILE LEFT(@newstr,1)=' '
BEGIN
SET @newstr=SUBSTRING(@newstr,2,LEN(@newstr))
END
Альтернативная реализация LTRIM
+48
int print(int *p)
{
int n;
int i;
char c;
clrscr();
Y cprintf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c\n\r",
201,205,205,205,209,
205,205,205,205,205,205,205,205,205,205,205,205,209,
205,205,205,205,205,205,205,205,205,205,205,205,209,
205,205,205,205,205,205,205,205,205,205,205,205,209,
205,205,205,205,209,
205,205,205,205,205,205,205,205,205,205,205,205,205,209,
205,205,205,205,205,205,205,187);
cprintf("%c %c %c Surname %c Name %c Patronymic %cYear%c Profession %c Wages %c\n\r",
186,252,179,179,179,179,179,179,186);
cprintf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c\n\r",
199,196,196,196,197,
196,196,196,196,196,196,196,196,196,196,196,196,197,
196,196,196,196,196,196,196,196,196,196,196,196,197,
196,196,196,196,196,196,196,196,196,196,196,196,197,
196,196,196,196,197,
196,196,196,196,196,196,196,196,196,196,196,196,196,197,
196,196,196,196,196,196,196,186);
for(i = 0; i < *p; i++)
{
cprintf("%c", 186);
W cprintf("%3i", i +1);
Y cprintf("%c",179);
W cprintf("%12s", rabota[i].fam);
Y cprintf("%c",179);
W cprintf("%12s", rabota[i].name);
Y cprintf("%c",179);
W cprintf("%12s", rabota[i].otch);
Y cprintf("%c",179);
W cprintf("%4i", rabota[i].year);
Y cprintf("%c",179);
W cprintf("%13s", rabota[i].prof);
Y cprintf("%c",179);
W cprintf("%7i", rabota[i].zarpl);
Y cprintf("%c\n\r", 186);
}
cprintf("%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c%c\n\r",
200,205,205,205,207,
205,205,205,205,205,205,205,205,205,205,205,205,207,
205,205,205,205,205,205,205,205,205,205,205,205,207,
205,205,205,205,205,205,205,205,205,205,205,205,207,
205,205,205,205,207,
205,205,205,205,205,205,205,205,205,205,205,205,205,207,
205,205,205,205,205,205,205,188);
W cprintf("Continue Y/N ?");
scanf("%s", &c);
if(c == 'Y' || c == 'y')
return 1;
else
exit(1);
return 0;
}
бд
+150
void log(boolean e) {
if (String.valueOf(e).length() < 5) {
System.err.println("Something bad happened.");
}
}
Логгер
+148
<?php if ($curauth->user_status == "Фотограф" && $curauth->konkurs) { echo "
<div class=\"bio-left\"><h1>Участие в конкурсах:</h1></div>
<div class=\"bio-right\">";
echo $curauth->konkurs;
echo "</div><div class=\"c-left\"></div>"; } } ?>
+154
<?php
/*
*
*
*
*/
if(!isset($_POST["links"])){
echo '<form action="links.php" method="post">
<p>Ссылки:</p>
<p><textarea rows="10" cols="45" name="links"></textarea></p>
<p><input type="submit" value="Отправить"></p>
</form>';
} else {
$array = explode("\r\n", $_POST["links"]);
foreach($array as $link){
if(preg_match("/^(http:\/\/{1})((\w+\.){1,})\w{2,}$/i", $link)){
echo "<a href=\"$link\">$link</a><br>";
}
}
}
?>
+140.9
$src= fgets($fp,1000);
if (strpos($src,"301") && $op_2) {
Pravile($src,$files[$a],1);
$mk .= "http://".$www."/".$files[$a]." HTTP 301 Moved Permanently\r\n";
echo "<a href=http://".$www."/".$files[$a]." target=\"_blank\" class=\"lime\">http://".$www."/".$files[$a]."</a> <span style=\"font-weight: bold;color: lime;\">HTTP 301 Moved Permanently</span><br>";
}
if (strpos($src,"302") && $op_2) {
Pravile($src,$files[$a],1);
$mk .= "http://".$www."/".$files[$a]." HTTP 302 Found\r\n";
echo "<a href=http://".$www."/".$files[$a]." target=\"_blank\" class=\"lime\">http://".$www."/".$files[$a]."</a> <span style=\"font-weight: bold;color: lime;\">HTTP 302 Found</span><br>";
}
if (strpos($src,"200")) {
Pravile($src,$files[$a],1);
$mk .= "http://".$www."/".$files[$a]." HTTP 200 OK\r\n";
echo "<a href=http://".$www."/".$files[$a]." target=\"_blank\" class=\"yellow\">http://".$www."/".$files[$a]."</a> <span style=\"font-weight: bold;color: yellow;\">HTTP 200 OK</span><br>";
}
if (strpos($src,"403")&& $op_1) {
Pravile($src,$files[$a],1);
$mk .= "http://".$www."/".$files[$a]." HTTP 403 Forbidden\r\n";
echo "<a href=http://".$www."/".$files[$a]." target=\"_blank\" class=\"red\">http://".$www."/".$files[$a]."</a> <span style=\"font-weight: bold;color: red;\">HTTP 403 Forbidden</span><br>";
}
if (strpos($src,"401")) {
Pravile($src,$files[$a],1);
$mk .= "http://".$www."/".$files[$a]." HTTP 401 Authorization Required\r\n";
echo "<a href=http://".$www."/".$files[$a]." target=\"_blank\" class=\"red\">http://".$www."/".$files[$a]."</a> <span style=\"font-weight: bold;color: red;\">HTTP 401 Authorization Required</span><br>";
}
if (strpos($src,"503")) {
$mk .= "http://".$www."/".$files[$a]." HTTP 503 Service Unavailable\r\n";
echo "<a href=http://".$www."/".$files[$a]." target=\"_blank\" class=\"blue\">http://".$www."/".$files[$a]."</a> <span style=\"font-weight: bold;color: blue;\">HTTP 503 Service Unavailable</span><br>";
}
if (strpos($src,"504")) {
$mk .= "http://".$www."/".$files[$a]." HTTP 504 Gateway Timeout\r\n";
echo "<a href=http://".$www."/".$files[$a]." target=\"_blank\" class=\"blue\">http://".$www."/".$files[$a]."</a> <span style=\"font-weight: bold;color: blue;\">HTTP 504 Gateway Timeout</span><br>";
}
снова вебкакер.ру ))
А что такое массивы? о_0
+136.9
$src= fgets($fp,1000);
if (strpos($src,"301") && $op_2) {
Pravile($src,$files[$a],1);
$mk .= "http://".$www."/".$files[$a]." HTTP 301 Moved Permanently\r\n";
echo "<a href=http://".$www."/".$files[$a]." target=\"_blank\" class=\"lime\">http://".$www."/".$files[$a]."</a> <span style=\"font-weight: bold;color: lime;\">HTTP 301 Moved Permanently</span><br>";
}
if (strpos($src,"302") && $op_2) {
Pravile($src,$files[$a],1);
$mk .= "http://".$www."/".$files[$a]." HTTP 302 Found\r\n";
echo "<a href=http://".$www."/".$files[$a]." target=\"_blank\" class=\"lime\">http://".$www."/".$files[$a]."</a> <span style=\"font-weight: bold;color: lime;\">HTTP 302 Found</span><br>";
}
if (strpos($src,"200")) {
Pravile($src,$files[$a],1);
$mk .= "http://".$www."/".$files[$a]." HTTP 200 OK\r\n";
echo "<a href=http://".$www."/".$files[$a]." target=\"_blank\" class=\"yellow\">http://".$www."/".$files[$a]."</a> <span style=\"font-weight: bold;color: yellow;\">HTTP 200 OK</span><br>";
}
if (strpos($src,"403")&& $op_1) {
Pravile($src,$files[$a],1);
$mk .= "http://".$www."/".$files[$a]." HTTP 403 Forbidden\r\n";
echo "<a href=http://".$www."/".$files[$a]." target=\"_blank\" class=\"red\">http://".$www."/".$files[$a]."</a> <span style=\"font-weight: bold;color: red;\">HTTP 403 Forbidden</span><br>";
}
if (strpos($src,"401")) {
Pravile($src,$files[$a],1);
$mk .= "http://".$www."/".$files[$a]." HTTP 401 Authorization Required\r\n";
echo "<a href=http://".$www."/".$files[$a]." target=\"_blank\" class=\"red\">http://".$www."/".$files[$a]."</a> <span style=\"font-weight: bold;color: red;\">HTTP 401 Authorization Required</span><br>";
}
if (strpos($src,"503")) {
$mk .= "http://".$www."/".$files[$a]." HTTP 503 Service Unavailable\r\n";
echo "<a href=http://".$www."/".$files[$a]." target=\"_blank\" class=\"blue\">http://".$www."/".$files[$a]."</a> <span style=\"font-weight: bold;color: blue;\">HTTP 503 Service Unavailable</span><br>";
}
if (strpos($src,"504")) {
$mk .= "http://".$www."/".$files[$a]." HTTP 504 Gateway Timeout\r\n";
echo "<a href=http://".$www."/".$files[$a]." target=\"_blank\" class=\"blue\">http://".$www."/".$files[$a]."</a> <span style=\"font-weight: bold;color: blue;\">HTTP 504 Gateway Timeout</span><br>";
}
снова вебхакер.ру ))
А что такое массивы? о_0
+145.5
case 'top':
$nick=$_GET["nick"];
$pass=$_GET["pass"];
mysql_query("SELECT * FROM users WHERE nick = '$nick' and pass = '$pass'");
if (@mysql_affected_rows($link)!=0){
$sub=$_POST["sub"];
$text=addslashes(strip_tags(nl2br($_POST["text"]),'<br>'));
$ip=$_SERVER["REMOTE_ADDR"];
$cat_id=$_GET["cat_id"];
mysql_query("insert into f_subject values (NULL, '$sub', '$nick', '0' , '$nick', NOW(), NOW(), '$ip' , '$text', '$cat_id')");
$row= mysql_fetch_array(mysql_query("SELECT *FROM f_cat WHERE id ='$cat_id'"));
$topics=$row["topics"]+1;
mysql_query("UPDATE f_cat SET topics='$topics' WHERE id ='$cat_id'");
}
Header("Location: index.php?cat=".$cat_id);
break;
+166.3
require_once ("dbsettings.inc");
require_once ("User.inc");
require_once ("UserFactory.inc");
require_once ("UserGroup.inc");
$login = "aa";//$_POST["login"];
$pass = "as";//$_POST ["pass"];
$__o__III___o__ = new dbsettings (
"localhost",
"root",
"*********",
"WEBSITE",
"Users" );
$__o__IV___o__= new UserFactory (
$__o__III___o__);
$TempUser= $__o__IV___o__->createUser( $login, $pass );
Ну и фантазия! ()
+144
include <stdio.h>
int main()
{
unsigned char a;
a='Я';
printf("\n%c=%d",a,a);
return 0;
}