+150
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
#! /bin/bash
# получаем ссылки на изображения и снабжаем файл разделителями на страницы
for ((i=1; i<=$1; i++))
do
echo ==== page $i === >>get2.txt
wget "http://chan.sankakucomplex.com/post?page=$i&tags=$2" -U "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.9.0.7) Gecko/2009021910 Firefox/3.0.7 (.NET CLR 3.5.30729)" -O - |pcregrep -o -e 'src[^ ]+preview[^ ]+'|sed -e 's/src\=\"//g' -e 's/\"//g' -e 's/\%20/ /g' -e 's/preview\///g' >>get2.txt
done;
# скачиваем всё, что качается
wget -nc -t 0 -i get2.txt
# очищаем и сортируем список ссылок
cat get2.txt|pcregrep -o -e 'http.+'|sort > get2.jpg.txt
# докачиваем png
ls *.jpg|pcregrep.exe -e '^[^ ]+.jpg'|sed 's/^/http:\/\/chan\.sankakucomplex\.com\/data\//'| sort>get.jpg.txt
cat get2.jpg.txt get.jpg.txt|pcregrep -o -e 'http.+'|sort|uniq -u|sed 's/jpg/png/g' > get2.png.txt
wget -nc -t 0 -i get2.png.txt
# докачиваем gif
ls *.png|pcregrep.exe -e '^[^ ]+.png'|sed 's/^/http:\/\/chan\.sankakucomplex\.com\/data\//'| sort>get.png.txt
cat get.png.txt get2.png.txt|pcregrep -o -e 'http.+'|sort|uniq -u|sed 's/png/gif/g' > get2.gif.txt
wget -nc -i get2.gif.txt
# докачиваем jpeg
ls *.gif|pcregrep.exe -e '^[^ ]+.gif'|sed 's/^/http:\/\/chan\.sankakucomplex\.com\/data\//'| sort>get.gif.txt
cat get.gif.txt get2.gif.txt|pcregrep -o -e 'http.+'|sort|uniq -u|sed 's/gif/jpeg/g' > get2.jpeg.txt
wget -nc -t 0 -i get2.jpeg.txt
# делаем батник для переименования файлов
echo -n Creating rename.bat;a=1;for i in `cat get2.txt|grep ^http | pcregrep -o -e '\/data\/[a-f0-9]+'|sed 's/\/data\///g'`; do echo move `dir $i*` `printf %06d $a`.`dir $i*`>>rename.bat;echo -n .; let "a=a+1"; done;echo Done!
# убираем за собой
#rm -f get*.txt *.htm*
грабилка донборы на баше
guest,
29 Июня 2009
+144
- 1
- 2
- 3
// функция для возвращения всякой хрени
function hren($table, $id)
{
guest,
29 Июня 2009
+196.4
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
<?$all_p= array('<a href=catalog.php?page=1&filtr=>1</a>',
'<a href=catalog.php?page=2&filtr=>2</a>',
'<a href=catalog.php?page=3&filtr=>3</a>',
'<a href=catalog.php?page=4&filtr=>4</a>',
'<a href=catalog.php?page=5&filtr=>5</a>',
'<a href=catalog.php?page=6&filtr=>6</a>',
...
'<a href=catalog.php?page=267&filtr=>267</a>',
'<a href=catalog.php?page=268&filtr=>268</a>',
'<a href=catalog.php?page=269&filtr=>269</a>',
'<a href=catalog.php?page=270&filtr=>270</a>',
'<a href=catalog.php?page=271&filtr=>271</a>',
'<a href=catalog.php?page=272&filtr=>272</a>',
'<a href=catalog.php?page=273&filtr=>273</a>',
'<a href=catalog.php?page=274&filtr=>274</a>',
'<a href=catalog.php?page=275&filtr=>275</a>',
'<a href=catalog.php?page=276&filtr=>276</a>',
'<a href=catalog.php?page=277&filtr=>277</a>',
'<a href=catalog.php?page=278&filtr=>278</a>',
'<a href=catalog.php?page=279&filtr=>279</a>'
);?>
без комментариев
guest,
29 Июня 2009
+142.3
- 1
"x_address" => $postData['address1']. trim( ' ' . $postData['address2']),
гениально =)
guest,
29 Июня 2009
+144
Сами знаете код.
Остальное из классики вроде #define TRUE FALSE и оператора передёргивания уже тут было.
guest,
28 Июня 2009
+170.2
- 1
- 2
- 3
mov eax, pony
jnz pony
jmp magiccastle
Поне!
Din,
28 Июня 2009
+153
- 1
break; break; break; // PLEASE, BREAK!!!!!!
guest,
28 Июня 2009
+144
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
static void Menu()
{
ATD atd = new ATD();
int i = 0; String s;
while (i!=6){
Console.WriteLine("Пожалуйста, укажите необходимое действие:");
Console.WriteLine("*******************************************");
Console.WriteLine("1) Добавить элемент в список");
Console.WriteLine("2) Просмотреть список");
Console.WriteLine("3) Сортировать список");
Console.WriteLine("4) Найти элементы");
Console.WriteLine("5) Удалить элемент из списка");
Console.WriteLine("6) Выход");
Console.WriteLine("*******************************************");
Console.WriteLine();
Console.Write("->");
s = Console.ReadLine();
i = Convert.ToInt32(s);
Console.WriteLine();
// Console.WriteLine("i = " + i);
if (i == 1) atd.AddElement();
else if (i == 2) atd.WriteList();
else if (i == 3) atd.SortList();
else if (i == 4) atd.FindElements();
else if (i == 5) atd.DeleteElement();
else if (i == 6) Console.WriteLine("Программа завершена...");
else Console.WriteLine("Введите корректное значение!");
Console.WriteLine();
Console.WriteLine();
}
}
Пример реализации меню.
Автор — неизвестен
guest,
28 Июня 2009
+141
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
typedef INTEGER int
typedef BOOLEAN bool
#define TRUE true
#define FALSE false
#define BEGIN {
#define END }
#define WHILE(a) while(a)
#define REPEAT do{
#define UNTIL(a) }while(!(a))
#define FOR for(
#define TO(a,b) ,a<b
#define DO(a) ,a++)
#define VAR
#define IF if
#define THEN
...
VAR
INTEGER I;
BEGIN
I=2;
REPEAT
...
I=I+1;
UNTIL I<5;
...
END
...
Что этот парень пытался сделать с Си? O_o
guest,
28 Июня 2009
+122.4
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
/* sent by Stephan Hughson - 2003 */
/* must be compiled with cc or g++*/
#include <stdio.h>
int main(int t,int _,char*a)
{return!0<t?t<3?main(-79,-13,a+main(-87,1-_,
main(-86, 0, a+1 )+a)):1,t<_?main(t+1, _, a ):3,main ( -94, -27+t, a
)&&t == 2 ?_<13 ?main ( 2, _+1, "%s %d %d\n" ):9:16:t<0?t<-72?main(_,
t,"@n'+,#'/*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#{l,+,/n{n+\
,/+#n+,/#;#q#n+,/+k#;*+,/'r :'d*'3,}{w+K w'K:'+}e#';dq#'l q#'+d'K#!/\
+k#;q#'r}eKK#}w'r}eKK{nl]'/#;#q#n'){)#}w'){){nl]'/+#n';d}rw' i;# ){n\
l]!/n{n#'; r{#w'r nc{nl]'/#{l,+'K {rw' iK{;[{nl]'/w#q#\
n'wk nw' iwk{KK{nl]!/w{%'l##w#' i; :{nl]'/*{q#'ld;r'}{nlwb!/*de}'c \
;;{nl'-{}rw]'/+,}##'*}#nc,',#nw]'/+kd'+e}+;\
#'rdq#w! nr'/ ') }+}{rl#'{n' ')# }'+}##(!!/")
:t<-50?_==*a ?putchar(a[31]):main(-65,_,a+1):main((*a == '/')+t,_,a\
+1 ):0<t?main ( 2, 2 , "%s"):*a=='/'||main(0,main(-61,*a, "!ek;dc \
i@bK'(q)-[w]*%n+r3#l,{}:\nuwloca-O;m .vpbks,fxntdCeghiry"),a+1);}
Вот результат работы программы(всё не вместилось):
On the first day of Christmas my true love gave to me
a partridge in a pear tree.
On the second day of Christmas my true love gave to me
two turtle doves
and a partridge in a pear tree.
...
On the eighth day of Christmas my true love gave to me
eight maids a-milking, seven swans a-swimming,
six geese a-laying, five gold rings;
four calling birds, three french hens, two turtle doves
and a partridge in a pear tree.
On the ninth day of Christmas my true love gave to me
nine ladies dancing, eight maids a-milking, seven swans a-swimming,
six geese a-laying, five gold rings;
four calling birds, three french hens, two turtle doves
and a partridge in a pear tree.
On the tenth day of Christmas my true love gave to me
ten lords a-leaping,
nine ladies dancing, eight maids a-milking, seven swans a-swimming,
six geese a-laying, five gold rings;
four calling birds, three french hens, two turtle doves
and a partridge in a pear tree.
On the eleventh day of Christmas my true love gave to me
eleven pipers piping, ten lords a-leaping,
nine ladies dancing, eight maids a-milking, seven swans a-swimming,
six geese a-laying, five gold rings;
four calling birds, three french hens, two turtle doves
and a partridge in a pear tree.
On the twelfth day of Christmas my true love gave to me
twelve drummers drumming, eleven pipers piping, ten lords a-leaping,
nine ladies dancing, eight maids a-milking, seven swans a-swimming,
six geese a-laying, five gold rings;
four calling birds, three french hens, two turtle doves
and a partridge in a pear tree.
guest,
28 Июня 2009