- 1
- 2
- 3
sector_t * s = §ors[secnum];
if (!s->floorplane.isSlope()) s->reflect[sector_t::floor] = arg1/255.f;
if (!s->ceilingplane.isSlope()) sectors[secnum].reflect[sector_t::ceiling] = arg2/255.f;
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+1
sector_t * s = §ors[secnum];
if (!s->floorplane.isSlope()) s->reflect[sector_t::floor] = arg1/255.f;
if (!s->ceilingplane.isSlope()) sectors[secnum].reflect[sector_t::ceiling] = arg2/255.f;
присвоил переменной и во второй раз не использовал
−3
bool* sdvig_vpravo(bool* mas) {
if (mas[0] == 1 && mas[1] == 0 && mas[2] == 0) {
mas[0] = 0;
mas[1] = 1;
mas[2] = 0;
}
else if (mas[0] == 0 && mas[1] == 1 && mas[2] == 0) {
mas[0] = 0;
mas[1] = 0;
mas[2] = 1;
}
else if (mas[0] == 0 && mas[1] == 0 && mas[2] == 1) {
mas[0] = 1;
mas[1] = 0;
mas[2] = 0;
}
return mas;
}
Кольцевой сдвиг на один элемент булевского массива размерности 3. Возможно удивитесь, но этот великий костыль я сотворил на полном серьезе.
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
Искал во вконтакте свою страничку, а нашел это
+3
//g++ 4.9.3
#include <iostream>
int main()
{
for(int ang = 0; ang < 360; ang++)
{
int test = ang * 5981849;
std::cout << test << std::endl;
}
}
http://rextester.com/IHBA32841
0
for (int i = 0; i < arrayA.Length; i++)
{
arrayB[i] = arrayA[i];
for (int j = 1; j < arrayB.Length; j++)
{
arrayB[j] = arrayB[j - 1] + arrayA[j];
}
Console.WriteLine(arrayB[i]);
}
Triangular Numbers
+4
public static bool isSupportedFrameworkVersion()
{
try
{
string s = null;
string m = s + "";
}
catch
{
return false;
}
return true;
}
Нашел в нашем проекте. Не поверил. Проверил. Взлолировал.
http://ideone.com/laV7up
+1
https://www.google.com/search?q=%D0%B2%D0%BE%D1%80%D0%B5%D1%86%D0%B8%D0%B8
Насрали так, что все ссылки ведут на говнокод.
Как эта херомантия называется в науке?
3.14159265359, это ты придумал слово "вореции"?
0
switch (true) {
case $result['Type'] === 'date':
$column['type'] = 'date';
$column['format'] = 'date';
break;
case preg_match('/^(datetime|timestamp)$/', $result['Type'], $matches):
$column['type'] = $result['Type'];
$column['format'] = 'datetime';
break;
case preg_match('/^decimal\((\d+),(\d+)\)/', $result['Type'], $matches):
$column['type'] = 'decimal';
$column['format'] = 'number';
$column['precision'] = $matches[2];
break;
...
+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%;}