- 1
http://pragmaticperl.com/issues/26/pragmaticperl-26-грамматики-в-perl-6.html
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+1
http://pragmaticperl.com/issues/26/pragmaticperl-26-грамматики-в-perl-6.html
:3
Где еще такое может быть то?
0
if (true === false)
не ну шоб наверняка
+1
Страйкер приде — почту почине!
Грустно без уведомлений из любимой соцсети.
+1
https://code.jsoftware.com/wiki/Jd/Guide
> A db is a folder with a folder for each table. Each table folder has a folder for each column. Each folder has a few metadata files (prefix jd).
Я знаю, что базы данных обычно хранятся в файлах. А зачем хранить их как здесь, в котологах и файлах? Мы же получаем в базе ограничения и баги файловой системы (типа https://code.jsoftware.com/wiki/Jd/Ops_common#names), а если хотим переносимости, то нескольких ФС.
0
var text_message = "";
text_message += "\n Вопрос №1: " + $('input[name=question_0]:checked').parent().parent().parent().find(".title").text() + " Ответ: " + $('input[name=question_0]:checked').val();
text_message += "\n Вопрос №2: " + $('input[name=question_1]:checked').parent().parent().parent().find(".title").text() + " Ответ: " + $('input[name=question_1]:checked').val();
text_message += "\n Вопрос №3: " + $('input[name=question_2]:checked').parent().parent().parent().find(".title").text() + " Ответ: " + $('input[name=question_2]:checked').val();
text_message += "\n Вопрос №4: " + $('input[name=question_3]:checked').parent().parent().parent().find(".title").text() + " Ответ: " + $('input[name=question_3]:checked').val();
text_message += "\n Вопрос №5: " + $('input[name=question_4]:checked').parent().parent().parent().find(".title").text() + " Ответ: " + $('input[name=question_4]:checked').val();
text_message += "\n Вопрос №6: " + $('input[name=question_5]:checked').parent().parent().parent().find(".title").text() + " Ответ: " + $('input[name=question_5]:checked').val();
ууууиииииии
0
public function passes($attribute, $hostname)
{
if (!mb_stripos($hostname, '.')) {
return false;
}
$domain = explode('.', $hostname);
$allowedChars = ['-'];
$extenion = array_pop($domain);
foreach ($domain as $value) {
$fc = mb_substr($value, 0, 1);
$lc = mb_substr($value, -1);
if (
hash_equals($value, '')
|| in_array($fc, $allowedChars)
|| in_array($lc, $allowedChars)
) {
return false;
}
if (!ctype_alnum(str_replace($allowedChars, '', $value))) {
return false;
}
}
if (
!ctype_alnum(str_replace($allowedChars, '', $extenion))
|| hash_equals($extenion, '')
) {
return false;
}
if (filter_var($hostname, FILTER_VALIDATE_DOMAIN) === false) {
return false;
}
return true;
}
валидация домена...
+1
https://imgur.com/a/IgqXRK7
−1
$type = ($_POST['type'] == 'any') ? '' : str_replace(' ', '%20', str_replace('|','%7C', $_POST['type']));
$make = ($_POST['make'] == 'any') ? '' : str_replace(' ', '%20', str_replace('|','%7C', $_POST['make']));
$url = 'http://www.cycletrader.com/search-results?sort=featured%3Aasc&page='.$_POST['page'].'&type='.$type.'&make='.$make;
$str = getCurlObject($url);
$content = multiexplode('<div id="searchPage"', '<div class="footer', $str);
$list = multiexplode('<div id="gridView"', '<div class="rezDetailsBtm', $content);
$field = explode('<div data-url=', $list);
for ($k = 1; $k < count($field); $k++) {
$title_tmp = multiexplode('<a class="listing-info-title', '</a>', $field[$k]);
$title = multiexplode('title="', '"', $title_tmp);
$link = $lang['dir'].'detail?'.$_POST['form'].'&'.multiexplode('href="', '"', $title_tmp);
$img_tmp = multiexplode('<img', '/>', $field[$k]);
$img = multiexplode('data-src="', '"', $img_tmp);
$price_tmp = multiexplode('class="price', '</span>', $field[$k]);
if (strripos($price_tmp,'<span class="mileage">')) {
$price = multiexplode('<span>', '<span', $price_tmp);
} else {
$price = multiexplode('<span>', '</span>', $price_tmp);
}
if (trim($price) == 'Call for price') $price = '';
$result['item'][$k]['link'] = $link;
$result['item'][$k]['title'] = $title;
$result['item'][$k]['img'] = $img;
$result['item'][$k]['price'] = $price;
$result['item'][$k]['location'] = $location;
}
if (strripos($content,'<div class="pagination')) {
$pagination = multiexplode('<div class="pagination', '</div>', $content);
$pagination_tmp = multiexplode('<span class="hidden-xs','</div>', $pagination);
$pagination_item = explode('<li', $pagination);
if (count($pagination_item) > 6) {
$result['pagination'] = true;
}
}
Стандартный похокод пыходибила.
−106
Скрипаль заебал, Хачатурян заебал, Хабиб заебал, Мамаев заебал, Кокорин заебал, Цеповяз остоёб.
+4
unit ZwDeleteFileSample;
interface
uses Windows, nt_status, native, hal, fcall, macros, ntoskrnl;
function _DriverEntry(DriverObject: PDriverObject; RegistryPath: PUnicodeString): NTSTATUS; stdcall;
implementation
procedure DriverUnload(pDriverObject: PDriverObject); stdcall;
begin
DbgPrint('Test Driver :: Unloaded');
end;
function _DriverEntry(DriverObject: PDriverObject; RegistryPath: PUnicodeString): NTSTATUS; stdcall;
var UNICODESTRING: UNICODE_STRING;
obj: OBJECT_ATTRIBUTES;
begin
DbgPrint('Test Driver :: Loaded');
DriverObject^.DriverUnload := @DriverUnload;
RtlInitUnicodeString(UNICODESTRING, '\??\C:\test.exe');
InitializeObjectAttributes(obj, @UNICODESTRING, OBJ_CASE_INSENSITIVE + OBJ_KERNEL_HANDLE, 0, nil);
Result := ZwDeleteFile(@obj);
if Result = STATUS_SUCCESS then
begin
DbgPrint('File deleted sucessfully - Result:0x%.8X', Result); // Result to get Error Code
end else
begin
DbgPrint('Fail to delete file - Result:0x%.8X', Result); // Result to get Error Code
DbgPrint('Object name :%wZ', obj.ObjectName); // Result to get Error Code
end;
Result := STATUS_SUCCESS;
end;
end.
Драйвер на дэлфи. Ничего необычного, листайте дальше.