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 |
|---|---|---|---|---|---|
namespace TeamBuilder.App.Core
{
using TeamBuilder.App.Interfaces;
using TeamBuilder.Models;
public class UserSession : IUserSession
{
public User User { get; set; }
public bool IsLoggedIn => this.User != null;
public void LogIn(User user) => this.User = user;
public... | RAstardzhiev/Software-University-SoftUni | Databases Advanced - Entity Framework Core/Workshop/TeamBuilder.App/Core/UserSession.cs | C# | mit | 366 |
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'UserRole.role'
db.alter_column(u'ecg_balancing_userrole', 'role', self.gf('django.db.mode... | sinnwerkstatt/ecg-balancing | ecg_balancing/migrations/0030_auto__chg_field_userrole_role.py | Python | mit | 12,407 |
<?php
namespace Oro\Bundle\ApiBundle\Collection\QueryVisitorExpression;
use Doctrine\Common\Collections\Expr\Comparison;
use Oro\Bundle\ApiBundle\Collection\QueryExpressionVisitor;
/**
* Represents MEMBER OF comparison expression.
*/
class MemberOfComparisonExpression implements ComparisonExpressionInterface
{
... | Djamy/platform | src/Oro/Bundle/ApiBundle/Collection/QueryVisitorExpression/MemberOfComparisonExpression.php | PHP | mit | 814 |
namespace Devshed.Csv
{
using System.Collections.Generic;
using System.Globalization;
/// <summary> Defines the CSV document layout. </summary>
/// <typeparam name="TSource">The type of the source.</typeparam>
public class TableDefinition<TSource>
{
private readonly ICollection<ICsvCol... | AppiePau/devshed | Devshed.TMapper/TableDefinition.cs | C# | mit | 1,780 |
System.register(['aurelia-framework', 'interact', './interact-base'], function(exports_1, context_1) {
"use strict";
var __moduleName = context_1 && context_1.id;
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __(... | jfstephe/aurelia-interactjs | dist/system/interact-draggable.js | JavaScript | mit | 3,296 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator 0.17.0.0
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
... | ahosnyms/azure-sdk-for-net | src/ResourceManagement/Compute/Microsoft.Azure.Management.Compute/Generated/Models/ApiEntityReference.cs | C# | mit | 1,349 |
/**
* Created by Serhei on 17.02.15.
* Адаптер между вью HeaderView и модулем Player
*/
define([
"marionette", "backbone", "jquery", "underscore", "./Player", "./VK", "./Lastfm", "app"
],
function (Marionette, Backbone, $, _, Player, VK, Lastfm, App) {
var UNKNOWN_ALBUM = '../img/default-alb... | Stryzhevskyi/vk-player | src/js/modules/PlayerAdapter.js | JavaScript | mit | 17,397 |
package com.jasperlu.doppler;
import android.media.AudioFormat;
import android.media.AudioManager;
import android.media.AudioTrack;
import android.os.Handler;
import android.provider.MediaStore;
import android.renderscript.Sampler;
import android.util.Log;
/**
* Created by Jasper on 3/12/2015.
*/
public class Frequ... | jasper-lu/doppler-android | src/main/java/com/jasperlu/doppler/FrequencyPlayer.java | Java | mit | 2,478 |
#include "Lab5.h"
#include "Content.h"
#include "VectorDrawer.h"
#include "LazerBeam.h"
#include "FountainEffect.h"
using namespace BGE;
Lab5::Lab5(void)
{
elapsed = 10000;
}
Lab5::~Lab5(void)
{
}
bool Lab5::Initialise()
{
std::shared_ptr<GameComponent> ground = make_shared<Ground>();
Attach(ground);
ship1 =... | PaulKennedyDIT/GamesEnginesAssignment1 | BGE/Lab5.cpp | C++ | mit | 3,138 |
import * as React from "react";
import { CarbonIconProps } from "../../";
declare const Worship24: React.ForwardRefExoticComponent<
CarbonIconProps & React.RefAttributes<SVGSVGElement>
>;
export default Worship24;
| mcliment/DefinitelyTyped | types/carbon__icons-react/lib/worship/24.d.ts | TypeScript | mit | 216 |
var fs = require('fs');
function readCache(bank, url) {
fs.readFile(url, 'utf8', function (err, data) {
if (!err) {
bank.dispatch(JSON.parse(data));
}
});
}
function writeCache(url, data) {
fs.writeFile(url, JSON.stringify(data), function (err) {
if (err) return console.log(err);
});
}
modu... | krambuhl/ganglion | licklider/bank/bank.cache.js | JavaScript | mit | 636 |
version https://git-lfs.github.com/spec/v1
oid sha256:1eb76caa2619ae14fc6e83b2bc11a3d5af53859002ec58d29ff4f159b115b8c7
size 8342
| yogeshsaroya/new-cdnjs | ajax/libs/piwik/0.4.3/piwik.js | JavaScript | mit | 129 |
/*!
* @copyright Copyright © Kartik Visweswaran, Krajee.com, 2014 - 2015
* @version 1.3.3
*
* Date formatter utility library that allows formatting date/time variables or Date objects using PHP DateTime format.
* @see http://php.net/manual/en/function.date.php
*
* For more JQuery plugins visit http://plugin... | logics-layout/flufoods | markup/static/js/separate-js/jquery.datetimepicker.full.js | JavaScript | mit | 114,711 |
using UnityEngine;
using System.Collections;
public class TextOutline : MonoBehaviour
{
public float pixelSize = 1;
public int cloneCount = 8;
public Color outlineColor = Color.black;
public bool resolutionDependant = false;
public int doubleResolution = 1024;
public bool squareAlign = false;
public bo... | NitorInc/NitoriWare | Assets/Scripts/UI/TextOutline.cs | C# | mit | 3,734 |
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _createSvgIcon = _interopRequireDefault(require("./utils/createSvgIcon"));
var _jsxRuntime = require("react/jsx-runtime")... | oliviertassinari/material-ui | packages/mui-icons-material/lib/BakeryDining.js | JavaScript | mit | 1,025 |
/*
* Copyright (c) 2016-2017 Håkan Edling
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*
* https://github.com/piranhacms/piranha.core
*
*/
using System.Collections.Generic;
namespace Piranha.Areas.Manager.Models
{
/// <summary... | filipjansson/piranha.core | core/Piranha.Manager/Areas/Manager/Models/PageEditRegionCollection.cs | C# | mit | 1,045 |
<?php
// Require CrudKit application
require "crudkit/crudkit.php";
use CrudKit\CrudKitApp;
use CrudKit\Pages\SQLiteTablePage;
// Create a new CrudKitApp object
$app = new CrudKitApp ();
$page = new SQLiteTablePage ("sqlite2", "fixtures/chinook.sqlite");
$page->setName("Customer Management")
->setTableName("Custo... | najiji/crudkit | demo/sql_basic.php | PHP | mit | 1,171 |
// Author(s) : Pierre Alliez
#include <iostream>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/AABB_tree.h>
#include <CGAL/AABB_traits.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/AABB_face_graph_triangle_primitive.h>
typedef CGAL::Simple_cartesian<double> K;
typedef K::FT FT;
typedef K::Point_3 Point;
type... | alexandrustaetu/natural_editor | external/CGAL-4.4-beta1/examples/AABB_tree/AABB_polyhedron_facet_distance_example.cpp | C++ | mit | 1,958 |
import {
messages,
ruleName,
} from ".."
import rules from "../../../rules"
import { testRule } from "../../../testUtils"
const rule = rules[ruleName]
testRule(rule, {
ruleName,
config: ["always"],
accept: [ {
code: "@import url(x.css)",
}, {
code: "a { color: pink; }",
}, {
code: "@media p... | gaidarenko/stylelint | src/rules/block-opening-brace-space-before/__tests__/index.js | JavaScript | mit | 8,936 |
require 'spec_helper'
describe WishItemsController do
render_views
it "redirect to login if no current_user" do
get :index
response.should redirect_to(login_url)
end
end
describe WishItemsController do
render_views
before(:each) do
activate_authlogic
@cur_user = create(:user)
login_as(... | PrabhakarUndurthi/ror_ecommerce | spec/controllers/wish_items_controller_spec.rb | Ruby | mit | 851 |
package com.vsked.test;
import java.util.Iterator;
import java.util.Map;
import java.util.TreeMap;
public class TestMapCompareMap {
public static void main(String[] args) {
Map<String, String> m1=new TreeMap<String, String>();
Map<String, String> m2=new TreeMap<String, String>();
m1.pu... | brucevsked/vskeddemolist | vskeddemos/projects/testdemo/src/com/vsked/test/TestMapCompareMap.java | Java | mit | 1,095 |
<!DOCTYPE html>
<html>
<head>
<meta name="renderer" content="webkit">
<meta name="force-rendering" content="webkit">
<meta http-equiv="X-UA-Compatible" content="chrome=1,IE=edge">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理后台--框架</title>
<?php
$this->load->view('admin/admin_hea... | shadowinlife/biplatform | application/views/admin/framework_edit.php | PHP | mit | 2,653 |
module DeviceDeactivatable
autoload :Mapping, 'devise_deactivatable/mapping'
module Controllers
autoload :Helpers, 'devise_deactivatable/controllers/helpers'
end
end
require 'devise'
require 'devise_deactivatable/routes'
require 'devise_deactivatable/rails'
Devise.add_module :deactivatable, :controller => :... | dreamwords/devise_deactivatable | lib/devise_deactivatable.rb | Ruby | mit | 413 |
<?php
App::uses('CrudBaseObject', 'Crud.Controller/Crud');
App::uses('Hash', 'Utility');
App::uses('Validation', 'Utility');
/**
* Base Crud class
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
*/
abstract class CrudAction extends CrudBaseObject {
/**... | simkimsia/cake-with-crud | plugins/Crud/Controller/Crud/CrudAction.php | PHP | mit | 10,382 |
# frozen_string_literal: true
Capybara.register_driver :rack_test do |app|
Capybara::RackTest::Driver.new(app)
end
Capybara.register_driver :selenium do |app|
Capybara::Selenium::Driver.new(app)
end
Capybara.register_driver :selenium_headless do |app|
version = Capybara::Selenium::Driver.load_selenium
option... | teamcapybara/capybara | lib/capybara/registrations/drivers.rb | Ruby | mit | 1,932 |
<!DOCTYPE html>
<html lang="hu">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Fishing on Orfű</title>
<link rel="icon" type="image/png" sizes="32x32" href="<?php echo get_template_directory_uri(); ?>/assets/img/favicon-32x32.png">
<link rel="icon" type="... | akosszasz/akosszasz.github.io | fishing2021/wp-content/themes/fishing/header.php | PHP | mit | 2,147 |
'use strict';
/**
* Module dependencies.
*/
var mapsPolicy = require('../policies/maps.server.policy'),
maps = require('../controllers/maps.server.controller');
module.exports = function(app) {
// Articles collection routes
app.route('/api/maps').all(mapsPolicy.isAllowed)
.get(maps.list)
... | mezae/pfpundergrads | modules/articles/server/routes/maps.server.routes.js | JavaScript | mit | 592 |
<?php
/* FOSUserBundle:Profile:edit_content.html.twig */
class __TwigTemplate_1d7755141c036cceb13974c4038fc4adbd4b136a6e899c7c3bf5cd8b840dc4f7 extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks =... | paskalov/dvdworld | app/cache/dev/twig/1d/77/55141c036cceb13974c4038fc4adbd4b136a6e899c7c3bf5cd8b840dc4f7.php | PHP | mit | 1,627 |
/*******************************************************************************************************
This file was auto generated with the tool "WebIDLParser"
Content was generated from IDL file:
http://trac.webkit.org/browser/trunk/Source/WebCore/html/HTMLParamElement.idl
PLEASE DO *NOT* MODIFY THIS FI... | SharpKit/SharpKit-SDK | Defs/Html/generated/html/HTMLParamElement.cs | C# | mit | 3,327 |
# frozen_string_literal: true
require 'shrine'
require 'shrine/storage/file_system'
require 'ckeditor/backend/shrine'
# Choose your favorite image processor
require 'image_processing/mini_magick'
SHRINE_PICTURE_PROCESSOR = ImageProcessing::MiniMagick
# require 'image_processing/vips'
# SHRINE_PICTURE_PROCESSOR = Ima... | galetahub/ckeditor | lib/generators/ckeditor/templates/base/shrine/initializer.rb | Ruby | mit | 683 |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Collections.Immutable;
using System.Diagnostics;
using Microsoft.CodeAnalysis.CSharp.Symbols;
namespa... | abock/roslyn | src/Compilers/CSharp/Portable/BoundTree/Constructors.cs | C# | mit | 31,920 |
package org.hive2hive.core.model.versioned;
import java.io.File;
import java.security.KeyPair;
import java.security.PublicKey;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.hive2hive.core.TimeToLiveStore;
import org.hive2hive.core.model.FolderIndex;
import org.hive2hive.c... | gfneto/Hive2Hive | org.hive2hive.core/src/main/java/org/hive2hive/core/model/versioned/UserProfile.java | Java | mit | 2,849 |
package crafttweaker.api.chat;
import crafttweaker.annotations.ZenRegister;
import stanhebben.zenscript.annotations.*;
/**
* Represents a chat message. Strings can be converted into chat messages, and
* chat messages can be colored and concatenated.
*
* @author Stan Hebben
*/
@ZenClass("crafttweaker.chat.IChatMe... | AllTheMods/CraftTweaker | CraftTweaker2-API/src/main/java/crafttweaker/api/chat/IChatMessage.java | Java | mit | 804 |
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
*/
package com.microsoft.azure.management.mediaservices.v2019_05_01_preview;
import com.fa... | navalev/azure-sdk-for-java | sdk/mediaservices/mgmt-v2019_05_01_preview/src/main/java/com/microsoft/azure/management/mediaservices/v2019_05_01_preview/JobInputHttp.java | Java | mit | 1,846 |
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
namespace Com.Aspose.Tasks.Model {
public class ResourceItems {
public List<ResourceItem> List { get; set; }
public Link link { get; set; }
public override string ToString() {
var sb = new StringBuilder(... | asposetasks/Aspose_Tasks_Cloud | SDKs/Aspose.Tasks-Cloud-SDK-for-.NET/src/Com/Aspose/Tasks/Model/ResourceItems.cs | C# | mit | 543 |
<?php
namespace Dotenv\Store;
use Dotenv\Exception\InvalidPathException;
use Dotenv\Store\File\Reader;
class FileStore implements StoreInterface
{
/**
* The file paths.
*
* @var string[]
*/
protected $filePaths;
/**
* Should file loading short circuit?
*
* @var bool
... | drakakisgeo/mailtester | vendor/vlucas/phpdotenv/src/Store/FileStore.php | PHP | mit | 1,357 |
var fs = require('fs');
var _ = require('lodash');
var logger = require('winston');
function Lint() {
/**
* @type {string}
*/
this.file = null;
/**
* @type {string}
*/
this.pass = null;
/**
* @type {string}
*/
this.original = null;
/**
* @type {string[]... | thinkingmedia/nglint | src/lint.js | JavaScript | mit | 2,873 |
package com.microsoft.bingads.adintelligence;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
/**
* <p>Java class for guid simple type.
*
* <p>The following schema fragment spec... | JeffRisberg/BING01 | proxies/com/microsoft/bingads/adintelligence/Guid.java | Java | mit | 1,325 |
/*
Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or http://ckeditor.com/license
*/
CKEDITOR.plugins.setLang( 'adv_link', 'sq', {
acccessKey: 'Sipas ID-së së Elementit',
advanced: 'Të përparuara',
advisoryContentType: 'Lloji i Përmbajtjes Këshillimore',
ad... | theus77/ElasticMS | src/AppBundle/Resources/public/adv_link/lang/sq.js | JavaScript | mit | 2,182 |
<?php
if (!isset($_SERVER['REQUEST_TIME_FLOAT'])) {
$_SERVER['REQUEST_TIME_FLOAT'] = microtime(true);
}
try {
require_once __DIR__ . '/../bootstrap.php';
}
catch (Exception $e) {
// NO-OP
}
echo '<!--' . "\n";
echo 'processing duration: ' . round((microtime(true) - $_SERVER['REQUEST_TIME_FLOAT']) * 1000)... | laposta/connect-googlecontacts | public/index.php | PHP | mit | 443 |
#!/usr/bin/env node
const http = require('http');
const config = require('../config');
const http_code = process.env.HEALTHCHECK_CODE || 200;
const options = {
host: 'localhost',
port: process.env.IDM_PORT || config.port,
timeout: 2000,
method: 'GET',
path: process.env.HEALTHCHECK_PATH || '/version'
};
con... | ging/fiware-idm | bin/healthcheck.js | JavaScript | mit | 778 |
version https://git-lfs.github.com/spec/v1
oid sha256:3739b485ac39b157caa066b883e4d9d3f74c50beff0b86cd8a24ce407b179a23
size 93867
| yogeshsaroya/new-cdnjs | ajax/libs/datatables/1.9.1/js/jquery.js | JavaScript | mit | 130 |
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("1.... | jasssonpet/TelerikAcademy | Programming/4.HighQualityCode/3.NamingIdentifiers/1.PrintBoolean/Properties/AssemblyInfo.cs | C# | mit | 1,404 |
#include "qss_nlfunction_step.h"
void qss_nlfunction_step::init(double t,...) {
//The 'parameters' variable contains the parameters transferred from the editor.
va_list parameters;
va_start(parameters,t);
//To get a parameter: %Name% = va_arg(parameters,%Type%)
//where:
// %Name% is the parameter name
// %Typ... | andyLaurito92/haikunet | debug/atomics/qss/qss_nlfunction_step.cpp | C++ | mit | 10,326 |
/**
* @license Angular UI Gridster v0.4.1
* (c) 2010-2014. https://github.com/JimLiu/angular-ui-gridster
* License: MIT
*/
(function () {
'use strict';
angular.module('ui.gridster', [])
.constant('uiGridsterConfig', {
widget_margins: [10, 10],
widget_base_dimensions: [100, 100],
widget_s... | JimLiu/angular-ui-gridster | dist/angular-ui-gridster.js | JavaScript | mit | 7,041 |
namespace Photos
{
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
public class Photographer
{
private Photographer()
{
this.Albums = new HashSet<Album>();
}
public Photographer(string userName, string passwo... | RAstardzhiev/Software-University-SoftUni | Databases Advanced - Entity Framework 6/EF Relations/Photos/Photographer.cs | C# | mit | 1,014 |
export const TaskRequestStepType =
{
FileTask: "FileTask",
EncodedTask: "EncodedTask"
}
export interface ITaskStepProperties {
type: string;
}
export interface EncodedTaskStep extends ITaskStepProperties {
values: Value[];
contextPath: string;
contextAccessToken: string;
encodedTaskContent: string;
encodedVa... | Microsoft/vso-agent-tasks | Tasks/ACRTaskV0/models/acrtaskrequestbody.ts | TypeScript | mit | 1,800 |
/**
* Created by Liza on 21.07.2015.
*/
var pixi = require("pixi.js")
var Point = pixi.Point;
var Tracker = require('../core').Tracker;
function Train(way, resources) {
pixi.Container.call(this);
this.carSize = 90/2;//way.segments[0].rails.scale.x;
this.offset = 2;
this.wheels = [];
this.way = ... | szhigunov/railways | src/game/Train.js | JavaScript | mit | 5,243 |
/*
* Swampfile.js
*
* This file is a Swamp configurations file generated automatically
*
* Copyright (c) 2014 Udi Talias
* Licensed under the MIT license.
* https://github.com/uditalias/swamp/blob/master/LICENSE
*/
module.exports = function(swamp) {
swamp.config({
params : {
base_path:proces... | uditalias/swamp | test/bats/valid/Swampfile.js | JavaScript | mit | 1,578 |
var signalExit = require('signal-exit')
var spawn = require('child_process').spawn
var crossSpawn = require('cross-spawn-async')
var fs = require('fs')
var which = require('which')
function needsCrossSpawn (exe) {
if (process.platform !== 'win32') {
return false
}
try {
exe = which.sync(exe)
} catch (... | Goldtean/addition-goldtean | node_modules/foreground-child/index.js | JavaScript | mit | 2,445 |
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using System.Collections.Generic;
using System.Composition;
using System.Diagnostics;
using System.Li... | abock/roslyn | src/EditorFeatures/Core.Wpf/Preview/PreviewFactoryService.cs | C# | mit | 48,130 |
//-----------------------------------------------------------------------
// <copyright file="SerializationRoot.cs" company="Marimer LLC">
// Copyright (c) Marimer LLC. All rights reserved.
// Website: http://www.lhotka.net/cslanet/
// </copyright>
// <summary>no summary</summary>
//----------------------------... | BrettJaner/csla | Source/Csla.test/Serialization/SerializationRoot.cs | C# | mit | 1,152 |
///////////////////////////////////////////////////////////////////////////
// Copyright © Esri. 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.a... | tmcgee/cmv-wab-widgets | wab/2.15/widgets/CostAnalysis/nls/ru/strings.js | JavaScript | mit | 10,806 |
/*
---------------------------------------------------------------------------
Open Asset Import Library (assimp)
---------------------------------------------------------------------------
Copyright (c) 2006-2016, assimp team
All rights reserved.
Redistribution and use of this software in source and binary forms,
w... | Polynominal/Lucy3D | Dependencies/assimp/code/STLLoader.cpp | C++ | mit | 17,739 |
import template from './_ngmodule_.html';
export let =ngmodule=Component = {
template,
selector: '_ngmodule_',
// add ng1 directive definition
directiveSelector: () => console.log('=ngmodule=', '-> change this'),
controllerAs: '$ctrl',
scope: {
},
bindToController: true,
replace: true,
restrict: 'E',
contr... | orizens/echoes | config/templates/_ngmodule_/_ngmodule_.component.js | JavaScript | mit | 439 |
require 'rubygems'
require 'test/unit'
require 'fileutils'
require 'active_record'
require 'logger'
# ------------------------------------------------------
# Setup AR environment
# ------------------------------------------------------
# Define connection info
ActiveRecord::Base.configurations = {
"test" => {
... | verticonaut/ar-audit-tracer | test/helper.rb | Ruby | mit | 858 |
import * as React from "react";
import { CarbonIconProps } from "../../";
declare const ChartRadar32: React.ForwardRefExoticComponent<
CarbonIconProps & React.RefAttributes<SVGSVGElement>
>;
export default ChartRadar32;
| mcliment/DefinitelyTyped | types/carbon__icons-react/lib/chart--radar/32.d.ts | TypeScript | mit | 222 |
package net.nemerosa.ontrack.model.form;
import net.nemerosa.ontrack.common.BaseException;
public class FormFieldNotFoundException extends BaseException {
public FormFieldNotFoundException(String name) {
super("Field %s not found in form.", name);
}
}
| nemerosa/ontrack | ontrack-model/src/main/java/net/nemerosa/ontrack/model/form/FormFieldNotFoundException.java | Java | mit | 270 |
package ios.ac.cn;
import java.util.Arrays;
public class ThreeSumClosest {
/*
* 以 i 为起点, j, k 在 [i+1:) 上游走,使得 num[i] + num[j] + num[k] 尽力逼近 target
*/
public int threeSumClosest(int[] num, int target) {
Arrays.sort(num);
int closestVal = num[0] + num[1] + num[2];
int closestGap = Math.abs(closestVal - targ... | wh-acmer/minixalpha-acm | LeetCode/Java/Solution/src/ios/ac/cn/ThreeSumClosest.java | Java | mit | 946 |
using System;
using System.Linq;
using System.Web;
using System.Web.Http.Controllers;
using Umbraco.Core;
namespace Umbraco.Web.Editors
{
/// <summary>
/// This is used to auto-select specific actions on controllers that would otherwise be ambiguous based on a single parameter type
/// </summary>
/// <... | gavinfaux/Umbraco-CMS | src/Umbraco.Web/Editors/ParameterSwapControllerActionSelector.cs | C# | mit | 3,432 |
<?php
namespace Concrete\Core\Page\Search\ColumnSet\Column;
use Concrete\Core\Search\Column\Column;
use Concrete\Core\Search\Column\ColumnInterface;
use Concrete\Core\Search\Column\PagerColumnInterface;
use Concrete\Core\Search\ItemList\Pager\PagerProviderInterface;
class DateLastModified extends Column implements Pa... | acliss19xx/concrete5 | concrete/src/Page/Search/ColumnSet/Column/DateLastModified.php | PHP | mit | 1,145 |
require "active_record/relation/from_clause"
require "active_record/relation/query_attribute"
require "active_record/relation/where_clause"
require "active_record/relation/where_clause_factory"
require 'active_model/forbidden_attributes_protection'
require 'active_support/core_ext/string/filters'
module ActiveRecord
... | susancal/Waitr | vendor/cache/ruby/2.3.0/gems/activerecord-5.0.0/lib/active_record/relation/query_methods.rb | Ruby | mit | 41,496 |
package subpage
import (
. "github.com/ungerik/go-start/view"
"github.com/ungerik/go-start/examples/ViewPaths/views"
"github.com/ungerik/go-start/examples/ViewPaths/views/root"
)
func init() {
views.Admin_User0 = &Page{
Title: RenderView(
func(ctx *Context) error {
// The username is in ctx.URLArgs[0]
... | prinsmike/go-start | examples/ViewPaths/views/admin/user_0/user_0.go | GO | mit | 917 |
#region Copyright
//
// DotNetNuke® - http://www.dotnetnuke.com
// Copyright (c) 2002-2016
// by DotNetNuke Corporation
//
// 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 restric... | moshefi/Dnn.Platform | DNN Platform/Library/Collections/IPagedList.cs | C# | mit | 2,905 |
#include "DHT.h"
#define DHT11 11
#define DHT22 22
#define DHT21 21
#define AM2301 21
DHT::DHT(uint8_t pin, uint8_t type){
_pin = pin;
_type = type;
}
void DHT::init(){
pinMode(_pin, INPUT_PULLUP);
digitalWrite(_pin, HIGH);
place=0;
}
#define MIN_PERIOD 1970
#define US_DELAY 5
#define WHILE_NOBL... | cloudformdesign/DHT | DHT.cpp | C++ | mit | 3,037 |
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddRoleToUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', function (Blueprint $table) {
$table->enum('role', getAvailabl... | brunocascio/unlp-parciales | database/migrations/2016_03_05_203132_add_role_to_users_table.php | PHP | mit | 555 |
<?php
/*
* This file is part of the PHPExifTool package.
*
* (c) Alchemy <support@alchemy.fr>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPExiftool\Driver\Tag\DICOM;
use JMS\Serializer\Annotation\ExclusionPolicy;... | bburnichon/PHPExiftool | lib/PHPExiftool/Driver/Tag/DICOM/Originator.php | PHP | mit | 781 |
var Method = require('aeolus').Method;
var redirecter = new Method();
redirecter.handle(function (request, response) {
response.redirect("../#/person/" + request.getParameter("id"));
});
module.exports = redirecter;
| awesomesourcecode/MoviesBackendServer | api/get/person.(id).js | JavaScript | mit | 220 |
'use strict';
var bitcore = require('bitcore');
angular.module('copayApp.services')
.factory('balanceService', function($rootScope, $filter, $timeout, rateService) {
var root = {};
var _balanceCache = {};
root.clearBalanceCache = function(w) {
w.clearUnspentCache();
delete _balanceCache[w.get... | Tetpay/copay | js/services/balanceService.js | JavaScript | mit | 3,598 |
define(['square/filters/filters'], function (filters) {
'use strict';
filters.filter('cpf', function () {
return function (value) {
if (!value) {
return value;
}
var lpad = function (value, padding) {
var zeroes = '0';
for (var i = 0; i < padding; i++) {
zeroes += '0';
}
ret... | leonardosalles/squarespa | squareframework-ui/target/classes/js/filters/cpf.js | JavaScript | mit | 1,808 |
/***
* ASM: a very small and fast Java bytecode manipulation framework
* Copyright (c) 2000-2011 INRIA, France Telecom
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistribution... | xinggg22/bsl | src/main/java/org/boilit/asm/Handle.java | Java | mit | 6,173 |
# This file is part of Indico.
# Copyright (C) 2002 - 2019 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from __future__ import unicode_literals
from ipaddress import ip_network
from operator import itemgetter
... | mvidalgarcia/indico | indico/modules/networks/fields.py | Python | mit | 2,008 |
import { FilterService } from './filterservice';
describe('FilterService Suite', () => {
let data: any = [
{brand: "VW", year: 2012, color: {name:"Orange"}, vin: "dsad231ff"},
{brand: "Audi", year: 2011, color: {name:"Black"}, vin: "gwregre345"},
{brand: "Renault", year: 2005, color: {na... | WebRota/primeng | src/app/components/api/filterservice.spec.ts | TypeScript | mit | 5,381 |
/*
* filename EventDispatcher.cpp
* fileinfo À̺¥Æ® ºÐ¹è ¹× ó¸® Ŭ·¡½º ±¸Çö ÆÄÀÏ
* author ÁÖÇå¾ç (Heonyang Ju)
*/
#include "EventDispatcher.h"
COMA_USING_NS
EventDispatcher::EventDispatcher()
{}
EventDispatcher::~EventDispatcher()
{
listenerList_.clear();
}
void EventDispatcher::SetEventListener(const std::string... | letepyu/Coma2D | Coma2D/Coma2D/EventDispatcher.cpp | C++ | mit | 1,245 |
/*
File generated by NetTiers templates [www.nettiers.com]
Important: Do not modify this file. Edit the file Cart.cs instead.
*/
#region Using Directives
using System;
using System.ComponentModel;
using System.Collections;
using System.Collections.Generic;
using System.Security.Permissions;
using Syste... | netTiers/netTiers | Samples/Petshop/Source/PetShop.Services/CartServiceBase.generated.cs | C# | mit | 72,915 |
/*
Copyright (c) 2014 <a href="http://www.gutgames.com">James Craig</a>
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, ... | JaCraig/Craig-s-Utility-Library | UnitTests/ORM/Manager/ORMManager.cs | C# | mit | 2,173 |
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
* Image_Graph - PEAR PHP OO Graph Rendering Utility.
*
* PHP versions 4 and 5
*
* LICENSE: This library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
... | pcucurullo/groot | app/libs/PEAR/Image/Graph/Plot/Band.php | PHP | mit | 7,414 |
# frozen_string_literal: true
module RuboCop
module Cop
module Lint
# This cop checks for duplicated instance (or singleton) method
# definitions.
#
# @example
#
# # bad
#
# def foo
# 1
# end
#
# def foo
# 2
# e... | vergenzt/rubocop | lib/rubocop/cop/lint/duplicate_methods.rb | Ruby | mit | 6,718 |
/*
* The MIT License
* Copyright © 2014-2019 Ilkka Seppälä
*
* 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... | mookkiah/java-design-patterns | factory-method/src/main/java/com/iluwatar/factory/method/WeaponType.java | Java | mit | 1,471 |
var util = require('util')
var Transform = require('stream').Transform
util.inherits(Concat, Transform)
function Concat(cb) {
Transform.call(this)
this.cb = cb
this.buffers = []
}
Concat.prototype._transform = function(chunk, encoding, done) {
this.buffers.push(chunk)
this.push(chunk)
done()
}
Concat.pro... | nmarley/node-playground | bytewiser/buffer-concat-official.js | JavaScript | mit | 486 |
using UnityEditor;
using UnityEngine;
[CanEditMultipleObjects, CustomEditor(typeof(MegaShapeArc))]
public class MegaShapeArcEditor : MegaShapeEditor
{
public override bool Params()
{
MegaShapeArc shape = (MegaShapeArc)target;
bool rebuild = false;
float v = EditorGUILayout.FloatField("Radius", shape.radius... | lejeanf/VisualExperiments | Visual_Experiments/Assets/Plugins/Mega-Fiers/Editor/MegaFiers/MegaShape/MegaShapeArcEditor.cs | C# | mit | 793 |
class TestMJruby < MTest::Unit::TestCase
def test_jruby_opts_env
ENV['JRUBY_OPTS'] = "--dev -J-cp foo.jar --2.0 -J-Xms1g"
assert_equal jruby_opts_env, ["--dev", "-J-cp", "foo.jar", "--2.0", "-J-Xms1g"]
end
end
MTest::Unit.new.run
| enebo/mjruby | test/test_mjruby.rb | Ruby | mit | 248 |
'use strict';
function calcCacheSize() {
var size = 0;
for(var key in jqLite.cache) { size++; }
return size;
}
describe('$compile', function() {
var element, directive, $compile, $rootScope;
beforeEach(module(provideLog, function($provide, $compileProvider){
element = null;
directive = $compilePr... | shaozhengxing/angular.js | test/ng/compileSpec.js | JavaScript | mit | 219,821 |
//
//
//
const express = require('express');
const router = express.Router();
const randomstring = require('randomstring');
const Player = require('core/player');
router.get('/player/init', function(req, res, next) {
let random_name = "player_"
random_name += randomstring.generate({
length: 4,
charset: '... | geeks-fight-club/geeks-games-core | server/http/json-ui/player_init.js | JavaScript | mit | 692 |
var searchData=
[
['vector3',['vector3',['../namespacerobotis__manipulator_1_1math.html#a057ca65131575b85aec169f3a50ed796',1,'robotis_manipulator::math']]],
['velocity',['velocity',['../structrobotis__manipulator_1_1_dynamicvector.html#a6bbccf8316887a8da3cd6aa065f3beac',1,'robotis_manipulator::Dynamicvector::veloci... | ROBOTIS-GIT/emanual | docs/en/software/robotis_manipulator_libs/doxygen/html/search/all_12.js | JavaScript | mit | 458 |
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
Schema = mongoose.Schema;
/**
* Answer Schema
*/
var AnswerSchema = new Schema({
content: {
type: String,
default: '',
required: 'Please fill Answer content',
trim: true
},
created: {
type: Date,
default: Date.now
},
... | leonarther16th/eslhunter | app/models/answer.server.model.js | JavaScript | mit | 481 |
using System;
using System.Linq;
using System.Linq.Expressions;
using Marten.Linq;
namespace Marten.Testing.OtherAssembly.Bug1851
{
public class GenericOuter<TInOtherAssembly> where TInOtherAssembly : StoredObjectInOtherAssembly
{
public class FindByNameQuery: ICompiledQuery<TInOtherAssembly, string>
... | mysticmind/marten | src/Marten.Testing.OtherAssembly/Bug1851/GenericOuter.cs | C# | mit | 625 |
import mongoose from 'mongoose';
const { Schema } = mongoose;
const typeSchema = new Schema({
name: String,
image: String,
date: {
type: Date,
default: Date.now(),
},
places: [
{
type: Schema.Types.ObjectId,
ref: 'Place',
},
],
});
const... | AlexeyKorkoza/TestProjectAndNodeJS | backend/src/models/type.js | JavaScript | mit | 386 |
import {
ChangeDetectionStrategy,
Component,
EventEmitter,
Input,
OnInit,
Output
} from '@angular/core';
@Component({
selector: 'playlist-cover',
styleUrls: ['./playlist-cover.scss'],
template: `
<div class="playlist-cover is-flex-row is-flex-valign">
<div class="cover-bg" [ngStyle]="{ 'backgro... | orizens/echoes-ng2 | src/app/shared/components/playlist-viewer/playlist-cover.component.ts | TypeScript | mit | 1,747 |
'use strict';
/**
* @ngdoc function
* @name tbsApp.controller:EidolonListCtrl
* @description
* # EidolonListCtrl
* Controller of the tbsApp
*/
angular.module('tbsApp').controller('EidolonListCtrl', function ($scope, $routeParams, $modal, REidolon, UserData) {
$scope.have_eidolon = UserData.get('have_eidolon'... | m-atthieu/tbs.desile.fr | front/scripts/controllers/eidolon-list.js | JavaScript | mit | 902 |
'use strict';
module.exports = {
up: function(queryInterface, Sequelize) {
return queryInterface.createTable('DeliveryOrders', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER
},
number: {
type: Sequelize.STRING
... | PinguinJantan/openPackTrack-backend | migrations/20171017155907-create-delivery-order.js | JavaScript | mit | 610 |
package yushijinhun.authlibagent.javaagent.tweaker;
import java.lang.instrument.ClassFileTransformer;
import java.lang.instrument.IllegalClassFormatException;
import net.minecraft.launchwrapper.IClassTransformer;
import net.minecraft.launchwrapper.Launch;
import net.minecraft.launchwrapper.LaunchClassLoader;
import yu... | to2mbn/authlib-agent | authlib-javaagent/src/main/java/yushijinhun/authlibagent/javaagent/tweaker/AuthlibClassTransformer.java | Java | mit | 1,062 |
class TimeZoneInput < Formtastic::Inputs::SelectInput
TIME_ZONES = [
["(GMT -12:00) Marshall Is.", "Marshall Is.", { class: "time-zone--12" }],
["(GMT -11:00) Midway Island", "Midway Island", { class: "time-zone-11" }],
["(GMT -10:00) Hawaii", "Hawaii", { class: "time-zone-10" }],
["(GMT -9:00) Alaska... | codelation/activeadmin_pro | app/inputs/time_zone_input.rb | Ruby | mit | 2,496 |
(function (window) {
var tooltips = {
autoscale: "Show all data (autoscale)",
selection: "Select data for export"
};
var axis = {
numberWidthUsingFormatter: function(elem, cx, cy, fontSizeInPixels, numberStr) {
var testSVG,
testText,
bbox,
width,
height,
... | pjanik/lab-grapher | lab.grapher.js | JavaScript | mit | 82,458 |
#include <cstdio>
using namespace std;
bool adj[1001][1001];
int n, x, y, q[1001], f, b, cur, vis[1001];
int main(){
scanf("%d", &n);
for(int i = 0; i < n; i++){
scanf("%d%d", &x, &y);
adj[x][y]=1;
}
scanf("%d%d", &x, &y);
f=b=0;
q[++b]=x;
cur = x;
vis[x]=1;
while(f!... | ruar18/competitive-programming | dmoj/mwc/15c4p4-dealing-with-knots.cpp | C++ | mit | 588 |
'use strict';
var mockGlobalAnalytics = {};
global.analytics = mockGlobalAnalytics;
module.exports = mockGlobalAnalytics;
| nice-fungal/analytics.js-core | test/support/global.ts | TypeScript | mit | 123 |
module Timetrap
module Config
extend self
PATH = ENV['TIMETRAP_CONFIG_FILE'] || File.join(ENV['HOME'], '.timetrap.yml')
# Application defaults.
#
# These are written to a config file by invoking:
# <code>
# t configure
# </code>
def defaults
{
# Path to the sqlite db... | apeschar/timetrap | lib/timetrap/config.rb | Ruby | mit | 2,261 |
package cn.edu.gdut.zaoying.Option.series.funnel;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface MaxNumber {
double valu... | zaoying/EChartsAnnotation | src/cn/edu/gdut/zaoying/Option/series/funnel/MaxNumber.java | Java | mit | 336 |
<?php
/**
* @package PayPal
*/
/**
* Make sure our parent class is defined.
*/
require_once 'PayPal/Type/XSDSimpleType.php';
/**
* GetMobileStatusRequestDetailsType
*
* @package PayPal
*/
class GetMobileStatusRequestDetailsType extends XSDSimpleType
{
/**
* Phone number for status inquiry
*/
... | AMSGWeblinks/prestaPaypalPlugin | sdk/lib/PayPal/Type/GetMobileStatusRequestDetailsType.php | PHP | mit | 1,019 |
namespace Wexflow.Core.Db.Oracle
{
public class Notification : Core.Db.Notification
{
public static readonly string ColumnName_Id = "ID";
public static readonly string ColumnName_AssignedBy = "ASSIGNED_BY";
public static readonly string ColumnName_AssignedOn = "ASSIGNED_ON";
pub... | aelassas/Wexflow | src/netcore/Wexflow.Core.Db.Oracle/Notification.cs | C# | mit | 1,280 |