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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
DevhTor/MyBriefCase | 940a1b2 | src/app/blue-button2/blue-button2.component.spec.ts | TypeScript | www.github.com/DevhTor/MyBriefCase/tree/main/src/app/blue-button2/blue-button2.component.spec.ts | https://raw.githubusercontent.com/DevhTor/MyBriefCase/940a1b2/src/app/blue-button2/blue-button2.component.spec.ts | DevhTor/MyBriefCase 940a1b2 src/app/blue-button2/blue-button2.component.spec.ts | true | 200 | 595 | import { ComponentFixture, TestBed } from '@angular/core/testing';
import { BlueButton2Component } from './blue-button2.component';
describe('BlueButton2Component', () => {
let component: BlueButton2Component;
let fixture: ComponentFixture<BlueButton2Component>;
beforeEach(() => {
TestBed.configureTestingM... | 2 |
Chris-Boho/TextBoxComponent | d2fb11a | src/types.ts | TypeScript | www.github.com/Chris-Boho/TextBoxComponent/tree/main/src/types.ts | https://raw.githubusercontent.com/Chris-Boho/TextBoxComponent/d2fb11a/src/types.ts | Chris-Boho/TextBoxComponent d2fb11a src/types.ts | true | 200 | 604 | /**
* Common interfaces for the MS Paint-Style Textbox Component
*/
/**
* Interface for position coordinates
*/
export interface Position {
x: number;
y: number;
}
/**
* Interface for size dimensions
*/
export interface Size {
width: number;
height: number;
}
/**
* Interface for a textbox object
*/
e... | 7 |
reebaazeemi4/my45assignments | daf7660 | q16.ts | TypeScript | www.github.com/reebaazeemi4/my45assignments/tree/main/q16.ts | https://raw.githubusercontent.com/reebaazeemi4/my45assignments/daf7660/q16.ts | reebaazeemi4/my45assignments daf7660 q16.ts | true | 200 | 1,646 | // TASK 17
//Shrinking Guest List: You just found out that your new dinner table won’t arrive in time for the dinner, and you have space for only two guests.
//• Start with your program from Exercise 16. Add a new line that prints a message saying that you can invite only two people for dinner.
//• Remove guests f... | 5 |
dev-visiongenius/AGT-Workpack-updated | 8b01399 | apps/backend/src/exceptions/errors.ts | TypeScript | www.github.com/dev-visiongenius/AGT-Workpack-updated/tree/main/apps/backend/src/exceptions/errors.ts | https://raw.githubusercontent.com/dev-visiongenius/AGT-Workpack-updated/8b01399/apps/backend/src/exceptions/errors.ts | dev-visiongenius/AGT-Workpack-updated 8b01399 apps/backend/src/exceptions/errors.ts | true | 200 | 636 | import { StatusCodes } from 'http-status-codes';
class BaseError extends Error {
public readonly name: string;
public readonly httpCode: StatusCodes;
public readonly isOperational: boolean;
public readonly description: string;
constructor(
name: string,
httpCode: StatusCodes,
description: str... | 1 |
MaximilienBEY/microservices-movie | 60344e3 | src/main.ts | TypeScript | www.github.com/MaximilienBEY/microservices-movie/tree/main/src/main.ts | https://raw.githubusercontent.com/MaximilienBEY/microservices-movie/60344e3/src/main.ts | MaximilienBEY/microservices-movie 60344e3 src/main.ts | true | 200 | 311 | import { CommonInterceptor } from "@app/common"
import { NestFactory } from "@nestjs/core"
import { MovieModule } from "./movie.module"
async function bootstrap() {
const app = await NestFactory.create(MovieModule)
app.useGlobalInterceptors(new CommonInterceptor())
await app.listen(3000)
}
bootstrap()
| 4 |
TierryBr/Arabets | 6f899a2 | src/pages/Sale/styles.ts | TypeScript | www.github.com/TierryBr/Arabets/tree/main/src/pages/Sale/styles.ts | https://raw.githubusercontent.com/TierryBr/Arabets/6f899a2/src/pages/Sale/styles.ts | TierryBr/Arabets 6f899a2 src/pages/Sale/styles.ts | true | 200 | 3,292 | import styled from "styled-components";
import {Link} from 'react-router-dom';
const media = {
mobile700: '@media(max-width: 700px)',
mobile595: '@media(max-width: 595px)',
mobile630: '@media(max-height: 630px)',
mobile490: '@media(max-width: 490px)',
}
export const Container = styled.div`
width: 100vw;
... | 0 |
dvdgamer2003/project | 73d1f1a | src/hooks/useOfflineArticles.ts | TypeScript | www.github.com/dvdgamer2003/project/tree/main/src/hooks/useOfflineArticles.ts | https://raw.githubusercontent.com/dvdgamer2003/project/73d1f1a/src/hooks/useOfflineArticles.ts | dvdgamer2003/project 73d1f1a src/hooks/useOfflineArticles.ts | true | 200 | 1,930 | import { useState, useEffect, useCallback } from 'react';
import { toast } from 'react-hot-toast';
import * as db from '@/lib/storage/db';
import type { Article } from '@/types';
export function useOfflineArticles() {
const [articles, setArticles] = useState<Article[]>([]);
const [loading, setLoading] = useState(t... | 3 |
lion5/component-library | 26d57f2 | packages/core/src/components/inputs/ListInputValidated/ListInputValidated.stories.ts | TypeScript | www.github.com/lion5/component-library/tree/main/packages/core/src/components/inputs/ListInputValidated/ListInputValidated.stories.ts | https://raw.githubusercontent.com/lion5/component-library/26d57f2/packages/core/src/components/inputs/ListInputValidated/ListInputValidated.stories.ts | lion5/component-library 26d57f2 packages/core/src/components/inputs/ListInputValidated/ListInputValidated.stories.ts | true | 200 | 1,167 | import { Meta, StoryObj } from '@storybook/vue3'
import ListInputValidated from './ListInputValidated.vue'
import { PillInputItem } from './pillInputItem'
import { SearchResult } from '../SearchInputValidated/searchResult'
export default {
component: ListInputValidated,
title: 'Input Components/ListInputValidated'... | 6 |
mhabitt/TestApp | f2424b5 | src/pages/FakeApi/hooks/post/usePostApi.ts | TypeScript | www.github.com/mhabitt/TestApp/tree/main/src/pages/FakeApi/hooks/post/usePostApi.ts | https://raw.githubusercontent.com/mhabitt/TestApp/f2424b5/src/pages/FakeApi/hooks/post/usePostApi.ts | mhabitt/TestApp f2424b5 src/pages/FakeApi/hooks/post/usePostApi.ts | true | 200 | 1,412 | import {useApi} from "../../../../services/api/useApi";
import {PostApi} from "../../../../types/types";
import {useCallback} from "react";
export const usePostApi = () => {
const api = useApi();
const getPosts = useCallback(async (): Promise<PostApi[]> => {
try {
return await api.get(`post... | 5 |
destacey/Moda | 827c1ee | Moda.Web/src/moda.web.reactclient/src/hooks/use-debounce.ts | TypeScript | www.github.com/destacey/Moda/tree/main/Moda.Web/src/moda.web.reactclient/src/hooks/use-debounce.ts | https://raw.githubusercontent.com/destacey/Moda/827c1ee/Moda.Web/src/moda.web.reactclient/src/hooks/use-debounce.ts | destacey/Moda 827c1ee Moda.Web/src/moda.web.reactclient/src/hooks/use-debounce.ts | true | 200 | 388 | import { useEffect, useState } from 'react'
export const useDebounce = <T>(value: T, delay: number = 500): T => {
const [debouncedValue, setDebouncedValue] = useState(value)
useEffect(() => {
const timeoutId = setTimeout(() => {
setDebouncedValue(value)
}, delay)
return () => {
clearTimeo... | 7 |
acasperw/energy-manager-game-automation-tools | f8712f5 | src/_old-puppeteer-tasks/buyOil.ts | TypeScript | www.github.com/acasperw/energy-manager-game-automation-tools/tree/main/src/_old-puppeteer-tasks/buyOil.ts | https://raw.githubusercontent.com/acasperw/energy-manager-game-automation-tools/f8712f5/src/_old-puppeteer-tasks/buyOil.ts | acasperw/energy-manager-game-automation-tools f8712f5 src/_old-puppeteer-tasks/buyOil.ts | true | 200 | 2,831 | import { Page } from "puppeteer";
import { GameSessionData } from "../types/interface";
import { clickElement } from "../automation/helpers";
import { closeMainModal, switchCommoditiesTab, waitForMainModal } from "../automation/interactions";
import { delay } from "../utils/helpers";
export async function buyOil(page... | 2 |
CrystalChow12/School-Club-Management-System- | bfd6488 | src/routes/home/+page.server.ts | TypeScript | www.github.com/CrystalChow12/School-Club-Management-System-/tree/main/src/routes/home/+page.server.ts | https://raw.githubusercontent.com/CrystalChow12/School-Club-Management-System-/bfd6488/src/routes/home/%2Bpage.server.ts | CrystalChow12/School-Club-Management-System- bfd6488 src/routes/home/+page.server.ts | true | 200 | 984 | import { connectionStart } from '$lib/db/mysql';
import type { PageServerLoad } from './$types';
import type { ClubRow,Club } from '$lib/types';
export const load: PageServerLoad = async () => {
let conn = await connectionStart();
try {
//telling the query function that its of type club
const [data] = await con... | 1 |
Shrief88/MyStore | 40812e2 | src/app/app-routing.module.ts | TypeScript | www.github.com/Shrief88/MyStore/tree/main/src/app/app-routing.module.ts | https://raw.githubusercontent.com/Shrief88/MyStore/40812e2/src/app/app-routing.module.ts | Shrief88/MyStore 40812e2 src/app/app-routing.module.ts | true | 200 | 759 | import { NgModule } from "@angular/core";
import { RouterModule, Routes } from "@angular/router";
import { CartComponent } from "./components/cart/cart.component";
import { ProductComponent } from "./components/product/product.component";
import { ProductsListComponent } from "./components/products-list/products-list.c... | 6 |
ArtKing366/work-for-dyplom | 708aa57 | src/app/my-profile/my-profile-edit/my-profile-edit.component.ts | TypeScript | www.github.com/ArtKing366/work-for-dyplom/tree/main/src/app/my-profile/my-profile-edit/my-profile-edit.component.ts | https://raw.githubusercontent.com/ArtKing366/work-for-dyplom/708aa57/src/app/my-profile/my-profile-edit/my-profile-edit.component.ts | ArtKing366/work-for-dyplom 708aa57 src/app/my-profile/my-profile-edit/my-profile-edit.component.ts | true | 200 | 922 | import { Component, Inject } from '@angular/core';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
@Component({
selector: 'app-my-profile-edit',
templateUrl: './my-profile-edit.component.html',
styleUrls: ['./my-profile-edit.component.css']
})
export class MyProfileEditComponent {
pr... | 3 |
lna1709/PTUDDN | f34fe75 | src/reactions/reactions.controller.ts | TypeScript | www.github.com/lna1709/PTUDDN/tree/main/src/reactions/reactions.controller.ts | https://raw.githubusercontent.com/lna1709/PTUDDN/f34fe75/src/reactions/reactions.controller.ts | lna1709/PTUDDN f34fe75 src/reactions/reactions.controller.ts | true | 200 | 1,243 | import {
Controller,
Delete,
HttpStatus,
Post,
Req,
Res,
UseGuards,
} from '@nestjs/common'
import { Inject } from '@nestjs/common'
import { JwtAuthGuard } from 'src/auth/utils/guard.auth'
import { Routes, Services } from 'src/utils/constants'
import { ReactionsService } from './reactions.se... | 0 |
alynoureddine/messenger | e4a59d1 | src/users/user.controller.ts | TypeScript | www.github.com/alynoureddine/messenger/tree/main/src/users/user.controller.ts | https://raw.githubusercontent.com/alynoureddine/messenger/e4a59d1/src/users/user.controller.ts | alynoureddine/messenger e4a59d1 src/users/user.controller.ts | true | 200 | 864 | import {
Body,
ClassSerializerInterceptor,
Controller,
Post,
Request,
UseGuards,
UseInterceptors,
UsePipes,
ValidationPipe,
} from '@nestjs/common';
import { LoginGuard } from '../common/guards/login.guard';
import { UserService } from './user.service';
import { CreateUserDto } from './dto';
import { ... | 2 |
ducdm4/easy-store-server | ff073b1 | src/product/product.module.ts | TypeScript | www.github.com/ducdm4/easy-store-server/tree/main/src/product/product.module.ts | https://raw.githubusercontent.com/ducdm4/easy-store-server/ff073b1/src/product/product.module.ts | ducdm4/easy-store-server ff073b1 src/product/product.module.ts | true | 200 | 1,587 | import { Module } from '@nestjs/common';
import { ProductController } from './product.controller';
import { ProductService } from './product.service';
import { ProductInStockDailyService } from './productInStockDaily.service';
import { StoresService } from '../store/stores.service';
import { PhotosService } from '../ph... | 7 |
Demianeen/react-production | 553eaf6 | src/features/AuthByUsername/model/services/registerByUsername/registerByUsername.ts | TypeScript | www.github.com/Demianeen/react-production/tree/main/src/features/AuthByUsername/model/services/registerByUsername/registerByUsername.ts | https://raw.githubusercontent.com/Demianeen/react-production/553eaf6/src/features/AuthByUsername/model/services/registerByUsername/registerByUsername.ts | Demianeen/react-production 553eaf6 src/features/AuthByUsername/model/services/registerByUsername/registerByUsername.ts | true | 200 | 2,097 | import { UserRole, type User, userActions } from '@/entities/User'
import { buildAsyncThunk } from '@/shared/lib/store/buildAsyncThunk'
import { AxiosError } from 'axios'
import { RegistrationValidationError } from '../../const/registrationValidationError'
import { validateRegistrationForm } from '../validateRegistrati... | 5 |
alay-dev/canvas-editor | 88579d3 | app/_controller/ftext.ts | TypeScript | www.github.com/alay-dev/canvas-editor/tree/main/app/_controller/ftext.ts | https://raw.githubusercontent.com/alay-dev/canvas-editor/88579d3/app/_controller/ftext.ts | alay-dev/canvas-editor 88579d3 app/_controller/ftext.ts | true | 200 | 1,161 | import { fabric } from "fabric";
// @ts-ignore fabric controlsUtils
const controlsUtils = fabric.controlsUtils;
export const initFTextControl = () => {
const objectControls = fabric.Object.prototype.controls;
if (fabric.Rect) {
const ftextControl: any = (fabric.Textbox.prototype.controls = {});
ftextCont... | 4 |
Danish-Spots/ngrx-undo-redo-investigation | 328eb3a | src/app/undo-redo-store-test/undo-redo-store-test.component.ts | TypeScript | www.github.com/Danish-Spots/ngrx-undo-redo-investigation/tree/main/src/app/undo-redo-store-test/undo-redo-store-test.component.ts | https://raw.githubusercontent.com/Danish-Spots/ngrx-undo-redo-investigation/328eb3a/src/app/undo-redo-store-test/undo-redo-store-test.component.ts | Danish-Spots/ngrx-undo-redo-investigation 328eb3a src/app/undo-redo-store-test/undo-redo-store-test.component.ts | true | 200 | 2,268 | import { Component, OnInit } from '@angular/core';
import { Store } from '@ngrx/store';
import { AppState } from '../interfaces/app.state';
import { Platform } from '../interfaces/platform';
import { Movie } from '../interfaces/movie';
import * as PlatformActions from '../store/actions/platform.actions';
import { selec... | 1 |
Zakaria-98/servicesapp | 8d380dd | src/app/admin/cities/cities.component.ts | TypeScript | www.github.com/Zakaria-98/servicesapp/tree/main/src/app/admin/cities/cities.component.ts | https://raw.githubusercontent.com/Zakaria-98/servicesapp/8d380dd/src/app/admin/cities/cities.component.ts | Zakaria-98/servicesapp 8d380dd src/app/admin/cities/cities.component.ts | true | 200 | 3,842 | import { Component, OnInit } from '@angular/core';
import {MatDialog, MatDialogRef, MatDialogModule} from '@angular/material/dialog';
import {MatInputModule} from '@angular/material/input';
import {MatFormFieldModule} from '@angular/material/form-field';
import {FormsModule} from '@angular/forms';
import { CellClickedE... | 6 |
Tanish0023/lms-platform | f77a2c6 | app/api/courses/route.ts | TypeScript | www.github.com/Tanish0023/lms-platform/tree/main/app/api/courses/route.ts | https://raw.githubusercontent.com/Tanish0023/lms-platform/f77a2c6/app/api/courses/route.ts | Tanish0023/lms-platform f77a2c6 app/api/courses/route.ts | true | 200 | 675 | import { db } from "@/lib/db";
import { auth } from "@clerk/nextjs/server";
import { NextResponse } from "next/server";
export async function POST(req:Request){
try{
const {userId} = auth();
const {title} = await req.json();
if(!userId){
return new NextResponse("Unauthorized",{... | 3 |
CallBackCode/ghlSDK | 480448e | src/objects/courses/import.ts | TypeScript | www.github.com/CallBackCode/ghlSDK/tree/main/src/objects/courses/import.ts | https://raw.githubusercontent.com/CallBackCode/ghlSDK/480448e/src/objects/courses/import.ts | CallBackCode/ghlSDK 480448e src/objects/courses/import.ts | true | 200 | 1,332 | import {
BadRequestDTO,
UnauthorizedDTO,
UnprocessableDTO,
} from "../../types/_global";
import type { CoursePublicExporterPayload } from "../../types/courses";
import { withExponentialBackoff } from "../../contexts/requestUtils";
const baseUrl =
"https://services.leadconnectorhq.com/courses/course-exporter/pu... | 0 |
ckck-kldev/hkt-wsp-code | 5616feb | WSP009/sql_test.ts | TypeScript | www.github.com/ckck-kldev/hkt-wsp-code/tree/main/WSP009/sql_test.ts | https://raw.githubusercontent.com/ckck-kldev/hkt-wsp-code/5616feb/WSP009/sql_test.ts | ckck-kldev/hkt-wsp-code 5616feb WSP009/sql_test.ts | true | 200 | 989 | import { Client } from "pg";
import dotenv from "dotenv";
import xlsx from "xlsx";
const workbook = xlsx.readFile('test.xlsx');
const sheet_name_list = workbook.SheetNames;
const xlData = xlsx.utils.sheet_to_json(workbook.Sheets[sheet_name_list[0]]);
dotenv.config();
export const client = new Client({
database: p... | 7 |
vinmasci/lutruwita2 | 9655d2c | src/hooks/useGpxProcessing.ts | TypeScript | www.github.com/vinmasci/lutruwita2/tree/main/src/hooks/useGpxProcessing.ts | https://raw.githubusercontent.com/vinmasci/lutruwita2/9655d2c/src/hooks/useGpxProcessing.ts | vinmasci/lutruwita2 9655d2c src/hooks/useGpxProcessing.ts | true | 200 | 5,467 | import { useState, useCallback, useRef, useEffect } from 'react';
import { ProcessingStatus, ProcessedRoute } from '../types';
import { GpxService } from '../services/gpx-service';
import * as turf from '@turf/turf';
import { GpxProcessor } from '../services/gpx-processor';
import type { FeatureCollection, Feature, Lin... | 2 |
Shigaxz/galaxy-music-integracion | f51a5fa | src/app/tab1/contenido/contenido-routing.module.ts | TypeScript | www.github.com/Shigaxz/galaxy-music-integracion/tree/main/src/app/tab1/contenido/contenido-routing.module.ts | https://raw.githubusercontent.com/Shigaxz/galaxy-music-integracion/f51a5fa/src/app/tab1/contenido/contenido-routing.module.ts | Shigaxz/galaxy-music-integracion f51a5fa src/app/tab1/contenido/contenido-routing.module.ts | true | 200 | 501 | import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { ContenidoPage } from './contenido.page';
const routes: Routes = [
{
path: '',
component: ContenidoPage
},
{
path: 'explorar',
loadChildren: () => import('./explorar/explorar.module... | 5 |
Kennethsim2000/netflix-clone | 88ce83f | hooks/useFindFourList.ts | TypeScript | www.github.com/Kennethsim2000/netflix-clone/tree/main/hooks/useFindFourList.ts | https://raw.githubusercontent.com/Kennethsim2000/netflix-clone/88ce83f/hooks/useFindFourList.ts | Kennethsim2000/netflix-clone 88ce83f hooks/useFindFourList.ts | true | 200 | 525 | import useSWR from "swr";
import fetcher from "@/lib/fetcher";
import { Movie } from "@prisma/client";
const useFindFourList = (
requestIds: string[]
): {
data: Movie[] | undefined;
error: any;
isLoading: boolean;
} => {
const { data, error, isLoading } = useSWR<Movie[]>("/api/findFour", fetcher, ... | 1 |
GabrielPeresBernes/Deafio-Node.js-Modulo-2.2 | 9ba8506 | src/repositories/TransactionsRepository.ts | TypeScript | www.github.com/GabrielPeresBernes/Deafio-Node.js-Modulo-2.2/tree/main/src/repositories/TransactionsRepository.ts | https://raw.githubusercontent.com/GabrielPeresBernes/Deafio-Node.js-Modulo-2.2/9ba8506/src/repositories/TransactionsRepository.ts | GabrielPeresBernes/Deafio-Node.js-Modulo-2.2 9ba8506 src/repositories/TransactionsRepository.ts | true | 200 | 799 | import { EntityRepository, Repository } from 'typeorm';
import Transaction from '../models/Transaction';
interface Balance {
income: number;
outcome: number;
total: number;
}
@EntityRepository(Transaction)
class TransactionsRepository extends Repository<Transaction> {
public async getBalance(): Promise<Balan... | 6 |
orlandodantas/pet-store-api | 470e526 | src/controllers/CategoryController.ts | TypeScript | www.github.com/orlandodantas/pet-store-api/tree/main/src/controllers/CategoryController.ts | https://raw.githubusercontent.com/orlandodantas/pet-store-api/470e526/src/controllers/CategoryController.ts | orlandodantas/pet-store-api 470e526 src/controllers/CategoryController.ts | true | 200 | 1,810 | import { Request, Response } from "express";
import { StatusCodes } from "http-status-codes";
import { ICategoryService } from "../services/interfaces";
import { ICategoryController } from "./interfaces";
export default class CategoryController implements ICategoryController {
private _categoryService: ICategoryServ... | 0 |
khaleel-azaizy/webDevelopment_Travel-Diary | 1b8ef2b | src/app/servises/data.service.ts | TypeScript | www.github.com/khaleel-azaizy/webDevelopment_Travel-Diary/tree/main/src/app/servises/data.service.ts | https://raw.githubusercontent.com/khaleel-azaizy/webDevelopment_Travel-Diary/1b8ef2b/src/app/servises/data.service.ts | khaleel-azaizy/webDevelopment_Travel-Diary 1b8ef2b src/app/servises/data.service.ts | true | 200 | 2,196 | import { HttpClient } from '@angular/common/http';
import { Inject, Injectable, PLATFORM_ID } from '@angular/core';
import { Observable } from 'rxjs';
import { StorageService } from '../storage/storage.service';
import { isPlatformBrowser } from '@angular/common';
@Injectable({
providedIn: 'root'
})
export class Data... | 7 |
georgaugusto/hair_control | f34e0e8 | src/pages/Home/styles.ts | TypeScript | www.github.com/georgaugusto/hair_control/tree/main/src/pages/Home/styles.ts | https://raw.githubusercontent.com/georgaugusto/hair_control/f34e0e8/src/pages/Home/styles.ts | georgaugusto/hair_control f34e0e8 src/pages/Home/styles.ts | true | 200 | 2,270 | import styled from 'styled-components';
interface GraphicContainerProps {
compact: number;
}
export const HomeContainer = styled.main`
height: 100%;
`;
export const HeaderContainer = styled.div`
width: 100%;
display: flex;
flex-direction: row;
justify-content: flex-start;
> div {
&:nth-child(1) {... | 4 |
init1-dev/react-router-template | 63ea6bb | src/utils/theme/themeUtils.ts | TypeScript | www.github.com/init1-dev/react-router-template/tree/main/src/utils/theme/themeUtils.ts | https://raw.githubusercontent.com/init1-dev/react-router-template/63ea6bb/src/utils/theme/themeUtils.ts | init1-dev/react-router-template 63ea6bb src/utils/theme/themeUtils.ts | true | 200 | 351 | export const toggleTheme = (currentTheme: string) => {
const swap = currentTheme === 'light' ? 'dark' : 'light';
localStorage.setItem("__current__theme__", swap);
return swap;
};
export const loadTheme = () => {
const persistedState = localStorage.getItem("__current__theme__");
return persistedStat... | 2 |
juan3708/KI-Practica2 | 7c3c07e | Frontend/src/app/modules/about/components/distingue/distingue.component.spec.ts | TypeScript | www.github.com/juan3708/KI-Practica2/tree/main/Frontend/src/app/modules/about/components/distingue/distingue.component.spec.ts | https://raw.githubusercontent.com/juan3708/KI-Practica2/7c3c07e/Frontend/src/app/modules/about/components/distingue/distingue.component.spec.ts | juan3708/KI-Practica2 7c3c07e Frontend/src/app/modules/about/components/distingue/distingue.component.spec.ts | true | 200 | 647 | import { ComponentFixture, TestBed } from '@angular/core/testing';
import { DistingueComponent } from './distingue.component';
describe('DistingueComponent', () => {
let component: DistingueComponent;
let fixture: ComponentFixture<DistingueComponent>;
beforeEach(async () => {
await TestBed.configureTesting... | 5 |
yum-Communication/japanesenovel-vscode-extension | da886a2 | src/settingJson.ts | TypeScript | www.github.com/yum-Communication/japanesenovel-vscode-extension/tree/main/src/settingJson.ts | https://raw.githubusercontent.com/yum-Communication/japanesenovel-vscode-extension/da886a2/src/settingJson.ts | yum-Communication/japanesenovel-vscode-extension da886a2 src/settingJson.ts | true | 200 | 5,374 | import * as fs from 'fs';
import * as path from 'path';
import { workspace } from 'vscode';
interface SettingType {
foreground?: string,
fontStyle?: string,
}
interface TextMateRulesType {
scope?: string,
settings?: SettingType
}
interface EditorTokenColorCustomizationsType {
comment... | 1 |
RVRTelecomunicaciones/frontSGI | 99731e0 | src/app/informe-digitalizados/pages/introduccion/introduccion.component.ts | TypeScript | www.github.com/RVRTelecomunicaciones/frontSGI/tree/main/src/app/informe-digitalizados/pages/introduccion/introduccion.component.ts | https://raw.githubusercontent.com/RVRTelecomunicaciones/frontSGI/99731e0/src/app/informe-digitalizados/pages/introduccion/introduccion.component.ts | RVRTelecomunicaciones/frontSGI 99731e0 src/app/informe-digitalizados/pages/introduccion/introduccion.component.ts | true | 200 | 6,125 | import { Component, OnInit } from '@angular/core';
import {
FormBuilder,
FormControl,
FormGroup,
Validators,
} from '@angular/forms';
import { merge, Subscription } from 'rxjs';
import { mergeAll } from 'rxjs/operators';
@Component({
selector: 'app-introduccion',
templateUrl: './introduccion.component.html... | 6 |
mcdag/Projeto-TASI6-backend | 5155ced | API-Gateway/src/controllers/eventController.ts | TypeScript | www.github.com/mcdag/Projeto-TASI6-backend/tree/main/API-Gateway/src/controllers/eventController.ts | https://raw.githubusercontent.com/mcdag/Projeto-TASI6-backend/5155ced/API-Gateway/src/controllers/eventController.ts | mcdag/Projeto-TASI6-backend 5155ced API-Gateway/src/controllers/eventController.ts | true | 200 | 1,639 | import { Request } from "express";
import { CreateReportResponseDTO } from "../dtos/createReport.dto";
type IClient = {
id: number;
response: any;
};
export default class EventController {
clients: Array<IClient>;
constructor() {
this.clients = [];
}
async sendEventToAllClients(request: Request) {
... | 3 |
DevershiSri/connectedCarUI | 6ca983f | src/app/app.component.ts | TypeScript | www.github.com/DevershiSri/connectedCarUI/tree/main/src/app/app.component.ts | https://raw.githubusercontent.com/DevershiSri/connectedCarUI/6ca983f/src/app/app.component.ts | DevershiSri/connectedCarUI 6ca983f src/app/app.component.ts | true | 200 | 472 | import { Component, OnInit } from '@angular/core';
import { AppServiceService } from './app.service.service';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
posts:any;
constructor(private service:A... | 0 |
Jamal-SaadEddin/Travelo | 7a284c7 | src/hooks/usePayment.ts | TypeScript | www.github.com/Jamal-SaadEddin/Travelo/tree/main/src/hooks/usePayment.ts | https://raw.githubusercontent.com/Jamal-SaadEddin/Travelo/7a284c7/src/hooks/usePayment.ts | Jamal-SaadEddin/Travelo 7a284c7 src/hooks/usePayment.ts | true | 200 | 1,526 | import { BookingRequest } from "@src/api/Api";
import { BookingResponse } from "@src/entities/BookingResponse";
import { createApiClient } from "@src/services/createApiClient";
import useCartStore from "@src/store/cartStore";
import {
keepPreviousData,
useMutation,
useQuery,
useQueryClient,
} from "@tanstack/re... | 7 |
LachezarTsK/Find-the-Length-of-the-Longest-Common-Prefix | d5ffa62 | Solution.ts | TypeScript | www.github.com/LachezarTsK/Find-the-Length-of-the-Longest-Common-Prefix/tree/main/Solution.ts | https://raw.githubusercontent.com/LachezarTsK/Find-the-Length-of-the-Longest-Common-Prefix/d5ffa62/Solution.ts | LachezarTsK/Find-the-Length-of-the-Longest-Common-Prefix d5ffa62 Solution.ts | true | 200 | 1,769 |
function longestCommonPrefix(firstInput: number[], secondInput: number[]): number {
const trie = new Trie();
for (let value of firstInput) {
trie.addInteger(value, getLargestFactorOfTen(value));
}
let longestCommonPrefix = 0;
for (let value of secondInput) {
longestCommonPrefix = M... | 2 |
Loki-whan12/MonkAndMonsters | 2d3b243 | graphical/src/v1/movement_controls.ts | TypeScript | www.github.com/Loki-whan12/MonkAndMonsters/tree/main/graphical/src/v1/movement_controls.ts | https://raw.githubusercontent.com/Loki-whan12/MonkAndMonsters/2d3b243/graphical/src/v1/movement_controls.ts | Loki-whan12/MonkAndMonsters 2d3b243 graphical/src/v1/movement_controls.ts | true | 200 | 2,802 | import { MainScene } from "./scene";
export function confirmMonkFromLeftRiverHasReachedEdge(scene: MainScene): boolean {
return Math.floor(scene.monkSelected!.monk.x) >= 460;
}
export function confirmMonkFromRightRiverHasReachedEdge(scene: MainScene): boolean {
return Math.floor(scene.monkSelected!... | 4 |
StGrozdanov/recipes-v2-cms-mobile | 4f5aeb5 | src/services/userService.ts | TypeScript | www.github.com/StGrozdanov/recipes-v2-cms-mobile/tree/main/src/services/userService.ts | https://raw.githubusercontent.com/StGrozdanov/recipes-v2-cms-mobile/4f5aeb5/src/services/userService.ts | StGrozdanov/recipes-v2-cms-mobile 4f5aeb5 src/services/userService.ts | true | 200 | 3,809 | import { BASE_URL, BlockUserParams, ChangeRoleParams, UserData } from "./types";
import { useRequestHandler } from "../hooks/useRequestHandler";
import { useMutation, useQuery } from "react-query";
import { useCallback } from "react";
/**
* hook to handle all user related requests
* @returns handler functions
*/
ex... | 5 |
EiffelIKE/friends_app | 835ff5b | src/shared/animations/fadeIn.ts | TypeScript | www.github.com/EiffelIKE/friends_app/tree/main/src/shared/animations/fadeIn.ts | https://raw.githubusercontent.com/EiffelIKE/friends_app/835ff5b/src/shared/animations/fadeIn.ts | EiffelIKE/friends_app 835ff5b src/shared/animations/fadeIn.ts | true | 200 | 351 | import { css, keyframes } from 'styled-components';
const fadeInKeyFrames = keyframes`
from {
filter: blur(3px);
opacity: 0;
}
to {
filter: blur(0);
opacity: 1;
}
`;
export const fadeIn = ({
time = '1s',
type = 'ease',
}: {
time?: string;
type?: string;
}) => css`
animation: ${fadeIn... | 1 |
sks-containers/site | d46bc05 | src/app/components/header/header.component.ts | TypeScript | www.github.com/sks-containers/site/tree/main/src/app/components/header/header.component.ts | https://raw.githubusercontent.com/sks-containers/site/d46bc05/src/app/components/header/header.component.ts | sks-containers/site d46bc05 src/app/components/header/header.component.ts | true | 200 | 1,026 | import { Component } from '@angular/core';
@Component({
selector: 'app-header',
templateUrl: './header.component.html',
styleUrls: ['./header.component.scss']
})
export class HeaderComponent {
menuItems = [
{ name: 'HOME', isActive: false },
{ name: 'ABOUT', isActive: false },
{ name: 'PRODUCTS', i... | 3 |
Chandranshu05/test | 2695643 | backend/src/auth/jwt.strategy.ts | TypeScript | www.github.com/Chandranshu05/test/tree/main/backend/src/auth/jwt.strategy.ts | https://raw.githubusercontent.com/Chandranshu05/test/2695643/backend/src/auth/jwt.strategy.ts | Chandranshu05/test 2695643 backend/src/auth/jwt.strategy.ts | true | 200 | 539 | import { ExtractJwt, Strategy } from 'passport-jwt';
import { PassportStrategy } from '@nestjs/passport';
import { Injectable } from '@nestjs/common';
@Injectable()
export class JwtStrategy extends PassportStrategy(Strategy) {
constructor() {
super({
jwtFromRequest: ExtractJwt.fromAuthHeaderAsBearerToken()... | 7 |
gamayunov10/instagram-api | 39b8bd7 | apps/instagram-gateway/src/features/notifications/api/application/use-cases/send-registration-mail.use-case.ts | TypeScript | www.github.com/gamayunov10/instagram-api/tree/main/apps/instagram-gateway/src/features/notifications/api/application/use-cases/send-registration-mail.use-case.ts | https://raw.githubusercontent.com/gamayunov10/instagram-api/39b8bd7/apps/instagram-gateway/src/features/notifications/api/application/use-cases/send-registration-mail.use-case.ts | gamayunov10/instagram-api 39b8bd7 apps/instagram-gateway/src/features/notifications/api/application/use-cases/send-registration-mail.use-case.ts | true | 200 | 1,444 | import { CommandHandler, ICommandHandler } from '@nestjs/cqrs';
import { MailerService } from '@nestjs-modules/mailer';
import { ConfigService } from '@nestjs/config';
import { NodeEnv } from '../../../../../base/enums/node-env.enum';
export class SendRegistrationMailCommand {
constructor(
public username: stri... | 0 |
matiasnisula/solita-pre-assignment-2023-bikeapp | f520b71 | frontend/src/hooks/useJourneys.ts | TypeScript | www.github.com/matiasnisula/solita-pre-assignment-2023-bikeapp/tree/main/frontend/src/hooks/useJourneys.ts | https://raw.githubusercontent.com/matiasnisula/solita-pre-assignment-2023-bikeapp/f520b71/frontend/src/hooks/useJourneys.ts | matiasnisula/solita-pre-assignment-2023-bikeapp f520b71 frontend/src/hooks/useJourneys.ts | true | 200 | 1,382 | import { useEffect, useState } from "react";
import * as journeyService from "../services/journeyService";
import { JourneyEntry } from "../types";
const useJourneys = (page: number) => {
const [loading, setLoading] = useState(true);
const [error, setError] = useState(false);
const [journeys, setJourneys] = useS... | 2 |
moecasts/casts-design | fe7f70e | site/packages/rd-vite/src/utils/array-insert-interval.ts | TypeScript | www.github.com/moecasts/casts-design/tree/main/site/packages/rd-vite/src/utils/array-insert-interval.ts | https://raw.githubusercontent.com/moecasts/casts-design/fe7f70e/site/packages/rd-vite/src/utils/array-insert-interval.ts | moecasts/casts-design fe7f70e site/packages/rd-vite/src/utils/array-insert-interval.ts | true | 200 | 416 | export const arrayInsertInterval = (
// eslint-disable-next-line @typescript-eslint/no-explicit-any
arr: any[],
// eslint-disable-next-line @typescript-eslint/no-explicit-any
element: any,
interval = 0,
) => {
const newArr = [...arr];
if (interval <= 0) {
return newArr;
}
for (let i = interval; i ... | 6 |
quarterfall/quarterfall-open | ef3f09d | apps/backend/src/auth/strategies/SurfconextStrategy.ts | TypeScript | www.github.com/quarterfall/quarterfall-open/tree/main/apps/backend/src/auth/strategies/SurfconextStrategy.ts | https://raw.githubusercontent.com/quarterfall/quarterfall-open/ef3f09d/apps/backend/src/auth/strategies/SurfconextStrategy.ts | quarterfall/quarterfall-open ef3f09d apps/backend/src/auth/strategies/SurfconextStrategy.ts | true | 200 | 1,574 | import { config } from "config";
import { DBUser } from "db/User";
import express from "express";
import { Issuer, Strategy as SurfconextStrategy } from "openid-client";
import requestIp = require("request-ip");
export const setupSurfconextStrategy = async () => {
const oidcIssuer = await Issuer.discover(config.su... | 5 |
olofholmlund/react-native-mapbox-geometry-editor | 051e1f6 | src/util/metadata/display.ts | TypeScript | www.github.com/olofholmlund/react-native-mapbox-geometry-editor/tree/main/src/util/metadata/display.ts | https://raw.githubusercontent.com/olofholmlund/react-native-mapbox-geometry-editor/051e1f6/src/util/metadata/display.ts | olofholmlund/react-native-mapbox-geometry-editor 051e1f6 src/util/metadata/display.ts | true | 200 | 4,466 | import isEmpty from 'lodash/isEmpty';
import { MetadataInteraction } from '../../type/metadata';
import type {
FieldAttributes,
Metadata,
MetadataAttributes,
} from '../../type/metadata';
/**
* Test if a value is considered non-empty for the purposes of
* geometry metadata display and editing
* @param value
... | 1 |
Dima1234566/jiraBoard-front- | 9cd4a0d | src/app/utils/styles.ts | TypeScript | www.github.com/Dima1234566/jiraBoard-front-/tree/main/src/app/utils/styles.ts | https://raw.githubusercontent.com/Dima1234566/jiraBoard-front-/9cd4a0d/src/app/utils/styles.ts | Dima1234566/jiraBoard-front- 9cd4a0d src/app/utils/styles.ts | true | 200 | 1,587 | import Paper from "@mui/material/Paper";
import { styled } from "@mui/material/styles";
import Button, { ButtonProps } from '@mui/material/Button';
import { purple } from '@mui/material/colors';
export const style = {
position: 'absolute',
top: '50%',
left: '50%',
transform: 'translate(-50%, -50%)',
... | 3 |
Manuelp1345/The-Inventorist-Your-Inventory-Hero-BackEnd | 0cae8e1 | src/routes/index.ts | TypeScript | www.github.com/Manuelp1345/The-Inventorist-Your-Inventory-Hero-BackEnd/tree/main/src/routes/index.ts | https://raw.githubusercontent.com/Manuelp1345/The-Inventorist-Your-Inventory-Hero-BackEnd/0cae8e1/src/routes/index.ts | Manuelp1345/The-Inventorist-Your-Inventory-Hero-BackEnd 0cae8e1 src/routes/index.ts | true | 200 | 402 | //router main
import { Router } from "express";
import { Request, Response } from "express";
import authRouter from "./auth";
import { getConnection } from "../middleware/getDB";
import authProduct from "./product";
import verifyToken from "../middleware/verifyToken";
const router = Router();
router.use("/auth", authR... | 7 |
sowmiya-NK/AngularCourse | e7404e4 | src/app/service/receipe.service.ts | TypeScript | www.github.com/sowmiya-NK/AngularCourse/tree/main/src/app/service/receipe.service.ts | https://raw.githubusercontent.com/sowmiya-NK/AngularCourse/e7404e4/src/app/service/receipe.service.ts | sowmiya-NK/AngularCourse e7404e4 src/app/service/receipe.service.ts | true | 200 | 1,078 | import { EventEmitter, Injectable } from '@angular/core';
import { Receipe } from '../model/receipe.module';
import { Ingrediant } from '../model/Ingrediant.module';
import { ShoppingListService } from './shopping-list.service';
@Injectable({
providedIn: 'root',
})
export class ReceipeService {
constructor(private... | 0 |
nakel-ola/relief_cash | 1286068 | type.d.ts | TypeScript | www.github.com/nakel-ola/relief_cash/tree/main/type.d.ts | https://raw.githubusercontent.com/nakel-ola/relief_cash/1286068/type.d.ts | nakel-ola/relief_cash 1286068 type.d.ts | true | 200 | 749 | type UserType = {
uid: string;
firstName: string;
lastName: string;
email: string;
password: string;
uid: string;
updatedAt: Date;
createdAt: Date;
};
type TaskType = {
id: string;
name: string;
content: string;
users: string[];
dueDate: string;
};
type MemberType = {
uid: string;
firstN... | 2 |
CCPablo/iot-angular-client | 76f5882 | src/app/background-canvas/sun.p5.ts | TypeScript | www.github.com/CCPablo/iot-angular-client/tree/main/src/app/background-canvas/sun.p5.ts | https://raw.githubusercontent.com/CCPablo/iot-angular-client/76f5882/src/app/background-canvas/sun.p5.ts | CCPablo/iot-angular-client 76f5882 src/app/background-canvas/sun.p5.ts | true | 200 | 1,908 | export class Sun {
x: number;
y = 0;
radius: number;
color = this.s.color(256, 256, 50);
constructor (private s: any, radius, x) {
this.x = x;
this.radius = radius;
}
update = function() {
this.color = this.s.day.getSunColorForCurrentPeriod();
let sunDegreePercent = this.s.day.getSunDeg... | 6 |
54u7/Tarea-5 | cf23b86 | src/app/portada/portada.page.ts | TypeScript | www.github.com/54u7/Tarea-5/tree/main/src/app/portada/portada.page.ts | https://raw.githubusercontent.com/54u7/Tarea-5/cf23b86/src/app/portada/portada.page.ts | 54u7/Tarea-5 cf23b86 src/app/portada/portada.page.ts | true | 200 | 323 | import { Component, OnInit } from '@angular/core';
import { register } from 'swiper/element/bundle';
register();
@Component({
selector: 'app-portada',
templateUrl: './portada.page.html',
styleUrls: ['./portada.page.scss'],
})
export class PortadaPage implements OnInit {
constructor() { }
ngOnInit() {
}
... | 4 |
PanchonSoto/nodets-template | 732dae4 | src/domain/dtos/auth/register-user.dto.ts | TypeScript | www.github.com/PanchonSoto/nodets-template/tree/main/src/domain/dtos/auth/register-user.dto.ts | https://raw.githubusercontent.com/PanchonSoto/nodets-template/732dae4/src/domain/dtos/auth/register-user.dto.ts | PanchonSoto/nodets-template 732dae4 src/domain/dtos/auth/register-user.dto.ts | true | 200 | 694 | import { regularExps } from "../../../config";
export class RegisterUserDto {
private constructor(
public name: string,
public email: string,
public password: string
){}
static create(object: {[key:string]:any}): [string?, RegisterUserDto?] {
const { name, email, pas... | 5 |
ronaldo071515/node-multiplication | aa18664 | src/presentation/server-app.ts | TypeScript | www.github.com/ronaldo071515/node-multiplication/tree/main/src/presentation/server-app.ts | https://raw.githubusercontent.com/ronaldo071515/node-multiplication/aa18664/src/presentation/server-app.ts | ronaldo071515/node-multiplication aa18664 src/presentation/server-app.ts | true | 200 | 803 | import { CreateTable } from "../domain/use-cases/create-table.use-case";
import { SaveFile } from "../domain/use-cases/save-file.use-case";
interface RunOptions {
base: number;
limit: number;
showTable: boolean;
fileName?: string;
fileDestination?: string;
}
export class ServerApp {
static r... | 1 |
commercetools/test-data | 18456ec | models/product/src/product-variant/product-variant-draft/presets/sample-data-b2b/zz-456-st-02.spec.ts | TypeScript | www.github.com/commercetools/test-data/tree/main/models/product/src/product-variant/product-variant-draft/presets/sample-data-b2b/zz-456-st-02.spec.ts | https://raw.githubusercontent.com/commercetools/test-data/18456ec/models/product/src/product-variant/product-variant-draft/presets/sample-data-b2b/zz-456-st-02.spec.ts | commercetools/test-data 18456ec models/product/src/product-variant/product-variant-draft/presets/sample-data-b2b/zz-456-st-02.spec.ts | true | 200 | 2,895 | import type { TProductVariantDraft } from '../../../types';
import zz456St02 from './zz-456-st-02';
describe(`with zz456St02 preset`, () => {
it(`should return a zz456St02 preset`, () => {
const zz456St02Preset = zz456St02().build<TProductVariantDraft>();
expect(zz456St02Preset).toMatchInlineSnapshot(`
... | 3 |
danubiobwm/myappmovie | d5e10b3 | src/components/Review/styles.ts | TypeScript | www.github.com/danubiobwm/myappmovie/tree/main/src/components/Review/styles.ts | https://raw.githubusercontent.com/danubiobwm/myappmovie/d5e10b3/src/components/Review/styles.ts | danubiobwm/myappmovie d5e10b3 src/components/Review/styles.ts | true | 200 | 796 | import styled from 'styled-components';
import { DetailedHTMLProps, ButtonHTMLAttributes } from "react";
interface FavoriteButtonProps extends DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
active?: boolean;
}
export const ReviewContainer = styled.div`
display: flex;
flex-direc... | 0 |
straystreyk/react-hinter | dedbec3 | lib/logic/useMatchMedia.ts | TypeScript | www.github.com/straystreyk/react-hinter/tree/main/lib/logic/useMatchMedia.ts | https://raw.githubusercontent.com/straystreyk/react-hinter/dedbec3/lib/logic/useMatchMedia.ts | straystreyk/react-hinter dedbec3 lib/logic/useMatchMedia.ts | true | 200 | 1,110 | import { useEffect, useState } from "react";
export const useMediaQuery = (query: string) => {
const [matches, setMatches] = useState<boolean>(false);
/** Handles the change event of the media query. */
useEffect(() => {
const matchMedia = window.matchMedia(query);
const getMatches = (query: string): ... | 7 |
ptrung26/misa-tcdn | 69a93d6 | App/angular/src/app/shared/data-common/data-common.module.ts | TypeScript | www.github.com/ptrung26/misa-tcdn/tree/main/App/angular/src/app/shared/data-common/data-common.module.ts | https://raw.githubusercontent.com/ptrung26/misa-tcdn/69a93d6/App/angular/src/app/shared/data-common/data-common.module.ts | ptrung26/misa-tcdn 69a93d6 App/angular/src/app/shared/data-common/data-common.module.ts | true | 200 | 760 | import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
// import {NgSelectModule} from '@ng-select/ng-select';
import { DataCommonService } from '@app/shared/data-common/data-common.service';
import { CustomizeCompModu... | 2 |
slyofzero/DecryptBot | 7381780 | src/bot/commands/help.ts | TypeScript | www.github.com/slyofzero/DecryptBot/tree/main/src/bot/commands/help.ts | https://raw.githubusercontent.com/slyofzero/DecryptBot/7381780/src/bot/commands/help.ts | slyofzero/DecryptBot 7381780 src/bot/commands/help.ts | true | 200 | 475 | import { cleanUpBotMessage } from "@/utils/bot";
import { CommandContext, Context } from "grammy";
export async function help(ctx: CommandContext<Context>) {
const text = `\`$Decentralized Private Network\`! Our Telegram bot offers GPU-Powered AI Servers for purchase, available across diverse Geographical Regions an... | 7 |
playoffthecuff/graphiql-app | 900b3c1 | app/utils/exctractVariablesFromQuery.ts | TypeScript | www.github.com/playoffthecuff/graphiql-app/tree/main/app/utils/exctractVariablesFromQuery.ts | https://raw.githubusercontent.com/playoffthecuff/graphiql-app/900b3c1/app/utils/exctractVariablesFromQuery.ts | playoffthecuff/graphiql-app 900b3c1 app/utils/exctractVariablesFromQuery.ts | true | 200 | 1,007 | type Variables = {
[key: string]: number | string;
};
export function extractVariablesFromGraphQLQuery(query: string): {updatedQuery: string; variables: string} {
const variablesObject: Variables = {};
const variableDefinitionRegex = /\$([\w]+):\s*([\w!]+)/g;
let match;
while ((match = variableDefinitionReg... | 0 |
franBarrientos/StopSpent-Backend | e57b5ed | src/controllers/auth.controller.ts | TypeScript | www.github.com/franBarrientos/StopSpent-Backend/tree/main/src/controllers/auth.controller.ts | https://raw.githubusercontent.com/franBarrientos/StopSpent-Backend/e57b5ed/src/controllers/auth.controller.ts | franBarrientos/StopSpent-Backend e57b5ed src/controllers/auth.controller.ts | true | 200 | 1,390 | import { Request, Response } from "express";
import { responseError, responseSuccess } from "../utils/handlerResponses";
import authService from "../services/auth.service";
import { signToken } from "../utils/handlerJWT";
const login = async (req: Request, res: Response) => {
try {
const { email } = req.body;
... | 2 |
ghost8395/MEAN-project-CRUD-Auth | 8609916 | backend/src/services/product.services.ts | TypeScript | www.github.com/ghost8395/MEAN-project-CRUD-Auth/tree/main/backend/src/services/product.services.ts | https://raw.githubusercontent.com/ghost8395/MEAN-project-CRUD-Auth/8609916/backend/src/services/product.services.ts | ghost8395/MEAN-project-CRUD-Auth 8609916 backend/src/services/product.services.ts | true | 200 | 2,272 | import { FilterQuery, QueryOptions, UpdateQuery } from "mongoose";
import { IProduct } from "../interface/product.inerface";
import ProductModel from "../model/product.model";
export async function getAllProducts() {
return await ProductModel.find().exec();
}
export async function getAllProductsByCreatedBy(userId) ... | 3 |
re-ovo/path-tracer-web | 5c068c9 | src/core/bvh.ts | TypeScript | www.github.com/re-ovo/path-tracer-web/tree/main/src/core/bvh.ts | https://raw.githubusercontent.com/re-ovo/path-tracer-web/5c068c9/src/core/bvh.ts | re-ovo/path-tracer-web 5c068c9 src/core/bvh.ts | true | 200 | 1,586 | import { type Hittable } from '@/core/object';
import { AABB } from '@/core/aabb';
import { HitRecord, type Ray } from '@/core/ray';
import type { Interval } from '@/core/interval';
export class BVHNode implements Hittable {
boundingBox: AABB;
left: Hittable;
right: Hittable;
constructor(objects: Hittable[], ... | 7 |
sunsetFog/mobxSky | 2387067 | src/utils/secret.ts | TypeScript | www.github.com/sunsetFog/mobxSky/tree/main/src/utils/secret.ts | https://raw.githubusercontent.com/sunsetFog/mobxSky/2387067/src/utils/secret.ts | sunsetFog/mobxSky 2387067 src/utils/secret.ts | true | 200 | 2,653 | import CryptoJS from 'crypto-js';
/****
* 域名缓存加密
*/
const key = CryptoJS.enc.Utf8.parse('N2841A3412APCD6F'); // 十六位十六进制数作为密钥
const iv = CryptoJS.enc.Utf8.parse('AUCDTF12H41P34Y2'); // 十六位十六进制数作为密钥偏移量
// 解密方法
const Decrypt = (word: any) => {
const encryptedHexStr = CryptoJS.enc.Hex.parse(word);
const srcs = Cry... | 0 |
tanmaysalunke/course-swap | 17dc94f | course-swap-backend/node_modules/puppeteer-core/src/revisions.ts | TypeScript | www.github.com/tanmaysalunke/course-swap/tree/main/course-swap-backend/node_modules/puppeteer-core/src/revisions.ts | https://raw.githubusercontent.com/tanmaysalunke/course-swap/17dc94f/course-swap-backend/node_modules/puppeteer-core/src/revisions.ts | tanmaysalunke/course-swap 17dc94f course-swap-backend/node_modules/puppeteer-core/src/revisions.ts | true | 200 | 258 | /**
* @license
* Copyright 2020 Google Inc.
* SPDX-License-Identifier: Apache-2.0
*/
/**
* @internal
*/
export const PUPPETEER_REVISIONS = Object.freeze({
chrome: '126.0.6478.55',
'chrome-headless-shell': '126.0.6478.55',
firefox: 'latest',
});
| 3 |
egecan12/security-platform | b5da80a | backend/tests/connectDB.test.ts | TypeScript | www.github.com/egecan12/security-platform/tree/main/backend/tests/connectDB.test.ts | https://raw.githubusercontent.com/egecan12/security-platform/b5da80a/backend/tests/connectDB.test.ts | egecan12/security-platform b5da80a backend/tests/connectDB.test.ts | true | 200 | 1,846 | import mongoose from 'mongoose';
import connectDB from '../src/db'; // Replace with the actual path
// Mock mongoose.connect
jest.mock('mongoose', () => ({
connect: jest.fn(),
}));
describe('connectDB', () => {
beforeEach(() => {
jest.clearAllMocks();
});
it('should log "MongoDB connected" on successful ... | 7 |
mohamedhyssm/my-Portfolio | 486667b | JS/src/main.ts | TypeScript | www.github.com/mohamedhyssm/my-Portfolio/tree/main/JS/src/main.ts | https://raw.githubusercontent.com/mohamedhyssm/my-Portfolio/486667b/JS/src/main.ts | mohamedhyssm/my-Portfolio 486667b JS/src/main.ts | true | 200 | 2,493 | // navbar
let burgerIcon = <HTMLDivElement>document.getElementById("burgerIcon"),
ulNavBar = <HTMLUListElement>document.getElementById("ulNavBar"),
anchorsNavBar = <HTMLAnchorElement[]> Array.from(document.querySelectorAll("#ulNavBar li a")),
// Sections
aboutSection = <HTMLDivElement>document.getElementById("A... | 2 |
ThiagoDelgado-D/firstapp | 1766eca | src/tasks/tasks.controller.ts | TypeScript | www.github.com/ThiagoDelgado-D/firstapp/tree/main/src/tasks/tasks.controller.ts | https://raw.githubusercontent.com/ThiagoDelgado-D/firstapp/1766eca/src/tasks/tasks.controller.ts | ThiagoDelgado-D/firstapp 1766eca src/tasks/tasks.controller.ts | true | 200 | 1,287 | import {
Controller,
Delete,
Patch,
Get,
Post,
Put,
Body,
Query,
Param,
} from '@nestjs/common';
import { TasksService } from './tasks.service';
import { CreateTaskDto } from './dto/create-task.dto';
import { UpdateTaskDto } from './dto/update-task.dto';
import { ApiOperation, ApiResponse, ApiTags } f... | 0 |
hornermar/system-sykora | 901731d | src/hooks/useStepLogic.ts | TypeScript | www.github.com/hornermar/system-sykora/tree/main/src/hooks/useStepLogic.ts | https://raw.githubusercontent.com/hornermar/system-sykora/901731d/src/hooks/useStepLogic.ts | hornermar/system-sykora 901731d src/hooks/useStepLogic.ts | true | 200 | 2,453 | import { useCallback, useMemo } from "react";
import { useNavigate } from "react-router-dom";
import { useStep } from "./useStep";
import { getFilledCells } from "../utils/getFilledCells";
import { FormValues } from "../types/FormValues";
export type StepButton = {
label?: string;
onClick: () => void;
isDisable... | 3 |
ribeirojer/Boutique-da-Mol | 88990ea | src/utils/cardsData.ts | TypeScript | www.github.com/ribeirojer/Boutique-da-Mol/tree/main/src/utils/cardsData.ts | https://raw.githubusercontent.com/ribeirojer/Boutique-da-Mol/88990ea/src/utils/cardsData.ts | ribeirojer/Boutique-da-Mol 88990ea src/utils/cardsData.ts | true | 200 | 22,769 | // import { ClothingCategory, ClothingItem, Gender } from "@/interfaces/Clothes";
export const productsData: any[] = [
{
id: 1,
name: "Camiseta Básica",
brand: "XYZ Moda",
price: 19.99,
oldPrice: 29.99,
sizes: ["S", "M", "L", "XL"],
color: ["white"],
category: "Tops",
gender: "F",... | 7 |
BondPV/online-store | 8e90472 | src/components/main/catalog/Catalog.ts | TypeScript | www.github.com/BondPV/online-store/tree/main/src/components/main/catalog/Catalog.ts | https://raw.githubusercontent.com/BondPV/online-store/8e90472/src/components/main/catalog/Catalog.ts | BondPV/online-store 8e90472 src/components/main/catalog/Catalog.ts | true | 200 | 872 | import { IdMap } from 'constants/htmlConstants';
import Product from 'components/main/product/Product';
import { IProduct } from 'types/interfaces';
import './catalog.scss';
class Catalog {
constructor(public products: IProduct[]) {}
render() {
const parentElement = document.querySelector(IdMap.catalog);
... | 2 |
tushar-454/mini-store-backend | 0ae5eda | src/controllers/coupon/update_coupon.ts | TypeScript | www.github.com/tushar-454/mini-store-backend/tree/main/src/controllers/coupon/update_coupon.ts | https://raw.githubusercontent.com/tushar-454/mini-store-backend/0ae5eda/src/controllers/coupon/update_coupon.ts | tushar-454/mini-store-backend 0ae5eda src/controllers/coupon/update_coupon.ts | true | 200 | 1,128 | import { NextFunction, Request, Response } from 'express';
import { findCouponByProperty } from '../../services/coupon/find_coupon_by_property';
import { UpdateCouponInput } from '../../validation/coupon/update_coupon';
const updateCoupon = async (req: Request, res: Response, next: NextFunction): Promise<void> => {
... | 0 |
huynhvanngoan/airbnb-project | 9067587 | server/utils/auth.ts | TypeScript | www.github.com/huynhvanngoan/airbnb-project/tree/main/server/utils/auth.ts | https://raw.githubusercontent.com/huynhvanngoan/airbnb-project/9067587/server/utils/auth.ts | huynhvanngoan/airbnb-project 9067587 server/utils/auth.ts | true | 200 | 1,012 | import { Lucia } from "lucia";
import { GitHub } from "arctic";
import { webcrypto } from "node:crypto";
import adapter from "../database";
Object.defineProperty(globalThis, 'crypto', {
value: webcrypto,
writable: false,
configurable: false
});
export const lucia = new Lucia(adapter, {
sessionCookie: ... | 3 |
OwolabiSharon/wave-giga | 8277713 | giga_ecommerce_main/src/controllers/subCategory.controller.ts | TypeScript | www.github.com/OwolabiSharon/wave-giga/tree/main/giga_ecommerce_main/src/controllers/subCategory.controller.ts | https://raw.githubusercontent.com/OwolabiSharon/wave-giga/8277713/giga_ecommerce_main/src/controllers/subCategory.controller.ts | OwolabiSharon/wave-giga 8277713 giga_ecommerce_main/src/controllers/subCategory.controller.ts | true | 200 | 3,378 | import { Request, Response } from 'express';
import httpStatus from 'http-status';
import SubCategoryZod from '../validations/subCategory.model.zod';
import SubCategoryService from '../services/subCategory.service';
class SubCategoryController{
public async createSubCategory(req: Request, res: Response) {
... | 2 |
gudrum1983/algososh | 1259b53 | src/utils/utils.ts | TypeScript | www.github.com/gudrum1983/algososh/tree/main/src/utils/utils.ts | https://raw.githubusercontent.com/gudrum1983/algososh/1259b53/src/utils/utils.ts | gudrum1983/algososh 1259b53 src/utils/utils.ts | true | 200 | 1,297 | import {ElementStates} from "../types/element-states";
import {IStateCircleElement, ICircleElement} from "./circle";
import {ColumnElement, IColumnComponent, IColumnElement} from "./column";
import {nanoid} from "nanoid";
export function cloneElements<T>(elements: Array<T>): Array<T> {
return elements.map(el => ({..... | 0 |
cocoooowang1230/bingo12.22 | 1e2620f | src/utils/bingoUtils.ts | TypeScript | www.github.com/cocoooowang1230/bingo12.22/tree/main/src/utils/bingoUtils.ts | https://raw.githubusercontent.com/cocoooowang1230/bingo12.22/1e2620f/src/utils/bingoUtils.ts | cocoooowang1230/bingo12.22 1e2620f src/utils/bingoUtils.ts | true | 200 | 1,638 | export const calculateTotalStars = (stars: Record<number, number>): number => {
return Object.values(stars).reduce((total, count) => total + (count || 0), 0);
};
export const findCompletedLines = (stars: Record<number, number>, size: number): number[] => {
const completedLines: number[] = [];
// Check rows
fo... | 3 |
MarekLubkiewicz/Planszowki | b6edb42 | src/app/pages/auth/rejestracja/rejestracja-routing.module.ts | TypeScript | www.github.com/MarekLubkiewicz/Planszowki/tree/main/src/app/pages/auth/rejestracja/rejestracja-routing.module.ts | https://raw.githubusercontent.com/MarekLubkiewicz/Planszowki/b6edb42/src/app/pages/auth/rejestracja/rejestracja-routing.module.ts | MarekLubkiewicz/Planszowki b6edb42 src/app/pages/auth/rejestracja/rejestracja-routing.module.ts | true | 200 | 367 | import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { RejestracjaPage } from './rejestracja.page';
const routes: Routes = [
{
path: '',
component: RejestracjaPage
}
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule],
}... | 7 |
Apariciolemes/todo-list-nuxt | 9c7756f | components/TaskForm/TaskForm.spec.ts | TypeScript | www.github.com/Apariciolemes/todo-list-nuxt/tree/main/components/TaskForm/TaskForm.spec.ts | https://raw.githubusercontent.com/Apariciolemes/todo-list-nuxt/9c7756f/components/TaskForm/TaskForm.spec.ts | Apariciolemes/todo-list-nuxt 9c7756f components/TaskForm/TaskForm.spec.ts | true | 200 | 1,303 | import { describe, it, expect } from 'vitest'
import { mount, } from '@vue/test-utils'
import TaskForm from './TaskForm.vue'
import BaseTextField from '../BaseTextField/BaseTextField.vue'
describe('TaskForm', () => {
it('should render TaskForm component and render with child components', () => {
const wrap... | 2 |
Cinema-E-Booking/cinema-booking-system | ea4d3b4 | next-app/pages/api/newAdmin.ts | TypeScript | www.github.com/Cinema-E-Booking/cinema-booking-system/tree/main/next-app/pages/api/newAdmin.ts | https://raw.githubusercontent.com/Cinema-E-Booking/cinema-booking-system/ea4d3b4/next-app/pages/api/newAdmin.ts | Cinema-E-Booking/cinema-booking-system ea4d3b4 next-app/pages/api/newAdmin.ts | true | 200 | 578 | import { NextApiRequest, NextApiResponse } from "next";
import { /*CreateAdminOpts,*/ createAdmin } from "@/lib/account";
export default async function handler(
req: NextApiRequest,
res: NextApiResponse<{}>,
) {
const { accountId, employeeId, title } = req.body;
try {
const response = a... | 0 |
ZeEdu/summoners-helper | 3e64252 | src/app/shared/components/champion/guides/guides.component.ts | TypeScript | www.github.com/ZeEdu/summoners-helper/tree/main/src/app/shared/components/champion/guides/guides.component.ts | https://raw.githubusercontent.com/ZeEdu/summoners-helper/3e64252/src/app/shared/components/champion/guides/guides.component.ts | ZeEdu/summoners-helper 3e64252 src/app/shared/components/champion/guides/guides.component.ts | true | 200 | 1,303 | import { Component, Input, OnInit } from '@angular/core';
import { AngularFireAuth } from '@angular/fire/auth';
import { take } from 'rxjs/operators';
import { Builds } from 'src/app/interfaces/get-builds';
import { BuildManagerService } from 'src/app/services/build-manager.service';
@Component({
selector: 'app-guid... | 3 |
xewerx/e-dziennik | 67e0eb9 | Frontend/edziennik/src/app/auth.guardLogin.ts | TypeScript | www.github.com/xewerx/e-dziennik/tree/main/Frontend/edziennik/src/app/auth.guardLogin.ts | https://raw.githubusercontent.com/xewerx/e-dziennik/67e0eb9/Frontend/edziennik/src/app/auth.guardLogin.ts | xewerx/e-dziennik 67e0eb9 Frontend/edziennik/src/app/auth.guardLogin.ts | true | 200 | 643 | import { Injectable } from '@angular/core';
import { CanActivate, Router, UrlTree } from '@angular/router';
import { AuthService } from './auth.service';
@Injectable({
providedIn: 'root'
})
export class AuthGuardLogin implements CanActivate {
constructor(private service: AuthService, private router: Router) { }
... | 2 |
griffithlab/civic-v2 | 81719af | client/src/app/views/diseases/diseases-detail/diseases-detail.component.ts | TypeScript | www.github.com/griffithlab/civic-v2/tree/main/client/src/app/views/diseases/diseases-detail/diseases-detail.component.ts | https://raw.githubusercontent.com/griffithlab/civic-v2/81719af/client/src/app/views/diseases/diseases-detail/diseases-detail.component.ts | griffithlab/civic-v2 81719af client/src/app/views/diseases/diseases-detail/diseases-detail.component.ts | true | 200 | 1,373 | import { Component, OnDestroy } from '@angular/core'
import { ActivatedRoute } from '@angular/router'
import {
Disease,
DiseaseDetailGQL,
DiseaseDetailQuery,
DiseaseDetailQueryVariables,
Maybe,
} from '@app/generated/civic.apollo'
import { QueryRef } from 'apollo-angular'
import { Observable, Subscription } f... | 7 |
uchechigeorge/bytest-client | 5f805fd | src/app/components/posts/posts.module.ts | TypeScript | www.github.com/uchechigeorge/bytest-client/tree/main/src/app/components/posts/posts.module.ts | https://raw.githubusercontent.com/uchechigeorge/bytest-client/5f805fd/src/app/components/posts/posts.module.ts | uchechigeorge/bytest-client 5f805fd src/app/components/posts/posts.module.ts | true | 200 | 570 | import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { AddPostComponent } from './add-post/add-post.component';
import { IonicModule } from '@ionic/angular';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { EditPostComponent } from './edit-post/edit... | 0 |
ajlende/color-fns | 65d1bce | src/toHex/index.test.ts | TypeScript | www.github.com/ajlende/color-fns/tree/main/src/toHex/index.test.ts | https://raw.githubusercontent.com/ajlende/color-fns/65d1bce/src/toHex/index.test.ts | ajlende/color-fns 65d1bce src/toHex/index.test.ts | true | 200 | 381 | import test from "ava"
import { Color, Hex } from "../types"
import toHex from "."
test("returns a hex color", (t) => {
const input: Color = [0.2, 0.4, 0.6, 1]
const output: Hex = "#336699"
t.is(toHex(input), output)
})
test("returns a hex color with alpha", (t) => {
const input: Color = [0.2, 0.4, 0.6, 0.8]
co... | 3 |
brayanmuzzi/task-nestjs | 196eaf0 | src/main.ts | TypeScript | www.github.com/brayanmuzzi/task-nestjs/tree/main/src/main.ts | https://raw.githubusercontent.com/brayanmuzzi/task-nestjs/196eaf0/src/main.ts | brayanmuzzi/task-nestjs 196eaf0 src/main.ts | true | 200 | 869 | import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';
import { ValidationPipe } from '@nestjs/common';
import { AllExceptionsFilter } from './common/index';
async function bootstrap() {
const app = await NestFact... | 2 |
escritorio-dados/nanowip | 836ddd7 | backend/src/modules/portfolios/services/create.portfolio.service.ts | TypeScript | www.github.com/escritorio-dados/nanowip/tree/main/backend/src/modules/portfolios/services/create.portfolio.service.ts | https://raw.githubusercontent.com/escritorio-dados/nanowip/836ddd7/backend/src/modules/portfolios/services/create.portfolio.service.ts | escritorio-dados/nanowip 836ddd7 backend/src/modules/portfolios/services/create.portfolio.service.ts | true | 200 | 813 | import { Injectable } from '@nestjs/common';
import { PortfolioDto } from '../dtos/portfolio.dto';
import { PortfoliosRepository } from '../repositories/portfolios.repository';
import { CommonPortfolioService } from './common.portfolio.service';
type ICreatePortfolioService = PortfolioDto & { organization_id: string ... | 6 |
FOCKUSTY/dashboard | 24a7269 | server/src/app/session.app.ts | TypeScript | www.github.com/FOCKUSTY/dashboard/tree/main/server/src/app/session.app.ts | https://raw.githubusercontent.com/FOCKUSTY/dashboard/24a7269/server/src/app/session.app.ts | FOCKUSTY/dashboard 24a7269 server/src/app/session.app.ts | true | 200 | 1,326 | import { Express } from 'express';
import session from 'express-session';
import store from 'connect-mongo';
class Session {
private _secret: string;
private _app: Express;
private _resave: boolean = false;
private _saveUninitialized: boolean = false;
private _cookie: { maxAge: number } = { maxAge... | 4 |
leofls/vendas-online-web | 2f7122a | src/shared/hooks/useNotification.ts | TypeScript | www.github.com/leofls/vendas-online-web/tree/main/src/shared/hooks/useNotification.ts | https://raw.githubusercontent.com/leofls/vendas-online-web/2f7122a/src/shared/hooks/useNotification.ts | leofls/vendas-online-web 2f7122a src/shared/hooks/useNotification.ts | true | 200 | 639 | import { notification as notificationAntd } from "antd";
import { useGlobalContext } from "./useGlobalContext";
import { useEffect } from "react";
export const useNotification = () => {
const [api, contextHolder] = notificationAntd.useNotification();
const { notification } = useGlobalContext();
useEffect(() => ... | 0 |
u20637986/INF370Project | 3363b1f | GreenLightToursBookingSystem-FrontEnd/src/app/trailer/trailer-type/trailer-type.component.spec.ts | TypeScript | www.github.com/u20637986/INF370Project/tree/main/GreenLightToursBookingSystem-FrontEnd/src/app/trailer/trailer-type/trailer-type.component.spec.ts | https://raw.githubusercontent.com/u20637986/INF370Project/3363b1f/GreenLightToursBookingSystem-FrontEnd/src/app/trailer/trailer-type/trailer-type.component.spec.ts | u20637986/INF370Project 3363b1f GreenLightToursBookingSystem-FrontEnd/src/app/trailer/trailer-type/trailer-type.component.spec.ts | true | 200 | 635 | import { ComponentFixture, TestBed } from '@angular/core/testing';
import { TrailerTypeComponent } from './trailer-type.component';
describe('TrailerTypeComponent', () => {
let component: TrailerTypeComponent;
let fixture: ComponentFixture<TrailerTypeComponent>;
beforeEach(async () => {
await TestBed.confi... | 5 |
viscoci/inversify-express-postman | 846b24b | src/interfaces/ExternalMetadata.ts | TypeScript | www.github.com/viscoci/inversify-express-postman/tree/main/src/interfaces/ExternalMetadata.ts | https://raw.githubusercontent.com/viscoci/inversify-express-postman/846b24b/src/interfaces/ExternalMetadata.ts | viscoci/inversify-express-postman 846b24b src/interfaces/ExternalMetadata.ts | true | 200 | 1,188 | import { FileTypings, FileType } from ".";
export type ExternalMetadata =
{
/**
* Path to the directory where documenation data is stored
*/
root: string;
/**
* Whether to override decorator data
*/
override?: boolean;
/**
* Whether to automatically generate directories and... | 1 |
Mayoo1988/LeasingContract | 8093e63 | src/app/service/vehicle.service.spec.ts | TypeScript | www.github.com/Mayoo1988/LeasingContract/tree/main/src/app/service/vehicle.service.spec.ts | https://raw.githubusercontent.com/Mayoo1988/LeasingContract/8093e63/src/app/service/vehicle.service.spec.ts | Mayoo1988/LeasingContract 8093e63 src/app/service/vehicle.service.spec.ts | true | 200 | 2,860 | import { TestBed } from '@angular/core/testing';
import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
import { vehicleService } from './vehicle.service';
import { vehicle } from '../Model/Master';
import{environment} from '../../enviornment';
describe('vehicleService', () => {... | 2 |
DeshanHarshana/ReactCICD | cbd09e4 | src/contexts/dashboardContext.ts | TypeScript | www.github.com/DeshanHarshana/ReactCICD/tree/main/src/contexts/dashboardContext.ts | https://raw.githubusercontent.com/DeshanHarshana/ReactCICD/cbd09e4/src/contexts/dashboardContext.ts | DeshanHarshana/ReactCICD cbd09e4 src/contexts/dashboardContext.ts | true | 200 | 443 | import {createContext, useContext} from 'react'
import { User } from '../App'
export const DashboardContext = createContext<User | undefined>(undefined)
//custom hook
//this always return user object never return undefined
export function useUserContext(){
const user = useContext(DashboardContext)
if(user... | 3 |
dev-miguel-resources/angular-firebase | f93ad77 | src/app/shared/components/table/table.component.ts | TypeScript | www.github.com/dev-miguel-resources/angular-firebase/tree/main/src/app/shared/components/table/table.component.ts | https://raw.githubusercontent.com/dev-miguel-resources/angular-firebase/f93ad77/src/app/shared/components/table/table.component.ts | dev-miguel-resources/angular-firebase f93ad77 src/app/shared/components/table/table.component.ts | true | 200 | 2,433 | import { Component, OnInit, ViewChild, AfterViewInit } from '@angular/core';
import {MatPaginator} from '@angular/material/paginator';
import {MatSort} from '@angular/material/sort';
import {MatTableDataSource} from '@angular/material/table';
import { PostService } from '../../../components/posts/post/post.service';
im... | 7 |
Katnippy/penguinco-frontend | 4000ba1 | src/services/items.ts | TypeScript | www.github.com/Katnippy/penguinco-frontend/tree/main/src/services/items.ts | https://raw.githubusercontent.com/Katnippy/penguinco-frontend/4000ba1/src/services/items.ts | Katnippy/penguinco-frontend 4000ba1 src/services/items.ts | true | 200 | 444 | import { IStockItem } from '../common/types';
import { read } from './crud';
// ? Make environment variable?
const baseUrl =
'https://app-penguinco-prod-uksouth-002.azurewebsites.net/items';
async function readAllStockItems() {
return await read<Array<IStockItem>>(baseUrl);
}
async function readStockItemById(id:... | 6 |
RazvanLucacii/angular-proyects | 103f43c | angularmodeloscomunicacion/src/app/app.module.ts | TypeScript | www.github.com/RazvanLucacii/angular-proyects/tree/main/angularmodeloscomunicacion/src/app/app.module.ts | https://raw.githubusercontent.com/RazvanLucacii/angular-proyects/103f43c/angularmodeloscomunicacion/src/app/app.module.ts | RazvanLucacii/angular-proyects 103f43c angularmodeloscomunicacion/src/app/app.module.ts | true | 200 | 1,345 | import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app.component';
import { ListaproductosComponent } from './components/listaproductos/listaproductos.component';
import { HomeComponent } from './components/home/home.component';
import {... | 5 |
addevin/table-search-angular | 6f50bcf | src/app/components/home/home.component.ts | TypeScript | www.github.com/addevin/table-search-angular/tree/main/src/app/components/home/home.component.ts | https://raw.githubusercontent.com/addevin/table-search-angular/6f50bcf/src/app/components/home/home.component.ts | addevin/table-search-angular 6f50bcf src/app/components/home/home.component.ts | true | 200 | 847 | import { Component, OnInit } from '@angular/core';
import { ApiService } from '../../services/api.service'
import { UserModelInterface } from 'src/app/models/user.model';
import { map } from 'rxjs'
@Component({
selector: 'app-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.css']
})
exp... | 0 |
Edsonalencar/TorqueTech-front | d5568ab | src/services/workService/service.ts | TypeScript | www.github.com/Edsonalencar/TorqueTech-front/tree/main/src/services/workService/service.ts | https://raw.githubusercontent.com/Edsonalencar/TorqueTech-front/d5568ab/src/services/workService/service.ts | Edsonalencar/TorqueTech-front d5568ab src/services/workService/service.ts | true | 200 | 404 | import { GenericService } from "../genericService/genericService";
import { WorkStatusRequest } from "./dto";
export class IWorkService extends GenericService {
updateStatus = async <T>(workId: string, data: WorkStatusRequest) => {
return (await this.getApi().put<T>(
`${this.getURL()}/${workId}/status`,
... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.