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 |
|---|---|---|---|---|---|
package render
import (
"github.com/gin-gonic/gin"
)
/* ================================================================================
* Render 工具模块
* qq group: 582452342
* email : 2091938785@qq.com
* author : 美丽的地球啊 - mliu
* ================================================================================ ... | sanxia/ging | render/error.go | GO | mit | 601 |
/*
* _____ _ _ _ _____ _ _ _ _____ _ __ _____ _____
* / ___| | | | | | | |_ _| | | / / | | | ____| | | / / | ____| | _ \
* | | | | | | | | | | | | / / | | | |__ | | __ / / | |__ | |_| |
* | | _ | | | | |... | stormHan/gpu_rvd | Gpu_Rvd/header/thid_party/glut_viewer/glut_viewer_gui.cpp | C++ | mit | 25,552 |
<?php
/**
* Description of aSites
*
* @author almaz
*/
class aSitesUsers extends Action {
protected $defaultAct = 'List';
protected function configure() {
require_once $this->module->pathModels . 'as_Sites.php';
require_once $this->module->pathModels . 'as_SitesUsers.php';
$authModu... | AlmazKo/Brill | Brill/Modules/AutoSubmitter/Actions/aSitesUsers.php | PHP | mit | 4,519 |
package cz.muni.fi.pa165.mushrooms.service.exceptions;
/**
* @author bkompis
*/
public class EntityOperationServiceException extends MushroomHunterServiceDataAccessException {
public <T> EntityOperationServiceException(String what, String operation, T entity, Throwable e) {
super("Could not " + operatio... | PA165-MushroomHunter/MushroomHunter | service/src/main/java/cz/muni/fi/pa165/mushrooms/service/exceptions/EntityOperationServiceException.java | Java | mit | 563 |
#!/usr/bin/env python
import subprocess
import praw
from hashlib import sha1
from flask import Flask
from flask import Response
from flask import request
from cStringIO import StringIO
from base64 import b64encode
from base64 import b64decode
from ConfigParser import ConfigParser
import OAuth2Util
import os
import mar... | foobarbazblarg/stayclean | stayclean-2018-march/serve-signups-with-flask.py | Python | mit | 8,581 |
using System.Collections.Generic;
using JsonApiDotNetCore.Resources;
using JsonApiDotNetCore.Resources.Annotations;
using JsonApiDotNetCore.Serialization.Objects;
namespace JsonApiDotNetCore.Serialization.Building
{
/// <summary>
/// Responsible for converting resources into <see cref="ResourceObject" />s give... | Research-Institute/json-api-dotnet-core | src/JsonApiDotNetCore/Serialization/Building/IResourceObjectBuilder.cs | C# | mit | 1,337 |
'use strict';
var page = 'projects';
module.exports = {
renderPage: function(req, res) {
if (!req.user) {
res.redirect('/login');
} else {
res.render(page, {
helpers: {
activeClass: function(section) {
if (section === 'projects') {
return 'active';
... | bobholt/genealogists-friend | app/controllers/project.js | JavaScript | mit | 472 |
Search = function(data, input, result) {
this.data = data;
this.$input = $(input);
this.$result = $(result);
this.$current = null;
this.$view = this.$result.parent();
this.searcher = new Searcher(data.index);
this.init();
};
Search.prototype = $.extend({}, Navigation, new function() {
var suid = 1;
... | gadzorg/gorg_mail | doc/app/js/search.js | JavaScript | mit | 2,999 |
version https://git-lfs.github.com/spec/v1
oid sha256:505b4ccd47ed9526d0238c6f2d03a343ce476abc1c4aa79a9f22cabcbd0a3c16
size 12575
| yogeshsaroya/new-cdnjs | ajax/libs/require.js/0.22.0/require.min.js | JavaScript | mit | 130 |
#include "ConfirmationMenu.h"
ConfirmationMenu::ConfirmationMenu(CarrotQt5* mainClass, std::function<void(bool)> callback, const QString& text, const QString& yesLabel, const QString& noLabel)
: MenuScreen(mainClass), text(text) {
menuOptions.append(buildMenuItem([this, callback]() {
root->popState();... | soulweaver91/project-carrot | src/menu/ConfirmationMenu.cpp | C++ | mit | 1,509 |
/*
* Copyright 2014 Google Inc. All rights reserved.
*
* 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 applic... | ktg/openFood | src/main/java/uk/ac/nott/mrl/gles/program/GraphProgram.java | Java | mit | 5,077 |
package org.sfm.tuples;
public class Tuple20<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19, T20> extends Tuple19<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19> {
private final T20 element19;
public Tuple20(T1 element0, T2 element1,... | tsdl2013/SimpleFlatMapper | sfm/src/main/java/org/sfm/tuples/Tuple20.java | Java | mit | 3,155 |
<?php
$districts = array('Ampara', 'Anuradhapura', 'Badulla', 'Batticaloa', 'Colombo', 'Galle', 'Gampaha', 'Hambantota', 'Jaffna', 'Kaluthara', 'Kandy', 'Kilinochchi', 'Kegalle', 'Mannar', 'Matale', 'Matara', 'Monaragala', 'Mulattivu', 'Nuwaraeliya', 'Polonnaruwa', 'Rathnapura', 'Trincomalee', 'Vavuniya');
?>
<!DOCTY... | buddhiv/DatabaseProject | school_views/login.php | PHP | mit | 9,115 |
/*
* This file is part of ViaVersion - https://github.com/ViaVersion/ViaVersion
* Copyright (C) 2016-2021 ViaVersion and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, eith... | MylesIsCool/ViaVersion | common/src/main/java/com/viaversion/viaversion/protocols/protocol1_12_2to1_12_1/Protocol1_12_2To1_12_1.java | Java | mit | 2,084 |
<?php
/**
* @author "Michael Collette" <metrol@metrol.net>
* @package Metrol_Libs
* @version 2.0
* @copyright (c) 2014, Michael Collette
*/
namespace Metrol\HTML\Table;
/**
* Defines an HTML Table Foot Area
*/
class Foot extends Section
{
/**
*/
public function __construct()
{
parent::__construct(... | Metrol/Metrol | HTML/Table/Foot.php | PHP | mit | 364 |
import sys
sys.path.insert(0,'../')
from fast_guided_filter import blur
print("hello")
| justayak/fast_guided_filters | test/sample.py | Python | mit | 88 |
#include "core/bomberman.hpp"
#include "core/menu.hpp"
#include "core/screens.hpp"
#include "core/view.hpp"
#include "core/views/menu.hpp"
MenuView::MenuView(Screen *screen, Menu *menu)
: View(screen)
, menu(menu)
, clock(Timer::get(2))
{
}
MenuView::~MenuView()
{
delete this->menu;
}
void MenuView::... | kassisdion/Epitech_year_2 | bomberman/src/core/views/menu.cpp | C++ | mit | 1,035 |
///<reference src="js/tempus-dominus"/>
/*global $ */
tempusDominus.jQueryInterface = function (option, argument) {
if (this.length === 1) {
return tempusDominus.jQueryHandleThis(this, option, argument);
}
// "this" is jquery here
return this.each(function () {
tempusDominus.jQueryHandleThis(this, opti... | cdnjs/cdnjs | ajax/libs/tempus-dominus/6-alpha1/js/jQuery-provider.js | JavaScript | mit | 4,501 |
import { Pipe, PipeTransform } from '@angular/core';
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
@Pipe({
name: 'sanitizeHtml',
pure: false
})
export class SanitizerPipe implements PipeTransform {
constructor(private _sanitizer: DomSanitizer) {
}
transform(v: string): SafeH... | ultimate-comparisons/ultimate-comparison-BASE | src/app/components/pipes/sanitizer-pipe/sanitizer.pipe.ts | TypeScript | mit | 809 |
# from test_plus.test import TestCase
#
#
# class TestUser(TestCase):
#
# def setUp(self):
# self.user = self.make_user()
#
# def test__str__(self):
# self.assertEqual(
# self.user.__str__(),
# 'testuser' # This is the default username for self.make_user()
# )
#
... | Alex-Just/gymlog | gymlog/main/tests/test_models.py | Python | mit | 476 |
<?php
class WPML_ST_Track_Strings_Notice {
const NOTICE_ID = 'wpml-st-tracking-all-strings-as-english-notice';
const NOTICE_GROUP = 'wpml-st-strings-tracking';
/**
* @var WPML_Notices
*/
private $admin_notices;
public function __construct( WPML_Notices $admin_notices ) {
$this->admin_notices = $admin_not... | mandino/hotelmilosantabarbara.com | wp-content/plugins/wpml-string-translation/classes/notices/track-strings/wpml-st-track-strings-notice.php | PHP | mit | 1,629 |
using System;
using System.Xml.Serialization;
namespace EZOper.NetSiteUtilities.AopApi
{
/// <summary>
/// AlipayEbppPdeductSignValidateResponse.
/// </summary>
public class AlipayEbppPdeductSignValidateResponse : AopResponse
{
}
}
| erikzhouxin/CSharpSolution | NetSiteUtilities/AopApi/Response/AlipayEbppPdeductSignValidateResponse.cs | C# | mit | 257 |
import Telescope from 'meteor/nova:lib';
import Posts from "meteor/nova:posts";
import Comments from "meteor/nova:comments";
import Users from 'meteor/nova:users';
serveAPI = function(terms){
var posts = [];
var parameters = Posts.parameters.get(terms);
const postsCursor = Posts.find(parameters.selector, param... | trujunzhang/newspoliticl | packages/nova-api/lib/server/api.js | JavaScript | mit | 2,059 |
class ImportResult < ActiveRecord::Base
belongs_to :import
enum status: [ :starting, :running, :finishing, :finished, :stalled, :aborted ]
serialize :found_listing_keys
serialize :removed_listing_keys
serialize :snapshots
def found_count_difference
previous_run = self.import.import_results.where(['st... | arcticleo/reso_data_dictionary | app/models/import_result.rb | Ruby | mit | 507 |
package fr.pizzeria.exception;
public class StockageException extends Exception {
public StockageException() {
super();
}
public StockageException(String message, Throwable cause) {
super(message, cause);
}
public StockageException(String message) {
super(message);
}
public StockageException(Throwable... | lionelcollidor/dta-formation | apps/pizzeria-console-objet/pizzeria-dao/src/main/java/fr/pizzeria/exception/StockageException.java | Java | mit | 353 |
from rest_framework import serializers
from django.contrib.auth.models import User
from dixit.account.models import UserProfile
class UserProfileSerializer(serializers.ModelSerializer):
class Meta:
model = UserProfile
fields = ('name', )
class UserSerializer(serializers.ModelSerializer):
... | jminuscula/dixit-online | server/src/dixit/api/auth/serializers/user.py | Python | mit | 494 |
# == Schema Information
#
# Table name: tecnicos
#
# id :integer not null, primary key
# phone_number :string
# health_post_id :integer
# created_at :datetime not null
# updated_at :datetime not null
# name :string
#
class Tecnico < ActiveRecord::Base
in... | CUPeru/CUPeru | app/models/tecnico.rb | Ruby | mit | 432 |
using System;
using System.Collections.Generic;
namespace Paladino.Drawing
{
/// <summary>
/// The thumbnails class handles all thumbnails to different types of content
/// embedded in the core.
/// </summary>
public static class Thumbnails
{
#region Members
private static Dictionary<Guid,... | cnascimento/Paladino | Paladino/Drawing/Thumbnails.cs | C# | mit | 13,732 |
using System.Linq;
using UnityEditor;
using UnityEditor.Animations;
using UnityEngine;
namespace Framework.Editor
{
[CustomActionEditor(typeof(ActionAnimParam))]
public class ActionGraphEditorAnimParamNode : ActionGraphEditorNode
{
public ActionAnimParam Node => (ActionAnimParam) ActionNode;
... | MrJaqbq/Unity3DFramework | Editor/ActionGraph/ActionGraphEditorAnimParamNode.cs | C# | mit | 3,547 |
/**
* @author Vexatos
*/
@MethodsReturnNonnullByDefault
@ParametersAreNonnullByDefault
package vexatos.backpacks.backpack;
import mcp.MethodsReturnNonnullByDefault;
import javax.annotation.ParametersAreNonnullByDefault;
| Vexatos/ForecastersBackpacks | src/main/java/vexatos/backpacks/backpack/package-info.java | Java | mit | 225 |
import React from 'react';
import Helmet from 'react-helmet';
import { Route } from '../../core/router';
import { Model as Waste } from '../../entities/Waste';
import { Deferred } from '../../util/utils';
import NavLink from '../../components/NavLink';
import Progress from 'react-progress-2';
import { PageHeader, Row, ... | ryrudnev/dss-wm | app/routes/waste/ShowRoute.js | JavaScript | mit | 2,612 |
var basePaths = {
src: 'public/',
dest: 'public.dist/',
bower: 'bower_components/'
};
var paths = {
images: {
src: basePaths.src + 'images/',
dest: basePaths.dest + 'images/min/'
},
scripts: {
src: basePaths.src + 'scripts/',
dest: basePaths.dest + 'scripts/min/'
},
styles: {
src: ba... | marcolino/escrape2 | .old/gulpfile-advanced.js | JavaScript | mit | 3,371 |
/*
* Vulkan Example - Implements a separable two-pass fullscreen blur (also known as bloom)
*
* Copyright (C) 2016 by Sascha Willems - www.saschawillems.de
*
* This code is licensed under the MIT license (MIT) (http://opensource.org/licenses/MIT)
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <... | martty/Vulkan | bloom/bloom.cpp | C++ | mit | 42,639 |
package mcjty.deepresonance.jei.smelter;
import mezz.jei.api.recipe.IRecipeWrapper;
import javax.annotation.Nonnull;
public class SmelterRecipeHandler implements mezz.jei.api.recipe.IRecipeHandler<SmelterRecipeWrapper> {
private final String id;
public SmelterRecipeHandler() {
this.id = SmelterReci... | McJty/DeepResonance | src/main/java/mcjty/deepresonance/jei/smelter/SmelterRecipeHandler.java | Java | mit | 834 |
var g_batchAssessmentEditor = null;
var g_tabAssessments = null;
var g_updatingAttendance = false;
var g_onRefresh = null;
var g_lockedCount = 0;
var g_btnSubmit = null;
var g_sectionAssessmentEditors = null;
var g_sectionAssessmentButtons = null;
function createAssessment(content, to) {
var assessmentJson = {};
a... | duanp0128/PlayHongKongResort | public/javascripts/assessment/editor.js | JavaScript | mit | 9,652 |
package edu.purdue.eaps.weatherpipe;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchA... | stephenlienharrell/WeatherPipe | WeatherPipe/src/main/java/edu/purdue/eaps/weatherpipe/AWSInterface.java | Java | mit | 19,505 |
# -*- coding: utf-8 -*-
require 'spec_helper'
describe RailwayCompany do
describe :import do
let(:file_path) do
tempfile = Tempfile.new('railway_companies.csv')
tempfile << <<EOS
company_cd,rr_cd,company_name,company_name_k,company_name_h,company_name_r,company_url,company_type,e_status,e_sort
1,11,J... | aonashi/jpstation | spec/models/railway_company_spec.rb | Ruby | mit | 1,833 |
<?php
/**
* PHPSpec
*
* LICENSE
*
* This file is subject to the GNU Lesser General Public License Version 3
* that is bundled with this package in the file LICENSE.
* It is also available through the world-wide-web at this URL:
* http://www.gnu.org/licenses/lgpl-3.0.txt
* If you did not receive a copy of the l... | manufy/PHP-BDD-YaCMS | Lib/PHPSpec-1.3.0beta/PHPSpec/Runner/Formatter/Factory.php | PHP | mit | 2,204 |
package framework.org.json;
/*
Copyright (c) 2002 JSON.org
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, modify, ... | marcossilva/IFAdventure | EnsaioRetentivo/src/framework/org/json/JSONArray.java | Java | mit | 32,203 |
#include "abstract_serializable.h"
using namespace json;
json::__abstract_serializable__::__abstract_serializable__() {}
std::map<std::string, std::function<json::__abstract_serializable__*()> > json::__abstract_serializable__::dictionary;
| Dariasteam/JSON-cpp | src/abstract_serializable.cpp | C++ | mit | 243 |
module CalculableAttrs
VERSION = "0.0.15"
end
| dmitrysharkov/calculable_attrs | lib/calculable_attrs/version.rb | Ruby | mit | 48 |
# -*- coding: utf-8 -*-
import pack_command
import pack_command_python
import timeit
import cProfile
import pstats
import pycallgraph
def format_time(seconds):
v = seconds
if v * 1000 * 1000 * 1000 < 1000:
scale = u'ns'
v = int(round(v*1000*1000*1000))
elif v * 1000 * 1000 < 1000:
... | simonz05/pack-command | misc/bench.py | Python | mit | 1,564 |
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="SerializationJsonModule.cs" company="Catel development team">
// Copyright (c) 2008 - 2015 Catel development team. All rights reserved.
// </copyright>
// ----------------------... | blebougge/Catel | src/Catel.Serialization.Json/Catel.Serialization.Json.Shared/SerializationJsonModule.cs | C# | mit | 1,132 |
var fs = require('fs');
var mysql = require('mysql');
var qs = require('querystring');
var express = require('express');
var config = JSON.parse(fs.readFileSync(__dirname+'/config.json', 'UTF-8'));
// -----------------------------------------------------------------------------
// Keep a persistant connection to the... | vishva8kumara/rain-catcher | server/sky.js | JavaScript | mit | 4,212 |
import SuccessPage from '../index';
import expect from 'expect';
import { shallow } from 'enzyme';
import React from 'react';
describe('<SuccessPage />', () => {
});
| Luandro-com/repsparta-web-app | app/components/SuccessPage/tests/index.test.js | JavaScript | mit | 169 |
<?php
namespace Application\Core;
use \DateTime;
/**
* The LogHandler handles writing and clearing logs
*/
class LogHandler {
public static function clear() {
$files = App::logs()->files();
foreach ($files as $file) { $file->remove(); }
}
public ... | LiamMartens/xTend | dist/Application/Core/LogHandler.php | PHP | mit | 1,177 |
namespace CSReader.Command
{
/// <summary>
/// ヘルプを表示するコマンド
/// </summary>
public class HelpCommand : ICommand
{
public const string COMMAND_NAME = "help";
/// <summary>
/// コマンドを実行する
/// </summary>
/// <returns>ヘルプ文字列</returns>
public s... | yobiya/CSReader | CSReader/CSReader/Command/HelpCommand.cs | C# | mit | 494 |
//The MIT License(MIT)
//
//Copyright(c) 2016 universalappfactory
//
//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, co... | universalappfactory/Sharpend.UAP | Sharpend.UAP/Controls/Buttons/IconButton.cs | C# | mit | 4,533 |
Given /^I am in the "(.*?)" directory$/ do |dir|
@dir = dir
@project = RemoteTerminal::Project.find(@dir)
end
When /^I get the path from my location$/ do
@path = @project.path_from(@dir)
end
Then /^I should see "(.*?)"$/ do |path|
@path.should be == path
end
When /^I get the path to my location$/ do
@path ... | igorbonadio/remote-terminal | features/step_definitions/project_step.rb | Ruby | mit | 348 |
require "test_helper"
class FHeapTest < ActiveSupport::TestCase
def setup
@heap = FHeap.new
end
def setup_sample_heap
@node_1 = @heap.insert!(1)
@node_2 = @heap.insert!(2)
@node_6 = @heap.insert!(6)
@node_5 = @node_2.add_child!(5)
@node_3 = @node_1.add_child!(3)
@node_4 =... | evansenter/f_heap | test/f_heap_test.rb | Ruby | mit | 4,332 |
using SuperScript.Configuration;
using SuperScript.Emitters;
using SuperScript.Modifiers;
using SuperScript.Modifiers.Converters;
using SuperScript.Modifiers.Post;
using SuperScript.Modifiers.Pre;
using SuperScript.Modifiers.Writers;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;... | Supertext/SuperScript.Common | ExtensionMethods/ConfigurationExtensions.cs | C# | mit | 16,291 |
using Cofoundry.Core;
using Cofoundry.Domain;
using System;
using System.Collections.Generic;
using System.Linq;
namespace Cofoundry.Web.Admin
{
public class CustomEntitiesRouteLibrary : AngularModuleRouteLibrary
{
public const string RoutePrefix = "custom-entities";
private readonly AdminSett... | cofoundry-cms/cofoundry | src/Cofoundry.Web.Admin/Admin/Modules/CustomEntities/Constants/CustomEntitiesRouteLibrary.cs | C# | mit | 1,605 |
/* eslint-disable no-undef,no-unused-expressions */
const request = require('supertest')
const expect = require('chai').expect
const app = require('../../bin/www')
const fixtures = require('../data/fixtures')
describe('/api/mappings', () => {
beforeEach(() => {
this.Sample = require('../../models').Sample
t... | lighting-perspectives/jams | server/test/integration/instrument-mappings.test.js | JavaScript | mit | 5,577 |
#include "FunctionCallOperatorNode.h"
#include "compiler/Parser/Parser.h"
#include "compiler/AST/Variables/VariableNode.h"
#include <assert.h>
namespace Three {
FunctionCallOperatorNode* FunctionCallOperatorNode::parse(Parser& parser, ASTNode* receiver, ASTNode* firstArg) {
assert(parser.helper()->peek().... | mattmassicotte/three | compiler/AST/Operators/Callable/FunctionCallOperatorNode.cpp | C++ | mit | 895 |
/**
* @license Highcharts JS v9.0.1 (2021-02-16)
* @module highcharts/modules/dependency-wheel
* @requires highcharts
* @requires highcharts/modules/sankey
*
* Dependency wheel module
*
* (c) 2010-2021 Torstein Honsi
*
* License: www.highcharts.com/license
*/
'use strict';
import '../../Series/DependencyWhee... | cdnjs/cdnjs | ajax/libs/highcharts/9.0.1/es-modules/masters/modules/dependency-wheel.src.js | JavaScript | mit | 349 |
/*!
* OOUI v0.40.3
* https://www.mediawiki.org/wiki/OOUI
*
* Copyright 2011–2020 OOUI Team and other contributors.
* Released under the MIT license
* http://oojs.mit-license.org
*
* Date: 2020-09-02T15:42:49Z
*/
( function ( OO ) {
'use strict';
/**
* An ActionWidget is a {@link OO.ui.ButtonWidget button wi... | cdnjs/cdnjs | ajax/libs/oojs-ui/0.40.3/oojs-ui-windows.js | JavaScript | mit | 117,418 |
<?php
namespace Report;
use Illuminate\Support\Collection;
class Datareport
{
protected static $instance = NULL;
protected $id = NULL;
protected $caption = NULL;
protected $icon = NULL;
// protected $rowSourceUrl = NULL; // server side row source url
// protected $columns ... | binaryk/pedia | app/~Libs/~system/reports/Datareport.php | PHP | mit | 2,191 |
<?php
namespace App\Support\Http\Routing;
use App\Support\Facades\Request;
use App\Support\Traits\ClassNameTrait;
/**
* Class Router
* @package App\Support\Routing
* @author Fruty <ed.fruty@gmail.com>
*/
class Router
{
use ClassNameTrait;
/**
* Registered routes
*
* @access protected
... | ed-fruty/test | app/Support/Http/Routing/Router.php | PHP | mit | 1,695 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Dulcet.Twitter;
using Inscribe.Common;
using Inscribe.Configuration;
using Inscribe.Util;
using Inscribe.Subsystems;
using Inscribe.ViewModels.PartBlocks.MainBlock.TimelineChild;
using Livet;
... | fin-alice/Mystique | Inscribe/Storage/TweetStorage.cs | C# | mit | 21,267 |
'use strict';
/* global angular */
(function() {
var aDashboard = angular.module('aDashboard');
aDashboard.controller('ADashboardController', function( $scope, $rootScope, tradelistFactory, $timeout) {
$scope.subState = $scope.$parent;
$scope.accountValue;
$scope.avgWin;
$scope.avgLoss;
$scope.avgTradeS... | LAzzam2/tradeTracker-client | app/common-components/directives/a-dashboard/a-dashboard_controller.js | JavaScript | mit | 2,143 |
'use strict';
// MODULES //
var isArrayLike = require( 'validate.io-array-like' ),
isTypedArrayLike = require( 'validate.io-typed-array-like' ),
deepSet = require( 'utils-deep-set' ).factory,
deepGet = require( 'utils-deep-get' ).factory;
// FUNCTIONS
var POW = require( './number.js' );
// POWER //
/**
* FUN... | compute-io/power | lib/deepset.js | JavaScript | mit | 1,889 |
<?php
namespace repositorio\estudianteBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Sede
*
* @ORM\Table(name="sede")
* @ORM\Entity
*/
class Sede
{
/**
* @var string
*
* @ORM\Column(name="codigo_sede", type="string", length=5, nullable=false)
* @ORM\Id
* @ORM\GeneratedValue(s... | dasilva93/RDDT | src/repositorio/estudianteBundle/Entity/Sede.php | PHP | mit | 1,180 |
/**
* Created by avinashvundyala on 09/07/16.
*/
public class SelectionSort {
public int[] iterativeSelectionSort(int[] arr) {
int temp, smallIdx;
for(int i = 0; i < arr.length; i++) {
smallIdx = i;
for(int j = i; j < arr.length; j++) {
if(arr[smallIdx] > arr[j]) {
smallIdx = ... | vundyalaavinash/Algorithms | BasicSorting/SelectionSort.java | Java | mit | 2,176 |
'use strict';
function getReferenceMatrix (matrix, direction) {
return matrix.unflatten().rows.sort((r1, r2) => {
return (r1[1] > r2[1] ? 1 : r1[1] < r2[1] ? -1 : 0) * (direction === 'desc' ? -1 : 1);
});
}
function simpleSort (matrix, direction) {
const referenceMatrix = getReferenceMatrix(matrix, direction);
... | Financial-Times/keen-query | lib/post-processing/sort.js | JavaScript | mit | 3,082 |
"""
Initialize Flask app
"""
from flask import Flask
import os
from flask_debugtoolbar import DebugToolbarExtension
from werkzeug.debug import DebuggedApplication
app = Flask('application')
if os.getenv('FLASK_CONF') == 'DEV':
# Development settings
app.config.from_object('application.settings.Development')
... | nwinter/bantling | src/application/__init__.py | Python | mit | 1,104 |
/*
* @(#)Function2Arg.cs 3.0.0 2016-05-07
*
* You may use this software under the condition of "Simplified BSD License"
*
* Copyright 2010-2016 MARIUSZ GROMADA. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the f... | Domiii/UnityLoopyLoops | Assets/Scripts/mXparser/parsertokens/Function2Arg.cs | C# | mit | 7,388 |
using System.Collections.Generic;
using System.Data;
using System.Threading.Tasks;
using Dapper;
using MicroOrm.Dapper.Repositories.Extensions;
namespace MicroOrm.Dapper.Repositories
{
/// <summary>
/// Base Repository
/// </summary>
public partial class DapperRepository<TEntity>
where TEnt... | digitalmedia34/MicroOrm.Dapper.Repositories | src/MicroOrm.Dapper.Repositories/DapperRepository.BulkUpdate.cs | C# | mit | 1,489 |
import watch from 'gulp-watch';
import browserSync from 'browser-sync';
import path from 'path';
/**
* Gulp task to watch files
* @return {function} Function task
*/
export default function watchFilesTask() {
const config = this.config;
const runSequence = require('run-sequence').use(this.gulp);
r... | geut/gulp-appfy-tasks | src/tasks/watch-files.js | JavaScript | mit | 1,211 |
<?php
namespace MiniGameMessageApp\Parser;
use MiniGame\Entity\MiniGameId;
use MiniGame\Entity\PlayerId;
interface ParsingPlayer
{
/**
* @return PlayerId
*/
public function getPlayerId();
/**
* @return MiniGameId
*/
public function getGameId();
}
| remi-san/mini-game-message-app | src/Parser/ParsingPlayer.php | PHP | mit | 287 |
import { Editor, EditorState, RichUtils } from "draft-js"
import { debounce } from "lodash"
import React, { Component } from "react"
import ReactDOM from "react-dom"
import styled from "styled-components"
import { TextInputUrl } from "../components/text_input_url"
import { TextNav } from "../components/text_nav"
import... | eessex/positron | src/client/components/draft/paragraph/paragraph.tsx | TypeScript | mit | 8,791 |
<?php
namespace Demo\TaskBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class CustomerControllerTest extends WebTestCase
{
/*
public function testCompleteScenario()
{
// Create a new client to browse the application
$client = static::createClient();
... | prabhucomo/symfonytask | src/Demo/TaskBundle/Tests/Controller/CustomerControllerTest.php | PHP | mit | 1,959 |
// load package date-util
require('../libs/sugar-date')
module.exports = (pluginContext) => {
return {
respondsTo: (query) => {
return true
},
search: (query = '', env = {}) => {
// check if timestamp given
let isTimestamp = !isNaN(parseFloat(query)) && i... | puyt/zazu-utime | src/utime.js | JavaScript | mit | 2,252 |
<?php
/**
* @package jelix
* @subpackage utils
* @author Laurent Jouanneau
* @contributor Julien Issler
* @copyright 2006-2009 Laurent Jouanneau
* @copyright 2008 Julien Issler
* @link http://www.jelix.org
* @licence http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public Licence, see L... | yvestan/sendui | app/lib/jelix/utils/jFilter.class.php | PHP | mit | 9,383 |
namespace KitchenPC.DB.Models
{
using System;
using FluentNHibernate.Mapping;
public class RecipeRatingsMap : ClassMap<RecipeRatings>
{
public RecipeRatingsMap()
{
this.Id(x => x.RatingId)
.GeneratedBy.GuidComb()
.UnsavedValue(Gui... | Derneuca/KitchenPCTeamwork | KitchenPC/DB/Models/RecipeRatingsMap.cs | C# | mit | 638 |
<?php defined('SYSPATH') OR die('No direct access allowed.');
/**
* OAuth2 Controller
*
* @author Ushahidi Team <team@ushahidi.com>
* @package Ushahidi\Koauth
* @copyright Ushahidi - http://www.ushahidi.com
* @license MIT License http://opensource.org/licenses/MIT
*/
abstract class Koauth_Controller_... | ushahidi/koauth | classes/Koauth/Controller/OAuth.php | PHP | mit | 2,457 |
package adasim.algorithm.routing;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Random;
import java.util.Stack;
import org.apa... | brunyuriy/adasim | src/adasim/algorithm/routing/QLearningRoutingAlgorithm.java | Java | mit | 9,693 |
'use strict';
describe('Directive: cssCode', function () {
// load the directive's module and view
beforeEach(module('googleWebfontsHelperApp'));
beforeEach(module('app/cssCode/cssCode.html'));
var element, scope;
beforeEach(inject(function ($rootScope) {
scope = $rootScope.$new();
}));
it('shoul... | majodev/google-webfonts-helper | client/app/cssCode/cssCode.directive.spec.js | JavaScript | mit | 573 |
using Android.OS;
using GetAllLinks.Core.ViewModels;
using MvvmCross.Droid.Shared.Attributes;
using Android.Views;
namespace GetAllLinks.Droid.Views
{
[MvxFragment(typeof(MainActivityViewModel), Resource.Layout.settingsView, ViewModelType = typeof(SettingsViewModel), IsCacheableFragment = false)]
public class Settin... | spanishprisoner/GetAllLinks | src/GetAllLinks.Droid/Views/SettingsFragment.cs | C# | mit | 580 |
<?php
/**
* This file is part of Cacheable.
*
* (c) Eric Chow <yateric@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Yateric\Tests\Stubs;
use Yateric\Cacheable\Cacheable;
class DecoratedObject
{
use C... | yateric/cacheable | tests/Stubs/DecoratedObject.php | PHP | mit | 544 |
var assert = require('assert');
var keys = require("cmd/common/keys/user.js");
var userKeysNock = require('test/fixtures/user/fixture_user_keys');
module.exports = {
setUp : function(cb){
return cb();
},
'list keys' : function(cb){
keys({ _ : ['list'] }, function(err, list){
assert.equal(err, nul... | shannonmpoole/fh-fhc | test/unit/legacy/test_user_keys.js | JavaScript | mit | 2,115 |
module.exports = {
audioFilter: require('./audioFilter'),
destination: require('./destination'),
filename: require('./filename'),
multer: require('./multer')
}
| lighting-perspectives/jams | server/middlewares/sample/index.js | JavaScript | mit | 168 |
package com.am.docker.study.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class RestDockerExample {
@RequestMapping("/")
public String home() {
return "Hello Docker World";
}
} | augustomarinho/springboot-docker | src/main/java/com/am/docker/study/controller/RestDockerExample.java | Java | mit | 299 |
package com.elmakers.mine.bukkit.api.event;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;
import com.elmakers.mine.bukkit.api.magic.Mage;
import com.elmakers.mine.bukkit.api.spell.Spell;
/**
* A custom event that the Magic plugin will fire any time a
* Mag... | elBukkit/MagicPlugin | MagicAPI/src/main/java/com/elmakers/mine/bukkit/api/event/PreCastEvent.java | Java | mit | 1,149 |
using Physics2DDotNet;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Interfaces
{
public interface IHaveConnectionSlots
{
IEnumerable<IConnectionSlot> Slots { get; }
ALVector2D Position { get; }
}
}
| homoluden/fukami | demos/FukamiDemo/Interfaces/IHaveConnectionSlots.cs | C# | mit | 311 |
#include <iostream>
#include <string>
// time complexity O(1) - constant
// space complexity O(1) - constant
bool is_unique (std::string s) {
if (s.length() > 128) return false;
bool char_list[128] = {0};
for (int i = 0; i < s.length(); i++) {
if (char_list[s[i]]) return false;
char_list[s[i]] = true;
}
re... | harveyc95/ProgrammingProblems | CTCI/Ch1/is_unique.cpp | C++ | mit | 399 |
module PrettyShortUrls
module Routes
def pretty_short_urls
connect ":name", :controller => "pretty_short_urls_redirect", :action => "redirect", :conditions => { :method => :get }
end
end
end | baldwindavid/pretty_short_urls | lib/pretty_short_urls_routes.rb | Ruby | mit | 208 |
package com.naosim.rtm.lib;
import java.math.BigInteger;
import java.security.MessageDigest;
public class MD5 {
public static String md5(String str) {
try {
byte[] str_bytes = str.getBytes("UTF-8");
MessageDigest md = MessageDigest.getInstance("MD5");
byte[] md5_bytes =... | naosim/rtmjava | src/main/java/com/naosim/rtm/lib/MD5.java | Java | mit | 538 |
// The MIT License (MIT)
// Copyright (c) 2014 Philipp Neugebauer
package main
import (
"bufio"
"fmt"
"os"
"math/rand"
"strconv"
)
func computer(inputChannel chan int, resultChannel chan string){
for human_choice := range inputChannel {
computer_choice := rand.Intn(3)
evaluation(comp... | philippneugebauer/go-code | rock_paper_scissors.go | GO | mit | 1,463 |
import random
import numpy as np
import math
from time import perf_counter
import os
import sys
from collections import deque
import gym
import cntk
from cntk.layers import Convolution, MaxPooling, Dense
from cntk.models import Sequential, LayerStack
from cntk.initializer import glorot_normal
env = gym.make("Break... | tuzzer/ai-gym | atari_breakout/atari_breakout_dqn_cntk.py | Python | mit | 11,222 |
/*
* This file is part of TechReborn, licensed under the MIT License (MIT).
*
* Copyright (c) 2020 TechReborn
*
* 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, inc... | TechReborn/RebornCore | src/main/java/reborncore/client/gui/slots/SlotFake.java | Java | mit | 2,200 |
#region License
// Pomona is open source software released under the terms of the LICENSE specified in the
// project's repository, or alternatively at http://pomona.io/
#endregion
using System.Reflection;
namespace Pomona.Routing
{
public class DefaultQueryProviderCapabilityResolver : IQueryProviderCapabilityR... | Pomona/Pomona | app/Pomona/Routing/DefaultQueryProviderCapabilityResolver.cs | C# | mit | 450 |
#include "uritests.h"
#include "../guiutil.h"
#include "../walletmodel.h"
#include <QUrl>
void URITests::uriTests()
{
SendCoinsRecipient rv;
QUrl uri;
uri.setUrl(QString("AnonymousCoin:LQDPC5rbjDB72fGFVHu4enYhxGAZuRiFh9?req-dontexist="));
QVERIFY(!GUIUtil::parseBitcoinURI(uri, &rv));
uri.setUrl(Q... | anonymousdevx/anonymouscoin | src/qt/test/uritests.cpp | C++ | mit | 2,908 |
<?php
/**
* 财付通支付方式插件
*
* @author Garbin
* @usage none
*/
class TenpayPayment extends BasePayment
{
/* 财付通网关 */
var $_gateway = 'https://www.tenpay.com/cgi-bin/med/show_opentrans.cgi';
var $_code = 'tenpay';
/**
* 获取支付表单
*
* @author Garbin
*... | kitboy/docker-shop | html/ecmall/upload/includes/payments/tenpay/tenpay.payment.php | PHP | mit | 8,267 |
import Event = require('./Event');
/*
* Signal1
*
* 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, modify... | markknol/EaselTS | src/createts/event/Signal1.ts | TypeScript | mit | 1,773 |
package cassandra
// read statements
var selectIntStmt = `
SELECT metric_timestamp, value FROM metrics_int WHERE metric_name = ? AND tags = ?
`
var selectIntByStartEndTimeStmt = `
SELECT metric_timestamp, value FROM metrics_int WHERE metric_name = ? AND tags = ? AND metric_timestamp >= ? AND metric_timestamp <= ?... | xephonhq/xephon-k | _legacy/pkg/storage/cassandra/stmt.go | GO | mit | 583 |
using Xunit;
using Shouldly;
using System.Linq;
using System;
using System.Text.RegularExpressions;
namespace AutoMapper.UnitTests
{
public class MapFromReverseResolveUsing : AutoMapperSpecBase
{
public class Source
{
public int Total { get; set; }
}
public class De... | mjalil/AutoMapper | src/UnitTests/ReverseMapping.cs | C# | mit | 17,050 |
import * as fs from "fs";
import * as path from "path";
import * as commander from "commander";
import { ConsoleLogger } from "@akashic/akashic-cli-commons";
import { promiseExportHTML } from "./exportHTML";
import { promiseExportAtsumaru } from "./exportAtsumaru";
interface CommandParameterObject {
cwd?: string;
so... | akashic-games/akashic-cli-export-html | src/app/cli.ts | TypeScript | mit | 3,890 |
import * as types from 'constants/ActionTypes'
import jsCookie from 'js-cookie'
import history from 'history'
export const setUser = (user) => (dispatch) => {
dispatch({
type: types.SET_USER,
payload: { ...user }
})
}
| oct16/Blog-FE | src/actions/user.js | JavaScript | mit | 230 |
/*!
* Angular Material Design
* https://github.com/angular/material
* @license MIT
* v1.1.1-master-f6dedff
*/
(function( window, angular, undefined ){
"use strict";
/**
* @ngdoc module
* @name material.components.bottomSheet
* @description
* BottomSheet
*/
MdBottomSheetDirective['$inject'] = ["$mdBottomSheet... | ohmygodvt95/wevivu | vendor/assets/components/angular-material/modules/js/bottomSheet/bottomSheet.js | JavaScript | mit | 10,698 |
the_count = [1, 2, 3, 4, 5]
fruits = ['apple', 'oranges', 'pears', 'apricots',]
change = [1, 'pennies', 2, 'dimes', 3, 'quarters',]
#this first kind of for-loop goes through a list
for number in the_count:
print("This is count %d" % number)
# same as above
for fruit in fruits:
print("A fruit of type: %s" % fr... | sunrin92/LearnPython | 1-lpthw/ex32.py | Python | mit | 812 |