repo stringlengths 4 140 | commit_id stringlengths 7 7 | rel_path stringlengths 1 3.5k | language stringclasses 37
values | url stringlengths 37 3.56k | raw_url stringlengths 54 3.58k | key stringlengths 20 3.54k | ok bool 1
class | status int64 200 200 | bytes int64 48 425k | content stringlengths 40 425k | worker_id int64 0 7 |
|---|---|---|---|---|---|---|---|---|---|---|---|
wnfelix/ignite_reactnative_task2 | f86f886 | src/storage/meal/mealGetAll.ts | TypeScript | www.github.com/wnfelix/ignite_reactnative_task2/tree/main/src/storage/meal/mealGetAll.ts | https://raw.githubusercontent.com/wnfelix/ignite_reactnative_task2/f86f886/src/storage/meal/mealGetAll.ts | wnfelix/ignite_reactnative_task2 f86f886 src/storage/meal/mealGetAll.ts | true | 200 | 512 | import AsyncStorage from "@react-native-async-storage/async-storage";
import { MEAL_COLLECTION } from "@storage/storageConfig";
import { IMeal } from "src/interfaces";
export async function mealGetAll() {
try {
//await AsyncStorage.removeItem(MEAL_COLLECTION);
const storedMeals = await AsyncStorage.getItem(MEAL_C... | 6 |
tenjou/fishingseeker | 83a667d | client/src/view.ts | TypeScript | www.github.com/tenjou/fishingseeker/tree/main/client/src/view.ts | https://raw.githubusercontent.com/tenjou/fishingseeker/83a667d/client/src/view.ts | tenjou/fishingseeker 83a667d client/src/view.ts | true | 200 | 1,366 | import { getElement, HTMLComponent, removeAllChildren } from "./dom"
import { getState, updateState } from "./state"
export type ViewType = "home" | "fishing" | "codex" | "zone" | "shop" | "quests" | "zones"
let prevView: ViewType = "home"
const HandleLoad: Partial<Record<ViewType, () => void>> = {}
const HandleUnl... | 2 |
quocviet1150/frontend_management | 6a8a9a5 | src/app/material-component/view-bill/view-bill.component.ts | TypeScript | www.github.com/quocviet1150/frontend_management/tree/main/src/app/material-component/view-bill/view-bill.component.ts | https://raw.githubusercontent.com/quocviet1150/frontend_management/6a8a9a5/src/app/material-component/view-bill/view-bill.component.ts | quocviet1150/frontend_management 6a8a9a5 src/app/material-component/view-bill/view-bill.component.ts | true | 200 | 4,859 | import { Component, OnInit, Inject, ViewChild, ElementRef } from '@angular/core';
import { FormBuilder } from '@angular/forms';
import { MatDialog, MatDialogConfig } from '@angular/material/dialog';
import { MatTableDataSource } from '@angular/material/table';
import { Router } from '@angular/router';
import { BillServ... | 3 |
MattGibney/DarkCurse | bafb8e5 | src/models/attackLog.ts | TypeScript | www.github.com/MattGibney/DarkCurse/tree/main/src/models/attackLog.ts | https://raw.githubusercontent.com/MattGibney/DarkCurse/bafb8e5/src/models/attackLog.ts | MattGibney/DarkCurse bafb8e5 src/models/attackLog.ts | true | 200 | 2,777 | import pino from 'pino';
import DaoFactory from '../daoFactory';
import { AttackLogData, AttackLogStats } from '../daos/attackLog';
import ModelFactory from '../modelFactory';
import UserModel from './user';
class AttackLog {
private modelFactory: ModelFactory;
private daoFactory: DaoFactory;
private logger: pin... | 0 |
Vedant7789/quizo2 | 844f209 | pages/api/quizzes/index.ts | TypeScript | www.github.com/Vedant7789/quizo2/tree/main/pages/api/quizzes/index.ts | https://raw.githubusercontent.com/Vedant7789/quizo2/844f209/pages/api/quizzes/index.ts | Vedant7789/quizo2 844f209 pages/api/quizzes/index.ts | true | 200 | 794 | import { NextApiRequest, NextApiResponse } from "next";
import { PrismaClient } from "@prisma/client";
import { getSession } from "next-auth/react";
const prisma = new PrismaClient();
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
const session = await getSession({ req });
if (... | 1 |
Saiful123-tech/HealthylifeStyle | b516bfa | src/app/trainer-dashboard/trainer-dashboard.component.ts | TypeScript | www.github.com/Saiful123-tech/HealthylifeStyle/tree/main/src/app/trainer-dashboard/trainer-dashboard.component.ts | https://raw.githubusercontent.com/Saiful123-tech/HealthylifeStyle/b516bfa/src/app/trainer-dashboard/trainer-dashboard.component.ts | Saiful123-tech/HealthylifeStyle b516bfa src/app/trainer-dashboard/trainer-dashboard.component.ts | true | 200 | 2,371 | import { Component,Input,InputDecorator, } from '@angular/core';
import { trainer } from '../data-type';
import { TrainerService } from '../services/trainer.service';
import { Router } from '@angular/router';
@Component({
selector: 'app-trainer-dashboard',
templateUrl: './trainer-dashboard.component.html',
style... | 5 |
ardsh/sql-api-engine | 0c859ff | packages/core/react/useCursorPaginationProps.ts | TypeScript | www.github.com/ardsh/sql-api-engine/tree/main/packages/core/react/useCursorPaginationProps.ts | https://raw.githubusercontent.com/ardsh/sql-api-engine/0c859ff/packages/core/react/useCursorPaginationProps.ts | ardsh/sql-api-engine 0c859ff packages/core/react/useCursorPaginationProps.ts | true | 200 | 6,896 | import React from 'react'
import { useBox } from './utils'
import { noop } from '../shared/utils'
export const initialCursorPagination: CursorPagination = {
hasNextPage: false,
currentPage: 1,
loading: false,
skip: 0,
hasPreviousPage: false,
currentCursor: '',
startCursor: '',
endCursor: '',
reverse:... | 4 |
qoopoerp/appjuntoscnt | 9c0cab3 | src/app/db/model.ts | TypeScript | www.github.com/qoopoerp/appjuntoscnt/tree/main/src/app/db/model.ts | https://raw.githubusercontent.com/qoopoerp/appjuntoscnt/9c0cab3/src/app/db/model.ts | qoopoerp/appjuntoscnt 9c0cab3 src/app/db/model.ts | true | 200 | 2,684 | export const JUNTOSDB = {
name: 'juntos.db',
tables: [
{
name: 'junt_contactos',
columns: [
{ name: 'cont_id', type: 'text not null primary key' },
{ name: 'cont_nombre', type: 'text' },
{ name: 'cont_numero', type: 'text not null' },
{ name: 'cont_sms', type... | 7 |
jojogeorge3344/HRMS-UI-and-API | b8586d0 | Chef.HRMS.Web/ClientApp/src/app/features/employee-profile/employee-job-details/employee-job-details.service.spec.ts | TypeScript | www.github.com/jojogeorge3344/HRMS-UI-and-API/tree/main/Chef.HRMS.Web/ClientApp/src/app/features/employee-profile/employee-job-details/employee-job-details.service.spec.ts | https://raw.githubusercontent.com/jojogeorge3344/HRMS-UI-and-API/b8586d0/Chef.HRMS.Web/ClientApp/src/app/features/employee-profile/employee-job-details/employee-job-details.service.spec.ts | jojogeorge3344/HRMS-UI-and-API b8586d0 Chef.HRMS.Web/ClientApp/src/app/features/employee-profile/employee-job-details/employee-job-details.service.spec.ts | true | 200 | 419 | import { TestBed } from '@angular/core/testing';
import { EmployeeJobDetailsService } from './employee-job-details.service';
describe('EmployeeJobDetailsService', () => {
let service: EmployeeJobDetailsService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(EmployeeJobDet... | 0 |
younes-uca/salah-mac-react-native-v1 | 6ff6c01 | frontend/src/app/module/admin/view/sale/return-status-admin/create-admin/return-status-create-admin.component.ts | TypeScript | www.github.com/younes-uca/salah-mac-react-native-v1/tree/main/frontend/src/app/module/admin/view/sale/return-status-admin/create-admin/return-status-create-admin.component.ts | https://raw.githubusercontent.com/younes-uca/salah-mac-react-native-v1/6ff6c01/frontend/src/app/module/admin/view/sale/return-status-admin/create-admin/return-status-create-admin.component.ts | younes-uca/salah-mac-react-native-v1 6ff6c01 frontend/src/app/module/admin/view/sale/return-status-admin/create-admin/return-status-create-admin.component.ts | true | 200 | 993 | import {Component, OnInit, Input} from '@angular/core';
import { AbstractCreateController } from 'src/app/zynerator/controller/AbstractCreateController';
import {ReturnStatusService} from 'src/app/controller/service/ReturnStatus.service';
import {ReturnStatusDto} from 'src/app/controller/model/ReturnStatus.model';
im... | 3 |
IsraelSerrano1/Fundamentos230419 | 5187a88 | src/app/formulario-factura/formulario-factura.component.ts | TypeScript | www.github.com/IsraelSerrano1/Fundamentos230419/tree/main/src/app/formulario-factura/formulario-factura.component.ts | https://raw.githubusercontent.com/IsraelSerrano1/Fundamentos230419/5187a88/src/app/formulario-factura/formulario-factura.component.ts | IsraelSerrano1/Fundamentos230419 5187a88 src/app/formulario-factura/formulario-factura.component.ts | true | 200 | 913 | import { Component } from '@angular/core';
import { Factura } from '../_modelo/factura';
import { ServicioFacturaService } from '../servicio-factura.service';
@Component({
selector: 'app-formulario-factura',
templateUrl: './formulario-factura.component.html',
styleUrls: ['./formulario-factura.component.css']
})
... | 1 |
ArtemSafin-WebDev/hockey-tat | a2e55c4 | src/js/history.ts | TypeScript | www.github.com/ArtemSafin-WebDev/hockey-tat/tree/main/src/js/history.ts | https://raw.githubusercontent.com/ArtemSafin-WebDev/hockey-tat/a2e55c4/src/js/history.ts | ArtemSafin-WebDev/hockey-tat a2e55c4 src/js/history.ts | true | 200 | 1,491 | import gsap from "gsap";
import { ScrollTrigger } from "gsap/ScrollTrigger";
gsap.registerPlugin(ScrollTrigger);
export default function historyAnimation() {
const elements: HTMLElement[] = Array.from(
document.querySelectorAll(".history")
);
elements.forEach((element) => {
const slots: HTMLElement[] =... | 6 |
Isbha19/Real-Estate-Client | 1eb80bb | src/app/components/Company/pages/companyDashboard/company-admin-dashboard/company-admin-dashboard.component.ts | TypeScript | www.github.com/Isbha19/Real-Estate-Client/tree/main/src/app/components/Company/pages/companyDashboard/company-admin-dashboard/company-admin-dashboard.component.ts | https://raw.githubusercontent.com/Isbha19/Real-Estate-Client/1eb80bb/src/app/components/Company/pages/companyDashboard/company-admin-dashboard/company-admin-dashboard.component.ts | Isbha19/Real-Estate-Client 1eb80bb src/app/components/Company/pages/companyDashboard/company-admin-dashboard/company-admin-dashboard.component.ts | true | 200 | 711 | import { CompanyDBSidebarComponent } from './../company-dbsidebar/company-dbsidebar.component';
import { Component } from '@angular/core';
import { RouterOutlet } from '@angular/router';
import{CompanyDashboardNavbarComponent} from './../company-dashboard-navbar/company-dashboard-navbar.component';
import { FooterCompo... | 5 |
tuongroth/fullstackopen2024 | b1a4dc9 | part 6/src/reducer/anecdoteReducer.ts | TypeScript | www.github.com/tuongroth/fullstackopen2024/tree/main/part 6/src/reducer/anecdoteReducer.ts | https://raw.githubusercontent.com/tuongroth/fullstackopen2024/b1a4dc9/part%206/src/reducer/anecdoteReducer.ts | tuongroth/fullstackopen2024 b1a4dc9 part 6/src/reducer/anecdoteReducer.ts | true | 200 | 1,312 | // reducers/anecdoteReducer.js
import { createSlice } from '@reduxjs/toolkit'
import anecdoteService from '../services/anecdotes'
const anecdoteSlice = createSlice({
name: 'anecdotes',
initialState: [],
reducers: {
appendAnecdote(state, action) {
state.push(action.payload)
},
setAnecdotes(state... | 4 |
dittyBox/dittybox-service-nestjs | bc5b03a | src/interceptor/log.interceptor.ts | TypeScript | www.github.com/dittyBox/dittybox-service-nestjs/tree/main/src/interceptor/log.interceptor.ts | https://raw.githubusercontent.com/dittyBox/dittybox-service-nestjs/bc5b03a/src/interceptor/log.interceptor.ts | dittyBox/dittybox-service-nestjs bc5b03a src/interceptor/log.interceptor.ts | true | 200 | 1,442 | import { CallHandler, ExecutionContext, Injectable, NestInterceptor } from "@nestjs/common";
import { Observable, map, tap } from "rxjs";
@Injectable()
export class LogInterceptor implements NestInterceptor {
intercept(context: ExecutionContext, next: CallHandler<any>): Observable<any> {
/**
* 요청이... | 7 |
certidevs/angular_pruebas | 95b76d4 | angular-006-servicios/src/app/app.component.ts | TypeScript | www.github.com/certidevs/angular_pruebas/tree/main/angular-006-servicios/src/app/app.component.ts | https://raw.githubusercontent.com/certidevs/angular_pruebas/95b76d4/angular-006-servicios/src/app/app.component.ts | certidevs/angular_pruebas 95b76d4 angular-006-servicios/src/app/app.component.ts | true | 200 | 427 | import { Component } from '@angular/core';
import { RouterOutlet } from '@angular/router';
import { ProductListComponent } from "./product-list/product-list.component";
@Component({
selector: 'app-root',
standalone: true,
templateUrl: './app.component.html',
styleUrl: './app.component.css',
imports... | 2 |
nileshparwan/novartis-final | 9c42cc2 | apps/pso/services/apollo/apollo.service.ts | TypeScript | www.github.com/nileshparwan/novartis-final/tree/main/apps/pso/services/apollo/apollo.service.ts | https://raw.githubusercontent.com/nileshparwan/novartis-final/9c42cc2/apps/pso/services/apollo/apollo.service.ts | nileshparwan/novartis-final 9c42cc2 apps/pso/services/apollo/apollo.service.ts | true | 200 | 2,791 | /* eslint-disable no-console */
import { IncomingMessage, ServerResponse } from 'http';
import { onError } from '@apollo/client/link/error';
import { RetryLink } from '@apollo/client/link/retry';
import {
from,
HttpLink,
ApolloClient,
DocumentNode,
InMemoryCache,
NormalizedCacheObject
} from '@apollo/client... | 0 |
gkumar9891/url-shortener-backend | 8566662 | src/routes/urlShortenerRoutes.ts | TypeScript | www.github.com/gkumar9891/url-shortener-backend/tree/main/src/routes/urlShortenerRoutes.ts | https://raw.githubusercontent.com/gkumar9891/url-shortener-backend/8566662/src/routes/urlShortenerRoutes.ts | gkumar9891/url-shortener-backend 8566662 src/routes/urlShortenerRoutes.ts | true | 200 | 607 | import express from 'express';
import urlshortenerController from '../controllers/urlShortener';
import {xlValidate} from '../controllers/xlController'
import multer from "multer";
const upload = multer()
const router = express.Router();
router
.route('/')
.post(urlshortenerController.urlshortener)
router
... | 1 |
Willcas222/bot-front | a954354 | flow/flowCuestionario.ts | TypeScript | www.github.com/Willcas222/bot-front/tree/main/flow/flowCuestionario.ts | https://raw.githubusercontent.com/Willcas222/bot-front/a954354/flow/flowCuestionario.ts | Willcas222/bot-front a954354 flow/flowCuestionario.ts | true | 200 | 1,867 | import { addKeyword } from "@builderbot/bot";
import axios from "axios";
import mainflow from "./mainflow";
const flowCuestionario = addKeyword('si')
.addAnswer('¡Hola! 😊 Dime tu nombre completo:', { capture: true }, async (ctx, { flowDynamic, state }) => {
await state.update({ nombre: ctx.body.trim() });... | 6 |
samiya-kazi/angular-tarot-reading | 99b07c8 | client/src/app/card-reading/card-reading.component.ts | TypeScript | www.github.com/samiya-kazi/angular-tarot-reading/tree/main/client/src/app/card-reading/card-reading.component.ts | https://raw.githubusercontent.com/samiya-kazi/angular-tarot-reading/99b07c8/client/src/app/card-reading/card-reading.component.ts | samiya-kazi/angular-tarot-reading 99b07c8 client/src/app/card-reading/card-reading.component.ts | true | 200 | 778 | import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { ApiClientService } from '../api-client.service';
import { Card } from '../card';
@Component({
selector: 'app-card-reading',
templateUrl: './card-reading.component.html',
styleUrls: ['./card-reading.component.css']
})
export ... | 5 |
Zuzuna54/nodeexpressTS | 85ec264 | src/tests/deleteUserHandler.test.ts | TypeScript | www.github.com/Zuzuna54/nodeexpressTS/tree/main/src/tests/deleteUserHandler.test.ts | https://raw.githubusercontent.com/Zuzuna54/nodeexpressTS/85ec264/src/tests/deleteUserHandler.test.ts | Zuzuna54/nodeexpressTS 85ec264 src/tests/deleteUserHandler.test.ts | true | 200 | 2,586 | import request from 'supertest';
import app from '../app';
import deleteUserHandler from '../handlers/deleteUserHandler';
import { Request, Response } from 'express';
import userService from '../sqlCalls/userService/userService';
jest.mock('../sqlCalls/userCall'); // Update the path as needed
describe('DELETE /aweso... | 3 |
TsitsTaras/Apple_site | 38bc120 | src/app/share/enums/colors.enum.ts | TypeScript | www.github.com/TsitsTaras/Apple_site/tree/main/src/app/share/enums/colors.enum.ts | https://raw.githubusercontent.com/TsitsTaras/Apple_site/38bc120/src/app/share/enums/colors.enum.ts | TsitsTaras/Apple_site 38bc120 src/app/share/enums/colors.enum.ts | true | 200 | 875 | export enum ColorMapTitle {
black = 'Black',
blue = 'Blue',
red = 'Red',
white = 'White',
green = 'Green',
silver = 'Silver',
spaceGrey = 'Space Gray',
midnight = 'Midnight',
starlight = 'Starlink',
gold = 'Gold',
pink = 'Pink',
purple = 'Purple',
}
export enum ColorMap {
black = 1,
blue = 2... | 4 |
joelpena270288/sigler-backend | 15a9ed5 | src/modules/gasto_item/gasto_item.service.spec.ts | TypeScript | www.github.com/joelpena270288/sigler-backend/tree/main/src/modules/gasto_item/gasto_item.service.spec.ts | https://raw.githubusercontent.com/joelpena270288/sigler-backend/15a9ed5/src/modules/gasto_item/gasto_item.service.spec.ts | joelpena270288/sigler-backend 15a9ed5 src/modules/gasto_item/gasto_item.service.spec.ts | true | 200 | 482 | import { Test, TestingModule } from '@nestjs/testing';
import { GastoItemService } from './gasto_item.service';
describe('GastoItemService', () => {
let service: GastoItemService;
beforeEach(async () => {
const module: TestingModule = await Test.createTestingModule({
providers: [GastoItemService],
}... | 7 |
RoryCollins/finance-projector | ca68579 | src/SimulationRunner.ts | TypeScript | www.github.com/RoryCollins/finance-projector/tree/main/src/SimulationRunner.ts | https://raw.githubusercontent.com/RoryCollins/finance-projector/ca68579/src/SimulationRunner.ts | RoryCollins/finance-projector ca68579 src/SimulationRunner.ts | true | 200 | 6,027 | import _ from "underscore";
import { RiskAppetite, SimulationData, SimulationResults } from "./interfaces";
import { GetNormallyDistributedRandomNumber } from "./distribution";
import { RetirementCalculator } from "./RetirementCalculator";
import { EARLY_PENSION_AGE } from "./constants";
export interface PortfolioStat... | 2 |
Javedmv/VLearning-server | 4c12162 | auth-service/src/presentation/controllers/forgotPasswordController.ts | TypeScript | www.github.com/Javedmv/VLearning-server/tree/main/auth-service/src/presentation/controllers/forgotPasswordController.ts | https://raw.githubusercontent.com/Javedmv/VLearning-server/4c12162/auth-service/src/presentation/controllers/forgotPasswordController.ts | Javedmv/VLearning-server 4c12162 auth-service/src/presentation/controllers/forgotPasswordController.ts | true | 200 | 1,296 | import { NextFunction, Request, Response } from "express"
import { IDependencies } from "../../application/interfaces/IDependencies"
import { ErrorResponse } from "../../_lib/common/error";
import { userCreatedProducer } from "../../infrastructure/kafka/producers";
import {NOTIFICATION_SERVICE_TOPIC} from '../../_lib/c... | 0 |
mrdalvik/barberysta | 6919a15 | src/core/user.ts | TypeScript | www.github.com/mrdalvik/barberysta/tree/main/src/core/user.ts | https://raw.githubusercontent.com/mrdalvik/barberysta/6919a15/src/core/user.ts | mrdalvik/barberysta 6919a15 src/core/user.ts | true | 200 | 1,310 | import type TelegramBot from 'node-telegram-bot-api'
import type Config from './config.js'
import { serviceLocator } from './service-locator.js'
import { isFilledArray, isFilledString } from './type.js'
import { type LanguagesConfig } from './loc/loc.js'
export default class User {
readonly #id: number
#langCode!... | 1 |
karishmacitrusbug/angular-sample | 8dc5815 | src/app/modules/invoices/pages/invoices-page/invoices-page.component.ts | TypeScript | www.github.com/karishmacitrusbug/angular-sample/tree/main/src/app/modules/invoices/pages/invoices-page/invoices-page.component.ts | https://raw.githubusercontent.com/karishmacitrusbug/angular-sample/8dc5815/src/app/modules/invoices/pages/invoices-page/invoices-page.component.ts | karishmacitrusbug/angular-sample 8dc5815 src/app/modules/invoices/pages/invoices-page/invoices-page.component.ts | true | 200 | 12,638 | import { DOCUMENT } from '@angular/common';
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Inject, OnDestroy, OnInit } from '@angular/core';
import { InvoiceType } from '@global/enums/invoice-type.enum';
import { FileHelper } from '@global/helpers/file.helper';
import { filterEntriesByFields } from '@g... | 6 |
dlkulp/ZoningWars | e545b71 | Utils.ts | TypeScript | www.github.com/dlkulp/ZoningWars/tree/main/Utils.ts | https://raw.githubusercontent.com/dlkulp/ZoningWars/e545b71/Utils.ts | dlkulp/ZoningWars e545b71 Utils.ts | true | 200 | 1,023 | import {webcrypto} from "crypto";
// Store elements in 1d array
export function store2Din1D(arr: any[], x: number, y: number, totalCol: number, val: any) {
let k = x * totalCol + y;
arr[k] = val;
}
export function get1DFrom2D(arr: any[], x: number, y: number, totalCol: number) {
return arr[x * totalCol + y];
}
//... | 5 |
Oleh19/portfolio-blog | 76219a8 | src/store/slices/serviceSlice.ts | TypeScript | www.github.com/Oleh19/portfolio-blog/tree/main/src/store/slices/serviceSlice.ts | https://raw.githubusercontent.com/Oleh19/portfolio-blog/76219a8/src/store/slices/serviceSlice.ts | Oleh19/portfolio-blog 76219a8 src/store/slices/serviceSlice.ts | true | 200 | 705 | import { createSlice, PayloadAction } from '@reduxjs/toolkit';
import { SignUpInDTO } from '../../api/dto/SignUpIn';
import { RootState } from '../store';
interface AuthState {
user: SignUpInDTO['user'] | null;
}
const initialState: AuthState = {
user: null
};
export const authSlice = createSlice({
name: 'auth... | 4 |
Patrick-BP/CS569-FinalProject | 20bf07e | client/src/app/signup.component.ts | TypeScript | www.github.com/Patrick-BP/CS569-FinalProject/tree/main/client/src/app/signup.component.ts | https://raw.githubusercontent.com/Patrick-BP/CS569-FinalProject/20bf07e/client/src/app/signup.component.ts | Patrick-BP/CS569-FinalProject 20bf07e client/src/app/signup.component.ts | true | 200 | 1,168 | import { Component, inject, OnInit } from '@angular/core';
import { FormBuilder, FormControl, Validators } from '@angular/forms';
import { Router } from '@angular/router';
import { IUser } from './goals/goals.interface';
import { UserService } from './user.service';
@Component({
selector: 'app-signup',
templateUrl... | 7 |
Hephzibah777/Online-Tracking-Platform-fullStack | e94aff1 | backend/models/course.ts | TypeScript | www.github.com/Hephzibah777/Online-Tracking-Platform-fullStack/tree/main/backend/models/course.ts | https://raw.githubusercontent.com/Hephzibah777/Online-Tracking-Platform-fullStack/e94aff1/backend/models/course.ts | Hephzibah777/Online-Tracking-Platform-fullStack e94aff1 backend/models/course.ts | true | 200 | 406 | import db from "../config/db"
import { DataType, DataTypes } from "sequelize";
const Course=db.sequelize.define(
'Course',
{
id: {
type:DataTypes.INTEGER,
allowNull:false,
primaryKey:true,
autoIncrement:true,
},
name: {
type:DataT... | 2 |
Nicolas-Deku/centre_formation | 278eb3f | mon-front/src/app/navbar/navbar.component.ts | TypeScript | www.github.com/Nicolas-Deku/centre_formation/tree/main/mon-front/src/app/navbar/navbar.component.ts | https://raw.githubusercontent.com/Nicolas-Deku/centre_formation/278eb3f/mon-front/src/app/navbar/navbar.component.ts | Nicolas-Deku/centre_formation 278eb3f mon-front/src/app/navbar/navbar.component.ts | true | 200 | 9,062 | import { Component, EventEmitter, Output, Renderer2, ElementRef, ViewChild, HostListener } from '@angular/core';
import { CommonModule } from '@angular/common';
import { AuthService } from '../services/auth.service';
import { Observable } from 'rxjs';
import { RouterLink } from '@angular/router';
import Swal from 'swee... | 0 |
Seen-cs/RentaCarFrontend | 09b59e5 | src/app/app.module.ts | TypeScript | www.github.com/Seen-cs/RentaCarFrontend/tree/main/src/app/app.module.ts | https://raw.githubusercontent.com/Seen-cs/RentaCarFrontend/09b59e5/src/app/app.module.ts | Seen-cs/RentaCarFrontend 09b59e5 src/app/app.module.ts | true | 200 | 2,000 | import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { HttpClientModule } from '@angular/common/http';
import { FormsModule } from '@angular/forms';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations'
import { AppRoutingModule } from './ap... | 1 |
Kaued/Angular_CarSeller | 9691a37 | src/app/components/delete-brand/delete-brand.component.ts | TypeScript | www.github.com/Kaued/Angular_CarSeller/tree/main/src/app/components/delete-brand/delete-brand.component.ts | https://raw.githubusercontent.com/Kaued/Angular_CarSeller/9691a37/src/app/components/delete-brand/delete-brand.component.ts | Kaued/Angular_CarSeller 9691a37 src/app/components/delete-brand/delete-brand.component.ts | true | 200 | 844 | import { Component, Inject } from '@angular/core';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { MatSnackBar } from '@angular/material/snack-bar';
import { BrandValues } from 'src/app/interfaces/brand-values';
@Component({
selector: 'app-delete-brand',
templateUrl: './delete-br... | 3 |
stdcall0/ba-plugin | 5360d9f | components/arona/api.ts | TypeScript | www.github.com/stdcall0/ba-plugin/tree/main/components/arona/api.ts | https://raw.githubusercontent.com/stdcall0/ba-plugin/5360d9f/components/arona/api.ts | stdcall0/ba-plugin 5360d9f components/arona/api.ts | true | 200 | 2,975 | import axios from 'axios';
import crypto from 'crypto';
import _ from 'lodash';
import { Logger, Config } from '#gc';
import { Arona } from '#gc.model';
import { AronaAlias } from '#gc.res';
export default abstract class API {
static get api_url() {
return Config.get('arona').get('endpoints.search_api') ... | 6 |
Iscdsp/CRUD-de-Pessoas | de99995 | LoginSenhaComponent/CRUD_WithLoginPassword/src/app/app.component.ts | TypeScript | www.github.com/Iscdsp/CRUD-de-Pessoas/tree/main/LoginSenhaComponent/CRUD_WithLoginPassword/src/app/app.component.ts | https://raw.githubusercontent.com/Iscdsp/CRUD-de-Pessoas/de99995/LoginSenhaComponent/CRUD_WithLoginPassword/src/app/app.component.ts | Iscdsp/CRUD-de-Pessoas de99995 LoginSenhaComponent/CRUD_WithLoginPassword/src/app/app.component.ts | true | 200 | 619 | import { Component } from '@angular/core';
import { Router } from '@angular/router';
import { LoginService } from './auth/services/login.service';
import { Usuario } from './shared';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
})
export class AppCo... | 5 |
Shinii-org/nodejs-ecommerce | 5a31a4c | src/app.ts | TypeScript | www.github.com/Shinii-org/nodejs-ecommerce/tree/main/src/app.ts | https://raw.githubusercontent.com/Shinii-org/nodejs-ecommerce/5a31a4c/src/app.ts | Shinii-org/nodejs-ecommerce 5a31a4c src/app.ts | true | 200 | 393 | import dotenv from "dotenv";
import express from "express";
import morgan from "morgan";
import helmet from "helmet";
import compression from "compression";
import "../src/dbs/init.mongodb";
export const app = express();
dotenv.config();
// init middleware
app.use(morgan("dev"));
app.use(helmet());
app.use(compression... | 7 |
sayeed1999/home | 2321105 | chat-service/src/models/message.model.ts | TypeScript | www.github.com/sayeed1999/home/tree/main/chat-service/src/models/message.model.ts | https://raw.githubusercontent.com/sayeed1999/home/2321105/chat-service/src/models/message.model.ts | sayeed1999/home 2321105 chat-service/src/models/message.model.ts | true | 200 | 364 | import mongoose from "mongoose";
const Schema = mongoose.Schema;
export const MessageSchema = new Schema(
{
sender: {
type: mongoose.Types.ObjectId,
ref: "User",
required: true,
},
text: {
type: String,
required: true,
},
},
{ timestamps: true }
);
// export defaul... | 4 |
GiminiKhan/milestone-5-task1 | add071a | resume.ts | TypeScript | www.github.com/GiminiKhan/milestone-5-task1/tree/main/resume.ts | https://raw.githubusercontent.com/GiminiKhan/milestone-5-task1/add071a/resume.ts | GiminiKhan/milestone-5-task1 add071a resume.ts | true | 200 | 4,623 | document.addEventListener('DOMContentLoaded', function() {
const urlParams = new URLSearchParams(window.location.search);
const populateElement = (id: string, param: string) => {
const element = document.getElementById(id);
if (element) {
element.textContent = urlParams.get(pa... | 2 |
PadmarajBhat/Bhagavadgita-Interactive-Wordlist | 15306b4 | AngularFrontEnd/src/app/service_files/common.service.ts | TypeScript | www.github.com/PadmarajBhat/Bhagavadgita-Interactive-Wordlist/tree/main/AngularFrontEnd/src/app/service_files/common.service.ts | https://raw.githubusercontent.com/PadmarajBhat/Bhagavadgita-Interactive-Wordlist/15306b4/AngularFrontEnd/src/app/service_files/common.service.ts | PadmarajBhat/Bhagavadgita-Interactive-Wordlist 15306b4 AngularFrontEnd/src/app/service_files/common.service.ts | true | 200 | 2,865 | import { Injectable } from '@angular/core';
import { Constants } from '../Interface_Files/constants.enum';
import { ChapterService } from './chapter.service';
import { FbaseService } from './fbase.service';
import { ProcessDataService } from './process-data.service';
import { ProcessUserdataService } from './process-us... | 1 |
Simok99/angular-ssw-project | 6e5ca40 | src/app/prenotazione/prenotazione.component.ts | TypeScript | www.github.com/Simok99/angular-ssw-project/tree/main/src/app/prenotazione/prenotazione.component.ts | https://raw.githubusercontent.com/Simok99/angular-ssw-project/6e5ca40/src/app/prenotazione/prenotazione.component.ts | Simok99/angular-ssw-project 6e5ca40 src/app/prenotazione/prenotazione.component.ts | true | 200 | 3,610 | import {
Component,
OnInit,
Input,
OnChanges,
SimpleChanges,
Output,
EventEmitter,
} from '@angular/core';
import { Teatro } from '../app.component';
@Component({
selector: 'prenotazione',
templateUrl: './prenotazione.component.html',
styleUrls: ['./prenotazione.component.css'],
})
export class Pre... | 3 |
joecaro/portfolio | b9d8ffd | src/hooks/useAnimationFrame.ts | TypeScript | www.github.com/joecaro/portfolio/tree/main/src/hooks/useAnimationFrame.ts | https://raw.githubusercontent.com/joecaro/portfolio/b9d8ffd/src/hooks/useAnimationFrame.ts | joecaro/portfolio b9d8ffd src/hooks/useAnimationFrame.ts | true | 200 | 995 | import React, { useCallback } from "react";
const useAnimationFrame = (callback: (deltaTime: number) => void) => {
// Use useRef for mutable variables that we want to persist
// without triggering a re-render on their change
const requestRef = React.useRef<number | null>();
const previousTimeRef = Reac... | 5 |
404dontsleep/SimpleBase | 8976489 | Backend/src/me/middlewares/permission.middleware.ts | TypeScript | www.github.com/404dontsleep/SimpleBase/tree/main/Backend/src/me/middlewares/permission.middleware.ts | https://raw.githubusercontent.com/404dontsleep/SimpleBase/8976489/Backend/src/me/middlewares/permission.middleware.ts | 404dontsleep/SimpleBase 8976489 Backend/src/me/middlewares/permission.middleware.ts | true | 200 | 2,247 | import { NextFunction, Request, Response } from "express";
import { IAuthRequest } from "./auth.middleware";
import PermissionModel from "../models/permission.model";
import UserType from "@MyTypes/user.type";
import RouterModel from "../models/router.model";
import MyError from "../message/errors";
export default asy... | 7 |
kahbernardo/enterpriseSaberGlobal | 5c67522 | app/src/components/menu/styles.ts | TypeScript | www.github.com/kahbernardo/enterpriseSaberGlobal/tree/main/app/src/components/menu/styles.ts | https://raw.githubusercontent.com/kahbernardo/enterpriseSaberGlobal/5c67522/app/src/components/menu/styles.ts | kahbernardo/enterpriseSaberGlobal 5c67522 app/src/components/menu/styles.ts | true | 200 | 1,057 | import styled, { css } from 'styled-components/native';
import { ITheme } from '@domain/interfaces/ITheme';
export const Container = styled.View<ITheme>`
display: flex;
flex-direction: column;
padding: 0 5%;
background-color: #00a6f8;
`;
export const Content = styled.View`
display: flex;
flex-directio... | 0 |
n8rzz/railmaster-ui | 9d1013a | src/domain/auth/auth.service.ts | TypeScript | www.github.com/n8rzz/railmaster-ui/tree/main/src/domain/auth/auth.service.ts | https://raw.githubusercontent.com/n8rzz/railmaster-ui/9d1013a/src/domain/auth/auth.service.ts | n8rzz/railmaster-ui 9d1013a src/domain/auth/auth.service.ts | true | 200 | 721 | import axios, { AxiosInstance } from 'axios';
import { IAuthResponse, IAuthResponseData } from '@/domain/auth/auth.types';
export class AuthService {
protected readonly instance: AxiosInstance;
constructor(baseUrl: string) {
this.instance = axios.create({
baseURL: baseUrl,
timeout: 30000,
ti... | 4 |
Jordan3Vera/Product-Aplication | d7f6d12 | Frontend/WebApp/src/app/global/views/session/register/register.component.ts | TypeScript | www.github.com/Jordan3Vera/Product-Aplication/tree/main/Frontend/WebApp/src/app/global/views/session/register/register.component.ts | https://raw.githubusercontent.com/Jordan3Vera/Product-Aplication/d7f6d12/Frontend/WebApp/src/app/global/views/session/register/register.component.ts | Jordan3Vera/Product-Aplication d7f6d12 Frontend/WebApp/src/app/global/views/session/register/register.component.ts | true | 200 | 8,174 | import { Component, OnInit } from '@angular/core';
import { Title } from '@angular/platform-browser';
import { AuthenticateService } from '../../../../shared/auth/authenticate.service';
import Swal from 'sweetalert2';
import { IUser } from '../../../../shared/models/interface/user.interface';
import { Router } from '@a... | 3 |
vladimirgomezf/gateways | 59c977c | gateways-api/src/gateways/gateways.controller.ts | TypeScript | www.github.com/vladimirgomezf/gateways/tree/main/gateways-api/src/gateways/gateways.controller.ts | https://raw.githubusercontent.com/vladimirgomezf/gateways/59c977c/gateways-api/src/gateways/gateways.controller.ts | vladimirgomezf/gateways 59c977c gateways-api/src/gateways/gateways.controller.ts | true | 200 | 1,487 | import {
Controller,
Get,
Post,
Body,
Patch,
Param,
Delete,
UsePipes,
} from '@nestjs/common';
import { GatewaysService } from './gateways.service';
import { CreateGatewayDto } from './dto/create-gateway.dto';
import { UpdateGatewayDto } from './dto/update-gateway.dto';
import { gatewaySchema, JoiValida... | 4 |
asadkomidev/protfolio | a0c97d6 | src/actions/posts.ts | TypeScript | www.github.com/asadkomidev/protfolio/tree/main/src/actions/posts.ts | https://raw.githubusercontent.com/asadkomidev/protfolio/a0c97d6/src/actions/posts.ts | asadkomidev/protfolio a0c97d6 src/actions/posts.ts | true | 200 | 711 | import { revalidatePath } from "next/cache";
import { client } from "../../sanity/lib/client";
import { groq } from "next-sanity";
export async function getPosts() {
const query = groq`*[_type == 'post'] {
title,
desc,
'slug': slug.current,
mainImage,
publishedAt,
... | 3 |
alexylon/Sofos | 65a10cb | src/app/api/auth/[...nextauth]/route.ts | TypeScript | www.github.com/alexylon/Sofos/tree/main/src/app/api/auth/[...nextauth]/route.ts | https://raw.githubusercontent.com/alexylon/Sofos/65a10cb/src/app/api/auth/%5B...nextauth%5D/route.ts | alexylon/Sofos 65a10cb src/app/api/auth/[...nextauth]/route.ts | true | 200 | 662 | import NextAuth, { NextAuthOptions } from "next-auth"
import GithubProvider from "next-auth/providers/github"
const authOptions: NextAuthOptions = {
// Configure one or more authentication providers
session: {
strategy: "jwt",
},
providers: [
GithubProvider({
clientId: process.env.GITHUB_ID as string,
cl... | 1 |
suiweb/suiweb | a26f1e3 | demos/lib/js/utils.d.ts | TypeScript | www.github.com/suiweb/suiweb/tree/main/demos/lib/js/utils.d.ts | https://raw.githubusercontent.com/suiweb/suiweb/a26f1e3/demos/lib/js/utils.d.ts | suiweb/suiweb a26f1e3 demos/lib/js/utils.d.ts | true | 200 | 1,065 | export type Primitive = string | number | bigint | boolean | symbol | null | undefined;
/**
* Checks whether the `primitive` passed is of a primitive type.
* @param primitive - The value to check.
* @returns `true` if `primitive` is of any primitive type.
*/
export declare function isPrimitive(primitive: unknown): ... | 7 |
Middlerun/trainalert | 6de37d9 | notificationRecord.ts | TypeScript | www.github.com/Middlerun/trainalert/tree/main/notificationRecord.ts | https://raw.githubusercontent.com/Middlerun/trainalert/6de37d9/notificationRecord.ts | Middlerun/trainalert 6de37d9 notificationRecord.ts | true | 200 | 1,848 | import * as fs from 'fs'
import * as path from 'path'
import { logsDir } from './log'
interface NotificationRecord {
title: string
body: string
timestamp: number
}
interface NotificationRecords {
date: string
notifications: {
[key: string]: NotificationRecord | undefined
}
}
const recordFilename = 'n... | 4 |
ledevthang/evocean-be | 7ed22de | src/apis/user/update-user.ts | TypeScript | www.github.com/ledevthang/evocean-be/tree/main/src/apis/user/update-user.ts | https://raw.githubusercontent.com/ledevthang/evocean-be/7ed22de/src/apis/user/update-user.ts | ledevthang/evocean-be 7ed22de src/apis/user/update-user.ts | true | 200 | 797 | import Elysia, { t } from "elysia";
import { authPlugin } from "@root/plugins/auth.plugin";
import { ENDPOINT } from "@root/shared/constant";
import { prisma } from "@root/shared/prisma";
export const updateUserDto = t.Object({
avatar_url: t.Optional(t.String()),
name: t.Optional(t.String()),
description: t.Opt... | 1 |
Simonbelete/portfolio | 8858192 | src/rootSlice.ts | TypeScript | www.github.com/Simonbelete/portfolio/tree/main/src/rootSlice.ts | https://raw.githubusercontent.com/Simonbelete/portfolio/8858192/src/rootSlice.ts | Simonbelete/portfolio 8858192 src/rootSlice.ts | true | 200 | 2,538 | import { createSlice, PayloadAction } from "@reduxjs/toolkit";
import { WINDOWS } from "components/windows";
export interface Windows {
id: number; // Refers to WINDOWS in components/windows
minimized?: boolean;
focused?: boolean;
}
export interface Desktops {
id: number;
}
export interface User {
name: st... | 3 |
alothanhh/scd-Education | aca7328 | src/modules/main/blognext.controller.ts | TypeScript | www.github.com/alothanhh/scd-Education/tree/main/src/modules/main/blognext.controller.ts | https://raw.githubusercontent.com/alothanhh/scd-Education/aca7328/src/modules/main/blognext.controller.ts | alothanhh/scd-Education aca7328 src/modules/main/blognext.controller.ts | true | 200 | 362 | import { Response, Request } from 'express';
import { Controller, Get, Render, Post, Body, Res, UseGuards, Req } from "@nestjs/common";
import { AuthGuard } from '@nestjs/passport';
@Controller("blognext")
export class BlognextController {
@Get()
@Render("home/blognext")
async index(@Req() req: ... | 7 |
lightdash/lightdash | c0d9d30 | packages/backend/src/projectAdapters/dbtGitProjectAdapter.ts | TypeScript | www.github.com/lightdash/lightdash/tree/main/packages/backend/src/projectAdapters/dbtGitProjectAdapter.ts | https://raw.githubusercontent.com/lightdash/lightdash/c0d9d30/packages/backend/src/projectAdapters/dbtGitProjectAdapter.ts | lightdash/lightdash c0d9d30 packages/backend/src/projectAdapters/dbtGitProjectAdapter.ts | true | 200 | 6,859 | import {
AuthorizationError,
CreateWarehouseCredentials,
DbtProjectEnvironmentVariable,
getErrorMessage,
NotFoundError,
SupportedDbtVersions,
UnexpectedGitError,
UnexpectedServerError,
} from '@lightdash/common';
import { WarehouseClient } from '@lightdash/warehouses';
import fs from 'fs... | 4 |
clastix/kamaji-console | 31ee834 | src/auth/server/auth.service.ts | TypeScript | www.github.com/clastix/kamaji-console/tree/main/src/auth/server/auth.service.ts | https://raw.githubusercontent.com/clastix/kamaji-console/31ee834/src/auth/server/auth.service.ts | clastix/kamaji-console 31ee834 src/auth/server/auth.service.ts | true | 200 | 1,685 | import { env } from "@/env/server.mjs";
import {
singAccessJWT,
verifyAccessJWT,
singRefreshJWT,
verifyRefreshJWT,
} from "./jwt";
import { Session, User } from "../types";
import { NextApiRequest } from "next";
import { TRPCError } from "@trpc/server";
export interface LoginInput {
email?: string;
passwor... | 1 |
Vinicius-PR/dictionary-web-app | 40b1af7 | src/components/Search/styles.ts | TypeScript | www.github.com/Vinicius-PR/dictionary-web-app/tree/main/src/components/Search/styles.ts | https://raw.githubusercontent.com/Vinicius-PR/dictionary-web-app/40b1af7/src/components/Search/styles.ts | Vinicius-PR/dictionary-web-app 40b1af7 src/components/Search/styles.ts | true | 200 | 1,222 | import styled from "styled-components";
interface SearchContainerProps {
$isemptyerror: boolean
}
export const SearchContainer = styled.section<SearchContainerProps>`
width: 100%;
height: 4rem;
border: 1px solid;
border-radius: 16px;
padding-right: 1.5rem;
background-color: ${props => props.theme.colors... | 3 |
roshni-pro/FinalSaral | 71fbc61 | src/app/supplier/component/supplier-chat/supplier-chat.component.ts | TypeScript | www.github.com/roshni-pro/FinalSaral/tree/main/src/app/supplier/component/supplier-chat/supplier-chat.component.ts | https://raw.githubusercontent.com/roshni-pro/FinalSaral/71fbc61/src/app/supplier/component/supplier-chat/supplier-chat.component.ts | roshni-pro/FinalSaral 71fbc61 src/app/supplier/component/supplier-chat/supplier-chat.component.ts | true | 200 | 2,286 | import { Component, Input, ViewChild, ElementRef, OnInit, ChangeDetectionStrategy, Renderer2, OnChanges, AfterViewInit, EventEmitter, Output } from '@angular/core';
import { SupplierService } from 'app/shared/services/supplier.service';
import { identifierModuleUrl } from '@angular/compiler';
@Component({
selector: ... | 7 |
Majero-Ice/ai-assistant | b950a43 | src/google-api/googleAPI.controller.ts | TypeScript | www.github.com/Majero-Ice/ai-assistant/tree/main/src/google-api/googleAPI.controller.ts | https://raw.githubusercontent.com/Majero-Ice/ai-assistant/b950a43/src/google-api/googleAPI.controller.ts | Majero-Ice/ai-assistant b950a43 src/google-api/googleAPI.controller.ts | true | 200 | 1,416 | import {Controller, Get, Logger, Query, Res} from '@nestjs/common';
import {GoogleAPIService} from "./googleAPI.service";
import {Response} from "express";
@Controller('auth')
export class GoogleAPIController {
private readonly logger = new Logger(GoogleAPIController.name);
constructor(private readonly google... | 4 |
yasmingamil22/PMS | 63e2373 | src/app/employee/employee.module.ts | TypeScript | www.github.com/yasmingamil22/PMS/tree/main/src/app/employee/employee.module.ts | https://raw.githubusercontent.com/yasmingamil22/PMS/63e2373/src/app/employee/employee.module.ts | yasmingamil22/PMS 63e2373 src/app/employee/employee.module.ts | true | 200 | 728 | import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import {DragDropModule} from '@angular/cdk/drag-drop';
import { EmployeeRoutingModule } from './employee-routing.module';
import { EmployeeComponent } from './employee.component';
import { TaskBoardComponent } from './task-board/t... | 1 |
kaysie0919/AngularComponent | 3c42035 | src/app/components/fibonaccigenerator/fibonaccigenerator.component.ts | TypeScript | www.github.com/kaysie0919/AngularComponent/tree/main/src/app/components/fibonaccigenerator/fibonaccigenerator.component.ts | https://raw.githubusercontent.com/kaysie0919/AngularComponent/3c42035/src/app/components/fibonaccigenerator/fibonaccigenerator.component.ts | kaysie0919/AngularComponent 3c42035 src/app/components/fibonaccigenerator/fibonaccigenerator.component.ts | true | 200 | 678 | import { Component } from '@angular/core';
@Component({
selector: 'app-fibonaccigenerator',
templateUrl: './fibonaccigenerator.component.html',
styleUrl: './fibonaccigenerator.component.css'
})
export class FibonaccigeneratorComponent {
n: number | null = null;
fibonacciSequence: number[] = [];
generateFi... | 7 |
YiqunRong/BusinessDayCounter | dfcb0dc | src/index.ts | TypeScript | www.github.com/YiqunRong/BusinessDayCounter/tree/main/src/index.ts | https://raw.githubusercontent.com/YiqunRong/BusinessDayCounter/dfcb0dc/src/index.ts | YiqunRong/BusinessDayCounter dfcb0dc src/index.ts | true | 200 | 662 | //example
import BusinessDayCounter from "./BusinessDayCounter";
import { HolidayRule } from "./HolidayRule";
const businessDayCounter = new BusinessDayCounter();
const firstDate = new Date("2013-10-07");
const secondDate = new Date("2014-01-01");
const holidayList = [
{ type: "fixed", month: 4, day: 25 }, // Anzac D... | 4 |
ProgramistaJarek/inzynierka-frontend | c7479c3 | src/app/home/data-access/home.service.ts | TypeScript | www.github.com/ProgramistaJarek/inzynierka-frontend/tree/main/src/app/home/data-access/home.service.ts | https://raw.githubusercontent.com/ProgramistaJarek/inzynierka-frontend/c7479c3/src/app/home/data-access/home.service.ts | ProgramistaJarek/inzynierka-frontend c7479c3 src/app/home/data-access/home.service.ts | true | 200 | 746 | import { Injectable, inject } from '@angular/core';
import { PatientService, VaccinationsService } from '../../api';
import { UserService } from '../../auth/user.service';
@Injectable({
providedIn: 'root',
})
export class HomeService {
private userService = inject(UserService);
private patientService = inject(Pa... | 3 |
FayrosSky/IFPI-ADS | ca93744 | ADS 2024.1/POO/curso-otavio-miranda/pilares-poo/encapsulamento.ts | TypeScript | www.github.com/FayrosSky/IFPI-ADS/tree/main/ADS 2024.1/POO/curso-otavio-miranda/pilares-poo/encapsulamento.ts | https://raw.githubusercontent.com/FayrosSky/IFPI-ADS/ca93744/ADS%202024.1/POO/curso-otavio-miranda/pilares-poo/encapsulamento.ts | FayrosSky/IFPI-ADS ca93744 ADS 2024.1/POO/curso-otavio-miranda/pilares-poo/encapsulamento.ts | true | 200 | 589 | /*
Visa ocultar partes internas de um objeto e exibir apenas o necessário para uso externo.
geralmento vamos fazer isso com modificadores de acesso(como o private, por exemplo.)
Pode até ser perigoso expor coisas que vc não quer, pois alguém pode mudar um valor que não queremos.
*/
export class RemoteContr... | 1 |
Michelalmeidasilva/api-feira-online-neo4j | b784864 | src/models/Model.ts | TypeScript | www.github.com/Michelalmeidasilva/api-feira-online-neo4j/tree/main/src/models/Model.ts | https://raw.githubusercontent.com/Michelalmeidasilva/api-feira-online-neo4j/b784864/src/models/Model.ts | Michelalmeidasilva/api-feira-online-neo4j b784864 src/models/Model.ts | true | 200 | 603 | import neo4j from 'src/database/index';
//descobrir o padrao do neo4j para retorno e transformar em uma classe
// depois colocar o dado como a classe parametrizada
// class ResultQuery {
// ...{
// data: T
// }
// }
export class Model<T> {
tableName: string;
// resultQuery(data): Promise<T>{
// retur... | 4 |
rafalou38/filmBot | 8bb95b4 | adminPanel/src/electron/database/schemas/quiz.ts | TypeScript | www.github.com/rafalou38/filmBot/tree/main/adminPanel/src/electron/database/schemas/quiz.ts | https://raw.githubusercontent.com/rafalou38/filmBot/8bb95b4/adminPanel/src/electron/database/schemas/quiz.ts | rafalou38/filmBot 8bb95b4 adminPanel/src/electron/database/schemas/quiz.ts | true | 200 | 807 | import { Document, model, Schema, Types } from "mongoose";
interface IQuiz extends Document {
title: string;
description: string;
questions: {
question: string;
answer: string;
}[];
}
const schema = new Schema({
title: {
type: String,
default: "new quiz",
},
... | 7 |
flowercordoba/angular-task | f868dc4 | src/app/core/services/user.service.ts | TypeScript | www.github.com/flowercordoba/angular-task/tree/main/src/app/core/services/user.service.ts | https://raw.githubusercontent.com/flowercordoba/angular-task/f868dc4/src/app/core/services/user.service.ts | flowercordoba/angular-task f868dc4 src/app/core/services/user.service.ts | true | 200 | 3,665 | import { Injectable, } from "@angular/core";
import { environment } from "src/environments/environments";
import { HttpClient, HttpHeaders } from "@angular/common/http";
import { Router } from "@angular/router";
import { UserModel } from "../models/user.model";
import { User } from "src/app/modules/data-table/data-tab... | 1 |
medecins-du-monde/monitool-frontend | e93d069 | src/app/services/download.service.ts | TypeScript | www.github.com/medecins-du-monde/monitool-frontend/tree/main/src/app/services/download.service.ts | https://raw.githubusercontent.com/medecins-du-monde/monitool-frontend/e93d069/src/app/services/download.service.ts | medecins-du-monde/monitool-frontend e93d069 src/app/services/download.service.ts | true | 200 | 3,798 | import { HttpClient } from '@angular/common/http';
import { Injectable, OnDestroy } from '@angular/core';
import { BehaviorSubject, Subscription } from 'rxjs';
import { ProjectService } from './project.service';
import { IndicatorService } from './indicator.service';
import { TranslateService } from '@ngx-translate/cor... | 3 |
leekelleher/umbraco-extension-editor | 10c9c38 | src/Umbraco.Community.ExtensionEditor.Frontend/src/collection/collection.repository.ts | TypeScript | www.github.com/leekelleher/umbraco-extension-editor/tree/main/src/Umbraco.Community.ExtensionEditor.Frontend/src/collection/collection.repository.ts | https://raw.githubusercontent.com/leekelleher/umbraco-extension-editor/10c9c38/src/Umbraco.Community.ExtensionEditor.Frontend/src/collection/collection.repository.ts | leekelleher/umbraco-extension-editor 10c9c38 src/Umbraco.Community.ExtensionEditor.Frontend/src/collection/collection.repository.ts | true | 200 | 894 | import type { UmbCollectionFilterModel, UmbCollectionRepository } from '@umbraco-cms/backoffice/collection';
import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api';
import { UmbRepositoryBase } from '@umbraco-cms/backoffice/repository';
export class UmbxExtensionEditorCollectionRepository exte... | 7 |
rldorado/pokepanda | bc857e3 | src/composables/__tests__/usePagination.test.ts | TypeScript | www.github.com/rldorado/pokepanda/tree/main/src/composables/__tests__/usePagination.test.ts | https://raw.githubusercontent.com/rldorado/pokepanda/bc857e3/src/composables/__tests__/usePagination.test.ts | rldorado/pokepanda bc857e3 src/composables/__tests__/usePagination.test.ts | true | 200 | 2,378 | import { describe, expect, it } from 'vitest'
import { ref, computed, Ref, ComputedRef } from 'vue'
import usePagination, { PaginationConfig } from '../usePagination'
import { DATA_LIMIT as ITEMS_PER_PAGE, DATA_OFFSET as OFFSET } from '@/constants'
describe('usePagination', () => {
const data = Array.from({ length: ... | 4 |
Team-2-bodycare/frontend-buddycare-v1 | 5e84526 | src/pages/signin/styleSignin.ts | TypeScript | www.github.com/Team-2-bodycare/frontend-buddycare-v1/tree/main/src/pages/signin/styleSignin.ts | https://raw.githubusercontent.com/Team-2-bodycare/frontend-buddycare-v1/5e84526/src/pages/signin/styleSignin.ts | Team-2-bodycare/frontend-buddycare-v1 5e84526 src/pages/signin/styleSignin.ts | true | 200 | 2,313 | import styled from "styled-components";
export const SigninImg = styled.img`
width: 20%;
display: flex;
justify-content: center;
align-items: center;
flex-wrap: wrap;
`;
export const SigninHome = styled.img`
width: 7%;
position: absolute;
top: 20px;
left: 35px;
cursor: pointer;
`;
export const Si... | 1 |
nicolasilhe/next-discord-clone | 854f915 | pages/api/socket/direct-messages/[directMessageId].ts | TypeScript | www.github.com/nicolasilhe/next-discord-clone/tree/main/pages/api/socket/direct-messages/[directMessageId].ts | https://raw.githubusercontent.com/nicolasilhe/next-discord-clone/854f915/pages/api/socket/direct-messages/%5BdirectMessageId%5D.ts | nicolasilhe/next-discord-clone 854f915 pages/api/socket/direct-messages/[directMessageId].ts | true | 200 | 4,263 | import { NextApiRequest } from "next";
import { currentProfilePages } from "@/lib/current-profile-pages";
import { db } from "@/lib/db";
import { NextApiResponseServerIo } from "@/types";
import { MemberRole } from "@prisma/client";
export default async function handler(req: NextApiRequest, res: NextApiResponseServer... | 3 |
escritorio-dados/nanowip | 836ddd7 | backend/src/shared/typeorm/migrations/1659985960153-CreateDeliverableTags.ts | TypeScript | www.github.com/escritorio-dados/nanowip/tree/main/backend/src/shared/typeorm/migrations/1659985960153-CreateDeliverableTags.ts | https://raw.githubusercontent.com/escritorio-dados/nanowip/836ddd7/backend/src/shared/typeorm/migrations/1659985960153-CreateDeliverableTags.ts | escritorio-dados/nanowip 836ddd7 backend/src/shared/typeorm/migrations/1659985960153-CreateDeliverableTags.ts | true | 200 | 3,698 | import { MigrationInterface, QueryRunner, Table } from 'typeorm';
export class CreateDeliverableTags1659985960153 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.createTable(
new Table({
name: 'deliverable_tags',
columns: [
... | 4 |
grigori-zagladkin/rts-app-old | 9480422 | client/app/components/AdminScreens/Employees/useEmployees.ts | TypeScript | www.github.com/grigori-zagladkin/rts-app-old/tree/main/client/app/components/AdminScreens/Employees/useEmployees.ts | https://raw.githubusercontent.com/grigori-zagladkin/rts-app-old/9480422/client/app/components/AdminScreens/Employees/useEmployees.ts | grigori-zagladkin/rts-app-old 9480422 client/app/components/AdminScreens/Employees/useEmployees.ts | true | 200 | 2,306 | import { useMutation, useQuery } from '@tanstack/react-query'
import { useRouter } from 'next/router'
import { ChangeEvent, useMemo, useState } from 'react'
import { toastr } from 'react-redux-toastr'
import { ITableItem } from '@/components/UI/AdminTable'
import { useDebounce } from '@/hooks/useDebounce'
import { E... | 7 |
hiredirect/Crudapi | 06523a8 | WHLambda.ts | TypeScript | www.github.com/hiredirect/Crudapi/tree/main/WHLambda.ts | https://raw.githubusercontent.com/hiredirect/Crudapi/06523a8/WHLambda.ts | hiredirect/Crudapi 06523a8 WHLambda.ts | true | 200 | 2,098 | //importing packages
const axios = require("axios");
import * as constants from "./constants"
import { CloudWatchPublishData } from "./CloudWatchPublishData"
const {dbGet} = require('./mongodb_facade');
// handler function to process events whenever function is invoked
exports.lambda_handler = async function (event: ... | 6 |
tonitammi/relaamo-log | 9b5e7f4 | src/lib/scripts/csv.ts | TypeScript | www.github.com/tonitammi/relaamo-log/tree/main/src/lib/scripts/csv.ts | https://raw.githubusercontent.com/tonitammi/relaamo-log/9b5e7f4/src/lib/scripts/csv.ts | tonitammi/relaamo-log 9b5e7f4 src/lib/scripts/csv.ts | true | 200 | 1,032 | const arrayToCsv = (data: any[][], separator: "," | ";" = ","): string => {
return data.map(row => {
return row
.map(String)
.map(x => x.replaceAll('"', '""'))
.map(x => `"${x}"`)
.join(separator)
}).join("\r\n");
}
const download = (content: string, filename: string... | 1 |
ucodkr/vscode-terminal | 014aa4b | src/extension.ts | TypeScript | www.github.com/ucodkr/vscode-terminal/tree/main/src/extension.ts | https://raw.githubusercontent.com/ucodkr/vscode-terminal/014aa4b/src/extension.ts | ucodkr/vscode-terminal 014aa4b src/extension.ts | true | 200 | 2,654 | import * as vscode from 'vscode';
import { SSHTreeProvider } from './sshTreeView';
import { addServer, loadServers, removeServer, getConfigFile, CONFIG_FILE, updateServer } from './store';
const PROMPT_NAME = "Enter Display Name";
const PROMPT_CONNECTION = "Enter Connection String";
export function activate (context... | 2 |
csharpdragon/Graylog_vscode_extension | 204738a | src/graylog.ts | TypeScript | www.github.com/csharpdragon/Graylog_vscode_extension/tree/main/src/graylog.ts | https://raw.githubusercontent.com/csharpdragon/Graylog_vscode_extension/204738a/src/graylog.ts | csharpdragon/Graylog_vscode_extension 204738a src/graylog.ts | true | 200 | 18,131 | import * as vscode from 'vscode';
import { GraylogFileSystemProvider, MyTreeItem } from './fileSystemProvider';
import { DecorationInstanceRenderOptions } from 'vscode';
import { replaceLinebreaks, truncateString,getPathSeparator } from './utils';
import { newFileSource, errorForeground, errorMessageBackground, errorBa... | 3 |
Refactory-Uganda/BT-12-DesignPatterns | 114edfc | The Bridge Pattern/Bridge.ts | TypeScript | www.github.com/Refactory-Uganda/BT-12-DesignPatterns/tree/main/The Bridge Pattern/Bridge.ts | https://raw.githubusercontent.com/Refactory-Uganda/BT-12-DesignPatterns/114edfc/The%20Bridge%20Pattern/Bridge.ts | Refactory-Uganda/BT-12-DesignPatterns 114edfc The Bridge Pattern/Bridge.ts | true | 200 | 3,334 | //Implementation
interface IElectricalEquipment {
powerOn(): void
powerOff(): void
}
//Abstraction
abstract class Switch {
protected equipment: IElectricalEquipment
abstract On():void
abstract Off():void
}
//Concrete Implementations
class Fan implements IElectricalEquipment {
powerOn():void {... | 4 |
crusbz/ms-short-link | 77e10ea | app-microservice/src/short-link/_tests_/click-processor.spec.ts | TypeScript | www.github.com/crusbz/ms-short-link/tree/main/app-microservice/src/short-link/_tests_/click-processor.spec.ts | https://raw.githubusercontent.com/crusbz/ms-short-link/77e10ea/app-microservice/src/short-link/_tests_/click-processor.spec.ts | crusbz/ms-short-link 77e10ea app-microservice/src/short-link/_tests_/click-processor.spec.ts | true | 200 | 1,140 | import { Test, TestingModule } from '@nestjs/testing';
import { ShortLinkService } from '../short-link.service';
import { ClickProcessorService } from '../click-processor.service';
describe('ClickProcessor', () => {
let processor: ClickProcessorService;
let shortLinkService: ShortLinkService;
beforeEach(async (... | 7 |
Phan-Uyen/cswBase | f29320d | cswebapp-fe-ng-tests/tests/specs/COR-402.spec.ts | TypeScript | www.github.com/Phan-Uyen/cswBase/tree/main/cswebapp-fe-ng-tests/tests/specs/COR-402.spec.ts | https://raw.githubusercontent.com/Phan-Uyen/cswBase/f29320d/cswebapp-fe-ng-tests/tests/specs/COR-402.spec.ts | Phan-Uyen/cswBase f29320d cswebapp-fe-ng-tests/tests/specs/COR-402.spec.ts | true | 200 | 2,301 | import { test, expect, chromium, Browser, Page } from "@playwright/test";
import LoginPage from "../pageObjects/login.page";
import DashBoardPage from "../pageObjects/dashboard.page";
import DrillHoleViewPage from "../pageObjects/drillHoleView.page";
let userName: any;
let password: any;
if (process.env.NODE_ENV === "... | 6 |
smilepeggy/Angular-Practices | 00e0255 | routing-start/src/app/users/user/user.component.ts | TypeScript | www.github.com/smilepeggy/Angular-Practices/tree/main/routing-start/src/app/users/user/user.component.ts | https://raw.githubusercontent.com/smilepeggy/Angular-Practices/00e0255/routing-start/src/app/users/user/user.component.ts | smilepeggy/Angular-Practices 00e0255 routing-start/src/app/users/user/user.component.ts | true | 200 | 871 | import { Component, OnInit, OnDestroy } from "@angular/core";
import { ActivatedRoute, Params } from "@angular/router";
import { Subscription } from "rxjs";
@Component({
selector: "app-user",
templateUrl: "./user.component.html",
styleUrls: ["./user.component.css"],
})
export class UserComponent implements OnIni... | 5 |
seanoliver/sort-resort | ddb56d4 | src/util/helpers.ts | TypeScript | www.github.com/seanoliver/sort-resort/tree/main/src/util/helpers.ts | https://raw.githubusercontent.com/seanoliver/sort-resort/ddb56d4/src/util/helpers.ts | seanoliver/sort-resort ddb56d4 src/util/helpers.ts | true | 200 | 517 | /**
* Creates an array of numbers from 1 to the given length
*/
export const createArray = (length: number) => {
const arr = [];
for (let i = 1; i <= length; i++) {
arr.push(i);
}
return arr;
};
/**
* Randomizes the order of an array
*/
export const randomizeArray = (arr: number[]) => {
const newArr = [.... | 1 |
alevalenteee/fletcher-ordersummary-app | 1d28daf | src/hooks/useProfiles.ts | TypeScript | www.github.com/alevalenteee/fletcher-ordersummary-app/tree/main/src/hooks/useProfiles.ts | https://raw.githubusercontent.com/alevalenteee/fletcher-ordersummary-app/1d28daf/src/hooks/useProfiles.ts | alevalenteee/fletcher-ordersummary-app 1d28daf src/hooks/useProfiles.ts | true | 200 | 6,112 | import { useState, useEffect } from 'react';
import { Profile } from '@/types';
import { supabase } from '@/lib/supabase';
export function useProfiles() {
const [profiles, setProfiles] = useState<Profile[]>([]);
const [currentProfile, setCurrentProfile] = useState<Profile | null>(null);
const [loading, setLoadin... | 0 |
R-Maxime/Portfolio | 721539b | Api/src/database/Portfolio/Models/Users.ts | TypeScript | www.github.com/R-Maxime/Portfolio/tree/main/Api/src/database/Portfolio/Models/Users.ts | https://raw.githubusercontent.com/R-Maxime/Portfolio/721539b/Api/src/database/Portfolio/Models/Users.ts | R-Maxime/Portfolio 721539b Api/src/database/Portfolio/Models/Users.ts | true | 200 | 679 | import { Model, Schema } from 'mongoose';
import DBClient from '../../client';
import IUser from '../../../business/Models/Users';
export default class UserModel {
private readonly PortfolioDB: DBClient;
private readonly UserSchema: Schema<IUser>;
constructor(PortfolioDB: DBClient) {
this.PortfolioDB = Por... | 2 |
estanho/ProjetoTecnologico | 8ceba7c | backend/src/trips/trips.module.ts | TypeScript | www.github.com/estanho/ProjetoTecnologico/tree/main/backend/src/trips/trips.module.ts | https://raw.githubusercontent.com/estanho/ProjetoTecnologico/8ceba7c/backend/src/trips/trips.module.ts | estanho/ProjetoTecnologico 8ceba7c backend/src/trips/trips.module.ts | true | 200 | 812 | import { Module } from '@nestjs/common';
import { TripsService } from './trips.service';
import { TripsController } from './trips.controller';
import { TripTimeService } from './services/tripsTime.service';
import { MapsModule } from '../maps/maps.module';
import { TripGenerateService } from './services/tripsGenerate.s... | 3 |
pycusmalaus/mfil-portal | 0e687e1 | ExcelExtract/src/app/app.component.ts | TypeScript | www.github.com/pycusmalaus/mfil-portal/tree/main/ExcelExtract/src/app/app.component.ts | https://raw.githubusercontent.com/pycusmalaus/mfil-portal/0e687e1/ExcelExtract/src/app/app.component.ts | pycusmalaus/mfil-portal 0e687e1 ExcelExtract/src/app/app.component.ts | true | 200 | 2,041 | import { CommonModule } from '@angular/common';
import { Component } from '@angular/core';
import { RouterOutlet } from '@angular/router';
import { FileUploadModule } from 'primeng/fileupload';
import { TableModule } from 'primeng/table';
import * as XLSX from 'xlsx';
@Component({
selector: 'app-root',
standalone:... | 4 |
lou-theo/pimp-my-stocks | 4be629c | apps/pimp-my-stocks/src/app/core/services/indicator/sma.ts | TypeScript | www.github.com/lou-theo/pimp-my-stocks/tree/main/apps/pimp-my-stocks/src/app/core/services/indicator/sma.ts | https://raw.githubusercontent.com/lou-theo/pimp-my-stocks/4be629c/apps/pimp-my-stocks/src/app/core/services/indicator/sma.ts | lou-theo/pimp-my-stocks 4be629c apps/pimp-my-stocks/src/app/core/services/indicator/sma.ts | true | 200 | 1,758 | import { FormBuilder } from '@angular/forms';
import { ChartDailyQuoteModel, unshiftWithNull } from '@sic/commons';
import * as ta from 'ta.web';
import { IndicatorTransformResult } from '../../models/indicator/indicator-transform-result';
import { Indicator } from './indicator';
import { SimpleMovingAverageIndicatorCo... | 7 |
sawansloka/Identity-Reconciliation | 798430d | src/service/order/order.service.ts | TypeScript | www.github.com/sawansloka/Identity-Reconciliation/tree/main/src/service/order/order.service.ts | https://raw.githubusercontent.com/sawansloka/Identity-Reconciliation/798430d/src/service/order/order.service.ts | sawansloka/Identity-Reconciliation 798430d src/service/order/order.service.ts | true | 200 | 1,762 | import { HttpException, HttpStatus, Injectable } from '@nestjs/common';
import { OrderDto } from '../../module/order/order.dto';
import { Order } from '../../service/order/order.schema';
import { InjectRepository } from '@nestjs/typeorm';
import { Repository } from 'typeorm';
import { LinkPrecedence } from 'src/enum';
... | 6 |
matsukky/number | a34a5d9 | index.ts | TypeScript | www.github.com/matsukky/number/tree/main/index.ts | https://raw.githubusercontent.com/matsukky/number/a34a5d9/index.ts | matsukky/number a34a5d9 index.ts | true | 200 | 2,476 | import { AvalaibleLanguage, LanguageData } from './types';
export * as Types from './types'
import en from './locale/en'
export let L = <AvalaibleLanguage> 'en'
export const Ls = {}
Ls[L] = en
function toCapitalize(str: string): string {
return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
}
export... | 5 |
hellosubsonic/superwavy | c2b27dd | packages/chrome-ai/src/embedding-model.test.ts | TypeScript | www.github.com/hellosubsonic/superwavy/tree/main/packages/chrome-ai/src/embedding-model.test.ts | https://raw.githubusercontent.com/hellosubsonic/superwavy/c2b27dd/packages/chrome-ai/src/embedding-model.test.ts | hellosubsonic/superwavy c2b27dd packages/chrome-ai/src/embedding-model.test.ts | true | 200 | 1,407 | import { describe, it, expect, vi } from 'vitest';
import { ChromeAIEmbeddingModel } from './embedding-model';
import { embed } from 'ai';
vi.mock('@mediapipe/tasks-text', async () => ({
FilesetResolver: {
forTextTasks: vi.fn(async () => ({
wasmLoaderPath: 'wasmLoaderPath',
wasmBinaryPath: 'wasmBinar... | 1 |
JamesSleep/team-maker-backend | 9458e1f | src/auth/auth.module.ts | TypeScript | www.github.com/JamesSleep/team-maker-backend/tree/main/src/auth/auth.module.ts | https://raw.githubusercontent.com/JamesSleep/team-maker-backend/9458e1f/src/auth/auth.module.ts | JamesSleep/team-maker-backend 9458e1f src/auth/auth.module.ts | true | 200 | 851 | import { forwardRef, Module } from '@nestjs/common';
import { AuthService } from './auth.service';
import * as dotenv from 'dotenv';
import { TypeOrmModule } from '@nestjs/typeorm';
import { UserRepository } from 'src/users/users.repository';
import { PassportModule } from '@nestjs/passport';
import { JwtModule } from ... | 0 |
TheKeiseur/Projet-Blog-Veille-Techno | be55464 | back/src/controllers/loginController.ts | TypeScript | www.github.com/TheKeiseur/Projet-Blog-Veille-Techno/tree/main/back/src/controllers/loginController.ts | https://raw.githubusercontent.com/TheKeiseur/Projet-Blog-Veille-Techno/be55464/back/src/controllers/loginController.ts | TheKeiseur/Projet-Blog-Veille-Techno be55464 back/src/controllers/loginController.ts | true | 200 | 584 | import {Request, Response} from 'express';
import {getErrorMessage} from "../utils/errors.js";
import * as loginService from '../services/loginService.js';
import {LoginResponseDto} from "../types/LoginResponseDto.js";
export async function loginOne(req: Request, res: Response): Promise<LoginResponseDto | Response> {
... | 2 |
bittricky/rentals | e4eb6e1 | packages/api/scripts/seed.ts | TypeScript | www.github.com/bittricky/rentals/tree/main/packages/api/scripts/seed.ts | https://raw.githubusercontent.com/bittricky/rentals/e4eb6e1/packages/api/scripts/seed.ts | bittricky/rentals e4eb6e1 packages/api/scripts/seed.ts | true | 200 | 1,122 | import { connectDatabase } from "../src/database";
import { listings } from "./listings";
import { users } from "./users";
import { hosts } from "./hosts";
const seed = async () => {
try {
console.log("[seed]: running...");
const db = await connectDatabase();
// Clear existing collections
await db... | 3 |
mannazo/mannazo-nextjs | 53efc4b | hooks/useCreateChatRoom.ts | TypeScript | www.github.com/mannazo/mannazo-nextjs/tree/main/hooks/useCreateChatRoom.ts | https://raw.githubusercontent.com/mannazo/mannazo-nextjs/53efc4b/hooks/useCreateChatRoom.ts | mannazo/mannazo-nextjs 53efc4b hooks/useCreateChatRoom.ts | true | 200 | 1,553 | 'use client'
import { useMutation } from '@tanstack/react-query'
import { createChatRoom } from '@/services/api'
import { useRouter } from 'next/navigation'
import { AxiosResponse } from 'axios'
import { useSession } from 'next-auth/react'
import useChatStore from '@/store/chatStore'
export const useCreateChatRoom = ... | 7 |
emen7/poprev | d8387b6 | client/api/init-db.ts | TypeScript | www.github.com/emen7/poprev/tree/main/client/api/init-db.ts | https://raw.githubusercontent.com/emen7/poprev/d8387b6/client/api/init-db.ts | emen7/poprev d8387b6 client/api/init-db.ts | true | 200 | 880 | import { VercelRequest, VercelResponse } from '@vercel/node';
import { initializeDatabase } from './db-postgres';
// This is a utility endpoint that can be called to initialize the database schema
// In a production app, you might want to protect this with admin authentication
export default async function handler(req... | 4 |
raghavbuzz/angularboilerplate | b3ea83f | src/app/app.module.ts | TypeScript | www.github.com/raghavbuzz/angularboilerplate/tree/main/src/app/app.module.ts | https://raw.githubusercontent.com/raghavbuzz/angularboilerplate/b3ea83f/src/app/app.module.ts | raghavbuzz/angularboilerplate b3ea83f src/app/app.module.ts | true | 200 | 1,397 | import { HttpClientModule } from '@angular/common/http';
import { NgModule } from '@angular/core';
import { MatButtonModule } from '@angular/material/button';
import { BrowserModule } from '@angular/platform-browser';
import { RouterModule } from '@angular/router';
import { AppRoutingModule } from './app-routing.module... | 1 |
asdman384/exp-spsh | 8cc2c22 | src/services/storage/local-storage.service.ts | TypeScript | www.github.com/asdman384/exp-spsh/tree/main/src/services/storage/local-storage.service.ts | https://raw.githubusercontent.com/asdman384/exp-spsh/8cc2c22/src/services/storage/local-storage.service.ts | asdman384/exp-spsh 8cc2c22 src/services/storage/local-storage.service.ts | true | 200 | 748 | import { Injectable } from '@angular/core';
import { StorageService } from './interfaces/storage';
@Injectable()
export class LocalStorageService implements StorageService {
static get<T>(key: string): T | undefined {
let item = localStorage.getItem(key);
if (item) return JSON.parse(item) as T;
return u... | 5 |
lAIAIAl/test | 5ec66c6 | @wac/edu-wechat-share/src/api.ts | TypeScript | www.github.com/lAIAIAl/test/tree/main/@wac/edu-wechat-share/src/api.ts | https://raw.githubusercontent.com/lAIAIAl/test/5ec66c6/%40wac/edu-wechat-share/src/api.ts | lAIAIAl/test 5ec66c6 @wac/edu-wechat-share/src/api.ts | true | 200 | 332 | import axios from './axios'
export const getWechatSignature = (conf = {} as any) => {
conf = {
...conf,
url: conf.url || `${location.origin}/wac/xuexi/api/tripartite/wechat-signature`,
params: {
url: encodeURIComponent(window.location.href.split('#')[0]),
...conf.params,
},
}
return ax... | 2 |
avineshmathur/madirex | 08ab93a | src/app/superadmin/auth/login.component.ts | TypeScript | www.github.com/avineshmathur/madirex/tree/main/src/app/superadmin/auth/login.component.ts | https://raw.githubusercontent.com/avineshmathur/madirex/08ab93a/src/app/superadmin/auth/login.component.ts | avineshmathur/madirex 08ab93a src/app/superadmin/auth/login.component.ts | true | 200 | 2,526 | import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { Router, ActivatedRoute } from '@angular/router';
import { AdminAuthService, CommonService } from '../../_services';
import { Config } from './../../constant';
import { ToastrService } from 'n... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.