-
−3
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
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. Возможно удивитесь, но этот великий костыль я сотворил на полном серьезе.
petr_koshka23,
12 Апреля 2016
-
0
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
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
Искал во вконтакте свою страничку, а нашел это
LispGovno,
12 Апреля 2016
-
+3
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
//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
LispGovno,
12 Апреля 2016
-
0
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
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
douche,
12 Апреля 2016
-
+4
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
public static bool isSupportedFrameworkVersion()
{
try
{
string s = null;
string m = s + "";
}
catch
{
return false;
}
return true;
}
Нашел в нашем проекте. Не поверил. Проверил. Взлолировал.
http://ideone.com/laV7up
LispGovno,
12 Апреля 2016
-
+1
- 1
https://www.google.com/search?q=%D0%B2%D0%BE%D1%80%D0%B5%D1%86%D0%B8%D0%B8
Насрали так, что все ссылки ведут на говнокод.
Как эта херомантия называется в науке?
3.14159265359, это ты придумал слово "вореции"?
3_dar,
12 Апреля 2016
-
0
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
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;
...
sikamikanico,
12 Апреля 2016
-
+4
- 1
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/
Вореции на страже от патентных троллей?
kerman,
12 Апреля 2016
-
0
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
.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%;}
lscin,
12 Апреля 2016
-
0
- 1
if (html.Contains("The report you've designed is invalid. Please verify that everything is correct."))
Как проверить нет ли ошибок в только что сгенерированном отчете?
Теперь я знаю где работает Капитан Очевидность! ))))
(Из исходников одной популярной генерилки отчетов Кстати, локализованной на штук 8 языков)
RadChand,
12 Апреля 2016