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
#define _XOPEN_SOURCE 500 /* Enable certain library functions (strdup) on linux. See feature_test_macros(7) */ | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <limits.h> | |
#include <string.h> | |
#define INITIAL_HASH_SIZE 4 | |
#define MAX_LOAD_FACTOR 2 | |
#define SCALE_FACTOR 2 |
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
/* I use bootstrap in my project but | |
I'd like to override the breakpoint values */ | |
$grid-breakpoints: ( | |
xs: 0, | |
sm: 600px, | |
md: 960px, | |
lg: 1280px, | |
xl: 1920px, | |
); |
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/mixins/_breakpoints.scss"; | |
@import "variables"; | |
/* This will generate bootstrap style responsive classes for flex-basis | |
e.g. flex-basis-md-25*/ | |
@each $breakpoint, $value in $breakpoints { | |
$min: breakpoint-min($breakpoint); | |
$breakpoint-name: if($min, -#{$breakpoint}, ""); | |
@for $i from 1 through 4 { | |
@include media-breakpoint-up($breakpoint) { |
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
/* This is to be imported in the consumer project */ | |
@import "~bootstrap/scss/functions"; | |
@import "~bootstrap/scss/variables"; | |
@import "variables"; | |
@import "~bootstrap/scss/bootstrap"; | |
// everything till here is for overriding bootstrap breakpoints | |
@import "common"; | |
/* Things like typograpohy, theming usually follow up | |
in a shared library like this |
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
... | |
"cp-styles": "cpx-fixed \"./projects/common/src/**/*.scss\" \"./dist/common/scss/\"", | |
"cp-assets": "cpx-fixed \"./projects/common/src/assets/**/*\" \"./dist/common/assets/\"", | |
"cp-readme": "cpx-fixed \"./README.md\" \"./dist/common/\"", | |
"cp-npmrc": "cp ./.npmrc ./dist/common/", | |
"postbuild": "npm run cp-styles && npm run cp-assets", | |
"postpack": "npm run cp-npmrc && npm run cp-readme", | |
"npm-pack": "cd dist/common && npm pack", | |
"package": "ng build common --prod && npm run postbuild && npm run npm-pack && npm run postpack", | |
"release": "npm run package && cd ./dist/common && npm publish" |
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
// importing the entry point of library | |
@import "~@wildhammer/common/scss/styles"; |
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
<mat-icon svgIcon="icon-pen"></mat-icon> |
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
_handleInput(control: FormControl, nextElement: HTMLInputElement): void { | |
this.autoFocusNext(control, nextElement); | |
this.onChange(this.value); | |
} | |
autoFocusNext(control: AbstractControl, nextElement: HTMLInputElement | null): void { | |
if (!control.errors && !!nextElement) this._focusMonitor.focusVia(nextElement, "program"); | |
} |
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
<div [formGroup]="parts" ...> | |
<input ... formControlName="area" | |
(input)="_handleInput(parts.controls.area,exchange)" #area> | |
... | |
<input ... formControlName="exchange" | |
(input)="_handleInput(parts.controls.exchange,subscriber)" #exchange> | |
... | |
<input ... formControlName="subscriber" | |
(input)="_handleInput(parts.controls.subscriber,subscriber)" #subscriber> | |
</div> |