type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
MethodDeclaration
onSortValueChanged(e: any) { this.isSortingByName = true; this.isSearchingByName = false; this.isFilteringByCategory = false; this.currentSortByPriceValue = e.value; if (e.value !== '(NONE)') { this.customerStore.initSortByPriceData( e.value, this.dataGrid.instance.pageIndex()...
b1506704/ng-health-care-demo
client/src/app/pages/admin/edit-customer-list/edit-customer-list.component.ts
TypeScript
MethodDeclaration
onFilterChange(e: any) { this.isFilteringByCategory = true; this.isSearchingByName = false; this.isSortingByName = false; this.currentCategoryFilterValue = e.value; console.log(e.value); if (e.value !== '-1') { this.customerStore.initFilterByCategoryData( e.value, this.dat...
b1506704/ng-health-care-demo
client/src/app/pages/admin/edit-customer-list/edit-customer-list.component.ts
TypeScript
MethodDeclaration
checkEditorMode() { if (this.isFilteringByCategory === true) { return 'FILTER'; } else if (this.isSearchingByName === true) { return 'SEARCH'; } else if (this.isSortingByName === true) { return 'SORT'; } else { return 'NORMAL'; } }
b1506704/ng-health-care-demo
client/src/app/pages/admin/edit-customer-list/edit-customer-list.component.ts
TypeScript
MethodDeclaration
onOptionChanged(e: any) { const editorMode = this.checkEditorMode(); // event of page index changed if (e.fullName === 'paging.pageIndex') { const currentIndex: number = e.value; console.log( `New page index: ${currentIndex}. Total items: ${this.customerList.length}` ); swit...
b1506704/ng-health-care-demo
client/src/app/pages/admin/edit-customer-list/edit-customer-list.component.ts
TypeScript
MethodDeclaration
paginatePureData(index: number) { if (index === 0) { this.customerStore.loadDataAsync(index, this.pageSize); this.customerStore.loadDataAsync(index + 1, this.pageSize); } else { this.customerStore.loadDataAsync(index, this.pageSize); this.customerStore.loadDataAsync(index + 1, this.page...
b1506704/ng-health-care-demo
client/src/app/pages/admin/edit-customer-list/edit-customer-list.component.ts
TypeScript
MethodDeclaration
paginateFilterData(index: number) { if (index === 0) { this.customerStore.filterCustomerByCategory( this.currentCategoryFilterValue, index, this.pageSize ); this.customerStore.filterCustomerByCategory( this.currentCategoryFilterValue, index + 1, thi...
b1506704/ng-health-care-demo
client/src/app/pages/admin/edit-customer-list/edit-customer-list.component.ts
TypeScript
MethodDeclaration
paginateSearchData(index: number) { if (index === 0) { this.customerStore.searchCustomerByName( this.currentSearchByNameValue, index, this.pageSize ); this.customerStore.searchCustomerByName( this.currentSearchByNameValue, index + 1, this.pageSize ...
b1506704/ng-health-care-demo
client/src/app/pages/admin/edit-customer-list/edit-customer-list.component.ts
TypeScript
MethodDeclaration
paginateSortData(index: number) { if (index === 0) { this.customerStore.sortCustomerByPrice( this.currentSortByPriceValue, index, this.pageSize ); this.customerStore.sortCustomerByPrice( this.currentSortByPriceValue, index + 1, this.pageSize )...
b1506704/ng-health-care-demo
client/src/app/pages/admin/edit-customer-list/edit-customer-list.component.ts
TypeScript
MethodDeclaration
onEditingStart() { this.store.showNotif('Edit mode on', 'custom'); }
b1506704/ng-health-care-demo
client/src/app/pages/admin/edit-customer-list/edit-customer-list.component.ts
TypeScript
MethodDeclaration
onInitNewRow() { this.store.showNotif( 'Blank row added, please fill in information', 'custom' ); }
b1506704/ng-health-care-demo
client/src/app/pages/admin/edit-customer-list/edit-customer-list.component.ts
TypeScript
MethodDeclaration
onSaved(e: any) { if (e.changes.length) { switch (e.changes[0].type) { case 'insert': this.customerStore.uploadCustomer( e.changes[0].data, this.dataGrid.instance.pageIndex(), this.pageSize ); break; case 'update': co...
b1506704/ng-health-care-demo
client/src/app/pages/admin/edit-customer-list/edit-customer-list.component.ts
TypeScript
MethodDeclaration
onEditCanceled() { this.store.showNotif('Editing cancelled', 'custom'); }
b1506704/ng-health-care-demo
client/src/app/pages/admin/edit-customer-list/edit-customer-list.component.ts
TypeScript
MethodDeclaration
selectionChangedHandler() { if (this.selectedRows.length) { this.isSelectInfoVisible = true; this.selectInfoText = `${this.selectedRows.length} rows selected`; this.selectedRows.forEach((row) => { console.log(row); }); } else { this.isSelectInfoVisible = false; } }
b1506704/ng-health-care-demo
client/src/app/pages/admin/edit-customer-list/edit-customer-list.component.ts
TypeScript
MethodDeclaration
changePageSize(pageSize: number) { this.dataGrid.instance.pageSize(pageSize); }
b1506704/ng-health-care-demo
client/src/app/pages/admin/edit-customer-list/edit-customer-list.component.ts
TypeScript
MethodDeclaration
goToPage(page: number) { this.dataGrid.instance.pageIndex(page); }
b1506704/ng-health-care-demo
client/src/app/pages/admin/edit-customer-list/edit-customer-list.component.ts
TypeScript
MethodDeclaration
deleteSelectedItems() { this.store.setIsLoading(true); const editorMode = this.checkEditorMode(); if (this.selectedRows.length) { this.customerStore.confirmDialog('').then((result: boolean) => { if (result) { this.customerHTTP .deleteSelectedCustomers(this.selectedRows) ...
b1506704/ng-health-care-demo
client/src/app/pages/admin/edit-customer-list/edit-customer-list.component.ts
TypeScript
MethodDeclaration
clearSelection() { this.selectedRows = []; }
b1506704/ng-health-care-demo
client/src/app/pages/admin/edit-customer-list/edit-customer-list.component.ts
TypeScript
MethodDeclaration
onRefresh() { this.isFilteringByCategory = false; this.isSearchingByName = false; this.isSortingByName = false; this.customerStore.initData( this.dataGrid.instance.pageIndex(), this.pageSize ); }
b1506704/ng-health-care-demo
client/src/app/pages/admin/edit-customer-list/edit-customer-list.component.ts
TypeScript
MethodDeclaration
onAddRandom() { this.customerStore .confirmDialog( 'This will generate random 10 items in database. Are you sure' ) .then((result: boolean) => { if (result) { this.isFilteringByCategory = false; this.store.setIsLoading(true); this.customerHTTP ...
b1506704/ng-health-care-demo
client/src/app/pages/admin/edit-customer-list/edit-customer-list.component.ts
TypeScript
MethodDeclaration
exportDataGridToExcel() { this.customerStore .confirmDialog( 'This will export all fetched data to excel. Are you sure?' ) .then((result: boolean) => { if (result) { this.store.setIsLoading(true); this.customerHTTP .fetchAll() .toPromise...
b1506704/ng-health-care-demo
client/src/app/pages/admin/edit-customer-list/edit-customer-list.component.ts
TypeScript
MethodDeclaration
// default export with selected row // onExporting(e: any) { // const workbook = new ExcelJS.Workbook(); // const worksheet = workbook.addWorksheet('Customer List'); // exportDataGrid({ // component: e.component, // worksheet: worksheet, // autoFilterEnabled: true, // }).then(() => { // workbook...
b1506704/ng-health-care-demo
client/src/app/pages/admin/edit-customer-list/edit-customer-list.component.ts
TypeScript
MethodDeclaration
deleteAll() { this.customerStore.deleteAllCustomers(); }
b1506704/ng-health-care-demo
client/src/app/pages/admin/edit-customer-list/edit-customer-list.component.ts
TypeScript
MethodDeclaration
navigateToEditDoctor() { this.router.navigate(['/edit_doctor_list']); }
b1506704/ng-health-care-demo
client/src/app/pages/admin/edit-customer-list/edit-customer-list.component.ts
TypeScript
MethodDeclaration
sourceDataListener() { return this.customerStore.$customerList.subscribe((data: any) => { this.customerList = data; }); }
b1506704/ng-health-care-demo
client/src/app/pages/admin/edit-customer-list/edit-customer-list.component.ts
TypeScript
MethodDeclaration
currentPageListener() { return this.customerStore.$currentPage.subscribe((data: any) => { this.currentIndexFromServer = data; }); }
b1506704/ng-health-care-demo
client/src/app/pages/admin/edit-customer-list/edit-customer-list.component.ts
TypeScript
MethodDeclaration
ngOnInit(): void { this.sourceDataListener(); this.currentPageListener(); setTimeout(() => { this.onRefresh(); }, 150); }
b1506704/ng-health-care-demo
client/src/app/pages/admin/edit-customer-list/edit-customer-list.component.ts
TypeScript
MethodDeclaration
ngOnDestroy(): void { this.sourceDataListener().unsubscribe(); this.currentPageListener().unsubscribe(); this.onRefresh(); }
b1506704/ng-health-care-demo
client/src/app/pages/admin/edit-customer-list/edit-customer-list.component.ts
TypeScript
ArrowFunction
async (req, res) => { const { nomComplet, nomSigles, quadrimestre, credits, tipus, mailProfessor, grauID, xatAssignaturaID, LlistaEstudiants } = req.body; let assignatura: IAssignatura = null; try { assignatura = await Assignatura.findOne({ nomComplet, grauID }); assignatura.nomComplet = nomComplet...
UPCSocialNetwork/backend
src/controllers/Assignatura/update.ts
TypeScript
FunctionDeclaration
export default async function getDevicePushTokenAsync(): Promise<DevicePushToken> { const data = await _subscribeDeviceToPushNotificationsAsync(); SyntheticPlatformEmitter.emit('onDevicePushToken', { devicePushToken: data }); return { type: Platform.OS, data }; }
AryanJ-NYC/expo
packages/expo-notifications/src/getDevicePushTokenAsync.web.ts
TypeScript
FunctionDeclaration
function guardPermission() { if (!('Notification' in window)) { throw new CodedError( 'ERR_UNAVAILABLE', 'The Web Notifications API is not available on this device.' ); } if (!navigator.serviceWorker) { throw new CodedError( 'ERR_UNAVAILABLE', 'Notifications cannot be used bec...
AryanJ-NYC/expo
packages/expo-notifications/src/getDevicePushTokenAsync.web.ts
TypeScript
FunctionDeclaration
async function _subscribeDeviceToPushNotificationsAsync(): Promise<DevicePushToken['data']> { // TODO: Remove eslint-disable once we upgrade to a version that supports ?. notation. // eslint-disable-next-line if (!Constants.manifest.notification?.vapidPublicKey) { throw new CodedError( 'ERR_NOTIFICATIO...
AryanJ-NYC/expo
packages/expo-notifications/src/getDevicePushTokenAsync.web.ts
TypeScript
FunctionDeclaration
// https://github.com/web-push-libs/web-push#using-vapid-key-for-applicationserverkey function _urlBase64ToUint8Array(base64String: string): Uint8Array { const padding = '='.repeat((4 - (base64String.length % 4)) % 4); const base64 = (base64String + padding).replace(/-/g, '+').replace(/_/g, '/'); const rawData =...
AryanJ-NYC/expo
packages/expo-notifications/src/getDevicePushTokenAsync.web.ts
TypeScript
ArrowFunction
() => ( <section data-testid='example-about-page'> <p> This
Wellers0n/react-router-testing-utils
src/pages/About/index.tsx
TypeScript
ClassDeclaration
/** * <p> * Gets the Amazon Chime SDK meeting details for the specified meeting ID. For more information about the Amazon Chime SDK, see * <a href="https://docs.aws.amazon.com/chime/latest/dg/meetings-sdk.html">Using the Amazon Chime SDK</a> * in the * <i>Amazon Chime Developer Guide</i> * . * </p> * @example ...
AllanZhengYP/aws-sdk-js-v3
clients/client-chime/src/commands/GetMeetingCommand.ts
TypeScript
InterfaceDeclaration
export interface GetMeetingCommandInput extends GetMeetingRequest {}
AllanZhengYP/aws-sdk-js-v3
clients/client-chime/src/commands/GetMeetingCommand.ts
TypeScript
InterfaceDeclaration
export interface GetMeetingCommandOutput extends GetMeetingResponse, __MetadataBearer {}
AllanZhengYP/aws-sdk-js-v3
clients/client-chime/src/commands/GetMeetingCommand.ts
TypeScript
MethodDeclaration
/** * @internal */ resolveMiddleware( clientStack: MiddlewareStack<ServiceInputTypes, ServiceOutputTypes>, configuration: ChimeClientResolvedConfig, options?: __HttpHandlerOptions ): Handler<GetMeetingCommandInput, GetMeetingCommandOutput> { this.middlewareStack.use(getSerdePlugin(configuration,...
AllanZhengYP/aws-sdk-js-v3
clients/client-chime/src/commands/GetMeetingCommand.ts
TypeScript
MethodDeclaration
private serialize(input: GetMeetingCommandInput, context: __SerdeContext): Promise<__HttpRequest> { return serializeAws_restJson1GetMeetingCommand(input, context); }
AllanZhengYP/aws-sdk-js-v3
clients/client-chime/src/commands/GetMeetingCommand.ts
TypeScript
MethodDeclaration
private deserialize(output: __HttpResponse, context: __SerdeContext): Promise<GetMeetingCommandOutput> { return deserializeAws_restJson1GetMeetingCommand(output, context); }
AllanZhengYP/aws-sdk-js-v3
clients/client-chime/src/commands/GetMeetingCommand.ts
TypeScript
ArrowFunction
() => { return ( <> <DialogQueue dialogs={dialogs} /> <Portal /> <AppDisconnected /> <Theme use="background" wrap> <div className="App"> <AppBar routes={routes} /> <Grid className="App-main"> <Switch> {routes.map((r) => ( ...
BobbieGoede/firebase-tools-ui
src/components/App/index.tsx
TypeScript
ArrowFunction
(r) => ( <Route key={r.path}
BobbieGoede/firebase-tools-ui
src/components/App/index.tsx
TypeScript
ClassDeclaration
declare class LangJa extends Wordlist { constructor(); getWord(index: number): string; getWordIndex(word: string): number; split(mnemonic: string): Array<string>; join(words: Array<string>): string; }
WLKR-Financial/appwebsite
node_modules/@0xproject/utils/node_modules/ethers/wordlists/lang-ja.d.ts
TypeScript
MethodDeclaration
getWord(index: number): string;
WLKR-Financial/appwebsite
node_modules/@0xproject/utils/node_modules/ethers/wordlists/lang-ja.d.ts
TypeScript
MethodDeclaration
getWordIndex(word: string): number;
WLKR-Financial/appwebsite
node_modules/@0xproject/utils/node_modules/ethers/wordlists/lang-ja.d.ts
TypeScript
ArrowFunction
() => { let navBarPage: NavBarPage; let signInPage: SignInPage; let classInfoComponentsPage: ClassInfoComponentsPage; let classInfoUpdatePage: ClassInfoUpdatePage; const username = process.env.E2E_USERNAME ?? 'admin'; const password = process.env.E2E_PASSWORD ?? 'admin'; before(async () => { await b...
ndtung01061999/catiny
src/test/javascript/e2e/entities/class-info/class-info.spec.ts
TypeScript
ArrowFunction
async () => { await browser.get('/'); navBarPage = new NavBarPage(); signInPage = await navBarPage.getSignInPage(); await signInPage.waitUntilDisplayed(); await signInPage.username.sendKeys(username); await signInPage.password.sendKeys(password); await signInPage.loginButton.click(); aw...
ndtung01061999/catiny
src/test/javascript/e2e/entities/class-info/class-info.spec.ts
TypeScript
ArrowFunction
async () => { await browser.get('/'); await waitUntilDisplayed(navBarPage.entityMenu); classInfoComponentsPage = new ClassInfoComponentsPage(); classInfoComponentsPage = await classInfoComponentsPage.goToPage(navBarPage); }
ndtung01061999/catiny
src/test/javascript/e2e/entities/class-info/class-info.spec.ts
TypeScript
ArrowFunction
async () => { expect(await classInfoComponentsPage.title.getText()).to.match(/Class Infos/); expect(await classInfoComponentsPage.createButton.isEnabled()).to.be.true; }
ndtung01061999/catiny
src/test/javascript/e2e/entities/class-info/class-info.spec.ts
TypeScript
ArrowFunction
async () => { const beforeRecordsCount = (await isVisible(classInfoComponentsPage.noRecords)) ? 0 : await getRecordsCount(classInfoComponentsPage.table); classInfoUpdatePage = await classInfoComponentsPage.goToCreateClassInfo(); await classInfoUpdatePage.enterData(); expect(await isVisible(...
ndtung01061999/catiny
src/test/javascript/e2e/entities/class-info/class-info.spec.ts
TypeScript
ArrowFunction
async () => { await navBarPage.autoSignOut(); }
ndtung01061999/catiny
src/test/javascript/e2e/entities/class-info/class-info.spec.ts
TypeScript
FunctionDeclaration
export function UpdateProject(props: UpdateProjectProps) { const { accessToken, apiOverrides = { serverEnvironmentPrefix: "" }, onClose, onError, onSuccess, stringsOverrides, projectId, initialProject, } = props; const [isLoading, setIsLoading] = React.useState(false); const up...
iTwin/demo-portal
packages/app/src/routers/CRUDRouter/components/update-project/UpdateProject.tsx
TypeScript
ArrowFunction
async (project: { displayName: string; projectNumber: string; }) => { setIsLoading(true); try { const projectUrl = `https://${apiOverrides?.serverEnvironmentPrefix && `${apiOverrides.serverEnvironmentPrefix}-`}api.bentley.com/projects/${projectId}`; const response = await fetch(pr...
iTwin/demo-portal
packages/app/src/routers/CRUDRouter/components/update-project/UpdateProject.tsx
TypeScript
ArrowFunction
( error: { error: { code?: string; message?: string } } | any ) => { setIsLoading(false); const errorString = error?.error?.code === "ProjectExists" ? updatedStrings.errorMessageProjectExists : updatedStrings.errorMessage; toaster.negative(errorString, { hasCloseButton: true })...
iTwin/demo-portal
packages/app/src/routers/CRUDRouter/components/update-project/UpdateProject.tsx
TypeScript
TypeAliasDeclaration
export type UpdateProjectProps = { /** Bearer access token with scope `projects:modify`. */ accessToken: string; /** Object that configures different overrides for the API. */ apiOverrides?: { serverEnvironmentPrefix?: "dev" | "qa" | "" }; /** Callback on canceled action. */ onClose?: () => void; /** Cal...
iTwin/demo-portal
packages/app/src/routers/CRUDRouter/components/update-project/UpdateProject.tsx
TypeScript
ArrowFunction
() => { this.prikaziVatromet = true; setTimeout(() => { this.prikaziVatromet = false; }, 10000); }
David-Anicic/Olimijada
Demo/Frontend/Korisnik/src/app/komponente/prenos-utakmice/prenos-utakmice.component.ts
TypeScript
ArrowFunction
() => { this.prikaziVatromet = false; }
David-Anicic/Olimijada
Demo/Frontend/Korisnik/src/app/komponente/prenos-utakmice/prenos-utakmice.component.ts
TypeScript
ArrowFunction
(params: Params) => { //console.log(("uzeto"); if (params['id'] != undefined) { let id = +params['id']; //console.log("id = ",id); if (this.game != null && this.game.debug != null) { //console.log((" route params "); //console.log((this.game); this.game.destroy(); this.p...
David-Anicic/Olimijada
Demo/Frontend/Korisnik/src/app/komponente/prenos-utakmice/prenos-utakmice.component.ts
TypeScript
ArrowFunction
odgovor => { //console.log(("odgovor stigao"); // nije autorizovan da gleda if (odgovor == -1) { if(this.cookieService.get("language") == 'sr') { swal({ type:'error', title:'GREŠKA: Pokušajte ponovo!' }) } else { swal({ ...
David-Anicic/Olimijada
Demo/Frontend/Korisnik/src/app/komponente/prenos-utakmice/prenos-utakmice.component.ts
TypeScript
MethodDeclaration
init() { /* this.turnirService.UzmiSveAktuelneTurnire().subscribe(odg => { if (odg != null && odg != undefined) { this.aktuelniTurniri = odg; let danasnjiDatum = Math.floor(Date.now()/1000); this.aktuelniTurniri = this.aktuelniTurniri.filter(t => t.datumVremePocetka <= danasnjiDatum && t.datumV...
David-Anicic/Olimijada
Demo/Frontend/Korisnik/src/app/komponente/prenos-utakmice/prenos-utakmice.component.ts
TypeScript
MethodDeclaration
ngOnInit() { this.init(); this.ruta = "" + environment.serverUrl; this.mec = null; this.emitterZaVatromet = new EventEmitter(); this.emitterZaVatromet.subscribe(() => { this.prikaziVatromet = true; setTimeout(() => { this.prikaziVatromet = false; }, 10000); }) this.route.params.subscrib...
David-Anicic/Olimijada
Demo/Frontend/Korisnik/src/app/komponente/prenos-utakmice/prenos-utakmice.component.ts
TypeScript
MethodDeclaration
ngOnDestroy(): void { if (this.game != null && this.game.debug != null) { //console.log((this.game); this.game.destroy(); } }
David-Anicic/Olimijada
Demo/Frontend/Korisnik/src/app/komponente/prenos-utakmice/prenos-utakmice.component.ts
TypeScript
MethodDeclaration
preload() { this.game.load.crossOrigin = 'anonymous'; this.game.load.baseURL = environment.serverUrl; //console.log((" JELENA PRELOAD "+this.mec.slikaKuglice1); this.game.load.image('krugPlavi','upload/slike/igre/'+this.mec.slikaKuglice2); this.game.load.image('krugCrveni','upload/slike/igre/'+this.mec.sl...
David-Anicic/Olimijada
Demo/Frontend/Korisnik/src/app/komponente/prenos-utakmice/prenos-utakmice.component.ts
TypeScript
MethodDeclaration
create() { this.game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; this.game.scale.fullScreenScaleMode = Phaser.ScaleManager.SHOW_ALL; // ako je uneta slika if (this.mec.pozadina != undefined && this.mec.pozadina != null && this.mec.pozadina != '') { this.game.add.tileSprite(0,0,this.game.width,this...
David-Anicic/Olimijada
Demo/Frontend/Korisnik/src/app/komponente/prenos-utakmice/prenos-utakmice.component.ts
TypeScript
MethodDeclaration
Postavi(): void { //this.physicsGroup = this.game.add.physicsGroup(Phaser.Physics.ARCADE); this.brojac = 0; this.brojIgraca = this.mec.brojIgraca; ////console.log((this.brojIgraca); let i; for (i=0;i<this.brojIgraca;i++) { /* let s1 = this.physicsGroup.create(this.game.rnd.integerInRange(100,700)...
David-Anicic/Olimijada
Demo/Frontend/Korisnik/src/app/komponente/prenos-utakmice/prenos-utakmice.component.ts
TypeScript
MethodDeclaration
/* update() { } */ update() { if (this.mec.staticka == 0) { if (this.brojac < this.tokMeca.length - 1) { this.brojac++; let i; for (i=0;i<this.brojIgraca;i++) { this.tim1[i].x = this.tokMeca[this.brojac].prvi.igraci[i].x; this.tim1[i].y = this.tokMeca[this.brojac].prvi.igraci...
David-Anicic/Olimijada
Demo/Frontend/Korisnik/src/app/komponente/prenos-utakmice/prenos-utakmice.component.ts
TypeScript
MethodDeclaration
PustiZvuk(): void { this.audio.play(); }
David-Anicic/Olimijada
Demo/Frontend/Korisnik/src/app/komponente/prenos-utakmice/prenos-utakmice.component.ts
TypeScript
MethodDeclaration
DajKoordinate2(): void { if (this.brojac < this.tokMeca.length) { let i; for (i=0;i<this.tokMeca[this.brojac].prvi.length;i++) { this.tim1[i].x = this.tokMeca[this.brojac].prvi[i].x; this.tim1[i].y = this.tokMeca[this.brojac].prvi[i].y; this.tim2[i].x = this.tokMeca[this.brojac].drugi[i].x;...
David-Anicic/Olimijada
Demo/Frontend/Korisnik/src/app/komponente/prenos-utakmice/prenos-utakmice.component.ts
TypeScript
MethodDeclaration
/* DajKoordinate2(): void { this.turnirService.DajKoordinate(this.odgovor.igra.brojIgraca).subscribe(odgovor => { if (odgovor != -1 && odgovor != 0) { if (this.niz1 == undefined || this.niz1 == null) { let i; for (i=0;i<this.odgovor.igra.brojIgraca;i++) { this.physicsGroup = this...
David-Anicic/Olimijada
Demo/Frontend/Korisnik/src/app/komponente/prenos-utakmice/prenos-utakmice.component.ts
TypeScript
MethodDeclaration
IskljuciFullScreen(): void { //console.log(("iskljuci"); this.game.scale.stopFullScreen(); this.fullScreenExit.visible = false; this.fullScreenExit.input.enabled = false; this.fullScreen.visible = true; this.fullScreen.input.enabled= true; }
David-Anicic/Olimijada
Demo/Frontend/Korisnik/src/app/komponente/prenos-utakmice/prenos-utakmice.component.ts
TypeScript
MethodDeclaration
DajKoordinate():void { if (this.brojac < this.tokMeca.length) { let krug: Phaser.Sprite; let i = this.tokMeca[this.brojac].i; let j = this.tokMeca[this.brojac].j; // prvi igrac if (this.tokMeca[this.brojac].igrac == 1) { krug = this.game.add.sprite(this.tokMeca[this.brojac].j*(this.mec.ve...
David-Anicic/Olimijada
Demo/Frontend/Korisnik/src/app/komponente/prenos-utakmice/prenos-utakmice.component.ts
TypeScript
ArrowFunction
(it: EncryptedGroupKey) => { if (!(it instanceof EncryptedGroupKey)) { throw new ValidationError(`Expected 'encryptedGroupKeys' to be a list of EncryptedGroupKey instances! Was: ${this.encryptedGroupKeys}`) } }
streamr-dev/streamr-client-protocol-js
src/protocol/message_layer/GroupKeyAnnounce.ts
TypeScript
ArrowFunction
(it: EncryptedGroupKey)=> it.toArray()
streamr-dev/streamr-client-protocol-js
src/protocol/message_layer/GroupKeyAnnounce.ts
TypeScript
ArrowFunction
(it: any[]) => EncryptedGroupKey.fromArray(it)
streamr-dev/streamr-client-protocol-js
src/protocol/message_layer/GroupKeyAnnounce.ts
TypeScript
ClassDeclaration
export default class GroupKeyAnnounce extends GroupKeyMessage { encryptedGroupKeys: EncryptedGroupKey[] constructor({ streamId, encryptedGroupKeys }: Options) { super(streamId, StreamMessage.MESSAGE_TYPES.GROUP_KEY_ANNOUNCE) validateIsArray('encryptedGroupKeys', encryptedGroupKeys) t...
streamr-dev/streamr-client-protocol-js
src/protocol/message_layer/GroupKeyAnnounce.ts
TypeScript
InterfaceDeclaration
export interface Options { streamId: string encryptedGroupKeys: EncryptedGroupKey[] }
streamr-dev/streamr-client-protocol-js
src/protocol/message_layer/GroupKeyAnnounce.ts
TypeScript
MethodDeclaration
toArray() { return [this.streamId, this.encryptedGroupKeys.map((it: EncryptedGroupKey)=> it.toArray())] }
streamr-dev/streamr-client-protocol-js
src/protocol/message_layer/GroupKeyAnnounce.ts
TypeScript
MethodDeclaration
static fromArray(arr: any[]) { const [streamId, encryptedGroupKeys] = arr return new GroupKeyAnnounce({ streamId, encryptedGroupKeys: encryptedGroupKeys.map((it: any[]) => EncryptedGroupKey.fromArray(it)), }) }
streamr-dev/streamr-client-protocol-js
src/protocol/message_layer/GroupKeyAnnounce.ts
TypeScript
TypeAliasDeclaration
/** The content data for the ui layer */ export type IUILayerContentData = { /** A unique ID for the given content */ ID: IUUID; /** The content's view */ contentView: IViewStackItem | undefined; /** The content data structure */ content?: IContent; /** The content's key handler */ conte...
LaunchMenu/LaunchMenu
packages/core/src/uiLayers/_types/IUILayerContentData.ts
TypeScript
ClassDeclaration
@Injectable() export class BookService { constructor( @InjectModel(Book.name) private BookModel: Model<BookDocument>, @InjectConnection() private connection: Connection, ) {} public async createBook(data: CreateBookDto): Promise<BookDocument> { const book = new this.BookModel(data); return await...
theart84/ndtnf-nestjs-db
src/book/book.service.ts
TypeScript
MethodDeclaration
public async createBook(data: CreateBookDto): Promise<BookDocument> { const book = new this.BookModel(data); return await book.save(); }
theart84/ndtnf-nestjs-db
src/book/book.service.ts
TypeScript
MethodDeclaration
public async findAllBooks(): Promise<BookDocument[]> { return this.BookModel.find(); }
theart84/ndtnf-nestjs-db
src/book/book.service.ts
TypeScript
MethodDeclaration
public async findBook(id: string): Promise<BookDocument | serviceInfo> { const book = this.BookModel.findById(id); if (book) { return book; } else { return { status: 'error', message: 'The Book with this id was not found', }; } }
theart84/ndtnf-nestjs-db
src/book/book.service.ts
TypeScript
MethodDeclaration
public async updateBook( id: string, data: any, ): Promise<BookDocument | serviceInfo> { const book = await this.BookModel.findByIdAndUpdate(id, data, { new: true, }); if (book) { return book; } else { return { status: 'error', message: 'The Book with this id...
theart84/ndtnf-nestjs-db
src/book/book.service.ts
TypeScript
MethodDeclaration
public async deleteBook(id: string): Promise<serviceInfo> { await this.BookModel.deleteOne({ _id: id }); return { status: 'ok', message: 'Book successfully deleted!', }; }
theart84/ndtnf-nestjs-db
src/book/book.service.ts
TypeScript
ArrowFunction
({ content, title }) => { const [visible, setVisible] = React.useState(false) return ( <div className={s.root}> <div className={s.title} onClick={()
ZJU-CC98/CC98-V4
src/components/Collapse/index.tsx
TypeScript
InterfaceDeclaration
interface ICollapseProps { content: React.ReactNode title: React.ReactNode }
ZJU-CC98/CC98-V4
src/components/Collapse/index.tsx
TypeScript
ArrowFunction
(r, v) => { const parts = v.split("="); return parts[0] === name ? decodeURIComponent(parts[1]) : r; }
congvu24/E-voucher-client
src/app/core/services/until/until.service.ts
TypeScript
ClassDeclaration
@Injectable({ providedIn: "root", }) export class UntilService { constructor() {} setCookie(name, value, time, path = "/") { console.log("until function", value); // const expires = new Date(Date.now() + days * 864e5).toUTCString(); const expires = time; document.cookie = name + "=" +...
congvu24/E-voucher-client
src/app/core/services/until/until.service.ts
TypeScript
MethodDeclaration
setCookie(name, value, time, path = "/") { console.log("until function", value); // const expires = new Date(Date.now() + days * 864e5).toUTCString(); const expires = time; document.cookie = name + "=" + encodeURIComponent(value) + "; path=" + path + "; expires=" + ...
congvu24/E-voucher-client
src/app/core/services/until/until.service.ts
TypeScript
MethodDeclaration
getCookie(name) { const value = document.cookie.split("; ").reduce((r, v) => { const parts = v.split("="); return parts[0] === name ? decodeURIComponent(parts[1]) : r; }, ""); return value; }
congvu24/E-voucher-client
src/app/core/services/until/until.service.ts
TypeScript
MethodDeclaration
deleteCookie(name, path = "/") { this.setCookie(name, "", -1, path); }
congvu24/E-voucher-client
src/app/core/services/until/until.service.ts
TypeScript
ClassDeclaration
/** * Provides a resource to manage AWS Secrets Manager secret version including its secret value. To manage secret metadata, see the [`aws.secretsmanager.Secret` resource](https://www.terraform.io/docs/providers/aws/r/secretsmanager_secret.html). * * > **NOTE:** If the `AWSCURRENT` staging label is present on this...
Dominik-K/pulumi-aws
sdk/nodejs/secretsmanager/secretVersion.ts
TypeScript
InterfaceDeclaration
/** * Input properties used for looking up and filtering SecretVersion resources. */ export interface SecretVersionState { /** * The ARN of the secret. */ readonly arn?: pulumi.Input<string>; /** * Specifies binary data that you want to encrypt and store in this version of the secret. This ...
Dominik-K/pulumi-aws
sdk/nodejs/secretsmanager/secretVersion.ts
TypeScript
InterfaceDeclaration
/** * The set of arguments for constructing a SecretVersion resource. */ export interface SecretVersionArgs { /** * Specifies binary data that you want to encrypt and store in this version of the secret. This is required if secretString is not set. Needs to be encoded to base64. */ readonly secretBi...
Dominik-K/pulumi-aws
sdk/nodejs/secretsmanager/secretVersion.ts
TypeScript
MethodDeclaration
/** * Get an existing SecretVersion resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra ar...
Dominik-K/pulumi-aws
sdk/nodejs/secretsmanager/secretVersion.ts
TypeScript
MethodDeclaration
/** * Returns true if the given object is an instance of SecretVersion. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ public static isInstance(obj: any): obj is SecretVersion { if (obj === undefined || obj === null) { ...
Dominik-K/pulumi-aws
sdk/nodejs/secretsmanager/secretVersion.ts
TypeScript
ClassDeclaration
@Controller('skills') @ApiTags('Skills') @UseGuards(JwtAuthGuard) export class SkillController { constructor(private readonly skillsService: SkillService) {} @Post('/') @ApiOperation({ summary: 'Add Skill' }) @ApiOkResponse({ type: SkillResponseType }) async create( @User() me: UserEntity, @Body() d...
gevorg33/nestjs
src/modules/skill/skill.controller.ts
TypeScript
MethodDeclaration
@Post('/') @ApiOperation({ summary: 'Add Skill' }) @ApiOkResponse({ type: SkillResponseType }) async create( @User() me: UserEntity, @Body() data: CreateSkillDto, ): Promise<SkillResponseType> { const skill = await this.skillsService.create(me, data); return { skill }; }
gevorg33/nestjs
src/modules/skill/skill.controller.ts
TypeScript
MethodDeclaration
@Delete('/:id') @ApiOperation({ summary: 'Add Skill' }) @ApiOkResponse({ type: SkillResponseType }) async delete( @User() me: UserEntity, @Param('id') id: number, ): Promise<SkillResponseType> { const skill = await this.skillsService.delete(me, id); return { skill }; }
gevorg33/nestjs
src/modules/skill/skill.controller.ts
TypeScript
ClassDeclaration
export default class Config { private configBuilder: ConfigBuilder; private port: number; private serverIp: string; private levelName: string; private worlds: any; private maxPlayers: number; private gamemode: string | number; private motd: string; private viewDistance: number; ...
TheArmagan/JSPrismarine
src/config/index.ts
TypeScript