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 |
|---|---|---|---|---|---|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Extensions
{
public static class IEnumerableExtensions
{
public static T Sum<T>(this IEnumerable<T> enumerable)
{
dynamic sum = 0;
foreach (var element in enumerable)
{
sum... | SHAMMY1/Telerik-Academy-2016 | OOP/Homeworks/03.ExtensionsDelegatesLambda/ExtensionsDelegatesLambdaHW/Extensions/IEnumerableExtensions.cs | C# | mit | 1,214 |
using System;
using System.Collections;
using UnityEngine;
using VRStandardAssets.Common;
using VRStandardAssets.Utils;
namespace VRStandardAssets.ShootingGallery
{
// This script handles a target in the shooter scenes.
// It includes what should happen when it is hit and
// how long before it de... | SerKale/voxyl | Voxyl/Assets/VRSampleScenes/Scripts/ShootingGallery/ShootingTarget.cs | C# | mit | 6,853 |
//@flow
const {foo, Bar, baz, qux} = require('./jsdoc-exports');
const {
DefaultedStringEnum,
InitializedStringEnum,
NumberEnum,
BooleanEnum,
SymbolEnum,
} = require('./jsdoc-objects');
/** a JSDoc in the same file */
function x() {}
( );
// ^
| mroch/flow | tests/autocomplete/jsdoc.js | JavaScript | mit | 261 |
ace.define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) {
"use strict";
var oop = require("../lib/oop");
var lang = require("../lib/lang");
var TextHighlightRules = require("./text_highlight_rules").TextHi... | NPellet/jsGraph | web/site/js/ace-builds/src-noconflict/mode-tex.js | JavaScript | mit | 5,261 |
module Hello
module Business
module Management
class ResetPassword < Base
attr_reader :password_credential
def initialize(password_credential)
@password_credential = password_credential
end
def update_password(plain_text_password)
if @password_credential... | brodock/hello | lib/hello/business/management/reset_password.rb | Ruby | mit | 812 |
#region Copyright
//
// DotNetNuke® - http://www.dotnetnuke.com
// Copyright (c) 2002-2016
// by DotNetNuke Corporation
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
// documentation files (the "Software"), to deal in the Software without restricti... | yiji/Dnn.Platform | DNN Platform/DotNetNuke.Web.Deprecated/UI/WebControls/DnnInputManager.cs | C# | mit | 1,363 |
(function(){
'use strict';
angular
.module('app')
.factory('ceUsers', ceUsers);
ceUsers.$inject = ['$resource'];
function ceUsers ($resource) {
console.log('ok');
return $resource('https://mysterious-eyrie-9135.herokuapp.com/users/:username',
{username: '@username'},
{'update': { me... | ArnaudBertrand/CookeasyWeb | src/app/resources/users.resource.js | JavaScript | mit | 351 |
<?php
/**
* Version : 1.2.0
* Author : inc2734
* Author URI : http://2inc.org
* Created : April 17, 2015
* Modified : July 31, 2015
* License : GPLv2 or later
* License URI: license.txt
*/
?>
<div class="container">
<div class="row">
<div class="col-md-9">
<main id="main" role="main">
... | OopsMouse/mori.site | www/wordpress/wp-content/themes/habakiri/blog_templates/archive/right-sidebar.php | PHP | mit | 670 |
<?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license an... | musicsnap/LearnCode | php/code/yaf/application/library/Zend/Db/Exception.php | PHP | mit | 1,039 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using Newtonsoft.Json.Linq;
using ReactNative.Bridge;
using System;
using System.Threading;
using System.Threading.Tasks;
namespace ReactNative.Tests.Bridge
{
... | bluejeans/react-native-windows | ReactWindows/ReactNative.Tests/Bridge/ReactInstanceTests.cs | C# | mit | 7,510 |
using System;
using Machine.Specifications;
namespace FactoryGirl.NET.Specs {
[Subject(typeof(FactoryGirl))]
public class FactoryGirlSpecs : ICleanupAfterEveryContextInAssembly {
[Subject(typeof(FactoryGirl))]
public class When_we_define_a_factory {
Establish context = ()... | junshao/FactoryGirl.NET | FactoryGirl.NET.Specs/FactoryGirlSpecs.cs | C# | mit | 2,054 |
"""
A Pygments lexer for Magpie.
"""
from setuptools import setup
__author__ = 'Robert Nystrom'
setup(
name='Magpie',
version='1.0',
description=__doc__,
author=__author__,
packages=['magpie'],
entry_points='''
[pygments.lexers]
magpielexer = magpie:MagpieLexer
'''
) | munificent/magpie-optionally-typed | doc/site/magpie/setup.py | Python | mit | 305 |
'use strict';
import gulp from 'gulp';
import gutil from 'gulp-util';
import uglify from 'gulp-uglify';
import stylus from 'gulp-stylus';
import watch from 'gulp-watch';
import plumber from 'gulp-plumber';
import cleanCss from 'gulp-clean-css';
import imagemin from 'gulp-imagemin';
import concat from 'gulp-concat';
im... | davidalves1/missas-sao-pedro | gulpfile.babel.js | JavaScript | mit | 1,796 |
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateEveCorporationMemberSecurityLog extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('corporation_msec_log', function(Blueprint $table)
{
$tab... | omgninjaz/seat | app/database/migrations/2014_04_03_071610_CreateEveCorporationMemberSecurityLog.php | PHP | mit | 959 |
require 'shellwords'
require 'fileutils'
module Hibiki
class Downloading
CH_NAME = 'hibiki'
def initialize
@a = Mechanize.new
@a.user_agent_alias = 'Windows Chrome'
end
def download(program)
infos = get_infos(program)
if infos['episode']['id'] != program.episode_id
R... | t-ashula/net-radio-archive | lib/hibiki/downloading.rb | Ruby | mit | 2,639 |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="bs" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About buynowcoin</source>
<translation type="unfinished"/>
</message>
<message>
<location lin... | buynowcoin/buynowcoin | src/qt/locale/bitcoin_bs.ts | TypeScript | mit | 108,053 |
"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/RvHookupRounded.js | JavaScript | mit | 894 |
import { set } from 'ember-metal';
import { jQuery } from 'ember-views';
import { moduleFor, RenderingTest } from '../../utils/test-case';
import { Component, compile } from '../../utils/helpers';
import { strip } from '../../utils/abstract-test-case';
class AbstractAppendTest extends RenderingTest {
constructor() ... | Leooo/ember.js | packages/ember-glimmer/tests/integration/components/append-test.js | JavaScript | mit | 18,760 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FlatRedBall.Content.Scene;
using FlatRedBall;
using FlatRedBall.IO;
namespace EditorObjects.EditorSettings
{
public class AIEditorPropertiesSave
{
public const string Extension = "aiep";
public CameraS... | GorillaOne/FlatRedBall | FRBDK/FRBDK Supporting Projects/EditorObjects/EditorSettings/AIEditorPropertiesSave.cs | C# | mit | 1,372 |
require 'spec_helper'
try_spec do
require './spec/fixtures/bookmark'
describe DataMapper::TypesFixtures::Bookmark do
supported_by :all do
before :all do
DataMapper::TypesFixtures::Bookmark.auto_migrate!
end
let(:resource) do
DataMapper::TypesFixtures::Bookmark.create(
... | troygnichols/dm-types | spec/integration/uri_spec.rb | Ruby | mit | 3,551 |
import readdirRecursive from "fs-readdir-recursive";
import * as babel from "@babel/core";
import path from "path";
import fs from "fs";
import * as watcher from "./watcher";
export function chmod(src: string, dest: string): void {
try {
fs.chmodSync(dest, fs.statSync(src).mode);
} catch (err) {
console.w... | babel/babel | packages/babel-cli/src/babel/util.ts | TypeScript | mit | 3,448 |
<?php
/*
* This file is part of the Sylius package.
*
* (c) Paweł Jędrzejewski
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sylius\Bundle\ApiBundle\DependencyInjection;
use Sylius\Bundle\ApiBundle\Form\Type\ClientTy... | adamelso/Sylius | src/Sylius/Bundle/ApiBundle/DependencyInjection/Configuration.php | PHP | mit | 9,956 |
using System.Collections.Generic;
using System;
using UnityEngine;
public class EventService
{
public delegate void EventDelegate<T>(T e) where T : GameEvent;
Dictionary<Type, Delegate> delegates = new Dictionary<Type, Delegate>();
public void AddListener<T>(EventDelegate<T> listener) where T : GameEvent {
Ty... | kicholen/GamePrototype | Assets/Script/Controller/Service/EventService/EventService.cs | C# | mit | 1,277 |
(function () {
var g = void 0,
k = !0,
m = null,
o = !1,
p, q = this,
r = function (a) {
var b = typeof a;
if ("object" == b) if (a) {
if (a instanceof Array) return "array";
if (a instanceof Object) return b;
... | coolspring1293/coolspring1293.github.io | snow.js | JavaScript | mit | 41,004 |
import { Type } from '@ephox/katamari';
// some elements, such as mathml, don't have style attributes
// others, such as angular elements, have style attributes that aren't a CSSStyleDeclaration
const isSupported = (dom: Node): dom is HTMLStyleElement =>
// eslint-disable-next-line @typescript-eslint/unbound-method
... | tinymce/tinymce | modules/sugar/src/main/ts/ephox/sugar/impl/Style.ts | TypeScript | mit | 463 |
<?php
namespace Backend\Modules\MediaLibrary\Actions;
use Backend\Core\Language\Language;
use Backend\Modules\MediaLibrary\Domain\MediaFolder\MediaFolder;
use Backend\Modules\MediaLibrary\Domain\MediaGroup\MediaGroupType;
use Backend\Modules\MediaLibrary\Domain\MediaItem\MediaItemSelectionDataGrid;
use Backend\Module... | jeroendesloovere/forkcms | src/Backend/Modules/MediaLibrary/Actions/MediaBrowserImages.php | PHP | mit | 1,977 |
import HomeRoute from 'routes/Home';
describe('(Route) Home', () => {
let _component;
beforeEach(() => {
_component = HomeRoute.component();
});
it('Should return a route configuration object', () => {
expect(typeof HomeRoute).to.equal('object');
});
it('Should define a route... | krizkasper/react-redux-kriz | tests/routes/Home/index.spec.js | JavaScript | mit | 402 |
using GE.WebUI.ViewModels.Abstracts;
using SX.WebCore.MvcControllers;
namespace GE.WebUI.Controllers
{
public sealed class RssController : SxRssController<VMMaterial>
{
}
} | simlex-titul2005/game-exe.com | GE.WebUI/Controllers/RssController.cs | C# | mit | 188 |
import 'docs/src/modules/components/bootstrap';
// --- Post bootstrap -----
import React from 'react';
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs';
import markdown from './input.md';
function Page() {
return <MarkdownDocs markdown={markdown} />;
}
export default Page;
| Kagami/material-ui | pages/api/input.js | JavaScript | mit | 297 |
var searchData=
[
['clear',['clear',['../d8/d84/a00001.html#a11dc3b617f2fedbb3b499971493b9c4f',1,'ArrayBase']]]
];
| bdfoster/cpp-templates | docs/html/search/functions_1.js | JavaScript | mit | 117 |
/*
Copyright 2006 by Sean Luke
Licensed under the Academic Free License version 3.0
See the file "LICENSE" for more information
*/
package ec.app.parity.func;
import ec.*;
import ec.app.parity.*;
import ec.gp.*;
import ec.util.*;
/*
* D31.java
*
* Created: Wed Nov 3 18:31:38 1999
* By: Sean Luke
*/
/*... | meiyi1986/GPJSS | src/ec/app/parity/func/D31.java | Java | mit | 1,195 |
// Copyright (c) 2015 ZZZ Projects. All rights reserved
// Licensed under MIT License (MIT) (https://github.com/zzzprojects/Z.ExtensionMethods)
// Website: http://www.zzzprojects.com/
// Feedback / Feature Requests / Issues : http://zzzprojects.uservoice.com/forums/283927
// All ZZZ Projects products: Entity Framework ... | huoxudong125/Z.ExtensionMethods | src/Z.Core/System.String/String.GetBetween.cs | C# | mit | 1,266 |
using System;
using System.Threading.Tasks;
using Orleans;
using Tester.CodeGenTests;
using TestExtensions;
using UnitTests.GrainInterfaces;
using Xunit;
namespace DefaultCluster.Tests.General
{
[TestCategory("CodeGen")]
public class CodeGeneratorTests_AccessibilityChecks : HostedTestClusterEnsureDefaultStart... | rrector/orleans | test/DefaultCluster.Tests/CodeGeneratorTests_AccessibilityChecks.cs | C# | mit | 1,347 |
#include "macros.h"
#include "thread.h"
using namespace std;
ndb_thread::~ndb_thread()
{
}
void
ndb_thread::start()
{
thd_ = std::move(thread(&ndb_thread::run, this));
if (daemon_)
thd_.detach();
}
void
ndb_thread::join()
{
ALWAYS_ASSERT(!daemon_);
thd_.join();
}
// can be overloaded by subclasses
void... | stephentu/silo | thread.cc | C++ | mit | 378 |
/*jslint node: true, vars: true, plusplus: true, devel: true, nomen: true, regexp: true, indent: 2, maxerr: 50*/
/*global define, $, brackets, Mustache, window, appshell*/
define(function (require, exports, module) {
"use strict";
// HEADER >>
var NodeConnection = brackets.getModule("utils/NodeConnection"),
... | marcandrews/brackets-synapse | modules/Menu.js | JavaScript | mit | 7,210 |
'output dimensionalities for each column'
import csv
import sys
import re
import math
from collections import defaultdict
def get_words( text ):
text = text.replace( "'", "" )
text = re.sub( r'\W+', ' ', text )
text = text.lower()
text = text.split()
words = []
for w in text:
if w in words:
continue
wo... | zygmuntz/kaggle-advertised-salaries | optional/cols_dimensionality.py | Python | mit | 1,451 |
#include <seqan/sequence.h>
#include <seqan/basic.h>
#include <seqan/find_motif.h>
#include <seqan/file.h>
#include <iostream>
using namespace seqan;
template<typename TString>//String<char>
void countOneMers(TString const& str){
Iterator<TString>::Type StringIterator = begin(str);
Iterator<TString>::Type EndIter... | bkahlert/seqan-research | raw/pmbs12/pmsb13-data-20120615/sources/brbym28nz827lxic/93/sandbox/meyerclp/demos/Sequences.cpp | C++ | mit | 1,018 |
package dbfiles
import (
"encoding/csv"
"io"
"github.com/juju/errgo"
)
type Driver interface {
Extention() string
Write(io.Writer, []string) error
Read(io.Reader) ([][]string, error)
}
type CSV struct{}
func (driver CSV) Extention() string {
return "csv"
}
func (driver CSV) Write(writer io.Writer, values [... | AlexanderThaller/lablog | vendor/github.com/AlexanderThaller/dbfiles/driver.go | GO | mit | 818 |
const ASSETS_MODS_LENGTH = 13;//'/assets/mods/'.length;
const CONTENT_TYPES = {
'css': 'text/css',
'js': 'text/javascript',
'json': 'application/json',
'png': 'image/png',
'jpg': 'image/jpeg',
'jpeg': 'image/jpeg',
'html': 'text/html',
'htm': 'text/html'
};
/**
* @type {Map<string, JSZip>}
*/
const jszipCac... | 2767mr/CCLoader | ccloader/js/packed.js | JavaScript | mit | 3,555 |
<?php
/**
* Author: Nil Portugués Calderó <contact@nilportugues.com>
* Date: 12/18/15
* Time: 11:36 PM.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace NilPortugues\SchemaOrg\Classes;
use NilPortugues\SchemaOrg\SchemaCl... | nilportugues/schema.org-mapping | src/Classes/Electrician.php | PHP | mit | 20,303 |
/* micropolisJS. Adapted by Graeme McCutcheon from Micropolis.
*
* This code is released under the GNU GPL v3, with some additional terms.
* Please see the files LICENSE and COPYING for details. Alternatively,
* consult http://micropolisjs.graememcc.co.uk/LICENSE and
* http://micropolisjs.graememcc.co.uk/COPYING
... | ArcherSys/ArcherSys | game/3d.city-gh-pages/src/tool/GameTools.js | JavaScript | mit | 1,390 |
export { default as createShallow } from './createShallow';
export { default as createMount } from './createMount';
export { default as createRender } from './createRender';
export { default as findOutermostIntrinsic, wrapsIntrinsicElement } from './findOutermostIntrinsic';
export { default as getClasses } from './getC... | lgollut/material-ui | packages/material-ui/src/test-utils/index.js | JavaScript | mit | 375 |
var expect = require("chai").expect;
var reindeerRace = require("../../src/day-14/reindeer-race");
describe("--- Day 14: (1/2) distance traveled --- ", () => {
it("counts the distance traveled after 1000s", () => {
var reindeerSpecs = [
"Comet can fly 14 km/s for 10 seconds, but then must rest for 127 seco... | gbranchaudrubenovitch/advent-of-code | test/day-14/reindeer-race-test.js | JavaScript | mit | 969 |
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var jsdom = require("jsdom");
var chai_1 = require("chai");
var ColorManager_1 = require("./ColorManager");
describe('ColorManager', function () {
var cm;
var dom;
var document;
var window;
beforeEach(function () {
... | SpawnTree/SpawnTree.github.io | js/xterm/lib/renderer/ColorManager.test.js | JavaScript | mit | 18,828 |
/**
* Copyright 2014 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by appli... | MonoHearted/Flowerbless | node_modules/google-api/apis/admin/directory_v1.js | JavaScript | mit | 71,632 |
// sol2
// The MIT License (MIT)
// Copyright (c) 2013-2021 Rapptz, ThePhD and contributors
// 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 limita... | ThePhD/sol2 | tests/inclusion/source/protected_function_result.cpp | C++ | mit | 1,206 |
<?php
class Admin_Page_Scraper_Facebook extends Admin_Page_Abstract {
public function prepare(CM_Frontend_Environment $environment, CM_Frontend_ViewResponse $viewResponse) {
/** @var Denkmal_Site_Default $site */
$site = $environment->getSite();
$region = $site->hasRegion() ? $site->getReg... | njam/denkmal.org | library/Admin/library/Admin/Page/Scraper/Facebook.php | PHP | mit | 1,220 |
package common
import (
"testing"
"github.com/stretchr/testify/assert"
)
// Matasano 2.1
func Test_Pad_PKCS7(t *testing.T) {
input := []byte("YELLOW SUBMARINE")
received := Pad_PKCS7(input, 4)
expected := []byte("YELLOW SUBMARINE\x04\x04\x04\x04")
assert.Equal(t, expected, received)
} | cngkaygusuz/matasano-challenges | golang/common/pad_test.go | GO | mit | 295 |
using Scripts.Game.Defined.Characters;
using Scripts.Game.Defined.Serialized.Statistics;
using Scripts.Game.Dungeons;
using Scripts.Game.Serialized;
using Scripts.Game.Undefined.Characters;
using Scripts.Model.Acts;
using Scripts.Model.Buffs;
using Scripts.Model.Characters;
using Scripts.Model.Interfaces;
using Script... | Cinnamon18/runityscape | Assets/Scripts/Game/Camp/Camp.cs | C# | mit | 6,751 |
package org.jinstagram.auth.model;
import org.jinstagram.http.Request;
import org.jinstagram.http.Verbs;
import java.util.HashMap;
import java.util.Map;
/**
* The representation of an OAuth HttpRequest.
*
* Adds OAuth-related functionality to the {@link Request}
*/
public class OAuthRequest extends Request {
p... | zauberlabs/jInstagram | src/main/java/org/jinstagram/auth/model/OAuthRequest.java | Java | mit | 1,596 |
package tracker.message.handlers;
import elasta.composer.message.handlers.MessageHandler;
import io.vertx.core.eventbus.Message;
import io.vertx.core.json.JsonObject;
/**
* Created by sohan on 2017-07-26.
*/
public interface ReplayMessageHandler extends MessageHandler<JsonObject> {
@Override
void handle(Mes... | codefacts/Elastic-Components | tracker/src/main/java/tracker/message/handlers/ReplayMessageHandler.java | Java | mit | 347 |
# -*- coding: utf-8 -*-
import pyqtgraph as pg
from pyqtgraph.Qt import QtGui, QtCore
import numpy as np
import csv, gzip, os
from pyqtgraph import Point
class GlassDB:
"""
Database of dispersion coefficients for Schott glasses
+ Corning 7980
"""
def __init__(self, fileName='schott_glasses.csv'):
... | pmaunz/pyqtgraph | examples/optics/pyoptic.py | Python | mit | 18,598 |
import logging
from urllib.parse import urljoin
import lxml.etree # noqa: S410
import requests
from django.conf import settings as django_settings
from django.utils import timezone
logger = logging.getLogger(__name__)
class ClientError(Exception):
pass
class ResponseParseError(ClientError):
pass
class ... | opennode/nodeconductor-assembly-waldur | src/waldur_auth_valimo/client.py | Python | mit | 9,636 |
<?php
namespace Yandex\Locator\Exception;
/**
* Class ServerError
* @package Yandex\Locator\Exception
* @author Dmitry Kuznetsov <kuznetsov2d@gmail.com>
* @license The MIT License (MIT)
*/
class ServerError extends \Yandex\Locator\Exception
{
} | dmkuznetsov/php-yandex-locator | source/Yandex/Locator/Exception/ServerError.php | PHP | mit | 250 |
/*
* Copyright 2017 Hewlett Packard Enterprise Development Company, L.P.
* Licensed under the MIT License (the "License"); you may not use this file except in compliance with the License.
*/
define([
'underscore',
'jquery',
'find/idol/app/page/dashboard/widgets/updating-widget',
'find/idol/app/page/... | hpe-idol/find | webapp/idol/src/test/js/spec/app/page/dashboard/widgets/updating-widget.js | JavaScript | mit | 4,835 |
import 'rxjs/add/operator/map';
import {Injectable} from '@angular/core';
import {Http, RequestMethod} from '@angular/http';
import {Observable} from 'rxjs/Observable';
import {Cube} from '../models/cube';
import 'rxjs/add/operator/mergeMap';
import {Algorithm} from '../models/analysis/algorithm';
import {Input, InputT... | okgreece/indigo | src/app/services/algorithms.ts | TypeScript | mit | 3,392 |
<?php
namespace Nathanmac\Utilities\Parser\Formats;
use Nathanmac\Utilities\Parser\Exceptions\ParserException;
/**
* XML Formatter
*
* @package Nathanmac\Utilities\Parser\Formats
* @author Nathan Macnamara <nathan.macnamara@outlook.com>
* @license https://github.com/nathanmac/Parser/blob/master/LICENS... | tgoettel9401/Homepage-Schachclub-Niedermohr | vendor/nathanmac/parser/src/Formats/XML.php | PHP | mit | 2,603 |
import PropTypes from 'prop-types'
import React from 'react'
import { List } from 'immutable'
import Modal from './warningmodal.js'
import Path from 'path'
const FilesList = ({ folders, folderPathToRemove, actions }) => {
const addStorageLocation = () => actions.addFolderAskPathSize()
const removeStorageLocation =... | NebulousLabs/Sia-UI | plugins/Hosting/js/components/fileslist.js | JavaScript | mit | 2,874 |
from PyQt4 import QtCore
import acq4.Manager
import acq4.util.imageAnalysis as imageAnalysis
run = True
man = acq4.Manager.getManager()
cam = man.getDevice('Camera')
frames = []
def collect(frame):
global frames
frames.append(frame)
cam.sigNewFrame.connect(collect)
def measure():
if len(frames)... | tropp/acq4 | acq4/analysis/scripts/beamProfiler.py | Python | mit | 976 |
import {browser, by, element, ExpectedConditions} from 'protractor';
import { ProjectsPage } from './projects.page';
export class BellowsProjectSettingsPage {
private readonly projectsPage = new ProjectsPage();
conditionTimeout: number = 3000;
settingsMenuLink = element(by.id('settings-dropdown-button'));
pr... | ermshiperete/web-languageforge | test/app/bellows/shared/project-settings.page.ts | TypeScript | mit | 2,290 |
/**
* Framework APIs (global - app.*)
*
* Note: View APIs are in view.js (view - view.*)
*
* @author Tim Lauv
* @created 2015.07.29
* @updated 2017.04.04
*/
;(function(app){
/**
* Universal app object creation api entry point
* ----------------------------------------------------
* @deprecated Use the... | mr-beaver/Stage.js | implementation/js/src/infrastructure/api.js | JavaScript | mit | 32,954 |
// Base64 encoder/decoder with UTF-8 support
//
// Copyright (c) 2011 Vitaly Puzrin
// Copyright (c) 2011 Aleksey V Zapparov
//
// Author: Aleksey V Zapparov AKA ixti (http://www.ixti.net/)
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentatio... | minj/js-yaml | support/demo_template/base64.js | JavaScript | mit | 5,692 |
module.exports = require("npm:acorn@2.4.0/dist/acorn"); | TelerikFrenchConnection/JS-Applications-Teamwork | lib/npm/acorn@2.4.0.js | JavaScript | mit | 55 |
require 'rr'
require 'awesome_print'
%w"xiki/core/core_ext xiki/core/ol".each {|o| require o}
# RSpec::Runner.configure do |config|
RSpec.configure do |config|
config.mock_with :rr
end
module Xiki
def self.dir
File.expand_path("#{File.dirname(__FILE__)}/..") + "/"
end
end
def stub_menu_path_dirs
xiki_di... | stanwmusic/xiki | spec/spec_helper.rb | Ruby | mit | 738 |
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2016-2018 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Create oauthclient tables."""
import sqlalchemy as sa
import sqlalchemy_utils
fro... | tiborsimko/invenio-oauthclient | invenio_oauthclient/alembic/97bbc733896c_create_oauthclient_tables.py | Python | mit | 2,898 |
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Platform;
using osu.Game.Configuration;
namespace osu.Game.Overlays.Settings.Sections... | NeoAdonis/osu | osu.Game/Overlays/Settings/Sections/General/UpdateSettings.cs | C# | mit | 1,060 |
/**
* 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.eventhubs.v2017_04_01.implementation;
import jav... | selvasingh/azure-sdk-for-java | sdk/eventhubs/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/eventhubs/v2017_04_01/implementation/EventhubInner.java | Java | mit | 5,503 |
import actionTypes from '../../client/actions/types';
const defaultState = {
data: {},
errors: 'Not Found',
};
export default function domainDetailReducer(state = defaultState, action = {}) {
switch (action.type) {
case actionTypes.getDomainDetail:
return Object.assign({}, state, {
data: actio... | willopez/domainsjs | shared/report/domain-detail.js | JavaScript | mit | 415 |
// This is a manifest file that'll be compiled into including all the files listed below.
// Add new JavaScript/Coffee code in separate files in this directory and they'll automatically
// be included in the compiled file accessible from http://example.com/assets/application.js
// It's not advisable to add code directl... | astjohn/cornerstone | app/assets/javascripts/cornerstone.js | JavaScript | mit | 465 |
/* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */
#include <sstream>
#include <limits>
#include "ifcpp/model/AttributeObject.h"
#include "ifcpp/model/BuildingException.h"
#include "ifcpp/model/BuildingGuid.h"
#include "ifcpp/reader/ReaderUtil.h"
#include "ifcpp/writer/WriterUtil.h"
#include... | ifcquery/ifcplusplus | IfcPlusPlus/src/ifcpp/IFC4/lib/IfcMember.cpp | C++ | mit | 6,494 |
/**
* Copyright 2014 Pacific Controls Software Services LLC (PCSS). All Rights Reserved.
*
* This software is the property of Pacific Controls Software Services LLC and its
* suppliers. The intellectual and technical concepts contained herein are proprietary
* to PCSS. Dissemination of this information or reprodu... | dddomin3/angular-galaxy | services/adminNotification/adminNotificationDataService.js | JavaScript | mit | 1,524 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/thumbor/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com timehome@corp.globo.com
from thumbor.loaders import http_loader
from tornado.concurrent impor... | jdunaravich/thumbor | thumbor/loaders/strict_https_loader.py | Python | mit | 1,086 |
<?php
class device extends CI_Controller{
public function add_device(){
$this->load->model('device_model');
$device_name = $this->input->post('device_name');
$device_id = $this->input->post('device_id');
$about_device = $this->input->post('about_device');
$key = $this->session->userdata('id'); //later stages wi... | Chaitya62/IOT-Bridge-Final-name-not-comfirmed | application/controllers/device.php | PHP | mit | 2,164 |
define(function(require) {
var test = require('../../../test')
var count = 0
require.async('./a', function(a) {
test.assert(a.name === 'a', 'load CMD module file')
done()
})
require.async('./b.js', function() {
test.assert(global.SPECS_MODULES_ASYNC === true, 'load normal script file')
glo... | 007slm/seajs | tests/specs/module/require-async/main.js | JavaScript | mit | 609 |
namespace AbpKendoDemo.Migrations
{
using System;
using System.Data.Entity.Migrations;
public partial class Upgrade_Abp_And_Module_Zero_To_0_8_1 : DbMigration
{
public override void Up()
{
CreateTable(
"dbo.AbpBackgroundJobs",
c => new
... | s-takatsu/aspnetboilerplate-samples | KendoUiDemo/src/AbpKendoDemo.EntityFramework/Migrations/201602161446590_Upgrade_Abp_And_Module_Zero_To_0_8_1.cs | C# | mit | 4,104 |
/**
* 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.advisor.v2017_04_19;
import com.microsoft.azure.... | selvasingh/azure-sdk-for-java | sdk/advisor/mgmt-v2017_04_19/src/main/java/com/microsoft/azure/management/advisor/v2017_04_19/Suppressions.java | Java | mit | 2,252 |
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.Serialization;
using System;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.Text.RegularExpressions;
namespace Fungus
{
/**
* Visual scripting controller for the Flowchart programming language.
* Flow... | tapiralec/Fungus | Assets/Fungus/Flowchart/Scripts/Flowchart.cs | C# | mit | 21,856 |
// Copyright 2016 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package gitutil
import (
"html/template"
"testing"
dmp "github.com/sergi/go-diff/diffmatchpatch"
"github.com/stretchr/testify/assert"
"github.com/gogs... | gogits/gogs | internal/gitutil/diff_test.go | GO | mit | 1,244 |
<?php
include 'Vehicle.php';
include 'Car.php';
$car = new Car(4, 'Red', 'Audi', 'A4', 2016);
print_r($car);
echo "<br>";
$car->setColor('Green');
print_r($car);
| stoyantodorovbg/PHP-Web-Development-Basics | Lab OOP Encapsulation and Inheritance/problem6/index.php | PHP | mit | 166 |
#ifdef HAVE_WINRT
#define ICustomStreamSink StreamSink
#ifndef __cplusplus_winrt
#define __is_winrt_array(type) (type == ABI::Windows::Foundation::PropertyType::PropertyType_UInt8Array || type == ABI::Windows::Foundation::PropertyType::PropertyType_Int16Array ||\
type == ABI::Windows::Foundation::PropertyType::Pro... | liangfu/dnn | modules/highgui/src/cap_msmf.hpp | C++ | mit | 111,855 |
angular.module('starter.controllers', [])
// A simple controller that fetches a list of data from a service
.controller('PetIndexCtrl', function($scope, PetService) {
// "Pets" is a service returning mock data (services.js)
$scope.pets = PetService.all();
})
// A simple controller that shows a tapped item's dat... | robwormald/favor-app | www/js/controllers.js | JavaScript | mit | 899 |
// Copyright 2011, 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 condition... | hems/-labs | examples/audio/lib/wavetable.js | JavaScript | mit | 8,974 |
/**
* Created by maomao on 2020/4/20.
*/
Java.perform(function() {
var cn = "android.telephony.SubscriptionManager";
var target = Java.use(cn);
if (target) {
target.addOnSubscriptionsChangedListener.overloads[0].implementation = function(dest) {
var myArray=new Array()
myAr... | honeynet/droidbot | droidbot/resources/scripts/telephony/SubscriptionManager.js | JavaScript | mit | 3,831 |
"use strict";
const chalk = require("chalk");
const readline = require("readline");
/**
* Fill screen with blank lines, move to "0" afterwards and clear screen afterwards.
* Note that it is still possible to "scroll back" afterwards.
*
* Function performs nothing in case the stdout is NOT a TTY.
*/
exports.cls =... | DorianGrey/ng2-webpack-template | scripts/util/formatUtil.js | JavaScript | mit | 1,001 |
module Locomotive
class SitePolicy < ApplicationPolicy
class Scope < Scope
def resolve
if membership.account.super_admin?
scope.all
else
membership.account.sites
end
end
end
def index?
true
end
def show?
true
end
def... | slavajacobson/engine | app/policies/locomotive/site_policy.rb | Ruby | mit | 1,128 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import time
import string
import json
import config
import helper
import busses
def log_message(msg):
#log format: time type message
time_str = str(time.time())
line = time_str[:time_str.find(".")]
line = line.rjust(10, str(" "))
li... | Pixdigit/Saufbot | logger.py | Python | mit | 1,904 |
public class LeetCode0363 {
public int maxSumSubmatrix(int[][] matrix, int k) {
int m = matrix.length, n = matrix[0].length, ans = Integer.MIN_VALUE;
long[] sum = new long[m + 1];
for (int i = 0; i < n; ++i) {
long[] sumInRow = new long[m];
for (int j = i; j < n; ++j) {
for (int p = 0; p < m; ++p) {
... | dunso/algorithm | Java/Devide/LeetCode0363.java | Java | mit | 1,278 |
<?php
/*
* This file is part of the PHPExifTool package.
*
* (c) Alchemy <support@alchemy.fr>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPExiftool\Driver\Tag\DICOM;
use JMS\Serializer\Annotation\ExclusionPolicy;... | bburnichon/PHPExiftool | lib/PHPExiftool/Driver/Tag/DICOM/FilmBoxContentSequence.php | PHP | mit | 820 |
<?php
namespace Cascade\Mapper\Map;
use Cascade\Mapper\Mapping\MappingInterface;
class Map implements MapInterface
{
/**
* @var MappingInterface[]
*/
private $mappings = [];
/**
* @param MappingInterface[] $mappings
*/
public function __construct($mappings)
{
foreach ... | cascademedia/php-object-mapper | src/Map/Map.php | PHP | mit | 650 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import time
import numpy as np
import matplotlib
matplotlib.use('GTKAgg')
from matplotlib import pyplot as plt
from koheron import connect
from drivers import Spectrum
from drivers import Laser
host = os.getenv('HOST','192.168.1.100')
client = connect(host, nam... | Koheron/lase | examples/spectrum_analyzer.py | Python | mit | 1,482 |
const assert = require('assert')
const crypto = require('crypto')
const { createRequest } = require("../util/util")
describe('测试搜索是否正常', () => {
it('获取到的数据的 name 应该和搜索关键词一致', done => {
const keywords = "海阔天空"
const type = 1
const limit = 30
const data = 's=' + keywords + '&limit=' + limit + '&type=' ... | linguokang/NeteaseCloudMusic | test/search.test.js | JavaScript | mit | 692 |
export default function collapseDuplicateDeclarations() {
return (root) => {
root.walkRules((node) => {
let seen = new Map()
let droppable = new Set([])
node.walkDecls((decl) => {
// This could happen if we have nested selectors. In that case the
// parent will loop over all its... | tailwindcss/tailwindcss | src/lib/collapseDuplicateDeclarations.js | JavaScript | mit | 742 |
module.exports = {
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"jasmine" : true
},
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module"
},
"rules": {
"no-mixed-spaces-and-tabs": [2, "smart-tabs"],
"linebre... | raavr/angularjs-todo-webpack | .eslintrc.js | JavaScript | mit | 536 |
import * as debug from 'debug';
import Resolver from '../../resolver';
import { IRemoteUser } from '../../../../models/user';
import acceptFollow from './follow';
import { IAccept, IFollow } from '../../type';
const log = debug('misskey:activitypub');
export default async (actor: IRemoteUser, activity: IAccept): Pro... | ha-dai/Misskey | src/remote/activitypub/kernel/accept/index.ts | TypeScript | mit | 744 |
version https://git-lfs.github.com/spec/v1
oid sha256:42fcecf8fdabe110af986ac81bb56b598f5a3fa59c6d0c4cc8b80daa2dca0473
size 1121
| yogeshsaroya/new-cdnjs | ajax/libs/dojo/1.4.6/_base/_loader/hostenv_spidermonkey.js | JavaScript | mit | 129 |
$(document).ready(function(){
var Previewer = {
preview: function(content, output) {
$.ajax({
type: 'POST',
url: "/govspeak",
data: { govspeak: content.val() },
dataType: 'json'
}).success(function(data){
output.html(data['govspeak']);
});
}
};
$(... | alphagov/trade-tariff-admin | app/assets/javascripts/preview.js | JavaScript | mit | 576 |
__version__ = '0.8.1'
__author__ = "Massimiliano Pippi & Federico Frenguelli"
VERSION = __version__ # synonym
| ramcn/demo3 | venv/lib/python3.4/site-packages/oauth2_provider/__init__.py | Python | mit | 113 |
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2020 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
/**
* @namespace Phaser.Structs
*/
module.exports = {
List: require('./List'),
Map: require('./Map'),
ProcessQueue: require('./P... | TukekeSoft/phaser | src/structs/index.js | JavaScript | mit | 425 |
#! /usr/bin/env python
"""Show file statistics by extension."""
import os
import sys
class Stats:
def __init__(self):
self.stats = {}
def statargs(self, args):
for arg in args:
if os.path.isdir(arg):
self.statdir(arg)
elif os.path.isfile(arg):
... | OS2World/APP-INTERNET-torpak_2 | Tools/scripts/byext.py | Python | mit | 3,894 |
package com.ocdsoft.bacta.swg.shared.localization;
/**
* Created by crush on 11/21/2015.
*/
public class LocalizedString {
}
| bacta/pre-cu | src/main/java/com/ocdsoft/bacta/swg/shared/localization/LocalizedString.java | Java | mit | 128 |