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 { HttpRequest, HttpResponse } from '@angular/common/http'; | |
import { Injectable } from '@angular/core'; | |
import { BehaviorSubject } from 'rxjs'; | |
export interface CachedData { | |
time: number; | |
body: object & HttpResponse<any>; | |
} |
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 {ApplicationRef, enableProdMode} from '@angular/core'; | |
import {enableDebugTools} from '@angular/platform-browser'; | |
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic'; | |
import {AppModule} from './app/app.module'; | |
import {environment} from './environments/environment'; | |
import {hmrBootstrap} from './hmr'; | |
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
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
`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
/* tslint:disable:max-line-length */ | |
import {LongServiceNameService} from '../long/path/to/service/somwhere/in/project/long-service-name.service'; | |
/* tslint:enable:max-line-length */ |
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
"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" |
NewerOlder