- 1
https://web.archive.org/web/20070125181458/http://2ch.ru/s/src/1158095011998.gif
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
0
https://web.archive.org/web/20070125181458/http://2ch.ru/s/src/1158095011998.gif
+2
$(document).ready(function(){
$('.field').click(function(){
$('.selected').removeClass('selected');
$(this).addClass('selected');
$(this).click(function(){
$('#move').attr('disabled', true);
$('.selected, .field').removeClass('visible');
$('.field').text('');
$('.selected').html('<span id="user"><img src="user.gif"></span>');
$('.selected').next().addClass('visible');
$('.selected').next().next().next().next().next().next().addClass('visible');
$('.selected').next().next().next().next().next().next().next().addClass('visible');
$('.selected').next().next().next().next().next().next().next().next().addClass('visible');
//$('.selected').addClass('visible');
$('.selected').prev().addClass('visible');
$('.selected').prev().prev().prev().prev().prev().prev().addClass('visible');
$('.selected').prev().prev().prev().prev().prev().prev().prev().addClass('visible');
$('.selected').prev().prev().prev().prev().prev().prev().prev().prev().addClass('visible');
});
...
Поле перемещения, написано около года назад :D не знал как можно по-другому
+3
NSString *userName = @"username";
self.wscSession = [[[[[[[[[[[[WSCSessionBuilder create:urlString]
withConnectionDelegate:WSCSessionConnectionDelegate]
withUserName:userName]
withObserverDelegate:WSCSessionConnectionObserverDelegate]
withPackage:[[WSCCallPackage alloc] init]]
withHttpContext:httpContext]
withIceServerConfig:iceServerConfig]
build];
// Open a connection to the server...
[self.wscSession open];
https://docs.oracle.com/cd/E55119_01/doc.71/e55126/wd_iosapps.htm#WSEWD548
Оракл умеет в скобочки
P.S. Зато они сделали SIP+WS+WebRTC
+1
def inputCountSeq():
try:
countSeq=int(input("Введите количество элементов в последовательности от 1 до 1000: \r >"))
except :
print("[Ошибка] Введенные вами данные неверны")
inputCountSeq()
if (countSeq > 1000 or countSeq < 1):
print("[Ошибка] Введенное число не соответствует указанному диапазону( 1 <= x <= 1000)")
inputCountSeq()
return countSeq
print(inputCountSeq())
Вводим -1 , получаем ошибку "Введенное число не соответствует указанному диапазону" ,после чего вводим 1 , а в возвращается все равно -1.
https://repl.it/IAMA/3
+1
sort((a, b) => 0 - (a.Bias > b.Bias ? 1 : -1))
−19
ideone.com/4DdZvo
Спойлер: Оно компилится, но выводит компилятор какую то поебень
0
#include "hex.h"
#include "aes.h"
#include <stdio.h>
#define KEY (0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c)
#define DATA (0x32, 0x43, 0xf6, 0xa8, 0x88, 0x5a, 0x30, 0x8d, 0x31, 0x31, 0x98, 0xa2, 0xe0, 0x37, 0x07, 0x34)
unsigned char enc[] = { BPP_AES_ENCRYPT_ARRAY(KEY, DATA) };
int main() {
for (int i=0; i<sizeof(enc); ++i) {
printf("%02X ", enc[i]);
}
printf("\n");
return 0;
+1
#include "hex.h"
#include "aes.h"
#include <stdio.h>
#define KEY (0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c)
#define DATA (0x32, 0x43, 0xf6, 0xa8, 0x88, 0x5a, 0x30, 0x8d, 0x31, 0x31, 0x98, 0xa2, 0xe0, 0x37, 0x07, 0x34)
unsigned char enc[] = { BPP_AES_ENCRYPT_ARRAY(KEY, DATA) };
int main() {
for (int i=0; i<sizeof(enc); ++i) {
printf("%02X ", enc[i]);
}
printf("\n");
return 0;
}
0
if ($request_uri ~ .*\?$) {
set $uri_is_matched "tr";
}
if ($args = "") {
set $args_are_empty "ue";
}
set $result "${uri_is_matched}${args_are_empty}";
if ($result = "true") {
return 301 $uri;
}
Конфиг nginx
0
#define SPLICE(a,b) SPLICE_1(a,b)
#define SPLICE_1(a,b) SPLICE_2(a,b)
#define SPLICE_2(a,b) a##b
#define LL(a,b) SPLICE_2(a,b)
#define L(a) LL(a,LOC)
#define LOC sub1
.func sub1
sub1:
ljmp L(L1)
L(L1):
nop
.endfunc
#define LOC sub2
.func sub2
sub2:
ljmp L(L1)
L(L1):
nop
.endfunc
Когда захотел сделать local labels в ассемблере через сишный препроцессор