- 1
++[>+++++[>++++++<-]<-]++[>+++++<-]>>+++<<+[[,----------]>>.<.<+]
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+125
++[>+++++[>++++++<-]<-]++[>+++++<-]>>+++<<+[[,----------]>>.<.<+]
ed на brainfuck'е
+132
<div id="bFooter">
<ul class="bNav">
<li><a href="/help.php?page=about">о сайте</a></li>
<li><a href="/techsupp.php">техподдержка</a></li>
<li><a href="/jobs.php">вакансии</a></li>
<li><a href="/blog.php">блог</a></li>
<li><a href="/help.php?page=terms">правила</a></li>
<li><a href="/ads.php?tabs=1">реклама</a></li>
<li><a href="/developers.php">разработчикам</a></li>
<li><a href="/pages.php?o=-1&p=Merchant%20API">магазинам</a></li>
</ul>
</div>
<div id="bFooter">
<p>В Контакте © 2006-2010 <a href="#" onclick="return changeLang();" class="langSelector">Русский</a><br /><small><a href="http://vkontakte.ru/id1">Павел Дуров</a></small></p>
</div>
Где-то я слышал, что id должен быть уникальным.
+1
function test() {
const ws = new WebSocket('ws://127.0.0.1:445');
ws.addEventListener('close', event =>
console.log('event.code = ', event.code, '; event.reason = ', event.reason)
);
ws.close(3500, 'some reason');
}
test();
Кто угадает значения полей event.code и event.reason — тому два нихуя.
Кто угадает значение одного из полей — тому одно нихуя.
+1
<?php include_once("routing" .DIRECTORY_SEPARATOR . "Router.php");?>
<?php include_once("task" . DIRECTORY_SEPARATOR . "Task.php");?>
<?php include_once("db" . DIRECTORY_SEPARATOR . "DB.php");?>
<?php include_once("model" . DIRECTORY_SEPARATOR . "Model.php");?>
<?php
class App{
public static $webuser = null;
public static $config;
public static $routing;
public static $DB;
public static $document_root;
public static function run($config){
//config
self::$config = $config;
/**
* init database
*/
$db = new DB();
$db->connect(self::$config['db']);
self::$DB = $db;
/**
* Run task
*/
$request = Router::getRequest(self::$config['default_task']);
$task_path = self::$document_root . DIRECTORY_SEPARATOR . "tasks" . DIRECTORY_SEPARATOR . $request . ".php";
if(file_exists($task_path )){
include_once($task_path);
$task = new $request();
$task->init();
}else {
throw new Exception("File don't exists");
}
}
public static function isGuest(){
if(is_null(self::$webuser)){
return true;
}
return false;
}
}
?>
http://govnokod.ru/27036#comment585451
https://habr.com/ru/post/523828/https://habr.com/ru/post/523828/
я так ахуел, что скачал и посмотрел... говорят теперь я должен сжечь комп
0
var io = java.io
var BufferedReader = io.BufferedReader
var BufferedWriter = io.BufferedWriter
var InputStreamReader = io.InputStreamReader
var OutputStreamWriter = io.OutputStreamWriter
var Socket = java.net.Socket
var socket = new Socket("localhost", 5050)
var input = new BufferedReader(new InputStreamReader(socket.getInputStream()))
var output = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream()));
while(true){
var data = input.readLine()
console.log(data)
}
Один петух написал мне в три часа ночи с прозьбой помочь с кодом
+1
catch (Exception &exception)
{
Application->ShowException(&exception);
}
catch (...)
{
try
{
throw Exception("");
}
catch (Exception &exception)
{
Application->ShowException(&exception);
}
}
https://github.com/greatis/Anti-WebMiner/blob/master/AntiWebMiner.cpp#L23
+3
#include "gc.h"
static bool PointerNotOwnedByParentStackFrame(struct StackFrame *frame,
struct StackFrame *parent,
void *ptr) {
return !(((intptr_t)ptr > (intptr_t)frame) &&
((intptr_t)ptr < (intptr_t)parent));
}
/**
* Adds destructor to garbage shadow stack.
*
* @param frame is passed automatically by wrapper macro
* @param fn takes one argument
* @param arg is passed to fn(arg)
* @return arg
*/
void __defer(struct StackFrame *frame, void *fn, void *arg) {
struct StackFrame *frame2;
if (!arg) return;
frame2 = __builtin_frame_address(0);
assert(frame2->next == frame);
assert(PointerNotOwnedByParentStackFrame(frame2, frame, arg));
if (append(&__garbage, /* note: append() not included */
(&(const struct Garbage){frame->next, (intptr_t)fn, (intptr_t)arg,
frame->addr})) != -1) {
frame->addr = (intptr_t)&__gc;
} else {
abort();
}
}
deferы в Сищечке
https://gist.github.com/jart/aed0fd7a7fa68385d19e76a63db687ff
+5
#include <stdio.h>
#define UPP 300
float conversion(float fahr);
main(){
float far;
int a;
a = UPP;
for(far = 0; far <= a; ++++++++++++++++++++++++++++++++++++++++far)
printf("%.f\t%.1f\n", far, conversion(far));
}
float conversion(float cels){
float c;
c = ((5*(cels-32))/(9));
return c;
}
how do I make it 20 by 20 in a shorter way, without having to put 20 times "++" please
https://www.reddit.com/r/C_Programming/comments/ff5zph/how_do_i_make_it_20_by_20_in_a_shorter_w ay/
+1
import re, copy, json
config = {}
def domain_mapper(domain):
def injector(f):
if domain not in config:
config[domain] = []
config[domain].append(f)
return injector
def default(f):
config['default'] = [f]
return f
@domain_mapper("gmail.com")
@default
def google_filter(content):
regex = r"([^\!\?\.]*?offer.*?[\!\?\.])"
repl = r""
return re.sub(regex, repl, content, re.M)
@domain_mapper("gmail.com")
def another_google_filter(content):
return content
@domain_mapper("yandex.ru")
def yandex_filter(content):
regex = r"<img src=[\"'](.+?)[\"'].*/>"
repl = r"\1"
return re.sub(regex, repl, content, re.M)
@domain_mapper("mail.ru")
def mail_filter(content):
regex = r"<img src=[\"'](.+?)\.gif[\"'].*/>"
repl = r"<img src='\1.png'/>"
return re.sub(regex, repl, content, re.M)
Говно или нет?
−1
Чем "Go" влажнее "PHP"?
Увидел, что "Авито" переводит свои вспомогательные сервисы на "Go", и запаниковал.