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 |
|---|---|---|---|---|---|
/*
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.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 |
/*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 |
/**
*/
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 |
# 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 |
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 |
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 |
# 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 |
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 |
//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 |
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 |
/**
* 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 |
<TS language="fa" version="2.0">
<context>
<name>AboutDialog</name>
<message>
<source>About Argentum Core</source>
<translation type="unfinished"/>
</message>
<message>
<source><b>Argentum Core</b> version</source>
<translation type="unfinished"/>
</messag... | Cryptcollector/ARG2.0 | src/qt/locale/bitcoin_fa.ts | TypeScript | mit | 135,299 |
import { readFileSync } from 'fs';
import { createServer } from 'http';
import { parse } from 'url';
import { join } from 'path';
var server = createServer(function(req, res) {
let path = parse(req.url, true).query.path;
// BAD: This could read any file on the file system
res.write(readFileSync(join("public", p... | github/codeql | javascript/ql/test/query-tests/Security/CWE-022/TaintedPath/TaintedPath-es6.js | JavaScript | mit | 332 |
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
#nullable enable
#pragma warning disable CS0618 // Type or member is obsolete
using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Drawing;
using DocumentForma... | ThomasBarnekow/Open-XML-SDK | src/DocumentFormat.OpenXml/GeneratedCode/schemas_microsoft_com_office_drawing_2012_chart.g.cs | C# | mit | 211,463 |
<?php
/**
* (c) Vincent Patry
* This file is part of the Rebond package
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/
namespace Rebond\Enums\Core;
use Rebond\Enums\AbstractEnum;
class ResponseFormat extends AbstractEnum
{
c... | vincium/rebond-framework | src/Rebond/Enums/Core/ResponseFormat.php | PHP | mit | 357 |
#include <cctype>
#include <iostream>
#include <map>
#include <string>
using namespace std;
constexpr char found_symbol {'#'};
inline
void use_io_optimizations()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
}
inline char opposite(char symbol)
{
return islower(symbol) ? toupper(symbol) : tolower... | gshopov/competitive-programming-archive | codeforces/round-293/div-2/tanya_and_postcard.cpp | C++ | mit | 1,111 |
from django.core.exceptions import ObjectDoesNotExist
from django.http import HttpResponseRedirect
from django.contrib import messages
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.template.lo... | afriestad/interlecture | interlecture/interauth/views.py | Python | mit | 4,933 |
// This file is licensed to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Linq;
using System.Xml.Linq;
using Spines.Utility;
namespace Spines.Tenhou.Client
{
/// <summary>
/// Data provided by the server when a player discards a tile.
/// </summary>
... | spinesheath/HanaMahjong | Spines.Mahjong/Spines.Tenhou.Client/DiscardInformation.cs | C# | mit | 1,186 |
package besa_adaptado.adaptador;
import adaptation.common.query.AdaptationQueryAES;
public class Consulta extends AdaptationQueryAES {
public Consulta(String query) {
setQuery(query);
}
}
| Coregraph/Ayllu | JigSaw - AYPUY - CS/AES_MATEO/src/besa_adaptado/adaptador/Consulta.java | Java | mit | 217 |
var clients = require('./../../data.js').clients;
module.exports.getId = function(client) {
return client.id;
};
module.exports.getRedirectUri = function(client) {
return client.redirectUri;
};
module.exports.fetchById = function(clientId, cb) {
for (var i in clients) {
if (clientId == clients[i]... | ojengwa/node-oauth20-provider | test/server/model/memory/oauth2/client.js | JavaScript | mit | 470 |
#!/usr/bin/env node
/*
Logfella
Copyright (c) 2015 - 2019 Cédric Ronvel
The MIT License (MIT)
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 limitat... | cronvel/logger-kit | sample/net-server-test.js | JavaScript | mit | 2,053 |
/*
* Copyright (C) 2009 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditio... | tsiry95/openshift-strongloop-cartridge | strongloop/node_modules/strong-arc/devtools/frontend/common/Settings.js | JavaScript | mit | 27,489 |
<?php
return array(
'AD' => 'Andorra',
'AE' => 'Sameindu Emirríkini',
'AF' => 'Afganistan',
'AG' => 'Antigua og Barbuda',
'AI' => 'Anguilla',
'AL' => 'Albania',
'AM' => 'Armenia',
'AN' => 'Niðurlendsku Antilloyggjar',
'AO' => 'Angola',
'AQ' => 'Antarktis',
'AR' => 'Argentina',
'AS' => 'Amerikanska Sámoa',
... | forxer/okatea | Okatea/Tao/L10n/country-list/fo_FO/country.php | PHP | mit | 5,531 |
import {Component, View, FORM_DIRECTIVES, EventEmitter, NgFor} from 'angular2/angular2';
@Component({
selector: 'font-family-component',
inputs: ['fontFamily'],
outputs: ['fontFamilyChange']
})
@View({
template: `
<select class="form-control" [ng-model]="fontFamily" (input)="fontFamilyChange.next($event.ta... | yanivefraim/theme-creator-demo-angular-2 | app/components/font-family-component/font-family-component.ts | TypeScript | mit | 656 |
class Myaccount::BaseController < ApplicationController
before_filter :require_user
protected
def ssl_required?
ssl_supported?
end
end | drhenner/elzzad | app/controllers/myaccount/base_controller.rb | Ruby | mit | 149 |
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddIndexesToPosts extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('posts', function ... | DoSomething/rogue | database/migrations/2017_12_08_203149_add_indexes_to_posts.php | PHP | mit | 763 |
package types
import (
"reflect"
"testing"
"time"
)
type structTest struct {
Int int
IntArray []int
Float float32
FloatArray []float64
String string
StringArray []string
Blob []byte
BlobArray [][]byte
Time time.Time
}
var marshallTests = []struct {
item structTest... | cyberdelia/dynamodb | types/attributes_test.go | GO | mit | 1,829 |
/**
* 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.datamigration.v2017_11_15_preview.implementation;... | selvasingh/azure-sdk-for-java | sdk/datamigration/mgmt-v2017_11_15_preview/src/main/java/com/microsoft/azure/management/datamigration/v2017_11_15_preview/implementation/IdParsingUtils.java | Java | mit | 1,762 |