repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
nsected/simple-crawler-frontend | both/models/urls.model.ts | <filename>both/models/urls.model.ts
import {ObservableCursor} from "meteor-rxjs";
import {Url} from "./url.model";
import {Page} from "./page.model";
export interface Urls {
urls?: ObservableCursor<Url>;
pages?: ObservableCursor<Page>;
err?: Error
}
|
nsected/simple-crawler-frontend | both/collections/pages.collection.ts | <filename>both/collections/pages.collection.ts
import {MongoObservable} from "meteor-rxjs";
import {Page} from "../models/Page.model";
export const PagesCollection = new MongoObservable.Collection<Page>("pages");
if (Meteor.isServer) {
Meteor.publish('pages_graph', function (site, update_date) {
return Pa... |
nsected/simple-crawler-frontend | client/imports/app/results_table/results_table_data.service.ts | <reponame>nsected/simple-crawler-frontend
import {Injectable} from "@angular/core";
import {PagesCollection} from "../../../../both/collections/pages.collection";
@Injectable()
export class ResultsTableDataService {
public static getPages(pages_sub2, selector, options, timerId, format_date, _pages): any {
... |
nsected/simple-crawler-frontend | client/imports/app/edit_site/edit_site.component.ts | import {Component, OnInit} from "@angular/core";
import template from "./edit_site.component.html";
import style from "./edit_site.component.scss";
import {Sites} from "../../../../both/models/sites.model";
import {SitesCollection} from "../../../../both/collections/sites.collection";
import {ActivatedRoute, Router} fr... |
nsected/simple-crawler-frontend | client/imports/app/site_item/site_item.component.ts | <reponame>nsected/simple-crawler-frontend
import {Component, OnDestroy, OnInit, ViewChild} from "@angular/core";
import template from "./site_item.component.html";
import style from "./site_item.component.scss";
import {Sites} from "../../../../both/models/sites.model";
import {ActivatedRoute} from '@angular/router';
i... |
nsected/simple-crawler-frontend | server/main.ts | <reponame>nsected/simple-crawler-frontend
import { Main } from "./imports/server-main/main";
import {PagesCollection} from "../both/collections/pages.collection";
const mainInstance = new Main();
mainInstance.start();
|
nsected/simple-crawler-frontend | client/imports/app/app.module.ts | <reponame>nsected/simple-crawler-frontend
import { NgModule } from "@angular/core";
import { BrowserModule } from "@angular/platform-browser";
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from "./app.component";
import { SitesComponent } from "./sites/sites.component";
import { Sites... |
nsected/simple-crawler-frontend | client/imports/app/site_item/site_urls_data.service.ts | import {Injectable} from "@angular/core";
import {UrlsCollection} from "../../../../both/collections/urls.collection";
import {Urls} from "../../../../both/models/urls.model";
import {PagesCollection} from "../../../../both/collections/pages.collection";
@Injectable()
export class UrlsDataService {
public static ... |
nsected/simple-crawler-frontend | client/imports/app/add_site/add_site.component.ts | import {Component, OnDestroy, OnInit} from "@angular/core";
import template from "./add_site.component.html";
import style from "./add_site.component.scss";
import {Sites} from "../../../../both/models/sites.model";
import {SiteItemDataService} from "./add_site_data_service";
import {SitesCollection} from "../../../../... |
nsected/simple-crawler-frontend | server/imports/server-main/main.ts | import {PagesCollection} from "../../../both/collections/pages.collection";
export class Main {
start(): void {
console.log('started');
}
}
|
nsected/simple-crawler-frontend | client/imports/app/site_item/site_item_data.service.ts | import {Injectable} from "@angular/core";
import {SitesCollection} from "../../../../both/collections/sites.collection";
import {Site} from "../../../../both/models/site.model";
@Injectable()
export class SiteItemDataService {
constructor() {
}
public static getSite(id: number): Site {
let data: S... |
nsected/simple-crawler-frontend | both/collections/urls.collection.ts | import {MongoObservable} from "meteor-rxjs";
import {Url} from "../models/url.model";
export const UrlsCollection = new MongoObservable.Collection<Url>("urls");
if (Meteor.isServer) {
Meteor.publish('urls', function (site, update_date) {
return UrlsCollection.find({
"site": site,
... |
nsected/simple-crawler-frontend | client/imports/app/graph/graph.component.ts | <reponame>nsected/simple-crawler-frontend
import {Component, Input, OnInit, ViewEncapsulation} from "@angular/core";
import template from "./graph.component.html";
import style from "./graph.component.scss";
import {Url} from "../../../../both/models/url.model";
import {ObservableCursor} from "meteor-rxjs";
import * as... |
nsected/simple-crawler-frontend | client/imports/app/not_found/not_found.component.ts | import { Component, OnInit } from "@angular/core";
import template from "./not_found.component.html";
import style from "./not_found.component.scss";
@Component({
selector: "not_found",
template,
styles: [ style ]
})
export class NotFoundComponent implements OnInit {
ngOnInit() {
}
}
|
lvonnied/Dsy_ChallengeTask | backend/routes/index-routes.ts | <reponame>lvonnied/Dsy_ChallengeTask<filename>backend/routes/index-routes.ts
import express from 'express';
const router = express.Router();
import {indexController} from '../controller/index-controller';
router.get("/api", indexController.index);
router.get("/switchTheme", indexController.switchTheme);
router... |
lvonnied/Dsy_ChallengeTask | backend/services/database-connection.ts | import {Client, Query} from "ts-postgres"
import process from "process"
import dotenv from "dotenv"
["exit", "SIGINT", "SIGUSR1", "SIGUSR2", "uncaughtException", "SIGTERM"].forEach((eventType) => {
process.on(eventType, exitHandler.bind(null, eventType))
})
dotenv.config()
async function exitHandler(codeString: ... |
lvonnied/Dsy_ChallengeTask | backend/index.ts | <reponame>lvonnied/Dsy_ChallengeTask
import dotenv from "dotenv";
import express from "express";
import {indexRoutes} from "./routes/index-routes";
import bodyParser from 'body-parser';
(async () => {
// load config-file
dotenv.config({path: `.env${process.env.NODE_ENV ? `-${process.env.NODE_ENV}` : ''}`});
... |
lvonnied/Dsy_ChallengeTask | backend/controller/index-controller.ts | <filename>backend/controller/index-controller.ts
import {Response} from "express";
import {toDoStore} from "../services/todo-store";
export class IndexController {
index = async (req:any, res:Response) => {
// TODO change to true
let todos = await toDoStore.all(false);
res.json({todo... |
lvonnied/Dsy_ChallengeTask | backend/services/todo-store.ts | <reponame>lvonnied/Dsy_ChallengeTask
import { dataBase } from "./database-connection";
export class ToDo {
constructor(
public id: number,
public due: Date,
public created: Date,
public title: string,
public importance: number,
public completion: boolean,
public de... |
srireskianita/Project-UKI-Angular | ang-node/src/app/employee-add/employee-add.component.ts | import { Component, OnInit, Input } from '@angular/core';
import { RestService } from '../rest.service';
import { ActivatedRoute, Router } from '@angular/router';
@Component({
selector: 'app-employee-add',
templateUrl: './employee-add.component.html',
styleUrls: ['./employee-add.component.css']
})
export class E... |
srireskianita/Project-UKI-Angular | ang-node/src/app/app.module.ts | <filename>ang-node/src/app/app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpClientModule } from '@angular/common/http';
import { AppComponent } from './app.component';
import { EmployeeComponent } from './employee/employee.component';
impor... |
srireskianita/Project-UKI-Angular | ang-node/src/app/rest.service.ts | import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders, HttpErrorResponse } from '@angular/common/http';
import { Observable, of } from 'rxjs';
import { map, catchError, tap } from 'rxjs/operators';
@Injectable({
providedIn: 'root'
})
export class RestService {
constructor(private http: Htt... |
srireskianita/Project-UKI-Angular | ang-node/src/app/employee-edit/employee-edit.component.ts | import { Component, OnInit, Input } from '@angular/core';
import { RestService } from '../rest.service';
import { ActivatedRoute, Router } from '@angular/router';
@Component({
selector: 'app-employee-edit',
templateUrl: './employee-edit.component.html',
styleUrls: ['./employee-edit.component.css']
})
export cla... |
zblash/apple-collect-app | src/components/apple/dropable-apple.tsx | import React from "react";
import usePathSize from "../../utils/hooks/path-size";
import useInterval from "../../utils/hooks/interval";
import { useDispatch } from "react-redux";
import { UIHelper, PositionProps } from "../../utils/helpers/ui-helper";
import Apple from "./apple";
import { AppActions } from "../../redux... |
zblash/apple-collect-app | src/components/apple/basket-item.tsx | import React from "react";
import usePathSize from "../../utils/hooks/path-size";
import Apple from "./apple";
import { UIHelper } from "../../utils/helpers/ui-helper";
// Basket Apple will appear at basket
export default function BasketApple() {
const firstRender = React.useRef(false);
const [style, setStyle] =
... |
zblash/apple-collect-app | src/components/index.tsx | import React from "react";
import { useSelector } from "react-redux";
import { AppStoreState } from "../redux/reducers/app-reducer";
import Button from "./button";
import Tree from "./tree";
import Basket from "./basket";
import DropableApple from "./apple/dropable-apple";
import usePathSize from "../utils/hooks/path-s... |
zblash/apple-collect-app | src/components/basket.tsx | <filename>src/components/basket.tsx
import React from "react";
import BasketSvg from "../assets/img/basket.svg";
import { useSelector } from "react-redux";
import { AppStoreState } from "../redux/reducers/app-reducer";
import useWindowSize from "../utils/hooks/window-size";
export default function Basket() {
const b... |
zblash/apple-collect-app | src/components/apple/apple.tsx | import React from "react";
import AppleSvg from "../../assets/img/apple.svg";
import useWindowSize from "../../utils/hooks/window-size";
export interface AppleProps {
style: { top: string; left: string; zIndex?: number };
}
//Base Apple Component
export default function Apple({ style }: AppleProps) {
const { widt... |
zblash/apple-collect-app | src/redux/store/store.ts | import { createStore } from "redux";
import appReducer from "../reducers/app-reducer";
export const appStore = createStore(appReducer);
|
zblash/apple-collect-app | src/components/button.tsx | <filename>src/components/button.tsx<gh_stars>0
import React from "react";
import { useDispatch, useSelector } from "react-redux";
import { AppStoreState } from "../redux/reducers/app-reducer";
import { AppActions } from "../redux/actions/appActions";
export default function Button() {
const dispatch = useDispatch();
... |
zblash/apple-collect-app | src/redux/reducers/app-reducer.ts | <reponame>zblash/apple-collect-app<gh_stars>0
import { UIHelper } from "../../utils/helpers/ui-helper";
export interface AppStoreState {
droppingAppleList: string[];
isTreeShaking: boolean;
isAppleDroping: boolean;
basketItemList: string[];
}
const initialState: AppStoreState = {
droppingAppleList: [],
is... |
zblash/apple-collect-app | src/components/tree.tsx | <gh_stars>0
import React from "react";
import TreeSvg from "../assets/img/tree.svg";
import { useSelector, useDispatch } from "react-redux";
import { AppStoreState } from "../redux/reducers/app-reducer";
import useWindowSize from "../utils/hooks/window-size";
import { UIHelper } from "../utils/helpers/ui-helper";
impor... |
zblash/apple-collect-app | src/utils/hooks/path-size.tsx | <filename>src/utils/hooks/path-size.tsx
import React from "react";
import { UIHelper, PositionProps } from "../helpers/ui-helper";
import useWindowSize from "./window-size";
interface PathSizeProps {
pathSelectors: string[];
}
export default function usePathSize({ pathSelectors }: PathSizeProps) {
const [pathSize... |
zblash/apple-collect-app | src/redux/actions/appActions.ts | export const AppActions = (function () {
function dropApples(appleCount: number) {
return {
type: "dropApple",
payload: appleCount,
};
}
function shakeTree() {
return {
type: "shakeTree",
};
}
function appleDropped(id: string) {
return {
type: "appleDropped",
... |
zblash/apple-collect-app | src/utils/helpers/ui-helper.tsx | <reponame>zblash/apple-collect-app
export interface PositionProps {
top: number;
bottom: number;
left: number;
right: number;
}
export const UIHelper = (function () {
function findPathPos(pathSelector) {
const element = document.querySelector(pathSelector);
const elementRect = element.getBoundingClie... |
zblash/apple-collect-app | src/App.tsx | <filename>src/App.tsx
import * as React from "react";
import { hot } from "react-hot-loader";
import "./assets/scss/App.scss";
import { Provider } from "react-redux";
import { appStore } from "./redux/store/store";
import Index from "./components";
class App extends React.Component<Record<string, unknown>, undefined> ... |
ridvanaltun/react-native-metadata | src/index.tsx | import { NativeModules } from 'react-native';
type MetadataType = {
signingSignature: undefined | string;
shortVersion: string;
version: string;
packageName: undefined | string;
bundleIdentifier: undefined | string;
bundleName: undefined | string;
};
const { Metadata } = NativeModules;
export default Met... |
ridvanaltun/react-native-metadata | example/src/App.tsx | import React from 'react';
import { StyleSheet, View, Text, Platform } from 'react-native';
import Metadata from 'react-native-metadata';
export default function App() {
const isIOS = Platform.OS === 'ios';
const {
signingSignature,
version,
shortVersion,
packageName,
bundleIdentifier,
bu... |
pheihuihui/diaries | src/content/webgl_utils/others.ts | declare global {
interface Window {
gl_program: WebGLProgram
g_last: number
}
}
export function createShaderProgram(gl: WebGL2RenderingContext, vshader: string, fshader: string) {
let vertexShader = loadShader(gl, gl.VERTEX_SHADER, vshader)
let fragmentShader = loadShader(gl, gl.FRAGMEN... |
pheihuihui/diaries | src/content/simplecube/index.ts | import { Matrix4 } from "../webgl_utils/matrix"
import { initShader } from "../webgl_utils/others"
function initVertexBuffers(gl: WebGL2RenderingContext) {
let vertices = new Float32Array([ // Vertex coordinates
1.0, 1.0, 1.0, -1.0, 1.0, 1.0, -1.0, -1.0, 1.0, 1.0, -1.0, 1.0, // v0-v1-v2-v3 front
... |
pheihuihui/diaries | src/content/webgl_utils/matrix.ts | export class Matrix4 {
elements: Float32Array
printElements() {
[0, 1, 2, 3].forEach(v => {
let line = [v, v + 4, v + 8, v + 12].map(u => this.elements[u])
console.log(line)
})
}
constructor(matrix?: number[]) {
if (matrix) {
let arr = new Fl... |
pheihuihui/diaries | src/content/hello/index.ts | let div = document.createElement('div')
div.innerText = 'hello'
document.body.appendChild(div)
export { } |
pheihuihui/diaries | src/content/tests/matrix_test.ts | <gh_stars>1-10
import { Matrix4 } from "../webgl_utils/matrix";
let mat = new Matrix4([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16])
let mat2 = new Matrix4([1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16])
mat.multiply(mat2)
mat.printElements()
mat.setIdentity()
mat.printElements() |
pheihuihui/diaries | src/content/triangle/index.ts | import { Matrix4 } from "../webgl_utils/matrix";
import { initShader } from "../webgl_utils/others"
const ANGLE_STEP = 45.0
function initVertexBuffers(gl: WebGL2RenderingContext) {
let vertices = new Float32Array([0, 0.5, -0.5, -0.5, 0.5, -0.5])
let n = 3
let vertexBuffer = gl.createBuffer()
if (!ver... |
pheihuihui/diaries | src/index.ts | fetch('./table.txt')
.then(x => x.text())
.then(x => {
let titles = x.split(', ')
titles.forEach(v => {
createLink(v)
})
})
function createLink(str: string) {
let ele = document.createElement('a')
let txt = document.createTextNode(str)
ele.appendChild(txt)
... |
pheihuihui/diaries | build/shared/common.ts | import { build } from 'esbuild'
import { copyFile, readdir, stat, statSync, readdirSync, mkdirSync } from 'fs-extra'
const content_dir = './src/content'
const resource_dir = './src/resources'
const resource_static_types = ['txt', 'glsl', 'html', 'css', 'ico', 'png', 'gif', 'frag', 'vert']
const resource_dynamic_types ... |
pheihuihui/diaries | build/simplecube.ts | import { buildProject } from "./shared/common";
buildProject('simplecube') |
orlandoojr1/wave | ui/src/tags.tsx | <filename>ui/src/tags.tsx<gh_stars>1-10
// Copyright 2020 H2O.ai, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless re... |
orlandoojr1/wave | ui/src/message_bar.tsx | // Copyright 2020 H2O.ai, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in... |
orlandoojr1/wave | tools/vscode-extension/client/src/extension.ts | /* -------------------------------------------------------------------------
* Original work Copyright (c) Microsoft Corporation. All rights reserved.
* Original work licensed under the MIT License.
* See ThirdPartyNotices.txt in the project root for license information.
* All modifications Copyright (c) Open Law L... |
orlandoojr1/wave | ui/src/notification_bar.tsx | <reponame>orlandoojr1/wave<filename>ui/src/notification_bar.tsx<gh_stars>1-10
// Copyright 2020 H2O.ai, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.or... |
orlandoojr1/wave | ui/src/notification_bar.test.tsx | <gh_stars>1-10
// Copyright 2020 H2O.ai, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law ... |
blockchainhelppro/Telegram-API-Integration- | position-management.ts | /// <reference path="../common/models.ts" />
/// <reference path="../common/messaging.ts" />
/// <reference path="config.ts" />
/// <reference path="utils.ts" />
/// <reference path="statistics.ts"/>
/// <reference path="persister.ts"/>
/// <reference path="fair-value.ts"/>
/// <reference path="interfaces.ts"/>
/// <re... |
blockchainhelppro/Telegram-API-Integration- | promises.ts | <reponame>blockchainhelppro/Telegram-API-Integration-
export function timeout<T>(ms: number, promise: Promise<T>) : Promise<T> {
return new Promise(function (resolve, reject) {
promise.then(resolve);
setTimeout(function () {
reject(new Error('Timeout after '+ms+' ms')); // (A)
},... |
blockchainhelppro/Telegram-API-Integration- | logging.ts | <filename>logging.ts
import bunyan = require("bunyan");
import * as _ from "lodash";
export default function log(name: string) : bunyan {
// don't log while testing
const isRunFromMocha = process.argv.length >= 2 && _.includes(process.argv[1], "mocha");
if (isRunFromMocha) {
return bunyan.createLog... |
blockchainhelppro/Telegram-API-Integration- | messaging.ts | <gh_stars>0
/// <reference path="models.ts" />
import Models = require("./models");
module Prefixes {
export var SUBSCRIBE = "u";
export var SNAPSHOT = "n";
export var MESSAGE = "m";
}
export interface IPublish<T> {
publish : (msg : T) => void;
registerSnapshot : (generator : () => T[]) => IPubli... |
blockchainhelppro/Telegram-API-Integration- | active-state.ts | /// <reference path="../common/models.ts" />
/// <reference path="../common/messaging.ts" />
/// <reference path="config.ts" />
/// <reference path="utils.ts" />
/// <reference path="interfaces.ts"/>
import Config = require("./config");
import Models = require("../common/models");
import Messaging = require("../common... |
blockchainhelppro/Telegram-API-Integration- | helpers.ts | /// <reference path="../../common/models.ts" />
import Models = require("../../common/models");
export class GeneratedQuote {
constructor(public bidPx: number, public bidSz: number, public askPx: number, public askSz: number) { }
}
export class QuoteInput {
constructor(
public market: Models.Market, ... |
blockchainhelppro/Telegram-API-Integration- | statistics.ts | ///<reference path="utils.ts"/>
///<reference path="interfaces.ts"/>
///<reference path="fair-value.ts"/>
import Utils = require("./utils");
import Interfaces = require("./interfaces");
import FairValue = require("./fair-value");
import moment = require("moment");
import log from "./logging";
export interface IComput... |
blockchainhelppro/Telegram-API-Integration- | nullgw.ts | <gh_stars>0
/// <reference path="../utils.ts" />
/// <reference path="../../common/models.ts" />
///<reference path="../interfaces.ts"/>
import * as _ from "lodash";
import * as Q from "q";
import Models = require("../../common/models");
import Utils = require("../utils");
import Interfaces = require("../interfaces");... |
blockchainhelppro/Telegram-API-Integration- | websocket.ts | import * as ws from "ws";
import * as Util from "./utils";
import * as Models from "../common/models";
import * as bunyan from "bunyan";
import * as moment from "moment";
import log from "./logging";
export default class WebSocket {
private readonly _log : bunyan;
private _ws : ws = null;
constructor(priv... |
blockchainhelppro/Telegram-API-Integration- | main.ts | /// <reference path="../common/models.ts" />
/// <reference path="../common/messaging.ts" />
/// <reference path="broker.ts"/>
/// <reference path="active-state.ts"/>
/// <reference path="backtest.ts"/>
/// <reference path="config.ts"/>
/// <reference path="fair-value.ts"/>
/// <reference path="interfaces.ts"/>
/// <re... |
blockchainhelppro/Telegram-API-Integration- | utils.ts | <gh_stars>0
import Models = require("../common/models");
import moment = require('moment');
import events = require("events");
import util = require("util");
import _ = require("lodash");
import * as request from "request";
import * as Q from "q";
require('events').EventEmitter.prototype._maxListeners = 100;
export c... |
blockchainhelppro/Telegram-API-Integration- | interfaces.ts | /// <reference path="../common/models.ts" />
/// <reference path="../common/messaging.ts" />
/// <reference path="utils.ts"/>
import Utils = require("./utils");
import Models = require("../common/models");
import Messaging = require("../common/messaging");
import q = require("q");
export interface IExchangeDetailsGat... |
blockchainhelppro/Telegram-API-Integration- | okcoin.ts | /// <reference path="../utils.ts" />
/// <reference path="../../common/models.ts" />
/// <reference path="nullgw.ts" />
///<reference path="../interfaces.ts"/>
import ws = require('ws');
import Q = require("q");
import crypto = require("crypto");
import request = require("request");
import url = require("url");
import... |
blockchainhelppro/Telegram-API-Integration- | backtest.ts | <gh_stars>0
/// <reference path="../src/service/safety.ts" />
import assert = require("assert");
import Backtest = require("../src/service/backtest");
import Interfaces = require("../src/service/interfaces");
import Utils = require("../src/service/utils");
import Persister = require("../src/service/persister");
import... |
blockchainhelppro/Telegram-API-Integration- | coinbase.ts | <gh_stars>0
/// <reference path="../utils.ts" />
/// <reference path="../../common/models.ts" />
/// <reference path="nullgw.ts" />
///<reference path="../interfaces.ts"/>
import Config = require("../config");
import request = require('request');
import url = require("url");
import querystring = require("querystring")... |
blockchainhelppro/Telegram-API-Integration- | config.ts | /// <reference path="../common/models.ts" />
import Utils = require("./utils");
import _ = require("lodash");
import fs = require("fs");
import log from "./logging";
export interface IConfigProvider {
Has(configKey: string): boolean;
GetString(configKey: string): string;
GetBoolean(configKey: string): bo... |
blockchainhelppro/Telegram-API-Integration- | safety.ts | <filename>safety.ts
/// <reference path="../common/models.ts" />
/// <reference path="config.ts" />
/// <reference path="utils.ts" />
/// <reference path="broker.ts" />
/// <reference path="../common/messaging.ts" />
///<reference path="persister.ts"/>
import util = require("util");
import Config = require("./config")... |
blockchainhelppro/Telegram-API-Integration- | market-filtration.ts | <filename>market-filtration.ts
/// <reference path="../common/models.ts" />
/// <reference path="../common/messaging.ts" />
/// <reference path="config.ts" />
/// <reference path="utils.ts" />
/// <reference path="quoter.ts"/>
/// <reference path="interfaces.ts"/>
import Config = require("./config");
import Models = r... |
blockchainhelppro/Telegram-API-Integration- | persister.ts | <reponame>blockchainhelppro/Telegram-API-Integration-
/// <reference path="utils.ts" />
/// <reference path="../common/models.ts" />
/// <reference path="../common/messaging.ts" />
/// <reference path="interfaces.ts"/>
/// <reference path="config.ts"/>
import Models = require("../common/models");
import Messaging = re... |
blockchainhelppro/Telegram-API-Integration- | mid-market.ts | /// <reference path="../../common/models.ts" />
import StyleHelpers = require("./helpers");
import Models = require("../../common/models");
export class MidMarketQuoteStyle implements StyleHelpers.QuoteStyle {
Mode = Models.QuotingMode.Mid;
GenerateQuote = (input: StyleHelpers.QuoteInput) : StyleHelpers.... |
blockchainhelppro/Telegram-API-Integration- | depth.ts | <filename>depth.ts<gh_stars>0
/// <reference path="../../common/models.ts" />
import StyleHelpers = require("./helpers");
import Models = require("../../common/models");
export class DepthQuoteStyle implements StyleHelpers.QuoteStyle {
Mode = Models.QuotingMode.Depth;
GenerateQuote = (input: StyleHelp... |
blockchainhelppro/Telegram-API-Integration- | hitbtc.ts | /// <reference path="../utils.ts" />
/// <reference path="../../common/models.ts" />
/// <reference path="nullgw.ts" />
/// <reference path="../interfaces.ts"/>
import Config = require("../config");
import crypto = require('crypto');
import WebSocket from "../websocket";
import request = require('request');
import url... |
blockchainhelppro/Telegram-API-Integration- | quoting-parameters.ts | /// <reference path="../common/models.ts" />
/// <reference path="../common/messaging.ts" />
/// <reference path="config.ts" />
/// <reference path="utils.ts" />
/// <reference path="interfaces.ts"/>
import Models = require("../common/models");
import Interfaces = require("./interfaces");
import Messaging = require(".... |
blockchainhelppro/Telegram-API-Integration- | quote-sender.ts | <reponame>blockchainhelppro/Telegram-API-Integration-
/// <reference path="../common/models.ts" />
/// <reference path="../common/messaging.ts" />
/// <reference path="config.ts" />
/// <reference path="utils.ts" />
/// <reference path="utils.ts"/>
/// <reference path="quoter.ts"/>
/// <reference path="statistics.ts"/>... |
blockchainhelppro/Telegram-API-Integration- | fair-value.ts | <gh_stars>0
/// <reference path="../common/models.ts" />
/// <reference path="../common/messaging.ts" />
/// <reference path="config.ts" />
/// <reference path="utils.ts" />
/// <reference path="quoter.ts"/>
/// <reference path="safety.ts"/>
/// <reference path="persister.ts"/>
/// <reference path="statistics.ts"/>
///... |
blockchainhelppro/Telegram-API-Integration- | quoting-engine.ts | <gh_stars>0
/// <reference path="../common/models.ts" />
/// <reference path="../common/messaging.ts" />
/// <reference path="config.ts" />
/// <reference path="utils.ts" />
/// <reference path="interfaces.ts"/>
/// <reference path="quoter.ts"/>
/// <reference path="safety.ts"/>
/// <reference path="statistics.ts"/>
//... |
blockchainhelppro/Telegram-API-Integration- | models.ts | <reponame>blockchainhelppro/Telegram-API-Integration-<filename>models.ts
import * as _ from "lodash";
import * as moment from "moment"
export interface ITimestamped {
time : Date;
}
export class Timestamped<T> implements ITimestamped {
constructor(public data: T, public time: Date) {}
public toString() {... |
blockchainhelppro/Telegram-API-Integration- | coinbase-api.ts | <gh_stars>0
///<reference path="../utils.ts"/>
///<reference path="../../common/models.ts"/>
var util = require('util');
var crypto = require('crypto');
import Utils = require("../utils");
import _ = require('lodash');
import request = require('request');
import Models = require("../../common/models");
import moment ... |
blockchainhelppro/Telegram-API-Integration- | broker.ts | /// <reference path="utils.ts" />
/// <reference path="../common/models.ts" />
/// <reference path="../common/messaging.ts" />
/// <reference path="utils.ts"/>
/// <reference path="interfaces.ts"/>
/// <reference path="persister.ts"/>
/// <reference path="messages.ts"/>
import Models = require("../common/models");
imp... |
blockchainhelppro/Telegram-API-Integration- | top-join.ts | <filename>top-join.ts
/// <reference path="../../common/models.ts" />
import StyleHelpers = require("./helpers");
import Models = require("../../common/models");
export class TopOfTheMarketQuoteStyle implements StyleHelpers.QuoteStyle {
Mode = Models.QuotingMode.Top;
GenerateQuote = (input: StyleHelpers.... |
blockchainhelppro/Telegram-API-Integration- | style-registry.ts | <reponame>blockchainhelppro/Telegram-API-Integration-
/// <reference path="../../common/models.ts" />
import StyleHelpers = require("./helpers");
import Models = require("../../common/models");
import _ = require("lodash");
class NullQuoteGenerator implements StyleHelpers.QuoteStyle {
Mode = null;
GenerateQ... |
blockchainhelppro/Telegram-API-Integration- | web.ts | <reponame>blockchainhelppro/Telegram-API-Integration-<gh_stars>0
/// <reference path="utils.ts" />
/// <reference path="../common/models.ts" />
/// <reference path="../common/messaging.ts" />
///<reference path="persister.ts"/>
import Models = require("../common/models");
import Messaging = require("../common/messagin... |
blockchainhelppro/Telegram-API-Integration- | quoter.ts | <reponame>blockchainhelppro/Telegram-API-Integration-
/// <reference path="../common/models.ts" />
/// <reference path="config.ts" />
/// <reference path="utils.ts" />
///<reference path="interfaces.ts"/>
import * as moment from "moment";
import Config = require("./config");
import Models = require("../common/models")... |
blockchainhelppro/Telegram-API-Integration- | bitfinex.ts | /// <reference path="../utils.ts" />
/// <reference path="../../common/models.ts" />
/// <reference path="nullgw.ts" />
///<reference path="../config.ts"/>
///<reference path="../utils.ts"/>
///<reference path="../interfaces.ts"/>
import Q = require("q");
import crypto = require("crypto");
import request = require("re... |
blockchainhelppro/Telegram-API-Integration- | statistics_tests.ts | /// <reference path="../src/service/safety.ts" />
import assert = require("assert");
import Stats = require("../src/service/statistics");
import Moment = require("moment");
describe("EwmaStatisticCalculator", () => {
it("Should work", () => {
var input = [268.05, 258.73, 239.82, 250.21, 224.49, 242.53, 24... |
abhishek0392/hello-angular | src/app/user-dashboard/sidenav/sidenav.component.ts | import { Component, OnInit } from '@angular/core';
import { AppRoutes, GhLink } from '../../app.constants';
@Component({
selector: 'user-dash-sidenav',
templateUrl: './sidenav.component.html',
})
export class SidenavComponent implements OnInit {
AppRoutes = AppRoutes;
GhLink = GhLink;
constructor() { }
n... |
abhishek0392/hello-angular | src/app/user-dashboard/topnav/topnav.component.ts | import { Component, OnInit } from '@angular/core';
import { AppRoutes, GhLink } from '../../app.constants';
@Component({
selector: 'user-dash-topnav',
templateUrl: './topnav.component.html',
styles: [`
@media screen and (max-width: 991px) {
.navbar-brand {
width: unset !important;
... |
abhishek0392/hello-angular | src/app/register/register.component.ts | import { Component, OnInit } from '@angular/core';
import { AppRoutes} from '../app.constants';
import { Router } from '@angular/router';
@Component({
selector: 'app-register',
templateUrl: './register.component.html',
})
export class RegisterComponent implements OnInit {
AppRoutes = AppRoutes;
r = {
n... |
abhishek0392/hello-angular | src/app/app.routing.ts | import { NgModule } from '@angular/core';
import { Routes, RouterModule } from '@angular/router';
import { AppRoutes } from './app.constants';
import { LoginComponent } from './login/login.component';
import { UserDashboardComponent } from './user-dashboard/user-dashboard.component';
import { RegisterComponent } from '... |
abhishek0392/hello-angular | src/app/user-dashboard/user-dashboard.component.ts | <reponame>abhishek0392/hello-angular<gh_stars>0
import { Component, OnInit } from '@angular/core';
import { AppService } from '../app.service';
@Component({
selector: 'app-user-dashboard',
templateUrl: './user-dashboard.component.html',
styleUrls: ['./user-dashboard.component.css']
})
export class UserDashboardC... |
abhishek0392/hello-angular | src/app/app.module.ts | <reponame>abhishek0392/hello-angular
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { AppRoutingModule} from './app.routing'
import { AppComponent } from './app.component';
import { LoginComponent } from './login... |
abhishek0392/hello-angular | src/app/app.service.ts | import { Injectable } from '@angular/core';
import * as $ from 'jquery';
@Injectable({
providedIn: 'root'
})
export class AppService {
constructor() { }
carbonUtils() {
$(document).ready(function () {
/**
* Sidebar Dropdown
*/
$('.nav-dropdown-toggle').on('click', function (e) {
... |
abhishek0392/hello-angular | src/app/app.constants.ts | // const path for app routing (changeable)
export const AppRoutes = {
login: 'login',
register: 'register',
userDashboard: 'dashboard',
userExample1: 'example1',
userExample2: 'example2',
p404: '404',
p500: '500'
};
export const GhLink = 'https://github.com/fadziljusri/hello-angular'; |
abhishek0392/hello-angular | src/app/p500/p500.component.spec.ts | <gh_stars>0
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { P500Component } from './p500.component';
describe('P500Component', () => {
let component: P500Component;
let fixture: ComponentFixture<P500Component>;
beforeEach(async(() => {
TestBed.configureTestingModule({
... |
jun110/azure-angular-node-cosmosDb | client/src/main.ts | <reponame>jun110/azure-angular-node-cosmosDb
import { enableProdMode } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
import { ApplicationInsights } from '@microso... |
Huxiaoyu1992/react-ts | src/components/forward.tsx | import React, { MutableRefObject, useRef, useEffect, forwardRef, Ref } from 'react'
const Forward: React.FC = () => {
const ref = useRef() as MutableRefObject<any>
useEffect(() => {
ref.current.focus()
}, [])
return (
<>
<Child ref={ref} />
</>
)
}
const Child = forwardRef((props, ref: R... |
Huxiaoyu1992/react-ts | src/components/Hello.tsx | <gh_stars>0
import React, { useContext } from 'react'
import { ThemeContext } from '../App'
interface HelloProps {
message?: string
}
// FunctionComponent是react内置的一个interface
// FC是FunctionComponent的类型别名
const Hello: React.FC<HelloProps> = (props) => {
const theme = useContext(ThemeContext)
const style = {
co... |
Huxiaoyu1992/react-ts | src/components/MouseTracker.tsx | <reponame>Huxiaoyu1992/react-ts<filename>src/components/MouseTracker.tsx
import React, { useState, useEffect } from 'react'
const MouseTracker: React.FC = () => {
const [mouse, setMouse] = useState({ x: 0, y: 0 })
useEffect(() => {
console.log('add effect')
const updateMouse = (e: MouseEvent) => {
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.