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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Cholo0022/CURSO-FRONTEND | 8d9be7f | TypeScript/ProyectoInicial/app/controllers/negociacion-controller.ts | TypeScript | www.github.com/Cholo0022/CURSO-FRONTEND/tree/main/TypeScript/ProyectoInicial/app/controllers/negociacion-controller.ts | https://raw.githubusercontent.com/Cholo0022/CURSO-FRONTEND/8d9be7f/TypeScript/ProyectoInicial/app/controllers/negociacion-controller.ts | Cholo0022/CURSO-FRONTEND 8d9be7f TypeScript/ProyectoInicial/app/controllers/negociacion-controller.ts | true | 200 | 1,410 | import { Negociacion } from "../models/negociacion.js";
import { Negociaciones } from '../models/negociaciones.js';
export class NegociacionController {
private inputFecha: HTMLInputElement;
private inputCantidad: HTMLInputElement;
private inputValor: HTMLInputElement;
private negociaciones = new Negoc... | 1 |
PiotrRegulski/stan-relaksu | adc6048 | src/components/utilis/useMediaQuery.ts | TypeScript | www.github.com/PiotrRegulski/stan-relaksu/tree/main/src/components/utilis/useMediaQuery.ts | https://raw.githubusercontent.com/PiotrRegulski/stan-relaksu/adc6048/src/components/utilis/useMediaQuery.ts | PiotrRegulski/stan-relaksu adc6048 src/components/utilis/useMediaQuery.ts | true | 200 | 566 | "use client";
import { useState, useEffect } from 'react';
export function useMediaQuery(query: string) {
const [matches, setMatches] = useState(false);
useEffect(() => {
if (typeof window !== "undefined") {
const media = window.matchMedia(query);
const listener = () => setMatches(media.matches);... | 5 |
thakareshubh/BookStoreFrontEnd | 989a5a6 | src/app/app-routing.module.ts | TypeScript | www.github.com/thakareshubh/BookStoreFrontEnd/tree/main/src/app/app-routing.module.ts | https://raw.githubusercontent.com/thakareshubh/BookStoreFrontEnd/989a5a6/src/app/app-routing.module.ts | thakareshubh/BookStoreFrontEnd 989a5a6 src/app/app-routing.module.ts | true | 200 | 1,956 | import { OrderSucceedComponent } from './Component/order-succeed/order-succeed.component';
import { WishListComponent } from './Component/wish-list/wish-list.component';
import { OrderListComponent } from './Component/order-list/order-list.component';
import { MyCartComponent } from './Component/my-cart/my-cart.compone... | 3 |
Kalinichenko1410/goit-typescript-hw-01 | 4bfa761 | src/generics/1.ts | TypeScript | www.github.com/Kalinichenko1410/goit-typescript-hw-01/tree/main/src/generics/1.ts | https://raw.githubusercontent.com/Kalinichenko1410/goit-typescript-hw-01/4bfa761/src/generics/1.ts | Kalinichenko1410/goit-typescript-hw-01 4bfa761 src/generics/1.ts | true | 200 | 475 | import axios from 'axios';
async function fetchData<T>(url: string): Promise<T> {
try {
const response = await axios.get(url);
return response.data;
} catch (error) {
throw new Error(`Error fetching from ${url}: ${error}`);
}
}
interface User {
id: number;
name: string;
}
const fetchUserData ... | 6 |
CleiltonRocha/coffee-delivery | 9c87724 | src/pages/Checkout/components/OrderCoffeeCard/styles.ts | TypeScript | www.github.com/CleiltonRocha/coffee-delivery/tree/main/src/pages/Checkout/components/OrderCoffeeCard/styles.ts | https://raw.githubusercontent.com/CleiltonRocha/coffee-delivery/9c87724/src/pages/Checkout/components/OrderCoffeeCard/styles.ts | CleiltonRocha/coffee-delivery 9c87724 src/pages/Checkout/components/OrderCoffeeCard/styles.ts | true | 200 | 2,132 | import styled from 'styled-components'
export const CoffeeCard = styled.div`
width: 100%;
display: flex;
flex-direction: column;
.divider {
width: 100%;
height: 1px;
background-color: ${(props) => props.theme.colors['base-button']};
margin-top: 1.5rem;
}
`
export const CoffeeData = styled.d... | 7 |
Thanhthiennga098/DOAN_ANGULAR | c3e851f | client/src/app/global.service.ts | TypeScript | www.github.com/Thanhthiennga098/DOAN_ANGULAR/tree/main/client/src/app/global.service.ts | https://raw.githubusercontent.com/Thanhthiennga098/DOAN_ANGULAR/c3e851f/client/src/app/global.service.ts | Thanhthiennga098/DOAN_ANGULAR c3e851f client/src/app/global.service.ts | true | 200 | 665 | import { Injectable } from '@angular/core';
import { BehaviorSubject } from 'rxjs'; // Để theo dõi thay đổi của searchText
@Injectable({
providedIn: 'root', // Điều này giúp dịch vụ có sẵn ở toàn bộ ứng dụng
})
export class GlobalService {
// Dùng BehaviorSubject để theo dõi sự thay đổi của searchText
private se... | 4 |
BrettEastman/bretteastmanstudio | bfe037a | src/routes/api/chat/+server.ts | TypeScript | www.github.com/BrettEastman/bretteastmanstudio/tree/main/src/routes/api/chat/+server.ts | https://raw.githubusercontent.com/BrettEastman/bretteastmanstudio/bfe037a/src/routes/api/chat/%2Bserver.ts | BrettEastman/bretteastmanstudio bfe037a src/routes/api/chat/+server.ts | true | 200 | 4,107 | import { getMusicHistorianResponse } from "$lib/server/gemini";
import type { ChatMessage } from "$lib/server/gemini";
import type { RecordMessage, ListResult } from "$lib/types";
import { json } from "@sveltejs/kit";
export async function POST({ request, locals }) {
if (!locals.user) {
console.error("POST: No u... | 2 |
rafaelaznar/phosphorum | a753058 | src/app/components/shared/login-routed/login-routed.component.ts | TypeScript | www.github.com/rafaelaznar/phosphorum/tree/main/src/app/components/shared/login-routed/login-routed.component.ts | https://raw.githubusercontent.com/rafaelaznar/phosphorum/a753058/src/app/components/shared/login-routed/login-routed.component.ts | rafaelaznar/phosphorum a753058 src/app/components/shared/login-routed/login-routed.component.ts | true | 200 | 4,482 | import { HttpErrorResponse } from '@angular/common/http';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { MatSnackBar } from '@angular/material/snack-bar';
import { Router } from '@angular/router';
import { IPrelogin } from 'src/app/model/model.interfaces';
import { CryptoService } from 's... | 0 |
Daaaai0809/kabos-dev.com | 269f433 | client/src/repositories/r2.ts | TypeScript | www.github.com/Daaaai0809/kabos-dev.com/tree/main/client/src/repositories/r2.ts | https://raw.githubusercontent.com/Daaaai0809/kabos-dev.com/269f433/client/src/repositories/r2.ts | Daaaai0809/kabos-dev.com 269f433 client/src/repositories/r2.ts | true | 200 | 1,198 | import {
GetObjectCommand,
type GetObjectCommandOutput,
PutObjectCommand,
S3Client,
} from "@aws-sdk/client-s3";
const client: S3Client = new S3Client({
region: "auto",
endpoint: process.env.NEXT_PUBLIC_R2_PATH as string,
credentials: {
accessKeyId: process.env.NEXT_PUBLIC_R2_ACCESS_KEY as string,
... | 1 |
Illuvien/illuvien | b11d346 | frontend/src/hooks/useKeyboardShortcuts.ts | TypeScript | www.github.com/Illuvien/illuvien/tree/main/frontend/src/hooks/useKeyboardShortcuts.ts | https://raw.githubusercontent.com/Illuvien/illuvien/b11d346/frontend/src/hooks/useKeyboardShortcuts.ts | Illuvien/illuvien b11d346 frontend/src/hooks/useKeyboardShortcuts.ts | true | 200 | 2,180 | import { useEffect, useCallback, useState } from 'react'
import { v4 as uuidv4 } from 'uuid'
import { addNode, FlowWorkflowNode } from '../store/flowSlice'
import { createNode } from '../utils/nodeFactory'
import { AppDispatch } from '../store/store' // Import AppDispatch type
import { NodeTypes } from '@xyflow/re... | 5 |
girishvscube/practise | cba6dca | project/server/database/migrations/1668769616246_role_modules.ts | TypeScript | www.github.com/girishvscube/practise/tree/main/project/server/database/migrations/1668769616246_role_modules.ts | https://raw.githubusercontent.com/girishvscube/practise/cba6dca/project/server/database/migrations/1668769616246_role_modules.ts | girishvscube/practise cba6dca project/server/database/migrations/1668769616246_role_modules.ts | true | 200 | 587 | import BaseSchema from '@ioc:Adonis/Lucid/Schema'
export default class extends BaseSchema {
protected tableName = 'role_modules'
public async up() {
this.schema.createTable(this.tableName, (table) => {
table.increments('id').primary()
table.string('name', 50).notNullable()
... | 7 |
tingc10/radio | b69116c | src/utils/grow-lights-cron.ts | TypeScript | www.github.com/tingc10/radio/tree/main/src/utils/grow-lights-cron.ts | https://raw.githubusercontent.com/tingc10/radio/b69116c/src/utils/grow-lights-cron.ts | tingc10/radio b69116c src/utils/grow-lights-cron.ts | true | 200 | 939 | import { CronJob } from 'cron';
import { transmitSignalToDevice } from './transmit-codes';
export const turnOnLightsJob = () => {
console.log('Initializing turn on lights job');
// Run turn on job at 8am at every quarter hour every day
new CronJob(
'*/15 8 * * *',
() => {
console.log('Turning on gr... | 3 |
sarwirr/pfa | 9cd314d | backend/src/common/helpers/mail.ts | TypeScript | www.github.com/sarwirr/pfa/tree/main/backend/src/common/helpers/mail.ts | https://raw.githubusercontent.com/sarwirr/pfa/9cd314d/backend/src/common/helpers/mail.ts | sarwirr/pfa 9cd314d backend/src/common/helpers/mail.ts | true | 200 | 1,018 | import * as nodemailer from 'nodemailer';
export function sendEmail(recipient: string, message: string) {
return new Promise((resolve, reject) => {
var transporter = nodemailer.createTransport({
service: 'gmail',
auth: {
user: process.env.SENDER_EMAIL,
pass: process.env.PASSWORD,
... | 6 |
clashbyte/doom-ts | 54eb7eb | src/files/LevelData.ts | TypeScript | www.github.com/clashbyte/doom-ts/tree/main/src/files/LevelData.ts | https://raw.githubusercontent.com/clashbyte/doom-ts/54eb7eb/src/files/LevelData.ts | clashbyte/doom-ts 54eb7eb src/files/LevelData.ts | true | 200 | 9,331 | import { Vec2 } from 'gl-matrix';
import { pointInsidePolygon } from '@/core/math/PolygonMath.ts';
import { WAD } from '@/files/WAD.ts';
import { BinaryReader } from '@/helpers/BinaryReader.ts';
export interface RawVertex {
x: number;
y: number;
}
export interface RawLineDef {
v1: number;
v2: number;
flags:... | 4 |
yaroslav-andriyovich/my-old-web-projects | 084b036 | agario-clone/client/Utils.ts | TypeScript | www.github.com/yaroslav-andriyovich/my-old-web-projects/tree/main/agario-clone/client/Utils.ts | https://raw.githubusercontent.com/yaroslav-andriyovich/my-old-web-projects/084b036/agario-clone/client/Utils.ts | yaroslav-andriyovich/my-old-web-projects 084b036 agario-clone/client/Utils.ts | true | 200 | 958 | /** Порт для подключения к серверу */
export const Port: number = 777;
/** Получить значение от числа по проценту
* @param percent % от числа (0...100)
* @param number Число, от которого нужно получить процент
*/
export function GetPercentage(percent: number, number: number): number
{
return number * (perc... | 0 |
CoolColdUK/util | e307f17 | packages/etsy/src/request/shop/getEtsyShopByOwnerUserId.ts | TypeScript | www.github.com/CoolColdUK/util/tree/main/packages/etsy/src/request/shop/getEtsyShopByOwnerUserId.ts | https://raw.githubusercontent.com/CoolColdUK/util/e307f17/packages/etsy/src/request/shop/getEtsyShopByOwnerUserId.ts | CoolColdUK/util e307f17 packages/etsy/src/request/shop/getEtsyShopByOwnerUserId.ts | true | 200 | 802 | import {EtsyResponse} from '../../interfaces/EtsyResponse';
import {EtsyShop} from '../../interfaces/EtsyShop';
import {getEtsyAxios} from '../../util/getEtsyAxios';
/**
* Fetches the shop information based on the owner's user ID.
* @see https://developers.etsy.com/documentation/reference#operation/getShopByOwnerUse... | 5 |
ommfinance/omm-liquid-staking-frontend | d4c889d | src/app/components/modals/remove-delegations-modal/remove-delegations-modal.component.ts | TypeScript | www.github.com/ommfinance/omm-liquid-staking-frontend/tree/main/src/app/components/modals/remove-delegations-modal/remove-delegations-modal.component.ts | https://raw.githubusercontent.com/ommfinance/omm-liquid-staking-frontend/d4c889d/src/app/components/modals/remove-delegations-modal/remove-delegations-modal.component.ts | ommfinance/omm-liquid-staking-frontend d4c889d src/app/components/modals/remove-delegations-modal/remove-delegations-modal.component.ts | true | 200 | 1,531 | import {Component, Input} from '@angular/core';
import { CommonModule } from '@angular/common';
import {StateChangeService} from "../../../services/state-change.service";
import {TransactionDispatcherService} from "../../../services/transaction-dispatcher.service";
import {ScoreService} from "../../../services/score.se... | 7 |
katarzynakrolikowska/restaurant_web_app | ae910b0 | JagWebApp/ClientApp/src/app/admin/components/admin-dish-form/admin-dish-form.component.spec.ts | TypeScript | www.github.com/katarzynakrolikowska/restaurant_web_app/tree/main/JagWebApp/ClientApp/src/app/admin/components/admin-dish-form/admin-dish-form.component.spec.ts | https://raw.githubusercontent.com/katarzynakrolikowska/restaurant_web_app/ae910b0/JagWebApp/ClientApp/src/app/admin/components/admin-dish-form/admin-dish-form.component.spec.ts | katarzynakrolikowska/restaurant_web_app ae910b0 JagWebApp/ClientApp/src/app/admin/components/admin-dish-form/admin-dish-form.component.spec.ts | true | 200 | 3,558 | import { HttpClientModule } from '@angular/common/http';
import { NO_ERRORS_SCHEMA } from '@angular/core';
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { AbstractControl } from '@angular/forms';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { ... | 3 |
CreamDubaiMonkeys/EventOrganizer | 3df8850 | EventOrganizerFront/src/app/login/login.component.ts | TypeScript | www.github.com/CreamDubaiMonkeys/EventOrganizer/tree/main/EventOrganizerFront/src/app/login/login.component.ts | https://raw.githubusercontent.com/CreamDubaiMonkeys/EventOrganizer/3df8850/EventOrganizerFront/src/app/login/login.component.ts | CreamDubaiMonkeys/EventOrganizer 3df8850 EventOrganizerFront/src/app/login/login.component.ts | true | 200 | 1,342 | import { CommonModule } from '@angular/common';
import { Component } from '@angular/core';
import { NgForm, FormsModule } from '@angular/forms';
import { RouterModule } from '@angular/router';
import { AuthentificationService } from '../service/authentification.service';
import { Router } from '@angular/router';
import... | 6 |
guttenberger/angular-demo | eb6e287 | ng-lead/src/app/features/leads/leads-routing.module.ts | TypeScript | www.github.com/guttenberger/angular-demo/tree/main/ng-lead/src/app/features/leads/leads-routing.module.ts | https://raw.githubusercontent.com/guttenberger/angular-demo/eb6e287/ng-lead/src/app/features/leads/leads-routing.module.ts | guttenberger/angular-demo eb6e287 ng-lead/src/app/features/leads/leads-routing.module.ts | true | 200 | 707 | import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { LEAD_FORM_ROUTES } from './components/lead-form/lead-form.routes';
import { LEAD_LIST_ROUTES } from './components/lead-list/lead-list.routes';
import { LeadResolver } from './lead.resolver';
const routes: Routes... | 1 |
vedantrokde/Angular-Recipebook-Redux | 9ce3e39 | src/app/recipes/store/recipes.effects.ts | TypeScript | www.github.com/vedantrokde/Angular-Recipebook-Redux/tree/main/src/app/recipes/store/recipes.effects.ts | https://raw.githubusercontent.com/vedantrokde/Angular-Recipebook-Redux/9ce3e39/src/app/recipes/store/recipes.effects.ts | vedantrokde/Angular-Recipebook-Redux 9ce3e39 src/app/recipes/store/recipes.effects.ts | true | 200 | 1,328 | import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Actions, createEffect, ofType } from '@ngrx/effects';
import { Store } from '@ngrx/store';
import { map, switchMap, withLatestFrom } from 'rxjs';
import { Recipe } from 'src/app/model/recipe';
import * as RecipeActio... | 4 |
mikaiha888/Proyecto-Angular-Coderhouse | d4ac258 | src/app/layouts/classes/pages/class-detail/class-detail.component.ts | TypeScript | www.github.com/mikaiha888/Proyecto-Angular-Coderhouse/tree/main/src/app/layouts/classes/pages/class-detail/class-detail.component.ts | https://raw.githubusercontent.com/mikaiha888/Proyecto-Angular-Coderhouse/d4ac258/src/app/layouts/classes/pages/class-detail/class-detail.component.ts | mikaiha888/Proyecto-Angular-Coderhouse d4ac258 src/app/layouts/classes/pages/class-detail/class-detail.component.ts | true | 200 | 2,188 | import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { ClassesService } from '../../../../core/services/classes.service';
import { Classe, Course, Student } from '../../../../core/models';
import { CoursesService } from '../../../../core/services/courses.se... | 0 |
caduzindev/app-events | 84b75cb | src/app/institution/institution.module.ts | TypeScript | www.github.com/caduzindev/app-events/tree/main/src/app/institution/institution.module.ts | https://raw.githubusercontent.com/caduzindev/app-events/84b75cb/src/app/institution/institution.module.ts | caduzindev/app-events 84b75cb src/app/institution/institution.module.ts | true | 200 | 763 | import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { StripePayGateway } from 'src/infra/payment/stripe-pay-gateway';
import { PaymentService } from 'src/app/payment/payment.service';
import { Institution } from './entities/institution';
import { InstitutionController } from... | 5 |
akashuplers/misci-landing | 81ebb80 | backend/services/google.ts | TypeScript | www.github.com/akashuplers/misci-landing/tree/main/backend/services/google.ts | https://raw.githubusercontent.com/akashuplers/misci-landing/81ebb80/backend/services/google.ts | akashuplers/misci-landing 81ebb80 backend/services/google.ts | true | 200 | 1,721 | const { google } = require('googleapis');
const sheets = google.sheets('v4');
export class Google {
service: any;
scopes: string[]
constructor() {
this.service = "auth.json"
this.scopes = ['https://www.googleapis.com/auth/spreadsheets']
}
async getAuthToken() {
try {
... | 2 |
samuellembke/cookiebanner-finally | 75c25b3 | tsup.config.ts | TypeScript | www.github.com/samuellembke/cookiebanner-finally/tree/main/tsup.config.ts | https://raw.githubusercontent.com/samuellembke/cookiebanner-finally/75c25b3/tsup.config.ts | samuellembke/cookiebanner-finally 75c25b3 tsup.config.ts | true | 200 | 320 | // tsup.config.ts
import { defineConfig } from "tsup";
export default defineConfig({
entry: ["src/index.ts"],
format: ["cjs", "esm"],
dts: true,
sourcemap: true,
clean: true,
treeshake: true,
minify: true,
target: "es2022",
outDir: "dist",
external: ["react", "react-dom", "next", "js-cookie"],
});
| 7 |
lucsbarbosa/notepad-v2 | 02c64ab | client/src/app/app.module.ts | TypeScript | www.github.com/lucsbarbosa/notepad-v2/tree/main/client/src/app/app.module.ts | https://raw.githubusercontent.com/lucsbarbosa/notepad-v2/02c64ab/client/src/app/app.module.ts | lucsbarbosa/notepad-v2 02c64ab client/src/app/app.module.ts | true | 200 | 989 | import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppRoutingModule } from './app-routing.module';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { HttpClientModule } from '@angular/common/http';
import { AppComponent } ... | 3 |
AideaCompany/IPASS_B_PANEL | 6b6adf1 | i18n/getInitialLocale.ts | TypeScript | www.github.com/AideaCompany/IPASS_B_PANEL/tree/main/i18n/getInitialLocale.ts | https://raw.githubusercontent.com/AideaCompany/IPASS_B_PANEL/6b6adf1/i18n/getInitialLocale.ts | AideaCompany/IPASS_B_PANEL 6b6adf1 i18n/getInitialLocale.ts | true | 200 | 453 | // ./src/translations/getInitialLocale.ts
import { defaultLocale } from './config'
import { Locale, isLocale } from './types'
export const getInitialLocale = (): Locale => {
const localSetting = localStorage.getItem('locale')
if (localSetting && isLocale(localSetting)) {
return localSetting
}
const [brows... | 1 |
Milligosh/To-do-Backend | bbf5e46 | src/config/versioning/v1.ts | TypeScript | www.github.com/Milligosh/To-do-Backend/tree/main/src/config/versioning/v1.ts | https://raw.githubusercontent.com/Milligosh/To-do-Backend/bbf5e46/src/config/versioning/v1.ts | Milligosh/To-do-Backend bbf5e46 src/config/versioning/v1.ts | true | 200 | 336 | import express from "express";
const api = express.Router();
import users from "../../routes/user";
import tasks from "../../routes/tasks"
api.get("/", (req, res) =>
res.status(200).json({
status: "success",
message: "Welcome to My App API",
})
);
api.use("/users", users);
api.use("/tasks", tasks )
expo... | 6 |
kaoto-archive/kaoto-datamapper-integration | 00cad09 | packages/xml-schema-ts/src/utils/ObjectMap.test.ts | TypeScript | www.github.com/kaoto-archive/kaoto-datamapper-integration/tree/main/packages/xml-schema-ts/src/utils/ObjectMap.test.ts | https://raw.githubusercontent.com/kaoto-archive/kaoto-datamapper-integration/00cad09/packages/xml-schema-ts/src/utils/ObjectMap.test.ts | kaoto-archive/kaoto-datamapper-integration 00cad09 packages/xml-schema-ts/src/utils/ObjectMap.test.ts | true | 200 | 1,222 | import { QNameMap, SchemaKeyMap } from './ObjectMap';
import { XmlSchema } from '../XmlSchema';
import { SchemaKey } from '../SchemaKey';
import { QName } from '../QName';
describe('ObjectMap', () => {
describe('SchemaKeyMap', () => {
it('keys(), values() and entries() should work', () => {
const map = new... | 4 |
thecodeite/advent-of-code | e6b903c | src/2023/day16/run.ts | TypeScript | www.github.com/thecodeite/advent-of-code/tree/main/src/2023/day16/run.ts | https://raw.githubusercontent.com/thecodeite/advent-of-code/e6b903c/src/2023/day16/run.ts | thecodeite/advent-of-code e6b903c src/2023/day16/run.ts | true | 200 | 1,129 | import "../../common/util";
import * as fs from "node:fs/promises";
import { solve as solve1 } from "./star1";
import { solve as solve2 } from "./star2";
import { parse } from "./parse";
const calDate = process.env.CAL_DATE;
console.log(`running day ${calDate}`);
const file = await fs.readFile(`./src/2023/day${calDat... | 0 |
primefaces/primeuix | 6d16c21 | packages/utils/src/dom/methods/fadeOut.ts | TypeScript | www.github.com/primefaces/primeuix/tree/main/packages/utils/src/dom/methods/fadeOut.ts | https://raw.githubusercontent.com/primefaces/primeuix/6d16c21/packages/utils/src/dom/methods/fadeOut.ts | primefaces/primeuix 6d16c21 packages/utils/src/dom/methods/fadeOut.ts | true | 200 | 468 | export default function fadeOut(element: HTMLElement, duration: number): void {
if (element) {
let opacity = 1;
const interval = 50;
const gap = interval / duration;
const fading = setInterval(() => {
opacity -= gap;
if (opacity <= 0) {
opaci... | 2 |
standardkit/ui | 75251e7 | projects/example/src/app/pages/form/checkbox-input/checkbox-input.page.ts | TypeScript | www.github.com/standardkit/ui/tree/main/projects/example/src/app/pages/form/checkbox-input/checkbox-input.page.ts | https://raw.githubusercontent.com/standardkit/ui/75251e7/projects/example/src/app/pages/form/checkbox-input/checkbox-input.page.ts | standardkit/ui 75251e7 projects/example/src/app/pages/form/checkbox-input/checkbox-input.page.ts | true | 200 | 932 | import { Component } from '@angular/core';
import { FormControl, ReactiveFormsModule, Validators } from '@angular/forms';
import { UiButton, UiCheckboxInput, UiColumn, UiRow, UiTopBar } from '@standardkit/ui';
@Component({
imports: [UiTopBar, UiButton, UiColumn, UiRow, UiCheckboxInput, ReactiveFormsModule],
templa... | 7 |
santhoshkalisamy/price-tracker-fe-backup | b08f51f | src/app/pages/apps/widgets/widgets.component.ts | TypeScript | www.github.com/santhoshkalisamy/price-tracker-fe-backup/tree/main/src/app/pages/apps/widgets/widgets.component.ts | https://raw.githubusercontent.com/santhoshkalisamy/price-tracker-fe-backup/b08f51f/src/app/pages/apps/widgets/widgets.component.ts | santhoshkalisamy/price-tracker-fe-backup b08f51f src/app/pages/apps/widgets/widgets.component.ts | true | 200 | 13,322 | import { Component, OnInit } from '@angular/core';
import { circle, latLng, tileLayer } from 'leaflet';
import { TitleBox1Model, TitleBox2Model, TitleBox3Model, TitleBox4Model, otherWidgetsModel, widgetsActivitiesModel, widgetsTasksModel } from './widgets.model';
import { tileBoxs1, tileBoxs2, tileBoxs3, tileBoxs4, o... | 3 |
Zwogli/todo-list-frontend | 8c42e24 | src/app/components/login/login.component.ts | TypeScript | www.github.com/Zwogli/todo-list-frontend/tree/main/src/app/components/login/login.component.ts | https://raw.githubusercontent.com/Zwogli/todo-list-frontend/8c42e24/src/app/components/login/login.component.ts | Zwogli/todo-list-frontend 8c42e24 src/app/components/login/login.component.ts | true | 200 | 877 | import { Component } from "@angular/core";
import { AuthService } from "../../services/auth/auth.service";
import { Router } from "@angular/router";
@Component({
selector: "app-login",
templateUrl: "./login.component.html",
styleUrl: "./login.component.scss",
})
export class LoginComponent {
username: string = "";... | 1 |
NewChakrit/Understanding-TypeScript | ea08bde | basic_and_basic-types/function-return-types_and_void.ts | TypeScript | www.github.com/NewChakrit/Understanding-TypeScript/tree/main/basic_and_basic-types/function-return-types_and_void.ts | https://raw.githubusercontent.com/NewChakrit/Understanding-TypeScript/ea08bde/basic_and_basic-types/function-return-types_and_void.ts | NewChakrit/Understanding-TypeScript ea08bde basic_and_basic-types/function-return-types_and_void.ts | true | 200 | 232 | // Function Return Types & Void
function add(n1: number, n2: number): number {
return n1 + n2;
}
function printResult(num: number): void {
console.log('Result: ', +num);
}
printResult(add(5, 12));
// let someValue: undefined;
| 6 |
emirdeliz/barcode-reader-zbar-webassembly | 65f6653 | src/barcode/CZBarImage.ts | TypeScript | www.github.com/emirdeliz/barcode-reader-zbar-webassembly/tree/main/src/barcode/CZBarImage.ts | https://raw.githubusercontent.com/emirdeliz/barcode-reader-zbar-webassembly/65f6653/src/barcode/CZBarImage.ts | emirdeliz/barcode-reader-zbar-webassembly 65f6653 src/barcode/CZBarImage.ts | true | 200 | 1,454 | /**
* This class represents the image of the barcode for the webassembly.
*/
import { CZBarBase } from './CZBarBase';
import { getCZBarInstance } from './CZBarWasm';
export class CZBarImage extends CZBarBase {
/**
* This method creates a memory pointer on webassembly and
* a new instance of the class CZBarI... | 0 |
Djolee00/place-booker-MOBILE | 5381204 | place-booker-frontend/src/app/bookings/create-booking/create-booking.component.ts | TypeScript | www.github.com/Djolee00/place-booker-MOBILE/tree/main/place-booker-frontend/src/app/bookings/create-booking/create-booking.component.ts | https://raw.githubusercontent.com/Djolee00/place-booker-MOBILE/5381204/place-booker-frontend/src/app/bookings/create-booking/create-booking.component.ts | Djolee00/place-booker-MOBILE 5381204 place-booker-frontend/src/app/bookings/create-booking/create-booking.component.ts | true | 200 | 2,405 | import { Component, Input, OnInit, ViewChild } from '@angular/core';
import { NgForm } from '@angular/forms';
import { ModalController } from '@ionic/angular';
import { Place } from 'src/app/places/place.model';
@Component({
selector: 'app-create-booking',
templateUrl: './create-booking.component.html',
styleUrl... | 5 |
pmcelhaney/counterfact | 362a4bb | test/server/dispatcher.proxy.test.ts | TypeScript | www.github.com/pmcelhaney/counterfact/tree/main/test/server/dispatcher.proxy.test.ts | https://raw.githubusercontent.com/pmcelhaney/counterfact/362a4bb/test/server/dispatcher.proxy.test.ts | pmcelhaney/counterfact 362a4bb test/server/dispatcher.proxy.test.ts | true | 200 | 1,634 | import { Headers } from "node-fetch";
import { ContextRegistry } from "../../src/server/context-registry.js";
import { Dispatcher } from "../../src/server/dispatcher.js";
import { Registry } from "../../src/server/registry.js";
describe("a dispatcher passes a proxy function to the operation", () => {
it("passes a p... | 3 |
Chabiev/eCommerce | b1a11d5 | client/src/app/core/Interceptors/Error.interceptor.ts | TypeScript | www.github.com/Chabiev/eCommerce/tree/main/client/src/app/core/Interceptors/Error.interceptor.ts | https://raw.githubusercontent.com/Chabiev/eCommerce/b1a11d5/client/src/app/core/Interceptors/Error.interceptor.ts | Chabiev/eCommerce b1a11d5 client/src/app/core/Interceptors/Error.interceptor.ts | true | 200 | 1,417 | import {HttpEvent, HttpHandler, HttpInterceptor, HttpRequest} from "@angular/common/http";
import {catchError, Observable, throwError} from "rxjs";
import {NavigationExtras, Router} from "@angular/router";
import {Injectable} from "@angular/core";
import {ToastrService} from "ngx-toastr";
@Injectable()
export class E... | 6 |
DonatoCalvillo/database-backup-utility | 9027d3b | src/lib/object-values/date-value-object.ts | TypeScript | www.github.com/DonatoCalvillo/database-backup-utility/tree/main/src/lib/object-values/date-value-object.ts | https://raw.githubusercontent.com/DonatoCalvillo/database-backup-utility/9027d3b/src/lib/object-values/date-value-object.ts | DonatoCalvillo/database-backup-utility 9027d3b src/lib/object-values/date-value-object.ts | true | 200 | 1,295 | export enum DateFormat {
YYYY_MM_DD_HH_MM_SS = 'yyyy-MM-dd HH:mm:ss',
YYYY_MM_DD_HH_MM = 'yyyy-MM-dd HH:mm',
YYYY_MM_DD = 'yyyy-MM-dd',
DD_MM_YYYY = 'dd-MM-yyyy'
}
export abstract class DateValueObject {
public readonly value: Date;
private readonly name: string;
constructor(value: Date, name: string) {... | 1 |
DezyNation/chat-client | 55014c3 | src/app/api/messages/sendMessage/route.ts | TypeScript | www.github.com/DezyNation/chat-client/tree/main/src/app/api/messages/sendMessage/route.ts | https://raw.githubusercontent.com/DezyNation/chat-client/55014c3/src/app/api/messages/sendMessage/route.ts | DezyNation/chat-client 55014c3 src/app/api/messages/sendMessage/route.ts | true | 200 | 1,553 | import { NextApiRequest, NextApiResponse } from 'next';
import userAxiosInstance from '@/utils/userAxiosInstance'; // Using userAxiosInstance for messaging-related requests
import { AxiosError } from 'axios';
import { v4 as uuidv4 } from 'uuid'; // Import the uuid library
export default async (req: NextApiRequest, res... | 0 |
binder-binFinder/binder-front-end | f29e6c7 | src/lib/hooks/useToggle.ts | TypeScript | www.github.com/binder-binFinder/binder-front-end/tree/main/src/lib/hooks/useToggle.ts | https://raw.githubusercontent.com/binder-binFinder/binder-front-end/f29e6c7/src/lib/hooks/useToggle.ts | binder-binFinder/binder-front-end f29e6c7 src/lib/hooks/useToggle.ts | true | 200 | 423 | import { useState } from "react";
// 배열을 반환하도록 수정
export const useToggle = (
initialState: boolean = false
): [boolean, () => void, () => void, () => void] => {
const [isOpen, setIsOpen] = useState(initialState);
const open = () => setIsOpen(true);
const close = () => setIsOpen(false);
const toggle = () => ... | 5 |
JagadeshAnbu/NestJs-Application | 6628f3d | src/users/users.controller.ts | TypeScript | www.github.com/JagadeshAnbu/NestJs-Application/tree/main/src/users/users.controller.ts | https://raw.githubusercontent.com/JagadeshAnbu/NestJs-Application/6628f3d/src/users/users.controller.ts | JagadeshAnbu/NestJs-Application 6628f3d src/users/users.controller.ts | true | 200 | 4,572 | import {
Controller, Get, Post, Body, Patch, Param, Delete, ParseIntPipe, UseGuards, NotFoundException, ConflictException, BadRequestException, InternalServerErrorException,
} from '@nestjs/common';
import { UsersService } from './users.service';
import { CreateUserDto } from './dto/create-user.dto';
import { UpdateU... | 6 |
srforever/giro3d | d88ebc1 | src/renderer/MaterialUtils.ts | TypeScript | www.github.com/srforever/giro3d/tree/main/src/renderer/MaterialUtils.ts | https://raw.githubusercontent.com/srforever/giro3d/d88ebc1/src/renderer/MaterialUtils.ts | srforever/giro3d d88ebc1 src/renderer/MaterialUtils.ts | true | 200 | 3,323 | import type { BufferAttribute, Material } from 'three';
import {
Float16BufferAttribute,
Float32BufferAttribute,
Int16BufferAttribute,
Int32BufferAttribute,
Int8BufferAttribute,
Uint16BufferAttribute,
Uint32BufferAttribute,
Uint8BufferAttribute,
Uint8ClampedBufferAttribute,
} from '... | 0 |
tinyspeck/sleuth | 1af7895 | src/main/scheme.ts | TypeScript | www.github.com/tinyspeck/sleuth/tree/main/src/main/scheme.ts | https://raw.githubusercontent.com/tinyspeck/sleuth/1af7895/src/main/scheme.ts | tinyspeck/sleuth 1af7895 src/main/scheme.ts | true | 200 | 1,103 | import { normalize, join, relative } from 'path';
import { pathToFileURL } from 'url';
import { net, protocol } from 'electron';
export function registerSchemePrivilege() {
protocol.registerSchemesAsPrivileged([
{ scheme: 'oop', privileges: { standard: true, supportFetchAPI: true } },
]);
}
/**
* A custom oo... | 1 |
HermesOliho/ExamAuth-Frontend | 7b2134a | src/services/authService.ts | TypeScript | www.github.com/HermesOliho/ExamAuth-Frontend/tree/main/src/services/authService.ts | https://raw.githubusercontent.com/HermesOliho/ExamAuth-Frontend/7b2134a/src/services/authService.ts | HermesOliho/ExamAuth-Frontend 7b2134a src/services/authService.ts | true | 200 | 748 | import { pinia } from "@/main";
import { useApiStore } from "@/stores/apiStore";
import axios from "axios";
const apiStore = useApiStore(pinia);
const endpoint = `${apiStore.api}/auth`;
export const login = async (credentials: {
email: string;
password: string;
}) => {
const response = await axios.post(`... | 5 |
6y6jlb/tg-bot-with-api-ts | 0228f89 | src/services/telegramHandlers/commands/start.ts | TypeScript | www.github.com/6y6jlb/tg-bot-with-api-ts/tree/main/src/services/telegramHandlers/commands/start.ts | https://raw.githubusercontent.com/6y6jlb/tg-bot-with-api-ts/0228f89/src/services/telegramHandlers/commands/start.ts | 6y6jlb/tg-bot-with-api-ts 0228f89 src/services/telegramHandlers/commands/start.ts | true | 200 | 1,780 | import { i18n } from 'i18next';
import { APP_TYPE_ENUM, USER_ID_ENUM } from "../../../models/const";
import { IUser } from '../../../models/types';
import { STICKERS } from "../../../utils/const";
import AdminService from '../../Admin/AdminService';
import { Message } from '../../BotNotification/Message';
import UserSe... | 3 |
bbalmer/SwgohMods | 80db628 | app/lib/data.ts | TypeScript | www.github.com/bbalmer/SwgohMods/tree/main/app/lib/data.ts | https://raw.githubusercontent.com/bbalmer/SwgohMods/80db628/app/lib/data.ts | bbalmer/SwgohMods 80db628 app/lib/data.ts | true | 200 | 11,612 | import { sql } from '@vercel/postgres';
import { PrismaClient, characters } from '@prisma/client';
const prisma = new PrismaClient();
import {
CustomerField,
CustomersTableType,
InvoiceForm,
InvoicesTable,
LatestInvoiceRaw,
User,
Revenue,
Character,
Swgoh,
StringType,
CharacterWithAbility,
} fr... | 0 |
manali-ashutec/angular-two-reactive-form-and-checkbox | 32e4cba | src/app/shared.service.ts | TypeScript | www.github.com/manali-ashutec/angular-two-reactive-form-and-checkbox/tree/main/src/app/shared.service.ts | https://raw.githubusercontent.com/manali-ashutec/angular-two-reactive-form-and-checkbox/32e4cba/src/app/shared.service.ts | manali-ashutec/angular-two-reactive-form-and-checkbox 32e4cba src/app/shared.service.ts | true | 200 | 574 | import { Injectable } from '@angular/core';
import { BehaviorSubject, Observable } from 'rxjs';
@Injectable()
export class SharedService {
private singleVlaue = new BehaviorSubject<any>({});
private multipleVlaue = new BehaviorSubject<any>({});
constructor() {}
singleApproval(message) {
this.singleVlaue.n... | 1 |
Jayanth-Raavan/foodcourt | b200b11 | src/Redux/Slice/AddressSliceReducer.ts | TypeScript | www.github.com/Jayanth-Raavan/foodcourt/tree/main/src/Redux/Slice/AddressSliceReducer.ts | https://raw.githubusercontent.com/Jayanth-Raavan/foodcourt/b200b11/src/Redux/Slice/AddressSliceReducer.ts | Jayanth-Raavan/foodcourt b200b11 src/Redux/Slice/AddressSliceReducer.ts | true | 200 | 1,228 | import { createSlice } from "@reduxjs/toolkit";
import { AddAddress, GetAddress } from "../Action/AddressAction";
const initialState = {
isLoading: false,
isError: false,
address: null,
};
export const AddressSilceReducer = createSlice({
name:"Address_Slice",
initialState,
reducers:{},
extraReduc... | 5 |
ifaiq/Monolith | d72d9d2 | hypr_admin/src/app/constants/delivery-slots-constants.ts | TypeScript | www.github.com/ifaiq/Monolith/tree/main/hypr_admin/src/app/constants/delivery-slots-constants.ts | https://raw.githubusercontent.com/ifaiq/Monolith/d72d9d2/hypr_admin/src/app/constants/delivery-slots-constants.ts | ifaiq/Monolith d72d9d2 hypr_admin/src/app/constants/delivery-slots-constants.ts | true | 200 | 3,775 | export class DeliverySlotsAPIConstants {
public static BUSINESSUNIT = "/config/businessunit/getAll";
public static LOCATION = "/config/location/getAll";
public static GETDELIVERYSLOT = "/api/v1/delivery-slots/portal";
public static UPDATEDELIVERYSLOT = "/api/v1/delivery-slots";
public static ACTIVEDELIVERYSLO... | 3 |
keepgo-studio/tab-manager-chrome | e330ed6 | src/machine/message.machine.ts | TypeScript | www.github.com/keepgo-studio/tab-manager-chrome/tree/main/src/machine/message.machine.ts | https://raw.githubusercontent.com/keepgo-studio/tab-manager-chrome/e330ed6/src/machine/message.machine.ts | keepgo-studio/tab-manager-chrome e330ed6 src/machine/message.machine.ts | true | 200 | 1,783 | import { createMachine } from 'xstate';
import {
ChromeEventType,
MessageEventType,
UsersEventType,
} from '@src/shared/events';
import { sendToFront } from '@src/utils/utils';
export const enum MessageStyle {
'top',
'bottom',
}
export const messageMachine =
/** @xstate-layout N4IgpgJg5mDOIC5QFk6wIYwHQCUw... | 6 |
logicahead/home-assignment-vinay | bcf302c | src/client/Routes/RoleDef/Models/RolePayload.ts | TypeScript | www.github.com/logicahead/home-assignment-vinay/tree/main/src/client/Routes/RoleDef/Models/RolePayload.ts | https://raw.githubusercontent.com/logicahead/home-assignment-vinay/bcf302c/src/client/Routes/RoleDef/Models/RolePayload.ts | logicahead/home-assignment-vinay bcf302c src/client/Routes/RoleDef/Models/RolePayload.ts | true | 200 | 378 | import { SearchTypeEnum, SearchKeyEnum } from "Types/Domain";
export interface IRolePayload {
from: Number,
size: Number,
filter: Filter[],
query: Query[]
}
export interface Filter {
type: SearchTypeEnum,
key: SearchKeyEnum,
modelfield: string,
value: string | Array<string> | any,
}
e... | 0 |
MoiBaldenegro/api-nest | f8a3ad0 | src/caja/till/till.service.ts | TypeScript | www.github.com/MoiBaldenegro/api-nest/tree/main/src/caja/till/till.service.ts | https://raw.githubusercontent.com/MoiBaldenegro/api-nest/f8a3ad0/src/caja/till/till.service.ts | MoiBaldenegro/api-nest f8a3ad0 src/caja/till/till.service.ts | true | 200 | 923 | import { Injectable } from '@nestjs/common';
import { InjectModel } from '@nestjs/mongoose';
import { Model } from 'mongoose';
import { CreateTillDto } from 'src/dto/caja/createTillDto';
import { UpdateTillDto } from 'src/dto/caja/updateTillDto';
import { Till } from 'src/schemas/caja/till.schema';
@Injectable()
expor... | 1 |
jennyessa/Intermodular_jenny_estrada | 794f4fd | angular-firebase-login/src/app/login/login.component.ts | TypeScript | www.github.com/jennyessa/Intermodular_jenny_estrada/tree/main/angular-firebase-login/src/app/login/login.component.ts | https://raw.githubusercontent.com/jennyessa/Intermodular_jenny_estrada/794f4fd/angular-firebase-login/src/app/login/login.component.ts | jennyessa/Intermodular_jenny_estrada 794f4fd angular-firebase-login/src/app/login/login.component.ts | true | 200 | 1,757 | import { Component, OnInit } from '@angular/core';
import {
FormsModule,
Validators,
ReactiveFormsModule,
FormBuilder,
FormGroup
} from '@angular/forms';
import { Router, RouterLink } from '@angular/router';
import { AuthService } from '../services/authService/auth.service';
@Component({
selector: 'app... | 5 |
About-Templates/QuantumFit | 504db15 | src/features/register/slice.ts | TypeScript | www.github.com/About-Templates/QuantumFit/tree/main/src/features/register/slice.ts | https://raw.githubusercontent.com/About-Templates/QuantumFit/504db15/src/features/register/slice.ts | About-Templates/QuantumFit 504db15 src/features/register/slice.ts | true | 200 | 822 | import { createSlice, type PayloadAction } from "@reduxjs/toolkit";
import type { RegisterState } from "./state";
const initialState = {
username: null,
email: null,
password: null,
sex: null,
isRegistrationSuccessful: null,
height: null,
weight: null,
yearOfBirth: null,
lifestyle: null,
aim: null,... | 3 |
Team-Wu-Shang-Clan/Placementor-Frontend | 92669b6 | app/(internal)/my-plans/create/_components/create-plan-form-schema.ts | TypeScript | www.github.com/Team-Wu-Shang-Clan/Placementor-Frontend/tree/main/app/(internal)/my-plans/create/_components/create-plan-form-schema.ts | https://raw.githubusercontent.com/Team-Wu-Shang-Clan/Placementor-Frontend/92669b6/app/%28internal%29/my-plans/create/_components/create-plan-form-schema.ts | Team-Wu-Shang-Clan/Placementor-Frontend 92669b6 app/(internal)/my-plans/create/_components/create-plan-form-schema.ts | true | 200 | 3,126 | import { z } from "zod"
export const ratingDescriptions = {
0: "I don't know anything about this topic",
1: "I know very basic concepts",
2: "I understand fundamental principles",
3: "I can solve basic problems",
4: "I have working knowledge",
5: "I can implement medium-difficulty solutions",
... | 6 |
pzcug/leetcode-js | 74fe439 | 69.x-的平方根.ts | TypeScript | www.github.com/pzcug/leetcode-js/tree/main/69.x-的平方根.ts | https://raw.githubusercontent.com/pzcug/leetcode-js/74fe439/69.x-%E7%9A%84%E5%B9%B3%E6%96%B9%E6%A0%B9.ts | pzcug/leetcode-js 74fe439 69.x-的平方根.ts | true | 200 | 229 | /*
* @lc app=leetcode.cn id=69 lang=typescript
*
* [69] x 的平方根
*/
// @lc code=start
function mySqrt(x: number): number {
let i = 0
while (i * i <= x ) {
i++
}
return i - 1
};
// @lc code=end
| 0 |
MarinosTBH/Nest_Cats_Project_NestJs_MongoDB_Docker_DockerCompose | 6c56fe2 | src/modules/auth/auth.controller.ts | TypeScript | www.github.com/MarinosTBH/Nest_Cats_Project_NestJs_MongoDB_Docker_DockerCompose/tree/main/src/modules/auth/auth.controller.ts | https://raw.githubusercontent.com/MarinosTBH/Nest_Cats_Project_NestJs_MongoDB_Docker_DockerCompose/6c56fe2/src/modules/auth/auth.controller.ts | MarinosTBH/Nest_Cats_Project_NestJs_MongoDB_Docker_DockerCompose 6c56fe2 src/modules/auth/auth.controller.ts | true | 200 | 834 | import { Body, Controller, Get, HttpCode, HttpStatus, Post, Request, Res, UseGuards } from '@nestjs/common';
import { AuthService } from './auth.service';
import { User } from '../users/schema/users.schema';
import { Public } from 'src/guard/public.decorator';
import { Response } from 'express';
@Controller('auth')
ex... | 1 |
ZengEno/ai-md-editor-frontend | 79b4d1c | src/hooks/useFileExplorer.ts | TypeScript | www.github.com/ZengEno/ai-md-editor-frontend/tree/main/src/hooks/useFileExplorer.ts | https://raw.githubusercontent.com/ZengEno/ai-md-editor-frontend/79b4d1c/src/hooks/useFileExplorer.ts | ZengEno/ai-md-editor-frontend 79b4d1c src/hooks/useFileExplorer.ts | true | 200 | 15,008 | import { useState, useCallback, useEffect } from "react";
import { useFileStore } from "../stores/fileStore";
import { useToast } from "@chakra-ui/react";
import { FileItem } from "../types/file";
import { useAssistantStore } from "../stores/assistantStore";
import { useConversationStore } from "../stores/conversationS... | 5 |
salesof7/nodejs_ignite-rentx | c98bba0 | src/modules/accounts/mapper/UserMap.ts | TypeScript | www.github.com/salesof7/nodejs_ignite-rentx/tree/main/src/modules/accounts/mapper/UserMap.ts | https://raw.githubusercontent.com/salesof7/nodejs_ignite-rentx/c98bba0/src/modules/accounts/mapper/UserMap.ts | salesof7/nodejs_ignite-rentx c98bba0 src/modules/accounts/mapper/UserMap.ts | true | 200 | 519 | import { IUserResponseDTO } from "../dtos/IUserResponseDTO";
import { User } from "../infra/typeorm/entities/User";
import {} from "class-transformer";
class UserMap {
static async toDTO(user: User): Promise<IUserResponseDTO> {
const userData = Object.assign(
{},
{
...user,
avatar_url... | 3 |
Rahmaromdhani24/AvEchelonFront | 351bbdc | src/app/home-page/home-page.component.ts | TypeScript | www.github.com/Rahmaromdhani24/AvEchelonFront/tree/main/src/app/home-page/home-page.component.ts | https://raw.githubusercontent.com/Rahmaromdhani24/AvEchelonFront/351bbdc/src/app/home-page/home-page.component.ts | Rahmaromdhani24/AvEchelonFront 351bbdc src/app/home-page/home-page.component.ts | true | 200 | 2,350 | import { Component, OnInit } from '@angular/core';
import { AvancementService } from '../Services/avancement.service';
import * as $ from 'jquery';
import { PersonnelServiceService } from '../Services/personnel-service.service';
@Component({
selector: 'app-home-page',
templateUrl: './home-page.component.html',
st... | 6 |
hell007/golang-csms-system | fd930e7 | web/src/store/modules/unit.ts | TypeScript | www.github.com/hell007/golang-csms-system/tree/main/web/src/store/modules/unit.ts | https://raw.githubusercontent.com/hell007/golang-csms-system/fd930e7/web/src/store/modules/unit.ts | hell007/golang-csms-system fd930e7 web/src/store/modules/unit.ts | true | 200 | 966 | import { MutationTree, ActionTree } from 'vuex';
import axios from '@/utils/axios';
interface UnitState {
token: string;
user: any;
}
const state: UnitState = {
token: '',
user: {}
};
const mutations: MutationTree<UnitState> = {
SET_TOKEN: (state, token) => {
state.token = token;
},
SET_USER: (stat... | 0 |
Ruslick/react-burger | ad49dd5 | src/utils/cookiesTransform.ts | TypeScript | www.github.com/Ruslick/react-burger/tree/main/src/utils/cookiesTransform.ts | https://raw.githubusercontent.com/Ruslick/react-burger/ad49dd5/src/utils/cookiesTransform.ts | Ruslick/react-burger ad49dd5 src/utils/cookiesTransform.ts | true | 200 | 718 | interface ITokens {
accessToken: string,
refreshToken: string
}
export const getCookie = (desiredCookie: string) => {
const cookies = document.cookie.split("; ");
return cookies.find((c) => c.startsWith(desiredCookie))?.split("=")[1];
};
export const removeCookie = (deletableCookie: string) => {
document.cookie =... | 1 |
DK0201-main/marketplace-backend | 8ee0f00 | src/controlllers/admin.controller.ts | TypeScript | www.github.com/DK0201-main/marketplace-backend/tree/main/src/controlllers/admin.controller.ts | https://raw.githubusercontent.com/DK0201-main/marketplace-backend/8ee0f00/src/controlllers/admin.controller.ts | DK0201-main/marketplace-backend 8ee0f00 src/controlllers/admin.controller.ts | true | 200 | 1,506 | import { Request, Response as ExpressResponse } from 'express';
import * as Response from '../helpers/response.manager';
import * as adminService from '../services/admin.service';
import { StatusCodes } from 'http-status-codes';
export async function handleAddAdmin(req: Request, res: ExpressResponse): Promise<void> {
... | 5 |
JMielewczyk/MovieFlix | 57bda46 | src/assets/pages/Search/SearchList/features.ts | TypeScript | www.github.com/JMielewczyk/MovieFlix/tree/main/src/assets/pages/Search/SearchList/features.ts | https://raw.githubusercontent.com/JMielewczyk/MovieFlix/57bda46/src/assets/pages/Search/SearchList/features.ts | JMielewczyk/MovieFlix 57bda46 src/assets/pages/Search/SearchList/features.ts | true | 200 | 1,007 | import { IdataObject } from './interfaces';
const API_KEY = import.meta.env.VITE_API_KEY;
const urlToApi = 'https://api.themoviedb.org/3';
export const loadContent = async (
type: string | undefined,
query: string | undefined,
currentPage: number,
setPages: React.Dispatch<React.SetStateAction<number[]>>,
se... | 3 |
nezaYSR/temp1 | db0e345 | src/app/pages/root/root.component.ts | TypeScript | www.github.com/nezaYSR/temp1/tree/main/src/app/pages/root/root.component.ts | https://raw.githubusercontent.com/nezaYSR/temp1/db0e345/src/app/pages/root/root.component.ts | nezaYSR/temp1 db0e345 src/app/pages/root/root.component.ts | true | 200 | 1,252 | import { Component, OnInit } from '@angular/core';
import { Role } from '../../models';
import { Router } from '@angular/router';
import {AuthenticationService, UserService} from "../../shared/services";
@Component({
selector: 'app-home',
templateUrl: './root.component.html',
styleUrls: ['./root.component.scss']... | 6 |
themohitbharti/BidSpace | d62b13c | src/models/bid.models.ts | TypeScript | www.github.com/themohitbharti/BidSpace/tree/main/src/models/bid.models.ts | https://raw.githubusercontent.com/themohitbharti/BidSpace/d62b13c/src/models/bid.models.ts | themohitbharti/BidSpace d62b13c src/models/bid.models.ts | true | 200 | 707 | import mongoose, { Schema, Document, ObjectId } from "mongoose";
interface Bid {
auctionId: mongoose.Schema.Types.ObjectId;
userId: mongoose.Schema.Types.ObjectId;
bidAmount: number;
createdAt?: Date;
}
export interface BidDocument extends Bid, Document {}
const bidSchema: Schema<BidDocument> = new Schema({... | 0 |
j-toscani/d3-playground | f921aae | src/builders/barChart.ts | TypeScript | www.github.com/j-toscani/d3-playground/tree/main/src/builders/barChart.ts | https://raw.githubusercontent.com/j-toscani/d3-playground/f921aae/src/builders/barChart.ts | j-toscani/d3-playground f921aae src/builders/barChart.ts | true | 200 | 1,298 | import { max, select, selectAll } from "d3";
import createButtonContainer from "../utils/createButtonContainer";
import addAxisFactory from "../utils/addAxis";
let data: number[] = [];
export default function barChart() {
select("main")?.append("svg").attr("width", 1200).attr("height", 800);
setData(createRan... | 1 |
clever-vpn/wireguard-vpn.github.io | 40f021b | docs/.vitepress/config.ts | TypeScript | www.github.com/clever-vpn/wireguard-vpn.github.io/tree/main/docs/.vitepress/config.ts | https://raw.githubusercontent.com/clever-vpn/wireguard-vpn.github.io/40f021b/docs/.vitepress/config.ts | clever-vpn/wireguard-vpn.github.io 40f021b docs/.vitepress/config.ts | true | 200 | 1,036 | import { defineConfig } from 'vitepress'
// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "WireGuard VPN",
description: "Wireguard desc",
locales: {
root: {
label: '简体中文',
lang: 'cn'
},
en: {
label: 'English',
lang: 'en'
}
},
head:[
... | 5 |
tomcls/bybit-app | d43b7d7 | src/queue/index.ts | TypeScript | www.github.com/tomcls/bybit-app/tree/main/src/queue/index.ts | https://raw.githubusercontent.com/tomcls/bybit-app/d43b7d7/src/queue/index.ts | tomcls/bybit-app d43b7d7 src/queue/index.ts | true | 200 | 5,816 | import { createClient } from 'redis';
import { ConfigParams } from '../config/config';
import { ByBitApi } from '../exchange/helper';
// redis queue
export const Queue = async () => {
const client = createClient({
url: ConfigParams.REDIS_URL
});
await client.connect();
const channelTest1 = c... | 6 |
fang-lin/function-plotter | cc45786 | src/pages/Plotter/functions.ts | TypeScript | www.github.com/fang-lin/function-plotter/tree/main/src/pages/Plotter/functions.ts | https://raw.githubusercontent.com/fang-lin/function-plotter/cc45786/src/pages/Plotter/functions.ts | fang-lin/function-plotter cc45786 src/pages/Plotter/functions.ts | true | 200 | 1,931 | import {DOMAttributes, SyntheticEvent} from 'react';
export type Coordinate = [number, number];
export type Size = [number, number];
function isTouchEvent(event: DragEvent): event is TouchEvent {
return window.TouchEvent && event instanceof TouchEvent;
}
export function getClient(event: DragEvent): Coordinate {
... | 0 |
sbalmt/ez4 | 34f4814 | packages/aws-aurora/src/migration/common/columns.ts | TypeScript | www.github.com/sbalmt/ez4/tree/main/packages/aws-aurora/src/migration/common/columns.ts | https://raw.githubusercontent.com/sbalmt/ez4/34f4814/packages/aws-aurora/src/migration/common/columns.ts | sbalmt/ez4 34f4814 packages/aws-aurora/src/migration/common/columns.ts | true | 200 | 4,654 | import type { AnySchema, NumberSchema, StringSchema } from '@ez4/schema';
import type { RepositoryIndexes } from '../../main.js';
import {
SchemaType,
isScalarSchema,
isStringSchema,
isObjectSchema,
isArraySchema,
isTupleSchema,
isEnumSchema
} from '@ez4/schema';
import { isAnyNumber } from '@ez4/utils'... | 3 |
PauloContrera/Proyecto-YoProgramo-Front-end | 116bb36 | src/app/components/experiencia/editar-experiencia/editar-experiencia.component.ts | TypeScript | www.github.com/PauloContrera/Proyecto-YoProgramo-Front-end/tree/main/src/app/components/experiencia/editar-experiencia/editar-experiencia.component.ts | https://raw.githubusercontent.com/PauloContrera/Proyecto-YoProgramo-Front-end/116bb36/src/app/components/experiencia/editar-experiencia/editar-experiencia.component.ts | PauloContrera/Proyecto-YoProgramo-Front-end 116bb36 src/app/components/experiencia/editar-experiencia/editar-experiencia.component.ts | true | 200 | 1,499 | import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { Loading, Notify } from 'notiflix';
import { Experiencia } from 'src/app/model/experiencia';
import { ExperienciaService } from 'src/app/service/experiencia.service';
@Component({
selector: 'app-edita... | 5 |
NourShloul/SustainMasterPiece | dc665e1 | masterpiece.client/src/app/services/services.component.ts | TypeScript | www.github.com/NourShloul/SustainMasterPiece/tree/main/masterpiece.client/src/app/services/services.component.ts | https://raw.githubusercontent.com/NourShloul/SustainMasterPiece/dc665e1/masterpiece.client/src/app/services/services.component.ts | NourShloul/SustainMasterPiece dc665e1 masterpiece.client/src/app/services/services.component.ts | true | 200 | 495 | import { Component } from '@angular/core';
import { URLService } from '../URLservices/url.service';
@Component({
selector: 'app-services',
templateUrl: './services.component.html',
styleUrl: './services.component.css'
})
export class ServicesComponent {
servicesArray :any
ngOnInit() {
this.getAllServices... | 1 |
vmosiichuk-dev/udemy-typescript | a7a8386 | up.ts | TypeScript | www.github.com/vmosiichuk-dev/udemy-typescript/tree/main/up.ts | https://raw.githubusercontent.com/vmosiichuk-dev/udemy-typescript/a7a8386/up.ts | vmosiichuk-dev/udemy-typescript a7a8386 up.ts | true | 200 | 4,996 | /**
* Automating course progress update with a terminal command.
*
* @remarks
* To run the script from the terminal, use:
* ```
* ts-node <filename> <lecture> <module>
* ```
* Replace `<lecture>` and `<module>` with the appropriate values.
*
* - `<lecture>`: An integer representing the last finished lecture.
... | 4 |
0xkonka/Akiverse-Backend | 5b05dfb | src/apps/server/apis/resolvers/booster_item/apply_booster_item.ts | TypeScript | www.github.com/0xkonka/Akiverse-Backend/tree/main/src/apps/server/apis/resolvers/booster_item/apply_booster_item.ts | https://raw.githubusercontent.com/0xkonka/Akiverse-Backend/5b05dfb/src/apps/server/apis/resolvers/booster_item/apply_booster_item.ts | 0xkonka/Akiverse-Backend 5b05dfb src/apps/server/apis/resolvers/booster_item/apply_booster_item.ts | true | 200 | 1,855 | import { Arg, Authorized, Ctx, Info, Mutation, Resolver } from "type-graphql";
import { GraphQLResolveInfo } from "graphql";
import { Inject, Service } from "typedi";
import { BoosterItemUseCase } from "../../../../../use_cases/booster_item_usecase";
import { ApplyBoosterItemInput } from "./inputs/apply_booster_item_i... | 6 |
RemediarPuc/FrontEnd | 4d843db | src/app/components/tela-inicial-adm/tela-inicial-adm.component.ts | TypeScript | www.github.com/RemediarPuc/FrontEnd/tree/main/src/app/components/tela-inicial-adm/tela-inicial-adm.component.ts | https://raw.githubusercontent.com/RemediarPuc/FrontEnd/4d843db/src/app/components/tela-inicial-adm/tela-inicial-adm.component.ts | RemediarPuc/FrontEnd 4d843db src/app/components/tela-inicial-adm/tela-inicial-adm.component.ts | true | 200 | 509 | import { Component } from '@angular/core';
import { FooterComponent } from "../footer/footer.component";
import { HeaderTelaInicialUsersComponent } from '../header-tela-inicial-users/header-tela-inicial-users.component';
@Component({
selector: 'app-tela-inicial-adm',
standalone: true,
templateUrl: './tela... | 2 |
MohamedBgtB/angular-tutorial | 3a69734 | src/app/components/task-item/task-item.component.ts | TypeScript | www.github.com/MohamedBgtB/angular-tutorial/tree/main/src/app/components/task-item/task-item.component.ts | https://raw.githubusercontent.com/MohamedBgtB/angular-tutorial/3a69734/src/app/components/task-item/task-item.component.ts | MohamedBgtB/angular-tutorial 3a69734 src/app/components/task-item/task-item.component.ts | true | 200 | 489 | import { Component, OnInit, Input } from '@angular/core';
import { faTimes } from '@fortawesome/free-solid-svg-icons';
import { Task } from 'src/app/Task';
@Component({
selector: 'app-task-item',
templateUrl: './task-item.component.html',
styleUrls: ['./task-item.component.scss']
})
export class TaskItemComponent... | 0 |
IWhitebird/education-website-app | 23b193f | server/controllers/CourseProgress.ts | TypeScript | www.github.com/IWhitebird/education-website-app/tree/main/server/controllers/CourseProgress.ts | https://raw.githubusercontent.com/IWhitebird/education-website-app/23b193f/server/controllers/CourseProgress.ts | IWhitebird/education-website-app 23b193f server/controllers/CourseProgress.ts | true | 200 | 1,688 | import mongoose from "mongoose";
import { Request, Response } from "express";
import SubSection from "../models/SubSection";
import CourseProgress from "../models/CourseProgress";
import Course from "../models/Course";
import { AuthenticatedRequest } from "../middlewares/auth";
export const updateCourseProgress = asy... | 3 |
leduytam/grade-master-hub-server | bc5d447 | src/common/guards/user-roles.guard.ts | TypeScript | www.github.com/leduytam/grade-master-hub-server/tree/main/src/common/guards/user-roles.guard.ts | https://raw.githubusercontent.com/leduytam/grade-master-hub-server/bc5d447/src/common/guards/user-roles.guard.ts | leduytam/grade-master-hub-server bc5d447 src/common/guards/user-roles.guard.ts | true | 200 | 694 | import { CanActivate, ExecutionContext, Injectable } from '@nestjs/common';
import { Reflector } from '@nestjs/core';
import { Request } from 'express';
import { EUserRole } from 'src/models/users/types/user-roles.enum';
@Injectable()
export class RolesGuard implements CanActivate {
constructor(private reflector: Re... | 5 |
StochosTCC/Stochos | d4b6b44 | stochos-front-A/src/app/criar-meta/criar-meta/criar-meta.component.spec.ts | TypeScript | www.github.com/StochosTCC/Stochos/tree/main/stochos-front-A/src/app/criar-meta/criar-meta/criar-meta.component.spec.ts | https://raw.githubusercontent.com/StochosTCC/Stochos/d4b6b44/stochos-front-A/src/app/criar-meta/criar-meta/criar-meta.component.spec.ts | StochosTCC/Stochos d4b6b44 stochos-front-A/src/app/criar-meta/criar-meta/criar-meta.component.spec.ts | true | 200 | 648 | import { ComponentFixture, TestBed } from '@angular/core/testing';
import { CriarMetaComponent } from './criar-meta.component';
describe('CriarMetaComponent', () => {
let component: CriarMetaComponent;
let fixture: ComponentFixture<CriarMetaComponent>;
beforeEach(async () => {
await TestBed.configureTestin... | 7 |
haskelcurry/learning | 1ed275d | 3-api-centric/frontend/src/app/users/users.routes.ts | TypeScript | www.github.com/haskelcurry/learning/tree/main/3-api-centric/frontend/src/app/users/users.routes.ts | https://raw.githubusercontent.com/haskelcurry/learning/1ed275d/3-api-centric/frontend/src/app/users/users.routes.ts | haskelcurry/learning 1ed275d 3-api-centric/frontend/src/app/users/users.routes.ts | true | 200 | 391 | import { UserListPageComponent } from './user-list-page/user-list-page.component';
import { EditUserPageComponent } from './edit-user-page/edit-user-page.component';
export const routes = [
{
path: '',
component: UserListPageComponent
},
{
path: 'edit/:userId',
component: EditUserPageComponent
... | 1 |
lorenzoappo12/react-personality-quiz | 5ac936b | src/components/quiz/superheroService.ts | TypeScript | www.github.com/lorenzoappo12/react-personality-quiz/tree/main/src/components/quiz/superheroService.ts | https://raw.githubusercontent.com/lorenzoappo12/react-personality-quiz/5ac936b/src/components/quiz/superheroService.ts | lorenzoappo12/react-personality-quiz 5ac936b src/components/quiz/superheroService.ts | true | 200 | 617 | import axios, { AxiosResponse } from 'axios';
import { Superhero } from './Superhero.type';
const SUPERHERO_API_BASE_URL = 'https://superheroapi.com/api.php/7a1ace9ac59e1922cb1cb520e082422b';
const fetchSuperheroByName = async (name: string): Promise<Superhero | null> => {
try {
const matchCharacter: AxiosRespo... | 4 |
DvMarc/DAWM | d64928d | proyecto03/clienteAngular/src/app/app-routing.module.ts | TypeScript | www.github.com/DvMarc/DAWM/tree/main/proyecto03/clienteAngular/src/app/app-routing.module.ts | https://raw.githubusercontent.com/DvMarc/DAWM/d64928d/proyecto03/clienteAngular/src/app/app-routing.module.ts | DvMarc/DAWM d64928d proyecto03/clienteAngular/src/app/app-routing.module.ts | true | 200 | 793 | import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { ApiComponent } from './api/api.component';
import { MonsterDetailComponent } from './monster-detail/monster-detail.component';
import { MounstroComponent } from './mounstro/mounstro.component';
import { PrincipalC... | 6 |
johnfr15/lootbox-app | 63458b2 | client/src/Experience/sources.ts | TypeScript | www.github.com/johnfr15/lootbox-app/tree/main/client/src/Experience/sources.ts | https://raw.githubusercontent.com/johnfr15/lootbox-app/63458b2/client/src/Experience/sources.ts | johnfr15/lootbox-app 63458b2 client/src/Experience/sources.ts | true | 200 | 6,322 | export const sources = [
/**
* Scenes
*/
// Lootbox
{
name: "contractsModel",
type: "lootBoxScene",
path: "scenes/lootBox/contracts/contracts.gltf"
},
{
name: "floorModel",
type: "lootBoxScene",
path: "scenes/lootBox/floor/floor.gltf"
},
{
name: "houseModel",
type: ... | 5 |
michaelpaulcuccia/lyceum | bb7ae4d | my-app/src/app/types/types.ts | TypeScript | www.github.com/michaelpaulcuccia/lyceum/tree/main/my-app/src/app/types/types.ts | https://raw.githubusercontent.com/michaelpaulcuccia/lyceum/bb7ae4d/my-app/src/app/types/types.ts | michaelpaulcuccia/lyceum bb7ae4d my-app/src/app/types/types.ts | true | 200 | 531 | // these types are used for data fetching, not to model data
export type GroupType = {
id: number;
name: string;
description: string | null;
location: string | null;
zipCode: string | null;
};
// Define additional types as needed
export type UserType = {
id: number;
userId: number;
groupId: number;
... | 0 |
sreenathGanga1988/CBEAAPPMAIN | c04ab6a | src/app/Custom Modules/admin-area/Masters/branch/branch-view/branch-view.component.ts | TypeScript | www.github.com/sreenathGanga1988/CBEAAPPMAIN/tree/main/src/app/Custom Modules/admin-area/Masters/branch/branch-view/branch-view.component.ts | https://raw.githubusercontent.com/sreenathGanga1988/CBEAAPPMAIN/c04ab6a/src/app/Custom%20Modules/admin-area/Masters/branch/branch-view/branch-view.component.ts | sreenathGanga1988/CBEAAPPMAIN c04ab6a src/app/Custom Modules/admin-area/Masters/branch/branch-view/branch-view.component.ts | true | 200 | 3,360 | import { Component, Inject, OnInit, Optional } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
import { Branch } from 'src/app/Models/branch.model';
import { CustomApiResponse } from 'src/app/Models/cust... | 3 |
INESData/inesdata-map-editor-frontend | d8dbcbe | src/app/pages/mappings/mappings-builder/mappings-builder.component.ts | TypeScript | www.github.com/INESData/inesdata-map-editor-frontend/tree/main/src/app/pages/mappings/mappings-builder/mappings-builder.component.ts | https://raw.githubusercontent.com/INESData/inesdata-map-editor-frontend/d8dbcbe/src/app/pages/mappings/mappings-builder/mappings-builder.component.ts | INESData/inesdata-map-editor-frontend d8dbcbe src/app/pages/mappings/mappings-builder/mappings-builder.component.ts | true | 200 | 18,286 | import { Component, DestroyRef, inject, OnInit } from '@angular/core';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
import { ActivatedRoute, Router } from '@angular/router';
import { DataBaseSourceDTO, FileSourceDTO, FileSourceService, MappingDTO, MappingService, NamespaceDTO, ObjectMapDTO, Ontology... | 7 |
EdinGrech/veterinary-clinic | b334b2b | src/app/services/auth-interceptor/auth-interceptor.interceptor.ts | TypeScript | www.github.com/EdinGrech/veterinary-clinic/tree/main/src/app/services/auth-interceptor/auth-interceptor.interceptor.ts | https://raw.githubusercontent.com/EdinGrech/veterinary-clinic/b334b2b/src/app/services/auth-interceptor/auth-interceptor.interceptor.ts | EdinGrech/veterinary-clinic b334b2b src/app/services/auth-interceptor/auth-interceptor.interceptor.ts | true | 200 | 733 | import { HttpInterceptorFn } from '@angular/common/http';
import { inject } from '@angular/core';
import { HttpErrorResponse } from '@angular/common/http';
import { catchError } from 'rxjs';
import { AuthService } from '../auth-service/auth-service.service';
export const authInterceptor: HttpInterceptorFn = (req, next... | 1 |
FaresGomaa1/LMS-FrontEnd | d907bbd | src/app/instructor/service/instructor-course.service.ts | TypeScript | www.github.com/FaresGomaa1/LMS-FrontEnd/tree/main/src/app/instructor/service/instructor-course.service.ts | https://raw.githubusercontent.com/FaresGomaa1/LMS-FrontEnd/d907bbd/src/app/instructor/service/instructor-course.service.ts | FaresGomaa1/LMS-FrontEnd d907bbd src/app/instructor/service/instructor-course.service.ts | true | 200 | 1,325 | import { Injectable } from '@angular/core';
import { ICourse } from '../interface/i-course';
import { InstructorService } from 'src/app/instructor/service/instructor.service';
import { CourseService } from './course.service';
import { Observable, map, switchMap } from 'rxjs';
import { HttpClient } from '@angular/common... | 4 |
tobiasfacello/dwf-m6-desafio | 3eaff7f | client/pages/timeout/index.ts | TypeScript | www.github.com/tobiasfacello/dwf-m6-desafio/tree/main/client/pages/timeout/index.ts | https://raw.githubusercontent.com/tobiasfacello/dwf-m6-desafio/3eaff7f/client/pages/timeout/index.ts | tobiasfacello/dwf-m6-desafio 3eaff7f client/pages/timeout/index.ts | true | 200 | 2,137 | import { state } from "../../state";
import { Router } from "@vaadin/router";
customElements.define(
"timeout-page",
class initTimeoutPage extends HTMLElement {
connectedCallback() {
const headerEl: HTMLElement = document.querySelector(".header");
headerEl.style.display = "flex";
this.render();
this.a... | 2 |
CamiloPC/countryApp | d95f319 | src/app/countries/components/country-table/country-table.component.ts | TypeScript | www.github.com/CamiloPC/countryApp/tree/main/src/app/countries/components/country-table/country-table.component.ts | https://raw.githubusercontent.com/CamiloPC/countryApp/d95f319/src/app/countries/components/country-table/country-table.component.ts | CamiloPC/countryApp d95f319 src/app/countries/components/country-table/country-table.component.ts | true | 200 | 588 | import { CommonModule } from '@angular/common';
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
import { Country } from '../../interfaces/country.interface';
import { RouterModule } from '@angular/router';
@Component({
selector: 'countries-table',
standalone: true,
imports: [
Commo... | 5 |
Couchbase-Ecosystem/VSCode-Couchbase | 0957958 | src/reactViews/app/sync/realm-service/realm-service.ts | TypeScript | www.github.com/Couchbase-Ecosystem/VSCode-Couchbase/tree/main/src/reactViews/app/sync/realm-service/realm-service.ts | https://raw.githubusercontent.com/Couchbase-Ecosystem/VSCode-Couchbase/0957958/src/reactViews/app/sync/realm-service/realm-service.ts | Couchbase-Ecosystem/VSCode-Couchbase 0957958 src/reactViews/app/sync/realm-service/realm-service.ts | true | 200 | 1,956 | import { defaultPaginationQuery, QueryOptions } from 'sync/query';
import { deleteRequest, getRequest, postRequest, putRequest } from 'sync/request';
import { OrganizationContext, RealmContext } from 'sync/request.types';
import {
CreateRealmPayload,
CreateRealmResponse,
DeleteRealmPayload,
RealmListResponse,
... | 3 |
zagalovongoto/frontgestionstock | 89d1d91 | src/gs-api/generated/model/ligneCommandeClientDto.ts | TypeScript | www.github.com/zagalovongoto/frontgestionstock/tree/main/src/gs-api/generated/model/ligneCommandeClientDto.ts | https://raw.githubusercontent.com/zagalovongoto/frontgestionstock/89d1d91/src/gs-api/generated/model/ligneCommandeClientDto.ts | zagalovongoto/frontgestionstock 89d1d91 src/gs-api/generated/model/ligneCommandeClientDto.ts | true | 200 | 654 | /**
* API REST Gestion de stock
* Cette API expose des points de terminaison pour gérer les stocks
*
* The version of the OpenAPI document: 1.0
* Contact: mambosag@gmail.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not e... | 7 |
JGGrande/react-avancado-unialfa | 4845cb7 | src/components/header/style.ts | TypeScript | www.github.com/JGGrande/react-avancado-unialfa/tree/main/src/components/header/style.ts | https://raw.githubusercontent.com/JGGrande/react-avancado-unialfa/4845cb7/src/components/header/style.ts | JGGrande/react-avancado-unialfa 4845cb7 src/components/header/style.ts | true | 200 | 591 | import styled from "styled-components";
export const HeaderContainer = styled.header`
background-color: red;
display: flex;
justify-content: space-between;
align-items: center;
padding: 2vh 2vw;
height: 12vh;
`;
export const LinksContainer = styled.ul`
display: flex;
flex-direction: row;
justify-... | 0 |
PBudgie/advent2023 | daa31f9 | src/3-2.ts | TypeScript | www.github.com/PBudgie/advent2023/tree/main/src/3-2.ts | https://raw.githubusercontent.com/PBudgie/advent2023/daa31f9/src/3-2.ts | PBudgie/advent2023 daa31f9 src/3-2.ts | true | 200 | 2,515 | import { readFileSync } from 'fs';
interface PartNumberAndLocation {
number: number;
startIndex: number;
endIndex: number;
rowNumber: number;
}
interface GearAndLocation {
row: number;
col: number;
}
const RAW_DATA_BY_LINE: Array<string> = readFileSync(
'3-input.txt',
'utf-8'
).split('\n');
const SCH... | 1 |
kkn1125/mentees-express | c5a0d35 | client/src/apis/products/index.ts | TypeScript | www.github.com/kkn1125/mentees-express/tree/main/client/src/apis/products/index.ts | https://raw.githubusercontent.com/kkn1125/mentees-express/c5a0d35/client/src/apis/products/index.ts | kkn1125/mentees-express c5a0d35 client/src/apis/products/index.ts | true | 200 | 810 | import axios from "axios";
import { baseUrl, getFormData } from "../../utils/tools";
export default {
findAll: () => {
return axios.get(baseUrl + "/products");
},
findOne: (num: string) => {
return axios.get(baseUrl + `/products/${num}`);
},
create: (product: Product) => {
const formData = getFor... | 6 |
Arziburst/NOVA_MASSAGE_frontend_2 | fcf1d6f | src/sections/fifth/utils.ts | TypeScript | www.github.com/Arziburst/NOVA_MASSAGE_frontend_2/tree/main/src/sections/fifth/utils.ts | https://raw.githubusercontent.com/Arziburst/NOVA_MASSAGE_frontend_2/fcf1d6f/src/sections/fifth/utils.ts | Arziburst/NOVA_MASSAGE_frontend_2 fcf1d6f src/sections/fifth/utils.ts | true | 200 | 1,335 | // Types
import { HTMLElementsDisabledStateTypes } from './types';
// Tools
import { WHEN_REQUEST_WAS_SENT, LIMIT_TIME } from '../../init/constants';
export const isFormBlockedHandler = () => {
const whenRequestWasSent = localStorage.getItem(WHEN_REQUEST_WAS_SENT) || 0;
const isFormBlocked = LIMIT_TIME > (Dat... | 2 |
axdamx/renown | a59c626 | src/constants/mockData.ts | TypeScript | www.github.com/axdamx/renown/tree/main/src/constants/mockData.ts | https://raw.githubusercontent.com/axdamx/renown/a59c626/src/constants/mockData.ts | axdamx/renown a59c626 src/constants/mockData.ts | true | 200 | 7,027 | export const mockAuctionData = [
{
authorName: 'Adam',
itemName: 'Vintage Clock',
description: 'A beautiful antique wall clock from the 19th century.',
starting_bid: 100,
bid_increment: 10,
auction_end_date: '2024-07-01T18:00:00Z',
image_uri: 'https://source.u... | 5 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.