type
stringclasses 7
values | content
stringlengths 4
9.55k
| repo
stringlengths 7
96
| path
stringlengths 4
178
| language
stringclasses 1
value |
---|---|---|---|---|
MethodDeclaration |
endBlock(locals: string[]): InlineBlock {
let { program, symbolTable } = this.stack.pop();
let block = new InlineBlock(program, symbolTable, locals);
this.addChild(block);
return block;
} | wycats/glimmer | packages/glimmer-runtime/lib/scanner.ts | TypeScript |
MethodDeclaration |
addChild(block: InlineBlock) {
this.stack.current.addChild(block);
} | wycats/glimmer | packages/glimmer-runtime/lib/scanner.ts | TypeScript |
MethodDeclaration |
addStatement(statement: StatementSyntax) {
this.stack.current.addStatement(statement.scan(this));
} | wycats/glimmer | packages/glimmer-runtime/lib/scanner.ts | TypeScript |
MethodDeclaration |
next(): StatementSyntax {
return this.reader.next();
} | wycats/glimmer | packages/glimmer-runtime/lib/scanner.ts | TypeScript |
MethodDeclaration |
addChild(block: InlineBlock) {
this.children.push(block);
} | wycats/glimmer | packages/glimmer-runtime/lib/scanner.ts | TypeScript |
MethodDeclaration |
addStatement(statement: StatementSyntax) {
this.program.append(statement);
} | wycats/glimmer | packages/glimmer-runtime/lib/scanner.ts | TypeScript |
MethodDeclaration |
next(): StatementSyntax {
let last = this.last;
if (last) {
this.last = null;
return last;
} else if (this.current === this.statements.length) {
return null;
}
let sexp = this.statements[this.current++];
return buildStatement(sexp, this.symbolTable, this.scanner);
} | wycats/glimmer | packages/glimmer-runtime/lib/scanner.ts | TypeScript |
FunctionDeclaration |
export declare function mergeMapTo<O extends ObservableInput<unknown>>(innerObservable: O, concurrent?: number): OperatorFunction<any, ObservedValueOf<O>>; | 0xhodl/Module_4 | node_modules/rxjs/dist/types/internal/operators/mergeMapTo.d.ts | TypeScript |
FunctionDeclaration | /** @deprecated The `resultSelector` parameter will be removed in v8. Use an inner `map` instead. Details: https://rxjs.dev/deprecations/resultSelector */
export declare function mergeMapTo<T, R, O extends ObservableInput<unknown>>(innerObservable: O, resultSelector: (outerValue: T, innerValue: ObservedValueOf<O>, outerIndex: number, innerIndex: number) => R, concurrent?: number): OperatorFunction<T, R>; | 0xhodl/Module_4 | node_modules/rxjs/dist/types/internal/operators/mergeMapTo.d.ts | TypeScript |
ClassDeclaration | /**
* @name ExtrinsicPayloadUnknown
* @description
* A default handler for payloads where the version is not known (default throw)
*/
export default class ExtrinsicPayloadUnknown extends Struct {
constructor (value?: any, { version = 0 }: Partial<ExtrinsicPayloadOptions> = {}) {
super({});
throw new Error(`Unsupported extrinsic payload version ${version}`);
}
} | mariopino/api | packages/types/src/primitive/Extrinsic/ExtrinsicPayloadUnknown.ts | TypeScript |
ArrowFunction |
(styles: any) => ({
...styles,
backgroundColor: '#676767',
color: 'white',
border: 0,
width: 400,
}) | nrkno/sofie-sisyfos-audio-controller | client/components/PagesSettings.tsx | TypeScript |
ArrowFunction |
(styles: any) => {
return {
backgroundColor: '#AAAAAA',
color: 'white',
}
} | nrkno/sofie-sisyfos-audio-controller | client/components/PagesSettings.tsx | TypeScript |
ArrowFunction |
(styles: any) => ({ ...styles, color: 'white' }) | nrkno/sofie-sisyfos-audio-controller | client/components/PagesSettings.tsx | TypeScript |
ArrowFunction |
(page: ICustomPages, index: number) => {
return { label: page.label, value: index }
} | nrkno/sofie-sisyfos-audio-controller | client/components/PagesSettings.tsx | TypeScript |
ArrowFunction |
(a, b) => {
return a - b
} | nrkno/sofie-sisyfos-audio-controller | client/components/PagesSettings.tsx | TypeScript |
ArrowFunction |
(event: ChangeEvent<HTMLInputElement>) => {
this.setState({ label: event.target.value })
this.pageList[this.state.pageIndex].label = event.target.value
let nextPages: ICustomPages[] = [...this.props.customPages]
nextPages[this.state.pageIndex].label = event.target.value
window.storeRedux.dispatch(storeUpdatePagesList(nextPages))
window.socketIoClient.emit(SOCKET_SET_PAGES_LIST, nextPages)
} | nrkno/sofie-sisyfos-audio-controller | client/components/PagesSettings.tsx | TypeScript |
ArrowFunction |
() => {
window.socketIoClient.emit(SOCKET_GET_PAGES_LIST)
this.props.dispatch(storeShowPagesSetup())
} | nrkno/sofie-sisyfos-audio-controller | client/components/PagesSettings.tsx | TypeScript |
ArrowFunction |
(fader: IFader, index: number) => {
return (
<div
key={index}
className={ClassNames('pages-settings-tick', {
checked: this.props.customPages[
this.state.pageIndex
].faders.includes(index),
} | nrkno/sofie-sisyfos-audio-controller | client/components/PagesSettings.tsx | TypeScript |
ArrowFunction |
(state: any, props: any): IPagesSettingsInjectProps => {
return {
customPages: state.settings[0].customPages,
fader: state.faders[0].fader,
}
} | nrkno/sofie-sisyfos-audio-controller | client/components/PagesSettings.tsx | TypeScript |
ClassDeclaration |
class PagesSettings extends React.PureComponent<
IPagesSettingsInjectProps & Store
> {
pageList: { label: string; value: number }[]
state = { pageIndex: 0, label: '' }
constructor(props: any) {
super(props)
this.pageList = this.props.customPages.map(
(page: ICustomPages, index: number) => {
return { label: page.label, value: index }
}
)
}
componentDidMount() {
this.setState({ label: this.props.customPages[0].label })
}
handleSelectPage(event: any) {
this.setState({ pageIndex: event.value })
this.setState({
label: this.props.customPages[event.value].label,
})
console.log('PAGE SELECTED', this.state.pageIndex)
}
handleAssignFader(fader: number, event: any) {
if (event.target.checked === false) {
console.log('Unbinding Fader')
if (
window.confirm(
'Unbind Fader from page ' +
String(fader + 1) +
' from Page ' +
String(this.state.pageIndex + 1)
)
) {
let nextPages: ICustomPages[] = [...this.props.customPages]
nextPages[this.state.pageIndex].faders.splice(
this.props.customPages[this.state.pageIndex].faders.indexOf(
fader
),
1
)
window.storeRedux.dispatch(storeUpdatePagesList(nextPages))
window.socketIoClient.emit(SOCKET_SET_PAGES_LIST, nextPages)
}
} else {
console.log('Binding Channel')
if (
window.confirm(
'Bind Fader ' +
String(fader + 1) +
' to Page ' +
String(this.state.pageIndex + 1) +
'?'
)
) {
let nextPages: ICustomPages[] = [...this.props.customPages]
nextPages[this.state.pageIndex].faders.push(fader)
nextPages[this.state.pageIndex].faders.sort((a, b) => {
return a - b
})
window.storeRedux.dispatch(storeUpdatePagesList(nextPages))
window.socketIoClient.emit(SOCKET_SET_PAGES_LIST, nextPages)
}
}
}
handleLabel = (event: ChangeEvent<HTMLInputElement>) => {
this.setState({ label: event.target.value })
this.pageList[this.state.pageIndex].label = event.target.value
let nextPages: ICustomPages[] = [...this.props.customPages]
nextPages[this.state.pageIndex].label = event.target.value
window.storeRedux.dispatch(storeUpdatePagesList(nextPages))
window.socketIoClient.emit(SOCKET_SET_PAGES_LIST, nextPages)
}
handleClearRouting() {
if (window.confirm('REMOVE ALL FADER ASSIGNMENTS????')) {
let nextPages: ICustomPages[] = [...this.props.customPages]
nextPages[this.state.pageIndex].faders = []
window.storeRedux.dispatch(storeUpdatePagesList(nextPages))
window.socketIoClient.emit(SOCKET_SET_PAGES_LIST, nextPages)
}
}
handleClose = () => {
window.socketIoClient.emit(SOCKET_GET_PAGES_LIST)
this.props.dispatch(storeShowPagesSetup())
}
renderFaderList() {
return (
<div>
{this.props.fader.map((fader: IFader, index: number) => {
return (
<div
key={index}
className={ClassNames('pages-settings-tick', {
checked: this.props.customPages[
this.state.pageIndex
].faders.includes(index),
})}
>
{' Fader ' + (index + 1) + ' - ' + getFaderLabel(index) + ' : '}
{}
<input
type="checkbox"
checked={this.props.customPages[
this.state.pageIndex
].faders.includes(index)}
onChange={(event) =>
this.handleAssignFader(index, event)
} | nrkno/sofie-sisyfos-audio-controller | client/components/PagesSettings.tsx | TypeScript |
InterfaceDeclaration |
interface IPagesSettingsInjectProps {
customPages: ICustomPages[]
fader: IFader[]
} | nrkno/sofie-sisyfos-audio-controller | client/components/PagesSettings.tsx | TypeScript |
MethodDeclaration |
componentDidMount() {
this.setState({ label: this.props.customPages[0].label })
} | nrkno/sofie-sisyfos-audio-controller | client/components/PagesSettings.tsx | TypeScript |
MethodDeclaration |
handleSelectPage(event: any) {
this.setState({ pageIndex: event.value })
this.setState({
label: this.props.customPages[event.value].label,
})
console.log('PAGE SELECTED', this.state.pageIndex)
} | nrkno/sofie-sisyfos-audio-controller | client/components/PagesSettings.tsx | TypeScript |
MethodDeclaration |
handleAssignFader(fader: number, event: any) {
if (event.target.checked === false) {
console.log('Unbinding Fader')
if (
window.confirm(
'Unbind Fader from page ' +
String(fader + 1) +
' from Page ' +
String(this.state.pageIndex + 1)
)
) {
let nextPages: ICustomPages[] = [...this.props.customPages]
nextPages[this.state.pageIndex].faders.splice(
this.props.customPages[this.state.pageIndex].faders.indexOf(
fader
),
1
)
window.storeRedux.dispatch(storeUpdatePagesList(nextPages))
window.socketIoClient.emit(SOCKET_SET_PAGES_LIST, nextPages)
}
} else {
console.log('Binding Channel')
if (
window.confirm(
'Bind Fader ' +
String(fader + 1) +
' to Page ' +
String(this.state.pageIndex + 1) +
'?'
)
) {
let nextPages: ICustomPages[] = [...this.props.customPages]
nextPages[this.state.pageIndex].faders.push(fader)
nextPages[this.state.pageIndex].faders.sort((a, b) => {
return a - b
})
window.storeRedux.dispatch(storeUpdatePagesList(nextPages))
window.socketIoClient.emit(SOCKET_SET_PAGES_LIST, nextPages)
}
}
} | nrkno/sofie-sisyfos-audio-controller | client/components/PagesSettings.tsx | TypeScript |
MethodDeclaration |
handleClearRouting() {
if (window.confirm('REMOVE ALL FADER ASSIGNMENTS????')) {
let nextPages: ICustomPages[] = [...this.props.customPages]
nextPages[this.state.pageIndex].faders = []
window.storeRedux.dispatch(storeUpdatePagesList(nextPages))
window.socketIoClient.emit(SOCKET_SET_PAGES_LIST, nextPages)
}
} | nrkno/sofie-sisyfos-audio-controller | client/components/PagesSettings.tsx | TypeScript |
MethodDeclaration |
renderFaderList() {
return (
<div>
{this.props.fader.map((fader: IFader, index: number) => {
return (
<div
key={index}
className={ClassNames('pages-settings-tick', {
checked: this.props.customPages[
this.state.pageIndex
].faders.includes(index),
})}
>
{' Fader ' + (index + 1) + ' - ' + getFaderLabel(index) + ' : '}
{}
<input
type="checkbox"
checked={this.props.customPages[
this.state.pageIndex
].faders.includes(index)}
onChange={(event) =>
this.handleAssignFader(index, event)
} | nrkno/sofie-sisyfos-audio-controller | client/components/PagesSettings.tsx | TypeScript |
MethodDeclaration |
ClassNames('pages-settings-tick', {
checked: this | nrkno/sofie-sisyfos-audio-controller | client/components/PagesSettings.tsx | TypeScript |
FunctionDeclaration |
export default function Duration(props: DurationProps): ReactElement {
return (
// @ts-ignore: Property 'duration' does not exist on type
<DurationGridCell {...props}>
<Span>
{props.duration === 60 ? '1h' : `${props.duration}m`}
</Span>
</DurationGridCell>
);
} | neelkamath/time-bend-web | src/components/Duration.tsx | TypeScript |
FunctionDeclaration |
function colorDuration(duration: number): string {
if (duration <= 15) return '#F1F6F8';
if (duration <= 30) return '#E5F0F3';
if (duration <= 45) return '#DAE7EA';
return '#CBDDE2';
} | neelkamath/time-bend-web | src/components/Duration.tsx | TypeScript |
ArrowFunction |
(props) => colorDuration(props.duration) | neelkamath/time-bend-web | src/components/Duration.tsx | TypeScript |
InterfaceDeclaration |
export interface DurationProps extends GridCellProps {
/** The task's duration. */
readonly duration: number
} | neelkamath/time-bend-web | src/components/Duration.tsx | TypeScript |
InterfaceDeclaration |
interface DurationGridCellProps {
readonly duration: number
} | neelkamath/time-bend-web | src/components/Duration.tsx | TypeScript |
ClassDeclaration |
@Component({
selector: 'uni-icon',
templateUrl: 'icon.component.html',
styleUrls: ['icon.component.scss']
})
export class UniIconComponent {
@HostBinding('class.uni-icon') componentClass = true;
@Input() icon: string;
@Input() size: string;
} | alejandroSuch/unicorn_components | src/components/utils/icon/icon.component.ts | TypeScript |
TypeAliasDeclaration |
export type BaseModel = {
id?: string | number;
cratedAt?: Date;
updatedAt?: Date;
}; | pehleme/template-next | src/data/models/base.model.ts | TypeScript |
FunctionDeclaration |
function Intersect(props: IconProps) {
return <Svg viewBox="0 0 256 256" width={props.size} height={props.size} {...props}><Rect width={256} height={256} fill="none" /><Circle cx={96} cy={96} r={72} fill="none" stroke={props.color} strokeLinecap="round" strokeLinejoin="round" strokeWidth={12} /><Circle cx={160} cy={160} r={72} fill="none" stroke={props.color} strokeLinecap="round" strokeLinejoin="round" strokeWidth={12} /><Line x1={122.5} y1={98.5} x2={157.5} y2={133.5} fill="none" stroke={props.color} strokeLinecap="round" strokeLinejoin="round" strokeWidth={12} /><Line x1={98.5} y1={122.5} x2={133.5} y2={157.5} fill="none" stroke={props.color} strokeLinecap="round" strokeLinejoin="round" strokeWidth={12} /></Svg>;
} | Joeao/phosphor-react-native | src/light/Intersect.tsx | TypeScript |
ArrowFunction |
() => {
EventService.subscribers = EventService.subscribers.filter(p => p.id !== id);
} | infanf/homer | frontend/src/services/event.service.ts | TypeScript |
ArrowFunction |
p => p.id !== id | infanf/homer | frontend/src/services/event.service.ts | TypeScript |
ClassDeclaration |
export class EventService {
private static subscribers: Array<{
id: number;
event: string;
// @ts-ignore
callback: SubscribeCallback<any>;
}> = [];
static subscribe<T>(event: string, callback: SubscribeCallback<T>): Unsubscribe {
const id = Date.now();
EventService.subscribers.push({
id, event, callback
});
// Unsubscribe
return {
unsubscribe: () => {
EventService.subscribers = EventService.subscribers.filter(p => p.id !== id);
},
};
}
static emit<T>(event: string, payload: T) {
for (let sub of EventService.subscribers) {
if (event === sub.event && sub.callback) {
try {
sub.callback(payload, event);
} catch (ex) {
logger.error(`Error in emit() for ${event}:`, ex, payload);
}
}
}
}
} | infanf/homer | frontend/src/services/event.service.ts | TypeScript |
TypeAliasDeclaration |
export type SubscribeCallback<T> = (payload: T, event?: string) => void; | infanf/homer | frontend/src/services/event.service.ts | TypeScript |
TypeAliasDeclaration |
export type Unsubscribe = {
unsubscribe: (() => void)
}; | infanf/homer | frontend/src/services/event.service.ts | TypeScript |
MethodDeclaration |
static subscribe<T>(event: string, callback: SubscribeCallback<T>): Unsubscribe {
const id = Date.now();
EventService.subscribers.push({
id, event, callback
});
// Unsubscribe
return {
unsubscribe: () => {
EventService.subscribers = EventService.subscribers.filter(p => p.id !== id);
},
};
} | infanf/homer | frontend/src/services/event.service.ts | TypeScript |
MethodDeclaration |
static emit<T>(event: string, payload: T) {
for (let sub of EventService.subscribers) {
if (event === sub.event && sub.callback) {
try {
sub.callback(payload, event);
} catch (ex) {
logger.error(`Error in emit() for ${event}:`, ex, payload);
}
}
}
} | infanf/homer | frontend/src/services/event.service.ts | TypeScript |
FunctionDeclaration |
function doCut (d: string): VBox[] {
let dim1 = d + '1'
let dim2 = d + '2'
let d1 = vbox.dimension[dim1]
let d2 = vbox.dimension[dim2]
let vbox1 = vbox.clone()
let vbox2 = vbox.clone()
let left = splitPoint - d1
let right = d2 - splitPoint
if (left <= right) {
d2 = Math.min(d2 - 1, ~~(splitPoint + right / 2))
d2 = Math.max(0, d2)
} else {
d2 = Math.max(d1, ~~(splitPoint - 1 - left / 2))
d2 = Math.min(vbox.dimension[dim2], d2)
}
while (!accSum![d2]) d2++
let c2 = reverseSum[d2]
while (!c2 && accSum![d2 - 1]) c2 = reverseSum[--d2]
vbox1.dimension[dim2] = d2
vbox2.dimension[dim1] = d2 + 1
return [vbox1, vbox2]
} | Abhi6722/hackers-hub-website | node_modules/node-vibrant/src/quantizer/vbox.ts | TypeScript |
InterfaceDeclaration |
export interface Dimension {
r1: number
r2: number
g1: number
g2: number
b1: number
b2: number
[d: string]: number
} | Abhi6722/hackers-hub-website | node_modules/node-vibrant/src/quantizer/vbox.ts | TypeScript |
MethodDeclaration |
static build (pixels: Pixels, shouldIgnore?: Filter): VBox {
let hn = 1 << (3 * SIGBITS)
let hist = new Uint32Array(hn)
let rmax: number
let rmin: number
let gmax: number
let gmin: number
let bmax: number
let bmin: number
let r: number
let g: number
let b: number
let a: number
rmax = gmax = bmax = 0
rmin = gmin = bmin = Number.MAX_VALUE
let n = pixels.length / 4
let i = 0
while (i < n) {
let offset = i * 4
i++
r = pixels[offset + 0]
g = pixels[offset + 1]
b = pixels[offset + 2]
a = pixels[offset + 3]
// Ignored pixels' alpha is marked as 0 in filtering stage
if (a === 0) continue
r = r >> RSHIFT
g = g >> RSHIFT
b = b >> RSHIFT
let index = getColorIndex(r, g, b)
hist[index] += 1
if (r > rmax) rmax = r
if (r < rmin) rmin = r
if (g > gmax) gmax = g
if (g < gmin) gmin = g
if (b > bmax) bmax = b
if (b < bmin) bmin = b
}
return new VBox(rmin, rmax, gmin, gmax, bmin, bmax, hist)
} | Abhi6722/hackers-hub-website | node_modules/node-vibrant/src/quantizer/vbox.ts | TypeScript |
MethodDeclaration |
invalidate (): void {
this._volume = this._count = -1
this._avg = null
} | Abhi6722/hackers-hub-website | node_modules/node-vibrant/src/quantizer/vbox.ts | TypeScript |
MethodDeclaration |
volume (): number {
if (this._volume < 0) {
let { r1, r2, g1, g2, b1, b2 } = this.dimension
this._volume = (r2 - r1 + 1) * (g2 - g1 + 1) * (b2 - b1 + 1)
}
return this._volume
} | Abhi6722/hackers-hub-website | node_modules/node-vibrant/src/quantizer/vbox.ts | TypeScript |
MethodDeclaration |
count (): number {
if (this._count < 0) {
let { hist } = this
let { r1, r2, g1, g2, b1, b2 } = this.dimension
let c = 0
for (let r = r1; r <= r2; r++) {
for (let g = g1; g <= g2; g++) {
for (let b = b1; b <= b2; b++) {
let index = getColorIndex(r, g, b)
c += hist[index]
}
}
}
this._count = c
}
return this._count
} | Abhi6722/hackers-hub-website | node_modules/node-vibrant/src/quantizer/vbox.ts | TypeScript |
MethodDeclaration |
clone (): VBox {
let { hist } = this
let { r1, r2, g1, g2, b1, b2 } = this.dimension
return new VBox(r1, r2, g1, g2, b1, b2, hist)
} | Abhi6722/hackers-hub-website | node_modules/node-vibrant/src/quantizer/vbox.ts | TypeScript |
MethodDeclaration |
avg (): Vec3 {
if (!this._avg) {
let { hist } = this
let { r1, r2, g1, g2, b1, b2 } = this.dimension
let ntot = 0
let mult = 1 << (8 - SIGBITS)
let rsum: number
let gsum: number
let bsum: number
rsum = gsum = bsum = 0
for (let r = r1; r <= r2; r++) {
for (let g = g1; g <= g2; g++) {
for (let b = b1; b <= b2; b++) {
var index = getColorIndex(r, g, b)
var h = hist[index]
ntot += h
rsum += (h * (r + 0.5) * mult)
gsum += (h * (g + 0.5) * mult)
bsum += (h * (b + 0.5) * mult)
}
}
}
if (ntot) {
this._avg = [
~~(rsum / ntot),
~~(gsum / ntot),
~~(bsum / ntot)
]
} else {
this._avg = [
~~(mult * (r1 + r2 + 1) / 2),
~~(mult * (g1 + g2 + 1) / 2),
~~(mult * (b1 + b2 + 1) / 2)
]
}
}
return this._avg
} | Abhi6722/hackers-hub-website | node_modules/node-vibrant/src/quantizer/vbox.ts | TypeScript |
MethodDeclaration |
contains (rgb: Vec3): boolean {
let [r, g, b] = rgb
let { r1, r2, g1, g2, b1, b2 } = this.dimension
r >>= RSHIFT
g >>= RSHIFT
b >>= RSHIFT
return r >= r1 && r <= r2 &&
g >= g1 && g <= g2 &&
b >= b1 && b <= b2
} | Abhi6722/hackers-hub-website | node_modules/node-vibrant/src/quantizer/vbox.ts | TypeScript |
MethodDeclaration |
split (): VBox[] {
let { hist } = this
let { r1, r2, g1, g2, b1, b2 } = this.dimension
let count = this.count()
if (!count) return []
if (count === 1) return [this.clone()]
let rw = r2 - r1 + 1
let gw = g2 - g1 + 1
let bw = b2 - b1 + 1
let maxw = Math.max(rw, gw, bw)
let accSum: Uint32Array | null = null
let sum: number
let total: number
sum = total = 0
let maxd: 'r' | 'g' | 'b' | null = null
if (maxw === rw) {
maxd = 'r'
accSum = new Uint32Array(r2 + 1)
for (let r = r1; r <= r2; r++) {
sum = 0
for (let g = g1; g <= g2; g++) {
for (let b = b1; b <= b2; b++) {
let index = getColorIndex(r, g, b)
sum += hist[index]
}
}
total += sum
accSum[r] = total
}
} else if (maxw === gw) {
maxd = 'g'
accSum = new Uint32Array(g2 + 1)
for (let g = g1; g <= g2; g++) {
sum = 0
for (let r = r1; r <= r2; r++) {
for (let b = b1; b <= b2; b++) {
let index = getColorIndex(r, g, b)
sum += hist[index]
}
}
total += sum
accSum[g] = total
}
} else {
maxd = 'b'
accSum = new Uint32Array(b2 + 1)
for (let b = b1; b <= b2; b++) {
sum = 0
for (let r = r1; r <= r2; r++) {
for (let g = g1; g <= g2; g++) {
let index = getColorIndex(r, g, b)
sum += hist[index]
}
}
total += sum
accSum[b] = total
}
}
let splitPoint = -1
let reverseSum = new Uint32Array(accSum.length)
for (let i = 0; i < accSum.length; i++) {
let d = accSum[i]
if (splitPoint < 0 && d > total / 2) splitPoint = i
reverseSum[i] = total - d
}
let vbox = this
function doCut (d: string): VBox[] {
let dim1 = d + '1'
let dim2 = d + '2'
let d1 = vbox.dimension[dim1]
let d2 = vbox.dimension[dim2]
let vbox1 = vbox.clone()
let vbox2 = vbox.clone()
let left = splitPoint - d1
let right = d2 - splitPoint
if (left <= right) {
d2 = Math.min(d2 - 1, ~~(splitPoint + right / 2))
d2 = Math.max(0, d2)
} else {
d2 = Math.max(d1, ~~(splitPoint - 1 - left / 2))
d2 = Math.min(vbox.dimension[dim2], d2)
}
while (!accSum![d2]) d2++
let c2 = reverseSum[d2]
while (!c2 && accSum![d2 - 1]) c2 = reverseSum[--d2]
vbox1.dimension[dim2] = d2
vbox2.dimension[dim1] = d2 + 1
return [vbox1, vbox2]
}
return doCut(maxd)
} | Abhi6722/hackers-hub-website | node_modules/node-vibrant/src/quantizer/vbox.ts | TypeScript |
ClassDeclaration |
@Component({
selector: "div[check-list-item]",
templateUrl: "./check-list-item.component.html",
styleUrls: ["./check-list-item.component.less"],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class CheckListItemComponent extends BaseElementComponent implements OnInit {
static type = 'check-list-item';
constructor(
@Inject(KEY_TOKEN) readonly key: Key,
public deps: NsDepsService,
public editorService: NsEditorService,
public elementRef: ElementRef,
public cdr: ChangeDetectorRef,
) {
super(key, deps, editorService, elementRef, cdr);
}
ngOnInit(): void {
this.init();
this.watchDeps();
}
handleCheckboxChange($event: any) {
const path = AngularEditor.findPath(this.editorService.editor, this.cNode);
const newProperties: Partial<SlateElement & {checked: boolean}> = {
checked: $event.target?.checked
};
Transforms.setNodes(this.editorService.editor, newProperties, { at: path });
}
} | chongqiangchen/slate-ng | projects/demo/src/app/examples/check-list/check-list-item/check-list-item.component.ts | TypeScript |
MethodDeclaration |
ngOnInit(): void {
this.init();
this.watchDeps();
} | chongqiangchen/slate-ng | projects/demo/src/app/examples/check-list/check-list-item/check-list-item.component.ts | TypeScript |
MethodDeclaration |
handleCheckboxChange($event: any) {
const path = AngularEditor.findPath(this.editorService.editor, this.cNode);
const newProperties: Partial<SlateElement & {checked: boolean}> = {
checked: $event.target?.checked
};
Transforms.setNodes(this.editorService.editor, newProperties, { at: path });
} | chongqiangchen/slate-ng | projects/demo/src/app/examples/check-list/check-list-item/check-list-item.component.ts | TypeScript |
ArrowFunction |
async (context, req, res) =>
res.ok({ body: { version: '0.0.1' } }) | peterschretlen/kibana | src/core/server/server.ts | TypeScript |
ArrowFunction |
async (context, req, res): Promise<RequestHandlerContext['core']> => {
const savedObjectsClient = this.coreStart!.savedObjects.getScopedClient(req);
const uiSettingsClient = coreSetup.uiSettings.asScopedToClient(savedObjectsClient);
return {
rendering: {
render: async (options = {}) =>
rendering.render(req, uiSettingsClient, {
...options,
vars: await this.legacy.legacyInternals!.getVars('core', req),
}),
},
savedObjects: {
client: savedObjectsClient,
typeRegistry: this.coreStart!.savedObjects.getTypeRegistry(),
},
elasticsearch: {
adminClient: coreSetup.elasticsearch.adminClient.asScoped(req),
dataClient: coreSetup.elasticsearch.dataClient.asScoped(req),
},
uiSettings: {
client: uiSettingsClient,
},
};
} | peterschretlen/kibana | src/core/server/server.ts | TypeScript |
ArrowFunction |
async (options = {}) =>
rendering.render(req, uiSettingsClient, {
...options,
vars: await this.legacy.legacyInternals!.getVars('core', req),
}) | peterschretlen/kibana | src/core/server/server.ts | TypeScript |
MethodDeclaration |
public async setup() {
this.log.debug('setting up server');
// Discover any plugins before continuing. This allows other systems to utilize the plugin dependency graph.
const pluginDependencies = await this.plugins.discover();
const legacyPlugins = await this.legacy.discoverPlugins();
// Immediately terminate in case of invalid configuration
await this.configService.validate();
await ensureValidConfiguration(this.configService, legacyPlugins);
const contextServiceSetup = this.context.setup({
// We inject a fake "legacy plugin" with dependencies on every plugin so that legacy plugins:
// 1) Can access context from any NP plugin
// 2) Can register context providers that will only be available to other legacy plugins and will not leak into
// New Platform plugins.
pluginDependencies: new Map([
...pluginDependencies,
[this.legacy.legacyId, [...pluginDependencies.keys()]],
]),
});
const uuidSetup = await this.uuid.setup();
const httpSetup = await this.http.setup({
context: contextServiceSetup,
});
this.registerDefaultRoute(httpSetup);
const capabilitiesSetup = this.capabilities.setup({ http: httpSetup });
const elasticsearchServiceSetup = await this.elasticsearch.setup({
http: httpSetup,
});
const savedObjectsSetup = await this.savedObjects.setup({
http: httpSetup,
elasticsearch: elasticsearchServiceSetup,
legacyPlugins,
});
const uiSettingsSetup = await this.uiSettings.setup({
http: httpSetup,
savedObjects: savedObjectsSetup,
});
const metricsSetup = await this.metrics.setup({ http: httpSetup });
const coreSetup: InternalCoreSetup = {
capabilities: capabilitiesSetup,
context: contextServiceSetup,
elasticsearch: elasticsearchServiceSetup,
http: httpSetup,
uiSettings: uiSettingsSetup,
savedObjects: savedObjectsSetup,
uuid: uuidSetup,
metrics: metricsSetup,
};
const pluginsSetup = await this.plugins.setup(coreSetup);
const renderingSetup = await this.rendering.setup({
http: httpSetup,
legacyPlugins,
plugins: pluginsSetup,
});
await this.legacy.setup({
core: { ...coreSetup, plugins: pluginsSetup, rendering: renderingSetup },
plugins: mapToObject(pluginsSetup.contracts),
});
this.registerCoreContext(coreSetup, renderingSetup);
return coreSetup;
} | peterschretlen/kibana | src/core/server/server.ts | TypeScript |
MethodDeclaration |
public async start() {
this.log.debug('starting server');
const savedObjectsStart = await this.savedObjects.start({});
const capabilitiesStart = this.capabilities.start();
const uiSettingsStart = await this.uiSettings.start();
const pluginsStart = await this.plugins.start({
capabilities: capabilitiesStart,
savedObjects: savedObjectsStart,
uiSettings: uiSettingsStart,
});
this.coreStart = {
capabilities: capabilitiesStart,
savedObjects: savedObjectsStart,
uiSettings: uiSettingsStart,
};
await this.legacy.start({
core: {
...this.coreStart,
plugins: pluginsStart,
},
plugins: mapToObject(pluginsStart.contracts),
});
await this.http.start();
await this.rendering.start();
await this.metrics.start();
return this.coreStart;
} | peterschretlen/kibana | src/core/server/server.ts | TypeScript |
MethodDeclaration |
public async stop() {
this.log.debug('stopping server');
await this.legacy.stop();
await this.plugins.stop();
await this.savedObjects.stop();
await this.elasticsearch.stop();
await this.http.stop();
await this.uiSettings.stop();
await this.rendering.stop();
await this.metrics.stop();
} | peterschretlen/kibana | src/core/server/server.ts | TypeScript |
MethodDeclaration |
private registerDefaultRoute(httpSetup: InternalHttpServiceSetup) {
const router = httpSetup.createRouter('/core');
router.get({ path: '/', validate: false }, async (context, req, res) =>
res.ok({ body: { version: '0.0.1' } })
);
} | peterschretlen/kibana | src/core/server/server.ts | TypeScript |
MethodDeclaration |
private registerCoreContext(coreSetup: InternalCoreSetup, rendering: RenderingServiceSetup) {
coreSetup.http.registerRouteHandlerContext(
coreId,
'core',
async (context, req, res): Promise<RequestHandlerContext['core']> => {
const savedObjectsClient = this.coreStart!.savedObjects.getScopedClient(req);
const uiSettingsClient = coreSetup.uiSettings.asScopedToClient(savedObjectsClient);
return {
rendering: {
render: async (options = {}) =>
rendering.render(req, uiSettingsClient, {
...options,
vars: await this.legacy.legacyInternals!.getVars('core', req),
}),
},
savedObjects: {
client: savedObjectsClient,
typeRegistry: this.coreStart!.savedObjects.getTypeRegistry(),
},
elasticsearch: {
adminClient: coreSetup.elasticsearch.adminClient.asScoped(req),
dataClient: coreSetup.elasticsearch.dataClient.asScoped(req),
},
uiSettings: {
client: uiSettingsClient,
},
};
}
);
} | peterschretlen/kibana | src/core/server/server.ts | TypeScript |
MethodDeclaration |
public async setupCoreConfig() {
const schemas: Array<[ConfigPath, Type<unknown>]> = [
[pathConfig.path, pathConfig.schema],
[cspConfig.path, cspConfig.schema],
[elasticsearchConfig.path, elasticsearchConfig.schema],
[loggingConfig.path, loggingConfig.schema],
[httpConfig.path, httpConfig.schema],
[pluginsConfig.path, pluginsConfig.schema],
[devConfig.path, devConfig.schema],
[kibanaConfig.path, kibanaConfig.schema],
[savedObjectsConfig.path, savedObjectsConfig.schema],
[savedObjectsMigrationConfig.path, savedObjectsMigrationConfig.schema],
[uiSettingsConfig.path, uiSettingsConfig.schema],
[opsConfig.path, opsConfig.schema],
];
this.configService.addDeprecationProvider(rootConfigPath, coreDeprecationProvider);
this.configService.addDeprecationProvider(
elasticsearchConfig.path,
elasticsearchConfig.deprecations!
);
this.configService.addDeprecationProvider(
uiSettingsConfig.path,
uiSettingsConfig.deprecations!
);
for (const [path, schema] of schemas) {
await this.configService.setSchema(path, schema);
}
} | peterschretlen/kibana | src/core/server/server.ts | TypeScript |
ClassDeclaration |
class HtmlRenderer {
private readonly templates: { [key: string]: Template }
constructor() {
this.templates = {}
}
public addTemplate(template: Template): void {
if (this.templates[template.getId()]) {
throw new Error(`Template with key "${template.getId()}" already exists.`)
}
this.templates[template.getId()] = template
}
public getTemplate(key: string): Template {
if (!this.templates[key]) {
throw new Error(`Template with key "${key}" does not exists.`)
}
return this.templates[key]
}
public getIds(): Array<string> {
return Object.keys(this.templates)
}
public render(key: string, data: Record<string, unknown> = {}): string {
const template = this.getTemplate(key)
const errors = template.validate(data)
if (errors.length) {
throw new ValidationError(`Template with key "${key}" is not valid.`, errors)
}
return pug.renderFile(template.getPath(), { cache: true, ...data })
}
} | VencaKrecl/pdf-generator | src/html-renderer/HtmlRenderer.ts | TypeScript |
MethodDeclaration |
public addTemplate(template: Template): void {
if (this.templates[template.getId()]) {
throw new Error(`Template with key "${template.getId()}" already exists.`)
}
this.templates[template.getId()] = template
} | VencaKrecl/pdf-generator | src/html-renderer/HtmlRenderer.ts | TypeScript |
MethodDeclaration |
public getTemplate(key: string): Template {
if (!this.templates[key]) {
throw new Error(`Template with key "${key}" does not exists.`)
}
return this.templates[key]
} | VencaKrecl/pdf-generator | src/html-renderer/HtmlRenderer.ts | TypeScript |
MethodDeclaration |
public getIds(): Array<string> {
return Object.keys(this.templates)
} | VencaKrecl/pdf-generator | src/html-renderer/HtmlRenderer.ts | TypeScript |
MethodDeclaration |
public render(key: string, data: Record<string, unknown> = {}): string {
const template = this.getTemplate(key)
const errors = template.validate(data)
if (errors.length) {
throw new ValidationError(`Template with key "${key}" is not valid.`, errors)
}
return pug.renderFile(template.getPath(), { cache: true, ...data })
} | VencaKrecl/pdf-generator | src/html-renderer/HtmlRenderer.ts | TypeScript |
ClassDeclaration |
export class SidenavItem {
name: string;
icon?: string;
routeOrFunction?: any;
parent?: SidenavItem;
subItems?: SidenavItem[];
position?: number;
pathMatchExact?: boolean;
badge?: string;
badgeColor?: string;
} | pavanpaik/Fury | src/app/core/sidenav/sidenav-item/sidenav-item.interface.ts | TypeScript |
ClassDeclaration |
export declare class KinveyError extends Error {
debug: string;
constructor(message?: string, debug?: string);
} | delangel-j/vueFrontend | node_modules/kinvey-js-sdk/lib/errors/kinvey.d.ts | TypeScript |
TypeAliasDeclaration | // Declare state
export type State = typeof state; | bvsbharat/scavenger-hunt | src/store/side-menu/state.ts | TypeScript |
FunctionDeclaration |
export function activate(_context: vscode.ExtensionContext) {
// Set context as a global as some tests depend on it
(global as any).testExtensionContext = _context;
} | 02818bea-9a08-4b24-a53f-8d4ad597fe20/vscode | extensions/vscode-api-tests/src/extension.ts | TypeScript |
FunctionDeclaration |
function getTarget(): vscode.ConfigurationTarget {
return (vscode.workspace.workspaceFolders) ? vscode.ConfigurationTarget.WorkspaceFolder : vscode.ConfigurationTarget.Global;
} | KashaSup/vscode-cpptools | Extension/src/LanguageServer/settings.ts | TypeScript |
ClassDeclaration |
class Settings {
private readonly settings: vscode.WorkspaceConfiguration;
/**
* create the Settings object.
* @param resource The path to a resource to which the settings should apply, or undefined if global settings are desired
*/
constructor(section: string, resource?: vscode.Uri) {
this.settings = vscode.workspace.getConfiguration(section, resource ? resource : null);
}
protected get Section(): vscode.WorkspaceConfiguration { return this.settings; }
} | KashaSup/vscode-cpptools | Extension/src/LanguageServer/settings.ts | TypeScript |
ClassDeclaration |
export class CppSettings extends Settings {
constructor(resource?: vscode.Uri) {
super("C_Cpp", resource);
}
public get clangFormatPath(): string { return super.Section.get<string>("clang_format_path"); }
public get clangFormatStyle(): string { return super.Section.get<string>("clang_format_style"); }
public get clangFormatFallbackStyle(): string { return super.Section.get<string>("clang_format_fallbackStyle"); }
public get clangFormatSortIncludes(): string { return super.Section.get<string>("clang_format_sortIncludes"); }
public get clangFormatOnSave(): string { return super.Section.get<string>("clang_format_formatOnSave"); }
public get formatting(): string { return super.Section.get<string>("formatting"); }
public get experimentalFeatures(): string { return super.Section.get<string>("experimentalFeatures"); }
public get suggestSnippets(): boolean { return super.Section.get<boolean>("suggestSnippets"); }
public get intelliSenseEngine(): string { return super.Section.get<string>("intelliSenseEngine"); }
public get intelliSenseEngineFallback(): string { return super.Section.get<string>("intelliSenseEngineFallback"); }
public get intelliSenseCachePath(): string { return super.Section.get<string>("intelliSenseCachePath"); }
public get intelliSenseCacheSize(): number { return super.Section.get<number>("intelliSenseCacheSize"); }
public get errorSquiggles(): string { return super.Section.get<string>("errorSquiggles"); }
public get inactiveRegionOpacity(): number { return super.Section.get<number>("inactiveRegionOpacity"); }
public get inactiveRegionForegroundColor(): string { return super.Section.get<string>("inactiveRegionForegroundColor"); }
public get inactiveRegionBackgroundColor(): string { return super.Section.get<string>("inactiveRegionBackgroundColor"); }
public get autoComplete(): string { return super.Section.get<string>("autocomplete"); }
public get loggingLevel(): string { return super.Section.get<string>("loggingLevel"); }
public get navigationLength(): number { return super.Section.get<number>("navigation.length", 60); }
public get autoAddFileAssociations(): boolean { return super.Section.get<boolean>("autoAddFileAssociations"); }
public get workspaceParsingPriority(): string { return super.Section.get<string>("workspaceParsingPriority"); }
public get workspaceSymbols(): string { return super.Section.get<string>("workspaceSymbols"); }
public get exclusionPolicy(): string { return super.Section.get<string>("exclusionPolicy"); }
public get commentContinuationPatterns(): (string | CommentPattern)[] { return super.Section.get<(string | CommentPattern)[]>("commentContinuationPatterns"); }
public get configurationWarnings(): string { return super.Section.get<string>("configurationWarnings"); }
public get preferredPathSeparator(): string { return super.Section.get<string>("preferredPathSeparator"); }
public get updateChannel(): string { return super.Section.get<string>("updateChannel"); }
public get vcpkgEnabled(): boolean { return super.Section.get<boolean>("vcpkg.enabled"); }
public get renameRequiresIdentifier(): boolean { return super.Section.get<boolean>("renameRequiresIdentifier"); }
public get defaultIncludePath(): string[] { return super.Section.get<string[]>("default.includePath"); }
public get defaultDefines(): string[] { return super.Section.get<string[]>("default.defines"); }
public get defaultMacFrameworkPath(): string[] { return super.Section.get<string[]>("default.macFrameworkPath"); }
public get defaultWindowsSdkVersion(): string { return super.Section.get<string>("default.windowsSdkVersion"); }
public get defaultCompileCommands(): string { return super.Section.get<string>("default.compileCommands"); }
public get defaultForcedInclude(): string[] { return super.Section.get<string[]>("default.forcedInclude"); }
public get defaultIntelliSenseMode(): string { return super.Section.get<string>("default.intelliSenseMode"); }
public get defaultCompilerPath(): string { return super.Section.get<string>("default.compilerPath"); }
public get defaultCompilerArgs(): string[] { return super.Section.get<string[]>("default.compilerArgs"); }
public get defaultCStandard(): string { return super.Section.get<string>("default.cStandard"); }
public get defaultCppStandard(): string { return super.Section.get<string>("default.cppStandard"); }
public get defaultConfigurationProvider(): string { return super.Section.get<string>("default.configurationProvider"); }
public get defaultBrowsePath(): string[] { return super.Section.get<string[]>("default.browse.path"); }
public get defaultDatabaseFilename(): string { return super.Section.get<string>("default.browse.databaseFilename"); }
public get defaultLimitSymbolsToIncludedHeaders(): boolean { return super.Section.get<boolean>("default.browse.limitSymbolsToIncludedHeaders"); }
public get defaultSystemIncludePath(): string[] { return super.Section.get<string[]>("default.systemIncludePath"); }
public get defaultEnableConfigurationSquiggles(): boolean { return super.Section.get<boolean>("default.enableConfigurationSquiggles"); }
public get enhancedColorization(): boolean {
return super.Section.get<string>("enhancedColorization") === "Enabled"
&& super.Section.get<string>("intelliSenseEngine") === "Default"
&& vscode.workspace.getConfiguration("workbench").get<string>("colorTheme") !== "Default High Contrast";
}
public get dimInactiveRegions(): boolean {
return super.Section.get<boolean>("dimInactiveRegions")
&& super.Section.get<string>("intelliSenseEngine") === "Default"
&& vscode.workspace.getConfiguration("workbench").get<string>("colorTheme") !== "Default High Contrast";
}
public toggleSetting(name: string, value1: string, value2: string): void {
let value: string = super.Section.get<string>(name);
super.Section.update(name, value === value1 ? value2 : value1, getTarget());
}
public update<T>(name: string, value: T): void {
super.Section.update(name, value);
}
} | KashaSup/vscode-cpptools | Extension/src/LanguageServer/settings.ts | TypeScript |
ClassDeclaration |
export class OtherSettings {
private resource: vscode.Uri;
constructor(resource?: vscode.Uri) {
if (!resource) {
resource = null;
}
this.resource = resource;
}
public get editorTabSize(): number { return vscode.workspace.getConfiguration("editor", this.resource).get<number>("tabSize"); }
public get filesAssociations(): any { return vscode.workspace.getConfiguration("files", null).get("associations"); }
public set filesAssociations(value: any) {
vscode.workspace.getConfiguration("files", null).update("associations", value, vscode.ConfigurationTarget.Workspace);
}
public get filesExclude(): vscode.WorkspaceConfiguration { return vscode.workspace.getConfiguration("files", this.resource).get("exclude"); }
public get searchExclude(): vscode.WorkspaceConfiguration { return vscode.workspace.getConfiguration("search", this.resource).get("exclude"); }
public get settingsEditor(): string { return vscode.workspace.getConfiguration("workbench.settings").get<string>("editor"); }
public get colorTheme(): string { return vscode.workspace.getConfiguration("workbench").get<string>("colorTheme"); }
public getCustomColorToken(colorTokenName: string): string { return vscode.workspace.getConfiguration("editor.tokenColorCustomizations").get<string>(colorTokenName); }
public getCustomThemeSpecificColorToken(themeName: string, colorTokenName: string): string { return vscode.workspace.getConfiguration(`editor.tokenColorCustomizations.[${themeName}]`, this.resource).get<string>(colorTokenName); }
public get customTextMateRules(): TextMateRule[] { return vscode.workspace.getConfiguration("editor.tokenColorCustomizations").get<TextMateRule[]>("textMateRules"); }
public getCustomThemeSpecificTextMateRules(themeName: string): TextMateRule[] { return vscode.workspace.getConfiguration(`editor.tokenColorCustomizations.[${themeName}]`, this.resource).get<TextMateRule[]>("textMateRules"); }
} | KashaSup/vscode-cpptools | Extension/src/LanguageServer/settings.ts | TypeScript |
InterfaceDeclaration |
export interface TextMateRuleSettings {
foreground: string | undefined;
background: string | undefined;
fontStyle: string | undefined;
} | KashaSup/vscode-cpptools | Extension/src/LanguageServer/settings.ts | TypeScript |
InterfaceDeclaration |
export interface TextMateRule {
scope: any;
settings: TextMateRuleSettings;
} | KashaSup/vscode-cpptools | Extension/src/LanguageServer/settings.ts | TypeScript |
MethodDeclaration |
public toggleSetting(name: string, value1: string, value2: string): void {
let value: string = super.Section.get<string>(name);
super.Section.update(name, value === value1 ? value2 : value1, getTarget());
} | KashaSup/vscode-cpptools | Extension/src/LanguageServer/settings.ts | TypeScript |
MethodDeclaration |
public update<T>(name: string, value: T): void {
super.Section.update(name, value);
} | KashaSup/vscode-cpptools | Extension/src/LanguageServer/settings.ts | TypeScript |
MethodDeclaration |
public getCustomColorToken(colorTokenName: string): string { return vscode.workspace.getConfiguration("editor.tokenColorCustomizations").get<string>(colorTokenName); } | KashaSup/vscode-cpptools | Extension/src/LanguageServer/settings.ts | TypeScript |
MethodDeclaration |
public getCustomThemeSpecificColorToken(themeName: string, colorTokenName: string): string { return vscode.workspace.getConfiguration(`editor.tokenColorCustomizations.[${themeName}]`, this.resource).get<string>(colorTokenName); } | KashaSup/vscode-cpptools | Extension/src/LanguageServer/settings.ts | TypeScript |
MethodDeclaration |
public getCustomThemeSpecificTextMateRules(themeName: string): TextMateRule[] { return vscode.workspace.getConfiguration(`editor.tokenColorCustomizations.[${themeName}]`, this.resource).get<TextMateRule[]>("textMateRules"); } | KashaSup/vscode-cpptools | Extension/src/LanguageServer/settings.ts | TypeScript |
ArrowFunction |
({ message, date, category, messageType }) => {
this.databaseService.insertLogs(date, message, messageType, category);
} | dirceusemighini/Med-Link-User-EN | src/app/search/search.component.ts | TypeScript |
ArrowFunction |
() =>
console.log(this.nsUrl2 + "fffffffff3333333f") | dirceusemighini/Med-Link-User-EN | src/app/search/search.component.ts | TypeScript |
ArrowFunction |
r => {
console.log("Dialog closed!" + r.result + ", A TO TEKST:" + r.text);
this.range = Number(r.text);
if(this.range < 80 || this.range > 120){
dialogs.alert({message: "BG VALUE OUT OF ACCEPTABLE RANGE: 80 - 120 mg/dl", okButtonText: "OK"});
}
else {
appSettings.setNumber('range', this.range);
this.rangeText = "AUTO STOP AT BG VALUE: " + this.range + " MG/DL";
}
} | dirceusemighini/Med-Link-User-EN | src/app/search/search.component.ts | TypeScript |
ArrowFunction |
r => {
console.log("Dialog closed!" + r.result + ", A TO TEKST:" + r.text);
if (r.text === '') {
appSettings.setString('phoneN', 'ENTER PHONE NUMBER');
this.phoneN = 'ENTER PHONE NUMBER';
}
else {
Permissions.requestPermission(
android.Manifest.permission.SEND_SMS, "zezwolic na czytanie SMS?"
).then(() => Permissions.requestPermission(android.Manifest.permission.READ_SMS));
appSettings.setString('phoneN', r.text);
this.phoneN = 'PHONE: ' + r.text;
}
} | dirceusemighini/Med-Link-User-EN | src/app/search/search.component.ts | TypeScript |
ArrowFunction |
() => Permissions.requestPermission(android.Manifest.permission.READ_SMS) | dirceusemighini/Med-Link-User-EN | src/app/search/search.component.ts | TypeScript |
ArrowFunction |
() => {
if (a.isAlive() === false){
clearInterval(u);
console.log("CIOSs");
Permissions.requestPermission(
android.Manifest.permission.WRITE_EXTERNAL_STORAGE,
).then(() =>
compose({
subject: "Debug med-link-ui",
body: "aReduced2",
to: ["[email protected]"],
attachments:
[{
mimeType: 'text',
path: myFile.path,
fileName: 'my.txt'
}]
})
)
}
else {
console.log("BAM BAM");
}
} | dirceusemighini/Med-Link-User-EN | src/app/search/search.component.ts | TypeScript |
ArrowFunction |
() =>
compose({
subject: "Debug med-link-ui",
body: "aReduced2",
to: ["[email protected]"],
attachments:
[{
mimeType: 'text',
path: myFile.path,
fileName: 'my.txt'
}]
}) | dirceusemighini/Med-Link-User-EN | src/app/search/search.component.ts | TypeScript |
ArrowFunction |
() =>
console.log(this.slowo + "aRRRRRRRRRR") | dirceusemighini/Med-Link-User-EN | src/app/search/search.component.ts | TypeScript |
ArrowFunction |
(resolve, reject) => {
this.getNSData().subscribe(g => {
g.map(bol => {
console.log(bol.http.toString() + "JJJJJJJ" + bol.secret.toString());
this.slowo =
this.slowo2 +
" " +
bol.http.toString() +
" " +
bol.secret.toString();
});
console.log("as" + this.slowo);
resolve(), reject();
});
} | dirceusemighini/Med-Link-User-EN | src/app/search/search.component.ts | TypeScript |
ArrowFunction |
g => {
g.map(bol => {
console.log(bol.http.toString() + "JJJJJJJ" + bol.secret.toString());
this.slowo =
this.slowo2 +
" " +
bol.http.toString() +
" " +
bol.secret.toString();
});
console.log("as" + this.slowo);
resolve(), reject();
} | dirceusemighini/Med-Link-User-EN | src/app/search/search.component.ts | TypeScript |
ArrowFunction |
bol => {
console.log(bol.http.toString() + "JJJJJJJ" + bol.secret.toString());
this.slowo =
this.slowo2 +
" " +
bol.http.toString() +
" " +
bol.secret.toString();
} | dirceusemighini/Med-Link-User-EN | src/app/search/search.component.ts | TypeScript |
ArrowFunction |
(resolve, reject) => {
this.getNSData().subscribe(g => {
g.map(bol => {
console.log(
bol.http.toString() + "66666666666" + bol.secret.toString()
);
this.nsUrl2 = bol.http.toString();
this.nsKey2 = bol.hash.toString();
});
console.log("as" + this.nsUrl2);
resolve(), reject();
});
} | dirceusemighini/Med-Link-User-EN | src/app/search/search.component.ts | TypeScript |
ArrowFunction |
g => {
g.map(bol => {
console.log(
bol.http.toString() + "66666666666" + bol.secret.toString()
);
this.nsUrl2 = bol.http.toString();
this.nsKey2 = bol.hash.toString();
});
console.log("as" + this.nsUrl2);
resolve(), reject();
} | dirceusemighini/Med-Link-User-EN | src/app/search/search.component.ts | TypeScript |
ArrowFunction |
bol => {
console.log(
bol.http.toString() + "66666666666" + bol.secret.toString()
);
this.nsUrl2 = bol.http.toString();
this.nsKey2 = bol.hash.toString();
} | dirceusemighini/Med-Link-User-EN | src/app/search/search.component.ts | TypeScript |
ArrowFunction |
rows => {
return rows.map(a => ({
http: a[0],
secret: a[1],
hash: a[2]
}));
} | dirceusemighini/Med-Link-User-EN | src/app/search/search.component.ts | TypeScript |
ArrowFunction |
a => ({
http: a[0],
secret: a[1],
hash: a[2]
}) | dirceusemighini/Med-Link-User-EN | src/app/search/search.component.ts | TypeScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.