repo_name stringlengths 4 116 | path stringlengths 4 379 | size stringlengths 1 7 | content stringlengths 3 1.05M | license stringclasses 15
values |
|---|---|---|---|---|
think-01/oauth | examples/laravel5.php | 804 | <?php
// Add the ServiceProvider
// Create the oauth-providers config file
// Create a route:
Route::get('login/{provider}', ['uses' => 'SocialController@login']);
// Create a controller:
use CodeZero\OAuth\Contracts\Authenticator;
use Illuminate\Routing\Controller;
class SocialController extends Controller
{
... | mit |
ezekielthao/mozu-dotnet | Mozu.Api/Contracts/ProductRuntime/ProductSearchResult.cs | 1578 |
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Codezu.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------... | mit |
souman/baseapp | app/controllers/application_controller.rb | 615 | class ApplicationController < ActionController::Base
protect_from_forgery
before_filter :require_login
def render404
render :file => File.join(Rails.root, 'public', '404.html'), :status => 404, :layout => false
return true
end
private
def require_login
unless (current_user || logging_in_or_si... | mit |
kevinzhwl/ObjectARXMod | 2000/IESDK/INCLUDE/IEAPIENC.H | 2193 | //
// Copyright (C) 1992-1997 by Autodesk, Inc.
//
// Permission to use, copy, modify, and distribute this software in
// object code form for any purpose and without fee is hereby granted,
// provided that the above copyright notice appears in all copies and
// that both that copyright notice and the limited war... | mit |
reidsteven75/test2 | app/routes/activitys.js | 129 | // routes/activitys.js
export default Ember.Route.extend({
model: function() {
return this.store.find('activity');
}
});
| mit |
EvgeniiVoskoboinik/arendahashtag-client | src/app/shared/gallery/ngx-gallery-animation.model.ts | 147 | export class NgxGalleryAnimation {
static Fade = 'fade';
static Slide = 'slide';
static Rotate = 'rotate';
static Zoom = 'zoom';
}
| mit |
unixcharles/refinerycms-blog | app/models/blog_mailer.rb | 887 | class BlogMailer < ActionMailer::Base
def notification(comment, request)
subject "New comment on #{comment.blog.title}"
recipients BlogSetting.notification_email
from from_address(request)
sent_on Time.now
body :comment => comment
end
def confirmation(comment, request)... | mit |
gterzian/exam | tests/test_decorators.py | 2217 | from tests import TestCase
from exam.decorators import fixture
class Outer(object):
@classmethod
def meth(cls):
return cls, 'from method'
@classmethod
def reflective_meth(cls, arg):
return cls, arg
class Dummy(object):
outside = 'value from outside'
@fixture
def numb... | mit |
NadzwyczajnaGrupaRobocza/papuc_exercises | lm/game01/World.hpp | 876 | #pragma once
#include <SFML/Graphics.hpp>
#include "Board.hpp"
#include <vector>
namespace lmg01
{
class World
{
public:
World(sf::View);
void advance(const sf::Time& tick, const sf::Vector2f& playerMove);
void draw(sf::RenderTarget&);
private:
std::vector<sf::CircleShape> createObstacles();
void d... | mit |
ceolter/ag-grid | charts-packages/ag-charts-community/dist/cjs/util/equal.test.js | 1246 | "use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var equal_1 = require("./equal");
describe('equal', function () {
test('strings', function () {
expect(equal_1.equal(['a', 'b'], ['a', 'b'])).toBe(true);
expect(equal_1.equal(['a', 'b'], ['a', 'b', 'c'])).toBe(false);
... | mit |
oliviertassinari/material-ui | packages/mui-icons-material/lib/esm/LockClock.js | 522 | import createSvgIcon from './utils/createSvgIcon';
import { jsx as _jsx } from "react/jsx-runtime";
export default createSvgIcon( /*#__PURE__*/_jsx("path", {
d: "m14.5 14.2 2.9 1.7-.8 1.3L13 15v-5h1.5v4.2zM22 14c0 4.41-3.59 8-8 8-2.02 0-3.86-.76-5.27-2H4c-1.15 0-2-.85-2-2V9c0-1.12.89-1.96 2-2v-.5C4 4.01 6.01 2 8.5 2c... | mit |
TakayukiHoshi1984/DeviceConnect-JS | dConnectSDKForJavascriptTest/tests/profiles/setting_abnormal.js | 28012 | QUnit.module('Setting Profile Abnormal Test', {
before: function() {
init();
}
});
/**
* Settingプロファイルの異常系テストを行うクラス。
* @class
*/
let SettingProfileAbnormalTest = {};
/**
* 定義されていないkindのボリュームを取得するテストを行う。
* <h3>【HTTP通信】</h3>
* <p id="test">
* Method: GET<br/>
* Path: /setting/displayvolume?serviceId=xxx... | mit |
enettolima/magento-training | magento2ce/app/code/Magento/Theme/Console/Command/ThemeUninstallCommand.php | 12060 | <?php
/**
* Copyright © 2016 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Theme\Console\Command;
use Magento\Framework\App\Area;
use Magento\Framework\App\Cache;
use Magento\Framework\App\MaintenanceMode;
use Magento\Framework\App\State\CleanupFiles;
use Magento\Framewo... | mit |
darshanhs90/Java-InterviewPrep | src/May2021GoogLeetcode/_0428SerializeAndDeserializeNaryTree.java | 3349 | package May2021GoogLeetcode;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
public class _0428SerializeAndDeserializeNaryTree {
public static void main(String[] args) {
Codec codec = new Codec();
Node n1 = new Node(1);
Node n2 =... | mit |
juniorgasparotto/MarkdownMerge | src/MarkdownGenerator/Dependences/Markdig/Extensions/SmartyPants/SmartyPantsExtension.cs | 1681 | // Copyright (c) Alexandre Mutel. All rights reserved.
// This file is licensed under the BSD-Clause 2 license.
// See the license.txt file in the project root for more information.
using Markdig.Parsers.Inlines;
using Markdig.Renderers;
namespace Markdig.Extensions.SmartyPants
{
/// <summary>
/// Extension... | mit |
Zarel/Pokemon-Showdown | test/sim/moves/focuspunch.js | 5589 | 'use strict';
const assert = require('./../../assert');
const common = require('./../../common');
let battle;
describe('Focus Punch', function () {
afterEach(function () {
battle.destroy();
});
it(`should cause the user to lose focus if hit by an attacking move`, function () {
battle = common.createBattle([[... | mit |
am-kantox/forkforge | lib/forkforge/internal/unicode_data.rb | 2929 | # encoding: utf-8
require 'forkforge/internal/monkeypatches'
require 'forkforge/internal/unicode_org_file'
require 'forkforge/internal/code_point'
require 'forkforge/internal/character_decomposition_mapping'
module Forkforge
module UnicodeData
include UnicodeOrgFileFormat
LOCAL = 'data'
REMOTE = 'Publi... | mit |
jamemackson/lux | flow-typed/npm/rollup-plugin-node-resolve_vx.x.x.js | 1774 | // flow-typed signature: 2ef7f48018e4a4117b5a5d0da443e442
// flow-typed version: <<STUB>>/rollup-plugin-node-resolve_v3.0.0/flow_v0.46.0
/**
* This is an autogenerated libdef stub for:
*
* 'rollup-plugin-node-resolve'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage y... | mit |
mrkeng/aurora | aurora_app/deployments/models.py | 2946 | import time
import os
from datetime import datetime
from flask import url_for, current_app
from ..extensions import db
from ..tasks.models import Task
from .constants import STATUSES, BOOTSTRAP_ALERTS
deployments_tasks_table = db.Table('deployments_tasks', db.Model.metadata,
db.C... | mit |
patricklodder/blockio-java | src/main/java/io/block/api/utils/Constants.java | 2832 | package io.block.api.utils;
public class Constants {
public static final String BASE_URL = "https://block.io/api/v";
public static final String API_VERSION = "2";
public static class Methods {
public static final String GET_NEW_ADDRESS = "get_new_address";
public static final String GET_A... | mit |
artsy/force-public | src/lib/volley.ts | 1654 | import { data as sd } from "sharify"
import request from "superagent"
import {
getDomComplete,
getDomContentLoadedEnd,
getDomContentLoadedStart,
getFirstContentfulPaint,
getFirstPaint,
getLoadEventEnd,
getTTI,
} from "./userPerformanceMetrics"
interface MetricMap {
[metricName: string]: () => Promise<n... | mit |
TimeDoctorLLC/td-html-app | public/js/app.js | 1230 | "use strict";
var App = angular.module("todo", ["ui.sortable", "LocalStorageModule", 'js-data'])
.config(function (DSProvider) {
DSProvider.defaults.basePath = "https://td-rest-api.herokuapp.com:443/api/1.0"; // etc.
})
.run(function (DS, DSHttpAdapter) {
// @todo: add proper auth
DSHttpAdapter.defa... | mit |
ozthekoder/chatter | public/modules/core/controllers/right.client.controller.js | 283 | 'use strict';
angular.module('core').controller('RightController', ['$scope', 'Authentication', 'Navigation',
function($scope, Authentication, Menus) {
$scope.authentication = Authentication;
$scope.$on('$stateChangeSuccess', function() {
});
}
]);
| mit |
mithrandi/txspinneret | txspinneret/util.py | 2722 | import cgi
import datetime
from collections import OrderedDict
from functools import wraps
from itertools import chain
# Why does Python not have this built-in?
identity = lambda x: x
def _parseAccept(headers):
"""
Parse and sort an ``Accept`` header.
The header is sorted according to the ``q`` parame... | mit |
hfcjweinstock/EncompassREST | src/EncompassRest/Services/Verification/EV4506TTaxReturnFor.cs | 585 | using System.Runtime.Serialization;
namespace EncompassRest.Services.Verification
{
/// <summary>
/// EV4506TTaxReturnFor
/// </summary>
public enum EV4506TTaxReturnFor
{
/// <summary>
/// borrower
/// </summary>
[EnumMember(Value = "borrower")]
Borrower = 0... | mit |
junedomingo/react-native-navigation | src/deprecated/platformSpecificDeprecated.ios.js | 20774 | /*eslint-disable*/
import Navigation from './../Navigation';
import Controllers, {Modal, Notification, ScreenUtils} from './controllers';
const React = Controllers.hijackReact();
const {
ControllerRegistry,
TabBarControllerIOS,
NavigationControllerIOS,
DrawerControllerIOS
} = React;
import _ from 'lodash';
imp... | mit |
royalwang/youbbs | templates/default/ios_tag.php | 2132 | <?php
if (!defined('IN_SAESPOT')) exit('error: 403 Access Denied');
echo '
<div class="nav-title">
<i class="fa fa-angle-double-right"></i> ',$title;
if($cur_user['notic']){
$notic_n = count(array_unique(explode(',', $cur_user['notic'])))-1;
echo'<span class="nopic"><a href="/notifications"><i ... | mit |
Cylix/cpp_redis | docs/html/search/all_12.js | 2640 | var searchData=
[
['_7earray_5fbuilder',['~array_builder',['../classcpp__redis_1_1builders_1_1array__builder.html#ae6a0cd0743b6b0a21f9c3d44fd31ac17',1,'cpp_redis::builders::array_builder']]],
['_7ebulk_5fstring_5fbuilder',['~bulk_string_builder',['../classcpp__redis_1_1builders_1_1bulk__string__builder.html#a88c714... | mit |
ceolter/ag-grid | charts-packages/ag-charts-community/dist/cjs/chart/themes/solarLight.js | 1545 | "use strict";
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnPrope... | mit |
typeorm/typeorm | sample/sample4-many-to-many/entity/PostMetadata.ts | 341 | import {Column, Entity, ManyToMany, PrimaryGeneratedColumn} from "../../../src/index";
import {Post} from "./Post";
@Entity("sample4_post_metadata")
export class PostMetadata {
@PrimaryGeneratedColumn()
id: number;
@Column()
description: string;
@ManyToMany(type => Post, post => post.metadatas)
... | mit |
BeetoGuy/BetterWithMods | src/main/java/betterwithmods/module/compat/multipart/MultipartSiding.java | 2494 | package betterwithmods.module.compat.multipart;
import betterwithmods.module.gameplay.miniblocks.ItemMini;
import betterwithmods.module.gameplay.miniblocks.blocks.BlockMini;
import betterwithmods.module.gameplay.miniblocks.blocks.BlockSiding;
import betterwithmods.module.gameplay.miniblocks.orientations.SidingOrientat... | mit |
postmates/geopy | geopy/geocoders/mapquest.py | 4192 | """
:class:`.MapQuest` geocoder.
"""
from geopy.compat import urlencode
from geopy.geocoders.base import Geocoder, DEFAULT_FORMAT_STRING, \
DEFAULT_TIMEOUT, DEFAULT_SCHEME
from geopy.util import logger, join_filter
from geopy import exc
class MapQuest(Geocoder): # pylint: disable=W0223
"""
MapQuest geoco... | mit |
rtahmasbi/GeneEvolve | Library/libStatGen/bam/test/ValidationTest.cpp | 8169 | /*
* Copyright (C) 2010 Regents of the University of Michigan
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later v... | mit |
activecollab/monitoring-bundle | src/SupportYard/MonitoringBundle/Tests/Unit/Monolog/QueryExecutionTest.php | 1025 | <?php
namespace SupportYard\MonitoringBundle\Tests\Unit\Monolog;
use SupportYard\FrameworkBundle\Test\TestCase;
use SupportYard\MonitoringBundle\Monolog\QueryExecution;
class QueryExecutionTest extends TestCase
{
/**
* @test
*/
public function checkInitialState()
{
$this->assertSame(0, ... | mit |
haadcode/orbit-db | src/migrations/0.21-0.22.js | 1337 | const path = require('path')
const fs = require('../fs-shim')
const Cache = require('orbit-db-cache')
const Logger = require('logplease')
const logger = Logger.create('orbit-db')
Logger.setLogLevel('ERROR')
async function migrate (OrbitDB, options, dbAddress) {
let oldCache = OrbitDB.caches[options.directory] ? Or... | mit |
moljac/sharpforce | Sharpforce/Extensions.cs | 2419 | using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using Newtonsoft.Json;
namespace Sharpforce
{
public static class Extensions
{
/// <summary>
/// Extends Type class with IsAnonymous method:
/// http://www.liensberger.it... | mit |
MarkEWaite/jenkins | core/src/main/java/hudson/tools/ToolLocationNodeProperty.java | 6165 | /*
* The MIT License
*
* Copyright (c) 2004-2011, Sun Microsystems, Inc., Tom Huybrechts, Seiji Sogabe
*
* 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 ... | mit |
terotic/digihel | events/views.py | 611 | from django.shortcuts import render
from django.http import HttpResponse, HttpResponseNotFound
from events.models import EventsIndexPage
# Create your views here.
def event_data(request):
future = request.GET.get('future', 'False')
try:
if future.lower() == 'true':
data = EventsIndexPage.... | mit |
stamepicmorg/Easy-ADB-Screenshoter | Sources/Screenshoter/Properties/AssemblyInfo.cs | 2044 | using System.Reflection;
using System.Runtime.InteropServices;
// Управление общими сведениями о сборке осуществляется с помощью
// набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения,
// связанные со сборкой.
[assembly: AssemblyTitle("Easy ADB Screenshoter")]
[assembly: AssemblyDescription("... | mit |
TruDB/tru-type-lib | src/js/common/services/std-operator-lookup.js | 2066 | (function(){
'use strict';
var module = angular.module('std.operator.lookup', []);
module.factory('stdOperatorLookup',
[
function() {
var operatorLookup = {
'equal': {
operator: 'eq',
operatorImage: 'ic... | mit |
JustynaStebel/l | lib/generators/l/facebook/templates/routes.rb | 94 | resource :facebook, controller: :facebook, only: [] do
get :index
post :index
end
| mit |
morishitter/postcss-annotation-include | index.js | 5865 | var parse = require('css-annotation').parse
module.exports = function plugin (options) {
options = options || {}
return function (root) {
css = options.css !== undefined ? options.css : root;
removeCheck = options.removeBase !== undefined ? options.removeBase : true;
var matchedRule... | mit |
sleepinglion/sleepinglion | node_modules/@babel/helper-optimise-call-expression/lib/index.js | 1668 | "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = _default;
var t = _interopRequireWildcard(require("@babel/types"));
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () ... | mit |
guotao2000/ecmall | temp/caches/0440/6316b14f786e2567eef947ca88078dd1.cache.php | 15769 | <?php
/**
* @Created By ECMall PhpCacheServer
* @Time:2015-01-17 19:40:58
*/
if(filemtime(__FILE__) + 1800 < time())return false;
return array (
'id' => 4012,
'goods' =>
array (
'goods_id' => '4012',
'store_id' => '132',
'type' => 'material',
'goods_name' => '【39元区】羊毛外套 羊绒大衣',
... | mit |
z38/postmark-inbound-php | example/with_composer/vendor/composer/autoload_namespaces.php | 207 | <?php
// autoload_namespace.php generated by Composer
$vendorDir = dirname(__DIR__);
$baseDir = dirname($vendorDir);
return array(
'Postmark' => $vendorDir . '/jjaffeux/postmark-inbound-php/lib/',
);
| mit |
imasaru/sabbath-school-android-2 | app/src/main/java/com/cryart/sabbathschool/misc/SSConstants.java | 5633 | /*
* Copyright (c) 2016 Adventech <info@adventech.io>
*
* 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, modi... | mit |
jooorooo/embed | tests/ImagesBlacklistTest.php | 1640 | <?php
class ImagesBlacklistTest extends TestCaseBase
{
public function testPlainText()
{
$this->assertEmbed(
'https://github.com/oscarotero/Embed',
[
'image' => 'https://assets-cdn.github.com/images/spinners/octocat-spinner-32.gif',
], [
... | mit |
npmweb/community-service | app/config/myconfig.php | 189 | <?php
return array(
'string' => 'This is a config that stays the same!',
'inherited' => 'This is inherited; this is the default version.',
'array' => ['this is','an array']
);
| mit |
lgollut/material-ui | packages/material-ui-icons/src/SportsSoccerRounded.js | 716 | import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 3.3l1.35-.95c1.82.56 3.37 1.76 4.38 3.34l-.39 1.34-1.35.46L13 6.7V5.3zm-3.35-.95L11 5.3v1.4L7.01 9.49l-1.35-.46-.39-1.34c1.01-... | mit |
justinshalom/CD | AngleSharp/AngleSharp/Dom/Html/HtmlParamElement.cs | 920 | namespace AngleSharp.Dom.Html
{
using AngleSharp.Extensions;
using AngleSharp.Html;
using System;
/// <summary>
/// Represents a param element.
/// </summary>
sealed class HtmlParamElement : HtmlElement, IHtmlParamElement
{
#region ctor
public HtmlParamElement(Document... | mit |
qoobaa/sms | vendor/rails/actionpack/lib/action_view/helpers/date_helper.rb | 48993 | require "date"
require 'action_view/helpers/tag_helper'
module ActionView
module Helpers
# The Date Helper primarily creates select/option tags for different kinds of dates and date elements. All of the
# select-type methods share a number of common options that are as follows:
#
# * <tt>:prefix</tt>... | mit |
akrabat/Twig-View | tests/TwigTest.php | 5637 | <?php
/**
* Slim Framework (http://slimframework.com)
*
* @link https://github.com/codeguy/Slim
* @copyright Copyright (c) 2011-2015 Josh Lockhart
* @license https://github.com/codeguy/Slim/blob/master/LICENSE (MIT License)
*/
namespace Slim\Tests\Views;
use Slim\Views\Twig;
require dirname(__DIR__) . '/... | mit |
laemp/gruschen | gruschen/metrics/dtw_delta.py | 1564 | import numpy as np
# own dynamic time warping - squared
def get_metric(s, t):
return _get_dtw_matrix(s, t, _point_cost_sqr)[-1, -1]
def _get_dtw_matrix(s, t, point_norm):
ds = s[1:] - s[0:-1]
s = s[1:]
dt = t[1:] - t[0:-1]
t = t[1:]
n = len(s)
m = len(t)
dtw = np.empty((n, m))
c... | mit |
abhishekgahlot/kivy | kivy/resources.py | 1557 | '''
Resources management
====================
Resource management can be a pain if you have multiple paths and projects. Kivy
offers 2 functions for searching for specific resources across a list of
paths.
'''
__all__ = ('resource_find', 'resource_add_path', 'resource_remove_path')
from os.path import join, dirname,... | mit |
mohayonao/subcollider | src/lib/bubble.js | 570 | sc.define("bubble", {
Array: function(depth, levels) {
depth = depth === void 0 ? 0 : depth;
levels = levels === void 0 ? 1 : levels;
if (depth <= 0) {
if (levels <= 1) { return [this]; }
return [this.bubble(depth, levels-1)];
}
return this.map(function(item) {
return item.bubb... | mit |
MichaelTheLi/guppies | src/app/models/Document/Field/FieldTypeModel.php | 690 | <?php
namespace models\Document\Field;
use RedBeanPHP\Facade as R;
class FieldTypeModel{
const BEEN_NAME = "fieldtype";
/**
*
*/
static function FindByCode($code){
$bean = R::findOne( self::BEEN_NAME, ' code = ? ', [ $code ]);
if ( !isset($bean["id"]) ) {
return null... | mit |
JHKennedy4/nqr-client | jspm_packages/npm/ua-parser-js@0.7.9/package.js | 350 | /* */
"format cjs";
Package.describe({
name: 'faisalman:ua-parser-js',
version: '0.7.9',
summary: 'Lightweight JavaScript-based user-agent string parser',
git: 'https://github.com/faisalman/ua-parser-js.git',
documentation: 'readme.md'
});
Package.on_use(function (api) {
api.export("UAParser");
api.addF... | mit |
oliviertassinari/material-ui | packages/mui-icons-material/lib/CompareArrowsOutlined.js | 549 | "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")... | mit |
tomphp/braintree_ruby | lib/braintree/payment_method_gateway.rb | 4774 | module Braintree
class PaymentMethodGateway # :nodoc:
def initialize(gateway)
@gateway = gateway
@config = gateway.config
@config.assert_has_access_token_or_keys
end
def create(attributes)
Util.verify_keys(PaymentMethodGateway._create_signature, attributes)
_do_create("/paym... | mit |
limafabio/lazycf | tests/Test_LazyCF.py | 1628 | #!/usr/bin/py
import os
import sys
import shutil
import unittest
sys.path.append(os.path.abspath('..'))
from sample.LazyCF import LazyCF
from sample.CodeForces import CodeForces
class TestLazyCF(unittest.TestCase):
def test__init__(self):
lazy_test = LazyCF()
self.assertEqual(str(lazy_test.__cla... | mit |
TransmediaLab/KsuQuest | app/controllers/admin/reports_controller.rb | 596 | class Admin::ReportsController < ApplicationController
layout "admin"
before_filter :login_required, :admin_required
def player_timelines
@players = User.players
end
def player_details
@players = User.players
render xlsx: "player_details", filename: "player_details_#{Date.today}"
end
def t... | mit |
btcgroup2/bitcoin | src/bitcoin-tx.cpp | 29368 | // Copyright (c) 2009-2016 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#if defined(HAVE_CONFIG_H)
#include "config/bitcoin-config.h"
#endif
#include "base58.h"
#include "clientversion.h"
#include... | mit |
beafus/Living-Meki-Platform | wordpress/wp-content/plugins/contact-form-7-to-database-extension/contact-form-7-db.php | 3173 | <?php
/*
Plugin Name: Contact Form DB
Plugin URI: http://wordpress.org/extend/plugins/contact-form-7-to-database-extension/
Version: 2.9.7
Author: Michael Simpson
Description: Save form submissions to the database from <a href="http://wordpress.org/extend/plugins/contact-form-7/">Contact Form 7</a>... | mit |
demoxu/blog | app/Http/Controllers/Api/ArticleController.php | 2319 | <?php
namespace App\Http\Controllers\Api;
use App\Http\Requests\ArticleRequest;
use App\Repositories\ArticleRepository;
class ArticleController extends ApiController
{
protected $article;
public function __construct(ArticleRepository $article)
{
parent::__construct();
$this->article = $... | mit |
pagarme/teleport | action/action.go | 454 | package action
type Action interface {
// Execute the given action
Execute(c *Context) error
// Returns whether current action should be executed
// for a targetExpression
Filter(targetExpression string) bool
// Returns whether the action needs to be batched separately to ensure
// consistency. Some actions can... | mit |
rbecheras/challengesplatform | db/migrate/20130520154536_add_image_to_challenges.rb | 120 | class AddImageToChallenges < ActiveRecord::Migration
def change
add_column :challenges, :image, :string
end
end
| mit |
bewallyt/Kalendr | pre_signup/serializers.py | 2785 | '''
Serializer for SignUp objects
Question: If SignUp uses customized manager
'''
from rest_framework import serializers
from pre_signup.models import PrefSignUp, PrefTimeBlock, PrefSignUpSlot, SignUpPreference
from authentication.models import Account
class PrefSignUpSlotSerializer(serializers.ModelSerialize... | mit |
tmcgee/cmv-wab-widgets | wab/2.13/widgets/Visibility/setting/nls/lt/strings.js | 1476 | define({
"taskUrl": "Matymo lauko paslaugos URL",
"portalURL": "Nurodykite ArcGIS Online organizacijos arba Portal for ArcGIS URL",
"portalURLError": "Sukonfigūruotas jūsų ArcGIS Online organizacijos arba Portal for ArcGIS URL netinkamas.",
"privilegeError": "Jūsų naudotojo rolė negali vykdyti analizės. Kad gal... | mit |
hmc-cs-lnorgaard/MLCH | script_editor/config/environments/production.rb | 3586 | Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests.
config.cache_classes = true
# Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both threaded web serve... | mit |
eggsandbeer/yfa | src/public/javascripts/controllers.js | 1973 | /* Controllers */
angular.module('myApp.controllers', ['ui.bootstrap']).
controller('MyCtrl1', [function () {
"use strict";
if(console && console.log) {
console.log('My Controller 1');
}
}])
.controller('MyCtrl2', [function () {
"use strict";
if(console &&... | mit |
jhelbig/postman-linux-app | app/resources/app/node_modules/waterline-utils/test/unit/converter/sum.test.js | 845 | var Test = require('../../support/convert-runner');
describe('Converter :: ', function() {
describe('Sums :: ', function() {
it('should generate a sum query', function() {
Test({
criteria: {
model: 'user',
method: 'sum',
criteria: {
where: {
a... | mit |
regalii/regaliator | test/regaliator/v32/bill_test.rb | 2366 | require 'test_helper'
module Regaliator
module V32
class BillTest < Minitest::Test
def setup
@config = Configuration.new.tap do |config|
config.version = API_VERSION
config.api_key = 'testing'
config.secret_key = 'testing'
config.host = 'apix.rega... | mit |
nota-ja/feedbin | app/models/feed_fetcher.rb | 7587 | class FeedFetcher
attr_accessor :feed, :feed_options
def initialize(url, site_url = nil)
@url = normalize_url(url)
@site_url = normalize_url(site_url) if site_url
@feed = nil
@raw_feed = nil
@parsed_feed = nil
@feed_options = []
end
def create_feed!
unles... | mit |
mollstam/UnrealPy | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/db-4.7.25.0/examples_java/src/collections/ship/sentity/Supplier.java | 1956 | /*-
* See the file LICENSE for redistribution information.
*
* Copyright (c) 2002,2008 Oracle. All rights reserved.
*
* $Id: Supplier.java 63573 2008-05-23 21:43:21Z trent.nelson $
*/
package collections.ship.sentity;
import java.io.Serializable;
/**
* A Supplier represents the combined key/data pair for a s... | mit |
agray/nunit | src/NUnitFramework/tests/Internal/CallContextTests.cs | 5329 | // ***********************************************************************
// Copyright (c) 2007 Charlie Poole, Rob Prouse
//
// 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 restri... | mit |
dynamicguy/gpweb | src/vendor/symfony/src/Symfony/Framework/DoctrineBundle/Command/GenerateProxiesDoctrineCommand.php | 1642 | <?php
namespace Symfony\Framework\DoctrineBundle\Command;
use Symfony\Components\Console\Input\InputArgument;
use Symfony\Components\Console\Input\InputOption;
use Symfony\Components\Console\Input\InputInterface;
use Symfony\Components\Console\Output\OutputInterface;
use Symfony\Components\Console\Output\Output;
use ... | mit |
adamkammeyer/scrum-roulette | src/App/Helper/RandomEmployee.php | 1299 | <?php
namespace App\Helper;
class RandomEmployee
{
public function __construct()
{
$this->employees = ['Ben', 'Shawn', 'Ryan', 'Nick', 'Morgan', 'Zach', 'Brock'];
$this->number = 1;
}
public function getRandomEmployee()
{
$return = [];
for ($i=0; $i<$this->numbe... | mit |
ezekielthao/mozu-dotnet | Mozu.Api/Contracts/Reference/ContentLocale.cs | 914 |
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by Codezu.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------... | mit |
gevorg/http-auth | examples/digest.js | 505 | // HTTP module
const http = require("http");
// Authentication module.
const auth = require("../src/http-auth");
const digest = auth.digest({
realm: "Simon Area.",
file: __dirname + "/../data/users.htdigest" // vivi:anna, sona:testpass
});
// Creating new HTTP server.
http
.createServer(
digest.check((req, ... | mit |
kyleshay/ember-route-alias | app/mixins/rel-link-to.js | 64 | export { default } from 'ember-route-alias/mixins/rel-link-to';
| mit |
unaio/una | modules/boonex/english/updates/11.0.2_11.0.3/source/install/config.php | 1507 | <?php
/**
* Copyright (c) UNA, Inc - https://una.io
* MIT License - https://opensource.org/licenses/MIT
*
* @defgroup English English language
* @ingroup UnaModules
*
* @{
*/
$aConfig = array(
/**
* Main Section.
*/
'type' => BX_DOL_MODULE_TYPE_LANGUAGE,
'name' => 'bx_en',
'tit... | mit |
IlfirinIlfirin/shavercoin | src/qt/locale/bitcoin_uk.ts | 123572 | <?xml version="1.0" ?><!DOCTYPE TS><TS language="uk" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Shavercoin</source>
<translation>Про Shavercoin</translation>
</... | mit |
andyshao/Design-Patterns-in-CSharp | Bridge/ConcreteImplementor.cs | 653 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Bridge
{
public class ConcreteImplementor1 : Impementor
{
public void doPaint(string brush)
{
Console.WriteLine("ConcreteImplementor1");
}
}
public class ConcreteImpleme... | mit |
wordsaretoys/4est | rise/com/wordsaretoys/rise/glwrapper/Shader.java | 2821 | package com.wordsaretoys.rise.glwrapper;
import android.opengl.GLES20;
import android.util.Log;
/**
* maintains a shader program consisting of one
* vertex shader function and one fragment shader
* function.
*
* @author chris
*
*/
public class Shader {
private int vobj;
private int fobj;
private int pro... | mit |
BrennanConroy/corefx | src/System.Net.Http/tests/FunctionalTests/HttpClientHandlerTest.MaxResponseHeadersLength.cs | 7892 | // 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.Generic;
using System.Net.Test.Common;
using System.Text;
using System.Threading;
using Sys... | mit |
coldume/imagecraft | tests/OptionPass/DebugOptionPassTest.php | 449 | <?php
namespace Imagecraft\OptionPass;
/**
* @covers Imagecraft\OptionPass\DebugOptionPass
*/
class DebugOptionPassTest extends \PHPUnit_Framework_TestCase
{
protected $pass;
public function setUp()
{
$this->pass = $this->getMock('Imagecraft\\OptionPass\\DebugOptionPass', null);
}
publ... | mit |
RazvanRotari/iaP | deprecated/iap-rs/src/main/java/ro/infoiasi/sparql/dao/AuthorDAO.java | 2610 | package ro.infoiasi.sparql.dao;
import static ro.infoiasi.dao.entity.metamodel.AuthorMetaModel.*;
import static ro.infoiasi.dao.entity.metamodel.UserMetaModel.ID_VALUE;
import java.util.ArrayList;
import java.util.List;
import org.apache.jena.query.QueryExecutionFactory;
import org.apache.jena.query.QuerySolution;
i... | mit |
brmullikin/BRMFlask | setup.py | 813 | """BRMFlask is a unified website generator."""
from setuptools import setup
from brmflask.settings import BaseConfig
setup(
name='BRMFlask',
version=BaseConfig.VERSION,
url='http://github.com/brmullikin/brmflask',
license='MIT',
author='B. R. Mullikin',
author_email='ben@brmullikin.com',
de... | mit |
donnut/typescript-ramda | tests/type.ts | 314 | import * as R from '../ramda/dist/index';
declare const boolean: boolean;
declare const number: number;
declare const object: object;
declare const any: any;
// @dts-jest:pass:snap
R.type(boolean);
// @dts-jest:pass:snap
R.type(number);
// @dts-jest:pass:snap
R.type(object);
// @dts-jest:pass:snap
R.type(any);
| mit |
mcelis13/C-Plus-Plus | UsingDeleteCleanUpPointers/main.cpp | 445 | #include <iostream>
using namespace std;
int main()
{
string *phrase = new string ("All presidents are cool!!!");
cout << *phrase << endl;
(*phrase)[20] = 'r'; /*() and * are used to call the various string functions you can also just use -> to call a string function as seen below*/
phrase -> replace... | mit |
chondm/BDD-Code-Test | vendor/gems/nokogiri-1.3.3/test/xml/test_node_encoding.rb | 3270 | require File.expand_path(File.join(File.dirname(__FILE__), '..', "helper"))
module Nokogiri
module XML
if RUBY_VERSION =~ /^1\.9/
class TestNodeEncoding < Nokogiri::TestCase
def setup
super
@html = Nokogiri::HTML(File.read(HTML_FILE), HTML_FILE)
end
def test_get... | mit |
storybooks/react-storybook | lib/cli/generators/METEOR/index.js | 2572 | import fs from 'fs';
import JSON5 from 'json5';
import {
getVersions,
retrievePackageJson,
writePackageJson,
getBabelDependencies,
installDependencies,
copyTemplate,
} from '../../lib/helpers';
export default async (npmOptions, { storyFormat = 'csf' }) => {
const [
storybookVersion,
actionsVersio... | mit |
uktrade/data-hub-fe-beta2 | src/apps/api/index.js | 88 | const router = require('./router')
module.exports = {
mountpath: '/api',
router,
}
| mit |
shnhrrsn/grind-framework | starters/react/public/Errors/NotFoundErrorHandler.js | 165 | import './GenericErrorHandler'
export function NotFoundErrorHandler() {
return <GenericErrorHandler title="The page you’re looking for could not be found." />
}
| mit |
alexbegt/CodeChickenCore | src/codechicken/core/commands/CoreCommand.java | 2994 | package codechicken.core.commands;
import java.util.List;
import codechicken.core.ServerUtils;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.*;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.command.ICommand;
import net... | mit |
maurer/tiamat | samples/Juliet/testcases/CWE190_Integer_Overflow/s04/CWE190_Integer_Overflow__short_max_multiply_84_goodB2G.cpp | 1678 | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE190_Integer_Overflow__short_max_multiply_84_goodB2G.cpp
Label Definition File: CWE190_Integer_Overflow.label.xml
Template File: sources-sinks-84_goodB2G.tmpl.cpp
*/
/*
* @description
* CWE: 190 Integer Overflow
* BadSource: max Set data to the max value for sh... | mit |
viennacl/pyviennacl-dev | examples/sparse-matrices.py | 1492 | #!python
"""
Sparse matrix support is still limited in PyViennaCL. The construction
of spare matrices from host data is supported, as is sparse matrix-vector
multiplication and the use of iterative solvers (see iterative-solvers.py
in this directory). However, no other operations have yet been implemented,
and SciPy s... | mit |
wrxck/mattata | migrate.lua | 777 | local redis = dofile('libs/redis.lua')
local disabled_plugin_keys = redis:keys('chat:*:disabled_plugins')
if next(disabled_plugin_keys) then
for _, v in pairs(disabled_plugin_keys) do
local plugins = redis:hgetall(v)
if #plugins > 2 then
for plugin, value in pairs(plugins) do
... | mit |
vargose/ng-grid | lib/grunt/utils.js | 9758 | var fs = require('fs');
var path = require('path');
var grunt = require('grunt');
var semver = require('semver');
var shell = require('shelljs');
// Get the list of angular files (angular.js, angular-mocks.js, etc)
var cachedAngularFiles = grunt.file.readJSON('lib/test/angular/files.json');
var util = module.exports ... | mit |
sanjoydesk/framework | src/Cygnite/Helpers/Str.php | 1063 | <?php
namespace Cygnite\Helpers;
/**
* Class String.
*/
class Str
{
public static $alpha = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
/**
* Generate random key based on type.
*
* @param string $type
* @param int $length
*
* @return string
*/
public sta... | mit |