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
... | |
@param \Magento\Catalog\Block\Product\ImageBuilder $imageBuilder | |
@param \Magento\Catalog\Model\Product $product | |
@param string $imageTypeId (product_base_image | product_page_image_medium) | |
$imageHtml = $imageBuilder->setProduct($product) | |
->setImageId($imageId) | |
->create()->toHtml(); |
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
const rangeSum = n => ((n * (n + 1)) / 2) - 1; | |
const getMaxRange = pxCt => { | |
let currRange = 2; | |
while(pxCt > rangeSum(currRange)) { | |
currRange++; | |
} | |
return currRange; | |
}; |
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
const checkWord = (board, word) => { | |
const boardMap = boardToMap(board); | |
const startPoints = Array.from(boardMap.values()); | |
if (!startPoints) { | |
return false; | |
} | |
return checkNodes(boardMap, startPoints, [], [], word.split(''), 0); | |
}; |
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
/* | |
* Usage | |
* Just add "cursor-<type>" as class to the element you want to style with a cursor. | |
*/ | |
$cursors: auto, default, none, context-menu, help, pointer, progress, wait, cell, crosshair, text, vertical-text, alias, copy, move, no-drop, not-allowed, grab, grabbing, all-scroll, col-resize, row-resize, n-resize, e-resize, w-resize, ne-resize, nw-resize, se-resize, sw-resize, ew-resize, ns-resize, nesw-resize, nwse-resize, zoom-in, zoom-out; | |
@each $cursor in $cursors { | |
.cursor-#{$cursor} { | |
cursor: $cursor; | |
} |
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 BaseModel { | |
protected properties: string[]; | |
protected relationships: string[] = []; | |
constructor(data: any, properties: string[], relationships: string[] = []) { | |
if (!!data) { | |
Object.keys(data).forEach(key => { | |
this[key] = data[key]; | |
}); | |
} |
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 "~bootstrap/scss/functions"; | |
@import "~bootstrap/scss/variables"; | |
@import "~bootstrap/scss/mixins"; | |
@import "~bootstrap/scss/grid"; | |
@import "~bootstrap/scss/utilities"; | |
@import "~bootstrap/scss/reboot"; |
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
@Component({ | |
selector: 'app-encapsulate', | |
templateUrl: './encapsulate.component.html', | |
styleUrls: ['./encapsulate.component.scss'], | |
encapsulation: ViewEncapsulation.None | |
}) | |
export class EncapsulateComponent implements OnInit { | |
constructor(el: ElementRef) { | |
const { nativeElement } = el; | |
nativeElement.className = nativeElement.tagName.toLowerCase(); |