repo_name stringlengths 4 116 | path stringlengths 4 379 | size stringlengths 1 7 | content stringlengths 3 1.05M | license stringclasses 15
values |
|---|---|---|---|---|
markvincze/Stubbery | test/Stubbery.IntegrationTests/StateTest.cs | 529 | using System;
using Xunit;
namespace Stubbery.IntegrationTests
{
public class StateTest
{
[Fact]
public void Start_StartTwice_Exception()
{
var sut = new ApiStub();
sut.Start();
Assert.Throws<InvalidOperationException>(() => sut.Start());
}... | mit |
Adrianacmy/Classic-Interesting-CS-Mini-Programs | old/reverse_dict.py | 2014 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
Created on Sun May 15
@author: Adrianacmy
Create a function reverse that takes in a dictionary and reverses it, such that
all of the values become keys and all of the keys become values. Be careful: we
do not wish to lose any information. Consider what to do if ... | mit |
mawax/InfoBridge.SuperLinq | src/InfoBridge.SuperLinq.CodeGen/Program.cs | 263 | using SuperOffice;
namespace InfoBridge.SuperLinq.CodeGen
{
class Program
{
static void Main(string[] args)
{
var gen = new Generator();
string generatedCode = gen.GenerateString(gen.Build());
}
}
}
| mit |
rokka-io/rokka-client-php | src/LocalImage/StringContent.php | 1137 | <?php
namespace Rokka\Client\LocalImage;
/**
* Creates a LocalImage object with the content of an image as input.
*
* For images on a accessible file system, better use \Rokka\Client\LocalImage\FileInfo
*
* Example:
*
* ```language-php
* $image = new StringContent($content, $identifier, $context);
* ```
*
... | mit |
sapioit/nw-sample-apps | notifications/app.js | 5159 | var NW = require('nw.gui');
// Extend application menu for Mac OS
if (process.platform == "darwin") {
var menu = new NW.Menu({type: "menubar"});
menu.createMacBuiltin && menu.createMacBuiltin(window.document.title);
NW.Window.get().menu = menu;
}
var $ = function (selector) {
return document.querySelector(sel... | mit |
silhouette/Angular2Quickstart | app/app.component.ts | 220 | import { Component } from '@angular/core';
@Component({
selector: 'my-app',
templateUrl: 'app/app.component.html',
styleUrls: ['app/app.component.css']
})
export class AppComponent {
title = 'Tour of Heroes';
} | mit |
AzureDay/2016-WebSite | TeamSpark.AzureDay.WebSite.Host/Controllers/ProfileController.cs | 11099 | using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using System.Web.Mvc;
using System.Web.Security;
using Kaznachey.KaznacheyPayment;
using TeamSpark.AzureDay.WebSite.App;
using TeamSpark.AzureDay.WebSite.App.Entity;
using TeamSpark.AzureDay.WebSite.Config;
using TeamSpark.AzureDay.WebSite.D... | mit |
fixrb/fix | test/matcher/comparisons/be_within_spec.rb | 233 | # frozen_string_literal: true
require_relative File.join("..", "..", "..", "lib", "fix")
Fix { it MUST be_within(2).of(42) }.against { 40 }
# test/matcher/comparisons/be_within_spec.rb:5 Success: expected 40 to be within 2 of 42.
| mit |
mdejean/Chkdraft | Chkdraft/src/WindowsUI/GroupBoxControl.cpp | 562 | #include "GroupBoxControl.h"
#include <string>
bool GroupBoxControl::CreateThis(HWND hParent, s32 x, s32 y, s32 width, s32 height, const char* initText, u32 id)
{
return WindowControl::CreateControl( 0, "BUTTON", initText, WS_CHILD|WS_VISIBLE|BS_GROUPBOX,
x, y, width, height, hParent, (HMENU)id, false );
... | mit |
alexpisquared/Windows-universal-samples | Samples/BackgroundTask/cs/BackgroundTask/Views/BlankPage1.xaml.cs | 775 | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xam... | mit |
Squashy83/meanjs-medical | app/routes/anamnesis.server.routes.js | 704 | 'use strict';
module.exports = function(app) {
var users = require('../../app/controllers/users.server.controller');
var anamnesis = require('../../app/controllers/anamnesis.server.controller');
// Anamnesis Routes
app.route('/anamnesis')
.get(anamnesis.list)
.post(users.requiresLogin, anamnesis.create);
ap... | mit |
DbUp/DbUp | src/dbup-sqlserver/AzureSqlServerExtensions.cs | 4239 | using System;
using DbUp.Builder;
using DbUp.SqlServer;
#if SUPPORTS_AZURE_AD
/// <summary>Configuration extension methods for Azure SQL Server.</summary>
// NOTE: DO NOT MOVE THIS TO A NAMESPACE
// Since the class just contains extension methods, we leave it in the global:: namespace so that it is always available
... | mit |
awahid101/Mist | docs/src/elementlist.js | 335 |
var ApiGen = ApiGen || {};
ApiGen.elements = [["c","Mist\\Core\\Controller\\Controller"],["c","Mist\\Core\\Controller\\Error"],["c","Mist\\Core\\Model\\Model"],["c","Mist\\Core\\Routing\\Router"],["c","Mist\\Core\\Template\\View"],["c","Mist\\Helpers\\Configurations"],["c","Mist\\Helpers\\Database"],["c","Mist\\Helper... | mit |
danielwippermann/resol-vbus | test/specs/configuration-optimizers/resol-deltasol-bs4v2-103-configuration-optimizer.spec.js | 2890 | /*! resol-vbus | Copyright (c) 2013-2018, Daniel Wippermann | MIT license */
'use strict';
const {
ConfigurationOptimizerFactory,
} = require('../resol-vbus');
const expect = require('../expect');
const _ = require('../lodash');
const testUtils = require('../test-utils');
const { wrapAsPromise } = testUtils;... | mit |
lexbar/colecta | app/stubs/NumberFormatter.php | 969 | <?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.
*/
/**
* Stub implementation for the NumberFormatter class of the intl extension
*
... | mit |
berwin/learn-javascript-design-pattern | chapter28/1.js | 428 | 'use strict';
// bad
var ul = document.getElementById('container');
var li = ul.getElementsByTagName('li');
for (var i = 0; i < li.length; i++) {
li[i].onclick = function() {
this.style.backgroundColor = 'grey';
};
}
// good
ul.onclick = function(e) {
var event = e || event;
var target = e.target || e.sr... | mit |
NTaylorMullen/EndGate | EndGate/samples/EndGate.Core.JS.Samples/Content/Samples/Shapes/CustomSlider.ts | 996 | // Wrap in module to keep code out of global scope
module Shapes {
export class CustomSlider {
constructor(private _target: any, private _min: number, private _max: number, private _defaultValue: number, private _onSliderChange: Function) {
var sliderChange = () => {
this.Slide... | mit |
LePhil/DotNetMiniProj | AutoReservation.Service.Wcf.Testing/Properties/Settings.Designer.cs | 1604 | //------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34014
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generate... | mit |
innogames/gitlabhq | spec/models/group_spec.rb | 92197 | # frozen_string_literal: true
require 'spec_helper'
RSpec.describe Group do
include ReloadHelpers
let!(:group) { create(:group) }
describe 'associations' do
it { is_expected.to have_many :projects }
it { is_expected.to have_many(:group_members).dependent(:destroy) }
it { is_expected.to have_many(:... | mit |
josephsavona/valuable | bench/store_core_bench.js | 3161 | var Store = require('../src/store'),
Model = require('../src/model'),
Valuable = require('../valuable/src/index'),
Backbone = require('backbone');
Backbone.sync = function() {};
var createBackbone = function() {
var User = Backbone.Model.extend({url: '/'}),
Users = Backbone.Collection.extend({
... | mit |
Spazz/discord-bot | node_modules/pokedex-promise-v2/index.js | 6773 | const rp = require('request-promise');
const cache = require('memory-cache');
const CACHE_LIMIT = 1000000 * 1000 //11 days
const pokeUrl = 'http://pokeapi.co';
getJSON = function(url) {
const cachedResult = cache.get(url);
if (cachedResult !== null) {
return cachedResult;
} else {
const options = {
... | mit |
XSockets/XSockets.Clients | src/XSockets.Shared.Client/Common/Interfaces/IXSocketObserver.cs | 320 |
namespace XSockets.Common.Interfaces
{
using System;
public interface IXSocketObserver<T>
{
Guid Id { get; }
void OnError(Exception e);
void OnNotify(T value);
void Unsubscribe();
void Subscribe(IXSocketObservable<T> provider);
void OnCompleted();
}
} | mit |
syscyl/SYS_CYL | application/controllers/Publicidad_controller.php | 3026 | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Publicidad_controller extends CI_Controller {
public function __construct(){
parent::__construct();
$this->load->model('usuario_model');
}
/*************************************************************************... | mit |
hyonholee/azure-sdk-for-net | sdk/resources/Azure.Management.Resources/src/Generated/Models/WhatIfResultFormat.Serialization.cs | 1150 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
namespace Azure.Management.Resources.Models
{
internal static class WhatIfResultFormatExtensions
{
public static string ToSerialString(this WhatIfResul... | mit |
harpcio/zf2-demo | module/ApplicationFeatureLibrary/config/router.config.php | 2015 | <?php
use Zend\Mvc\Router\Http;
use ApplicationLibrary\Router\Http\SkippableSegment;
return [
'router' => [
'routes' => [
'library' => [
'type' => SkippableSegment::class,
'options' => [
'route' => '[/:lang]/library',
... | mit |
marcoazn89/http-wrapper | src/Support/TypeSupport.php | 224 | <?php
namespace HTTP\Support;
class TypeSupport extends ContentSupport {
public static function getDefault() {
return array('text/html','application/xhtml+xml','application/xml', 'text/plain', 'application/json');
}
}
| mit |
Danack/intahwebz-routing | src/Intahwebz/Routing/Router.php | 3813 | <?php
namespace Intahwebz\Routing;
use Intahwebz\ObjectCache;
use Intahwebz\Exception\UnsupportedOperationException;
use Intahwebz\Route;
use Intahwebz\Request;
use Intahwebz\MatchedRoute;
class Router implements \Intahwebz\Router {
use \Intahwebz\SafeAccess;
use \Intahwebz\Cache\KeyName;
/**
* @v... | mit |
drobbins/couchapp_ace | evently/design_doc_navigation/load_design_doc/selectors/a.file/click.js | 77 | function(){
$(this).trigger("edit_file", $(this).attr("href").slice(1));
}
| mit |
mathiasbynens/unicode-data | 3.2.0/blocks/Tibetan-regex.js | 109 | // Regular expression that matches all symbols in the Tibetan block as per Unicode v3.2.0:
/[\u0F00-\u0FFF]/; | mit |
etundra-bsmith/angular-buyer | src/app/orders/orderDetails/tests/orderDetails.spec.js | 4005 | describe('Component: orderDetails', function() {
var scope,
q,
oc,
_ocOrderDetails,
mockOrderID,
mockBuyerID,
mockCurrentUser,
mockParams,
stateParams
;
beforeEach(module(function($provide) {
mockCurrentUser = 'CurrentUser123';
... | mit |
Azure/azure-sdk-for-net | sdk/metricsadvisor/Azure.AI.MetricsAdvisor/src/Utf8JsonWriterExtensions.cs | 2164 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System;
using System.Text.Json;
using Azure.Core;
namespace Azure.AI.MetricsAdvisor
{
internal static class Utf8JsonWriterExtensions
{
public static void WriteNullStringValue(this Utf8JsonWriter writ... | mit |
impactlab/oeem-energy-datastore | datastore/migrations/0007_auto_20150917_1702.py | 701 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('datastore', '0006_auto_20150915_2046'),
]
operations = [
migrations.AddField(
model_name='projectblock',
... | mit |
raguay/MyLaunchBarActions | Keyboard Maestro Macros.lbaction/Contents/Scripts/default.js | 966 | function executeMacro(argument) {
if (argument != undefined) {
LaunchBar.executeAppleScript('tell application id "com.stairways.keyboardmaestro.engine" to do script "' + argument + '"');
}
}
function run() {
var output = [];
var macros = Plist.parse(LaunchBar.executeAppleScript('tell applicatio... | mit |
b091/imbasf | src/Imbax/CMSBundle/Entity/Page.php | 1990 | <?php
namespace Imbax\CMSBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Page
*
* @ORM\Table()
* @ORM\Entity
*/
class Page
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* ... | mit |
alipha/FFRK | Stats/Stats/App_Start/RouteConfig.cs | 575 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
namespace Stats
{
public class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInf... | mit |
NoFearForBeers/BeerMe | public/app/shared/services/exception.service.ts | 348 | import { Response } from '@angular/http';
import { Observable } from 'rxjs/Observable';
export class ExceptionService {
constructor() { }
catchBadResponse<T>(errorResponse: any): Observable<T> {
console.log('this is error: ' + errorResponse);
return Observable.throw(errorResponse.json().error ... | mit |
github/codeql | ruby/ql/test/query-tests/security/cwe-352/railsapp/config/application.rb | 512 | require_relative 'boot'
require 'rails/all'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module Railsapp
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails ... | mit |
vlefrere/ProjetBDD | vendor/gedmo/doctrine-extensions/lib/Gedmo/IpTraceable/Mapping/Driver/Yaml.php | 5390 | <?php
namespace Gedmo\IpTraceable\Mapping\Driver;
use Gedmo\Mapping\Driver\File;
use Gedmo\Mapping\Driver;
use Gedmo\Exception\InvalidMappingException;
/**
* This is a yaml mapping driver for IpTraceable
* behavioral extension. Used for extraction of extended
* metadata from yaml specifically for IpTraceable
* e... | mit |
monsterhunteronline/monsterhunteronline.github.io | monsters/gravios/data.js | 348 | var monsterArray =
{
"name": "铠龙",
"other": [
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
""
],
"weakness": [
{
"data": [
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
"0",
... | mit |
panarasi/MobileCenter-ReactNative-Demo | node_modules/mobile-center-analytics/scripts/postlink.js | 1282 | var rnpmlink = require('mobile-center-link-scripts');
var package = require('./../package.json');
return rnpmlink.ios.initMobileCenterConfig().then(function (file) {
console.log('App Secret for iOS written to ' + file);
var prompt = package.rnpm.params[0];
prompt.message = prompt.message.replace(/Android/... | mit |
BACRallyApps/IterationBreakdownChart | src/Calculator.js | 6166 | var Ext = window.Ext4 || window.Ext;
var __map = function (mapField, records) {
var map = {};
Ext.Array.each(records, function (record) {
if (record.raw) {
map[record.raw[mapField]] = record.raw;
} else {
map[record[mapField]] = record;
}
});
return map;
};
var __sortByDate = functio... | mit |
mientjan/EaselTS | src/easelts/geom/FluidMeasurementsUnit.js | 416 | define(["require", "exports"], function (require, exports) {
"use strict";
var FluidMeasurementsUnit = (function () {
function FluidMeasurementsUnit(value, unit) {
this.value = value;
this.unit = unit;
}
return FluidMeasurementsUnit;
}());
Object.definePro... | mit |
uhlibraries-digital/brays | src/app/app.module.ts | 3616 | import 'zone.js/dist/zone-mix';
import 'reflect-metadata';
import 'polyfills';
import { BrowserModule, Title } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { NgbModule } from '@ng-bootstrap/ng... | mit |
softak098/mReporterLib | mReporter/mReporterLib/MatrixPrinters/Line.cs | 4443 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace mReporterLib
{
public class GetDataResult
{
/// <summary>
/// Value to be rendered in place of field
/// </summary>
public string Value;
/// <summary>
/// Indicates... | mit |
joda17/Diorite-API | src/main/java/org/diorite/material/blocks/others/CakeMat.java | 5861 | package org.diorite.material.blocks.others;
import java.util.Map;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.diorite.cfg.magic.MagicNumbers;
import org.diorite.material.BlockMaterialData;
import org.diorite.material.blocks.others.Mushroo... | mit |
skyrim/hlviewer.js | src/Game.ts | 12216 | import { createNanoEvents, Emitter as EventEmitter } from 'nanoevents'
import { Bsp } from './Bsp'
import * as Time from './Time'
import { Sound } from './Sound'
import { Loader } from './Loader'
import { Config } from './Config'
import { Mouse } from './Input/Mouse'
import { Touch } from './Input/Touch'
import... | mit |
huazh/node-opcua | documentation/lprc.js | 430 | /*global module, require */
module.exports = function(Folder, args) {
if (args.file.length === 0) {
args.file = [
"creating_a_client.md",
"creating_a_server.md",
"create_a_weather_station.md",
"server_with_da_variables.md",
"server_with_method.md"... | mit |
litepubl/cms | lib/languages/en/admin.js | 381 | /**
* LitePubl CMS
*
* copyright 2010 - 2017 Vladimir Yushko http://litepublisher.com/ http://litepublisher.ru/
* license https://github.com/litepubl/cms/blob/master/LICENSE.txt MIT
* link https://github.com/litepubl\cms
* version 7.08
*/
(function(window) {
window.lang = window.lang || {};
wi... | mit |
victorsantoss/angular-grid | src/js/paginationController.js | 8087 | var TEMPLATE = [
'<span id="pageRowSummaryPanel" class="ag-paging-row-summary-panel">',
'<span id="firstRowOnPage"></span>',
' [TO] ',
'<span id="lastRowOnPage"></span>',
' [OF] ',
'<span id="recordCount"></span>',
'</span>',
'<span class="ag-paging-page-summary-panel">',
'<button cl... | mit |
AusDTO/gov-au-beta | spec/models/news_article_spec.rb | 887 | require 'rails_helper'
RSpec.describe NewsArticle, type: :model do
it { expect(described_class).to be < Node }
it { is_expected.to respond_to :release_date }
it { is_expected.to validate_presence_of :release_date }
describe '#published_for_section' do
let!(:section) { Fabricate(:section) }
let!(:other... | mit |
bhishamtrehan/themedconsult | application/modules/auth/views/change_password_form.php | 5463 | <?php
$old_password = array(
'name' => 'old_password',
'id' => 'old_password',
'value' => set_value('old_password'),
'size' => 30,
);
$new_password = array(
'name' => 'new_password',
'id' => 'new_password',
'maxlength' => $this->config->item('password_max_length', 'tank_auth'),
'size' => 30,
);
$confirm_new_pa... | mit |
noamiv/cpe_check | main.js | 4548 |
function openGenOverlay() {
var triggerBttn = document.getElementById( 'js-trigger-overlay' ),
overlay = document.querySelector( 'div.overlay' ),
closeBttn = overlay.querySelector( 'button.close' );
transEndEventNames = {
'WebkitTransition': 'webkitTransitionEnd',
'MozTransition': 'tran... | mit |
Jasondou0709/client | app/src/main/java/io/rong/app/activity/ChangeGroupActivity.java | 3491 | package io.rong.app.activity;
import com.sea_monster.resource.Resource;
import io.rong.app.DemoContext;
import io.rong.app.R;
import io.rong.app.utils.Constants;
import io.rong.imkit.widget.AsyncImageView;
import io.rong.imlib.model.Group;
import android.app.Activity;
import android.content.Intent;
import android.os.... | mit |
timmartin/hy-coverage | setup.py | 800 | from setuptools import setup
def readme():
with open('README.rst') as f:
return f.read()
classifiers = """\
Environment :: Console
Intended Audience :: Developers
License :: OSI Approved :: MIT License
Programming Language :: Python :: 3.4
Topic :: Software Development :: Testing
Development Status :: 4 -... | mit |
Grimace1975/bclcontrib | Web/System.WebEx/Web/UI+Controls/HtmlControls/HtmlAnchorEx.cs | 2932 | #region License
/*
The MIT License
Copyright (c) 2008 Sky Morey
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,... | mit |
NTHINGs/Uhlu | public/app/directives/loading.js | 653 | app.directive('loading', ['$http' ,function ($http)
{
return {
restrict: 'A',
template: '<div class="loading-spiner"><img class="center-block" src="img/loading.gif" /> </div>',
link: function (scope, elm, attrs){
scope.isLoading = function () {
... | mit |
Jean-GuillaumePonsard/projetWebBDE | bde/src/BCL/UserBundle/Controller/UserController.php | 6507 | <?php
// src/BLC/UserBundle/Controller
namespace BCL\UserBundle\Controller;
use BCL\UserBundle\BCLUserBundle;
use BCL\UserBundle\Entity\Schoolyear;
use BCL\UserBundle\Entity\Status;
use BCL\UserBundle\Entity\Users;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Config\Definition\Exce... | mit |
DimensionDataCBUSydney/Compute.Api.Client | ComputeClient/Compute.Contracts/Requests/Snapshot/SnapshotServicePlanListOptions.cs | 994 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DD.CBU.Compute.Api.Contracts.Requests.Snapshot
{
using System;
/// <summary>
/// Filtering options for the Snapshot Server Plan List request.
/// </summary>
public sealed class SnapshotS... | mit |
DoSomething/northstar | tests/WithMocks.php | 1019 | <?php
namespace Tests;
use Carbon\Carbon;
use Closure;
use Mockery;
trait WithMocks
{
/**
* Mock a class, and register with the IoC container.
*
* @param $class String - Class name to mock
* @return \Mockery\MockInterface
*/
public function mock($class, ?Closure $closure = null)
... | mit |
joevandyk/monkeycharger | vendor/plugins/monkey_charger/test/monkey_charger_test.rb | 150 | require 'test/unit'
class MonkeyChargerTest < Test::Unit::TestCase
# Replace this with your real tests.
def test_this_plugin
flunk
end
end
| mit |
hugollm/lie2me | tests/test_fields/common_tests.py | 1257 | from unittest import TestCase
from lie2me import Field
class CommonTests(object):
def get_instance(self):
return self.Field()
def test_submitting_empty_value_on_required_field_returns_error(self):
field = self.get_instance()
field.required = True
value, error = field.submit(f... | mit |
mansonul/events | events/contrib/plugins/form_elements/fields/url/fobi_form_elements.py | 430 | from __future__ import absolute_import
from fobi.base import form_element_plugin_registry
from .base import URLInputPlugin
__title__ = 'fobi.contrib.plugins.form_elements.fields.url.fobi_form_elements'
__author__ = 'Artur Barseghyan <artur.barseghyan@gmail.com>'
__copyright__ = '2014-2017 Artur Barseghyan'
__license... | mit |
simple-mvc-framework/build-a-blog | app/templates/admin/header.php | 1663 | <!DOCTYPE html>
<html lang="<?php echo LANGUAGE_CODE; ?>">
<head>
<!-- Site meta -->
<meta charset="utf-8">
<title><?php echo $data['title'].' - '.SITETITLE; //SITETITLE defined in app/core/config.php ?></title>
<!-- CSS -->
<?php
helpers\assets::css(array(
'//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/boo... | mit |
JosefFriedrich-nodejs/baldr | src/vue/apps/vue2-ts-classcomponent/src/main.ts | 227 | import Vue from 'vue'
import App from './App.vue'
import styleConfigurator from '@bldr/style-configurator'
Vue.use(styleConfigurator as any)
Vue.config.productionTip = false
new Vue({
render: h => h(App)
}).$mount('#app')
| mit |
brainexe/homie | Tests/UnitTests/Expression/Listener/ClearCacheTest.php | 1381 | <?php
namespace Tests\Homie\Expression\Listener;
use Homie\Expression\Cache;
use Homie\Expression\Entity;
use Homie\Expression\Gateway;
use Homie\Expression\Listener\ClearCache;
use Monolog\Logger;
use PHPUnit_Framework_MockObject_MockObject as MockObject;
use PHPUnit\Framework\TestCase;
class ClearCacheTest extends... | mit |
Haseu/legacy-framework | app/Home/Controller/IndexController.php | 2816 | <?php
/**
* Arquivo: IndexController.php (UTF-8)
*
* Data: 16/10/2014
* @author André Luis Rocha Menutole <andre.rocha@superpay.com.br>
*/
namespace Application\Home\Controller;
use Core\AbstractController;
use Core\Helpers\RedirectorHelper;
use Core\Helpers\PdfHelper;
use Application\Login\Model\Usuario;
/**
... | mit |
leader22/simple-pokedex-v2 | _scraping/fetch/191.js | 5090 | module.exports = {
"key": "sunkern",
"moves": [
{
"learn_type": "tutor",
"name": "after-you"
},
{
"learn_type": "machine",
"name": "round"
},
{
"learn_type": "egg move",
"name": "morning-sun"
... | mit |
mybigfriendjo/QuickLaunch | QuickLaunch/LaunchEntryList.cs | 1999 | using System;
using System.Windows.Forms;
using QuickLaunch.storage;
namespace QuickLaunch {
public partial class LaunchEntryList : Form {
public LaunchEntryList() {
InitializeComponent();
foreach (LaunchEntry entry in LaunchRegistry.INSTANCE.Entries) {
if (entry.I... | mit |
northdakota/platform | src/Oro/Bundle/EmailBundle/Mailer/Processor.php | 20342 | <?php
namespace Oro\Bundle\EmailBundle\Mailer;
use Doctrine\ORM\EntityManager;
use Doctrine\Common\Collections\ArrayCollection;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\File\MimeType\ExtensionGuesser;
use Oro\Bundle\EmailBundle\Decoder\ContentDecoder;
use ... | mit |
ebeeb/Murmade | src/Murmade.Prototypes.Model.Tests/ValueFieldTypeTests.cs | 131 | using NUnit.Framework;
namespace Murmade.Prototypes.Model.Tests
{
[TestFixture]
public class ValueFieldTypeTests { }
}
| mit |
anseki/plain-overlay | webpack.config.js | 6290 | /* eslint-env node, es6 */
'use strict';
const
BASE_NAME = 'plain-overlay',
OBJECT_NAME = 'PlainOverlay',
LIMIT_TAGS = ['FACE'],
BUILD_MODE = process.env.NODE_ENV === 'production',
LIMIT = process.env.EDITION === 'limit',
SYNC = process.env.SYNC === 'yes', // Enable "sync-mode support"
BUILD_BASE_NAME =... | mit |
vritxii/govirus | cmd/ipfsapp-server/server_test.go | 70 | package main
import (
"testing"
)
func TestServer(t *testing.T) {}
| mit |
pyrocat101/LogoScript | lib/app.js | 276559 | require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o]... | mit |
SinyooFE/Sinyoo.P0 | src/app/components/user/index.ts | 55 | export * from './user-changePassword-log.component'; | mit |
randyibarrola/lafachada | src/Administracion/ModeloBundle/Entity/Historial.php | 2791 | <?php
namespace Administracion\ModeloBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Bridge\Doctrine\Validator\Constraints as DoctrineAssert;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* @ORM\Entity
*/
class Historial {
/**
* @ORM\Id
... | mit |
barbushin/php-console | src/PhpConsole/Connector.php | 18378 | <?php
namespace PhpConsole;
/**
* PHP Console client connector that encapsulates client-server protocol implementation
*
* You will need to install Google Chrome extension "PHP Console"
* https://chrome.google.com/webstore/detail/php-console/nfhmhhlpfleoednkpnnnkolmclajemef
*
* @package PhpConsole
* @version 3... | mit |
howardhenry/geoip-lookup | tests/validate-app-environment.spec.js | 1309 | const { expect } = require('chai');
const validateAppEnvironment = require('../src/validate-app-environment');
describe('#validateAppEnvironment', () => {
let fn;
beforeEach(() => {
process.env.NODE_ENV = 'development';
process.env.DEBUG = 'false';
process.env.PORT = '9000';
});
... | mit |
ReactiveServices/ReactiveServices.Application | ReactiveServices/Application/DispatcherLauncher.cs | 6398 | using NLog;
using ReactiveServices.ComputationalUnit.Dispatching;
using ReactiveServices.ComputationalUnit.Settings;
using ReactiveServices.MessageBus;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading;
using Re... | mit |
mdowds/python-mock-firestore | tests/test_timestamp.py | 407 | import unittest
from datetime import datetime as dt
from mockfirestore import Timestamp
class TestTimestamp(unittest.TestCase):
def test_timestamp(self):
dt_timestamp = dt.now().timestamp()
timestamp = Timestamp(dt_timestamp)
seconds, nanos = str(dt_timestamp).split('.')
self.ass... | mit |
catzaizai/MegneticLucene | Test/ML.Test/SearchTool.cs | 1456 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Inf.SearchTool;
using NUnit.Framework;
namespace ML.Test
{
[TestFixture]
public class SearchTool
{
[Test]
public void CreateIndex()
{
SearchHelper.C... | mit |
ahui2016/Mima | play/secretbox_play.rb | 165 | require 'base64'
require_relative '../rbnacl'
a = RbNaCl::Random.random_bytes
p a
b = Base64.urlsafe_encode64(a)
p b
c = Base64.urlsafe_decode64(b)
p c
puts a == c
| mit |
schlabberdog/pipes | src/com/github/users/dmoagx/pipes/ui/BoardView.java | 7786 | package com.github.users.dmoagx.pipes.ui;
import com.github.users.dmoagx.pipes.model.Board;
import com.github.users.dmoagx.pipes.model.FieldRef;
import com.github.users.dmoagx.pipes.model.FieldType;
import com.github.users.dmoagx.util.Matrix;
import javax.swing.*;
import java.awt.*;
import java.awt.event.MouseEvent;
... | mit |
alanaberdeen/coupled-minimum-cost-flow-track | cmcft/tools/params/c_cost.py | 2405 | # c_cost.py
# Cost vector for edges in coupled matrix
import numpy as np
__all__ = ["c_cost"]
def c_cost(g, a_coup, a_vertices):
# TODO: think this function is slow. Check for performance increases.
# c_cost
# creates vector of costs for edges
#
# Inputs: g - graph structure
# ... | mit |
laurynas/activemerchant_banklink | lib/active_merchant/billing/integrations/dnb_nord_ltu/common.rb | 220 | module ActiveMerchant #:nodoc:
module Billing #:nodoc:
module Integrations #:nodoc:
module DnbNordLtu #:nodoc:
module Common
include Banklink::Common
end
end
end
end
end
| mit |
SRoddis/Mongo.Migration | Mongo.Migration/Services/IDatabaseVersionService.cs | 467 | using Mongo.Migration.Documents;
using Mongo.Migration.Migrations.Database;
using MongoDB.Driver;
namespace Mongo.Migration.Services
{
public interface IDatabaseVersionService
{
DocumentVersion GetCurrentOrLatestMigrationVersion();
DocumentVersion GetLatestDatabaseVersion(IMongoDatabase db);
... | mit |
sarjun/AlgorithmVisualization | polymer/ShadowDOM/test/js/MutationObserver.js | 7211 | /*
* Copyright 2013 The Polymer Authors. All rights reserved.
* Use of this source code is goverened by a BSD-style
* license that can be found in the LICENSE file.
*/
suite('MutationObserver', function() {
var wrap = ShadowDOMPolyfill.wrap;
var addedNodes = [], removedNodes = [];
var div;
function newVa... | mit |
sboulema/CodeNav | CodeNav.Shared/Mappers/MethodMapper.cs | 7772 | using CodeNav.Helpers;
using CodeNav.Models;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.VisualStudio.Imaging;
using System.Linq;
using System.Windows;
using System.Windows.Media;
using VisualBasicSyntax = Microsoft.CodeAnalysis.VisualBasic.Syntax;
namespace CodeNav.Mappe... | mit |
sabarjp/VictusLudus | victusludus/src/com/teamderpy/victusludus/gui/eventhandler/TooltipHandler.java | 3801 | package com.teamderpy.victusludus.gui.eventhandler;
import java.util.ArrayDeque;
import java.util.Deque;
import java.util.EventListener;
import java.util.EventObject;
import com.badlogic.gdx.Gdx;
import com.teamderpy.victusludus.VictusLudusGame;
import com.teamderpy.victusludus.gui.eventhandler.event.TooltipEvent;
... | mit |
shageman/rails_container_and_engines | config/application.rb | 2732 | require File.expand_path('../boot', __FILE__)
require 'rails/all'
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
Bundler.require(*Rails.groups(:assets => %w(development test)))
# If you want your assets lazily compiled in production, use this line
# Bundler.requi... | mit |
kalibao/kalibao-framework | kalibao/common/models/cmsPage/CmsPageI18n.php | 3097 | <?php
/**
* @copyright Copyright (c) 2015 Kévin Walter <walkev13@gmail.com> - Kalibao
* @license https://github.com/kalibao/kalibao-framework/blob/master/LICENSE
*/
namespace kalibao\common\models\cmsPage;
use Yii;
use kalibao\common\models\language\Language;
/**
* This is the model class for table "cms_page_i18n".... | mit |
Verasoft/EF.Tracking | src/Verasoft.EF.Tracking/Properties/AssemblyInfo.cs | 1502 | using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTi... | mit |
gfoidl/Yeppp.net | source/Yeppp.net/CoreExtensions/Min.cs | 18163 | namespace System
{
public static class CoreExtensions_Min
{
#region int
/// <summary>Computes the minimum of signed 32-bit integer array elements.</summary>
/// <exception cref="System.NullReferenceException">If vArray is null.</exception>
/// <exception cref="System.DataMisalignedException">If vArray is not... | mit |
matthieudelaro/easycrypt | cryptage.cpp | 10943 | #include "cryptage.h"
#include <cmath>
#include <iostream>
bool Cryptage::crypter(Image &image, std::string const& texte, unsigned int methode)
{
//Définition de l'emplacement de lecture de l'image
unsigned int x = 0, y = 0, couleur = ROUGE;
//on écrit l'en-tête
//1 on marque l'image com... | mit |
cedced19/flydocument-encrypted | policies/auth.js | 236 | module.exports = function(req, res, next) {
var config = require('../configuration.json');
if (config.users.length == 0) {
next();
} else if (!req.isAuthenticated()) {
res.redirect('/login');
} else {
next();
}
};
| mit |
definitionstudio/linktv_platform | app/controllers/admin/external_contents_controller.rb | 1035 | class Admin::ExternalContentsController < Admin::AdminController
helper :images, :videos, :video_segments, :external_contents
def new
@external_content = ExternalContent.new params[:external_content]
render :json => {
:status => 'success',
:html => render_to_string(:layout => false)
}
en... | mit |
DragonSpark/Framework | DragonSpark/Compose/Model/Commands/CommandInstanceSelector.cs | 410 | using DragonSpark.Compose.Model.Selection;
using DragonSpark.Model.Commands;
using DragonSpark.Model.Selection;
namespace DragonSpark.Compose.Model.Commands;
public class CommandInstanceSelector<TIn, T> : Selector<TIn, ICommand<T>>
{
public CommandInstanceSelector(ISelect<TIn, ICommand<T>> subject) : base(subject) ... | mit |
zeroonegit/Go | src/github.com/zeroonegit/basic-types/basic-types.go | 283 | package main
import (
"fmt"
"math/cmplx"
)
var (
ToBe bool = false
MaxInt uint64 = 1<<64 - 1
z complex128 = cmplx.Sqrt(-5 + 12i)
)
func main() {
const f = "%T(%v)\n"
fmt.Printf(f, ToBe, ToBe)
fmt.Printf(f, MaxInt, MaxInt)
fmt.Printf(f, z, z)
}
| mit |
NamelessCoder/numerolog | src/NotFoundException.php | 133 | <?php
namespace NamelessCoder\Numerolog;
/**
* Class NotFoundException
*/
class NotFoundException extends NumerologException {
}
| mit |
imammlubis/sipp_ci | application/views/perusahaan/bayartagihan.php | 22669 |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/css/select2.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js"></script>
<div class="page-container">
<... | mit |
splosch/cursorMe | assets/javascript/app.js | 6356 | /* globals $, Dropzone, ga */
$(function( Dropzone ) {
"use strict";
window._gaq = window._gaq || [];
var app = {},
SEL_PAGE = "#page",
SEL_CONTAINER = "#container",
SEL_POINTER = "input[type='radio'][name='cursortype']",
SEL_POINTER_IMG = "input[type='radio'][name='cursor... | mit |