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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
becardine/delivery-api | 8fd9d02 | src/modules/deliveryman/use-cases/create-deliveryman/create-deliveryman-use-case.ts | TypeScript | www.github.com/becardine/delivery-api/tree/main/src/modules/deliveryman/use-cases/create-deliveryman/create-deliveryman-use-case.ts | https://raw.githubusercontent.com/becardine/delivery-api/8fd9d02/src/modules/deliveryman/use-cases/create-deliveryman/create-deliveryman-use-case.ts | becardine/delivery-api 8fd9d02 src/modules/deliveryman/use-cases/create-deliveryman/create-deliveryman-use-case.ts | true | 200 | 744 | import { hash } from "bcrypt";
import { prisma } from "../../../../database/prisma-client";
interface ICreateDeliveryman {
username: string;
password: string;
}
export class CreateDeliverymanUseCase {
async execute({ username, password }: ICreateDeliveryman) {
const deliverymanExists = await prisma.client.f... | 0 |
Lstmxx/comic-app | 2ea44fa | apps/server/libs/public-module/src/global/global.module.ts | TypeScript | www.github.com/Lstmxx/comic-app/tree/main/apps/server/libs/public-module/src/global/global.module.ts | https://raw.githubusercontent.com/Lstmxx/comic-app/2ea44fa/apps/server/libs/public-module/src/global/global.module.ts | Lstmxx/comic-app 2ea44fa apps/server/libs/public-module/src/global/global.module.ts | true | 200 | 7,337 | import { APP_PIPE } from '@nestjs/core';
import { Module, DynamicModule, ValidationPipe } from '@nestjs/common';
// import { CacheModule } from '@nestjs/cache-manager';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { ClientsModule } from '@nestjs/microservices';
// import { ServeStaticModule } fr... | 2 |
leandersteiner/project-management-backend | cc64b99 | src/board/board.module.ts | TypeScript | www.github.com/leandersteiner/project-management-backend/tree/main/src/board/board.module.ts | https://raw.githubusercontent.com/leandersteiner/project-management-backend/cc64b99/src/board/board.module.ts | leandersteiner/project-management-backend cc64b99 src/board/board.module.ts | true | 200 | 719 | import { Module } from '@nestjs/common';
import { BoardController } from './board.controller';
import { BoardService } from './board.service';
import { TypeOrmModule } from '@nestjs/typeorm';
import { Board } from './board.entity';
import { BoardColumn } from './board-column.entity';
import { BoardColumnService } from ... | 1 |
digitalfabrik/integreat-app | 4281309 | shared/api/endpoints/__tests__/createFeedbackEndpoint.spec.ts | TypeScript | www.github.com/digitalfabrik/integreat-app/tree/main/shared/api/endpoints/__tests__/createFeedbackEndpoint.spec.ts | https://raw.githubusercontent.com/digitalfabrik/integreat-app/4281309/shared/api/endpoints/__tests__/createFeedbackEndpoint.spec.ts | digitalfabrik/integreat-app 4281309 shared/api/endpoints/__tests__/createFeedbackEndpoint.spec.ts | true | 200 | 3,302 | import {
CATEGORIES_ROUTE,
DISCLAIMER_ROUTE,
EVENTS_ROUTE,
POIS_ROUTE,
SEARCH_ROUTE,
TU_NEWS_TYPE,
} from '../../../routes'
import { API_VERSION } from '../../constants'
import createFeedbackEndpoint, { FeedbackType } from '../createFeedbackEndpoint'
describe('feedback', () => {
const baseUrl = 'https://... | 6 |
saiani1/noctem-user1-FE | 16a3b7e | src/types/cart.d.ts | TypeScript | www.github.com/saiani1/noctem-user1-FE/tree/main/src/types/cart.d.ts | https://raw.githubusercontent.com/saiani1/noctem-user1-FE/16a3b7e/src/types/cart.d.ts | saiani1/noctem-user1-FE 16a3b7e src/types/cart.d.ts | true | 200 | 1,205 | export interface ICart {
index: number;
cartId: number;
sizeId: number;
qty: number;
cupType: string;
myPersonalOptionList?: IPersonalOptions;
}
export interface IData {
sizeId: number;
cartId: number;
menuId: number;
qty: number;
menuName: string;
menuEngName: string;
menuImg: string;
temp... | 0 |
antonRoyenko/sei-space-bot | 0364e79 | bot/src/middlewares/setupSession.middleware.ts | TypeScript | www.github.com/antonRoyenko/sei-space-bot/tree/main/bot/src/middlewares/setupSession.middleware.ts | https://raw.githubusercontent.com/antonRoyenko/sei-space-bot/0364e79/bot/src/middlewares/setupSession.middleware.ts | antonRoyenko/sei-space-bot 0364e79 bot/src/middlewares/setupSession.middleware.ts | true | 200 | 492 | import { Middleware, session } from "grammy";
import { RedisAdapter } from "@grammyjs/storage-redis";
import { connection } from "@bot/redis";
import { Context } from "@bot/types";
const storage = new RedisAdapter({
instance: connection,
});
export const middleware = (): Middleware<Context> =>
session({
init... | 4 |
prismistim/r1-gcc-holder | a66658e | src/composables/useStore.ts | TypeScript | www.github.com/prismistim/r1-gcc-holder/tree/main/src/composables/useStore.ts | https://raw.githubusercontent.com/prismistim/r1-gcc-holder/a66658e/src/composables/useStore.ts | prismistim/r1-gcc-holder a66658e src/composables/useStore.ts | true | 200 | 2,481 | import { onMounted } from 'vue'
import type { StoredData, StoredDataItem } from '../types/storedData'
const targetLocalStorageKey = 'data'
export const useStore = () => {
onMounted(() => {
if (!getStoredData()) {
initStore()
}
})
const initStore = () => {
localStorage.setItem(
targetLoc... | 2 |
GuilhermeDelfino/ContactsNest | 2479cf1 | src/app/useCases/CreateContact.ts | TypeScript | www.github.com/GuilhermeDelfino/ContactsNest/tree/main/src/app/useCases/CreateContact.ts | https://raw.githubusercontent.com/GuilhermeDelfino/ContactsNest/2479cf1/src/app/useCases/CreateContact.ts | GuilhermeDelfino/ContactsNest 2479cf1 src/app/useCases/CreateContact.ts | true | 200 | 376 | import { Injectable } from '@nestjs/common';
import { IRepositoryContact } from '../repositories/contact.repository';
import { Contact } from '../entities/Contact';
@Injectable()
export class CreateContact {
constructor(private readonly repository: IRepositoryContact) {}
execute(contact: Contact): Promise<void> {... | 1 |
nachomoyano621/nachogame | c816a15 | src/Scenas/WinScene.ts | TypeScript | www.github.com/nachomoyano621/nachogame/tree/main/src/Scenas/WinScene.ts | https://raw.githubusercontent.com/nachomoyano621/nachogame/c816a15/src/Scenas/WinScene.ts | nachomoyano621/nachogame c816a15 src/Scenas/WinScene.ts | true | 200 | 1,577 | import { Container, Sprite, Texture, Text, TextStyle, Application } from 'pixi.js';
import { Keyboard } from '../utils/Keyboard';
import { StartScene } from './StartScene';
export class WinScene extends Container {
private app: Application;
constructor(app: Application) {
super();
this.app = app... | 0 |
KMLing/StudentRegister-Angular-Spring | cea77d2 | student-client/src/app/create-student/create-student.component.ts | TypeScript | www.github.com/KMLing/StudentRegister-Angular-Spring/tree/main/student-client/src/app/create-student/create-student.component.ts | https://raw.githubusercontent.com/KMLing/StudentRegister-Angular-Spring/cea77d2/student-client/src/app/create-student/create-student.component.ts | KMLing/StudentRegister-Angular-Spring cea77d2 student-client/src/app/create-student/create-student.component.ts | true | 200 | 1,002 | import { SuccessAlertComponent } from './../success-alert/success-alert.component';
import { StudentService } from './../student.service';
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { Student } from '../student';
@Component({
selector: 'app-create-student',
t... | 4 |
replace-everything/api-new | d771b05 | src/invoices/invoices.service.ts | TypeScript | www.github.com/replace-everything/api-new/tree/main/src/invoices/invoices.service.ts | https://raw.githubusercontent.com/replace-everything/api-new/d771b05/src/invoices/invoices.service.ts | replace-everything/api-new d771b05 src/invoices/invoices.service.ts | true | 200 | 1,318 | import { Repository } from 'typeorm';
import { InjectRepository } from '@nestjs/typeorm';
import { Injectable, InternalServerErrorException } from '@nestjs/common';
import { Invoice } from './entities/invoice.entity';
import { PaginationPipe } from '../common/pipes/pagination.pipe';
@Injectable()
export class Invoices... | 6 |
PO-KO/danocima | 39fe31e | src/types/types.ts | TypeScript | www.github.com/PO-KO/danocima/tree/main/src/types/types.ts | https://raw.githubusercontent.com/PO-KO/danocima/39fe31e/src/types/types.ts | PO-KO/danocima 39fe31e src/types/types.ts | true | 200 | 1,078 | export type ItemsListTypes = {
data: {
id: number;
poster_path: string;
title: string;
overview: string;
original_language: string;
vote_average: number;
release_date?: string;
first_air_date?: string | number | Date | undefined;
genre_ids: (number | string)[];
}[];
heading: st... | 1 |
ahmadabdulkadir245/daulolinmu-org | 014a6b5 | theme.ts | TypeScript | www.github.com/ahmadabdulkadir245/daulolinmu-org/tree/main/theme.ts | https://raw.githubusercontent.com/ahmadabdulkadir245/daulolinmu-org/014a6b5/theme.ts | ahmadabdulkadir245/daulolinmu-org 014a6b5 theme.ts | true | 200 | 1,285 | import {buildLegacyTheme} from 'sanity'
const props = {
"--my-white": "#fff",
"--my-black": "#1a1a1a",
"--dualolinmu-brand": "#f7ab0a",
"--my-red": "#db4437",
"--my-yellow": "#f4b400",
"--my-green": "#0f9d50",
}
export const myTheme = buildLegacyTheme({
// Base theme colors
"--black":... | 0 |
SebastianAndrango/sistema-examenes-frontend | b7a67f0 | src/app/pages/user/sidebar/sidebar.component.ts | TypeScript | www.github.com/SebastianAndrango/sistema-examenes-frontend/tree/main/src/app/pages/user/sidebar/sidebar.component.ts | https://raw.githubusercontent.com/SebastianAndrango/sistema-examenes-frontend/b7a67f0/src/app/pages/user/sidebar/sidebar.component.ts | SebastianAndrango/sistema-examenes-frontend b7a67f0 src/app/pages/user/sidebar/sidebar.component.ts | true | 200 | 796 | import { Component, OnInit } from '@angular/core';
import { MatSnackBar } from '@angular/material/snack-bar';
import { CategoryService } from 'src/app/services/category.service';
@Component({
selector: 'app-sidebar-user',
templateUrl: './sidebar.component.html',
styleUrls: ['./sidebar.component.css'],
})
export ... | 4 |
SimonInform/felios-optimizer-admin | 80ea4ea | hooks/use-language.ts | TypeScript | www.github.com/SimonInform/felios-optimizer-admin/tree/main/hooks/use-language.ts | https://raw.githubusercontent.com/SimonInform/felios-optimizer-admin/80ea4ea/hooks/use-language.ts | SimonInform/felios-optimizer-admin 80ea4ea hooks/use-language.ts | true | 200 | 1,721 | import dictDe from '@/dictionaries/de.json';
import { LANGUAGE } from '@/types/enums';
interface IAppLanguage {
appLanguage: LANGUAGE
setAppLanguage: (language: LANGUAGE) => void
getString: (key: string, data?: unknown) => string
}
/**
* Wrapper function for changing the current App display language
* @returns {... | 7 |
adamcaseyclark/react-calculator | 040effc | code/cypress/e2e/equals/operator-only/division.cy.ts | TypeScript | www.github.com/adamcaseyclark/react-calculator/tree/main/code/cypress/e2e/equals/operator-only/division.cy.ts | https://raw.githubusercontent.com/adamcaseyclark/react-calculator/040effc/code/cypress/e2e/equals/operator-only/division.cy.ts | adamcaseyclark/react-calculator 040effc code/cypress/e2e/equals/operator-only/division.cy.ts | true | 200 | 1,810 | import { LocatorConstants } from "../../../constants/locators";
import { MessageConstants } from "../../../constants/messages";
describe("Equals Key Functionality - Operator Only", () => {
beforeEach(() => {
cy.visit("http://localhost:3000/");
cy.get(LocatorConstants.DISPLAYED_VALUE).then(($displayAfterLoadi... | 1 |
urban-toolkit/curio | e139973 | frontend/utk-workflow/src/utk-ts/src/data-api.ts | TypeScript | www.github.com/urban-toolkit/curio/tree/main/frontend/utk-workflow/src/utk-ts/src/data-api.ts | https://raw.githubusercontent.com/urban-toolkit/curio/e139973/frontend/utk-workflow/src/utk-ts/src/data-api.ts | urban-toolkit/curio e139973 frontend/utk-workflow/src/utk-ts/src/data-api.ts | true | 200 | 9,281 | import { Environment } from './environment';
import { DataLoader } from './data-loader';
import { ICameraData, ILayerFeature, ILayerData, IMapStyle, IMasterGrammar, IMapGrammar, IPlotGrammar, IJoinedJson, IExternalJoinedJson } from './interfaces';
import { ServerlessApi } from './serverless-api';
export abstract clas... | 6 |
ecoulson/RestaurantTracking | 044f692 | src/services/Organization/OrganizationAccount/OrganizationAccountVerificationStrategy.ts | TypeScript | www.github.com/ecoulson/RestaurantTracking/tree/main/src/services/Organization/OrganizationAccount/OrganizationAccountVerificationStrategy.ts | https://raw.githubusercontent.com/ecoulson/RestaurantTracking/044f692/src/services/Organization/OrganizationAccount/OrganizationAccountVerificationStrategy.ts | ecoulson/RestaurantTracking 044f692 src/services/Organization/OrganizationAccount/OrganizationAccountVerificationStrategy.ts | true | 200 | 1,861 | import IVerificationStrategy from "../../User/Verification/IVerificationStrategy";
import UserBroker from "../../../brokers/UserBroker";
import ITokenService from "../../Token/ITokenService";
import TokenBroker from "../../../brokers/TokenBroker";
import Scope from "../../Token/Scope";
export default class Organizatio... | 5 |
Ramya-V/Memory-Box | ac65875 | src/app/components/memory-item/memory-item.component.ts | TypeScript | www.github.com/Ramya-V/Memory-Box/tree/main/src/app/components/memory-item/memory-item.component.ts | https://raw.githubusercontent.com/Ramya-V/Memory-Box/ac65875/src/app/components/memory-item/memory-item.component.ts | Ramya-V/Memory-Box ac65875 src/app/components/memory-item/memory-item.component.ts | true | 200 | 557 | import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core';
import { memory } from '../../schema/memory';
@Component({
selector: 'app-memory-item',
templateUrl: './memory-item.component.html',
styleUrls: ['./memory-item.component.scss'],
})
export class MemoryItemComponent implements OnInit {... | 0 |
gunerkaanalkim/pubs | ac7a5cd | src/publisher/publisher.ts | TypeScript | www.github.com/gunerkaanalkim/pubs/tree/main/src/publisher/publisher.ts | https://raw.githubusercontent.com/gunerkaanalkim/pubs/ac7a5cd/src/publisher/publisher.ts | gunerkaanalkim/pubs ac7a5cd src/publisher/publisher.ts | true | 200 | 1,297 | import Eventbus from '../eventbus/eventbus';
import Subsciber from '../subscriber/subsciber';
interface PublisherOption {
topic: string;
state: any;
}
export default class Publisher {
private readonly _topic: string;
private _state: any = undefined;
private _eventbus?: Eventbus;
constructor(option: Publi... | 4 |
razcan/ctr_b_prisma | ec5cea4 | src/contractFinancialDetail/entities/contractFinancialDetail.entity.ts | TypeScript | www.github.com/razcan/ctr_b_prisma/tree/main/src/contractFinancialDetail/entities/contractFinancialDetail.entity.ts | https://raw.githubusercontent.com/razcan/ctr_b_prisma/ec5cea4/src/contractFinancialDetail/entities/contractFinancialDetail.entity.ts | razcan/ctr_b_prisma ec5cea4 src/contractFinancialDetail/entities/contractFinancialDetail.entity.ts | true | 200 | 2,066 |
import {Currency} from '../../currency/entities/currency.entity'
import {MeasuringUnit} from '../../measuringUnit/entities/measuringUnit.entity'
import {PaymentType} from '../../paymentType/entities/paymentType.entity'
import {Bank} from '../../bank/entities/bank.entity'
import {ContractItems} from '../../contractItem... | 2 |
WVU-CS230-2022-08-Group06/recipe-website | a90d954 | src/app/auth/moderator-guard.ts | TypeScript | www.github.com/WVU-CS230-2022-08-Group06/recipe-website/tree/main/src/app/auth/moderator-guard.ts | https://raw.githubusercontent.com/WVU-CS230-2022-08-Group06/recipe-website/a90d954/src/app/auth/moderator-guard.ts | WVU-CS230-2022-08-Group06/recipe-website a90d954 src/app/auth/moderator-guard.ts | true | 200 | 1,484 | import { Injectable } from "@angular/core";
import { CanActivate, Router } from "@angular/router";
import { AuthService } from "./auth.service";
/*
This class is CRITICAL to only allow moderators to access certain parts of the app
The main ability of a moderator is to review and accept/reject recipe submissions
This ... | 7 |
jackeburton/note-to-self | f1db0b8 | backend/types/routeTypes.ts | TypeScript | www.github.com/jackeburton/note-to-self/tree/main/backend/types/routeTypes.ts | https://raw.githubusercontent.com/jackeburton/note-to-self/f1db0b8/backend/types/routeTypes.ts | jackeburton/note-to-self f1db0b8 backend/types/routeTypes.ts | true | 200 | 549 | type APISuccessResponse = {
success: true;
responseString: string;
};
type APIErrorResponse = {
success: false;
responseString: string;
};
type APIResponseWithData = {
success: true;
responseData: any;
};
type APIResponse = APISuccessResponse | APIErrorResponse;
type APIDataResponse = APIResp... | 6 |
vscode1111/mapbul-pub | 89c8114 | packages/server/src/api/regionPermissions/regionPermissions.service.ts | TypeScript | www.github.com/vscode1111/mapbul-pub/tree/main/packages/server/src/api/regionPermissions/regionPermissions.service.ts | https://raw.githubusercontent.com/vscode1111/mapbul-pub/89c8114/packages/server/src/api/regionPermissions/regionPermissions.service.ts | vscode1111/mapbul-pub 89c8114 packages/server/src/api/regionPermissions/regionPermissions.service.ts | true | 200 | 3,017 | import { IBaseService, TID, IOkPacket } from 'interfaces';
import { dbConnectionSingleton } from '@mapbul-pub/common';
import { IDbConnection, PageContent, IRegionPermissionDTO, IGetAllQuery } from '@mapbul-pub/types';
export class RegionPermissionsService implements IBaseService<IRegionPermissionDTO> {
constructor(... | 5 |
ttndevfullstack/chitchat-call-chat-realtime | 945cfae | chitchat-server-training/src/user/role/role.guard.ts | TypeScript | www.github.com/ttndevfullstack/chitchat-call-chat-realtime/tree/main/chitchat-server-training/src/user/role/role.guard.ts | https://raw.githubusercontent.com/ttndevfullstack/chitchat-call-chat-realtime/945cfae/chitchat-server-training/src/user/role/role.guard.ts | ttndevfullstack/chitchat-call-chat-realtime 945cfae chitchat-server-training/src/user/role/role.guard.ts | true | 200 | 1,354 | import {
Injectable,
CanActivate,
ExecutionContext,
ForbiddenException,
} from '@nestjs/common';
import { Reflector } from '@nestjs/core';
import { JwtService } from '@nestjs/jwt';
import { Request } from 'express';
import { ROLES_KEY } from './role.decorator';
import { Role } from './role.enum';
@... | 1 |
daviddevial/zapp | 4b503a4 | src/entities/issues.ts | TypeScript | www.github.com/daviddevial/zapp/tree/main/src/entities/issues.ts | https://raw.githubusercontent.com/daviddevial/zapp/4b503a4/src/entities/issues.ts | daviddevial/zapp 4b503a4 src/entities/issues.ts | true | 200 | 1,609 | import { GraphQLError } from "graphql";
import { DBIssue, Issue, IssueType, Product } from "../types";
import { logger } from "../utils/logger";
import { getProductById } from "./products";
import { query } from "../utils/database";
import crypto from "crypto";
// Function to get all issues
export async function getIs... | 4 |
ShivamMalaviya1/online-court | 5375470 | src/app/components/complaints-screen/complaints-screen.component.ts | TypeScript | www.github.com/ShivamMalaviya1/online-court/tree/main/src/app/components/complaints-screen/complaints-screen.component.ts | https://raw.githubusercontent.com/ShivamMalaviya1/online-court/5375470/src/app/components/complaints-screen/complaints-screen.component.ts | ShivamMalaviya1/online-court 5375470 src/app/components/complaints-screen/complaints-screen.component.ts | true | 200 | 3,231 | import { Component, OnInit } from '@angular/core';
import { FormBuilder } from '@angular/forms';
import { CommonService } from 'src/services/common.service';
import { ToastrService } from 'ngx-toastr';
@Component({
selector: 'app-complaints-screen',
templateUrl: './complaints-screen.component.html',
styl... | 0 |
alchemyplatform/aa-sdk | f4e8533 | account-kit/react/src/tailwind/types.ts | TypeScript | www.github.com/alchemyplatform/aa-sdk/tree/main/account-kit/react/src/tailwind/types.ts | https://raw.githubusercontent.com/alchemyplatform/aa-sdk/f4e8533/account-kit/react/src/tailwind/types.ts | alchemyplatform/aa-sdk f4e8533 account-kit/react/src/tailwind/types.ts | true | 200 | 1,788 | import { type PluginAPI } from "tailwindcss/types/config";
export type ColorVariant = "dark" | "light";
export type ColorVariantRecord = Record<ColorVariant, string>;
export interface AccountKitTheme {
colors: {
active: ColorVariantRecord;
static: ColorVariantRecord;
critical: ColorVariantRecord;
/... | 2 |
mcosand/tiger-challenge | 8f673d6 | src/lib/formatting.ts | TypeScript | www.github.com/mcosand/tiger-challenge/tree/main/src/lib/formatting.ts | https://raw.githubusercontent.com/mcosand/tiger-challenge/8f673d6/src/lib/formatting.ts | mcosand/tiger-challenge 8f673d6 src/lib/formatting.ts | true | 200 | 375 | import { intervalToDuration } from 'date-fns';
export function formatDuration(ms: number) {
const duration = intervalToDuration({ start: 0, end: ms })
const zeroPad = (num: number|undefined) => String(num).padStart(2, '0');
return [
duration.hours,
duration.minutes,
duration.seconds,
]... | 7 |
juixer/typescript-module-1 | 45d736d | module2/src/2.11Utility_types.ts | TypeScript | www.github.com/juixer/typescript-module-1/tree/main/module2/src/2.11Utility_types.ts | https://raw.githubusercontent.com/juixer/typescript-module-1/45d736d/module2/src/2.11Utility_types.ts | juixer/typescript-module-1 45d736d module2/src/2.11Utility_types.ts | true | 200 | 1,414 | {
// Utility Types
// Pick == type pick kora
// Omit == type bad dia
// Required == type required korai dei
// Partial == opposite of required optional banai dibe type gula
// Readonly == type readonly korai dei
// Record == record dia properties and type dynamic kora jai
type Person =... | 6 |
quasar73/Quetta | 1bb0cda | Quetta.Web/ClientApp/src/app/messenger/messenger.module.ts | TypeScript | www.github.com/quasar73/Quetta/tree/main/Quetta.Web/ClientApp/src/app/messenger/messenger.module.ts | https://raw.githubusercontent.com/quasar73/Quetta/1bb0cda/Quetta.Web/ClientApp/src/app/messenger/messenger.module.ts | quasar73/Quetta 1bb0cda Quetta.Web/ClientApp/src/app/messenger/messenger.module.ts | true | 200 | 683 | import { SidebarModule } from './sidebar/sidebar.module';
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { MessengerRoutingModule } from './messenger-routing.module';
import { TranslocoModule, TRANSLOCO_SCOPE } from '@ngneat/transloco';
import { EmptyChatComponent } fr... | 5 |
ashutoshofficial25/backend | b89d26f | src/routes/message.routes.ts | TypeScript | www.github.com/ashutoshofficial25/backend/tree/main/src/routes/message.routes.ts | https://raw.githubusercontent.com/ashutoshofficial25/backend/b89d26f/src/routes/message.routes.ts | ashutoshofficial25/backend b89d26f src/routes/message.routes.ts | true | 200 | 323 | import { Router } from 'express';
import { getMessages, sendMessage } from '../controller/message.controller.js';
import { checkAuth } from '../middlewares/auth.middleware.js';
const router = Router();
router.use(checkAuth);
router.post('/', sendMessage);
router.get('/:contactId', getMessages);
export default route... | 1 |
aguzbruno/github-challenge | 58c3812 | src/app/hooks/useFetchUserDetails.ts | TypeScript | www.github.com/aguzbruno/github-challenge/tree/main/src/app/hooks/useFetchUserDetails.ts | https://raw.githubusercontent.com/aguzbruno/github-challenge/58c3812/src/app/hooks/useFetchUserDetails.ts | aguzbruno/github-challenge 58c3812 src/app/hooks/useFetchUserDetails.ts | true | 200 | 852 | import { useState, useEffect } from 'react';
import { getUserDetails } from '../api';
import { UserDetails as UserDetailsType } from '../types';
export function useFetchUserDetails(username: string) {
const [user, setUser] = useState<UserDetailsType>();
const [loading, setLoading] = useState<boolean>(true);
cons... | 0 |
taniro/crudangularprodutos | a1d2bbf | src/app/app.routes.ts | TypeScript | www.github.com/taniro/crudangularprodutos/tree/main/src/app/app.routes.ts | https://raw.githubusercontent.com/taniro/crudangularprodutos/a1d2bbf/src/app/app.routes.ts | taniro/crudangularprodutos a1d2bbf src/app/app.routes.ts | true | 200 | 419 | import { Routes } from '@angular/router';
import { FormProdutosComponent } from './produtos/form-produtos/form-produtos.component';
export const routes: Routes = [
{
path: 'produtos',
loadComponent: () =>
import('./produtos/lista-produtos/lista-produtos.component').then(
(m) => m.ListaProdutosC... | 4 |
ducan2210/LacDauStore-API | afb619b | src/routes/address.route.ts | TypeScript | www.github.com/ducan2210/LacDauStore-API/tree/main/src/routes/address.route.ts | https://raw.githubusercontent.com/ducan2210/LacDauStore-API/afb619b/src/routes/address.route.ts | ducan2210/LacDauStore-API afb619b src/routes/address.route.ts | true | 200 | 599 | import express from 'express';
import {
createAddress,
deleteAddress,
getAddressByUserId,
updateAddress,
updateDefaultAddress,
} from '../controllers/address.controller';
import {authenticateToken} from '../middleware/auth.middleware';
const router = express.Router();
router.get('/GetAddressByUserId', getAd... | 2 |
fmiguezo/Laboratorio3 | 94ab1fe | ejercicio_gimnasio/src/actividad.ts | TypeScript | www.github.com/fmiguezo/Laboratorio3/tree/main/ejercicio_gimnasio/src/actividad.ts | https://raw.githubusercontent.com/fmiguezo/Laboratorio3/94ab1fe/ejercicio_gimnasio/src/actividad.ts | fmiguezo/Laboratorio3 94ab1fe ejercicio_gimnasio/src/actividad.ts | true | 200 | 918 | export default class Actividad {
private nombre: string;
private descripcion: string;
private precio: number;
private instructor: string;
private dias: string[];
private horarios: string[];
constructor(
nombre: string,
descripcion: string,
precio: number,
instructor: string,
dias: str... | 7 |
gioivieira/projeto-labesystem-back-end | 4ef9d78 | src/database/class/Student.ts | TypeScript | www.github.com/gioivieira/projeto-labesystem-back-end/tree/main/src/database/class/Student.ts | https://raw.githubusercontent.com/gioivieira/projeto-labesystem-back-end/4ef9d78/src/database/class/Student.ts | gioivieira/projeto-labesystem-back-end 4ef9d78 src/database/class/Student.ts | true | 200 | 401 | import Person from "./Person"
export type TStudent = {
id: string,
name: string,
email: string,
birth_date: Date,
class_id: string,
class: string,
hobbies: string[]
}
export default class Student extends Person {
constructor (id: string, name: string, email: string, birth_date: Date, c... | 6 |
baka656/AWS_Smart_Home | ebd7549 | src/app/dashboard-auth.service.spec.ts | TypeScript | www.github.com/baka656/AWS_Smart_Home/tree/main/src/app/dashboard-auth.service.spec.ts | https://raw.githubusercontent.com/baka656/AWS_Smart_Home/ebd7549/src/app/dashboard-auth.service.spec.ts | baka656/AWS_Smart_Home ebd7549 src/app/dashboard-auth.service.spec.ts | true | 200 | 393 | import { TestBed } from '@angular/core/testing';
import { DashboardAuthService } from './dashboard-auth.service';
describe('DashboardAuthService', () => {
let service: DashboardAuthService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(DashboardAuthService);
});
it(... | 5 |
euClaudioFilho/nearby-app | 60a6a3c | nearby-app/src/components/category/styles.ts | TypeScript | www.github.com/euClaudioFilho/nearby-app/tree/main/nearby-app/src/components/category/styles.ts | https://raw.githubusercontent.com/euClaudioFilho/nearby-app/60a6a3c/nearby-app/src/components/category/styles.ts | euClaudioFilho/nearby-app 60a6a3c nearby-app/src/components/category/styles.ts | true | 200 | 767 | import { StyleSheet } from "react-native"
import { colors, fontFamily } from "@/styles/theme"
export const s = StyleSheet.create({
container: {
height: 36,
backgroundColor: colors.gray[100],
borderWidth: 1,
borderColor: colors.gray[300],
borderRadius: 8,
ju... | 1 |
chularecords/angular-bases | 6b11a84 | src/app/dbz/components/add-character/add-character.component.ts | TypeScript | www.github.com/chularecords/angular-bases/tree/main/src/app/dbz/components/add-character/add-character.component.ts | https://raw.githubusercontent.com/chularecords/angular-bases/6b11a84/src/app/dbz/components/add-character/add-character.component.ts | chularecords/angular-bases 6b11a84 src/app/dbz/components/add-character/add-character.component.ts | true | 200 | 725 | import { Component, EventEmitter, Output } from '@angular/core';
import { Character } from '../../interfaces/character.interface';
@Component({
selector: 'dbz-add-character',
templateUrl: './add-character.component.html',
styleUrl: './add-character.component.css'
})
export class AddCharacterComponent {
@Outpu... | 3 |
Jackpkn/CodeChunkingAmoYou | a6d7355 | src/index.ts | TypeScript | www.github.com/Jackpkn/CodeChunkingAmoYou/tree/main/src/index.ts | https://raw.githubusercontent.com/Jackpkn/CodeChunkingAmoYou/a6d7355/src/index.ts | Jackpkn/CodeChunkingAmoYou a6d7355 src/index.ts | true | 200 | 2,666 | import * as path from 'path';
import { ChunkingService } from './services/ChunkingService';
import { logger } from './utils/logger';
import { FolderChunk } from './chunker';
async function main() {
try {
// Initialize the chunking service
const chunkingService = new ChunkingService();
await... | 0 |
vlozhkov/simpleshow-challenge | 79c97af | src/app/feature/search/search.module.ts | TypeScript | www.github.com/vlozhkov/simpleshow-challenge/tree/main/src/app/feature/search/search.module.ts | https://raw.githubusercontent.com/vlozhkov/simpleshow-challenge/79c97af/src/app/feature/search/search.module.ts | vlozhkov/simpleshow-challenge 79c97af src/app/feature/search/search.module.ts | true | 200 | 755 | import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { SearchResultsComponent } from './search-results/search-results.component';
import { SearchBarComponent } from './search-bar/search-bar.component';
import { SearchComponent } ... | 4 |
viniciusflv/viniciusflv.github.io | 768a97e | src/util.ts | TypeScript | www.github.com/viniciusflv/viniciusflv.github.io/tree/main/src/util.ts | https://raw.githubusercontent.com/viniciusflv/viniciusflv.github.io/768a97e/src/util.ts | viniciusflv/viniciusflv.github.io 768a97e src/util.ts | true | 200 | 2,461 | import type { MarkdownHeading, MarkdownInstance } from 'astro';
import { TRANSLATIONS } from './consts';
export const translateBreadcrumbs = (lang: string, value: string) =>
lang !== 'en'
? {
home: `Início`,
posts: `Postagens`,
about: `Sobre`,
'library-creation': `Criação de Bibl... | 2 |
PrgDominique/Javascript | 7ffa898 | leet/addTwoNumbers.ts | TypeScript | www.github.com/PrgDominique/Javascript/tree/main/leet/addTwoNumbers.ts | https://raw.githubusercontent.com/PrgDominique/Javascript/7ffa898/leet/addTwoNumbers.ts | PrgDominique/Javascript 7ffa898 leet/addTwoNumbers.ts | true | 200 | 1,197 | class ListNode {
val: number
next: ListNode | null
constructor(val?: number, next?: ListNode | null) {
this.val = (val===undefined ? 0 : val)
this.next = (next===undefined ? null : next)
}
}
function addTwoNumbers(l1: ListNode | null, l2: ListNode... | 7 |
vmolero/stock-control-api | aef00a7 | src/services/BootstrapService.ts | TypeScript | www.github.com/vmolero/stock-control-api/tree/main/src/services/BootstrapService.ts | https://raw.githubusercontent.com/vmolero/stock-control-api/aef00a7/src/services/BootstrapService.ts | vmolero/stock-control-api aef00a7 src/services/BootstrapService.ts | true | 200 | 1,093 | import config from '../config.ts'
import DatabaseService from './DatabaseService.ts'
import log from './LogService.ts'
import RetryService from './RetryService.ts'
import RedisKeyValueService from './storage/RedisKeyValueService.ts'
async function checkKeyValueStorage() {
switch (config.app.keyValueStore) {
case... | 5 |
RAF-SI-2023/Banka-1-Frontend | 9f24cfd | src/app/service/jwt.service.ts | TypeScript | www.github.com/RAF-SI-2023/Banka-1-Frontend/tree/main/src/app/service/jwt.service.ts | https://raw.githubusercontent.com/RAF-SI-2023/Banka-1-Frontend/9f24cfd/src/app/service/jwt.service.ts | RAF-SI-2023/Banka-1-Frontend 9f24cfd src/app/service/jwt.service.ts | true | 200 | 331 | import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class JwtService {
constructor() { }
/**
* Basic token validation.
* @param token string that is checked if it has a JWT format
*/
isTokenFormatValid(token: string): boolean {
return token.split(".").length ==... | 6 |
sensecoder/MQL5SourcesTemplatesVSCodeExtension | fd98847 | src/modules/settings.ts | TypeScript | www.github.com/sensecoder/MQL5SourcesTemplatesVSCodeExtension/tree/main/src/modules/settings.ts | https://raw.githubusercontent.com/sensecoder/MQL5SourcesTemplatesVSCodeExtension/fd98847/src/modules/settings.ts | sensecoder/MQL5SourcesTemplatesVSCodeExtension fd98847 src/modules/settings.ts | true | 200 | 1,030 | import { INamedValues } from "./template/interfaces";
export class Settings implements INamedValues {
private valuesMap: Map<string, any> | undefined;
constructor(settingsObject: any) {
this.setAsObject(settingsObject);
}
public getByName(name: string): any | undefined {
if (!this.valuesMap) ... | 1 |
1610ayush/music-app | fd03909 | lib/formatters.ts | TypeScript | www.github.com/1610ayush/music-app/tree/main/lib/formatters.ts | https://raw.githubusercontent.com/1610ayush/music-app/fd03909/lib/formatters.ts | 1610ayush/music-app fd03909 lib/formatters.ts | true | 200 | 320 | import formatDuration from "format-duration";
export const formatTime = (timeInSeconds = 0) => {
return formatDuration(timeInSeconds * 1000)
}
export const formatDate = (date: Date) => {
return date.toLocaleDateString('en-US', {
year: "numeric",
month: "short",
day: "numeric",
})
} | 3 |
MicoBlanc/Chipster | f4dc0d6 | packages/chipster/src/__tests__/e2e/basic.spec.ts | TypeScript | www.github.com/MicoBlanc/Chipster/tree/main/packages/chipster/src/__tests__/e2e/basic.spec.ts | https://raw.githubusercontent.com/MicoBlanc/Chipster/f4dc0d6/packages/chipster/src/__tests__/e2e/basic.spec.ts | MicoBlanc/Chipster f4dc0d6 packages/chipster/src/__tests__/e2e/basic.spec.ts | true | 200 | 2,734 | import { test, expect } from '@playwright/test'
import { addItem } from './helpers'
test.describe('Chipster Basic Tests', () => {
test.beforeEach(async ({ page }) => {
await page.goto('/')
})
test('renders basic chipster', async ({ page }) => {
const basicChipster = page.getByTestId('basic-chipster')
... | 0 |
HongVu23/School-management-application | 0484a59 | subject-service/src/subjects/builders/subject-with-detail.builder.ts | TypeScript | www.github.com/HongVu23/School-management-application/tree/main/subject-service/src/subjects/builders/subject-with-detail.builder.ts | https://raw.githubusercontent.com/HongVu23/School-management-application/0484a59/subject-service/src/subjects/builders/subject-with-detail.builder.ts | HongVu23/School-management-application 0484a59 subject-service/src/subjects/builders/subject-with-detail.builder.ts | true | 200 | 1,347 | import { Subject, SubjectWithDetail } from "../types/subject-custom.type";
import { $Enums } from "@prisma/client";
export class SubjectWithDetailBuilder {
constructor(
private readonly subject?: Subject,
private id?: string,
private name?: string,
private description?: string,
... | 2 |
Nitharsha99/SeaWayHotel | 56a8e0f | seaway.Web/src/app/Services/ActivityService/activity.service.ts | TypeScript | www.github.com/Nitharsha99/SeaWayHotel/tree/main/seaway.Web/src/app/Services/ActivityService/activity.service.ts | https://raw.githubusercontent.com/Nitharsha99/SeaWayHotel/56a8e0f/seaway.Web/src/app/Services/ActivityService/activity.service.ts | Nitharsha99/SeaWayHotel 56a8e0f seaway.Web/src/app/Services/ActivityService/activity.service.ts | true | 200 | 1,623 | import { HttpClient, HttpParams } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Activity } from '../../Models/activity';
import { catchError, Observable, throwError } from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class ActivityService {
constructor( private http: Http... | 4 |
sherly-ylin/angular-getting-started | 72902db | src/app/product-alerts/product-alerts.component.ts | TypeScript | www.github.com/sherly-ylin/angular-getting-started/tree/main/src/app/product-alerts/product-alerts.component.ts | https://raw.githubusercontent.com/sherly-ylin/angular-getting-started/72902db/src/app/product-alerts/product-alerts.component.ts | sherly-ylin/angular-getting-started 72902db src/app/product-alerts/product-alerts.component.ts | true | 200 | 567 | import { Component, Input, Output, EventEmitter } from '@angular/core';
import { Product } from '../products';
//"Input" - pass data to here (child component)
//"Output" - pass data to product-list (parent component)
@Component({
selector: 'app-product-alerts',
templateUrl: './product-alerts.component.html',
st... | 7 |
kitanz/fishlauncher | 2e268ff | src/renderer/src/stores/gameStore.ts | TypeScript | www.github.com/kitanz/fishlauncher/tree/main/src/renderer/src/stores/gameStore.ts | https://raw.githubusercontent.com/kitanz/fishlauncher/2e268ff/src/renderer/src/stores/gameStore.ts | kitanz/fishlauncher 2e268ff src/renderer/src/stores/gameStore.ts | true | 200 | 3,475 | import { defineStore } from 'pinia'
import { ref } from 'vue'
import { useAppStore } from './appStore'
export interface UpdateInfo {
version: string
url: string
notes: string
}
export const useGameStore = defineStore('game', () => {
const appStore = useAppStore()
// State
const gameVersion = ref('')
co... | 6 |
kcc-community/kcc-discover-frontend | 8a82d7a | src/hooks/useDiscoverContract.ts | TypeScript | www.github.com/kcc-community/kcc-discover-frontend/tree/main/src/hooks/useDiscoverContract.ts | https://raw.githubusercontent.com/kcc-community/kcc-discover-frontend/8a82d7a/src/hooks/useDiscoverContract.ts | kcc-community/kcc-discover-frontend 8a82d7a src/hooks/useDiscoverContract.ts | true | 200 | 7,898 | import { TokenAmount, ChainId, JSBI } from 'mojito-sdk'
import { TransactionResponse } from '@ethersproject/providers'
import { useEffect, useState } from 'react'
import { useActiveWeb3React } from './index'
import { useSingleCallResult } from '../state/multicall/hooks'
import { calculateGasMargin, isAddress } from '..... | 1 |
Dikendev/programming-books-studies | 1d84b05 | journeyAngular/src/app/products/product-detail/product-detail.component.ts | TypeScript | www.github.com/Dikendev/programming-books-studies/tree/main/journeyAngular/src/app/products/product-detail/product-detail.component.ts | https://raw.githubusercontent.com/Dikendev/programming-books-studies/1d84b05/journeyAngular/src/app/products/product-detail/product-detail.component.ts | Dikendev/programming-books-studies 1d84b05 journeyAngular/src/app/products/product-detail/product-detail.component.ts | true | 200 | 1,708 | import {
Component,
Input,
Output,
OnInit,
EventEmitter,
ViewEncapsulation,
ChangeDetectionStrategy,
OnChanges,
} from "@angular/core";
import { Observable, of, switchMap } from "rxjs";
import { Product } from "src/app/products/product.interface";
import { ActivatedRoute } from "@angular/router";
import { Produ... | 5 |
msayeeduddina/Zus-network | 9fd6558 | src/store/wallet/types.ts | TypeScript | www.github.com/msayeeduddina/Zus-network/tree/main/src/store/wallet/types.ts | https://raw.githubusercontent.com/msayeeduddina/Zus-network/9fd6558/src/store/wallet/types.ts | msayeeduddina/Zus-network 9fd6558 src/store/wallet/types.ts | true | 200 | 669 | import { createActionTypes } from 'lib'
import { Types } from 'store/api-utils'
export const CREATE_WALLET = 'CREATE_WALLET'
export const CLEAR_STORE = 'CLEAR_STORE'
export const GET_BALANCE = 'GET_BALANCE'
export const types: Types = createActionTypes([
CREATE_WALLET,
CLEAR_STORE,
GET_BALANCE,
])
export type ... | 3 |
jmnuf/gaap | fe156b5 | src/main.ts | TypeScript | www.github.com/jmnuf/gaap/tree/main/src/main.ts | https://raw.githubusercontent.com/jmnuf/gaap/fe156b5/src/main.ts | jmnuf/gaap fe156b5 src/main.ts | true | 200 | 7,068 | import "./style.css";
import { run, Enums } from "./yielder";
import type { Option } from "./yielder";
import { NOOP, applyAction, goalReached } from "./gaap";
import type { Action } from "./gaap";
import { createWorld } from "./world";
const Option = Enums.Option;
const WIDTH = 400;
const HEIGHT = 400;
run(funct... | 0 |
oktapodia/royco-sdk | 8cebf90 | sdk/constants/token-map/1/definitions/1-0xcfeb09c3c5f0f78ad72166d55f9e6e9a60e96eec.ts | TypeScript | www.github.com/oktapodia/royco-sdk/tree/main/sdk/constants/token-map/1/definitions/1-0xcfeb09c3c5f0f78ad72166d55f9e6e9a60e96eec.ts | https://raw.githubusercontent.com/oktapodia/royco-sdk/8cebf90/sdk/constants/token-map/1/definitions/1-0xcfeb09c3c5f0f78ad72166d55f9e6e9a60e96eec.ts | oktapodia/royco-sdk 8cebf90 sdk/constants/token-map/1/definitions/1-0xcfeb09c3c5f0f78ad72166d55f9e6e9a60e96eec.ts | true | 200 | 406 | import { defineToken } from "@/sdk/constants";
export default defineToken({
id: "1-0xcfeb09c3c5f0f78ad72166d55f9e6e9a60e96eec",
chain_id: 1,
contract_address: "0xcfeb09c3c5f0f78ad72166d55f9e6e9a60e96eec",
name: "VEMP",
symbol: "VEMP",
image: "https://s2.coinmarketcap.com/static/img/coins/64x64/11423.png",
... | 2 |
feature-flags-co/ffc-wechat-miniprogram-sdk | e4238bd | src/store.ts | TypeScript | www.github.com/feature-flags-co/ffc-wechat-miniprogram-sdk/tree/main/src/store.ts | https://raw.githubusercontent.com/feature-flags-co/ffc-wechat-miniprogram-sdk/e4238bd/src/store.ts | feature-flags-co/ffc-wechat-miniprogram-sdk e4238bd src/store.ts | true | 200 | 7,302 | import { featureFlagEvaluatedTopic } from "./constants";
import { eventHub } from "./events";
import { logger } from "./logger";
import {
FeatureFlagUpdateOperation,
FeatureFlagValue,
IDataStore,
IFeatureFlag,
IFeatureFlagChange,
InsightType,
StreamResponseEventType
} from "./types";
import localStorage f... | 4 |
lucasfpastre/angular-blog | 9dd5a33 | src/app/components/small-card/small-card.component.ts | TypeScript | www.github.com/lucasfpastre/angular-blog/tree/main/src/app/components/small-card/small-card.component.ts | https://raw.githubusercontent.com/lucasfpastre/angular-blog/9dd5a33/src/app/components/small-card/small-card.component.ts | lucasfpastre/angular-blog 9dd5a33 src/app/components/small-card/small-card.component.ts | true | 200 | 838 | import { Component, Input, OnInit } from '@angular/core';
import { localData } from '../../data/localData'
import { ActivatedRoute } from '@angular/router';
@Component({
selector: 'app-small-card',
templateUrl: './small-card.component.html',
styleUrls: ['./small-card.component.css']
})
export class SmallCardCom... | 7 |
Yoduh/ti4-db | c1f0022 | src/components/models.ts | TypeScript | www.github.com/Yoduh/ti4-db/tree/main/src/components/models.ts | https://raw.githubusercontent.com/Yoduh/ti4-db/c1f0022/src/components/models.ts | Yoduh/ti4-db c1f0022 src/components/models.ts | true | 200 | 3,572 | export interface Todo {
id: number;
content: string;
}
export interface Meta {
totalCount: number;
}
export type NavButton = {
id: number;
label: string;
color: string;
endpoint?: string;
disabled: boolean;
splitBtn: boolean;
};
export type Faction = {
id: number;
name: string;
commodities: n... | 6 |
WakilAhmadOmar/Title_Management | 89fcfe9 | server/routers/titles.ts | TypeScript | www.github.com/WakilAhmadOmar/Title_Management/tree/main/server/routers/titles.ts | https://raw.githubusercontent.com/WakilAhmadOmar/Title_Management/89fcfe9/server/routers/titles.ts | WakilAhmadOmar/Title_Management 89fcfe9 server/routers/titles.ts | true | 200 | 1,326 | const expresss = require("express");
const routers = expresss.Router();
// const Title = require("../models/title");
import { Title } from "../models/title";
const auth = require("../middleware/auth"); // Import the auth middleware
// Get all titles (Protected)
routers.get("/", auth, async (req: any, res: any) => {
... | 1 |
ElizabethCF01/devskilllab.front | 0fe1e02 | src/interfaces/user.ts | TypeScript | www.github.com/ElizabethCF01/devskilllab.front/tree/main/src/interfaces/user.ts | https://raw.githubusercontent.com/ElizabethCF01/devskilllab.front/0fe1e02/src/interfaces/user.ts | ElizabethCF01/devskilllab.front 0fe1e02 src/interfaces/user.ts | true | 200 | 667 | export interface StrapiUserResponse {
id: number;
username: string;
email: string;
password: string;
resetPasswordToken: string;
confirmationToken: string;
confirmed: boolean;
blocked: boolean;
createdAt: Date;
updatedAt: Date;
role: Role;
}
export interface Role {
id: number;
name: RoleName;
... | 5 |
andsr157/barong | 036edef | types/transaction.type.ts | TypeScript | www.github.com/andsr157/barong/tree/main/types/transaction.type.ts | https://raw.githubusercontent.com/andsr157/barong/036edef/types/transaction.type.ts | andsr157/barong 036edef types/transaction.type.ts | true | 200 | 1,972 | export interface Transaction {
id: string
chats_id: number,
user: {
id?: string
name: string
telp: string
address: string
},
pengepul: {},
address: {
label: string
address: string
name: string
telp: string
detail: string
... | 0 |
Alvaro-Calleros/pom_demo_webshop | 90ef3c9 | tests/maintests.spec.ts | TypeScript | www.github.com/Alvaro-Calleros/pom_demo_webshop/tree/main/tests/maintests.spec.ts | https://raw.githubusercontent.com/Alvaro-Calleros/pom_demo_webshop/90ef3c9/tests/maintests.spec.ts | Alvaro-Calleros/pom_demo_webshop 90ef3c9 tests/maintests.spec.ts | true | 200 | 2,117 | import { test } from '@playwright/test';
import { RegisterPage } from '../pages/registerPage';
import { PurchasePage } from '../pages/purchasePage';
import { LoginPage } from '../pages/loginPage'
import userdata from '../userdata.json';
test.describe('User Registration Tests', () => {
let registerPage: RegisterPage;... | 2 |
glezamir/angular-base-adv | bc86636 | src/app/core/guards/no-auth.guard.ts | TypeScript | www.github.com/glezamir/angular-base-adv/tree/main/src/app/core/guards/no-auth.guard.ts | https://raw.githubusercontent.com/glezamir/angular-base-adv/bc86636/src/app/core/guards/no-auth.guard.ts | glezamir/angular-base-adv bc86636 src/app/core/guards/no-auth.guard.ts | true | 200 | 742 | import { Injectable } from '@angular/core';
import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot, UrlTree } from '@angular/router';
import { INTERNAL_ROUTES } from '@data/constants/routes';
import { AuthService } from '@data/services/api/auth.service';
@Injectable({
providedIn: 'root'
})
export ... | 7 |
vladislavkn/materials-frontend | 5cdb525 | api/authApi.ts | TypeScript | www.github.com/vladislavkn/materials-frontend/tree/main/api/authApi.ts | https://raw.githubusercontent.com/vladislavkn/materials-frontend/5cdb525/api/authApi.ts | vladislavkn/materials-frontend 5cdb525 api/authApi.ts | true | 200 | 615 | import config from '../config'
import { LoginOptions, RegisterOptions, User } from '../types'
import request from './request'
const authApi = new (class {
private BASE_URL = `${config.BACKEND_URL}/auth`
login(options: LoginOptions) {
return request.post<{ user: User }>(this.BASE_URL + '/login', options)
}
... | 4 |
JaredBecker/Portfolio-Site | c6a4125 | src/app/components/experience/experience.component.ts | TypeScript | www.github.com/JaredBecker/Portfolio-Site/tree/main/src/app/components/experience/experience.component.ts | https://raw.githubusercontent.com/JaredBecker/Portfolio-Site/c6a4125/src/app/components/experience/experience.component.ts | JaredBecker/Portfolio-Site c6a4125 src/app/components/experience/experience.component.ts | true | 200 | 436 | import { Component } from '@angular/core';
import { ExperienceSection } from 'src/app/types/experience-section.interface';
import { EXPERIENCE } from 'src/app/constants/experience';
@Component({
selector: 'app-experience',
templateUrl: './experience.component.html',
})
export class ExperienceComponent {
p... | 6 |
ritikbheda/AptitudeFlow-api | beca9f9 | src/routes/auth/emailConfirmation.ts | TypeScript | www.github.com/ritikbheda/AptitudeFlow-api/tree/main/src/routes/auth/emailConfirmation.ts | https://raw.githubusercontent.com/ritikbheda/AptitudeFlow-api/beca9f9/src/routes/auth/emailConfirmation.ts | ritikbheda/AptitudeFlow-api beca9f9 src/routes/auth/emailConfirmation.ts | true | 200 | 1,050 | import { Request, Response, Router } from 'express';
import { AuthUser } from '../../models/authUser';
const router = Router();
router.get('/', async (req: Request, res: Response) => {
const { token } = req.query;
if (!token || typeof token !== 'string') {
return res.status(400).json({ message: 'Invalid toke... | 0 |
kleideradrian99/tienda | 48aebb5 | tienda/src/app/components/usuario/ordenes/index-ordenes/index-ordenes.component.ts | TypeScript | www.github.com/kleideradrian99/tienda/tree/main/tienda/src/app/components/usuario/ordenes/index-ordenes/index-ordenes.component.ts | https://raw.githubusercontent.com/kleideradrian99/tienda/48aebb5/tienda/src/app/components/usuario/ordenes/index-ordenes/index-ordenes.component.ts | kleideradrian99/tienda 48aebb5 tienda/src/app/components/usuario/ordenes/index-ordenes/index-ordenes.component.ts | true | 200 | 872 | import { Component, OnInit } from '@angular/core';
import { ClienteService } from 'src/app/services/cliente.service';
@Component({
selector: 'app-index-ordenes',
templateUrl: './index-ordenes.component.html',
styleUrls: ['./index-ordenes.component.css']
})
export class IndexOrdenesComponent implements OnInit {
... | 2 |
1jakob2/aigsTicTacToe | 12db5fe | src/hooks/useForm.ts | TypeScript | www.github.com/1jakob2/aigsTicTacToe/tree/main/src/hooks/useForm.ts | https://raw.githubusercontent.com/1jakob2/aigsTicTacToe/12db5fe/src/hooks/useForm.ts | 1jakob2/aigsTicTacToe 12db5fe src/hooks/useForm.ts | true | 200 | 2,101 | import {useState} from 'react';
import bcrypt from "bcryptjs";
interface UseFormProps {
initialUserName?: string;
initialPassword?: string;
initialRepeatPassword?: string;
}
const useForm = ({
initialUserName = "",
initialPassword = "",
initia... | 7 |
hamborg/auth-login-demo | 580d6a1 | dbApp/src/app/restaurants/restaurants.component.ts | TypeScript | www.github.com/hamborg/auth-login-demo/tree/main/dbApp/src/app/restaurants/restaurants.component.ts | https://raw.githubusercontent.com/hamborg/auth-login-demo/580d6a1/dbApp/src/app/restaurants/restaurants.component.ts | hamborg/auth-login-demo 580d6a1 dbApp/src/app/restaurants/restaurants.component.ts | true | 200 | 1,001 | import { Component, OnInit } from '@angular/core';
import { EventService } from '../event.service';
import { HttpErrorResponse } from '@angular/common/http';
import { Router } from '@angular/router';
@Component({
selector: 'app-restaurants',
templateUrl: './restaurants.component.html',
styleUrls: ['./restaurants... | 5 |
retrouser955/discord-player-youtubei | 1b42850 | lib/common/extractVideoID.ts | TypeScript | www.github.com/retrouser955/discord-player-youtubei/tree/main/lib/common/extractVideoID.ts | https://raw.githubusercontent.com/retrouser955/discord-player-youtubei/1b42850/lib/common/extractVideoID.ts | retrouser955/discord-player-youtubei 1b42850 lib/common/extractVideoID.ts | true | 200 | 394 | export function extractVideoId(vid: string) {
const YOUTUBE_REGEX =
/^https:\/\/(www\.)?youtu(\.be\/.{11}(.+)?|be\.com\/watch\?v=.{11}(&.+)?)/;
if (!YOUTUBE_REGEX.test(vid)) throw new Error("Invalid youtube url");
let id = new URL(vid).searchParams.get("v");
// VIDEO DETECTED AS YT SHORTS OR youtu.be link
... | 4 |
nargizasaina/nodejs2024Q3-service | b06fc23 | src/track/dtos/create-track.dto.ts | TypeScript | www.github.com/nargizasaina/nodejs2024Q3-service/tree/main/src/track/dtos/create-track.dto.ts | https://raw.githubusercontent.com/nargizasaina/nodejs2024Q3-service/b06fc23/src/track/dtos/create-track.dto.ts | nargizasaina/nodejs2024Q3-service b06fc23 src/track/dtos/create-track.dto.ts | true | 200 | 366 | import { IsString, IsNotEmpty, IsBoolean, IsOptional, IsNumber, Min, Max } from "class-validator";
export class CreateTrackDto {
@IsString()
@IsNotEmpty()
name: string;
@IsOptional()
@IsString()
artistId: string | null;
@IsOptional()
@IsString()
albumId: string | null;
@IsNumber()
@IsNotEmpty(... | 6 |
nzrulazmn/findbeez | f29e50a | src/app/posting/posting.page.spec.ts | TypeScript | www.github.com/nzrulazmn/findbeez/tree/main/src/app/posting/posting.page.spec.ts | https://raw.githubusercontent.com/nzrulazmn/findbeez/f29e50a/src/app/posting/posting.page.spec.ts | nzrulazmn/findbeez f29e50a src/app/posting/posting.page.spec.ts | true | 200 | 458 | import { ComponentFixture, TestBed } from '@angular/core/testing';
import { PostingPage } from './posting.page';
describe('PostingPage', () => {
let component: PostingPage;
let fixture: ComponentFixture<PostingPage>;
beforeEach(async(() => {
fixture = TestBed.createComponent(PostingPage);
component = fi... | 0 |
Salmalafi/recruitment_backend | ecdf57d | src/main.ts | TypeScript | www.github.com/Salmalafi/recruitment_backend/tree/main/src/main.ts | https://raw.githubusercontent.com/Salmalafi/recruitment_backend/ecdf57d/src/main.ts | Salmalafi/recruitment_backend ecdf57d src/main.ts | true | 200 | 600 | /* eslint-disable prettier/prettier */
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import 'reflect-metadata';
import { IoAdapter } from '@nestjs/platform-socket.io';
import { CustomIoAdapter } from './CustomIoAdapter';
async function bootstrap() {
const app = await NestFact... | 2 |
lucasasmuniz/devcommerce-frontend | 2f42216 | src/models/order.ts | TypeScript | www.github.com/lucasasmuniz/devcommerce-frontend/tree/main/src/models/order.ts | https://raw.githubusercontent.com/lucasasmuniz/devcommerce-frontend/2f42216/src/models/order.ts | lucasasmuniz/devcommerce-frontend 2f42216 src/models/order.ts | true | 200 | 484 | export class OrderDTO {
id?: number;
items: OrderItemDTO[] = [];
get total(): number {
let sum = 0;
this.items.forEach((item) => {
sum += item.subTotal;
});
return sum;
}
}
export class OrderItemDTO {
constructor(
public productId: number,
public quantity: number,
... | 5 |
manucastelnovo/api-e-commerce | 33fbedd | src/modules/auth/auth.controller.ts | TypeScript | www.github.com/manucastelnovo/api-e-commerce/tree/main/src/modules/auth/auth.controller.ts | https://raw.githubusercontent.com/manucastelnovo/api-e-commerce/33fbedd/src/modules/auth/auth.controller.ts | manucastelnovo/api-e-commerce 33fbedd src/modules/auth/auth.controller.ts | true | 200 | 1,057 | import { Body, Controller, Get, Post, Query, UseGuards, ValidationPipe } from '@nestjs/common';
import { AuthGuard } from '@nestjs/passport';
import { ApiTags } from '@nestjs/swagger';
import { UsersDto } from '../users/dto/users.dto';
import { Users } from '../users/users.entity';
import { AuthService } from './auth.... | 7 |
solunion/way | 4e98633 | libs/backend/component/src/lib/dto/component.dto.ts | TypeScript | www.github.com/solunion/way/tree/main/libs/backend/component/src/lib/dto/component.dto.ts | https://raw.githubusercontent.com/solunion/way/4e98633/libs/backend/component/src/lib/dto/component.dto.ts | solunion/way 4e98633 libs/backend/component/src/lib/dto/component.dto.ts | true | 200 | 1,020 | import { Field, InputType, ObjectType } from '@nestjs/graphql';
import { IsNotEmpty, IsOptional, IsUUID, MaxLength, MinLength } from 'class-validator';
@InputType()
@ObjectType('ComponentOutput')
export class ComponentDto {
@Field()
@IsUUID()
id: string;
@Field()
@IsNotEmpty()
@MinLength(3, { message: 'Na... | 6 |
apstav/blog-frontend-angular | 9c90669 | src/app/services/token-interceprtor.service.ts | TypeScript | www.github.com/apstav/blog-frontend-angular/tree/main/src/app/services/token-interceprtor.service.ts | https://raw.githubusercontent.com/apstav/blog-frontend-angular/9c90669/src/app/services/token-interceprtor.service.ts | apstav/blog-frontend-angular 9c90669 src/app/services/token-interceprtor.service.ts | true | 200 | 2,219 | import {
HttpErrorResponse,
HttpEvent,
HttpHandler,
HttpInterceptor,
HttpRequest,
} from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Router } from '@angular/router';
import { BehaviorSubject, Observable, throwError } from 'rxjs';
import { catchError, filter, switchMap, take } ... | 2 |
RowletQwQ/DSLDesign | 0cbae73 | src/expr/conjunction_expr.ts | TypeScript | www.github.com/RowletQwQ/DSLDesign/tree/main/src/expr/conjunction_expr.ts | https://raw.githubusercontent.com/RowletQwQ/DSLDesign/0cbae73/src/expr/conjunction_expr.ts | RowletQwQ/DSLDesign 0cbae73 src/expr/conjunction_expr.ts | true | 200 | 2,759 | import { Expression, ExprType } from "./expression.js";
import { Context } from "../context/context.js";
export enum ConjunctionExprType {
AND,
OR,
}
/**
* Represents a conjunction expression.
*/
export class ConjunctionExpr implements Expression {
private left_: Expression;
private right_: Expression;
pr... | 0 |
mikey-t/swig-cli-init | 56ef9de | src/SwigInitializer.ts | TypeScript | www.github.com/mikey-t/swig-cli-init/tree/main/src/SwigInitializer.ts | https://raw.githubusercontent.com/mikey-t/swig-cli-init/56ef9de/src/SwigInitializer.ts | mikey-t/swig-cli-init 56ef9de src/SwigInitializer.ts | true | 200 | 5,466 | import { Emoji, log, simpleSpawnAsync, spawnAsync, which } from '@mikeyt23/node-cli-utils'
import fs from 'node:fs'
import fsp from 'node:fs/promises'
import path from 'node:path'
export interface SwigInitializerDependencies {
whichFn: typeof which
getNodeMajorVersionFn: typeof getNodeMajorVersion
workingDir: st... | 7 |
itziarpb/class-management-backend | fa23039 | src/services/user.service.ts | TypeScript | www.github.com/itziarpb/class-management-backend/tree/main/src/services/user.service.ts | https://raw.githubusercontent.com/itziarpb/class-management-backend/fa23039/src/services/user.service.ts | itziarpb/class-management-backend fa23039 src/services/user.service.ts | true | 200 | 992 | import { Injectable, NotFoundException } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { User } from 'src/domain/entities/user.entity';
import { FindOneOptions, Repository } from 'typeorm';
@Injectable()
export class UserService {
constructor(
@InjectRepository(User)
... | 5 |
Tape/peloton-app | 36a7759 | src/lib/peloton/instructors.ts | TypeScript | www.github.com/Tape/peloton-app/tree/main/src/lib/peloton/instructors.ts | https://raw.githubusercontent.com/Tape/peloton-app/36a7759/src/lib/peloton/instructors.ts | Tape/peloton-app 36a7759 src/lib/peloton/instructors.ts | true | 200 | 520 | export type Instructor = {
classes: number;
name: string;
};
export type Instructors = Instructor[];
export const aggregate = (csvData: string[][]): Instructors => {
const instructors = csvData.reduce((instructors, row) => {
const instructor = row[2] || "No Instructor";
const value = instructors.get(ins... | 6 |
DrJonBrock/luke-desktop | 471f9d3 | src/utils/format.ts | TypeScript | www.github.com/DrJonBrock/luke-desktop/tree/main/src/utils/format.ts | https://raw.githubusercontent.com/DrJonBrock/luke-desktop/471f9d3/src/utils/format.ts | DrJonBrock/luke-desktop 471f9d3 src/utils/format.ts | true | 200 | 903 | export function formatBytes(bytes: number, decimals = 2): string {
if (bytes === 0) return '0 Bytes';
const k = 1024;
const dm = decimals < 0 ? 0 : decimals;
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
const i = Math.floor(Math.log(bytes) / Math.log(k));
return parseFloat((bytes / Math.pow(k, i)).to... | 2 |
dhia-coder/angularproject | 56847bb | src/app/etudiant.service.ts | TypeScript | www.github.com/dhia-coder/angularproject/tree/main/src/app/etudiant.service.ts | https://raw.githubusercontent.com/dhia-coder/angularproject/56847bb/src/app/etudiant.service.ts | dhia-coder/angularproject 56847bb src/app/etudiant.service.ts | true | 200 | 1,077 | import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class EtudiantService {
private apiUrl = 'http://192.168.50.4:8087/SpringMVC/etudiant';
constructor(private http: HttpClient) { }
getEtu... | 0 |
nwanguma/collabhub-frontend | 0baa35d | dist/store/user/index.d.ts | TypeScript | www.github.com/nwanguma/collabhub-frontend/tree/main/dist/store/user/index.d.ts | https://raw.githubusercontent.com/nwanguma/collabhub-frontend/0baa35d/dist/store/user/index.d.ts | nwanguma/collabhub-frontend 0baa35d dist/store/user/index.d.ts | true | 200 | 1,191 | import { User } from "@/common/constants";
interface InitialState {
data: User;
error: null | string;
}
export declare const fetchUser: import("@reduxjs/toolkit").AsyncThunk<any, string, {
state?: unknown;
dispatch?: import("redux-thunk").ThunkDispatch<unknown, unknown, import("redux").UnknownAction>;
... | 5 |
vkradio/SportsStore | a292e78 | ClientApp/src/app/admin/admin.module.ts | TypeScript | www.github.com/vkradio/SportsStore/tree/main/ClientApp/src/app/admin/admin.module.ts | https://raw.githubusercontent.com/vkradio/SportsStore/a292e78/ClientApp/src/app/admin/admin.module.ts | vkradio/SportsStore a292e78 ClientApp/src/app/admin/admin.module.ts | true | 200 | 1,431 | import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { FormsModule } from '@angular/forms';
import { AdminComponent } from './admin.component';
import { OverviewComponent } from './overview.component';
import { ProductAdminComponent } from './productAdmin.component';
... | 7 |
javilobo8/mocha-testing | 77ebd1d | src/tests/7b951de3-43b1-4194-8f84-1ea259910f4f.spec.ts | TypeScript | www.github.com/javilobo8/mocha-testing/tree/main/src/tests/7b951de3-43b1-4194-8f84-1ea259910f4f.spec.ts | https://raw.githubusercontent.com/javilobo8/mocha-testing/77ebd1d/src/tests/7b951de3-43b1-4194-8f84-1ea259910f4f.spec.ts | javilobo8/mocha-testing 77ebd1d src/tests/7b951de3-43b1-4194-8f84-1ea259910f4f.spec.ts | true | 200 | 639 |
import { expect } from 'chai';
import { add, delay } from '../calculator.js';
describe('Calculator - 7b951de3-43b1-4194-8f84-1ea259910f4f', () => {
describe('add', () => {
it('should add two numbers', () => {
expect(add(1, 1)).to.be.equal(2);
});
it('should add two decimal numbers', () => {
... | 2 |
ahowley/marble-melodies | 7c65ebe | src/game/music.ts | TypeScript | www.github.com/ahowley/marble-melodies/tree/main/src/game/music.ts | https://raw.githubusercontent.com/ahowley/marble-melodies/7c65ebe/src/game/music.ts | ahowley/marble-melodies 7c65ebe src/game/music.ts | true | 200 | 1,065 | import * as Tone from "tone";
import { SerializedBody } from "./physics";
export type Notes = "auto" | "A" | "A#" | "B" | "C" | "C#" | "D" | "D#" | "E" | "F" | "F#" | "G" | "G#";
export type Octaves = "auto" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8";
export class Music {
marbleSynth: Tone.PolySynth;
volume:... | 0 |
lcacollect/shared-components-frontend | 5a26921 | src/__mocks__/appBar.mock.ts | TypeScript | www.github.com/lcacollect/shared-components-frontend/tree/main/src/__mocks__/appBar.mock.ts | https://raw.githubusercontent.com/lcacollect/shared-components-frontend/5a26921/src/__mocks__/appBar.mock.ts | lcacollect/shared-components-frontend 5a26921 src/__mocks__/appBar.mock.ts | true | 200 | 393 | import getSingleProjectResponse from './getSingleProject'
import { MockedResponse } from '@apollo/client/testing'
import { GetSingleProjectDocument } from '../dataAccess'
export const appBarMock: MockedResponse[] = [
{
request: {
query: GetSingleProjectDocument,
variables: { id: 'acfa456f-6628-4c0d-a... | 6 |
Aakash25612/iframee | 497dad0 | src/app/services/brokers/zerodha.service.ts | TypeScript | www.github.com/Aakash25612/iframee/tree/main/src/app/services/brokers/zerodha.service.ts | https://raw.githubusercontent.com/Aakash25612/iframee/497dad0/src/app/services/brokers/zerodha.service.ts | Aakash25612/iframee 497dad0 src/app/services/brokers/zerodha.service.ts | true | 200 | 2,499 | import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { environment } from '../../../environments/environment';
import { firstValueFrom, take } from 'rxjs';
import {
ZerodhaCallback,
ZerodhaTokenResponse,
} from '../../models/callbacks/Zerodha';
import { Broker } from... | 5 |
digirati-co-uk/iiif-manifest-editor | 920fe40 | packages/ui/madoc/components/BoxSelector.helpers.ts | TypeScript | www.github.com/digirati-co-uk/iiif-manifest-editor/tree/main/packages/ui/madoc/components/BoxSelector.helpers.ts | https://raw.githubusercontent.com/digirati-co-uk/iiif-manifest-editor/920fe40/packages/ui/madoc/components/BoxSelector.helpers.ts | digirati-co-uk/iiif-manifest-editor 920fe40 packages/ui/madoc/components/BoxSelector.helpers.ts | true | 200 | 2,711 | import { AnnotationBuckets } from '../types/annotation-styles';
import { useAnnotationStyles } from './AnnotationStyleContext';
import { SelectorTypeProps } from '../types/selector-types';
import { useSelectorController } from './helpers/selector-helper';
import { useCallback, useEffect, useRef, useState } from 'react'... | 7 |
khanglv/demo-bryntum-gantt | 60f116c | src/utillity/index.ts | TypeScript | www.github.com/khanglv/demo-bryntum-gantt/tree/main/src/utillity/index.ts | https://raw.githubusercontent.com/khanglv/demo-bryntum-gantt/60f116c/src/utillity/index.ts | khanglv/demo-bryntum-gantt 60f116c src/utillity/index.ts | true | 200 | 905 | import _, { String } from "lodash";
const optimizeData = (array: any) => {
const result = array.reduce(function (rv: any, x: any) {
(rv[x["subcon_code"]] = rv[x["subcon_code"]] || []).push(x);
return rv;
}, {});
return result;
};
function rootNode(node: any[]): any[] {
const byAtt = _.groupBy(node, "a... | 2 |
mikeasequia/planebooking | ed2c926 | mikeplanebookingapplication.client/src/app/modules/passenger.module/passenger.module.ts | TypeScript | www.github.com/mikeasequia/planebooking/tree/main/mikeplanebookingapplication.client/src/app/modules/passenger.module/passenger.module.ts | https://raw.githubusercontent.com/mikeasequia/planebooking/ed2c926/mikeplanebookingapplication.client/src/app/modules/passenger.module/passenger.module.ts | mikeasequia/planebooking ed2c926 mikeplanebookingapplication.client/src/app/modules/passenger.module/passenger.module.ts | true | 200 | 821 | import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { DataTablesModule } from 'angular-datatables';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import { PassengerMainComponent } from './route-comp... | 0 |
FlorianZunke/Cardgame | 09ffe12 | src/app/shared/game-datas.service.ts | TypeScript | www.github.com/FlorianZunke/Cardgame/tree/main/src/app/shared/game-datas.service.ts | https://raw.githubusercontent.com/FlorianZunke/Cardgame/09ffe12/src/app/shared/game-datas.service.ts | FlorianZunke/Cardgame 09ffe12 src/app/shared/game-datas.service.ts | true | 200 | 1,634 | import { Injectable } from '@angular/core';
import { Firestore, collection, doc } from '@angular/fire/firestore';
@Injectable({
providedIn: 'root'
})
export class GameDatasService {
public players: string[] = [];
public cardStack: string[] = [];
public playedCards: string[] = [];
public currentPLayer: numb... | 6 |
future4code/lamarr-Santiago-Oliveira | 34d3734 | modulo6/arquitetura-de-software-1/src/controller/UserController.ts | TypeScript | www.github.com/future4code/lamarr-Santiago-Oliveira/tree/main/modulo6/arquitetura-de-software-1/src/controller/UserController.ts | https://raw.githubusercontent.com/future4code/lamarr-Santiago-Oliveira/34d3734/modulo6/arquitetura-de-software-1/src/controller/UserController.ts | future4code/lamarr-Santiago-Oliveira 34d3734 modulo6/arquitetura-de-software-1/src/controller/UserController.ts | true | 200 | 1,178 | import { Request, Response } from "express";
import { UserBusiness } from "../business/UserBusiness";
export class UserController {
createUser = async (req: Request, res: Response): Promise<void> => {
try {
const input: any = {
name: req.body.name,
email: req.body.email,
password: r... | 5 |
vsdeeper/vswift | 6df0680 | packages/utils/core/data-url-to-blob.ts | TypeScript | www.github.com/vsdeeper/vswift/tree/main/packages/utils/core/data-url-to-blob.ts | https://raw.githubusercontent.com/vsdeeper/vswift/6df0680/packages/utils/core/data-url-to-blob.ts | vsdeeper/vswift 6df0680 packages/utils/core/data-url-to-blob.ts | true | 200 | 922 | /**
* dataURL转换为blob数据
* @param dataURL canvas.toDataURL
*/
export function dataURLToBlob(dataURL: string) {
try {
const BASE64_MARKER = ';base64,'
if (dataURL.indexOf(BASE64_MARKER) === -1) {
const parts = dataURL.split(',')
const contentType = parts[0].split(':')[1]
const raw = decodeUR... | 7 |
aimanwajid/45-assignment-in-typescript | 901beb6 | 30_hello_admin/hello_admin.ts | TypeScript | www.github.com/aimanwajid/45-assignment-in-typescript/tree/main/30_hello_admin/hello_admin.ts | https://raw.githubusercontent.com/aimanwajid/45-assignment-in-typescript/901beb6/30_hello_admin/hello_admin.ts | aimanwajid/45-assignment-in-typescript 901beb6 30_hello_admin/hello_admin.ts | true | 200 | 324 | const userNames: string [] = ['admin', 'Bugs Bunny', 'Daffy Duck', 'Sylvester', 'Tweety'];
for(let i=0; i<userNames.length; i++){
if(userNames[i] === 'admin')
{
console.log('Hello admin, would you like to see a status report?');
}
else{
console.log(`Hello ${userNames[i]}, thank you for logging in again.`)... | 2 |
Emanum/dokai | bc79200 | supabase-sveltekit/src/routes/document/+page.server.ts | TypeScript | www.github.com/Emanum/dokai/tree/main/supabase-sveltekit/src/routes/document/+page.server.ts | https://raw.githubusercontent.com/Emanum/dokai/bc79200/supabase-sveltekit/src/routes/document/%2Bpage.server.ts | Emanum/dokai bc79200 supabase-sveltekit/src/routes/document/+page.server.ts | true | 200 | 825 | import {redirect} from "@sveltejs/kit";
import type {Actions, PageServerLoad} from "./$types";
export const load: PageServerLoad = async ({
locals: {supabase, getSession},
}) => {
const session = await getSession();
if (... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.