code
stringlengths
3
1.05M
repo_name
stringlengths
4
116
path
stringlengths
4
991
language
stringclasses
9 values
license
stringclasses
15 values
size
int32
3
1.05M
/** * Anonymous class */ class A { a: any; constructor(a: number) { this.a = a; } } /** * Named class */ class B { a: any; b: any; constructor(a, b) { this.a = a; this.b = b; } } /** * Named class extension */ class C extends A { b: any; constructor(a, b) { super(a); this.b...
rehmsen/clutz
src/test/java/com/google/javascript/gents/singleTests/classes.ts
TypeScript
mit
766
/* * measured-elasticsearch * * Copyright (c) 2015 Maximilian Antoni <mail@maxantoni.de> * * @license MIT */ 'use strict'; exports.index = 'metrics-1970.01'; exports.timestamp = '1970-01-01T00:00:00.000Z'; function header(type) { return { index : { _type : type} }; } exports.headerCounter = heade...
mantoni/measured-elasticsearch.js
test/fixture/defaults.js
JavaScript
mit
510
/** * University of Campinas - Brazil * Institute of Computing * SED group * * date: February 2009 * */ package br.unicamp.ic.sed.mobilemedia.copyphoto.impl; import javax.microedition.lcdui.Command; import javax.microedition.lcdui.Display; import javax.microedition.lcdui.Displayable; import javax.microedition....
leotizzei/MobileMedia-Cosmos-VP-v6
src/br/unicamp/ic/sed/mobilemedia/copyphoto/impl/PhotoViewController.java
Java
mit
3,765
// generated by jwg -output misc/fixture/j/model_json.go misc/fixture/j; DO NOT EDIT package j import ( "encoding/json" ) // FooJSON is jsonized struct for Foo. type FooJSON struct { Tmp *Temp `json:"tmp,omitempty"` Bar `json:",omitempty"` *Buzz `json:",omitempty"` HogeJSON `json:",omitempty"` ...
favclip/jwg
misc/fixture/j/model_json.go
GO
mit
18,918
package station import ( "github.com/moryg/eve_analyst/apiqueue/ratelimit" "github.com/moryg/eve_analyst/database/station" "log" "net/http" ) func (r *request) execute() { ratelimit.Add() res, err := http.Get(r.url) ratelimit.Sub() if err != nil { log.Println("station.execute: " + err.Error()) return } ...
alesbolka/eve_analyst
apiqueue/requests/station/execution.go
GO
mit
540
a === b
PiotrDabkowski/pyjsparser
tests/pass/4263e76758123044.js
JavaScript
mit
7
const pug = require("pug"); const pugRuntimeWrap = require("pug-runtime/wrap"); const path = require("path"); const YAML = require("js-yaml"); const getCodeBlock = require("pug-code-block"); const detectIndent = require("detect-indent"); const rebaseIndent = require("rebase-indent"); const pugdocArguments = require("....
Aratramba/jade-doc
lib/parser.js
JavaScript
mit
8,383
module SimpleForm class FormBuilder < ActionView::Helpers::FormBuilder attr_reader :template, :object_name, :object, :wrapper # When action is create or update, we still should use new and edit ACTIONS = { :create => :new, :update => :edit } extend MapType include SimpleForm::Inp...
chandresh/simple_form
lib/simple_form/form_builder.rb
Ruby
mit
16,464
import zmq import datetime import pytz from django.core.management.base import BaseCommand, CommandError from django.conf import settings from registrations.models import Registration from registrations import handlers from registrations import tasks class Command(BaseCommand): def log(self, message): f...
greencoder/hopefullysunny-django
registrations/management/commands/registration_worker.py
Python
mit
1,481
module.exports.up=function(onSuccess,onFailed){ var dbo=new entity.Base(); dbo.saveToDB("recipe_drink",["recipe_code","drink_code","quantity","description"], [ ["3622","342",9.83,"1/3 shot Southern Comfort "], ["3622","315",9.83,"1/3 shot Grand Marnier "], ["3622","375",9.83,"1/3 shot Amaretto "], ["362...
stelee/barobotic
js/migration/db5.js
JavaScript
mit
331,574
import Ember from 'ember'; export default Ember.Component.extend({ tagName: 'img', attributeBindings: ['src'], height: 100, width: 100, backgroundColor: 'aaa', textColor: '555', format: undefined, // gif, jpg, jpeg, png text: undefined, src: Ember.computed('height', 'width', 'backgroundColor', 'textColor'...
adamsrog/ember-cli-placeholdit
app/components/placehold-it.js
JavaScript
mit
791
import database from "../api/database"; import * as types from "../actions/ActionTypes" const receiveAspects = aspects => ({ type: types.GET_COMMON_ASPECTS, aspects }); export const getCommonAspects = () => dispatch => { database.getCommonAspects(aspects => { dispatch(receiveAspects(aspects)) }) }; expo...
ievgenen/workingstats
admin/app/assets/javascripts/actions/index.js
JavaScript
mit
382
var https = require('https'), q = require('q'), cache = require('./cache').cache; var API_KEY = process.env.TF_MEETUP_API_KEY; var fetch_events = function () { var deferred = q.defer(); var options = { host: 'api.meetup.com', path: '/2/events?&sign=true&photo-host=public&group_urlname=GOTO-Night-Sto...
triforkse/trifork.se
lib/meetup.js
JavaScript
mit
834
using System; namespace monomart.Models.Domain { public class MM_GetBrand { public virtual int id { get; set; } public virtual string name { get; set; } } }
darkoverlordofdata/monomart
monomart/Models/Domain/MM_GetBrand.cs
C#
mit
179
// <copyright file="DataTypeDefinitionMappingRegistrar.cs" company="Logikfabrik"> // Copyright (c) 2016 anton(at)logikfabrik.se. Licensed under the MIT license. // </copyright> namespace Logikfabrik.Umbraco.Jet.Mappings { using System; /// <summary> /// The <see cref="DataTypeDefinitionMappingRegistrar...
aarym/uJet
src/Logikfabrik.Umbraco.Jet/Mappings/DataTypeDefinitionMappingRegistrar.cs
C#
mit
1,637
import java.util.Scanner; public class BinarySearch { public static int binarySearch(int arr[], int num, int startIndex, int endIndex) { if (startIndex > endIndex) { return -1; } int mid = startIndex + (endIndex - startIndex) / 2; if (num == arr[mid]) { return mid; } else if (num > arr[mid]) { ...
CodersForLife/Data-Structures-Algorithms
Searching/BinarySearch.java
Java
mit
932
package com.docuware.dev.schema._public.services.platform; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlType; @XmlType(name = "SortDirection") @XmlEnum public enum SortDirection { @XmlEnumValue("Default") DEFAULT("Default"), ...
dgautier/PlatformJavaClient
src/main/java/com/docuware/dev/schema/_public/services/platform/SortDirection.java
Java
mit
808
/* globals Ember, require */ (function() { var _Ember; var id = 0; var dateKey = new Date().getTime(); if (typeof Ember !== 'undefined') { _Ember = Ember; } else { _Ember = require('ember').default; } function symbol() { return '__ember' + dateKey + id++; } function UNDEFINED() {} f...
thoov/ember-weakmap
vendor/ember-weakmap-polyfill.js
JavaScript
mit
2,616
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace VaiFundos { class Program { static void Main(string[] args) { GerenciadorCliente gerenciador = new GerenciadorCliente(); FundosEmDolar fundo_dol...
jescocard/VaiFundosUCL
VaiFundos/VaiFundos/Program.cs
C#
mit
15,664
<?php /** @var Illuminate\Pagination\LengthAwarePaginator $users */ ?> @section('header') <h1><i class="fa fa-fw fa-users"></i> {{ trans('auth::users.titles.users') }} <small>{{ trans('auth::users.titles.users-list') }}</small></h1> @endsection @section('content') <div class="box box-primary"> <div ...
ARCANESOFT/Auth
resources/views/admin/users/index.blade.php
PHP
mit
18,908
// The MIT License (MIT) // // Copyright (c) 2014-2017 Darrell Wright // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files( the "Software" ), to deal // in the Software without restriction, including without limitation the rights // to...
beached/nodepp_rfb
src/nodepp_rfb.cpp
C++
mit
18,856
import Resolver from 'ember/resolver'; var resolver = Resolver.create(); resolver.namespace = { modulePrefix: 'todo-app' }; export default resolver;
zhoulijoe/js_todo_app
tests/helpers/resolver.js
JavaScript
mit
154
<?php namespace HiFebriansyah\LaravelContentManager\Traits; use Form; use Illuminate\Support\MessageBag; use Carbon; use Session; trait Generator { public function generateForm($class, $columns, $model) { $lcm = $model->getConfigs(); $errors = Session::get('errors', new MessageBag()); ...
hifebriansyah/laravel-content-manager
src/Traits/Generator.php
PHP
mit
4,601
<?php namespace AppBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\Routing\Annotation\Route; /** * Weekly controller. * * @Route("/weekly") */ class WeeklyController extends Controller { /** * @Route("/", name="default") */ public function defa...
alexseif/myapp
src/AppBundle/Controller/WeeklyController.php
PHP
mit
765
/** * The MIT License * * Copyright (C) 2015 Asterios Raptis * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights to use, c...
lightblueseas/user-data
user-entities/src/main/java/de/alpharogroup/user/repositories/RelationPermissionsDao.java
Java
mit
1,582
<?php /** * Chronjob that will delete expired nonce tokens every hour * Author: Sneha Inguva * Date: 8-2-2014 */ require_once('../config.php'); require_once('../db/mysqldb.php'); $con = new mysqldb($db_settings1,false); $stmt = "Delete FROM nonce_values Where expiry_time <= CURRENT_TIMESTAMP"; $result = $con...
si74/peroozBackend
jobs/update_nonce.php
PHP
mit
339
#!/usr/bin/python from noisemapper.mapper import * #from collectors.lib import utils ### Define the object mapper and start mapping def main(): # utils.drop_privileges() mapper = NoiseMapper() mapper.run() if __name__ == "__main__": main()
dustlab/noisemapper
scripts/nmcollector.py
Python
mit
259
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Julas.Utils; using Julas.Utils.Collections; using Julas.Utils.Extensions; using TheArtOfDev.HtmlRen...
EMJK/Projekt_WTI_TIP
Client/ConversationForm.cs
C#
mit
8,027
/* * PokeDat - A Pokemon Data API. * Copyright (C) 2015 * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, ...
Kaioru/PokeDat
PokeDat-Data/src/main/java/io/github/kaioru/species/SpeciesLearnset.java
Java
mit
1,388
export { default } from './ui' export * from './ui.selectors' export * from './tabs'
Trampss/kriya
examples/redux/ui/index.js
JavaScript
mit
85
<?php /* * This File is part of the Lucid\Common\Tests\Struct package * * (c) iwyg <mail@thomas-appel.com> * * For full copyright and license information, please refer to the LICENSE file * that was distributed with this package. */ namespace Lucid\Common\Tests\Struct; use Lucid\Common\Struct\Items; /** * @...
iwyg/common
tests/Struct/ItemsTest.php
PHP
mit
2,769
<input type="hidden" id="permission" value="<?php echo $permission;?>"> <section class="content"> <div class="row"> <div class="col-xs-12"> <div class="box"> <div class="box-header"> <h3 class="box-title">Usuarios</h3> <?php if (strpos($permission,'Add') !== false) { ...
sergiojaviermoyano/sideli
application/views/users/list.php
PHP
mit
6,178
using System; using System.Diagnostics.CodeAnalysis; namespace Delimited.Data.Exceptions { [Serializable, ExcludeFromCodeCoverage] public class DelimitedReaderException : Exception { // // For guidelines regarding the creation of new exception types, see // http://msdn.microsoft.com/library/default.asp?ur...
putridparrot/Delimited.Data
Delimited.Data/Exceptions/DelimitedReaderException.cs
C#
mit
904
import numpy as np from numpy import cumsum, sum, searchsorted from numpy.random import rand import math import utils import core.sentence as sentence import core.markovchain as mc import logging logger = logging.getLogger(__name__) # Dialogue making class. Need to review where to return a string, where to return a l...
dcorney/text-generation
core/dialogue.py
Python
mit
5,911
/* Credits: Most of the original code seems to have been written by George Michael Brower. The changes I've made include adding background particle animations, text placement and modification, and integration with a sparkfun heart rate monitor by using Pubnub and johnny-five. INSTRUCTIONS ...
mattchiang-gsp/mattchiang-gsp.github.io
FizzyText.js
JavaScript
mit
12,644
# encoding: utf-8 # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::Network::Mgmt::V2020_08_01 module Models # # Response for ApplicationGatewayBackendHealth API service call. # class Applicat...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2020-08-01/generated/azure_mgmt_network/models/application_gateway_backend_health.rb
Ruby
mit
1,726
define("resolver", [], function() { "use strict"; /* * This module defines a subclass of Ember.DefaultResolver that adds two * important features: * * 1) The resolver makes the container aware of es6 modules via the AMD * output. The loader's _seen is consulted so that classes can be *...
bmac/aircheck
vendor/resolver.js
JavaScript
mit
3,757
package billing; import cuke4duke.Then; import cuke4duke.Given; import static org.junit.Assert.assertTrue; public class CalledSteps { private boolean magic; @Given("^it is (.*)$") public void itIs(String what) { if(what.equals("magic")) { magic = true; } } @Then("^mag...
torbjornvatn/cuke4duke
examples/guice/src/test/java/billing/CalledSteps.java
Java
mit
413
# encoding: utf-8 # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::CognitiveServices::ContentModerator::V1_0 module Models # # Detected SSN details. # class SSN include MsRestAzure ...
Azure/azure-sdk-for-ruby
data/azure_cognitiveservices_contentmoderator/lib/1.0/generated/azure_cognitiveservices_contentmoderator/models/ssn.rb
Ruby
mit
1,419
(function() { 'use strict'; var express = require('express'); var path = require('path'); var logger = require('morgan'); var cookieParser = require('cookie-parser'); var bodyParser = require('body-parser'); var routes = require('./routes/index'); var app = express(); // view engine setup app.set('v...
akashpjames/Expenses-App
server/app.js
JavaScript
mit
886
#include "randomplayer.h" #include <QDirIterator> void RandomPlayer::start() { this->setMedia(QUrl::fromLocalFile(fileList.takeFirst())); this->play(); this->_readyToPlay = true; } void RandomPlayer::quitPlayMode() { this->_readyToPlay = false; this->stop(); } bool RandomPlayer::isPlayMode(){ ...
ArnaudBenassy/sono_manager
randomplayer.cpp
C++
mit
1,499
"use strict"; var C = function () { function C() { babelHelpers.classCallCheck(this, C); } babelHelpers.createClass(C, [{ key: "m", value: function m(x) { return 'a'; } }]); return C; }();
kedromelon/babel
packages/babel-plugin-transform-flow-strip-types/test/fixtures/regression/transformed-class-method-return-type-annotation/expected.js
JavaScript
mit
223
/** * The MIT License (MIT) * * Copyright (c) 2015 Vincent Vergnolle * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * t...
vincent7894/vas
vas-notification/src/main/java/org/vas/notification/NotificationWorker.java
Java
mit
2,998
/** @jsx jsx */ import { Transforms } from 'slate' import { jsx } from '../../..' export const run = editor => { Transforms.move(editor, { edge: 'start' }) } export const input = ( <editor> <block> one <anchor /> two t<focus /> hree </block> </editor> ) export const output = ( <editor...
ianstormtaylor/slate
packages/slate/test/transforms/move/start/expanded.tsx
TypeScript
mit
414
using UnityEngine; using System; using System.IO; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization.Formatters.Binary; // Emanuel Strömgren public class DebugTrackerVisualizer : MonoBehaviour { private BinaryFormatter m_Formatter = new BinaryFormatter(); private B...
Towkin/DravenklovaUnity
Assets/Dravenklova/Scripts/PawnScripts/PlayerScripts/DebugTrackerVisualizer.cs
C#
mit
2,459
# -*- coding: utf-8 -*- from django.contrib.admin import TabularInline from .models import GalleryPhoto class PhotoInline(TabularInline): """ Tabular inline that will be displayed in the gallery form during frontend editing or in the admin site. """ model = GalleryPhoto fk_name = "gallery"
izimobil/djangocms-unitegallery
djangocms_unitegallery/admin.py
Python
mit
318
// Copyright (c) 2015, Peter Mrekaj. All rights reserved. // Use of this source code is governed by a MIT-style // license that can be found in the LICENSE.txt file. // Package epiutil is an utility class with functions // common to all packages in the epi project. package epiutil import "math/rand" // RandStr retur...
mrekucci/epi
internal/epiutil/common.go
GO
mit
663
var assert = require('assert'); var fs = require('fs'); var requireFiles = require(__dirname + '/../lib/requireFiles'); var files = [ __dirname + '/moch/custom_test.txt', __dirname + '/moch/json_test.json', __dirname + '/moch/test.js' ]; describe('requireFiles testing', function(){ describe('Structure...
cranic/node-requi
test/requireFiles_test.js
JavaScript
mit
1,671
package com.reactnativeexample; import com.facebook.react.ReactActivity; import com.facebook.react.ReactPackage; import com.facebook.react.shell.MainReactPackage; import java.util.Arrays; import java.util.List; public class MainActivity extends ReactActivity { /** * Returns the name of the main component r...
attrs/webmodules
examples/react-native-web/android/app/src/main/java/com/reactnativeexample/MainActivity.java
Java
mit
1,050
/// <reference path="Global.ts" /> /// <reference path="Decks.ts" /> module ScrollsTypes { 'use strict'; export class DeckCards { cards:CardsAndStats[] = []; deck:Deck; constructor(deck:Deck) { this.deck = deck; this.update(); } update():void {...
darosh/scrolls-and-decks
client/types/DeckCards.ts
TypeScript
mit
1,991
class Admin::<%= file_name.classify.pluralize %>Controller < Admin::BaseController inherit_resources <% if options[:actions].present? %> actions <%= options[:actions].map {|a| ":#{a}"}.join(", ") %> <% else %> actions :all, except: [:show] <% end %> private def collection @<%= file_name.pluraliz...
kirs/admin-scaffolds
lib/generators/admin_resource/templates/controller.rb
Ruby
mit
393
package net.inpercima.runandfun.service; import static net.inpercima.runandfun.runkeeper.constants.RunkeeperConstants.ACTIVITIES_MEDIA; import static net.inpercima.runandfun.runkeeper.constants.RunkeeperConstants.ACTIVITIES_URL_PAGE_SIZE_ONE; import static net.inpercima.runandfun.runkeeper.constants.RunkeeperConstants...
inpercima/run-and-fun
server/src/main/java/net/inpercima/runandfun/service/ActivitiesService.java
Java
mit
7,790
export default function() { var links = [ { icon: "fa-sign-in", title: "Login", url: "/login" }, { icon: "fa-dashboard", title: "Dashboard", url: "/" }, { icon: "fa-calendar", titl...
dolfelt/scheduler-js
src/component/sidebar.js
JavaScript
mit
755
<?php /** * Pure-PHP implementation of SFTP. * * PHP version 5 * * Currently only supports SFTPv2 and v3, which, according to wikipedia.org, "is the most widely used version, * implemented by the popular OpenSSH SFTP server". If you want SFTPv4/5/6 support, provide me with access * to an SFTPv4/5/6 server. * ...
qrux/phputils
inc/phpseclib/Net/SFTP.php
PHP
mit
99,629
/* -------------------------------------------------------------------------------- Based on class found at: http://ai.stanford.edu/~gal/Code/FindMotifs/ -------------------------------------------------------------------------------- */ #include "Platform/StableHeaders.h" #include "Util/Helper/ConfigFile.h" ...
danielsefton/Dangine
Engine/Util/Helper/src/ConfigFile.cpp
C++
mit
4,492
# frozen_string_literal: true module Webdrone class MethodLogger < Module class << self attr_accessor :last_time, :screenshot end def initialize(methods = nil) super() @methods = methods end if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.7') def included(base) ...
a0/a0-webdrone-ruby
lib/webdrone/logg.rb
Ruby
mit
7,845
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. #if XR_MANAGEMENT_ENABLED using UnityEngine.XR.Management; #endif // XR_MANAGEMENT_ENABLED namespace Microsoft.MixedReality.Toolkit.Utilities { /// <summary> /// Utilities that abstract XR settings functionality so that the MRTK need ...
DDReaper/MixedRealityToolkit-Unity
Assets/MRTK/Core/Utilities/XRSettingsUtilities.cs
C#
mit
1,780
<?php namespace app\base; use Yii; use yii\base\Component; class MailService extends Component { public function init() { parent::init(); if ($this->_mail === null) { $this->_mail = Yii::$app->getMailer(); //$this->_mail->htmlLayout = Yii::getAlias($this->id . '/mail...
artkost/yii2-starter-kit
app/base/MailService.php
PHP
mit
876
using System; using Xamarin.Forms; namespace EmployeeApp { public partial class ClaimDetailPage : ContentPage { private ClaimViewModel model; public ClaimDetailPage(ClaimViewModel cl) { InitializeComponent(); model = cl; BindingContext =...
TBag/canviz
Mobile/EmployeeApp/EmployeeApp/EmployeeApp/Views/ClaimDetailPage.xaml.cs
C#
mit
3,471
/* Copyright (C) 2013-2015 MetaMorph Software, Inc Permission is hereby granted, free of charge, to any person obtaining a copy of this data, including any software or models in source or binary form, as well as any drawings, specifications, and documentation (collectively "the Data"), to deal in the Data withou...
pombredanne/metamorphosys-desktop
metamorphosys/META/src/CyPhyPrepareIFab/ComponentConfig.cs
C#
mit
3,987
package cellsociety_team05; public class SimulationException extends Exception { public SimulationException(String s) { super(s); } }
dpak96/CellSociety
src/cellsociety_team05/SimulationException.java
Java
mit
139
PhotoAlbums.Router.map(function() { this.resource('login'); this.resource('album', {path: '/:album_id'}); this.resource('photo', {path: 'photos/:photo_id'}); });
adamstegman/photo_albums
app/assets/javascripts/router.js
JavaScript
mit
168
from __future__ import annotations from collections import defaultdict from collections.abc import Generator, Iterable, Mapping, MutableMapping from contextlib import contextmanager import logging import re import textwrap from types import MappingProxyType from typing import TYPE_CHECKING, Any, NamedTuple from markd...
executablebooks/mdformat
src/mdformat/renderer/_context.py
Python
mit
22,558
<?php namespace App\Controllers; use App\Models\Queries\ArticleSQL; use App\Models\Queries\CategorieSQL; use Core\Language; use Core\View; use Core\Controller; use Helpers\Twig; use Helpers\Url; class Categories extends Controller { public function __construct() { parent::__construct(); } publi...
HelleboidQ/WordPress-en-mieux
app/Controllers/Categories.php
PHP
mit
1,507
package iron_hippo_exe import ( "fmt" "io" "net/http" "golang.org/x/oauth2" "golang.org/x/oauth2/google" "google.golang.org/appengine" "google.golang.org/appengine/log" "google.golang.org/appengine/urlfetch" ) const ProjectID = "cpb101demo1" type DataflowTemplatePostBody struct { JobName string `json:"...
sinmetal/iron-hippo
appengine/iron_hippo.go
GO
mit
1,489
import teca.utils as tecautils import teca.ConfigHandler as tecaconf import unittest class TestFileFilter(unittest.TestCase): def setUp(self): self.conf = tecaconf.ConfigHandler( "tests/test_data/configuration.json", {"starting_path": "tests/test_data/images"} ) self...
alfateam123/Teca
tests/test_utils.py
Python
mit
902
import { h, Component } from 'preact'; import moment from 'moment'; const MonthPicker = ({ onChange, ...props }) => ( <select onChange={onChange} id="select-month">{ optionsFor("month", props.date) }</select> ); const DayPicker = ({ onChange, ...props }) => ( <select onChange={onChange} id="select-date">{ options...
jc4p/natal-charts
app/src/components/DatePicker.js
JavaScript
mit
2,568
'use strict'; angular.module('users').factory('Permissions', ['Authentication', '$location', function(Authentication, $location) { // Permissions service logic // ... // Public API return { //check if user suits the right permissions for visiting the page, Otherwise go to 401 userRolesContains: functio...
hacor/gamwbras
public/modules/users/services/permissions.client.service.js
JavaScript
mit
1,228
import $ from 'jquery'; import keyboard from 'virtual-keyboard'; $.fn.addKeyboard = function () { return this.keyboard({ openOn: null, stayOpen: false, layout: 'custom', customLayout: { 'normal': ['7 8 9 {c}', '4 5 6 {del}', '1 2 3 {sign}', '0 0 {dec} {a}'], }, position: { // null...
kamillamagna/NMF_Tool
app/javascript/components/addKeyboard.js
JavaScript
mit
971
require 'nokogiri' require 'ostruct' require 'active_support/core_ext/string' require 'active_support/core_ext/date' module Lifebouy class MalformedRequestXml < StandardError def initialize(xml_errors) @xml_errors = xml_errors end def message "The request contains the following errors:\n\t#{...
reedswenson/lifebouy
lib/lifebouy/request_handler.rb
Ruby
mit
5,812
/** * Trait class */ function Trait(methods, allTraits) { allTraits = allTraits || []; this.traits = [methods]; var extraTraits = methods.$traits; if (extraTraits) { if (typeof extraTraits === "string") { extraTraits = extraTraits.replace(/ /g, '').split(','); }...
azproduction/node-jet
lib/plugins/app/lib/Trait.js
JavaScript
mit
1,059
import {Component, Input} from '@angular/core'; import {CORE_DIRECTIVES} from '@angular/common'; import {ROUTER_DIRECTIVES, Router} from '@angular/router-deprecated'; import {AuthService} from '../common/auth.service'; @Component({ selector: 'todo-navbar', templateUrl: 'app/navbar/navbar.component.html', direct...
Boychenko/sample-todo-2016
clients/angular2/app/navbar/navbar.component.ts
TypeScript
mit
889
'use strict'; /** * Module dependencies. */ var mongoose = require('mongoose'), Game = mongoose.model('Game'), Team = mongoose.model('Team'), Player = mongoose.model('Player'), async = require('async'); exports.all = function(req, res) { Game.find({'played': true}).exec(function(err, games) { if (err)...
javi7/epl-98
packages/custom/league/server/controllers/games.js
JavaScript
mit
9,754
package championpicker.console; import com.googlecode.lanterna.gui.*; import com.googlecode.lanterna.TerminalFacade; import com.googlecode.lanterna.terminal.Terminal; import com.googlecode.lanterna.terminal.TerminalSize; import com.googlecode.lanterna.terminal.swing.SwingTerminal; import com.googlecode.lanterna.gui....
DanielBoerlage/champion-picker
src/championpicker/console/mainMenu.java
Java
mit
1,150
(function(){ 'use strict'; angular.module('GamemasterApp') .controller('DashboardCtrl', function ($scope, $timeout, $mdSidenav, $http) { $scope.users = ['Fabio', 'Leonardo', 'Thomas', 'Gabriele', 'Fabrizio', 'John', 'Luis', 'Kate', 'Max']; }) })();
jswaldon/gamemaster
public/app/dashboard/dashboard.ctrl.js
JavaScript
mit
273
require 'byebug' module Vorm module Validatable class ValidationError def clear_all @errors = Hash.new { |k, v| k[v] = [] } end end end end class Valid include Vorm::Validatable def self.reset! @validators = nil end end describe Vorm::Validatable do before { Valid.reset! ...
vastus/vorm
spec/lib/vorm/validatable_spec.rb
Ruby
mit
3,216
module Embratel class PhoneBill attr_reader :payables def initialize(path) @payables = CSVParser.parse(path) end def calls @calls ||= payables.select(&:call?) end def fees @fees ||= payables.select(&:fee?) end def total @total ||= payables.inject(0) { |sum, ...
mpereira/embratel
lib/embratel/phone_bill.rb
Ruby
mit
374
const express = require('express'); const router = express.Router(); const routes = require('./routes')(router); module.exports = router;
abhaydgarg/Simplenote
api/v1/index.js
JavaScript
mit
139
package simulation.generators; import simulation.data.PetrolStation; import simulation.data.Road; /** * Created by user on 03.06.2017. */ public class PetrolStationGenerator { private Road road; private int minimalDistanceBetweenStations = 50; private int maximumDistanceBetweenStations = 200; priva...
MiszelHub/FuzzyDriverRefueling
Fuzzy-Driver/src/main/java/simulation/generators/PetrolStationGenerator.java
Java
mit
2,533
var HDWalletProvider = require("truffle-hdwallet-provider"); var mnemonic = "candy maple cake sugar pudding cream honey rich smooth crumble sweet treat"; module.exports = { networks: { development: { provider: function () { return new HDWalletProvider(mnemonic, "http://127.0.0.1...
manishbisht/Competitive-Programming
Hiring Challenges/Bosch/Blockchain Developer Hiring/Round 2/truffle.js
JavaScript
mit
484
var h = require('hyperscript') var human = require('human-time') exports.needs = {} exports.gives = 'message_meta' exports.create = function () { function updateTimestampEl(el) { el.firstChild.nodeValue = human(new Date(el.timestamp)) return el } setInterval(function () { var els = [].slice.call(...
cryptix/talebay
modules_basic/timestamp.js
JavaScript
mit
613
import { HookContext, Application, createContext, getServiceOptions } from '@feathersjs/feathers'; import { NotFound, MethodNotAllowed, BadRequest } from '@feathersjs/errors'; import { createDebug } from '@feathersjs/commons'; import isEqual from 'lodash/isEqual'; import { CombinedChannel } from '../channels/channel/co...
feathersjs/feathers
packages/transport-commons/src/socket/utils.ts
TypeScript
mit
3,996
version https://git-lfs.github.com/spec/v1 oid sha256:e40a08695f05163cfb0eaeeef4588fcfad55a6576cfadfb079505495605beb33 size 27133
yogeshsaroya/new-cdnjs
ajax/libs/fuelux/2.5.0/datepicker.js
JavaScript
mit
130
<?php class Thread extends Eloquent { public static $table = 'threads'; public static $timestamps = true; public function replies() { return $this->has_many('Reply'); } }
hassan-c/laravelapp
application/models/thread.php
PHP
mit
193
#!/usr/bin/env python from hdf5handler import HDF5Handler handler = HDF5Handler('mydata.hdf5') handler.open() for i in range(100): handler.put(i, 'numbers') handler.close()
iambernie/hdf5handler
examples/opening.py
Python
mit
183
/** * The MIT License (MIT) * * Copyright (c) 2015 Famous Industries Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights...
talves/famous-engine
src/webgl-geometries/primitives/Tetrahedron.js
JavaScript
mit
2,960
/* * Copyright 2016 Christoph Brill <egore911@gmail.com> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, ...
egore/libldt3-cs
libldt3/LdtReader.cs
C#
mit
18,803
var map; var bounds; var markers = {}; var cluster_polygons = {}; var zoomTimeout; var cluster_center_overlay; var white_overlay; var overlay_opacity = 50; var OPACITY_MAX_PIXELS = 57; var active_cluster_poly; var marker_image; var center_marker; var cluster_center_marker_icon; function createMap() { bounds = new ...
joonamo/photoplaces
photoplaces/static/script/map.js
JavaScript
mit
15,053
#include "sendcoinsdialog.h" #include "ui_sendcoinsdialog.h" #include "walletmodel.h" #include "bitcoinunits.h" #include "addressbookpage.h" #include "optionsmodel.h" #include "sendcoinsentry.h" #include "guiutil.h" #include "askpassphrasedialog.h" #include "base58.h" #include <QMessageBox> #include <QLocale> #include...
devxxxcoin/xxxcoin
src/qt/sendcoinsdialog.cpp
C++
mit
9,070
{!! Form::select( 'routes[]', $allRoutes, (isset($routes) ? array_keys($routes) : []), array( 'class' => 'form-control select2', 'placeholder' => 'Enter Routes', 'multiple' => true ) ) !!}
stevebauman/maintenance
resources/views/select/routes.blade.php
PHP
mit
273
<?php namespace Aquatic; use Aquatic\FedEx\Contract\Address; use Aquatic\FedEx\Contract\Shipment; use Aquatic\FedEx\Response\Contract as ResponseContract; use Aquatic\FedEx\Request\ValidateAddress as ValidateAddressRequest; use Aquatic\FedEx\Response\ValidateAddress as ValidateAddressResponse; use Aquatic\FedEx\Reque...
aquaticpond/fedex
src/Aquatic/FedEx.php
PHP
mit
1,667
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Pe...
d-georgiev-91/TelerikAcademy
Programming/HighQualityProgrammingCode/ConsoleApplication1/Pesho/Properties/AssemblyInfo.cs
C#
mit
1,346
import React, { Component } from 'react' import PropTypes from 'prop-types' import { MultiSelect } from '../../src' class MultiSelectWithStringValues extends Component { constructor(props) { super(props) this.state = { value: [] } } handleChange = (event) => { const { valueKey } = this.p...
sthomas1618/react-crane
stories/components/MultiSelectWithStringValues.js
JavaScript
mit
667
/* util/operators.hpp * * Copyright (C) 2007 Antonio Di Monaco * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. */ #ifndef __OPERATORS_HPP__ #define __OPERATORS_HPP__ template< typename T > struct EqualComparable { friend ...
becrux/xfspp
util/operators.hpp
C++
mit
700
""" [2015-07-13] Challenge #223 [Easy] Garland words https://www.reddit.com/r/dailyprogrammer/comments/3d4fwj/20150713_challenge_223_easy_garland_words/ # Description A [_garland word_](http://blog.vivekhaldar.com/post/89763722591/garland-words) is one that starts and ends with the same N letters in the same order, f...
DayGitH/Python-Challenges
DailyProgrammer/DP20150713A.py
Python
mit
1,597
/** * * Licensed Property to China UnionPay Co., Ltd. * * (C) Copyright of China UnionPay Co., Ltd. 2010 * All Rights Reserved. * * * Modification History: * ============================================================================= * Author Date Description * ------------ -----...
smjie2800/spring-cloud-microservice-redis-activemq-hibernate-mysql
microservice-provider-pay/src/main/java/com/boyuanitsm/pay/unionpay/config/SDKConstants.java
Java
mit
13,548
require 'faraday' require 'simple_ratings/foursquare/meta/venue' module SimpleRatings class Foursquare < Faraday::Connection def initialize super(url: 'https://api.foursquare.com/v2/') end def default_params { client_id: ENV['FOURSQUARE_CLIENT_ID'], client_secret: ENV['FOURSQ...
benastan/simple_ratings
lib/simple_ratings/foursquare.rb
Ruby
mit
918
using System; using System.Text; namespace ExifLibrary { /// <summary> /// Represents an enumerated value. /// </summary> public class ExifEnumProperty<T> : ExifProperty { protected T mValue; protected bool mIsBitField; protected override object _Value { get { return Value;...
ahzf/ExifLibrary
ExifLibrary/ExifExtendedProperty.cs
C#
mit
13,977
using System.Collections.Generic; using System.Threading.Tasks; using MongoDB.Bson; using MongoDB.Driver; using ShowFinder.Models; namespace ShowFinder.Repositories.Interfaces { public interface IMongoRepository { IMongoDatabase Database(string name); Task<BsonDocument> GetUserProfi...
YanivHaramati/ShowFinder
ShowFinder/Repositories/Interfaces/IMongoRepository.cs
C#
mit
1,257
/*! * Module dependencies. */ var util = require('util'), moment = require('moment'), super_ = require('../Type'); /** * Date FieldType Constructor * @extends Field * @api public */ function datearray(list, path, options) { this._nativeType = [Date]; this._defaultSize = 'medium'; this._underscoreMethods...
riyadhalnur/keystone
fields/types/datearray/DateArrayType.js
JavaScript
mit
3,038