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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
lenardvandermaas/FlowChartEditor | c13c744 | src/app/components/sequence-editor/sequence-editor.component.ts | TypeScript | www.github.com/lenardvandermaas/FlowChartEditor/tree/main/src/app/components/sequence-editor/sequence-editor.component.ts | https://raw.githubusercontent.com/lenardvandermaas/FlowChartEditor/c13c744/src/app/components/sequence-editor/sequence-editor.component.ts | lenardvandermaas/FlowChartEditor c13c744 src/app/components/sequence-editor/sequence-editor.component.ts | true | 200 | 7,944 | import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';
import { CdkDragDrop } from '@angular/cdk/drag-drop'
import { NodeSequenceEditor, NodeSequenceEditorCell, NodeOrEdgeSelection } from '../../model/nodeSequenceEditor';
import { getRange } from '../../util/... | 5 |
Dyqmin/shop | b9d7094 | libs/microservices/orders/schema/src/lib/orders.ts | TypeScript | www.github.com/Dyqmin/shop/tree/main/libs/microservices/orders/schema/src/lib/orders.ts | https://raw.githubusercontent.com/Dyqmin/shop/b9d7094/libs/microservices/orders/schema/src/lib/orders.ts | Dyqmin/shop b9d7094 libs/microservices/orders/schema/src/lib/orders.ts | true | 200 | 2,262 | import { relations, sql } from 'drizzle-orm';
import { date, decimal, integer, pgEnum, pgTable, serial, varchar } from 'drizzle-orm/pg-core';
export const orderStatus = pgEnum('order_status_enum', ['pending', 'shipped', 'preparing']);
export const paymentStatus = pgEnum('payment_status_enum', ['pending', 'paid']);
ex... | 4 |
KartikeyaNainkhwal/medium-project-backend | 6e8d4cd | src/routes/blog.ts | TypeScript | www.github.com/KartikeyaNainkhwal/medium-project-backend/tree/main/src/routes/blog.ts | https://raw.githubusercontent.com/KartikeyaNainkhwal/medium-project-backend/6e8d4cd/src/routes/blog.ts | KartikeyaNainkhwal/medium-project-backend 6e8d4cd src/routes/blog.ts | true | 200 | 3,289 | import { Hono } from "hono";
import { PrismaClient } from '@prisma/client/edge'
import { withAccelerate } from '@prisma/extension-accelerate'
import { decode, sign, verify } from 'hono/jwt'
import { createPostInput,updatePostInput } from "../zod";
export const blogRouter=new Hono<{
Bindings:{
DATABASE_URL:... | 2 |
mateanticevic/ProjectIvy.Web | c7321ec | src/types/beer.ts | TypeScript | www.github.com/mateanticevic/ProjectIvy.Web/tree/main/src/types/beer.ts | https://raw.githubusercontent.com/mateanticevic/ProjectIvy.Web/c7321ec/src/types/beer.ts | mateanticevic/ProjectIvy.Web c7321ec src/types/beer.ts | true | 200 | 677 | import { PagingFilters, defaultPagingFilters } from './paging';
import moment from 'moment';
import { components } from 'types/ivy-types';
type Consumation = components['schemas']['Consumation'];
export interface BrandFilters {
hasCountry?: boolean;
search?: string;
}
export const defaultConsumation: Consum... | 5 |
ykchir/phantombuster-recipe-scraper | 526c33c | src/tests/unit/application/RecipeService.test.ts | TypeScript | www.github.com/ykchir/phantombuster-recipe-scraper/tree/main/src/tests/unit/application/RecipeService.test.ts | https://raw.githubusercontent.com/ykchir/phantombuster-recipe-scraper/526c33c/src/tests/unit/application/RecipeService.test.ts | ykchir/phantombuster-recipe-scraper 526c33c src/tests/unit/application/RecipeService.test.ts | true | 200 | 1,120 | import { RecipeService } from '../../../application/RecipeService';
import { RecipeRepository } from '../../../domain/RecipeRepository';
import { Recipe } from '../../../domain/Recipe';
describe('RecipeService', () => {
it('should throw an error if the query is empty', async () => {
const mockRepository: RecipeR... | 7 |
AbhishekKolge/repo-radar-client | d63c2de | src/shared/utils/storage.ts | TypeScript | www.github.com/AbhishekKolge/repo-radar-client/tree/main/src/shared/utils/storage.ts | https://raw.githubusercontent.com/AbhishekKolge/repo-radar-client/d63c2de/src/shared/utils/storage.ts | AbhishekKolge/repo-radar-client d63c2de src/shared/utils/storage.ts | true | 200 | 711 | import { AUTH_STORAGE_NAME } from './defaults';
export const saveStorage = <T>(key: string, data: T): void => {
localStorage.setItem(key, JSON.stringify(data));
};
export const getStorage = <T>(key: string): T | null => {
const storedData = localStorage.getItem(key);
return storedData ? (JSON.parse(storedData) ... | 4 |
prajjwal112/HanziAnimation | d36ad28 | HanziAnimationUI/src/app/app-routing.module.ts | TypeScript | www.github.com/prajjwal112/HanziAnimation/tree/main/HanziAnimationUI/src/app/app-routing.module.ts | https://raw.githubusercontent.com/prajjwal112/HanziAnimation/d36ad28/HanziAnimationUI/src/app/app-routing.module.ts | prajjwal112/HanziAnimation d36ad28 HanziAnimationUI/src/app/app-routing.module.ts | true | 200 | 563 | import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { MainPageComponent } from './main-page/main-page.component';
import { ContentListViewComponent } from './shared/content-list-view/content-list-view.component';
const routes: Routes = [
{
path:'',
compone... | 2 |
DarkWolff71/URL-Shortener | 55f19d6 | server/src/metrics/metrics.controller.ts | TypeScript | www.github.com/DarkWolff71/URL-Shortener/tree/main/server/src/metrics/metrics.controller.ts | https://raw.githubusercontent.com/DarkWolff71/URL-Shortener/55f19d6/server/src/metrics/metrics.controller.ts | DarkWolff71/URL-Shortener 55f19d6 server/src/metrics/metrics.controller.ts | true | 200 | 408 | import { Controller, Get, Header } from '@nestjs/common';
import { MetricsService } from './metrics.service';
import * as client from 'prom-client';
@Controller('metrics')
export class MetricsController {
constructor(private metricsService: MetricsService) {}
@Get()
@Header('Content-Type', client.register.conte... | 5 |
zhangone233/wx_miniprogram_server | d6bb305 | app/decorator/decorator-router/validate.ts | TypeScript | www.github.com/zhangone233/wx_miniprogram_server/tree/main/app/decorator/decorator-router/validate.ts | https://raw.githubusercontent.com/zhangone233/wx_miniprogram_server/d6bb305/app/decorator/decorator-router/validate.ts | zhangone233/wx_miniprogram_server d6bb305 app/decorator/decorator-router/validate.ts | true | 200 | 869 | import Joi from 'joi';
import 'reflect-metadata';
import { Middleware } from 'koa';
import { getValidateParams } from '@app/middleware/validateParams';
export const validate = (
schema: Joi.Schema,
position: number | 'last' = 'last'
): MethodDecorator => {
return function (target, propertyKey) {
const method... | 4 |
CourtesyCall/project | d53c9af | back/dist/app.controller.d.ts | TypeScript | www.github.com/CourtesyCall/project/tree/main/back/dist/app.controller.d.ts | https://raw.githubusercontent.com/CourtesyCall/project/d53c9af/back/dist/app.controller.d.ts | CourtesyCall/project d53c9af back/dist/app.controller.d.ts | true | 200 | 614 | import { AppService } from './app.service';
import { Product } from "./product.model";
export declare class AppController {
private readonly appService;
constructor(appService: AppService);
findAll(page?: number, pageSize?: number, search?: string, id?: number): Promise<{
products: Product[];
... | 2 |
godrong/autoforjob | 7acc25b | src/platforms/boss/boss.types.ts | TypeScript | www.github.com/godrong/autoforjob/tree/main/src/platforms/boss/boss.types.ts | https://raw.githubusercontent.com/godrong/autoforjob/7acc25b/src/platforms/boss/boss.types.ts | godrong/autoforjob 7acc25b src/platforms/boss/boss.types.ts | true | 200 | 477 | export interface IBossConfig {
keywords: string[];
cityCode: string[];
jobType: string;
salary: string;
experience: string[];
degree: string[];
scale: string[];
stage: string[];
enableAI: boolean;
filterDeadHR: boolean;
expectedSalary: number[];
}
export interface IJob {
href: string;
jobName... | 7 |
edgeros/tpl-typescript | 2601ade | src/main.ts | TypeScript | www.github.com/edgeros/tpl-typescript/tree/main/src/main.ts | https://raw.githubusercontent.com/edgeros/tpl-typescript/2601ade/src/main.ts | edgeros/tpl-typescript 2601ade src/main.ts | true | 200 | 403 | import WebApp from 'webapp'
import myRouter from './routers/rest'
/* Create App */
const app = WebApp.createApp()
/* Set static path */
app.use(WebApp.static('./public'))
/* Set test rest */
app.use('/api', myRouter)
/* Rend test */
app.get('/temp.html', function (req, res) {
res.render('temp', { time: Date.now()... | 4 |
watch1fy/frontend | 2bd99f5 | lib/schema/index.ts | TypeScript | www.github.com/watch1fy/frontend/tree/main/lib/schema/index.ts | https://raw.githubusercontent.com/watch1fy/frontend/2bd99f5/lib/schema/index.ts | watch1fy/frontend 2bd99f5 lib/schema/index.ts | true | 200 | 865 | import { ZodType, z } from "zod";
import { SignInFormData, SignUpFormData } from "../types";
export const SignUpSchema: ZodType<SignUpFormData> = z
.object({
email: z
.string()
.email({ message: "Must be a valid email" })
.min(4, { message: "Email is too short" }),
password: z.string().min(... | 2 |
RAJPUTRoCkStAr/MEAN-HRM | 84bcd8a | Frontend/src/app/components/resource-manage/datetime-format.ts | TypeScript | www.github.com/RAJPUTRoCkStAr/MEAN-HRM/tree/main/Frontend/src/app/components/resource-manage/datetime-format.ts | https://raw.githubusercontent.com/RAJPUTRoCkStAr/MEAN-HRM/84bcd8a/Frontend/src/app/components/resource-manage/datetime-format.ts | RAJPUTRoCkStAr/MEAN-HRM 84bcd8a Frontend/src/app/components/resource-manage/datetime-format.ts | true | 200 | 1,360 | import { Injectable } from "@angular/core";
import { NgbDateAdapter, NgbDateParserFormatter, NgbDateStruct } from "@ng-bootstrap/ng-bootstrap";
@Injectable()
export class CustomAdapter extends NgbDateAdapter<string> {
readonly DELIMITER = '-';
fromModel(value: string | null): NgbDateStruct | null {
if... | 5 |
appcket/appcket-org | ceb60a7 | api/src/team/teamUser.entity.ts | TypeScript | www.github.com/appcket/appcket-org/tree/main/api/src/team/teamUser.entity.ts | https://raw.githubusercontent.com/appcket/appcket-org/ceb60a7/api/src/team/teamUser.entity.ts | appcket/appcket-org ceb60a7 api/src/team/teamUser.entity.ts | true | 200 | 864 | import { Entity, ManyToOne, OneToOne } from '@mikro-orm/core';
import { BaseEntity } from 'src/common/entities/base.entity';
import { Team } from 'src/team/team.entity';
import { User } from 'src/user/user.entity';
@Entity({ schema: 'appcket' })
export class TeamUser extends BaseEntity {
@OneToOne({
entity: () ... | 7 |
Looskie/tic-tac-toe | 18b37bc | src/types/index.ts | TypeScript | www.github.com/Looskie/tic-tac-toe/tree/main/src/types/index.ts | https://raw.githubusercontent.com/Looskie/tic-tac-toe/18b37bc/src/types/index.ts | Looskie/tic-tac-toe 18b37bc src/types/index.ts | true | 200 | 880 | import { Timestamp } from "@onehop/js";
import { ZodError } from "zod";
export interface GameState {
players: string[];
board: string[][];
turn: string;
winner: string | null;
created_at: Timestamp;
// this piece of state will help us determine if both players want a rematch, this is only really used for ... | 4 |
211234/ApiFundacionContigo | df1a7d7 | Notificaciones/src/application/use-cases/processUserCreatedEventUseCase.ts | TypeScript | www.github.com/211234/ApiFundacionContigo/tree/main/Notificaciones/src/application/use-cases/processUserCreatedEventUseCase.ts | https://raw.githubusercontent.com/211234/ApiFundacionContigo/df1a7d7/Notificaciones/src/application/use-cases/processUserCreatedEventUseCase.ts | 211234/ApiFundacionContigo df1a7d7 Notificaciones/src/application/use-cases/processUserCreatedEventUseCase.ts | true | 200 | 1,084 | import { notificationService } from '../../core/services/notificationService';
import { CreateTokenUseCase } from '../use-cases/createTokenUseCase';
import { TokenRepository } from '../../adapaters/in/repositories/tokenRepository';
export class ProcessUserCreatedEventUseCase {
private createTokenUseCase: CreateTok... | 2 |
kaczmarekdaniel/financialplanner-server | 0090e73 | src/handlers/payments.ts | TypeScript | www.github.com/kaczmarekdaniel/financialplanner-server/tree/main/src/handlers/payments.ts | https://raw.githubusercontent.com/kaczmarekdaniel/financialplanner-server/0090e73/src/handlers/payments.ts | kaczmarekdaniel/financialplanner-server 0090e73 src/handlers/payments.ts | true | 200 | 4,345 | import prisma from "../../db";
import { getFirstAndLastDayOfMonth } from "../helpers/getFirstAndLastDayOfMonth";
import { categorizeItems } from "./helpers/paymentsHelpers";
export const getUserPayments = async (req, res) => {
const user = await prisma.user.findUnique({
where: { id: req.user.id },
});... | 5 |
xJareb/eGym | 2b94ed3 | front-end/src/pmain/ProizvodiGetAllResponse.ts | TypeScript | www.github.com/xJareb/eGym/tree/main/front-end/src/pmain/ProizvodiGetAllResponse.ts | https://raw.githubusercontent.com/xJareb/eGym/2b94ed3/front-end/src/pmain/ProizvodiGetAllResponse.ts | xJareb/eGym 2b94ed3 front-end/src/pmain/ProizvodiGetAllResponse.ts | true | 200 | 708 | export interface ProizvodiGetAllResponseKategorija {
id: number;
nazivKategorije: string;
opis: string;
}
export interface ProizvodiGetAllResponseBrend {
brendId: number;
nazivBrenda: string;
}
export interface ProizvodiGetAllResponseSlika {
id: number;
putanja: string;
}
export interface... | 7 |
dhaneshwaripatel-easternts/quasar-project | a5463e6 | src/components/test/SignUp.spec.ts | TypeScript | www.github.com/dhaneshwaripatel-easternts/quasar-project/tree/main/src/components/test/SignUp.spec.ts | https://raw.githubusercontent.com/dhaneshwaripatel-easternts/quasar-project/a5463e6/src/components/test/SignUp.spec.ts | dhaneshwaripatel-easternts/quasar-project a5463e6 src/components/test/SignUp.spec.ts | true | 200 | 1,197 | import { render } from '@testing-library/vue';
import SignUp from '../SignUp.vue';
//import userEvent from '@testing-library/user-event';
//signup title text
it('Sign Up', () => {
const { getByText, getByTestId, container } = render(SignUp);
expect(getByText('NEW TO FABBOOK REGISTER HERE')).toBeInTheDocument();
... | 2 |
fernando-costa/football-manager | 4facb96 | app/backend/src/model/matches/MatchesModel.ts | TypeScript | www.github.com/fernando-costa/football-manager/tree/main/app/backend/src/model/matches/MatchesModel.ts | https://raw.githubusercontent.com/fernando-costa/football-manager/4facb96/app/backend/src/model/matches/MatchesModel.ts | fernando-costa/football-manager 4facb96 app/backend/src/model/matches/MatchesModel.ts | true | 200 | 1,858 | import { IMatch } from '../../Interfaces/Matches/IMatch';
import SequelizeMatch from '../../database/models/SequelizeMatch';
import SequelizeTeam from '../../database/models/SequelizeTeam';
import { IMatchesModel } from '../../Interfaces/Matches/IMatchesModel';
import { NewEntity } from '../../Interfaces';
export defa... | 5 |
charith9422/app-dashboard-12062020 | 3089b5c | src/app/app-routing.module.ts | TypeScript | www.github.com/charith9422/app-dashboard-12062020/tree/main/src/app/app-routing.module.ts | https://raw.githubusercontent.com/charith9422/app-dashboard-12062020/3089b5c/src/app/app-routing.module.ts | charith9422/app-dashboard-12062020 3089b5c src/app/app-routing.module.ts | true | 200 | 715 | import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { DashboardComponent } from './component/dashboard/dashboard.component';
import { ApplicationComponent } from './component/application/application.component';
import { SupportComponent } from './component/support/su... | 7 |
REAN-Foundation/careplan-service | 0242415 | src/database/repository.services/enrollment/participant.service.ts | TypeScript | www.github.com/REAN-Foundation/careplan-service/tree/main/src/database/repository.services/enrollment/participant.service.ts | https://raw.githubusercontent.com/REAN-Foundation/careplan-service/0242415/src/database/repository.services/enrollment/participant.service.ts | REAN-Foundation/careplan-service 0242415 src/database/repository.services/enrollment/participant.service.ts | true | 200 | 6,197 | import { ParticipantModel } from '../../models/enrollment/participant.model';
import { ErrorHandler } from '../../../common/error.handler';
import { Op } from 'sequelize';
///////////////////////////////////////////////////////////////////////////////////////////////
export class ParticipantService {
Participant... | 4 |
cazar27/odilo-app | 1b65975 | src/app/pipes/truncate.pipe.spec.ts | TypeScript | www.github.com/cazar27/odilo-app/tree/main/src/app/pipes/truncate.pipe.spec.ts | https://raw.githubusercontent.com/cazar27/odilo-app/1b65975/src/app/pipes/truncate.pipe.spec.ts | cazar27/odilo-app 1b65975 src/app/pipes/truncate.pipe.spec.ts | true | 200 | 850 | import { TruncatePipe } from './truncate.pipe';
describe('TruncatePipe', () => {
let pipe: TruncatePipe;
beforeEach(() => {
pipe = new TruncatePipe();
});
it('create an instance', () => {
expect(pipe).toBeTruthy();
});
it('should truncate the string if it exceeds the limit', () => {
const in... | 2 |
ad-on-is/rachoon | ee5c6e8 | apps/backend/app/Validators/User.ts | TypeScript | www.github.com/ad-on-is/rachoon/tree/main/apps/backend/app/Validators/User.ts | https://raw.githubusercontent.com/ad-on-is/rachoon/ee5c6e8/apps/backend/app/Validators/User.ts | ad-on-is/rachoon ee5c6e8 apps/backend/app/Validators/User.ts | true | 200 | 1,477 | import { HttpContextContract } from '@ioc:Adonis/Core/HttpContext'
import { schema, CustomMessages, rules } from '@ioc:Adonis/Core/Validator'
class ProfileValidator {
constructor(protected ctx: HttpContextContract) {}
public schema = schema.create({
email: schema.string([
rules.email(),
rules.uniqu... | 5 |
fabioleforte/cadastro_Angular9 | 262a07c | src/app/components/product/product.service.ts | TypeScript | www.github.com/fabioleforte/cadastro_Angular9/tree/main/src/app/components/product/product.service.ts | https://raw.githubusercontent.com/fabioleforte/cadastro_Angular9/262a07c/src/app/components/product/product.service.ts | fabioleforte/cadastro_Angular9 262a07c src/app/components/product/product.service.ts | true | 200 | 1,892 | import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { MatSnackBar } from '@angular/material/snack-bar';
import { Observable, EMPTY } from 'rxjs';
import { Product } from './product.model';
import { map, catchError } from 'rxjs/operators';
@Injectable({
providedIn: 'r... | 4 |
khaliljbeli/sport-project | b1d5f34 | src/app/pipes/asterix.pipe.ts | TypeScript | www.github.com/khaliljbeli/sport-project/tree/main/src/app/pipes/asterix.pipe.ts | https://raw.githubusercontent.com/khaliljbeli/sport-project/b1d5f34/src/app/pipes/asterix.pipe.ts | khaliljbeli/sport-project b1d5f34 src/app/pipes/asterix.pipe.ts | true | 200 | 519 | import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'asterix'
})
export class AsterixPipe implements PipeTransform {
transform(ch: string) {
let voyeles = ["a", "e", "y", "u", "i", "o"];
let result = "";
let x = "";
for (let i = 0; i < ch.length; i++) {
x = ch[i];
for (l... | 1 |
fWzzy/mrnn-bp | f9b23a5 | mrnn-be/src/apis/book/book.controller.ts | TypeScript | www.github.com/fWzzy/mrnn-bp/tree/main/mrnn-be/src/apis/book/book.controller.ts | https://raw.githubusercontent.com/fWzzy/mrnn-bp/f9b23a5/mrnn-be/src/apis/book/book.controller.ts | fWzzy/mrnn-bp f9b23a5 mrnn-be/src/apis/book/book.controller.ts | true | 200 | 1,604 | import { AuthUser } from '@app/core/decorators/auth-user.decorator';
import { GenericController } from '@app/core/decorators/generic-controller.decorator';
import { UUIDParam } from '@app/core/decorators/uuid-param.decorator';
import { Body, Delete, Get, Post, Put } from '@nestjs/common';
import { Book } from 'src/enti... | 2 |
AnderBuendia/sharerecipes | 5deeb06 | packages/server/src/modules/user/application/use-case/delete-user.use-case.ts | TypeScript | www.github.com/AnderBuendia/sharerecipes/tree/main/packages/server/src/modules/user/application/use-case/delete-user.use-case.ts | https://raw.githubusercontent.com/AnderBuendia/sharerecipes/5deeb06/packages/server/src/modules/user/application/use-case/delete-user.use-case.ts | AnderBuendia/sharerecipes 5deeb06 packages/server/src/modules/user/application/use-case/delete-user.use-case.ts | true | 200 | 2,152 | import { ApolloError } from 'apollo-server-express';
import type { UserRepositoryInterface } from '@Modules/user/infrastructure/repository/user-mongo.repository.interface';
import type { RecipeRepositoryInterface } from '@Modules/recipe/infrastructure/repository/recipe-mongo.repository.interface';
import type { Comment... | 3 |
statisticsnorway/mimir | 659aadc | src/main/resources/services/subtopic/subtopic.ts | TypeScript | www.github.com/statisticsnorway/mimir/tree/main/src/main/resources/services/subtopic/subtopic.ts | https://raw.githubusercontent.com/statisticsnorway/mimir/659aadc/src/main/resources/services/subtopic/subtopic.ts | statisticsnorway/mimir 659aadc src/main/resources/services/subtopic/subtopic.ts | true | 200 | 761 | import { query } from '/lib/xp/content'
export const get = (req: XP.Request): XP.Response => {
const subtopicQuery = query({
count: 1000,
query: `components.page.config.mimir.default.subjectType LIKE "subSubject"`,
})
const subtopicHits = req.params.query
? subtopicQuery.hits.filter((subtopic) =>
... | 0 |
Franco-Martin11/Audiophile-ecommerce | 6b2fbf8 | constant/formData.ts | TypeScript | www.github.com/Franco-Martin11/Audiophile-ecommerce/tree/main/constant/formData.ts | https://raw.githubusercontent.com/Franco-Martin11/Audiophile-ecommerce/6b2fbf8/constant/formData.ts | Franco-Martin11/Audiophile-ecommerce 6b2fbf8 constant/formData.ts | true | 200 | 1,668 | import { FormField } from "@/types/type";
export const FORM_DATA: FormField[] = [
{
categoryForm: "billing details",
fields: [
{
label: "Email Address",
name: "email",
type: "email",
value: "",
placeholder: "johndoe@gmail.com",
},
{
label: "Pa... | 5 |
PGaillot/rust-handler | 2460532 | src/app/components/transparent-card/transparent-card.component.ts | TypeScript | www.github.com/PGaillot/rust-handler/tree/main/src/app/components/transparent-card/transparent-card.component.ts | https://raw.githubusercontent.com/PGaillot/rust-handler/2460532/src/app/components/transparent-card/transparent-card.component.ts | PGaillot/rust-handler 2460532 src/app/components/transparent-card/transparent-card.component.ts | true | 200 | 844 | import { Component, Input } from '@angular/core'
import { LinkElement, LinkElementComponent } from '../link-element/link-ekement.component'
@Component({
selector: 'transparent-card',
standalone: true,
styleUrl: './transparent-card.component.scss',
imports: [LinkElementComponent],
template: `
<div id="tra... | 7 |
iamogbz/react-ducks | 3fa279b | src/createDuck.ts | TypeScript | www.github.com/iamogbz/react-ducks/tree/main/src/createDuck.ts | https://raw.githubusercontent.com/iamogbz/react-ducks/3fa279b/src/createDuck.ts | iamogbz/react-ducks 3fa279b src/createDuck.ts | true | 200 | 2,608 | import { createReducer } from "./createReducer";
import { createAction } from "./createAction";
import { getKeys } from "./utils/object";
function getNS<N extends string, T extends string, U extends string>(
name: N,
actionType: T,
): U {
return `${name}/${actionType}` as U;
}
type CreateDuckReturnType<
... | 4 |
jesperc/portfolio-corona | ff8b0ba | src/components/routes/index/gallery/getProjectsBySelectedTags.ts | TypeScript | www.github.com/jesperc/portfolio-corona/tree/main/src/components/routes/index/gallery/getProjectsBySelectedTags.ts | https://raw.githubusercontent.com/jesperc/portfolio-corona/ff8b0ba/src/components/routes/index/gallery/getProjectsBySelectedTags.ts | jesperc/portfolio-corona ff8b0ba src/components/routes/index/gallery/getProjectsBySelectedTags.ts | true | 200 | 626 | import { Tag, Project, TagId, ProjectType } from '../../../../db/models'
const getProjectsBySelectedTags = (
projects: Project[],
selectedTags: TagId[],
type: ProjectType
): Project[] => {
return projects
.filter(
(project: Project) =>
project.type === type &&
project.tags
.... | 1 |
yamaneko05/pusher-nextjs | 0b88df4 | src/services/MessageService.ts | TypeScript | www.github.com/yamaneko05/pusher-nextjs/tree/main/src/services/MessageService.ts | https://raw.githubusercontent.com/yamaneko05/pusher-nextjs/0b88df4/src/services/MessageService.ts | yamaneko05/pusher-nextjs 0b88df4 src/services/MessageService.ts | true | 200 | 1,452 | import { AttachmentRepository } from "@/repositories/AttachmentRepository";
import { MessageRepository } from "@/repositories/MessageRepository";
import { pusherServer } from "@/libs/pusher-server";
import { storage } from "@/utils/storage";
export class MessageService {
async create(
userId: string,
chatRoo... | 3 |
andrapotlog/CRM_frontend | 43869a4 | src/app/service/request-service/request.actions.ts | TypeScript | www.github.com/andrapotlog/CRM_frontend/tree/main/src/app/service/request-service/request.actions.ts | https://raw.githubusercontent.com/andrapotlog/CRM_frontend/43869a4/src/app/service/request-service/request.actions.ts | andrapotlog/CRM_frontend 43869a4 src/app/service/request-service/request.actions.ts | true | 200 | 1,999 | import { createAction, props } from '@ngrx/store';
import { ErrorModel } from '../error.interface';
import { ServiceRequestModel } from './request.model';
export const loadServiceRequests = createAction(
'[ServiceRequest] Load ServiceRequests',
);
export const loadServiceRequestsSuccess = createAction(
'[ServiceRe... | 6 |
youwol/dataframe | 801e3ac | src/tests/create.test.ts | TypeScript | www.github.com/youwol/dataframe/tree/main/src/tests/create.test.ts | https://raw.githubusercontent.com/youwol/dataframe/801e3ac/src/tests/create.test.ts | youwol/dataframe 801e3ac src/tests/create.test.ts | true | 200 | 780 | import { createArray, createTyped } from '../lib'
test('test create array', () => {
const array1 = createArray(100, (i) => i ** 2)
expect(array1.length).toEqual(100)
array1.forEach((v, i) => expect(v).toEqual(i ** 2))
const array2 = createArray(100, 0)
expect(array2.length).toEqual(100)
array2... | 0 |
buiducdong/vimash-fe | 29f5e67 | src/app/pages/system/customer-destination/datatable-customer/datatable-customer.component.ts | TypeScript | www.github.com/buiducdong/vimash-fe/tree/main/src/app/pages/system/customer-destination/datatable-customer/datatable-customer.component.ts | https://raw.githubusercontent.com/buiducdong/vimash-fe/29f5e67/src/app/pages/system/customer-destination/datatable-customer/datatable-customer.component.ts | buiducdong/vimash-fe 29f5e67 src/app/pages/system/customer-destination/datatable-customer/datatable-customer.component.ts | true | 200 | 1,609 | import { Component, Input, OnInit, ViewChild } from '@angular/core';
import { HttpService } from 'src/app/core/services/http/http.service';
import { environment } from '../../../../../environments/environment'
import { customer } from 'src/app/layout/models/customer.model';
import { MatTableDataSource } from '@angular/... | 5 |
vcl/ng-vcl | 3e7c17a | lib/ng-vcl/src/dateadapter/parsers/iso.ts | TypeScript | www.github.com/vcl/ng-vcl/tree/main/lib/ng-vcl/src/dateadapter/parsers/iso.ts | https://raw.githubusercontent.com/vcl/ng-vcl/3e7c17a/lib/ng-vcl/src/dateadapter/parsers/iso.ts | vcl/ng-vcl 3e7c17a lib/ng-vcl/src/dateadapter/parsers/iso.ts | true | 200 | 2,041 | import {
DateAdapterBaseParseFormats,
DateAdapterBaseDisplayFormats,
} from '../interfaces';
import { DateAdapterParser } from './types';
import { extractInt, unsupportedFormat, pad, intlFallback } from './utils';
const REGEX_DATE = /^\s*(\d{4})-(1[012]|0?[1-9])-(3[01]|[12][0-9]|0?[1-9])\s*$/;
const REGEX_MONTH = ... | 2 |
LeetCode-in-TypeScript/LeetCode-in-TypeScript | f5e5230 | src/test/ts/g0101_0200/s0139_word_break/solution.test.ts | TypeScript | www.github.com/LeetCode-in-TypeScript/LeetCode-in-TypeScript/tree/main/src/test/ts/g0101_0200/s0139_word_break/solution.test.ts | https://raw.githubusercontent.com/LeetCode-in-TypeScript/LeetCode-in-TypeScript/f5e5230/src/test/ts/g0101_0200/s0139_word_break/solution.test.ts | LeetCode-in-TypeScript/LeetCode-in-TypeScript f5e5230 src/test/ts/g0101_0200/s0139_word_break/solution.test.ts | true | 200 | 468 | // tslint:disable:no-magic-numbers
import { wordBreak } from 'src/main/ts/g0101_0200/s0139_word_break/solution'
import { expect, test } from 'vitest'
test('wordBreak', () => {
expect(wordBreak('leetcode', ['leet', 'code'])).toEqual(true)
})
test('wordBreak2', () => {
expect(wordBreak('applepenapple', ['apple'... | 3 |
bruno-bombonate/boilerplate | d3dc664 | workspaces/angular/utils/services/user/user.service.ts | TypeScript | www.github.com/bruno-bombonate/boilerplate/tree/main/workspaces/angular/utils/services/user/user.service.ts | https://raw.githubusercontent.com/bruno-bombonate/boilerplate/d3dc664/workspaces/angular/utils/services/user/user.service.ts | bruno-bombonate/boilerplate d3dc664 workspaces/angular/utils/services/user/user.service.ts | true | 200 | 554 | import { Injectable } from '@angular/core';
import { BehaviorSubject, Observable } from 'rxjs';
@Injectable({
providedIn: 'root'
})
export class UserService {
private userBehaviorSubject: BehaviorSubject<undefined | any> = new BehaviorSubject(undefined);
public get user(): undefined | any {
return this.use... | 7 |
hteinlinnaung/EMR_Frontend | df5da9d | src/features/diseases/api/delete-disease.ts | TypeScript | www.github.com/hteinlinnaung/EMR_Frontend/tree/main/src/features/diseases/api/delete-disease.ts | https://raw.githubusercontent.com/hteinlinnaung/EMR_Frontend/df5da9d/src/features/diseases/api/delete-disease.ts | hteinlinnaung/EMR_Frontend df5da9d src/features/diseases/api/delete-disease.ts | true | 200 | 1,033 |
import { useMutation, useQueryClient } from "@tanstack/react-query";
import { IDisease } from "../model/IDisease";
// DELETE hook (delete patient in api)
export function useDeleteDisease() {
const queryClient = useQueryClient();
return useMutation({
mutationFn: async (diseaseId: string) => {
... | 6 |
240502/sdoctor-frontend | ab6b15a | src/constants/api.ts | TypeScript | www.github.com/240502/sdoctor-frontend/tree/main/src/constants/api.ts | https://raw.githubusercontent.com/240502/sdoctor-frontend/ab6b15a/src/constants/api.ts | 240502/sdoctor-frontend ab6b15a src/constants/api.ts | true | 200 | 352 | import axios from 'axios';
export const baseURL = 'http://localhost:400/';
export const apiClient = axios.create({
baseURL: baseURL + 'api',
timeout: 1000 * 60 * 30 * 3,
});
// export const nestJsServiceUrl = 'http://localhost:9999';
// export const nestApi = axios.create({
// baseURL: nestJsServiceUrl,
//... | 1 |
helpinghour/angu | 6b70515 | src/app - Copy/services/allcounts.service.ts | TypeScript | www.github.com/helpinghour/angu/tree/main/src/app - Copy/services/allcounts.service.ts | https://raw.githubusercontent.com/helpinghour/angu/6b70515/src/app%20-%20Copy/services/allcounts.service.ts | helpinghour/angu 6b70515 src/app - Copy/services/allcounts.service.ts | true | 200 | 369 | import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http'
@Injectable({
providedIn: 'root'
})
export class AllcountsService {
private allCountUrl = "https://adscombined.com/v1/public/api/AllCounts";
constructor( private allcount: HttpClient ) { }
getAllCounts(){
re... | 0 |
Govrn-HQ/govrn-monorepo | 9a904db | apps/protocol-api/src/prisma/generated/type-graphql/models/Contribution.ts | TypeScript | www.github.com/Govrn-HQ/govrn-monorepo/tree/main/apps/protocol-api/src/prisma/generated/type-graphql/models/Contribution.ts | https://raw.githubusercontent.com/Govrn-HQ/govrn-monorepo/9a904db/apps/protocol-api/src/prisma/generated/type-graphql/models/Contribution.ts | Govrn-HQ/govrn-monorepo 9a904db apps/protocol-api/src/prisma/generated/type-graphql/models/Contribution.ts | true | 200 | 2,593 | import * as TypeGraphQL from "type-graphql";
import * as GraphQLScalars from "graphql-scalars";
import { Prisma } from "@prisma/client";
import { DecimalJSScalar } from "../scalars";
import { ActivityType } from "../models/ActivityType";
import { Attestation } from "../models/Attestation";
import { Chain } from "../mod... | 5 |
ABaulderstone/react-calendar | b9b642e | vite.config.ts | TypeScript | www.github.com/ABaulderstone/react-calendar/tree/main/vite.config.ts | https://raw.githubusercontent.com/ABaulderstone/react-calendar/b9b642e/vite.config.ts | ABaulderstone/react-calendar b9b642e vite.config.ts | true | 200 | 479 | import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
export default defineConfig({
optimizeDeps: {
esbuildOptions: {
target: 'es2020',
},
},
esbuild: {
// https://github.com/vitejs/vite/issues/8644#issuecomment-1159308803
logOverride: { 'this-is-undefined-in-esm': ... | 4 |
KatherinaFed/react-mern-app | 60193f0 | client/src/store/users/usersSlice.ts | TypeScript | www.github.com/KatherinaFed/react-mern-app/tree/main/client/src/store/users/usersSlice.ts | https://raw.githubusercontent.com/KatherinaFed/react-mern-app/60193f0/client/src/store/users/usersSlice.ts | KatherinaFed/react-mern-app 60193f0 client/src/store/users/usersSlice.ts | true | 200 | 1,351 | import { createSlice } from '@reduxjs/toolkit';
import { EventI } from '../events/eventSlice';
export interface UserI {
id: string;
username: string;
firstname: string;
lastname: string;
location: string;
avatar: string;
sport: string[];
followers: object[];
following: object[];
events: EventI[];
... | 3 |
tiagoluizpoli/alpha-bot | a7ee734 | src/domain/errors/invalid-team-count.ts | TypeScript | www.github.com/tiagoluizpoli/alpha-bot/tree/main/src/domain/errors/invalid-team-count.ts | https://raw.githubusercontent.com/tiagoluizpoli/alpha-bot/a7ee734/src/domain/errors/invalid-team-count.ts | tiagoluizpoli/alpha-bot a7ee734 src/domain/errors/invalid-team-count.ts | true | 200 | 322 | import { UsecaseError } from '@/domain';
export class InvalidTeamCountError extends Error implements UsecaseError {
constructor() {
super('The amount of teams are invalid according to the number of users');
this.name = 'InvalidTeamCountError';
this.code = 'INVALID_TEAM_COUNT_ERROR';
}
code: string;
... | 7 |
harmony7/compute-js-rsc | c25c16e | src/webpack-loader/index.ts | TypeScript | www.github.com/harmony7/compute-js-rsc/tree/main/src/webpack-loader/index.ts | https://raw.githubusercontent.com/harmony7/compute-js-rsc/c25c16e/src/webpack-loader/index.ts | harmony7/compute-js-rsc c25c16e src/webpack-loader/index.ts | true | 200 | 12,022 | import nodeFs from 'node:fs';
import nodePath from 'node:path';
import nodeUrl from 'node:url';
import { type LoaderDefinition, type LoaderContext } from 'webpack';
import * as acorn from 'acorn-loose';
type AcornProgram = ReturnType<typeof acorn.parse>['body'];
type ModuleCacheValue =
| false
| 'commonjs'
| 'm... | 1 |
Karthiik26/Tailor_Frontend | 2a2781a | src/app/appointment/appointment.component.ts | TypeScript | www.github.com/Karthiik26/Tailor_Frontend/tree/main/src/app/appointment/appointment.component.ts | https://raw.githubusercontent.com/Karthiik26/Tailor_Frontend/2a2781a/src/app/appointment/appointment.component.ts | Karthiik26/Tailor_Frontend 2a2781a src/app/appointment/appointment.component.ts | true | 200 | 4,618 | import { Component } from '@angular/core';
import { AppointmentService } from '../service/appointment.service';
import { TailorService } from '../service/Tailor/tailor.service';
import Swal from 'sweetalert2';
@Component({
selector: 'app-appointment',
templateUrl: './appointment.component.html',
styleUrls: ['./a... | 6 |
alaeddine-hash/Money_Guard_Front_end | f63e67a | src/app/board-admin/board-admin.component.ts | TypeScript | www.github.com/alaeddine-hash/Money_Guard_Front_end/tree/main/src/app/board-admin/board-admin.component.ts | https://raw.githubusercontent.com/alaeddine-hash/Money_Guard_Front_end/f63e67a/src/app/board-admin/board-admin.component.ts | alaeddine-hash/Money_Guard_Front_end f63e67a src/app/board-admin/board-admin.component.ts | true | 200 | 2,872 | import { Component, OnInit } from '@angular/core';
import { UserService } from '../_services/user.service';
import {FormBuilder, FormGroup} from "@angular/forms";
import {User} from "../models/user";
import {EmployeeService} from "../_services/employee.service";
import {Router} from "@angular/router";
@Component({
s... | 0 |
jacksonUsuario/proyecto-react | ed31f85 | src/data/veicles.ts | TypeScript | www.github.com/jacksonUsuario/proyecto-react/tree/main/src/data/veicles.ts | https://raw.githubusercontent.com/jacksonUsuario/proyecto-react/ed31f85/src/data/veicles.ts | jacksonUsuario/proyecto-react ed31f85 src/data/veicles.ts | true | 200 | 706 | import { useState } from "react";
interface vehiclesInfoPorp{
name:string;
descripcion:string;
image:string;
}
const [listaVehiculos,setlistaVehiculos] = useState<vehiclesInfoPorp[]> ([
{
name : "buggaty",
descripcion : "modelo veiron o como se escriba 2023",
image:"https://upl... | 2 |
lchxiang/ns-web-core | 180d5a9 | packages/components/src/hooks/useWatermark.ts | TypeScript | www.github.com/lchxiang/ns-web-core/tree/main/packages/components/src/hooks/useWatermark.ts | https://raw.githubusercontent.com/lchxiang/ns-web-core/180d5a9/packages/components/src/hooks/useWatermark.ts | lchxiang/ns-web-core 180d5a9 packages/components/src/hooks/useWatermark.ts | true | 200 | 4,618 | // import throttle from 'lodash-es/throttle'
import uniqueId from 'lodash-es/uniqueId'
import { getCurrentInstance, onBeforeUnmount, shallowRef, unref } from 'vue'
type attr = {
font?: string
fillStyle?: string
}
export function useWatermark(appendEl: Element | null | undefined = document.body as HTMLElement) {
/... | 4 |
gaurav-0494/LIVEDOCS-editor | 6749a38 | lib/actions/user.actions.ts | TypeScript | www.github.com/gaurav-0494/LIVEDOCS-editor/tree/main/lib/actions/user.actions.ts | https://raw.githubusercontent.com/gaurav-0494/LIVEDOCS-editor/6749a38/lib/actions/user.actions.ts | gaurav-0494/LIVEDOCS-editor 6749a38 lib/actions/user.actions.ts | true | 200 | 1,524 | 'use server';
import { clerkClient } from "@clerk/nextjs/server";
import { parseStringify } from "../utils";
import { liveblocks } from "../liveblocks";
export const getClerkUsers = async ({ userIds }: { userIds: string[]}) => {
try {
const {data} = await clerkClient.users.getUserList({
... | 7 |
IBI-s-IT/ibi-lounge-backend | 5bc2542 | apps/lounge-backend/src/lib/validateTelegramInit.ts | TypeScript | www.github.com/IBI-s-IT/ibi-lounge-backend/tree/main/apps/lounge-backend/src/lib/validateTelegramInit.ts | https://raw.githubusercontent.com/IBI-s-IT/ibi-lounge-backend/5bc2542/apps/lounge-backend/src/lib/validateTelegramInit.ts | IBI-s-IT/ibi-lounge-backend 5bc2542 apps/lounge-backend/src/lib/validateTelegramInit.ts | true | 200 | 647 | import { createHmac } from 'node:crypto';
export function validateInit(init: string) {
const urlParams = new URLSearchParams(init);
const hash = urlParams.get('hash');
urlParams.delete('hash');
urlParams.sort();
let dataCheckString = '';
for (const [key, value] of urlParams.entries()) {
dataCheckStrin... | 3 |
christophercr/curso-typescript-angular-18 | 204ed78 | media-manager-ng/src/app/components/new-media-collection/new-media-collection.component.ts | TypeScript | www.github.com/christophercr/curso-typescript-angular-18/tree/main/media-manager-ng/src/app/components/new-media-collection/new-media-collection.component.ts | https://raw.githubusercontent.com/christophercr/curso-typescript-angular-18/204ed78/media-manager-ng/src/app/components/new-media-collection/new-media-collection.component.ts | christophercr/curso-typescript-angular-18 204ed78 media-manager-ng/src/app/components/new-media-collection/new-media-collection.component.ts | true | 200 | 4,875 | import type { OnChanges, SimpleChanges } from '@angular/core';
import { AfterViewInit, ChangeDetectionStrategy, Component, EventEmitter, inject, Input, OnDestroy, OnInit, Output } from '@angular/core';
import {
FormControl,
FormsModule,
ReactiveFormsModule,
Validators,
type AbstractControl,
type ValidationE... | 1 |
shwethabhaskarhegde/E-commerce | e3f4fba | src/app/auth/login/login.component.ts | TypeScript | www.github.com/shwethabhaskarhegde/E-commerce/tree/main/src/app/auth/login/login.component.ts | https://raw.githubusercontent.com/shwethabhaskarhegde/E-commerce/e3f4fba/src/app/auth/login/login.component.ts | shwethabhaskarhegde/E-commerce e3f4fba src/app/auth/login/login.component.ts | true | 200 | 1,300 | import { Component } from '@angular/core';
import { Router } from '@angular/router'; // Import Router to navigate
import { AuthService } from 'src/app/auth.service';
import { SnackbarService } from 'src/app/snackbar.service';
@Component({
selector: 'app-login',
templateUrl: './login.component.html',
styleUrls: [... | 5 |
bortch/Revealable | d2d7eb9 | test/Reveal.test.ts | TypeScript | www.github.com/bortch/Revealable/tree/main/test/Reveal.test.ts | https://raw.githubusercontent.com/bortch/Revealable/d2d7eb9/test/Reveal.test.ts | bortch/Revealable d2d7eb9 test/Reveal.test.ts | true | 200 | 7,827 |
import { expect } from 'chai';
import { ethers } from "hardhat";
import { BigNumber, FixedNumber } from "@ethersproject/bignumber";
import { base64encode, base64decode } from 'nodejs-base64';
var chaiJsonEqual = require('chai-json-equal');
var chai = require('chai');
chai.use(chaiJsonEqual);
//import dataset json
imp... | 6 |
someswar735/FullStackApp.github.io | 5e96d90 | tab3/tab3.module.ts | TypeScript | www.github.com/someswar735/FullStackApp.github.io/tree/main/tab3/tab3.module.ts | https://raw.githubusercontent.com/someswar735/FullStackApp.github.io/5e96d90/tab3/tab3.module.ts | someswar735/FullStackApp.github.io 5e96d90 tab3/tab3.module.ts | true | 200 | 878 | import { IonicModule } from '@ionic/angular';
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { Tab3Page } from './tab3.page';
import { ExploreContainerComponentModule } from '../explore-container/explore-container.module';
... | 0 |
dkahmad95/jewelry-rms-backend1 | 0e6afbf | src/supplier/services/supplier.service.ts | TypeScript | www.github.com/dkahmad95/jewelry-rms-backend1/tree/main/src/supplier/services/supplier.service.ts | https://raw.githubusercontent.com/dkahmad95/jewelry-rms-backend1/0e6afbf/src/supplier/services/supplier.service.ts | dkahmad95/jewelry-rms-backend1 0e6afbf src/supplier/services/supplier.service.ts | true | 200 | 3,055 | import { HttpException, HttpStatus, Injectable } from '@nestjs/common';
import { CreateSupplierDto, UpdateSupplierDto } from '../dto/supplier.dto';
import { SupplierEntity } from '../../entities/supplierEntities/supplier.entity';
import { InjectRepository } from '@nestjs/typeorm';
import { DeleteResult, Repository, Upd... | 4 |
selimerunkut/ethkorea_jinjang_team_repo | 18b37d3 | packages/nextjs/utils.ts | TypeScript | www.github.com/selimerunkut/ethkorea_jinjang_team_repo/tree/main/packages/nextjs/utils.ts | https://raw.githubusercontent.com/selimerunkut/ethkorea_jinjang_team_repo/18b37d3/packages/nextjs/utils.ts | selimerunkut/ethkorea_jinjang_team_repo 18b37d3 packages/nextjs/utils.ts | true | 200 | 2,723 | // https://ankr.hashnode.dev/getting-started-with-lens-protocol-as-a-frontend-developer
import {
ApolloClient,
ApolloLink,
HttpLink,
InMemoryCache,
gql,
} from '@apollo/client';
const API_URL = 'https://api.lens.dev/';
const httpLink = new HttpLink({ uri: API_URL });
const authLink = new ApolloLi... | 2 |
kmoragap/42-function-to-header | aff6340 | src/extension.ts | TypeScript | www.github.com/kmoragap/42-function-to-header/tree/main/src/extension.ts | https://raw.githubusercontent.com/kmoragap/42-function-to-header/aff6340/src/extension.ts | kmoragap/42-function-to-header aff6340 src/extension.ts | true | 200 | 2,246 | import * as vscode from 'vscode';
import * as fs from 'fs';
function updateFunctionHeader(fileName: string, functionName: string, headerPath: string) {
const headerContent = fs.readFileSync(headerPath, 'utf8');
let updatedHeaderContent = headerContent;
if (headerContent.includes('/* FUNCTIONS */')) {
update... | 1 |
cur10sDEV/dev_overflow | 2e6c13c | lib/actions/answer.action.ts | TypeScript | www.github.com/cur10sDEV/dev_overflow/tree/main/lib/actions/answer.action.ts | https://raw.githubusercontent.com/cur10sDEV/dev_overflow/2e6c13c/lib/actions/answer.action.ts | cur10sDEV/dev_overflow 2e6c13c lib/actions/answer.action.ts | true | 200 | 4,794 | "use server";
import Answer from "@/database/answer.model";
import Interaction from "@/database/interaction.model";
import Question from "@/database/question.model";
import User from "@/database/user.model";
import { revalidatePath } from "next/cache";
import { connectDB } from "../mongoose";
import {
AnswerVoteParam... | 6 |
AdrianPerdomoE/ProyectoPymes | ca138ba | FrontEnd/ProyectoPYMES/src/app/modules/app-client/components/side-bar-client/side-bar-client.component.spec.ts | TypeScript | www.github.com/AdrianPerdomoE/ProyectoPymes/tree/main/FrontEnd/ProyectoPYMES/src/app/modules/app-client/components/side-bar-client/side-bar-client.component.spec.ts | https://raw.githubusercontent.com/AdrianPerdomoE/ProyectoPymes/ca138ba/FrontEnd/ProyectoPYMES/src/app/modules/app-client/components/side-bar-client/side-bar-client.component.spec.ts | AdrianPerdomoE/ProyectoPymes ca138ba FrontEnd/ProyectoPYMES/src/app/modules/app-client/components/side-bar-client/side-bar-client.component.spec.ts | true | 200 | 650 | import { ComponentFixture, TestBed } from '@angular/core/testing';
import { SideBarClientComponent } from './side-bar-client.component';
describe('SideBarClientComponent', () => {
let component: SideBarClientComponent;
let fixture: ComponentFixture<SideBarClientComponent>;
beforeEach(async () => {
await Te... | 5 |
NextGenSoftwareUK/The-Global-Healing-Network-OAPP | e4587f1 | src/app/components/common/cards/data-card/data-card.component.ts | TypeScript | www.github.com/NextGenSoftwareUK/The-Global-Healing-Network-OAPP/tree/main/src/app/components/common/cards/data-card/data-card.component.ts | https://raw.githubusercontent.com/NextGenSoftwareUK/The-Global-Healing-Network-OAPP/e4587f1/src/app/components/common/cards/data-card/data-card.component.ts | NextGenSoftwareUK/The-Global-Healing-Network-OAPP e4587f1 src/app/components/common/cards/data-card/data-card.component.ts | true | 200 | 448 | import { Component, Input } from '@angular/core';
@Component({
selector: 'app-data-card',
templateUrl: './data-card.component.html',
styleUrls: ['./data-card.component.scss']
})
export class DataCardComponent {
@Input() data:any
constructor() {
console.log(this.data)
}
getNumbers(numbers: any): numb... | 0 |
SoloSynth1/airnow-scraper | adb4cce | src/historical.ts | TypeScript | www.github.com/SoloSynth1/airnow-scraper/tree/main/src/historical.ts | https://raw.githubusercontent.com/SoloSynth1/airnow-scraper/adb4cce/src/historical.ts | SoloSynth1/airnow-scraper adb4cce src/historical.ts | true | 200 | 1,668 | import {getLocationData, BaseFetcher, writeToPath} from "./common.js";
import { default as axios } from 'axios';
import pLimit from 'p-limit';
import * as path from 'path';
type HistoricalMonitor = {
files: object
}
export class HistoricalFetcher implements BaseFetcher {
outputDest: string;
concurrencyLi... | 4 |
RohithK25/giva-ai-website | 9122d80 | tailwind.config.ts | TypeScript | www.github.com/RohithK25/giva-ai-website/tree/main/tailwind.config.ts | https://raw.githubusercontent.com/RohithK25/giva-ai-website/9122d80/tailwind.config.ts | RohithK25/giva-ai-website 9122d80 tailwind.config.ts | true | 200 | 1,720 | import type { Config } from "tailwindcss";
export default {
darkMode: ["class"],
content: [
"./pages/**/*.{ts,tsx}",
"./components/**/*.{ts,tsx}",
"./app/**/*.{ts,tsx}",
"./src/**/*.{ts,tsx}",
],
prefix: "",
theme: {
container: {
center: true,
padding: "2rem",
screens: {... | 2 |
ayoubbenlahcen/TP4--Spring---Angular---SD---Master---MIAAD---FSM---2024 | a916de6 | src/app/login/login.component.ts | TypeScript | www.github.com/ayoubbenlahcen/TP4--Spring---Angular---SD---Master---MIAAD---FSM---2024/tree/main/src/app/login/login.component.ts | https://raw.githubusercontent.com/ayoubbenlahcen/TP4--Spring---Angular---SD---Master---MIAAD---FSM---2024/a916de6/src/app/login/login.component.ts | ayoubbenlahcen/TP4--Spring---Angular---SD---Master---MIAAD---FSM---2024 a916de6 src/app/login/login.component.ts | true | 200 | 1,416 | import {Component, OnInit} from '@angular/core';
import {FormBuilder, FormGroup} from "@angular/forms";
import {Router} from "@angular/router";
import {AuthService} from "../services/auth.service";
import {error} from "@angular/compiler-cli/src/transformers/util";
@Component({
selector: 'app-login',
templa... | 7 |
MOhhh-ok/gasup | ac5b4c6 | src/deploy.ts | TypeScript | www.github.com/MOhhh-ok/gasup/tree/main/src/deploy.ts | https://raw.githubusercontent.com/MOhhh-ok/gasup/ac5b4c6/src/deploy.ts | MOhhh-ok/gasup ac5b4c6 src/deploy.ts | true | 200 | 883 | import { execSync } from 'child_process';
export function deploy() {
const currentDeployments = getCurrentDeployments();
const latestDeployment = currentDeployments[0];
if (latestDeployment) {
console.log(
'deploy to latest: ' +
latestDeployment.id +
' ' +
latestDeployment.versi... | 3 |
katsumiok/askit-artifact | e8609af | GSM8K/ts/src2/askit/theSchoolAuditoriumHasX1_8d3478.ts | TypeScript | www.github.com/katsumiok/askit-artifact/tree/main/GSM8K/ts/src2/askit/theSchoolAuditoriumHasX1_8d3478.ts | https://raw.githubusercontent.com/katsumiok/askit-artifact/e8609af/GSM8K/ts/src2/askit/theSchoolAuditoriumHasX1_8d3478.ts | katsumiok/askit-artifact e8609af GSM8K/ts/src2/askit/theSchoolAuditoriumHasX1_8d3478.ts | true | 200 | 745 | // Recompilation count: 0
export function theSchoolAuditoriumHasX1_8d3478({ x1, x2 }: {
x1: number;
x2: number;
}): number {
// The school auditorium has 'x1' rows of seats. There are 'x2' seats in each row.
let totalSeats: number = x1 * x2;
// One-fourth of the seats were occupied by the administr... | 1 |
0Walle/Salite | bc79f12 | src/functions_core.ts | TypeScript | www.github.com/0Walle/Salite/tree/main/src/functions_core.ts | https://raw.githubusercontent.com/0Walle/Salite/bc79f12/src/functions_core.ts | 0Walle/Salite bc79f12 src/functions_core.ts | true | 200 | 4,441 | import {
DataArray, Nil, strideAxis, checkShape
} from './array.ts';
import { MArray, Value, FuncDesc } from "./types.ts";
export function errorPrefix(name: string, message: string | Error) {
if (typeof message != 'string') {
message.message = `${name.replace('a', 'α').replace('w', 'ω')}: ${message.message}`
ret... | 5 |
tiagodlb/Hackathon-Trilhas | 8d833af | src/services/ambassadorService.ts | TypeScript | www.github.com/tiagodlb/Hackathon-Trilhas/tree/main/src/services/ambassadorService.ts | https://raw.githubusercontent.com/tiagodlb/Hackathon-Trilhas/8d833af/src/services/ambassadorService.ts | tiagodlb/Hackathon-Trilhas 8d833af src/services/ambassadorService.ts | true | 200 | 1,279 | import { conflictError } from '@/utils/errorUtils.js'
import * as ambassadorRepository from '../repositories/ambassadorRepository.js'
import { GetAmbassadorData } from '@/types/ambassadorType.js'
async function findAllAmbassador(): Promise<GetAmbassadorData[]> {
return ambassadorRepository.findEverything()
}
async ... | 0 |
HanSuhhi/unbound-king | 168865a | src/components/ui/layout/composables/aside.ts | TypeScript | www.github.com/HanSuhhi/unbound-king/tree/main/src/components/ui/layout/composables/aside.ts | https://raw.githubusercontent.com/HanSuhhi/unbound-king/168865a/src/components/ui/layout/composables/aside.ts | HanSuhhi/unbound-king 168865a src/components/ui/layout/composables/aside.ts | true | 200 | 739 | import { defer } from "lodash";
import type { Ref, Slot } from "vue";
import { unref, watchEffect } from "vue";
import type { StyleSetter } from "../../tool/styleSetter.tool";
import { useSize } from "../../composables/size";
import { useTemplateClassList } from "../../composables/templateClassList";
export function u... | 6 |
griffithlab/civic-v2 | 81719af | client/src/app/forms/components/string-tag/string-tag.component.ts | TypeScript | www.github.com/griffithlab/civic-v2/tree/main/client/src/app/forms/components/string-tag/string-tag.component.ts | https://raw.githubusercontent.com/griffithlab/civic-v2/81719af/client/src/app/forms/components/string-tag/string-tag.component.ts | griffithlab/civic-v2 81719af client/src/app/forms/components/string-tag/string-tag.component.ts | true | 200 | 725 | import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { EntityTagPopoverInput } from '../entity-tag-popover/entity-tag-popover.component';
@Component({
selector: 'cvc-string-tag',
templateUrl: './string-tag.component.html',
styleUrls: ['./string-tag.component.less'],
st... | 4 |
davidcoderistov/chainerd | 3879b8b | src/services/etherscan.ts | TypeScript | www.github.com/davidcoderistov/chainerd/tree/main/src/services/etherscan.ts | https://raw.githubusercontent.com/davidcoderistov/chainerd/3879b8b/src/services/etherscan.ts | davidcoderistov/chainerd 3879b8b src/services/etherscan.ts | true | 200 | 4,545 | import axios from 'axios'
import { NETWORK } from '../config'
const ETHERSCAN_API_KEY = process.env.REACT_APP_ETHERSCAN_API_KEY
export function getAxiosInstance (network: NETWORK) {
if (network === 'mainnet') {
return axios.create({
baseURL: 'https://api.etherscan.io/api'
})
}
... | 2 |
Tuyeto-maker/Tuyetomaker-challenge | 91e8f55 | web/admin-dashboard/src/assets/images/index.ts | TypeScript | www.github.com/Tuyeto-maker/Tuyetomaker-challenge/tree/main/web/admin-dashboard/src/assets/images/index.ts | https://raw.githubusercontent.com/Tuyeto-maker/Tuyetomaker-challenge/91e8f55/web/admin-dashboard/src/assets/images/index.ts | Tuyeto-maker/Tuyetomaker-challenge 91e8f55 web/admin-dashboard/src/assets/images/index.ts | true | 200 | 250 | import background from './background-auth.png'
import logoLarge from './logo-large.png'
import logoSmall from './logo-small.png'
import logoWhiteSmall from './logo-white-small.png'
export {
background,
logoLarge,
logoSmall,
logoWhiteSmall,
} | 3 |
Shevtsooov/ps-rental-service-server | b2bc290 | src/models/games.ts | TypeScript | www.github.com/Shevtsooov/ps-rental-service-server/tree/main/src/models/games.ts | https://raw.githubusercontent.com/Shevtsooov/ps-rental-service-server/b2bc290/src/models/games.ts | Shevtsooov/ps-rental-service-server b2bc290 src/models/games.ts | true | 200 | 1,119 | import mongoose from 'mongoose';
export interface IGame {
title: string;
iconLink: string;
icon: string;
gameId: string;
poster: string;
description: string;
videoReview: string;
videoGameplay: string;
price: number;
discountedPrice: number;
category: string[];
players: string;
disclaimers: s... | 7 |
anfivewer/an5wer | 95b6a08 | packages/util/src/stream/stream.spec.ts | TypeScript | www.github.com/anfivewer/an5wer/tree/main/packages/util/src/stream/stream.spec.ts | https://raw.githubusercontent.com/anfivewer/an5wer/95b6a08/packages/util/src/stream/stream.spec.ts | anfivewer/an5wer 95b6a08 packages/util/src/stream/stream.spec.ts | true | 200 | 2,081 | import {Defer} from '../async/defer';
import {sleep} from '../async/sleep';
import {createStream} from './stream';
describe('stream', () => {
it('should finish on async pushing&finish', async () => {
const stream = createStream<string>();
const startPushingDefer = new Defer();
const pushingPromise = (a... | 1 |
danillojm/tmphone | 8da0919 | src/services/ClientService.ts | TypeScript | www.github.com/danillojm/tmphone/tree/main/src/services/ClientService.ts | https://raw.githubusercontent.com/danillojm/tmphone/8da0919/src/services/ClientService.ts | danillojm/tmphone 8da0919 src/services/ClientService.ts | true | 200 | 1,805 | import { AppDataSource } from "../database/data-source";
import { Client } from "../model/Client";
type ClienteRequery = {
name: string;
phoneNumber: string;
email: string;
cpf: string;
observation: string;
}
type ClienteUpdateRequery = {
id: number
name: string;
phoneNumber: string;
email: strin... | 0 |
anshulkuthe02/SecureHer | b602b94 | app/lib/db.ts | TypeScript | www.github.com/anshulkuthe02/SecureHer/tree/main/app/lib/db.ts | https://raw.githubusercontent.com/anshulkuthe02/SecureHer/b602b94/app/lib/db.ts | anshulkuthe02/SecureHer b602b94 app/lib/db.ts | true | 200 | 761 | import { openDB, DBSchema, IDBPDatabase } from 'idb'
interface MyDB extends DBSchema {
contacts: {
key: string
value: {
id: string
name: string
phone: string
timestamp: number
}
}
recordings: {
key: string
value: {
id: string
blob: Blob
type: string
... | 5 |
inwilis/tor2e-reckoning-plugin | a4537d1 | src/reckoning/shire/ShireReckoningDate.ts | TypeScript | www.github.com/inwilis/tor2e-reckoning-plugin/tree/main/src/reckoning/shire/ShireReckoningDate.ts | https://raw.githubusercontent.com/inwilis/tor2e-reckoning-plugin/a4537d1/src/reckoning/shire/ShireReckoningDate.ts | inwilis/tor2e-reckoning-plugin a4537d1 src/reckoning/shire/ShireReckoningDate.ts | true | 200 | 2,981 | import {ReckoningDate} from "../ReckoningDate";
import {ShireMonth} from "./ShireMonth";
import {Reckoning} from "../Reckoning";
import {DayOfWeek} from "../DayOfWeek";
import {SHIRE_REFORM_YEAR, shireReckoning} from "./ShireReckoning";
import {SHIRE_RECKONING_START_IN_STEWARDS, STEWARDS_RECKONING_START} from "../stewa... | 6 |
oluwaeinstein007/nxGnosis | 7ec0601 | src/app.module.ts | TypeScript | www.github.com/oluwaeinstein007/nxGnosis/tree/main/src/app.module.ts | https://raw.githubusercontent.com/oluwaeinstein007/nxGnosis/7ec0601/src/app.module.ts | oluwaeinstein007/nxGnosis 7ec0601 src/app.module.ts | true | 200 | 695 | import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { IngestionModule } from './ingestion/ingestion.module';
import { AiModule } from './ai/ai.module';
import { VectorDbModule } from './vector-db/vector-db.module';
import { Conver... | 4 |
shakilahmed3/authwithuploadcsv | 9b7d9b1 | lib/user.ts | TypeScript | www.github.com/shakilahmed3/authwithuploadcsv/tree/main/lib/user.ts | https://raw.githubusercontent.com/shakilahmed3/authwithuploadcsv/9b7d9b1/lib/user.ts | shakilahmed3/authwithuploadcsv 9b7d9b1 lib/user.ts | true | 200 | 1,245 | export type User = {
id: number;
firstName: string;
lastName: string;
email: string;
mobile: string;
nid: string;
dob: string;
password: string;
role: string;
}
let users: User[] = [
{
id: 1,
firstName: "Jahangir",
lastName: "Alom",
email: "admin@... | 3 |
Cleiton-D/sema-monorepo | ed2da87 | lib/api/src/shared/infra/typeorm/migrations/1618184695118-CreateEnrollTrigger.ts | TypeScript | www.github.com/Cleiton-D/sema-monorepo/tree/main/lib/api/src/shared/infra/typeorm/migrations/1618184695118-CreateEnrollTrigger.ts | https://raw.githubusercontent.com/Cleiton-D/sema-monorepo/ed2da87/lib/api/src/shared/infra/typeorm/migrations/1618184695118-CreateEnrollTrigger.ts | Cleiton-D/sema-monorepo ed2da87 lib/api/src/shared/infra/typeorm/migrations/1618184695118-CreateEnrollTrigger.ts | true | 200 | 1,930 | import { MigrationInterface, QueryRunner } from 'typeorm';
export default class CreateEnrollTrigger1618184695118
implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(/* sql */ `
CREATE OR REPLACE FUNCTION create_enroll_school_reports_func()
... | 2 |
snaketbssk/employees-monolith-nuxtjs | f9eaae3 | types/IEmployeeTable.ts | TypeScript | www.github.com/snaketbssk/employees-monolith-nuxtjs/tree/main/types/IEmployeeTable.ts | https://raw.githubusercontent.com/snaketbssk/employees-monolith-nuxtjs/f9eaae3/types/IEmployeeTable.ts | snaketbssk/employees-monolith-nuxtjs f9eaae3 types/IEmployeeTable.ts | true | 200 | 353 | import { ITitleTable } from '~/types/ITitleTable'
import { ISkillTable } from '~/types/ISkillTable'
export interface IEmployeeTable extends ITitleTable {
firstName: string | null;
middleName: string | null;
lastName: string | null;
patronymicName: string | null;
salary: number;
phone: string | null;
skil... | 7 |
hernandemonteiro/reactgram | 85b1bc2 | back-end/src/controllers/PhotoController.ts | TypeScript | www.github.com/hernandemonteiro/reactgram/tree/main/back-end/src/controllers/PhotoController.ts | https://raw.githubusercontent.com/hernandemonteiro/reactgram/85b1bc2/back-end/src/controllers/PhotoController.ts | hernandemonteiro/reactgram 85b1bc2 back-end/src/controllers/PhotoController.ts | true | 200 | 4,279 | import { PhotoRepository } from "../models/Photo";
import mongoose from "mongoose";
import { UserRepository } from "../models/User";
class PhotoController {
async insertPhoto(req, res) {
const { title } = req.body;
const image = req.file.filename;
const reqUser = req.user;
const user = await UserRe... | 1 |
neolinkDev/map-track-trek | 308cb19 | src/classes/Cycling.ts | TypeScript | www.github.com/neolinkDev/map-track-trek/tree/main/src/classes/Cycling.ts | https://raw.githubusercontent.com/neolinkDev/map-track-trek/308cb19/src/classes/Cycling.ts | neolinkDev/map-track-trek 308cb19 src/classes/Cycling.ts | true | 200 | 519 |
import { Workout } from './Workout';
export class Cycling extends Workout {
public elevationGain: number;
public speed: number = 0;
type: string = 'bicicleta';
constructor(coords: number[], distance: number, duration: number, elevationGain: number){
super(coords, distance, duration);
this.elevationG... | 6 |
mararrjo/shop_front | 0621a32 | src/app/domain/Article.ts | TypeScript | www.github.com/mararrjo/shop_front/tree/main/src/app/domain/Article.ts | https://raw.githubusercontent.com/mararrjo/shop_front/0621a32/src/app/domain/Article.ts | mararrjo/shop_front 0621a32 src/app/domain/Article.ts | true | 200 | 336 | export interface IArticle {
id: number;
nombre: string;
precio: number;
stock: number;
creacion: Date;
}
export class Article {
public id: number;
public nombre: string;
public precio: number;
public stock: number;
public creacion: Date;
constructor(data: IArticle) {
return Object.assign(thi... | 5 |
delia-gonzalez/recipeExercise | f59f1f0 | src/app/recipes/recipe-edit/recipe-edit.component.ts | TypeScript | www.github.com/delia-gonzalez/recipeExercise/tree/main/src/app/recipes/recipe-edit/recipe-edit.component.ts | https://raw.githubusercontent.com/delia-gonzalez/recipeExercise/f59f1f0/src/app/recipes/recipe-edit/recipe-edit.component.ts | delia-gonzalez/recipeExercise f59f1f0 src/app/recipes/recipe-edit/recipe-edit.component.ts | true | 200 | 2,847 | import { Component, OnInit } from '@angular/core'
import { ActivatedRoute, Params, Router } from '@angular/router'
import { FormGroup, FormControl, FormArray, Validators } from '@angular/forms'
import { RecipeService } from '../recipe.service'
@Component({
selector: 'app-recipe-edit',
templateUrl: './recipe-edit.... | 0 |
shahrukhfiaz/boltprojectisitdown | a47928a | src/services/websiteService.ts | TypeScript | www.github.com/shahrukhfiaz/boltprojectisitdown/tree/main/src/services/websiteService.ts | https://raw.githubusercontent.com/shahrukhfiaz/boltprojectisitdown/a47928a/src/services/websiteService.ts | shahrukhfiaz/boltprojectisitdown a47928a src/services/websiteService.ts | true | 200 | 13,511 | import axios from 'axios';
import { Website, Report, Comment, UptimeData, OutageReport } from '../types';
import { formatUrl } from '../utils/urlUtils';
import { supabase } from '../lib/supabase';
import { popularWebsites, mockOutageReports, generateUptimeData } from '../utils/mockData';
/**
* Check if a website is u... | 3 |
alisher-z/csm | 4532fc0 | backend/routes/inventory.route.ts | TypeScript | www.github.com/alisher-z/csm/tree/main/backend/routes/inventory.route.ts | https://raw.githubusercontent.com/alisher-z/csm/4532fc0/backend/routes/inventory.route.ts | alisher-z/csm 4532fc0 backend/routes/inventory.route.ts | true | 200 | 299 | import { Router } from 'express';
import { Inventory } from '../orm/inventory.orm';
import mainRoute from './main.route';
const router = Router();
router
.use((req, _, next) => {
(<any>req)['model'] = new Inventory();
next();
})
.use(mainRoute);
export default router; | 2 |
maresverbrugge/Transcendence | ff5c9d3 | backend/src/authentication/authentication.module.ts | TypeScript | www.github.com/maresverbrugge/Transcendence/tree/main/backend/src/authentication/authentication.module.ts | https://raw.githubusercontent.com/maresverbrugge/Transcendence/ff5c9d3/backend/src/authentication/authentication.module.ts | maresverbrugge/Transcendence ff5c9d3 backend/src/authentication/authentication.module.ts | true | 200 | 845 | import { Module, forwardRef } from '@nestjs/common';
import { CacheModule } from '@nestjs/cache-manager';
import { LoginController } from './login/login.controller';
import { LoginService } from './login/login.service';
import { TwoFactorController } from './two-factor/two-factor.controller';
import { TwoFactorService... | 7 |
paranoid-android12/GC-FaMS | 2a8a2db | src/app/state/dean-state/dean-state.selector.ts | TypeScript | www.github.com/paranoid-android12/GC-FaMS/tree/main/src/app/state/dean-state/dean-state.selector.ts | https://raw.githubusercontent.com/paranoid-android12/GC-FaMS/2a8a2db/src/app/state/dean-state/dean-state.selector.ts | paranoid-android12/GC-FaMS 2a8a2db src/app/state/dean-state/dean-state.selector.ts | true | 200 | 56,718 | import { createSelector, createFeatureSelector } from "@ngrx/store";
import { DeanState } from "./dean-state.reducer";
import { Evaluation } from "../../services/Interfaces/evaluation";
import { CommunityExtension } from "../../services/Interfaces/community-extension";
import { Faculty } from "../../services/Interfaces... | 1 |
Mhmk1399/final-tomak | f0440ae | lib/data.ts | TypeScript | www.github.com/Mhmk1399/final-tomak/tree/main/lib/data.ts | https://raw.githubusercontent.com/Mhmk1399/final-tomak/f0440ae/lib/data.ts | Mhmk1399/final-tomak f0440ae lib/data.ts | true | 200 | 705 | import mongoose from "mongoose";
const MONGODB_URI = process.env.MONGODB_URI
const connect = async () => {
try {
if (MONGODB_URI) {
await mongoose.connect(MONGODB_URI);
console.log("Connected to MongoDB");
} else {
throw new Error("MONGODB_URI is not defined");
}
} catch (error) {
... | 5 |
venkat00248/river | f3eb5de | backend/src/Constants/errors.ts | TypeScript | www.github.com/venkat00248/river/tree/main/backend/src/Constants/errors.ts | https://raw.githubusercontent.com/venkat00248/river/f3eb5de/backend/src/Constants/errors.ts | venkat00248/river f3eb5de backend/src/Constants/errors.ts | true | 200 | 491 | export const errorConstants = {
BAD_REQUEST: "Bad request, insufficient details passed",
PAYMENT_INITIATION_ERROR: "error in initiating paytm payment",
INTERNAL_ERROR: "Internal server error",
NO_PAYMENT_METHOD: "No payment method choosen",
PAYMENT_FORM_UPDATION_FAILED: "Payment form updation failed... | 0 |
sesh10/BookFast-Angular | a3c1664 | src/app/rental/rental-list/rental-list.component.ts | TypeScript | www.github.com/sesh10/BookFast-Angular/tree/main/src/app/rental/rental-list/rental-list.component.ts | https://raw.githubusercontent.com/sesh10/BookFast-Angular/a3c1664/src/app/rental/rental-list/rental-list.component.ts | sesh10/BookFast-Angular a3c1664 src/app/rental/rental-list/rental-list.component.ts | true | 200 | 681 | import { Component, OnInit } from '@angular/core';
import { RentalService } from '../shared/rental.service';
import { Rental } from '../shared/rental.model';
@Component({
selector: 'app-rental-list',
templateUrl: './rental-list.component.html',
styleUrls: ['./rental-list.component.scss']
})
export class RentalLi... | 4 |
gamekvnn/temp-branch | 065d627 | src/base/database/decorators/database.decorator.ts | TypeScript | www.github.com/gamekvnn/temp-branch/tree/main/src/base/database/decorators/database.decorator.ts | https://raw.githubusercontent.com/gamekvnn/temp-branch/065d627/src/base/database/decorators/database.decorator.ts | gamekvnn/temp-branch 065d627 src/base/database/decorators/database.decorator.ts | true | 200 | 882 | /* eslint-disable @typescript-eslint/explicit-function-return-type */
import {
InjectConnection,
InjectModel,
Schema,
SchemaOptions,
} from '@nestjs/mongoose';
import {
DATABASE_CREATED_AT_FIELD_NAME,
DATABASE_UPDATED_AT_FIELD_NAME,
} from '@/base/database/constants/database.constant';
// eslint-disable-n... | 2 |
Dymoxz/care_manager-api | 4e08f00 | src/app.module.ts | TypeScript | www.github.com/Dymoxz/care_manager-api/tree/main/src/app.module.ts | https://raw.githubusercontent.com/Dymoxz/care_manager-api/4e08f00/src/app.module.ts | Dymoxz/care_manager-api 4e08f00 src/app.module.ts | true | 200 | 462 | import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import {PatientModule} from "./patient/patient.module";
import {MongooseModule} from "@nestjs/mongoose";
import { environment } from '../environment';
@Module({
imports: [PatientModu... | 7 |
MusicDev33/mdapi2 | cc3e799 | src/routes/reads/creation.ts | TypeScript | www.github.com/MusicDev33/mdapi2/tree/main/src/routes/reads/creation.ts | https://raw.githubusercontent.com/MusicDev33/mdapi2/cc3e799/src/routes/reads/creation.ts | MusicDev33/mdapi2 cc3e799 src/routes/reads/creation.ts | true | 200 | 941 | import readsService from '@services/read.service';
import { Request, Response } from 'express';
import { Read } from '@schemas/read.schema';
export const createOneReadRoute = async (req: Request, res: Response) => {
const body = req.body;
if (!body.bookId || !body.currentPage) {
return res.status(500).json... | 3 |
SeniorIntern/ecommerce-back | f6e07af | src/models/category.model.ts | TypeScript | www.github.com/SeniorIntern/ecommerce-back/tree/main/src/models/category.model.ts | https://raw.githubusercontent.com/SeniorIntern/ecommerce-back/f6e07af/src/models/category.model.ts | SeniorIntern/ecommerce-back f6e07af src/models/category.model.ts | true | 200 | 642 | import mongoose, { Document, ObjectId, Schema } from 'mongoose';
import mongooseAggregatePaginate from 'mongoose-aggregate-paginate-v2';
type Category = Document & {
categoryName: string;
owner: ObjectId;
};
const categorySchema = new Schema<Category>(
{
categoryName: {
type: String,
required: t... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.