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 |
|---|---|---|---|---|---|
<?php
/**
* Redirect
*
* HTTP redirection commands.
*
* @package core
* @author stefano.azzolini@caffeinalab.com
* @copyright Caffeina srl - 2015 - http://caffeina.it
*/
class Redirect {
use Module;
public static function to($url, $status=302){
if ($link = Filter::with('core.redirect',$url)) ... | caffeina-core/core | classes/Redirect.php | PHP | mit | 1,140 |
##
# This code was generated by
# \ / _ _ _| _ _
# | (_)\/(_)(_|\/| |(/_ v1.0.0
# / /
#
# frozen_string_literal: true
module Twilio
module REST
class Conversations < Domain
class V1 < Version
class ServiceContext < InstanceContext
class ConfigurationContext < Instance... | philnash/twilio-ruby | lib/twilio-ruby/rest/conversations/v1/service/configuration/notification.rb | Ruby | mit | 17,122 |
<?php
namespace REBELinBLUE\Deployer\Presenters;
use Illuminate\Support\Facades\Lang;
use REBELinBLUE\Deployer\Command;
use Robbo\Presenter\Presenter;
/**
* The view presenter for a command class.
*/
class CommandPresenter extends Presenter
{
/**
* Gets the readable list of before clone commands.
*
... | iflamed/deployer | app/Presenters/CommandPresenter.php | PHP | mit | 2,738 |
/*
MIT License http://www.opensource.org/licenses/mit-license.php
*/
"use strict";
const RuntimeGlobals = require("../RuntimeGlobals");
const RuntimeModule = require("../RuntimeModule");
/** @typedef {import("../MainTemplate")} MainTemplate */
class CompatRuntimePlugin extends RuntimeModule {
constructor() {
su... | EliteScientist/webpack | lib/runtime/CompatRuntimePlugin.js | JavaScript | mit | 1,622 |
module Sequel
module Plugins
# The composition plugin allows you to easily define a virtual
# attribute where the backing data is composed of other columns.
#
# There are two ways to use the plugin. One way is with the
# :mapping option. A simple example of this is when you have a
# database... | saadullahsaeed/chai.io | vendor/bundle/ruby/1.9.1/gems/sequel-3.41.0/lib/sequel/plugins/composition.rb | Ruby | mit | 7,178 |
(function () {
var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)}
// Used when there is no 'main' module.
// The name is probably (hopefully) unique so minification removes for releases.
var register_3795 = function (id) {
var module = dem(id);
var fragments = id.split('.');
var t... | g0otgahp/number-energy | theme/tinymce/tinymce/themes/modern/theme.js | JavaScript | mit | 44,251 |
package test;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "L... | mitdbg/asciiclass | labs/lab7/code/src/test/SimpleShortestPathsVertex.java | Java | mit | 2,846 |
module.exports = function(sequelize, DataTypes) {
var Product = sequelize.define('Product', {
ProductId: {
type: DataTypes.BIGINT,
primaryKey:true,
allowNull: false,
autoIncrement: true
},
ProductTypeId:{
type:DataTypes.BIGINT,
allowNull: false,
refe... | coolicer/shopshop | models/Product.js | JavaScript | mit | 807 |
using System.Reflection;
using System.Runtime.CompilerServices;
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("GifToGomez")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly... | 0x0ade/GifToGomez | Properties/AssemblyInfo.cs | C# | mit | 981 |
// 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
namespace DotNetNuke.Web.Api.Auth
{
using System;
using System.Net;
using System.Net.Http;
using... | nvisionative/Dnn.Platform | DNN Platform/DotNetNuke.Web/Api/Auth/BasicAuthMessageHandler.cs | C# | mit | 4,146 |
namespace Microsoft.ApplicationInsights.WindowsServer.Mock
{
using System;
using System.Collections.Generic;
using Microsoft.ApplicationInsights.Extensibility.Implementation.Tracing;
internal class HeartbeatProviderMock : IHeartbeatPropertyManager
{
public bool Enabled = true;
publ... | pharring/ApplicationInsights-dotnet | WEB/Src/WindowsServer/WindowsServer.Tests/Mock/HeartbeatProviderMock.cs | C# | mit | 2,100 |
import bootstrap # noqa
import pytest
from modviz.cli import parse_arguments, validate_path, validate_fold_paths
def test_argument_parsing():
with pytest.raises(SystemExit):
parse_arguments([])
namespace = parse_arguments(["foo"])
assert namespace.path == "foo"
assert namespace.target is No... | Bogdanp/modviz | tests/test_cli.py | Python | mit | 1,467 |
<?php
/**
* SwpmMemberUtils
* All the utility functions related to member records should be added to this class
*/
class SwpmMemberUtils {
public static function is_member_logged_in() {
$auth = SwpmAuth::get_instance();
if ($auth->is_logged_in()) {
return true;
} else {
... | 924ge/xpoint21 | www/wordpress/wordpress/wp-content/plugins/simple-membership/classes/class.swpm-utils-member.php | PHP | mit | 3,017 |
#region Copyright
//
// DotNetNuke® - https://www.dnnsoftware.com
// Copyright (c) 2002-2018
// 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... | RichardHowells/Dnn.Platform | DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnListViewItem.cs | C# | mit | 1,498 |
<?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\KDCIFD;
use JMS\Serializer\Annotation\ExclusionPolicy... | bburnichon/PHPExiftool | lib/PHPExiftool/Driver/Tag/KDCIFD/SerialNumber.php | PHP | mit | 838 |
<?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\Qualcomm;
use JMS\Serializer\Annotation\ExclusionPoli... | bburnichon/PHPExiftool | lib/PHPExiftool/Driver/Tag/Qualcomm/R2TL84Tbl27.php | PHP | mit | 850 |
<?php
/**
* This file is part of Railt package.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Railt\SDL;
use GraphQL\Contracts\TypeSystem\SchemaInterface;
use Phplrt\Contracts\Source\ReadableI... | railt/railt | packages/SDL/src/CompilerInterface.php | PHP | mit | 989 |
"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/BatteryStdSharp.js | JavaScript | mit | 497 |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = createConfig;
var _path = require('path');
var _path2 = _interopRequireDefault(_path);
var _fs = require('fs');
var _fs2 = _interopRequireDefault(_fs);
var _jsYaml = require('js-yaml');
var _jsYaml2 = _interopRequire... | Dackng/eh-unmsm-client | node_modules/bootstrap-loader/lib/bootstrap.config.js | JavaScript | mit | 5,934 |
<?php
/**
*
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Catalog\Model\Product\Gallery;
use Magento\Framework\Model\AbstractExtensibleModel;
use Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterface;
use Magento\Catalog\Api\Dat... | j-froehlich/magento2_wk | vendor/magento/module-catalog/Model/Product/Gallery/Entry.php | PHP | mit | 4,135 |
# Retain for backward compatibility. Methods are now included in Class.
module ClassInheritableAttributes # :nodoc:
end
# Allows attributes to be shared within an inheritance hierarchy, but where each descendant gets a copy of
# their parents' attributes, instead of just a pointer to the same. This means that the chi... | madridonrails/StrategyMOR | vendor/rails/activesupport/lib/active_support/core_ext/class/inheritable_attributes.rb | Ruby | mit | 3,330 |
<?php
namespace XarismaBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class ImportType extends AbstractType
{
/**
* @param FormBuilderInterface $builder
* @param array $options
*... | mightydonbriggs/xarisma | src/XarismaBundle/Form/ImportType.php | PHP | mit | 1,220 |
/**
* 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.servicebus.v2017_04_01.implementation;
import co... | selvasingh/azure-sdk-for-java | sdk/servicebus/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/servicebus/v2017_04_01/implementation/MigrationConfigPropertiesImpl.java | Java | mit | 4,198 |
/**
* 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.machinelearningservices.v2019_05_01.implementatio... | selvasingh/azure-sdk-for-java | sdk/machinelearningservices/mgmt-v2019_05_01/src/main/java/com/microsoft/azure/management/machinelearningservices/v2019_05_01/implementation/PageImpl1.java | Java | mit | 1,776 |
<?php
namespace Acacha\AdminLTETemplateLaravel\Console\Routes;
/**
* Interface GeneratesCode.
*
* @package Acacha\AdminLTETemplateLaravel\Console\Routes
*/
interface GeneratesCode
{
/**
* Generates route code
*
* @return mixed
*/
public function code();
/**
* Set replacements... | acacha/adminlte-laravel | src/Console/Routes/GeneratesCode.php | PHP | mit | 440 |
// This is an open source non-commercial project. Dear PVS-Studio, please check it.
// PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
/* DISPLAY_DEVICE.cs --
Ars Magna project, http://arsmagna.ru */
#region Using directives
using System;
using System.Runtime.InteropServices;
using Jet... | amironov73/ManagedIrbis | Source/Classic/Libs/AM.Win32/AM/Win32/Gdi32/DISPLAY_DEVICE.cs | C# | mit | 5,145 |
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Config\Loader;
use Symfony\Component\Config\Exception... | teohhanhui/symfony | src/Symfony/Component/Config/Loader/FileLoader.php | PHP | mit | 5,542 |
<?php
/**
* Created by IntelliJ IDEA.
* User: emcnaughton
* Date: 5/4/17
* Time: 10:35 AM
*/
namespace Omnimail\Common;
/**
* Interface CredentialsInterface
*
* @package Omnimail
*/
interface CredentialsInterface
{
/**
* Set credentials.
*
* @param array $credentials
*/
public fun... | gabrielbull/php-sitesearch | src/Common/CredentialsInterface.php | PHP | mit | 458 |
package com.nirima.jenkins.plugins.docker.builder;
import com.nirima.docker.client.DockerException;
import com.nirima.jenkins.plugins.docker.action.DockerLaunchAction;
import hudson.model.AbstractBuild;
import hudson.model.Describable;
import hudson.model.Descriptor;
import jenkins.model.Jenkins;
import java.io.IOExc... | pcas/docker-plugin | src/main/java/com/nirima/jenkins/plugins/docker/builder/DockerBuilderControlOption.java | Java | mit | 1,388 |
var allTestFiles = [];
var TEST_REGEXP = /test\.js$/;
var pathToModule = function(path) {
return path.replace(/^\/base\//, '').replace(/\.js$/, '');
};
Object.keys(window.__karma__.files).forEach(function(file) {
if (TEST_REGEXP.test(file)) {
// Normalize paths to RequireJS module names.
allTe... | Antonio-Lopez/angularjs-requirejs-typescript | app/tests/require-config.js | JavaScript | mit | 1,010 |
/*global blogCategories, $ */
function BlogCategory(blogCategoryElement)
{
this.element = $vic(blogCategoryElement);
if ($vic(blogCategoryElement).data('index')) {
this.index = $vic(blogCategoryElement).data('index');
} else {
this.index = $vic(blogCategoryElement).children('[data-init="tr... | alexislefebvre/victoire | Bundle/BlogBundle/Resources/public/js/blog.js | JavaScript | mit | 5,952 |
'use strict'
const isDirectory = require('is-directory').sync
const isFile = require('is-file')
function getFarmArgs (args, fileIndex) {
const start = 0
const end = fileIndex + 1
return args.slice(start, end)
}
function getFileArgs (args, fileIndex) {
const start = fileIndex + 1
const end = args[args.lengt... | Kikobeats/worker-farm-cli | bin/parse-args/index.js | JavaScript | mit | 586 |
using System;
namespace IntegrationTests.WebApp.Models
{
public class ErrorViewModel
{
public string RequestId { get; set; }
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
}
} | pharring/ApplicationInsights-dotnet | NETCORE/test/IntegrationTests.WebApp/Models/ErrorViewModel.cs | C# | mit | 221 |
/**
*/
package gluemodel.CIM.IEC61970.Informative.InfWork.impl;
import gluemodel.CIM.IEC61968.Common.impl.DocumentImpl;
import gluemodel.CIM.IEC61968.Work.Work;
import gluemodel.CIM.IEC61968.Work.WorkPackage;
import gluemodel.CIM.IEC61970.Informative.InfERPSupport.ErpBOM;
import gluemodel.CIM.IEC61970.Informative.I... | georghinkel/ttc2017smartGrids | solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/CIM/IEC61970/Informative/InfWork/impl/DesignImpl.java | Java | mit | 23,208 |
//-------------------------------------------------------------------------------------------------------
// Copyright (C) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
//---------------------------------------------------------... | Microsoft/ChakraCore | lib/Backend/TempTracker.cpp | C++ | mit | 64,404 |
<?php
/**
* @link https://github.com/ManifestWebDesign/DABL
* @link http://manifestwebdesign.com/redmine/projects/dabl
* @author Manifest Web Design
* @license MIT License
*/
/**
* Convert a value to JSON
*
* This function returns a JSON representation of $param. It uses json_encode
* to accomplish this, ... | davidstelter/dabl-mvc | src/helpers/json_encode_all.php | PHP | mit | 713 |
package com.cs.moose.ui.controls.memorytable;
public class MemoryTableRow {
private final short[] values;
private final int row;
public MemoryTableRow(short[] values, int row) {
this.values = values;
this.row = row;
}
public int getColumn0() {
return row;
}
public short getColumn1() {
return values[0... | michaelneu/MooseMachine | src/com/cs/moose/ui/controls/memorytable/MemoryTableRow.java | Java | mit | 1,331 |
(function ($) {
$.extend(Backbone.View.prototype, {
parse: function(objName) {
var self = this,
recurse_form = function(object, objName) {
$.each(object, function(v,k) {
if (k instanceof Object) {
object[v] = recurse_form(k... | teampl4y4/j2-exchange | web/bundles/j2exchange/js/backbone/form.js | JavaScript | mit | 1,175 |
// 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
namespace DotNetNuke.Services.Cache
{
using System;
using System.IO;
using System.Security.Cryptograph... | nvisionative/Dnn.Platform | DNN Platform/Library/Services/Cache/FBCachingProvider.cs | C# | mit | 7,037 |
const getShows = require('./lib/getShows');
module.exports = { getShows };
| oliverviljamaa/markus-cinema-client | index.js | JavaScript | mit | 76 |
package rogue
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestParseSpritesetDefinitionCharacters(t *testing.T) {
ss, err := ParseSpritesetDefinition("resources/assets/tilesets/oddball/characters.yml")
assert.Equal(t, nil, err)
assert.Equal(t, true, len(ss.Tiles) > 2)
}
func TestParseSprites... | martinlindhe/rogue | spriteset_test.go | GO | mit | 796 |
// TYPE_CHECKING
public class J1_castarrayaccess {
public J1_castarrayaccess() {}
public static int test() {
String[] s = new String[5];
Object o = (Object)s[1];
return 123;
}
}
| gregwym/joos-compiler-java | testcases/a3/J1_castarrayaccess.java | Java | mit | 197 |
# frozen_string_literal: true
require 'fast_spec_helper'
RSpec.describe Gitlab::RequestProfiler::Profile do
let(:profile) { described_class.new(filename) }
describe '.new' do
context 'using old filename' do
let(:filename) { '|api|v4|version.txt_1562854738.html' }
it 'returns valid data' do
... | mmkassem/gitlabhq | spec/lib/gitlab/request_profiler/profile_spec.rb | Ruby | mit | 1,760 |
<?php
/**
* Copyright (c) UNA, Inc - https://una.io
* MIT License - https://opensource.org/licenses/MIT
*
* @defgroup Russian Russian language
* @ingroup UnaModules
*
* @{
*/
$aConfig = array(
/**
* Main Section.
*/
'type' => BX_DOL_MODULE_TYPE_LANGUAGE,
'name' => 'bx_ru',
'tit... | camperjz/trident | modules/boonex/russian/install/config.php | PHP | mit | 1,513 |
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Gr... | peppy/osu | osu.Game/Rulesets/Mods/DifficultyAdjustSettingsControl.cs | C# | mit | 5,254 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MyOnlineShop.Models.ShopingCartModels
{
public class OrderDetail
{
public int OrderDetailId { get; set; }
public int OrderId { get; set; }
public int ProductId { get; set; }
public i... | didimitrov/Shop | MyOnlineShop/MyOnlineShop.Models/ShopingCartModels/OrderDetail.cs | C# | mit | 505 |
<?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\Casio;
use JMS\Serializer\Annotation\ExclusionPolicy;... | bburnichon/PHPExiftool | lib/PHPExiftool/Driver/Tag/Casio/SpecialEffectLevel.php | PHP | mit | 851 |
/**
* 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.v2018_07_01;
import com.fasterxml.... | selvasingh/azure-sdk-for-java | sdk/mediaservices/mgmt-v2018_07_01/src/main/java/com/microsoft/azure/management/mediaservices/v2018_07_01/EnabledProtocols.java | Java | mit | 2,825 |
import functools
from ...drivers.spi_interfaces import SPI_INTERFACES
USAGE = """
A spi_interface is represented by a string.
Possible values are """ + ', '.join(sorted(SPI_INTERFACES.__members__))
@functools.singledispatch
def make(c):
raise ValueError("Don't understand type %s" % type(c), USAGE)
@make.regis... | ManiacalLabs/BiblioPixel | bibliopixel/project/types/spi_interface.py | Python | mit | 424 |
#define CATCH_CONFIG_MAIN
#include "catch/catch.hpp"
#include "tangram.h"
#include "tile/labels/label.h"
#include "glm/gtc/matrix_transform.hpp"
#define EPSILON 0.00001
glm::mat4 mvp;
glm::vec2 screen;
TEST_CASE( "Ensure the transition from wait -> sleep when occlusion happens", "[Core][Label]" ) {
Label l({}, "... | karimnaaji/tangram-es | tests/unit/labelTests.cpp | C++ | mit | 4,905 |
#include "lexer/token.h"
#include <iostream>
Token::Token(int t)
{
tag = t;
}
//For unknown tokens
Token::Token(std::string t)
{
//Get ascii for each character
for(int i = 0; i < t.length(); i++)
{
//Give the tag some arbitrary value
tag = -1;
asciiValuesTag.push_back(t[i]);
}
unknownToken = ... | cruzj6/orderUpCompiler | compiler_back/source/lexer/token.cpp | C++ | mit | 1,085 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
# Some initial, primary places.
PLACES = [
('Work', 'work'),
('Home', 'home'),
('School', 'school'),
]
def create_primary_place(apps, schema_editor=None):
Place = apps.get_model("userprofile", "... | izzyalonso/tndata_backend | tndata_backend/userprofile/migrations/0011_create_places.py | Python | mit | 622 |
// Node.js env
expect = require('expect.js');
sha1 = require('../src/sha1.js');
require('./test.js');
delete require.cache[require.resolve('../src/sha1.js')];
delete require.cache[require.resolve('./test.js')];
sha1 = null;
// Webpack browser env
JS_SHA1_NO_NODE_JS = true;
window = global;
sha1 = require('../src/sha1... | emn178/js-sha1 | tests/node-test.js | JavaScript | mit | 940 |
import {IFunctionLookupTable} from "../../function/function-lookup-table";
import {ParallelWorkerFunctionIds} from "./parallel-worker-functions";
import {identity} from "../../util/identity";
import {filterIterator} from "./filter-iterator";
import {mapIterator} from "./map-iterator";
import {parallelJobExecutor} from ... | DatenMetzgerX/parallel.es | src/common/parallel/slave/register-parallel-worker-functions.ts | TypeScript | mit | 1,346 |
/*
* This file is part of Sponge, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Softwar... | Grinch/SpongeCommon | src/main/java/org/spongepowered/common/SpongeBootstrap.java | Java | mit | 4,287 |
import { Farmbot } from "farmbot";
import { createTransferCert } from "./create_transfer_cert";
import { toPairs } from "../../util";
import { getDevice } from "../../device";
export interface TransferProps {
email: string;
password: string;
device: Farmbot;
}
/** Pass control of your device over to another use... | gabrielburnworth/Farmbot-Web-App | frontend/settings/transfer_ownership/transfer_ownership.ts | TypeScript | mit | 737 |
'use strict';
var expect = require('chai').expect;
var stub = require('../../helpers/stub').stub;
var commandOptions = require('../../factories/command-options');
var UninstallCommand = require('../../../lib/commands/uninstall-npm');
var Task = require('../../../lib/models/task');
... | zanemayo/ember-cli | tests/unit/commands/uninstall-npm-test.js | JavaScript | mit | 2,523 |
using System;
using System.ComponentModel;
using System.Drawing;
using System.Windows.Forms;
namespace NetOffice.DeveloperToolbox.Controls.Painter
{
/// <summary>
/// Support Painter to create a paint event which is possible to use as overlayer
/// </summary>
public partial class OverlayPainter : Comp... | NetOfficeFw/NetOffice | Toolbox/Toolbox/Controls/Painter/OverlayPainter.cs | C# | mit | 4,964 |
using System;
using System.Diagnostics;
using System.Threading.Tasks;
using Windows.Devices.Enumeration;
using Windows.Devices.I2c;
namespace Lesson_203V2
{
public class BME280_CalibrationData
{
//BME280 Registers
public UInt16 dig_T1 { get; set; }
public Int16 dig_T2 { get; set; }
... | DavidShoe/adafruitsample | Lesson_203V2/FullSolution/BME280.cs | C# | mit | 16,192 |
<?php
/**
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Braintree\Gateway\Response;
use Magento\Payment\Gateway\Response\HandlerInterface;
use Magento\Braintree\Gateway\Helper\SubjectReader;
use Magento\Sales\Api\Data\OrderPaymentInterface;
/... | j-froehlich/magento2_wk | vendor/magento/module-braintree/Gateway/Response/PayPalDetailsHandler.php | PHP | mit | 1,434 |
<?php
namespace PROCERGS\LoginCidadao\CoreBundle\Command;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\Outpu... | gilsondev/login-cidadao | src/PROCERGS/LoginCidadao/CoreBundle/Command/PopulateDatabaseCommand.php | PHP | mit | 7,080 |
(function($)
{
// Some vars
var template = '/field/link';
// Tabs
$(document).on('click', '.adminContext .tabs li', function()
{
// Some vars
var $admincontext = $(this).parents('.adminContext');
var $tabs = $admincontext.find('.tabs');
var $panels = $admincontext.find('.panels');
var currentTab = $(this)... | hands-agency/grandcentral | grandcentral/sirtrevor/template/field/js/link.js | JavaScript | mit | 3,216 |
class JobsController < ApplicationController
before_action :load_job
def show
if @job.completed?
show_completed_job
elsif @job.errored?
show_errored_job
else
show_submitted_job
end
end
protected
def publicly_accessible?
true
end
private
def load_job
@job ||... | BenMQ/coursemology2 | app/controllers/jobs_controller.rb | Ruby | mit | 688 |
<!-- DataTables -->
<script src="<?php echo base_url(); ?>assets/plugins/datatables/jquery.dataTables.min.js"></script>
<script src="<?php echo base_url(); ?>assets/plugins/datatables/dataTables.bootstrap.min.js"></script>
<script type="text/javascript">
$(function () {
$('#tableOrnamen... | reeganaga/SI-lelang | application/views/back/ornamen/custom_js.php | PHP | mit | 3,029 |
from __future__ import unicode_literals, division, absolute_import
import argparse
import logging
import re
import time
from copy import copy
from datetime import datetime, timedelta
from sqlalchemy import (Column, Integer, String, Unicode, DateTime, Boolean,
desc, select, update, delete, Forei... | tvcsantos/Flexget | flexget/plugins/filter/series.py | Python | mit | 70,663 |
package com.meapsoft;
/*
* Copyright 2006-2007 Columbia University.
*
* This file is part of MEAPsoft.
*
* MEAPsoft is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* MEAPso... | CosmicSubspace/NerdyAudio | app/src/main/java/com/meapsoft/FFT.java | Java | mit | 4,463 |
module SS::Model::File
extend ActiveSupport::Concern
extend SS::Translation
include SS::Document
include SS::Reference::User
attr_accessor :in_file, :in_files, :resizing
included do
store_in collection: "ss_files"
seqid :id
field :model, type: String
field :state, type: String, default: "... | togusafish/shirasagi-_-shirasagi | app/models/concerns/ss/model/file.rb | Ruby | mit | 6,055 |
using System.Linq.Expressions;
namespace Orion.Scripting.Ast
{
internal class AstGreaterThanOrEqualOperator : AstOperator
{
public AstGreaterThanOrEqualOperator(string value) : base(value) { }
protected override Expression CreateExpression<T>(ParameterExpression parameter, Expression left, Ex... | mika-f/Orion | Source/Orion.Scripting/Ast/AstGreaterThanOrEqualOperator.cs | C# | mit | 428 |
from django.dispatch import dispatcher
from django.db.models import signals
from django.utils.translation import ugettext_noop as _
try:
from notification import models as notification
def create_notice_types(app, created_models, verbosity, **kwargs):
notification.create_notice_type("swaps_propos... | indro/t2c | apps/external_apps/swaps/management.py | Python | mit | 1,734 |
require 'rails_admin/config/fields/base'
module RailsAdmin
module Config
module Fields
module Types
class CodeMirror < RailsAdmin::Config::Fields::Types::Text
# Register field type for the type loader
RailsAdmin::Config::Fields::Types::register(self)
#Pass the theme a... | 17up/rails_admin | lib/rails_admin/config/fields/types/code_mirror.rb | Ruby | mit | 1,419 |
# encoding: utf-8
require 'logger'
require 'socket'
require 'spec_helper'
require 'girl_friday'
require 'redis'
require 'active_support/core_ext/object'
require 'active_support/json/encoding'
begin
require 'sucker_punch'
require 'sucker_punch/testing/inline'
rescue LoadError
end
describe Rollbar do
let(:notifi... | heshamnaim/rollbar-gem | spec/rollbar_spec.rb | Ruby | mit | 56,294 |
package main
/*
We often need our programs to perform operations on collections of data, like
selecting all items that satisfy a given predicate or mapping all items to a
new collection with a custom function.
In some languages it’s idiomatic to use generic data structures and algorithms.
Go does not support generics... | tsunammis/software-craftsmanship | development/golang/golangbyexample/43-collection-functions/collection-functions.go | GO | mit | 2,608 |
import { Author } from './article/author/author';
import { Extend } from '../core/globals';
import { Deck } from '../decks/deck';
export class Article {
id: number;
author: Author;
title: string;
imageURL: string;
content: string;
game: 'HS' | 'GWENT';
type: 'METAREPORTS' | 'ANNOUNCMENTS' |... | JB1040/fade2karma | src/app/articles/article.ts | TypeScript | mit | 608 |
package main
// CompletionHandler provides possible completions for given input
type CompletionHandler func(input string) []string
// DefaultCompletionHandler simply returns an empty slice.
var DefaultCompletionHandler = func(input string) []string {
return make([]string, 0)
}
var complHandler = DefaultCompletionHa... | sygool/ledisdb | cmd/ledis-cli/complietion.go | GO | mit | 473 |
'use strict';
const blueprintHelpers = require('ember-cli-blueprint-test-helpers/helpers');
const setupTestHooks = blueprintHelpers.setupTestHooks;
const emberNew = blueprintHelpers.emberNew;
const emberGenerateDestroy = blueprintHelpers.emberGenerateDestroy;
const setupPodConfig = blueprintHelpers.setupPodConfig;
con... | kellyselden/ember.js | node-tests/blueprints/mixin-test.js | JavaScript | mit | 11,394 |
package com.swmansion.gesturehandler.react;
import android.os.Build;
import android.view.View;
import android.view.ViewGroup;
import com.facebook.react.uimanager.PointerEvents;
import com.facebook.react.uimanager.ReactPointerEventsView;
import com.facebook.react.views.view.ReactViewGroup;
import com.swmansion.gesture... | BranchMetrics/react-native-branch | examples/androidx-deps/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/react/RNViewConfigurationHelper.java | Java | mit | 2,135 |
module Extropy.Entity {
// State encapsulates the state of a set of entities for a particular frame
export class State {
public id: number;
public tick: number;
private _idToEntity: HashTable<EntityState> = Object.create(null);
private _entities: EntityState[] = [];
p... | extr0py/extropy | src/js/common/Entity/State/State.ts | TypeScript | mit | 790 |
using System;
namespace NHamcrest.Tests.TestClasses
{
public class ClassWithArrayOfClasses
{
public Guid Id { get; set; }
public SimpleFlatClass[] OtherThings { get; set; }
}
} | nhamcrest/NHamcrest | src/NHamcrest.Tests/TestClasses/ClassWithArrayOfClasses.cs | C# | mit | 208 |
/*
* Copyright (c) 2006-2012 Rogério Liesenfeld
* This file is subject to the terms of the MIT license (see LICENSE.txt).
*/
package powermock.examples.simple;
import java.io.*;
import org.junit.*;
import mockit.*;
/**
* <a href="http://code.google.com/p/powermock/source/browse/trunk/examples/simple/src/test/ja... | borisbrodski/jmockit | samples/powermock/test/powermock/examples/simple/Logger_JMockit_Test.java | Java | mit | 1,473 |
//Controller
app.controller('NavbarController', function($scope, $location) {
//Set active navigation bar tab
$scope.isActive = function (viewLocation) {
return viewLocation === $location.path();
};
}); | Vmlweb/MEAN-AngularJS-1 | client/controller.js | JavaScript | mit | 218 |
{
"name": "editor.js",
"url": "https://github.com/ktkaushik/editor.git"
}
| bower/components | packages/editor.js | JavaScript | mit | 78 |
/* ==========================================
* JGraphT : a free Java graph-theory library
* ==========================================
*
* Project Info: http://jgrapht.sourceforge.net/
* Project Creator: Barak Naveh (http://sourceforge.net/users/barak_naveh)
*
* (C) Copyright 2003-2008, by Barak Naveh and Con... | hetmeter/awmm | fender-sb-bdd/src/ags/graph/CycleDetector.java | Java | mit | 6,919 |
#!/usr/bin/env python
# coding:utf8
import ctypes
from utils import Loader
from utils import convert_data
import numpy as np
import api
mv_lib = Loader.get_lib()
class TableHandler(object):
'''`TableHandler` is an interface to sync different kinds of values.
If you are not writing python code based on the... | you-n-g/multiverso | binding/python/multiverso/tables.py | Python | mit | 7,029 |
<?php
namespace Plivo\Exceptions;
/**
* Class PlivoXMLException
* @package Plivo\Exceptions
*/
class PlivoXMLException extends PlivoRestException
{
} | plivo/plivo-php | src/Plivo/Exceptions/PlivoXMLException.php | PHP | mit | 156 |
'use strict';
const dotenv = require('dotenv');
dotenv.load();
const express = require('express');
const debug = require('debug')('ways2go:server');
const morgan = require('morgan');
const cors = require('cors');
const mongoose = require('mongoose');
const Promise = require('bluebird');
const apiRouter = require('./... | dkulp23/ways2goAPI | server.js | JavaScript | mit | 1,137 |
<?php
abstract class f_di_shared extends f_di
{
protected static $_shared = array();
public function __get($name)
{
if (isset(self::$_shared[$name])) {
return $this->{$name} = self::$_shared[$name];
}
return parent::__get($name);
}
} | serafin/fine | src/lib/f/di/shared.php | PHP | mit | 295 |
var conf = require('../config/');
var sha = require('object-hash');
var uuid = require('node-uuid');
var _ = require('underscore');
_.mixin(require('underscore.deep'));
var url = require('url');
var db;
var env = exports.env = conf.name;
var similarFilter = ['type', 'location', 'description.contactnumber'];
var readonl... | sinkingshriek/kaha | routes/utils.js | JavaScript | mit | 7,537 |
module Kamome
class Railtie < Rails::Railtie
initializer "kamome.on_load_active_record" do
ActiveSupport.on_load(:active_record) do
include Kamome::Model
end
end
initializer "kamome.configure" do
Kamome.configure do |config|
config.config_path = Rails.root.join("config/k... | t1732/kamome | lib/kamome/railtie.rb | Ruby | mit | 459 |
using PsISEProjectExplorer.Enums;
using PsISEProjectExplorer.Model;
using PsISEProjectExplorer.Model.DocHierarchy.Nodes;
using PsISEProjectExplorer.Services;
using PsISEProjectExplorer.UI.IseIntegration;
using PsISEProjectExplorer.UI.ViewModel;
using System;
namespace PsISEProjectExplorer.Commands
{
[Co... | mgr32/PsISEProjectExplorer | PsISEProjectExplorer/Commands/OpenItemCommand.cs | C# | mit | 3,259 |
<?php
/*==========================================================*/
//This is a model to finally register a user into the database
//by creating he or she account on the platform
use Illuminate\Auth\UserTrait;
use Illuminate\Auth\UserInterface;
use Illuminate\Auth\Reminders\RemindableTrait;
use Illuminate\Auth\Remi... | ch3nkula/IMS_Soft400 | app/models/RegisterUser.php | PHP | mit | 739 |
(function () {
angular
.module('keylistener')
.directive('keylistener', keylistener);
function keylistener($document, $rootScope, $ionicPopup) {
var directive = {
restrict: 'A',
link: link
};
return directive;
function link() {
var captured = [];
$document.bind('k... | dank-meme-dealership/foosey | frontend/www/js/keylistener/keylistener.directive.js | JavaScript | mit | 1,086 |
#include "../include/structure/fenwick_tree.cpp"
int main() {
int n, q, com, x, y;
scanf("%d%d", &n, &q);
FenwickTree<int> bit(n + 1);
while (q--) {
scanf("%d%d%d", &com, &x, &y);
if (com)
printf("%d\n", bit.sum(x, y + 1));
else
bit.add(x, y);
}
return 0;
}
| asi1024/ContestLibrary | cpp/tests/aoj-DSL_2_B.cpp | C++ | mit | 295 |
import { highlight } from "../../../helpers/highlight"
import { module, test } from "qunit"
module("Unit | Helper | highlight")
test("it works", function(assert) {
let result
result = highlight([], {
phrase: "Something",
part: "Some"
})
assert.equal(
result,
'<mark class="en-select-option-hi... | swastik/en-select | tests/unit/helpers/highlight-test.js | JavaScript | mit | 1,823 |
u1 = User.new(:email => 'louis.merlin@epfl.ch', :first_name => 'Louis', :last_name => 'Merlin')
u1.password = "louis"
u1.password_confirmation = "louis"
u1.save
u2 = User.new(:email => 'patrick.aebischer@epfl.ch', :first_name => 'Patrick', :last_name => 'Aebischer')
u2.password = "patrick"
u2.password_confirmation = "... | louismerlin/trackodoro | populate.rb | Ruby | mit | 594 |
import pytest
from hackathon.constants import VE_PROVIDER, TEMPLATE_STATUS
from hackathon.hmongo.models import User, Template, UserHackathon
from hackathon.hmongo.database import add_super_user
@pytest.fixture(scope="class")
def user1():
# return new user named one
one = User(
name="test_one",
... | juniwang/open-hackathon | open-hackathon-server/src/tests/conftest.py | Python | mit | 1,534 |
<?php
namespace Chamilo\Application\Weblcms\Tool\Action\Component;
use Chamilo\Application\Weblcms\Rights\WeblcmsRights;
use Chamilo\Application\Weblcms\Storage\DataClass\ContentObjectPublication;
use Chamilo\Application\Weblcms\Tool\Action\Manager;
use Chamilo\Core\Repository\ContentObject\Introduction\Storage\DataCl... | cosnicsTHLU/cosnics | src/Chamilo/Application/Weblcms/Tool/Action/Component/IntroductionPublisherComponent.php | PHP | mit | 3,460 |
/**
* 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.logic.v2018_07_01_preview;
import java.util.Coll... | selvasingh/azure-sdk-for-java | sdk/logic/mgmt-v2018_07_01_preview/src/main/java/com/microsoft/azure/management/logic/v2018_07_01_preview/WorkflowState.java | Java | mit | 1,797 |
var EventUtil = {
addHandler: function(element, type, handler){
if (element.addEventListener){
element.addEventListener(type, handler, false);
} else if (element.attachEvent){
element.attachEvent("on" + type, handler);
} else {
element["on" + type] = hand... | SkillsFundingAgency/das-alpha-ui | public/javascripts/custom.js | JavaScript | mit | 7,807 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _7.Exchange_Variable_Values
{
class Program
{
static void Main(string[] args)
{
int a = 5;
int b = 10;
Console.WriteLine("Before:\n... | AlexanderStanev/SoftUni | TechModule/DataTypesVariablesExercises/07. Exchange Variable Values/Program.cs | C# | mit | 501 |
using CubeWorld.World.Generator;
using CubeWorld.Tiles;
using CubeWorld.World.Lights;
using CubeWorld.Configuration;
using CubeWorld.Items;
using CubeWorld.Avatars;
using CubeWorld.Gameplay;
namespace CubeWorld.Configuration
{
public class Config
{
public ConfigWorldSize worldSize;
public Conf... | yizhi401/NoahsArk | CubeWorldUnity/Assets/SourceCode/CubeWorld/Configuration/Config.cs | C# | mit | 639 |