- 1
- 2
https://infostart.ru/public/72175/
1C.Net:Предприятие + DirectX = 3D-графика на формах 1С:Предприятие
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+1
https://infostart.ru/public/72175/
1C.Net:Предприятие + DirectX = 3D-графика на формах 1С:Предприятие
Зачем? Зачем?
+1
namespace Test;
/**
* MyTest (test/mytest.zep)
*/
class MyTest
{
public function someMethod()
{
/* Variables must be declared */
var myArray;
int i = 0, length;
/* Create an array */
let myArray = ["hello", 0, 100.25, false, null];
/* Count the array into a 'int' variable */
let length = count(myArray);
/* Print value types */
while i < length {
echo typeof myArray[i], "\n";
let i++;
}
return myArray;
}
}
Язык программирования «Зефир».
https://docs.zephir-lang.com/0.12/en/introduction
+1
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
int perevod(char a)
{
switch (a)
{
case 'A': {return 1; break;}
case 'B': {return 2; break;}
case 'C': {return 3; break;}
case 'D': {return 4; break;}
case 'E': {return 5; break;}
case 'F': {return 6; break;}
case 'G': {return 7; break;}
case 'H': {return 8; break;}
}
return 0;
}
int proverka(char a)
{
switch (a)
{
case '1': {return 1; break;}
case '2': {return 2; break;}
case '3': {return 3; break;}
case '4': {return 4; break;}
case '5': {return 5; break;}
case '6': {return 6; break;}
case '7': {return 7; break;}
case '8': {return 8; break;}
}
return 0;
}
int main()
{
string s;
cin >> s;
int x1, x2, y1, y2;
x1=perevod(s[0]);
x2=perevod(s[3]);
y1=proverka(s[1]);
y2=proverka(s[4]);
if(s.length() != 5 || x1 == 0 || x2 == 0 || y1 == 0 || y2 == 0||s[2]!='-')
{
cout << "ERROR";
}
else{
if(abs(x2 - x1) == 1 && abs(y2 - y1) == 2 || abs(x2 - x1) == 2 && abs(y2 - y1) == 1)
{
cout << "YES";
}
else
{
cout << "NO";
}
}
return 0;
}
Простенькая проверка на возможность хода конем.
+1
/// <summary>
/// Сохранение описания отеля в базу данных.
/// </summary>
public void Save()
{
lock ("save")
{
+1
吾有一術。名之曰「斐波那契」。欲行是術。必先得一數。曰「甲」。乃行是術曰。
若「甲」等於零者乃得零也
若「甲」等於一者乃得一也
減「甲」以一。減「甲」以二。名之曰「乙」。曰「丙」。
施「斐波那契」於「乙」。名之曰「丁」。
施「斐波那契」於「丙」。名之曰「戊」。
加「丁」以「戊」。名之曰「己」。
乃得「己」。
是謂「斐波那契」之術也。
施「斐波那契」於十二。書之。
文言 wenyan-lang
Числа Фибоначчи.
https://github.com/wenyan-lang/wenyan
+1
# -*- coding: iso-8859-1 -*-
schön = Wahr
häßlich = Falsch
für bäh in [schön, häßlich]:
drucke bäh
def sovielwiemöglich():
"gib"
zurück "was mir gehört"
Отсюда:
http://www.fiber-space.de/EasyExtend/doc/teuton/teuton.htm
+1
enchufar Chamuyo
un Árbol de a es
bien Hoja a
bien Nodo a (Árbol de a) (Árbol de a)
el máximo
dados n m
si n > m da n
si no da m
la altura de Árbol de a en Numerito
dado (Hoja _) da 1
dado (Nodo _ a b) da 1 + máximo (altura a)
(altura b)
el programa es escupir . mostrar . altura $
Nodo 'a'
(Nodo 'b'
(Hoja 'c')
(Hoja 'd'))
(Nodo 'e'
(Hoja 'f')
(Hoja 'g'))
Отсюда:
https://qriollo.github.io/
+1
if ($arItem['OFFERS_PROPS_DISPLAY']) {
foreach ($arItem['JS_OFFERS'] as $keyOffer => $arJSOffer) {
$strProps = '';
if (!empty($arJSOffer['DISPLAY_PROPERTIES'])) {
foreach ($arJSOffer['DISPLAY_PROPERTIES'] as $arOneProp) {
$strProps .= '<br>'.$arOneProp['NAME'].' <strong>'.(
is_array($arOneProp['VALUE'])
? implode(' / ', $arOneProp['VALUE'])
: $arOneProp['VALUE']
).'</strong>';
}
}
$arItem['JS_OFFERS'][$keyOffer]['DISPLAY_PROPERTIES'] = $strProps;
}
}
foreach ($arItem['JS_OFFERS'] as $keyOffer => $arJSOffer) {
if ($arItem['PROPERTIES']['OLD_PRICE']['VALUE'] > 0 &&
$arItem['PROPERTIES']['OLD_PRICE']['ACTIVE'] == 'Y' &&
($arItem['PROPERTIES']['OLD_PRICE']['VALUE'] * $arItem['OFFERS'][$keyOffer]['CATALOG_MEASURE_RATIO']) > $arItem['JS_OFFERS'][$keyOffer]['PRICE']['VALUE']) {
$arItem['JS_OFFERS'][$keyOffer]['PRICE']['VALUE'] = $arItem['PROPERTIES']['OLD_PRICE']['VALUE'] * $arItem['OFFERS'][$keyOffer]['CATALOG_MEASURE_RATIO'];
$arItem['JS_OFFERS'][$keyOffer]['PRICE']['PRINT_VALUE'] = CCurrencyLang::CurrencyFormat($arItem['JS_OFFERS'][$keyOffer]['PRICE']['VALUE'], $arItem['JS_OFFERS'][$keyOffer]['PRICE']['CURRENCY']);
}
$maxItemPriceValue = ($arItem['JS_OFFERS'][$keyOffer]['PRICE']['VALUE'] > $maxBasisPriceValue) ? $arItem['JS_OFFERS'][$keyOffer]['PRICE']['VALUE'] : $maxBasisPriceValue;
$discount = $maxItemPriceValue - $arItem['JS_OFFERS'][$keyOffer]['PRICE']['DISCOUNT_VALUE'];
$arItem['JS_OFFERS'][$keyOffer]['PRICE']['VALUE'] = $maxItemPriceValue;
$arItem['JS_OFFERS'][$keyOffer]['PRICE']['ECONOMY'] = $discount;
$arItem['JS_OFFERS'][$keyOffer]['BASIS_PRICE']['VALUE'] = $maxItemPriceValue / $arItem['OFFERS'][$keyOffer]['CATALOG_MEASURE_RATIO'];
$arItem['JS_OFFERS'][$keyOffer]['BASIS_PRICE']['ECONOMY'] = $discount / $arItem['OFFERS'][$keyOffer]['CATALOG_MEASURE_RATIO'];
$arItem['JS_OFFERS'][$keyOffer]['BASIS_PRICE']['CATALOG_MEASURE_RATIO'] = $arItem['OFFERS'][$keyOffer]['CATALOG_MEASURE_RATIO'];
if ($isPriceMulty && count($arItem['OFFERS'][$keyOffer]['PRICES']) > 1 && (!$arParams['TAB_TYPE'] || ($arResult['IS_SHOW_LARGE_PREVIEW'] && !in_array('prodday', $itemType) && !in_array('action', $itemType)))) {
$iPrice = 0;
$maxBasisItemPriceValue = $maxBasisPriceValue / $arItem['OFFERS'][$keyOffer]['CATALOG_MEASURE_RATIO'];
foreach($arItem['OFFERS'][$keyOffer]['PRICES'] as $arPrice) {
$maxItemPriceValue = ($arPrice['VALUE'] > $maxBasisItemPriceValue) ? $arPrice['VALUE'] : $maxBasisItemPriceValue;
$arItem['JS_OFFERS'][$keyOffer]['PRICE']['PRICES'][$iPrice]['TITLE'] = $arItem['OFFERS'][$keyOffer]['CATALOG_GROUP_NAME_' . $arPrice['PRICE_ID']];
$arItem['JS_OFFERS'][$keyOffer]['PRICE']['PRICES'][$iPrice]['DISCOUNT_VALUE'] = $arPrice['DISCOUNT_VALUE'];
$arItem['JS_OFFERS'][$keyOffer]['PRICE']['PRICES'][$iPrice]['VALUE'] = $maxItemPriceValue;
$arItem['JS_OFFERS'][$keyOffer]['PRICE']['PRICES'][$iPrice]['ECONOMY'] = $maxItemPriceValue - $arPrice['DISCOUNT_VALUE'];
$arItem['JS_OFFERS'][$keyOffer]['PRICE']['PRICES'][$iPrice]['CURRENCY'] = $arPrice['CURRENCY'];
$arItem['JS_OFFERS'][$keyOffer]['PRICE']['PRICES'][$iPrice]['CATALOG_MEASURE_RATIO'] = $arItem['OFFERS'][$keyOffer]['CATALOG_MEASURE_RATIO'];
$arItem['JS_OFFERS'][$keyOffer]['BASIS_PRICE']['PRICES'][$iPrice]['TITLE'] = $arItem['OFFERS'][$keyOffer]['CATALOG_GROUP_NAME_' . $arPrice['PRICE_ID']];
$arItem['JS_OFFERS'][$keyOffer]['BASIS_PRICE']['PRICES'][$iPrice]['DISCOUNT_VALUE'] = $arPrice['DISCOUNT_VALUE'];
$arItem['JS_OFFERS'][$keyOffer]['BASIS_PRICE']['PRICES'][$iPrice]['VALUE'] = $maxItemPriceValue;
$arItem['JS_OFFERS'][$keyOffer]['BASIS_PRICE']['PRICES'][$iPrice]['ECONOMY'] = $maxItemPriceValue - $arPrice['DISCOUNT_VALUE'];
$arItem['JS_OFFERS'][$keyOffer]['BASIS_PRICE']['PRICES'][$iPrice]['CURRENCY'] = $arPrice['CURRENCY'];
$arItem['JS_OFFERS'][$keyOffer]['BASIS_PRICE']['PRICES'][$iPrice]['CATALOG_MEASURE_RATIO'] = $arItem['OFFERS'][$keyOffer]['CATALOG_MEASURE_RATIO'];
$iPrice++;
}
}
}
js прайс ?
+1
func (svc *UserSvc) isEmptyName(name model.User_Name) bool {
if name.First.RU == "" {
if name.First.EN == "" {
if name.First.TR == "" {
if name.First.IT == "" {
if name.Last.RU == "" {
if name.Last.EN == "" {
if name.Last.TR == "" {
if name.Last.IT == "" {
return true
}
}
}
}
}
}
}
}
return false
}
Проверка заполненности имени пользователя хотя - бы на одном из языков.
+1
http://lhohq.info/
http://www.lhohq.info/lhohq_android.html
http://octagon.lhohq.info/exploit-nomophobia.html
http://phonograph.lhohq.info/
Безумбреции / шизофреции с легким оттенком конардио
Давненько не появлялось хорошего соперника DBУNOГUM