- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
if (0) {
unserialize ("");
is_bool ("");
is_array ("");
is_string ("");
is_integer ("");
is_float ("");
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
−10
if (0) {
unserialize ("");
is_bool ("");
is_array ("");
is_string ("");
is_integer ("");
is_float ("");
}
github.com/vk-com/kphp-kdb/blob/master/KPHP/functions.txt
+3
m =: 256$0
index =: 0
output =: 0$0
input =: 0$0
code =: 0$0
cycles =: 0$0
codeIndex =: 0
setCode =: 3 : 'code =: transform y'
transform =: '><+-.,[]'&i.
preset =: 3 : 'cycles =: 0$0 [ codeIndex =: 0 [ output =: 0$0 [ m =: 256$0 [ index=:0'
returnOutput =: 3 : 'output { a.'
changeValue =: 3 : 'm =: (index&{.,y,(>:index)&}.) m'
addCodeIndex =: 3 : 'codeIndex =: (>: codeIndex)'
setCodeIndex =: 3 : 'codeIndex =: {: cycles'
deleteCycle =: 3 : 'cycles =: }: cycles'
func_1 =: 3 : 'index =:256&|@>:index'
func_2 =: 3 : 'index =:256&|@<:index'
func_3 =: 3 : 'changeValue@(256&|)@>:@(index&{) m'
func_4 =: 3 : 'changeValue@(256&|)@<:@(index&{) m'
func_5 =: 3 : 'output=:output, ((index&{) m)'
func_6 =: 3 : '(input =: }.input)[ changeValue(256&|@{.input)'
func_7 =: 3 : 'cycles =: cycles&, codeIndex'
func_8 =: 3 : '(setCodeIndex`deleteCycle@.(0&=))@(index&{) m'
doAction =: func_1`func_2`func_3`func_4`func_5`func_6`func_7`func_8@.]
doInstuction =: 3 : '(doAction[addCodeIndex)@{.@(codeIndex&{) code'
ExitCond =: 3 : 'codeIndex = (# code)'
interpreter =: 3 : '(((,&1 [ doInstuction )`0: @. ExitCond)^:_) 0'
brainFuck =: returnOutput [ interpreter [ setCode [ preset
brainFuck '++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.'
интерпретатор брейнфака на J
−1
private void cb_activated(TreePath path, TreeViewColumn column) {
Totem.Object t = (Totem.Object)this.object;
uint selected = path.get_indices()[0];
uint current = t.get_playlist_pos();
if (selected > current) {
for (int i = 0; i < selected - current; i++)
t.remote_command(RemoteCommand.NEXT, "");
} else if (current > selected) {
for (int i = 0; i < current - selected; i++)
t.remote_command(RemoteCommand.PREVIOUS, "");
}
}
Vala. Тормозит эта хуйня жутко, так как Totem открывает все файлы в плейлисте, пока не доберётся до выбранного.
0
object Main extends App {
object Email {
def apply(user: String, host: String) = user + "@" + host
def unapply(input: String): Option[(String, String)] = {
input.indexOf("@") match {
case x if (x > 0) => Some((input.substring(0, x), input.substring(x + 1)))
case _ => None
}
}
}
"[email protected]" match {
case Email(user, host) => println("See user <" + user + "> at domain <" + host + ">")
case _ => println("Well...")
}
"lol" match {
case Email(user, host) => println("Wow... strange email")
case _ => println("OK, <lol> is not an email")
}
}
http://ideone.com/2xA5xW
Искал во вконтакте свою страничку, а нашел это
+4
A notice tag marks out-of-service equipment, such as a fire hydrant. Included is a guide member that has one or more guide channels and which is inserted into a connector body. The CNT array is patterned by using a patterned metallic seed layer on the substrate to form the CNT array by chemical vapor deposition. The pivot arm has a biasing mechanism with a force that results in less impact force between the pivot arm roller and drive roller when the trailing edge of each mail piece passes through the take-away nip, resulting in less vibration of the weighing platform as mail pieces exit the weighing platform. The process gas is exhausted from the chamber.
Автоматическая генерация изобретений для общественного достояния
https://geektimes.ru/post/274156/
Вореции на страже от патентных троллей?
0
.container .additional-item{display: block;width:100%;}
.container .additional-item thead{display: block;width:100%;}
.container .additional-item thead tr td{font-weight: bold;}
.container .additional-item tbody{display: block;width:100%;}
.container .additional-item tr{display: block;width:100%;padding:10px 0px;}
.container .additional-item tr td{display: inline-block;text-align: center;}
.container .additional-item tr td:nth-child(1){width:3%;}
.container .additional-item tr td:nth-child(2){width:3%;}
.container .additional-item tr td:nth-child(3){width:3%;}
.container .additional-item tr td:nth-child(4){width:15%;}
.container .additional-item tr td:nth-child(5){width:5%;}
.container .additional-item tr td:nth-child(6){width:5%;overflow: hidden;}
.container .additional-item tr td:nth-child(7){width:20%;overflow: hidden;}
.container .additional-item tr td:nth-child(8){width:3%;overflow: hidden;}
.container .additional-item tr td:nth-child(9){width:3%;overflow: hidden;}
.container .additional-item tr td:nth-child(10){width:5%;overflow: hidden;}
.container .additional-item tbody tr td:nth-child(11){font-weight: bold;color:rgb(138, 43, 23);}
.container .additional-item tr td:nth-child(11){width:10%;overflow: hidden;}
.container .additional-item tr td:nth-child(12){width:7.5%;overflow: hidden;}
.container .additional-item tr td:nth-child(12) input{width:50%;margin:auto;text-align: center;}
.container .additional-item tr td:nth-child(13){width:12%;overflow: hidden;}
.container .additional-item tr td:nth-child(13) a{display: block;width: 95%;margin-left: 5%;height: 30px;line-height: 15px;font-size: 100%;}
−7
<figure class="highlight"><pre><code class="language-html" data-lang="html"><span class="nt"><nav</span> <span class="na">class=</span><span class="s">"navbar navbar-default"</span><span class="nt">></span>
<span class="nt"><div</span> <span class="na">class=</span><span class="s">"container-fluid"</span><span class="nt">></span>
<span class="c"><!-- Brand and toggle get grouped for better mobile display --></span>
<span class="nt"><div</span> <span class="na">class=</span><span class="s">"navbar-header"</span><span class="nt">></span>
<span class="nt"><button</span> <span class="na">type=</span><span class="s">"button"</span> <span class="na">class=</span><span class="s">"navbar-toggle collapsed"</span> <span class="na">data-toggle=</span><span class="s">"collapse"</span> <span class="na">data-target=</span><span class="s">"#bs-example-navbar-collapse-1"</span> <span class="na">aria-expanded=</span><span class="s">"false"</span><span class="nt">></span>
<span class="nt"><span</span> <span class="na">class=</span><span class="s">"sr-only"</span><span class="nt">></span>Toggle navigation<span class="nt"></span></span>
<span class="nt"><span</span> <span class="na">class=</span><span class="s">"icon-bar"</span><span class="nt">></span></span>
<span class="nt"><span</span> <span class="na">class=</span><span class="s">"icon-bar"</span><span class="nt">></span></span>
<span class="nt"><span</span> <span class="na">class=</span><span class="s">"icon-bar"</span><span class="nt">></span></span>
<span class="nt"></button></span>
<span class="nt"><a</span> <span class="na">class=</span><span class="s">"navbar-brand"</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Brand<span class="nt"></a></span>
<span class="nt"></div></span>
<span class="c"><!-- Collect the nav links, forms, and other content for toggling --></span>
<span class="nt"><div</span> <span class="na">class=</span><span class="s">"collapse navbar-collapse"</span> <span class="na">id=</span><span class="s">"bs-example-navbar-collapse-1"</span><span class="nt">></span>
<span class="nt"><ul</span> <span class="na">class=</span><span class="s">"nav navbar-nav"</span><span class="nt">></span>
<span class="nt"><li</span> <span class="na">class=</span><span class="s">"active"</span><span class="nt">><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Link <span class="nt"><span</span> <span class="na">class=</span><span class="s">"sr-only"</span><span class="nt">></span>(current)<span class="nt"></span></a></li></span>
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Link<span class="nt"></a></li></span>
<span class="nt"><li</span> <span class="na">class=</span><span class="s">"dropdown"</span><span class="nt">></span>
<span class="nt"><a</span> <span class="na">href=</span><span class="s">"#"</span> <span class="na">class=</span><span class="s">"dropdown-toggle"</span> <span class="na">data-toggle=</span><span class="s">"dropdown"</span> <span class="na">role=</span><span class="s">"button"</span> <span class="na">aria-haspopup=</span><span class="s">"true"</span> <span class="na">aria-expanded=</span><span class="s">"false"</span><span class="nt">></span>Dropdown <span class="nt"><span</span> <span class="na">class=</span><span class="s">"caret"</span><span class="nt">></span></a></span>
<span class="nt"><ul</span> <span class="na">class=</span><span class="s">"dropdown-menu"</span><span class="nt">></span>
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Action<span class="nt"></a></li></span>
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Another action<span class="nt"></a></li></span>
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Something else here<span class="nt"></a></li></span>
<span class="nt"><li</span> <span class="na">role=</span><span class="s">"separator"</span> <span class="na">class=</span><span class="s">"divider"</span><span class="nt">></li></span>
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>Separated link<span class="nt"></a></li></span>
<span class="nt"><li</span> <span class="na">role=</span><span class="s">"separator"</span> <span class="na">class=</span><span class="s">"divider"</span><span class="nt">></li></span>
<span class="nt"><li><a</span> <span class="na">href=</span><span class="s">"#"</span><span class="nt">></span>One more separated link<span class="nt"></a></li></span>
<span class="nt"></ul></span>
<span class="nt"></li></span>
<span class="nt"></ul></span>
<span class="nt"><form</span> <span class="na">class=</span><span class="s">"navbar-form navbar-left"</span> <span class="na">role=</span><span class="s">"search"</span><span class="nt">></span>
<span class="nt"><div</span> <span class="na">class=</span><span class="s">"form-group"</span><span class="nt">></span>
<span class="nt"><input</span> <span class="na">type=</span><span class="s">"text"</span> <span class="na">class=</span><span class="s">"form-control"</span> <span class="na">placeholder=</span><span class="s">"Search"</span><span class="nt">></span>
<span class="nt"></div></span>
С сайта bootstrap
+5
type asynchronizer struct {
payload interface{}
}
func (as *asynchronizer) MarshalJSON() ([]byte, error) {
insert := []byte("\"async\":true,")
if as.payload == nil {
as.payload = struct{}{}
}
raw, err := json.Marshal(as.payload)
if err != nil {
return raw, err
}
if raw[1] == '}' {
insert = insert[:len(insert)-2]
}
return append(append(raw[0:1], insert...), raw[1:]...), nil
}
Чем дальше в лес, тем больше Го напоминает ПХП.
+1
Что за мемчик про вореции?
Желательно со ссылками на лурк.
+2
.section-cart .table .th1.th1,
.section-cart .table .th2.th1,
.section-cart .table .th3.th1,
.section-cart .table .th4.th1 {
width: 575px;
}
.section-cart .table .th1.th2,
.section-cart .table .th2.th2,
.section-cart .table .th3.th2,
.section-cart .table .th4.th2 {
width: 285px;
}
.section-cart .table .th1.th3,
.section-cart .table .th2.th3,
.section-cart .table .th3.th3,
.section-cart .table .th4.th3 {
width: 250px;
}
.section-cart .table .th1.th1,
.section-cart .table .th2.th2,
.section-cart .table .th3.th3,
.section-cart .table .th4.th4 {
width: 250px;
}
.section-cart .table .td1,
.section-cart .table .td2,
.section-cart .table .td3,
.section-cart .table .td4,
.section-cart .table .td5,
.section-cart .table .td6 {
display: inline-block;
vertical-align: middle;
height: 215px;
border-bottom: 1px solid #d1d1d1;
}
.section-cart .table .td1.td1,
.section-cart .table .td2.td1,
.section-cart .table .td3.td1,
.section-cart .table .td4.td1,
.section-cart .table .td5.td1,
.section-cart .table .td6.td1 {
width: 245px;
line-height: 215px;
text-align: center;
}
.section-cart .table .td1.td1 img,
.section-cart .table .td2.td1 img,
.section-cart .table .td3.td1 img,
.section-cart .table .td4.td1 img,
.section-cart .table .td5.td1 img, {
.section-cart .table .td5.td1 img {
display: inline-block;
vertical-align: middle;
}
.section-cart .table .td1.td2,
.section-cart .table .td2.td2,
.section-cart .table .td3.td2,
.section-cart .table .td4.td2,
.section-cart .table .td5.td2 {
padding-left: 30px;
line-height: 215px;
padding-right: 25px;
width: 355px;
}
.section-cart .table .td1.td2 > span,
.section-cart .table .td2.td2 > span,
.section-cart .table .td3.td2 > span,
.section-cart .table .td4.td2 > span,
.section-cart .table .td5.td2 > span {
line-height: normal;
display: inline-block;
vertical-align: middle;
}
.section-cart .table .td1.td2 .title,
.section-cart .table .td2.td2 .title,
.section-cart .table .td3.td2 .title,
.section-cart .table .td4.td2 .title,
.section-cart .table .td5.td2 .title {
color: #181415;
font-size: 22px;
padding-bottom: 20px;
}
.section-cart .table .td1.td2 .opts,
.section-cart .table .td2.td2 .opts,
.section-cart .table .td3.td2 .opts,
.section-cart .table .td4.td2 .opts,
.section-cart .table .td5.td2 .opts {
font-size: 16px;
color: #636363;
line-height: 24px;
}
.section-cart .table .td1.td2 .opts b,
.section-cart .table .td2.td2 .opts b,
.section-cart .table .td3.td2 .opts b,
.section-cart .table .td4.td2 .opts b,
.section-cart .table .td5.td2 .opts b {
display: inline-block;
padding-right: 10px;
color: #181415;
}
Вот так вот строим обычную табличку.