type
stringclasses
7 values
content
stringlengths
4
9.55k
repo
stringlengths
7
96
path
stringlengths
4
178
language
stringclasses
1 value
ArrowFunction
() => { const grid = [ 'jefblpepre', 'camdcimgtc', 'oivokprjsm', 'pbwasqroua', 'rixilelhrs', 'wolcqlirpc', 'screeaumgr', 'alxhpburyi', 'jalaycalmp', 'clojurermt', ] const expectedResults = { clojure: { start: [10, 1], end: [1...
ErikSchierboom/exercism
typescript/word-search/word-search.test.ts
TypeScript
ArrowFunction
() => { const grid = [ 'jefblpepre', 'camdcimgtc', 'oivokprjsm', 'pbwasqroua', 'rixilelhrs', 'wolcqlirpc', 'screeaumgr', 'alxhpburyi', 'jalaycalmp', 'clojurermt', ] const expectedResults = { clojure: { start: [10, 1], end: [...
ErikSchierboom/exercism
typescript/word-search/word-search.test.ts
TypeScript
ArrowFunction
() => { const grid = [ 'jefblpepre', 'camdcimgtc', 'oivokprjsm', 'pbwasqroua', 'rixilelhrs', 'wolcqlirpc', 'screeaumgr', 'alxhpburyi', 'jalaycalmp', 'clojurermt', ] const expectedResults = { clojure: { start: [10, 1], end: [1...
ErikSchierboom/exercism
typescript/word-search/word-search.test.ts
TypeScript
ArrowFunction
() => { const grid = [ 'jefblpepre', 'camdcimgtc', 'oivokprjsm', 'pbwasqroua', 'rixilelhrs', 'wolcqlirpc', 'screeaumgr', 'alxhpburyi', 'jalaycalmp', 'clojurermt', ] const expectedResults = { clojure: { start: [10, 1], end: [...
ErikSchierboom/exercism
typescript/word-search/word-search.test.ts
TypeScript
ArrowFunction
data => { this.students = data }
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
ArrowFunction
error => console.log(error)
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
ArrowFunction
data => { this.ids = data }
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
ArrowFunction
data => { this.skills = data, this.sort(this.skills) }
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
ArrowFunction
data => { this.proffskills = data, this.sort(this.proffskills) }
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
ArrowFunction
data => { this.languages = data, this.sortLang(this.languages) }
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
ArrowFunction
data => { for (let i = 0; i < data.length; i++) { this.skillFk.push(data[i]); } this.checkSkillDupes(this.checkedSkill); }
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
ArrowFunction
data => { for (let i = 0; i < data.length; i++) { this.profskillFk.push(data[i]); } this.checkProfDupes(this.checkedProf); }
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
ArrowFunction
data => { for (let i = 0; i < data.length; i++) { this.languageFk.push(data[i]); } this.checkLangDupes(this.checkedLang); }
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
ArrowFunction
data => { this.students[i] = data[0] }
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
ArrowFunction
data => { this.students[k] = data[0], console.log(data), k++ }
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
ArrowFunction
data => { this.download(data[0].id) }
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
ArrowFunction
data => { const pos = this.students.map(elem => elem.id).indexOf(student.id); this.students.splice(pos, 1); this.toast.setMessage('item deleted successfully.', 'success'); }
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
ArrowFunction
elem => elem.id
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
ArrowFunction
error => console.error
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
ArrowFunction
data => { this.studentjes += data, console.log(data) }
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
ArrowFunction
error => { console.log("gelukt") }
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
MethodDeclaration
ngOnInit() { this.getStudents(); this.getStudentsIds(); this.getSkills(); this.getLanguages(); this.getProffskills(); }
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
MethodDeclaration
//Get all students -> add to students[] getStudents() { this.studentService.getStudentsMysql().subscribe( data => { this.students = data }, error => console.log(error) ) }
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
MethodDeclaration
//Get all the ids of the students -> add to ids[] getStudentsIds() { this.studentService.getStudentsIdsMysql().subscribe( data => { this.ids = data }, error => console.log(error) ) }
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
MethodDeclaration
//get all distinct skills of all students -> add to skills[] //sort them alphabetically getSkills() { this.skillService.getSkillsDistinct().subscribe( data => { this.skills = data, this.sort(this.skills) }, error => console.log(error) ) }
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
MethodDeclaration
//get all disctinct professional skills of all students -> add to proffskills[] getProffskills() { this.professionalService.getProfessionalDistinct().subscribe( data => { this.proffskills = data, this.sort(this.proffskills) }, error => console.log(error) ) }
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
MethodDeclaration
//get all distinct languages -> add them to languages[] getLanguages() { this.languageService.getLanguagesDistinct().subscribe( data => { this.languages = data, this.sortLang(this.languages) }, error => console.log(error) ) }
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
MethodDeclaration
//sort array on skills alphabetically sort(array) { array.sort(function (name1, name2) { if (name1.skill < name2.skill) { return -1; } else if (name1.skill > name2.skill) { return 1; } else { return 0; } }); }
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
MethodDeclaration
//sort array on language type alphabetically sortLang(array) { array.sort(function (name1, name2) { if (name1.type < name2.type) { return -1; } else if (name1.type > name2.type) { return 1; } else { return 0; } }); }
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
MethodDeclaration
sortGradYear() { if (this.clickGrad == 0) { this.students.sort(function (name1, name2) { if (name1.gradYear < name2.gradYear) { return -1; } else if (name1.gradYear > name2.gradYear) { return 1; } else { return 0; } }); this.clickGrad ...
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
MethodDeclaration
sortName() { if (this.clickName == 0) { this.students.sort(function (name1, name2) { if (name1.name < name2.name) { return -1; } else if (name1.name > name2.name) { return 1; } else { return 0; } }); this.clickName = 1; } else ...
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
MethodDeclaration
sortDegree() { if (this.clickDegree == 0) { this.students.sort(function (name1, name2) { if (name1.degree < name2.degree) { return -1; } else if (name1.degree > name2.degree) { return 1; } else { return 0; } }); this.clickDegree = 1; ...
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
MethodDeclaration
inputSkillCheck(e, skill) { if (e.target.checked) { this.checkedSkill++; this.skillsChecked[this.skillsChecked.length] = skill; if (skill != "") { this.skillService.getFkbySkill(skill).subscribe( data => { for (let i = 0; i < data.length; i++) { this.sk...
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
MethodDeclaration
checkSkillDupes(checked) { this.nieuwelijstSkillsFk = []; if (checked > 1) { let number = 0; for (let i = 0; i < this.skillFk.length; i++) { let random = this.skillFk[i]; for (let j = 0; j < this.skillFk.length; j++) { if (this.skillFk[j].student_fk == random.student_fk)...
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
MethodDeclaration
inputProfskillCheck(e, skill) { if (e.target.checked) { this.checkedProf++; this.profSkillsChecked[this.profSkillsChecked.length] = skill; if (skill != "") { this.professionalService.getFkbySkill(skill).subscribe( data => { for (let i = 0; i < data.length; i++) { ...
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
MethodDeclaration
checkProfDupes(checked) { this.nieuwelijstProfskillsFk = []; if (checked > 1) { let number = 0; for (let i = 0; i < this.profskillFk.length; i++) { let random = this.profskillFk[i]; for (let j = 0; j < this.profskillFk.length; j++) { if (this.profskillFk[j].student_fk ==...
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
MethodDeclaration
inputLangugageCheck(e, type) { if (e.target.checked) { this.checkedLang++; this.languageChecked[this.languageChecked.length] = type; if (type != "") { this.languageService.getFkbyLang(type).subscribe( data => { for (let i = 0; i < data.length; i++) { th...
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
MethodDeclaration
checkLangDupes(checked) { this.nieuwelijstLangFk = []; if (checked > 1) { let number = 0; for (let i = 0; i < this.languageFk.length; i++) { let random = this.languageFk[i]; for (let j = 0; j < this.languageFk.length; j++) { if (this.languageFk[j].student_fk == random.st...
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
MethodDeclaration
//This method gives all the students back with the checked conditions. advancedSearch() { //ADVANCED SEARCH if (this.nieuwelijstLangFk.length > 0 && this.nieuwelijstSkillsFk.length == 0 && this.nieuwelijstProfskillsFk.length == 0) { this.students = []; for (let i = 0; i < this.nieuwelijstLangFk.le...
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
MethodDeclaration
clear() { window.location.reload(); }
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
MethodDeclaration
//Download the cv in searchBox downloadCv(student) { if (student.cvChecked == true) { this.cvsService.getCvsByFk(student.id).subscribe( data => { this.download(data[0].id) }, error => console.log(error) ) window.open(`/api/download/25`); } else { alert("This students has...
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
MethodDeclaration
download(id) { this.refresh.next() if (id) { // window.open(`/api/download/${id}`); } }
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
MethodDeclaration
deleteStudent(student) { this.userService.deleteWholeUser(student).subscribe( data => { const pos = this.students.map(elem => elem.id).indexOf(student.id); this.students.splice(pos, 1); this.toast.setMessage('item deleted successfully.', 'success'); }, error => console.err...
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
MethodDeclaration
innerjoin() { for (let id of this.ids) { this.http.get(`/api/innerjoin/${id.id}`).subscribe( data => { this.studentjes += data, console.log(data) }, error => { console.log("gelukt") } ) } }
louisdb94/IndustriaApp
client/app/student/student-list/student-list.component.ts
TypeScript
ClassDeclaration
class IndexPage extends React.Component { render() { return ( <MainLayout title="Evgeny Mironenko | Software Engineer" description="Personal website by Evgeny Mironenko Senior Software Engineer. Java, Kotlin, Spring, React, TypeScript. Currently based in Tallinn, Estoni...
miron4dev/miron4dev.com
src/pages/index.tsx
TypeScript
MethodDeclaration
render() { return ( <MainLayout title="Evgeny Mironenko | Software Engineer" description="Personal website by Evgeny Mironenko Senior Software Engineer. Java, Kotlin, Spring, React, TypeScript. Currently based in Tallinn, Estonia." keywords="Evgeny, Miron...
miron4dev/miron4dev.com
src/pages/index.tsx
TypeScript
FunctionDeclaration
/** Removes definitions with empty def and combine glosses with same lang. */ export function cleanDefinitions(defs: Definition[]): Definition[] { const nonempty = defs.filter((d) => d.text.length); const langs = [...new Set(nonempty.map((d) => d.language))]; return langs.map((language) => newDefinition( ...
jmgrady/TheCombine
src/types/wordUtilities.ts
TypeScript
FunctionDeclaration
/** Removes glosses with empty def and combine glosses with same lang. */ export function cleanGlosses(glosses: Gloss[]): Gloss[] { const nonempty = glosses.filter((g) => g.def.length); const langs = [...new Set(nonempty.map((g) => g.language))]; return langs.map((language) => newGloss( nonempty ...
jmgrady/TheCombine
src/types/wordUtilities.ts
TypeScript
FunctionDeclaration
/** * For sorting flags alphabetically by their text, * where a flag with .active=false is alphabetically last. */ export function compareFlags(a: Flag, b: Flag): number { return a.active && b.active ? a.text.localeCompare(b.text) : a.active ? -1 : b.active ? 1 : 0; }
jmgrady/TheCombine
src/types/wordUtilities.ts
TypeScript
FunctionDeclaration
/** * Returns the text of the first gloss of a sense. * In the case that the array of glosses is empty, returns an empty string. */ export function firstGlossText(sense: Sense): string { return sense.glosses[0]?.def ?? ""; }
jmgrady/TheCombine
src/types/wordUtilities.ts
TypeScript
FunctionDeclaration
/** * Given a word-array, return a string-array with any language code found in * a definition or gloss of any sense. */ export function getAnalysisLangsFromWords(words: Word[]): string[] { return reduceMultiType<Word, string[]>(words, [], wordReducer); }
jmgrady/TheCombine
src/types/wordUtilities.ts
TypeScript
FunctionDeclaration
function reduceMultiType<A, B>( toReduce: A[], initial: B, reducer: (accumulator: B, currentItem: A) => B ): B { let accumulated = initial; toReduce.forEach((item) => (accumulated = reducer(accumulated, item))); return accumulated; }
jmgrady/TheCombine
src/types/wordUtilities.ts
TypeScript
FunctionDeclaration
function wordReducer(accumulator: string[], word: Word): string[] { const newLangs = word.senses .flatMap((s) => [...s.definitions, ...s.glosses]) .map((dg) => dg.language); return [...new Set([...accumulator, ...newLangs])]; }
jmgrady/TheCombine
src/types/wordUtilities.ts
TypeScript
ArrowFunction
(d) => d.text.length
jmgrady/TheCombine
src/types/wordUtilities.ts
TypeScript
ArrowFunction
(d) => d.language
jmgrady/TheCombine
src/types/wordUtilities.ts
TypeScript
ArrowFunction
(language) => newDefinition( nonempty .filter((d) => d.language === language) .map((d) => d.text) .join(sep), language )
jmgrady/TheCombine
src/types/wordUtilities.ts
TypeScript
ArrowFunction
(d) => d.language === language
jmgrady/TheCombine
src/types/wordUtilities.ts
TypeScript
ArrowFunction
(d) => d.text
jmgrady/TheCombine
src/types/wordUtilities.ts
TypeScript
ArrowFunction
(g) => g.def.length
jmgrady/TheCombine
src/types/wordUtilities.ts
TypeScript
ArrowFunction
(g) => g.language
jmgrady/TheCombine
src/types/wordUtilities.ts
TypeScript
ArrowFunction
(language) => newGloss( nonempty .filter((g) => g.language === language) .map((g) => g.def) .join(sep), language )
jmgrady/TheCombine
src/types/wordUtilities.ts
TypeScript
ArrowFunction
(g) => g.language === language
jmgrady/TheCombine
src/types/wordUtilities.ts
TypeScript
ArrowFunction
(g) => g.def
jmgrady/TheCombine
src/types/wordUtilities.ts
TypeScript
ArrowFunction
(item) => (accumulated = reducer(accumulated, item))
jmgrady/TheCombine
src/types/wordUtilities.ts
TypeScript
ArrowFunction
(s) => [...s.definitions, ...s.glosses]
jmgrady/TheCombine
src/types/wordUtilities.ts
TypeScript
ArrowFunction
(dg) => dg.language
jmgrady/TheCombine
src/types/wordUtilities.ts
TypeScript
ClassDeclaration
export class Event extends Deletable { public getType(): number; public getValue<T>(key: number): T; public getComponent(): APL.Component; public resolve(); public resolveWithArg(arg: number); public resolveWithRect(x: number, y: number, width: number, height: number): v...
alexa/apl-client-library
apl-client-js/@types/apl-html/lib/dts/Event.d.ts
TypeScript
MethodDeclaration
public getType(): number;
alexa/apl-client-library
apl-client-js/@types/apl-html/lib/dts/Event.d.ts
TypeScript
MethodDeclaration
public getValue<T>(key: number): T;
alexa/apl-client-library
apl-client-js/@types/apl-html/lib/dts/Event.d.ts
TypeScript
MethodDeclaration
public getComponent(): APL.Component;
alexa/apl-client-library
apl-client-js/@types/apl-html/lib/dts/Event.d.ts
TypeScript
MethodDeclaration
public resolve();
alexa/apl-client-library
apl-client-js/@types/apl-html/lib/dts/Event.d.ts
TypeScript
MethodDeclaration
public resolveWithArg(arg: number);
alexa/apl-client-library
apl-client-js/@types/apl-html/lib/dts/Event.d.ts
TypeScript
MethodDeclaration
public resolveWithRect(x: number, y: number, width: number, height: number): void;
alexa/apl-client-library
apl-client-js/@types/apl-html/lib/dts/Event.d.ts
TypeScript
MethodDeclaration
public addTerminateCallback(callback: () => void);
alexa/apl-client-library
apl-client-js/@types/apl-html/lib/dts/Event.d.ts
TypeScript
MethodDeclaration
public isPending(): boolean;
alexa/apl-client-library
apl-client-js/@types/apl-html/lib/dts/Event.d.ts
TypeScript
MethodDeclaration
public isTerminated(): boolean;
alexa/apl-client-library
apl-client-js/@types/apl-html/lib/dts/Event.d.ts
TypeScript
MethodDeclaration
public isResolved(): boolean;
alexa/apl-client-library
apl-client-js/@types/apl-html/lib/dts/Event.d.ts
TypeScript
ClassDeclaration
export default class GuildService { async getGuildById(id: string): Promise<ServerModel> { return await Server.findOne({ id }, {}, { upsert: true }) as ServerModel; } async findByGuildIdAndUpdate(id: string, details: UpdateQuery<ServerModel>) { return await Server.findOneAndUpdate({ id }, details, { new...
c43721/payload-neo
src/api/services/GuildService.ts
TypeScript
MethodDeclaration
async getGuildById(id: string): Promise<ServerModel> { return await Server.findOne({ id }, {}, { upsert: true }) as ServerModel; }
c43721/payload-neo
src/api/services/GuildService.ts
TypeScript
MethodDeclaration
async findByGuildIdAndUpdate(id: string, details: UpdateQuery<ServerModel>) { return await Server.findOneAndUpdate({ id }, details, { new: true }); }
c43721/payload-neo
src/api/services/GuildService.ts
TypeScript
ArrowFunction
(err, ast) => { if (err) { this.error = err; this.correct.emit(false); } else { this.error = ''; this.correct.emit(true); } this.saveChanges(); }
call-me-adas/adam-cms
src/app/shared/components/editor/editor.component.ts
TypeScript
ClassDeclaration
@Component({ selector: 'app-editor', templateUrl: './editor.component.html', styleUrls: ['./editor.component.scss'], encapsulation: ViewEncapsulation.None }) export class EditorComponent implements OnInit { @ViewChild('textAreaElement') textAreaElement: ElementRef; htmlFormat = ''; error = ''; showEdit...
call-me-adas/adam-cms
src/app/shared/components/editor/editor.component.ts
TypeScript
MethodDeclaration
ngOnInit(): void { this.htmlFormat = this.content; this.lastState = this.content; this.nextState = this.content; }
call-me-adas/adam-cms
src/app/shared/components/editor/editor.component.ts
TypeScript
MethodDeclaration
insertElement(el, classes) { this.lastState = this.htmlFormat; const a = this.htmlFormat; const b = '<' + el + ' class=' + classes.join(',') + '>'; const b2 = '</' + el + '>'; const posStart = this.textAreaElement.nativeElement.selectionStart; const posEnd = this.textAreaElement.nativeElement.s...
call-me-adas/adam-cms
src/app/shared/components/editor/editor.component.ts
TypeScript
MethodDeclaration
insertImage(classes) { const src = prompt('Give src'); const a = this.htmlFormat; const posStart = this.textAreaElement.nativeElement.selectionStart; this.htmlFormat = [a.slice(0, posStart), '\n<img class=' + classes.join(',') + ' src=\'', src, '\' />' , a.slice(posStart)].join(''); this.saveChange...
call-me-adas/adam-cms
src/app/shared/components/editor/editor.component.ts
TypeScript
MethodDeclaration
insertLink(classes) { const src = prompt('Give src'); const a = this.htmlFormat; const posStart = this.textAreaElement.nativeElement.selectionStart; this.htmlFormat = [a.slice(0, posStart), '\n<a target="_blank" class=' + classes.join(',') + ' href=\'', src, '\'>' + 'Link</a>' , a.slice(posStart)]....
call-me-adas/adam-cms
src/app/shared/components/editor/editor.component.ts
TypeScript
MethodDeclaration
insertVideo(classes) { const src = prompt('Give src'); const a = this.htmlFormat; const posStart = this.textAreaElement.nativeElement.selectionStart; this.htmlFormat = [a.slice(0, posStart), '\n<div class=' + classes.join(',') + '>', '<iframe width="560" height="349" src="http://www.youtube.com/e...
call-me-adas/adam-cms
src/app/shared/components/editor/editor.component.ts
TypeScript
MethodDeclaration
insertList(el, classes) { const a = this.htmlFormat; const posStart = this.textAreaElement.nativeElement.selectionStart; this.htmlFormat = [a.slice(0, posStart), '\n<' + el + ' class=' + classes.join(',') + '>\n', '<li>Item 1</li>' , '\n</' + el + '>', a.slice(posStart)].join(''); this.saveChange...
call-me-adas/adam-cms
src/app/shared/components/editor/editor.component.ts
TypeScript
MethodDeclaration
insertColumns(count, classes) { const a = this.htmlFormat; const posStart = this.textAreaElement.nativeElement.selectionStart; this.htmlFormat = [a.slice(0, posStart), '\n<div class=' + classes.join(',') + '>\n', '<div class="column"></div>\n'.repeat(count) , '</div>', a.slice(posStart)].join(''); ...
call-me-adas/adam-cms
src/app/shared/components/editor/editor.component.ts
TypeScript
MethodDeclaration
undo() { this.nextState = this.htmlFormat; this.htmlFormat = this.lastState; this.saveChanges(); }
call-me-adas/adam-cms
src/app/shared/components/editor/editor.component.ts
TypeScript
MethodDeclaration
redo() { this.lastState = this.htmlFormat; this.htmlFormat = this.nextState; this.saveChanges(); }
call-me-adas/adam-cms
src/app/shared/components/editor/editor.component.ts
TypeScript
MethodDeclaration
typeTextarea(event) { HtmlValidator(this.htmlFormat, (err, ast) => { if (err) { this.error = err; this.correct.emit(false); } else { this.error = ''; this.correct.emit(true); } this.saveChanges(); }); }
call-me-adas/adam-cms
src/app/shared/components/editor/editor.component.ts
TypeScript
MethodDeclaration
saveChanges() { this.editor.emit(this.htmlFormat); }
call-me-adas/adam-cms
src/app/shared/components/editor/editor.component.ts
TypeScript
MethodDeclaration
youtube_parser(url) { const regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#\&\?]*).*/; const match = url.match(regExp); return (match && match[7].length === 11) ? match[7] : false; }
call-me-adas/adam-cms
src/app/shared/components/editor/editor.component.ts
TypeScript
ClassDeclaration
@Injectable({ providedIn: 'root' }) export class TimerService { private time: string; constructor() { } setTime(startDate: number) { const result = Date.now() - startDate; const hours = Math.floor((result % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); const minutes = Math.floor((result % (1000 * ...
Jonedi/QUIZ-APP
src/app/services/timer.service.ts
TypeScript
MethodDeclaration
setTime(startDate: number) { const result = Date.now() - startDate; const hours = Math.floor((result % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60)); const minutes = Math.floor((result % (1000 * 60 * 60)) / (1000 * 60)); const seconds = Math.floor((result % (1000 * 60)) / 1000); this.time = `${hours}:...
Jonedi/QUIZ-APP
src/app/services/timer.service.ts
TypeScript
MethodDeclaration
getTime(): string { localStorage.setItem('time', this.time.toString()); return this.time; }
Jonedi/QUIZ-APP
src/app/services/timer.service.ts
TypeScript
ArrowFunction
() => { let component: ArticlesViewComponent; let fixture: ComponentFixture<ArticlesViewComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ declarations: [ArticlesViewComponent] }).compileComponents(); })); beforeEach(() => { fixture = TestBed.createComponent(ArticlesVie...
Mikearaya/safeway_hybrid_app
myworkspace/apps/ilo-admin/src/app/features/articles/articles-view/articles-view.component.spec.ts
TypeScript
ArrowFunction
() => { TestBed.configureTestingModule({ declarations: [ArticlesViewComponent] }).compileComponents(); }
Mikearaya/safeway_hybrid_app
myworkspace/apps/ilo-admin/src/app/features/articles/articles-view/articles-view.component.spec.ts
TypeScript
ArrowFunction
() => { fixture = TestBed.createComponent(ArticlesViewComponent); component = fixture.componentInstance; fixture.detectChanges(); }
Mikearaya/safeway_hybrid_app
myworkspace/apps/ilo-admin/src/app/features/articles/articles-view/articles-view.component.spec.ts
TypeScript