This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (\Bitrix\Main\Loader::includeModule('iblock')) { | |
\Bitrix\Main\Loader::registerAutoLoadClasses(null, [ | |
'CIBlockCMLImport' => __DIR__ . '/ciblockcmlimport.php', | |
]); | |
} | |
$pathToOriginalCode = $_SERVER['DOCUMENT_ROOT'] . '/bitrix/modules/iblock/classes/general/cml2.php'; | |
$originalCode = file_get_contents($pathToOriginalCode); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
from tensorflow.python.keras import Input, Model | |
from tensorflow.python.keras.layers import Conv2D, MaxPooling2D, Dropout, concatenate, \ | |
Flatten, Dense | |
IMG_SHAPE = (60, 90, 1) | |
# Defined a shared model | |
shared_input = Input(IMG_SHAPE) | |
shared_layer = Conv2D(8, (7, 7), strides=3, input_shape=IMG_SHAPE, padding='valid', activation='relu')(shared_input) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copyright Oleg Postoev | |
#include "OpenDoor.h" | |
#include "GameFramework/Actor.h" | |
// Sets default values for this component's properties | |
UOpenDoor::UOpenDoor() | |
{ | |
// Set this component to be initialized when the game starts, and to be ticked every frame. You can turn these features |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interface ColorRgb { | |
r: number; | |
g: number; | |
b: number; | |
} | |
interface ColorHsl { | |
h: number; | |
s: number; | |
l: number; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`npm install --save-dev @angularclass/hmr` | |
`src/environments/environment.prod.ts` | |
Add rule: `hmr: false` | |
`src/environments/environment.ts` | |
Add rule: `hmr: true` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class AppComponent { | |
@HostListener('click', [ | |
'$event.target', | |
'$event.button', | |
'$event.ctrlKey', | |
'$event.metaKey', | |
]) | |
private onClick( | |
eventTarget: HTMLElement, | |
button: number, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$input = file_get_contents('php://input'); | |
$request = $input ? json_decode($input, true) : $_REQUEST; | |
if ($request['error']) { | |
$logPath = $_SERVER['DOCUMENT_ROOT'] . '/js-log-error.txt'; | |
$date = date('Y.m.d H:i:s'); | |
$message = $date . PHP_EOL . var_export($request, true) . PHP_EOL . PHP_EOL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"ng": "ng", | |
"start": "ng serve --proxy-config proxy.conf.json -sm --aot", | |
"start-hmr": "ng serve --proxy-config proxy.conf.json -sm --hmr -e=hmr", | |
"build-dev": "ng build --dev --op=../../public_html/f/main-dev/ -dop false --oh none -sm false", | |
"build": "ng build --prod --op=../../public_html/f/main/ -dop false --oh none", | |
"test": "ng test --sourcemaps=false", | |
"lint": "ng lint --type-check", | |
"e2e": "ng e2e" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Метод возвращает нужный код числительного для разных цифр. | |
* Возможные коды ответа: 1, 2, 5 | |
* Например, 1 - для 1 товар, 2 - товара, 5 - товаров | |
*/ | |
public getPluralCode(n: number): number { | |
return (n % 10 === 1) && (n % 100 !== 11) | |
? 1 | |
: (n % 10 >= 2) | |
&& (n % 10 <= 4) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* tslint:disable:max-line-length */ | |
import {LongServiceNameService} from '../long/path/to/service/somwhere/in/project/long-service-name.service'; | |
/* tslint:enable:max-line-length */ |
NewerOlder