repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
EdRamos12/Proffy | web/src/components/TeacherItem/index.tsx | import React, { useState, useEffect, useCallback, useContext } from 'react';
import './styles.css'
import whatsappIcon from '../../assets/images/icons/whatsapp.svg';
import trashIcon from '../../assets/images/icons/trash.svg';
import api from '../../services/api';
import { Link } from 'react-router-dom';
import AuthCon... |
EdRamos12/Proffy | web/src/pages/LoadingPublic/index.tsx | <reponame>EdRamos12/Proffy
import logoImg from '../../assets/images/logo.svg';
import loadingGif from '../../assets/images/loading.gif';
import './styles.css';
export default function LoadingScreen() {
return (
<div className="loading-container">
<div className="loading-background">
... |
EdRamos12/Proffy | server/src/controllers/ClassCommentsController.ts | <gh_stars>1-10
import { Request, Response } from 'express';
import db from '../db/connections';
export default class ClassCommentsController {
async create(rq: Request, rsp: Response) {
const { content } = rq.body;
const { class_id } = rq.params;
const trx = await db.transaction();
... |
EdRamos12/Proffy | web/src/services/api.ts | <reponame>EdRamos12/Proffy<filename>web/src/services/api.ts<gh_stars>1-10
import axios from 'axios';
const api = axios.create({
baseURL: 'http://localhost:3333/api/v2'
})
export default api; |
EdRamos12/Proffy | web/src/components/PageHeader/index.tsx | <reponame>EdRamos12/Proffy<filename>web/src/components/PageHeader/index.tsx
import React from 'react';
import { useHistory } from 'react-router-dom';
import './styles.css'
import logoIcon from '../../assets/images/logo.svg'
import backIcon from '../../assets/images/icons/back.svg'
interface PageHeaderProps {
title... |
EdRamos12/Proffy | server/src/controllers/ProfileController.ts | import { Request, Response } from 'express';
import knex from '../db/connections';
export default class ProfileController {
async edit(rq: Request, rsp: Response) {
const { whatsapp, bio, name } = rq.body;
const trx = await knex.transaction();
try {
let profile;
if... |
EdRamos12/Proffy | server/src/controllers/ConnectionsController.ts | import { Request, Response } from 'express';
import db from '../db/connections';
export default class ConnectionsController {
async index(rq: Request, rsp: Response) {
const totalConnections = await db('connections').count('* as total');
const { total } = totalConnections[0];
return rsp.j... |
EdRamos12/Proffy | web/src/pages/TeacherForm/index.tsx | import React, { useState, FormEvent, useContext, useEffect } from 'react';
import Input from '../../components/Input';
import PageHeader from '../../components/PageHeader';
import warningIcon from '../../assets/images/icons/warning.svg'
import './styles.css';
import Textarea from '../../components/Textarea';
import Sel... |
EdRamos12/Proffy | web/src/pages/Reset/index.tsx | <reponame>EdRamos12/Proffy<filename>web/src/pages/Reset/index.tsx
import React, { useState, FormEvent, useEffect, useContext } from 'react'
import { Link, useParams } from 'react-router-dom';
import logoImg from '../../assets/images/logo.svg';
import backIcon from '../../assets/images/icons/back.svg'
import SuccessCont... |
EdRamos12/Proffy | web/src/pages/TeacherList/index.tsx | <reponame>EdRamos12/Proffy
import React, { useState, FormEvent, useEffect, useMemo, useContext } from 'react';
import './styles.css'
import PageHeader from '../../components/PageHeader';
import TeacherItem, { Teacher } from '../../components/TeacherItem';
import Input from '../../components/Input';
import Select from '... |
EdRamos12/Proffy | web/src/pages/Confirm/index.tsx | <reponame>EdRamos12/Proffy<gh_stars>1-10
import React, { useContext, useEffect } from 'react';
import { useParams, useHistory } from 'react-router-dom';
import api from '../../services/api';
import { v4 } from 'uuid';
import NotificationContext from '../../contexts/NotificationContext';
import LoadingScreen from '../Lo... |
EdRamos12/Proffy | web/src/pages/ClassPage/index.tsx | <reponame>EdRamos12/Proffy
import logoIcon from '../../assets/images/logo.svg';
import backIcon from '../../assets/images/icons/back.svg';
import { useHistory, useParams } from 'react-router-dom';
import './styles.css';
import React, { useEffect, useState } from 'react';
import api from '../../services/api';
import Tea... |
EdRamos12/Proffy | web/src/pages/Login/index.tsx | <reponame>EdRamos12/Proffy
import React, { useState, useContext, FormEvent, useEffect } from 'react';
import AuthContext from '../../contexts/AuthContext';
import { useHistory, Link } from 'react-router-dom';
import logoImg from '../../assets/images/logo.svg';
import heartIcon from '../../assets/images/icons/purple-hea... |
EdRamos12/Proffy | server/src/controllers/UserController.ts | <gh_stars>1-10
import { Request, Response, NextFunction } from 'express';
import db from '../db/connections';
import bcrypt from 'bcrypt';
import jwt from 'jsonwebtoken';
import { createTransport } from 'nodemailer';
import nodeMailerConfig from '../config/nodemailer.json';
require('dotenv/config');
async function sen... |
EdRamos12/Proffy | server/src/routes.ts | <filename>server/src/routes.ts<gh_stars>1-10
import express from 'express';
import multer from 'multer';
import {celebrate, Joi, Segments} from 'celebrate';
import multerConfig from './config/multer';
import ClassesController from './controllers/ClassesController';
import ConnectionsController from './controllers/Conne... |
EdRamos12/Proffy | web/src/components/Notification/index.tsx | <reponame>EdRamos12/Proffy
import React, { useEffect, useState } from 'react';
import './styles.css';
interface NotificationProps {
message: String;
title: String;
type: String;
id: String;
dispatch: any;
}
const NotificationComponent: React.FC<NotificationProps> = (props) => {
const [exit, se... |
EdRamos12/Proffy | server/src/config/multer.ts | <reponame>EdRamos12/Proffy
import multer from 'multer';
import path from 'path';
import crypto from 'crypto';
export default {
storage: multer.diskStorage({
destination: path.join(__dirname, '..', '..', 'uploads'),
filename: (r, file, callback) => {
const hash = crypto.randomBytes(8).to... |
EdRamos12/Proffy | web/src/pages/Forgot/index.tsx | import React, { useState, FormEvent, useEffect } from 'react'
import { Link } from 'react-router-dom';
import logoImg from '../../assets/images/logo.svg';
import backIcon from '../../assets/images/icons/back.svg'
import SuccessContainer from '../../components/SuccessContainer';
import api from '../../services/api';
ex... |
DanRegazzi/DanRegazziProfile | src/components/header/Header.tsx | import { IonHeader, IonText } from "@ionic/react";
import * as React from "react";
import "./header.scss";
interface HeaderProps {
page: string;
}
const Header: React.FC<HeaderProps> = (props) => (
<IonHeader>
<IonText color="primary"><NAME></IonText>
</IonHeader>
);
export default Header; |
DanRegazzi/DanRegazziProfile | src/components/header/index.ts | <filename>src/components/header/index.ts
export {default as Header} from "./Header"; |
DanRegazzi/DanRegazziProfile | src/components/pages/home/index.ts | <reponame>DanRegazzi/DanRegazziProfile
//import Home from './Home';
//export default Home;
export {default as Home} from "./Home"; |
DanRegazzi/DanRegazziProfile | src/components/pages/home/Home.tsx | <reponame>DanRegazzi/DanRegazziProfile<filename>src/components/pages/home/Home.tsx
import { IonCol, IonContent, IonGrid, IonPage, IonRow, IonText } from '@ionic/react';
import * as React from 'react';
import { RouteComponentProps } from 'react-router';
import { Header } from '../../header';
import "./home.scss";
inte... |
DanRegazzi/DanRegazziProfile | src/App.tsx | <gh_stars>0
import * as React from "react";
import { IonApp, IonHeader, IonRouterOutlet } from "@ionic/react";
import { IonReactRouter } from "@ionic/react-router";
import { Route } from "react-router-dom";
import "./App.scss";
/* Ionic CSS */
import "@ionic/react/css/core.css";
/* Basic CSS for apps built with Ioni... |
thomasmendez/personal-website | src/app/models/VrArProjects.ts | export class VrArProjects {
public title:string;
public description:string;
public myTasks:Array<string>;
public teamSize:number;
public teamRoles:Array<string>;
public tools:Array<string>;
public projectDuration:string;
public startDate:string;
public endDate:string;
public webs... |
thomasmendez/personal-website | src/app/models/Work.ts | export class Work {
public jobTitle:string;
public company:string;
public city:string;
public state:string;
public startDate:string;
public endDate:string;
public jobRole:string;
public jobDuties:Array<String>;
} |
thomasmendez/personal-website | src/app/app-routing.module.ts | <filename>src/app/app-routing.module.ts
import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { HomeComponent } from './components/pages/home/home.component';
import { WorkComponent } from './components/pages/work/work.component';
import { SkillsToolsComponent } from '... |
thomasmendez/personal-website | e2e/src/pages/app.home.ts | <filename>e2e/src/pages/app.home.ts
import { browser, by, element, Locator, WebElement, ElementFinder, ElementArrayFinder } from 'protractor';
export class HomePage {
navigateTo(): Promise<unknown> {
return browser.get(browser.baseUrl) as Promise<unknown>;
}
// About Me
getAboutMeHeader(): Promise<string... |
thomasmendez/personal-website | src/app/models/Icon.ts | <filename>src/app/models/Icon.ts<gh_stars>0
export class Icon {
private name: string;
private fafa: string;
private link: string;
constructor(name: string, fafaIcon: string, link: string) {
this.name = name;
this.fafa = fafaIcon;
this.link = link;
}
} |
thomasmendez/personal-website | src/app/app.module.ts | <filename>src/app/app.module.ts<gh_stars>0
import { BrowserModule, Title } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { NgbModule } from '@ng-bootstrap/ng-bootstrap';
import... |
thomasmendez/personal-website | e2e/src/pages/app.skills-tools.ts | <gh_stars>0
import { browser, by, element, Locator, WebElement, ElementFinder, ElementArrayFinder } from 'protractor';
export class SkillsAndToolsPage {
navigateTo(): Promise<unknown> {
return browser.get('/skills&tools') as Promise<unknown>;
}
// Skills
getSkillsHeader(): Promise<string> {
return el... |
thomasmendez/personal-website | src/app/components/pages/vr-ar-projects/vr-ar-projects.component.spec.ts | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { VrArProjectsComponent } from './vr-ar-projects.component';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
describe('VrArProjectsComponent', () => {
let component... |
thomasmendez/personal-website | src/app/components/pages/work/work.component.ts | <reponame>thomasmendez/personal-website<gh_stars>0
import { Component, OnInit } from '@angular/core';
import { Work } from '../../../models/Work';
@Component({
selector: 'app-work',
templateUrl: './work.component.html',
styleUrls: ['./work.component.css']
})
export class WorkComponent implements OnInit {
pu... |
thomasmendez/personal-website | src/app/components/pages/skills-tools/skills-tools.component.ts | import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-skills-tools',
templateUrl: './skills-tools.component.html',
styleUrls: ['./skills-tools.component.css']
})
export class SkillsToolsComponent implements OnInit {
public title : string = "Skills & Tools"
public keepOriginalOrder ... |
thomasmendez/personal-website | src/app/components/pages/software-projects/software-projects.component.ts | import { Component, OnInit } from '@angular/core';
import { SoftwareProjects } from '../../../models/SoftwareProjects';
@Component({
selector: 'app-software-projects',
templateUrl: './software-projects.component.html',
styleUrls: ['./software-projects.component.css']
})
export class SoftwareProjectsComponent im... |
thomasmendez/personal-website | src/app/components/pages/software-projects/software-projects.component.spec.ts | <filename>src/app/components/pages/software-projects/software-projects.component.spec.ts<gh_stars>0
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { SoftwareProjectsComponent } from './software-projects.component';
import ... |
thomasmendez/personal-website | src/app/components/footer/footer.component.ts | <gh_stars>0
import { Component, OnInit } from '@angular/core';
import { Icon } from '../../models/Icon';
import { MyInfo } from '../../static/MyInfo';
@Component({
selector: 'app-footer',
templateUrl: './footer.component.html',
styleUrls: ['./footer.component.css']
})
export class FooterComponent implements OnI... |
thomasmendez/personal-website | e2e/src/pages/app.vr-ar-projects.ts | <reponame>thomasmendez/personal-website
import { browser, by, element, Locator, WebElement, ElementFinder, ElementArrayFinder } from 'protractor';
export class VrArProjects {
navigateTo(): Promise<unknown> {
return browser.get('/projects/vr-ar') as Promise<unknown>;
}
// VR / AR Projects
getProjectHeader... |
thomasmendez/personal-website | src/app/app-routing.spec.ts | import { TestBed, async } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { Router, RouterModule } from '@angular/router';
import { AppComponent } from './app.component';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
describe('AppRouting', () => {
beforeE... |
thomasmendez/personal-website | e2e/src/app.e2e-spec.ts | <reponame>thomasmendez/personal-website
import { HomePage } from './pages/app.home';
import { SkillsAndToolsPage } from './pages/app.skills-tools';
import { SoftwareProjects } from './pages/app.software-projects';
import { VrArProjects } from './pages/app.vr-ar-projects';
import { browser, logging } from 'protractor';
... |
thomasmendez/personal-website | src/app/components/pages/home/contact/contact.component.spec.ts | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { ContactComponent } from './contact.component';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
describe('ContactComponent', () => {
let component: ContactComponen... |
thomasmendez/personal-website | src/app/components/footer/footer.component.spec.ts | <gh_stars>0
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { FooterComponent } from './footer.component';
import { By } from '@angular/platform-browser';
describe('FooterComponent', () => {
let component: FooterComponent;
let fixture: ComponentFixture<FooterComponent>;
beforeE... |
thomasmendez/personal-website | e2e/src/pages/app.software-projects.ts | <reponame>thomasmendez/personal-website<filename>e2e/src/pages/app.software-projects.ts
import { browser, by, element, Locator, WebElement, ElementFinder, ElementArrayFinder } from 'protractor';
export class SoftwareProjects {
navigateTo(): Promise<unknown> {
return browser.get('/projects/software') as Promise<... |
thomasmendez/personal-website | src/app/static/MyInfo.ts | import { Icon } from '../models/Icon';
export class MyInfo {
public static myIcons: Icon[] = [MyInfo.linkedIn(), MyInfo.github(), MyInfo.email()]
private static linkedIn(): Icon {
let icon = new Icon('LinkedIn', 'fa fa-linkedin-square', "https://www.linkedin.com/in/thomas-a-mendez")
return ic... |
thomasmendez/personal-website | src/app/components/pages/vr-ar-projects/vr-ar-projects.component.ts | import { Component, OnInit } from '@angular/core';
import { VrArProjects } from '../../../models/VrArProjects';
@Component({
selector: 'app-vr-ar-projects',
templateUrl: './vr-ar-projects.component.html',
styleUrls: ['./vr-ar-projects.component.css']
})
export class VrArProjectsComponent implements OnInit {
p... |
thomasmendez/personal-website | src/app/components/title-header/title-header.component.spec.ts | <reponame>thomasmendez/personal-website
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { TitleHeaderComponent } from './title-header.component';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
describe('TitleHeade... |
thomasmendez/personal-website | src/app/components/title-header/title-header.component.ts | <filename>src/app/components/title-header/title-header.component.ts
import { Component, OnInit, Input } from '@angular/core';
@Component({
selector: 'app-title-header',
templateUrl: './title-header.component.html',
styleUrls: ['./title-header.component.css']
})
export class TitleHeaderComponent implements OnInit... |
thomasmendez/personal-website | src/app/components/pages/skills-tools/skills-tools.component.spec.ts | <reponame>thomasmendez/personal-website
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { SkillsToolsComponent } from './skills-tools.component';
import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
describe('SkillsTool... |
cyber-republic/elastos-helloworld-app | trinity_app/src/pages/home/home.ts | <filename>trinity_app/src/pages/home/home.ts
import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
declare let require_test: any;
declare let cordova: any;
@Component({
selector: 'page-home',
templateUrl: 'home.html'
})
export class HomePage {
carpath = "libElastos.HelloCa... |
redboul/ponyracer-ng2 | src/app/models/user.model.ts | <gh_stars>0
export interface UserModel {
id: number;
login: string;
money: number;
registrationInstant: string;
}
|
redboul/ponyracer-ng2 | src/app/pony/pony.component.ts | import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import { PonyModel } from '../models/pony.model';
@Component({
selector: 'pr-pony',
templateUrl: './pony.component.html',
styleUrls: ['./pony.component.css']
})
export class PonyComponent implements OnInit {
@Input() ponyModel: P... |
redboul/ponyracer-ng2 | src/app/home/home.component.ts | import { Component, OnInit, OnDestroy } from '@angular/core';
import { Subscription } from 'rxjs/Subscription';
import { UserModel } from '../models/user.model';
import { UserService } from '../user.service';
@Component({
selector: 'pr-home',
templateUrl: './home.component.html',
styleUrls: ['./home.component.c... |
redboul/ponyracer-ng2 | src/app/app.component.spec.ts | import { TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { AppModule } from './app.module';
import { AppComponent } from './app.component';
describe('AppComponent', () => {
beforeEach(() => TestBed.configureTestingModule({
imports: [AppModule, Route... |
redboul/ponyracer-ng2 | src/app/register/register.component.ts | <reponame>redboul/ponyracer-ng2
import { Component, OnInit } from '@angular/core';
import { FormControl, FormGroup, FormBuilder, Validators } from '@angular/forms';
import { Router } from '@angular/router';
import { UserService } from '../user.service';
@Component({
selector: 'pr-register',
templateUrl: './regist... |
redboul/ponyracer-ng2 | src/app/from-now.pipe.spec.ts | <filename>src/app/from-now.pipe.spec.ts
import { FromNowPipe } from './from-now.pipe';
describe('FromNowPipe', () => {
it('should transform the input', () => {
// given a pipe
const pipe = new FromNowPipe();
// when transforming the date
const date = '2016-02-18T08:02:00Z';
const transformed = ... |
redboul/ponyracer-ng2 | src/app/http.service.spec.ts | import { async, TestBed } from '@angular/core/testing';
import { Http, BaseRequestOptions, Response, ResponseOptions, RequestMethod } from '@angular/http';
import { MockBackend } from '@angular/http/testing';
import { HttpService } from './http.service';
describe('HttpService', () => {
let httpService: HttpService... |
redboul/ponyracer-ng2 | src/app/live/live.component.ts | import { Component, OnInit, OnDestroy } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Subscription } from 'rxjs/Subscription';
import { RaceService } from '../race.service';
import { RaceModel } from '../models/race.model';
import { PonyWithPositionModel } from '../models/pony.model'... |
redboul/ponyracer-ng2 | src/app/bet/bet.component.ts | import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { RaceService } from '../race.service';
import { RaceModel } from '../models/race.model';
@Component({
selector: 'pr-bet',
templateUrl: './bet.component.html',
styleUrls: ['./bet.component.css']
})
export... |
redboul/ponyracer-ng2 | src/app/login/login.component.ts | <reponame>redboul/ponyracer-ng2
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { UserService } from '../user.service';
@Component({
selector: 'pr-login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.css']
})
export class LoginComponen... |
redboul/ponyracer-ng2 | src/app/login/login.component.spec.ts | import { async, TestBed } from '@angular/core/testing';
import { Router } from '@angular/router';
import { Subject } from 'rxjs/Subject';
import { AppModule } from '../app.module';
import { LoginComponent } from './login.component';
import { UserService } from '../user.service';
describe('LoginComponent', () => {
... |
redboul/ponyracer-ng2 | src/app/live/live.component.spec.ts | import { TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { ActivatedRoute } from '@angular/router';
import { By } from '@angular/platform-browser';
import { Observable } from 'rxjs/Observable';
import { AppModule } from '../app.module';
import { LiveCompone... |
redboul/ponyracer-ng2 | src/app/race.service.ts | import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/observable/interval';
import 'rxjs/add/operator/take';
import { RaceModel } from './models/race.model';
import { PonyWithPositionModel } from './models/pony.model';
import { HttpService } from './http.service';
i... |
redboul/ponyracer-ng2 | src/app/models/pony.model.ts | export interface PonyModel {
id: number;
name: string;
color: string;
}
export interface PonyWithPositionModel extends PonyModel {
position: number;
}
|
redboul/ponyracer-ng2 | src/app/user.service.ts | import { Injectable } from '@angular/core';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/do';
import { UserModel } from './models/user.model';
import { HttpService } from './http.service';
@Injectable()
... |
redboul/ponyracer-ng2 | src/app/race/race.component.ts | <reponame>redboul/ponyracer-ng2
import { Component, OnInit, Input } from '@angular/core';
import { RaceModel } from '../models/race.model';
@Component({
selector: 'pr-race',
templateUrl: './race.component.html',
styleUrls: ['./race.component.css']
})
export class RaceComponent implements OnInit {
@Input() ra... |
redboul/ponyracer-ng2 | src/app/app.routes.ts | import { Routes } from '@angular/router';
import { HomeComponent } from './home/home.component';
import { RacesComponent } from './races/races.component';
import { RegisterComponent } from './register/register.component';
import { LoginComponent } from './login/login.component';
import { BetComponent } from './bet/bet... |
redboul/ponyracer-ng2 | src/typings.d.ts | <filename>src/typings.d.ts
// Typings reference file, you can add your own global typings here
// https://www.typescriptlang.org/docs/handbook/writing-declaration-files.html
declare module 'webstomp-client' {
interface Webstomp {
over(socketType: any): WebstompClient;
}
interface WebstompClient {
connect(... |
redboul/ponyracer-ng2 | src/app/user.service.spec.ts | import { async, TestBed } from '@angular/core/testing';
import { Observable } from 'rxjs/Observable';
import { UserService } from './user.service';
import { HttpService } from './http.service';
describe('UserService', () => {
let userService: UserService;
const httpService = jasmine.createSpyObj('HttpService', [... |
redboul/ponyracer-ng2 | src/app/models/race.model.ts | <reponame>redboul/ponyracer-ng2<gh_stars>0
import { PonyModel } from './pony.model';
export interface RaceModel {
id: number;
betPonyId?: number;
name: string;
ponies: Array<PonyModel>;
startInstant: string;
}
|
redboul/ponyracer-ng2 | src/app/menu/menu.component.ts | <gh_stars>0
import { Component, OnInit, OnDestroy } from '@angular/core';
import { Router } from '@angular/router';
import { Subscription } from 'rxjs/Subscription';
import { UserModel } from '../models/user.model';
import { UserService } from '../user.service';
@Component({
selector: 'pr-menu',
templateUrl: './m... |
redboul/ponyracer-ng2 | src/app/ws.service.spec.ts | import { TestBed, async } from '@angular/core/testing';
import { WsService } from './ws.service';
describe('WsService', () => {
let wsService: WsService;
const webstomp = jasmine.createSpyObj('Webstomp', ['over', 'connect', 'subscribe']);
class FakeWebSocket { close() {}}
beforeEach(() => {
TestBed.confi... |
redboul/ponyracer-ng2 | src/app/home/home.component.spec.ts | import { TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
import { AppModule } from '../app.module';
import { HomeComponent } from './home.component';
import { UserModel } from '../models/user.model';
import {... |
redboul/ponyracer-ng2 | e2e/app.e2e-spec.ts | import { PonyracerPage } from './app.po';
describe('ponyracer App', function() {
let page: PonyracerPage;
beforeEach(() => {
page = new PonyracerPage();
});
it('should display message saying app works', () => {
page.navigateTo();
expect(page.getParagraphText()).toEqual('Ponyracer Always a pleasur... |
redboul/ponyracer-ng2 | src/app/http.service.ts | import { Injectable } from '@angular/core';
import { Http, RequestOptions, Headers } from '@angular/http';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';
@Injectable()
export class HttpService {
baseUrl: string = 'http://ponyracer.ninja-squad.com';
headers: Headers = new Headers();
... |
redboul/ponyracer-ng2 | src/app/menu/menu.component.spec.ts | import { async, TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { Subject } from 'rxjs/Subject';
import { AppModule } from '../app.module';
import { MenuComponent } from './menu.component';
import { UserService } from '../user.service';
import { UserModel }... |
redboul/ponyracer-ng2 | src/app/race.service.spec.ts | import { async, TestBed } from '@angular/core/testing';
import { Observable } from 'rxjs/Observable';
import { Subject } from 'rxjs/Subject';
import 'rxjs/add/observable/of';
import { RaceService } from './race.service';
import { HttpService } from './http.service';
import { WsService } from './ws.service';
import { P... |
redboul/ponyracer-ng2 | src/app/ws.service.ts | <filename>src/app/ws.service.ts<gh_stars>0
import { Injectable, Inject } from '@angular/core';
import * as Webstomp from 'webstomp-client';
import { Observable } from 'rxjs/Observable';
@Injectable()
export class WsService {
constructor(@Inject('Webstomp') private Webstomp, @Inject('WebSocket') private WebSocket) {... |
redboul/ponyracer-ng2 | src/app/race/race.component.spec.ts | import { TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { By } from '@angular/platform-browser';
import { AppModule } from '../app.module';
import { RaceComponent } from './race.component';
import { PonyComponent } from '../pony/pony.component';
describe(... |
redboul/ponyracer-ng2 | src/app/bet/bet.component.spec.ts | <filename>src/app/bet/bet.component.spec.ts
import { async, TestBed } from '@angular/core/testing';
import { ActivatedRoute } from '@angular/router';
import { RouterTestingModule } from '@angular/router/testing';
import { By } from '@angular/platform-browser';
import { Observable } from 'rxjs/Observable';
import 'rxjs/... |
redboul/ponyracer-ng2 | src/app/races/races.component.ts | <filename>src/app/races/races.component.ts
import { Component, OnInit } from '@angular/core';
import { RaceModel } from '../models/race.model';
import { RaceService } from '../race.service';
@Component({
selector: 'pr-races',
templateUrl: './races.component.html',
styleUrls: ['./races.component.css']
})
export ... |
LeeJaeBae/second-nest | src/movies/movies.service.spec.ts | <reponame>LeeJaeBae/second-nest<gh_stars>0
import { Test, TestingModule } from "@nestjs/testing";
import { MoviesService } from "./movies.service";
import { Movie } from "./entities/movie.entity";
import { NotFoundException } from "@nestjs/common";
describe("MoviesService", () => {
let service: MoviesService;
bef... |
keyone2693/persian-time-ago-pipe | src/app/persian-time-ago/persian-time-ago.module.ts | <reponame>keyone2693/persian-time-ago-pipe
import { NgModule } from '@angular/core';
import { PersianTimeAgoPipe } from './persian-time-ago.pipe';
@NgModule({
declarations: [PersianTimeAgoPipe],
exports: [PersianTimeAgoPipe],
providers: [PersianTimeAgoPipe]
})
export class PersianTimeAgoModule { } |
keyone2693/persian-time-ago-pipe | public_api.ts | export * from './src/app/persian-time-ago/persian-time-ago.module';
export * from './src/app/persian-time-ago/persian-time-ago.pipe'; |
snipem/vscode-run-script | src/extension.ts | <filename>src/extension.ts
// run: vsce package
import * as vscode from 'vscode';
var fs = require("fs");
export function getCommandFromFile(filename: string, encoding : string) : string | null {
let text : string = fs.readFileSync(filename).toString(encoding);
let string_to_match : string = "^(#|\/\/|--) run: (.*)$... |
snipem/vscode-run-script | src/test/suite/extension.test.ts | <filename>src/test/suite/extension.test.ts
import * as assert from 'assert';
// You can import and use all API from the 'vscode' module
// as well as import your extension to test it
import * as vscode from 'vscode';
import * as runscript from '../../extension';
import * as path from 'path';
suite('Extension Test Sui... |
olean-b/express-typescript-stencil-starter | server/app.ts | import * as express from 'express'
import * as path from 'path'
const app:express.Application = express()
app.use(express.static(path.join(__dirname, '../resources')))
app.set('views', path.join(__dirname, '../views'))
app.get('/', (_req, res) => {
res.sendFile(path.join(__dirname, '../views', 'index.html'))
})
a... |
olean-b/express-typescript-stencil-starter | stencil.config.ts | <gh_stars>1-10
import { Config } from '@stencil/core';
import path from 'path'
export const config: Config = {
namespace: 'expressstencilstarter',
outputTargets: [
{
type: 'dist',
esmLoaderPath: path.join(__dirname, 'resources/components/loader'),
dir: path.join(__dirname, 'resources/componen... |
olean-b/express-typescript-stencil-starter | src/components/my-component/my-component.tsx | <filename>src/components/my-component/my-component.tsx
import { Component, Prop, h } from '@stencil/core';
@Component({
tag: 'my-component',
styleUrl: 'my-component.css',
shadow: true
})
export class MyComponent {
/**
* The first name
*/
@Prop() count: string = 'first';
render() {
return <div>Yo... |
Mrtinic489/elevator-front | src/client/models/buildSteps/buildStep.ts | export interface BuildStep {
id: string;
name: string;
buildStepScript: Script;
}
export interface Script {
command: string;
arguments: string;
}
|
Mrtinic489/elevator-front | src/client/models/projects/grantAccessRequest.ts | export class GrantAccessRequest {
projectId: string;
userId: string;
accessType: string;
constructor(projectId: string, userId: string, accessType: string) {
this.projectId = projectId;
this.userId = userId;
this.accessType = accessType;
}
}
|
Mrtinic489/elevator-front | src/components/TopBar/index.ts | import { TopBar } from "./TopBar";
export default TopBar
|
Mrtinic489/elevator-front | src/client/providers/buildProvider.ts | import {BaseProvider} from "./baseProvider";
import {Build} from "../models/build";
export class BuildProvider extends BaseProvider {
public getById(projectId: string, buildConfigId: string, id: string) : Promise<Build> {
const url = this.apiUrl + '/projects/' + projectId + '/buildConfigs/' + buildConfigId... |
Mrtinic489/elevator-front | src/components/AuthenticationPage/index.ts | <filename>src/components/AuthenticationPage/index.ts<gh_stars>1-10
import {AuthenticationPage} from "./AuthenticationPage"
import {withRouter} from "react-router-dom";
export default withRouter(AuthenticationPage)
|
Mrtinic489/elevator-front | src/components/TopBar/TopBar.tsx | <reponame>Mrtinic489/elevator-front
import React from "react";
import styles from './TopBar.module.css'
import {ProfileInformation} from "../ProfileInformation/ProfileInformation";
import {User} from "../../client";
interface TopBarProps {
goHome: () => void;
user?: User
}
export class TopBar extends React.Pu... |
Mrtinic489/elevator-front | src/components/ProjectPage/index.ts | <reponame>Mrtinic489/elevator-front
import { ProjectPage } from "./ProjectPage";
import {withRouter} from "react-router-dom";
export default withRouter(ProjectPage);
|
Mrtinic489/elevator-front | src/components/NoAuthenticatedUserPage/index.ts | <reponame>Mrtinic489/elevator-front
import { withRouter } from "react-router-dom";
import {NoAuthenticatedUserPage} from "./NoAuthenticatedUserPage";
export default withRouter(NoAuthenticatedUserPage)
|
Mrtinic489/elevator-front | src/client/models/index.ts | <reponame>Mrtinic489/elevator-front
export * from './projects'
export * from './operationResult'
export * from './users'
export * from './buildConfigs'
export * from './buildSteps'
export * from './build'
|
Mrtinic489/elevator-front | src/client/providers/buildConfigsProvider.ts | <gh_stars>1-10
import {Build, BuildConfig, CreateBuildConfigRequest} from "../models";
import {BaseProvider} from "./baseProvider";
export class BuildConfigsProvider extends BaseProvider {
public createBuildConfig(createBuildConfigRequest: CreateBuildConfigRequest): Promise<BuildConfig> {
const url = this... |
Mrtinic489/elevator-front | src/components/CreateProjectModal/CreateProjectModal.tsx | <reponame>Mrtinic489/elevator-front
import {RouteComponentProps} from "react-router-dom";
import {ApiClient, CreateProjectRequest} from "../../client";
import React, {ChangeEvent} from "react";
import {Modal} from '@material-ui/core'
import styles from './CreateProjectModal.module.css'
interface CreateProjectModalPro... |
Mrtinic489/elevator-front | src/client/providers/buildStepsProvider.ts | <filename>src/client/providers/buildStepsProvider.ts
import {BaseProvider} from "./baseProvider";
import {BuildStep, CreateBuildStepRequest, UpdateBuildStepRequest} from "../models/buildSteps";
export class BuildStepsProvider extends BaseProvider {
public getAllBuildSteps(projectId: string, buildConfigId: string):... |
Mrtinic489/elevator-front | src/client/providers/index.ts | export * from './projectsProvider';
export * from './usersProvider'
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.