repo_name stringlengths 4 116 | path stringlengths 4 379 | size stringlengths 1 7 | content stringlengths 3 1.05M | license stringclasses 15
values |
|---|---|---|---|---|
the-zebulan/CodeWars | tests/kyu_8_tests/test_remove_the_time.py | 823 | import unittest
from katas.kyu_8.remove_the_time import shorten_to_date
class ShortenToDateTestCase(unittest.TestCase):
def test_equals(self):
self.assertEqual(shorten_to_date('Monday February 2, 8pm'),
'Monday February 2')
def test_equals_2(self):
self.assertEqual(s... | mit |
reallyalexpro/symphony-2.4-with-extentions | symphony/lib/toolkit/fields/field.textarea.php | 11115 | <?php
/**
* @package toolkit
*/
require_once FACE . '/interface.exportablefield.php';
require_once FACE . '/interface.importablefield.php';
/**
* A simple Textarea field that essentially maps to HTML's `<textarea/>`.
*/
Class fieldTextarea extends Field implements ExportableField, ImportableField {
p... | mit |
rfprod/hubapp | app/controllers/userController.client.js | 1048 | 'use strict';
(function () {
var profileId = document.querySelector('#profile-id') || null;
var profileUsername = document.querySelector('#profile-username') || null;
var profileRepos = document.querySelector('#profile-repos') || null;
var displayName = document.querySelector('#display-name');
var apiUr... | mit |
maurer/tiamat | samples/Juliet/testcases/CWE78_OS_Command_Injection/s07/CWE78_OS_Command_Injection__wchar_t_file_execl_83a.cpp | 2086 | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE78_OS_Command_Injection__wchar_t_file_execl_83a.cpp
Label Definition File: CWE78_OS_Command_Injection.strings.label.xml
Template File: sources-sink-83a.tmpl.cpp
*/
/*
* @description
* CWE: 78 OS Command Injection
* BadSource: file Read input from a file
* Go... | mit |
Jovtcho/JavaFundamentals | JavaOOPBasics/01.DefiningClasses-Exercises/carSalesman/Engine.java | 1886 | package carSalesman;
public class Engine {
//<Model> <Power> <Displacement> <Efficiency> displacements and efficiency are optional
private static final int DEFAULT_DISPLACEMENT_VALUE = -1;
private static final String DEFAULT_EFFICIENCY_VALUE = "n/a";
private String model;
private int power;
pr... | mit |
hwndmaster/trip2print | TripToPrint.ReportTuning.Dto/MooiDocumentDto.cs | 236 | namespace TripToPrint.ReportTuning.Dto
{
public class MooiDocumentDto
{
public string Title { get; set; }
public string Description { get; set; }
public MooiSectionDto[] Sections { get; set; }
}
}
| mit |
slicebuild/sb | impl/mono/core/Slices/SliceDirectory.cs | 2956 | using System.Collections.Generic;
using System.IO;
using System.Linq;
using sb.Core.Utils;
namespace sb.Core.Slices
{
public class SliceDirectory
{
public SliceDirectory(DirectoryInfo rootDir, DirectoryInfo bunchDir, SemVerInfo bunchInfo)
{
RootDir = rootDir;
BunchDir =... | mit |
Dooder07/DoodCore | src/main/java/net/doodcraft/dooder07/spigot/doodcore/lib/PacketMapChunk.java | 635 | package net.doodcraft.dooder07.spigot.doodcore.lib;
import net.minecraft.server.v1_10_R1.PacketPlayOutMapChunk;
import org.bukkit.craftbukkit.v1_10_R1.CraftChunk;
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftPlayer;
import org.bukkit.entity.Player;
public class PacketMapChunk {
private final net.minecraft.s... | mit |
seriesrover/differ | signature/encoding/properties.rb | 276 | require_relative '../../helper'
class Properties
def initialize(path)
@properties = FileIO.properties path
end
def get_size
@properties[:size]
end
def get_creation_time
@properties[:ctime]
end
def get_modification_time
@properties[:mtime]
end
end
| mit |
denbedilov/ATTENDER | server/attender-mobile/engine/DAL.py | 7978 | __author__ = 'olesya'
#This class is suppose to access to DB and transfer answers to other classes
from models.user import User
from models.event import Event
from models.attendings import Attendings
import json
from time import mktime
from facebook_logic import fb_logic
import logging
class DAL():
@s... | mit |
steveash/jopenfst | src/main/java/com/github/steveash/jopenfst/State.java | 1506 | /*
* Copyright 2016 Steve Ash
*
* 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 applicable law or agreed to in... | mit |
SystemFriend/HoloLensUnityChan | Assets/MRTK/Core/Utilities/ScriptingUtilities.cs | 2959 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.
#if UNITY_EDITOR
using System;
using System.IO;
using UnityEditor;
using UnityEngine;
namespace Microsoft.MixedReality.Toolkit.Utilities.Editor
{
/// <summary>
... | mit |
yogeshsaroya/new-cdnjs | ajax/libs/uikit/2.13.1/js/core/dropdown.js | 129 | version https://git-lfs.github.com/spec/v1
oid sha256:56d490b2513456873a3efa9bc7b40e81ea0637c259363edc2ac7ee394749a528
size 8176
| mit |
ascartabelli/lamb | src/math/modulo.js | 801 | /**
* Performs the modulo operation and should not be confused with the
* {@link module:lamb.remainder|remainder}.
* The function performs a floored division to calculate the result and not
* a truncated one, hence the sign of the dividend is not kept, unlike the
* {@link module:lamb.remainder|remainder}.
* @exam... | mit |
AndyDune/ok62.ru | !_dune/_views/default/bit/user/info/with_object_view_open.php | 780 | <dl id="saler-short-info">
<dt>
Ðàçìåñòèë ïîëüçîâàòåëü:
</dt>
<dd>
<a href="/user/<?php echo $this->user_info->id; ?>/" title="Ôîòî"><img src="<?php echo $this->view_folder; ?>/img/user/default.jpg" /></a>
</dd>
<dd>
<a href="/user/info/<?php echo $this->user_info->id; ?>/" title="Ïåðñîíàëüíàÿ ñòðàíèöà"><?php echo $thi... | mit |
bright-bogazici-universitesi/bright | public/js/app.js | 964569 | /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModu... | mit |
apo-j/Projects_Working | Bivi/src/Bivi.FrontOffice/Bivi.FrontOffice.Web.ViewModels/Helpers/ArticleHelper.cs | 1358 | using System;
using System.Linq;
using System.Collections.Generic;
using System.Threading;
using System.Web.Mvc;
using System.Web.Routing;
using Bivi.Data.Context;
using Bivi.Domaine;
using Bivi.Infrastructure.Constant;
using Bivi.Infrastructure.Extensions;
using AutoMapper;
using System.Text;
using System... | mit |
ekonor/hokeyapp | net47/HockeyApp/HockeyApp.Contracts/Dto/Arenas/ArenaViewItemDto.cs | 483 | using HockeyApp.Contracts.Dto.Geo;
namespace HockeyApp.Contracts.Dto.Arenas
{
public sealed class ArenaViewItemDto : ArenaItemDtoBase
{
public string FullName { get; set; }
public string Contacts { get; set; }
public CoordinatesDto Coordinates { get; set; }
public string Abo... | mit |
uhray/gets | index.js | 863 | ;(function() {
var root = this;
function gets() {
var args = Array.prototype.slice.call(arguments, 0),
f = function(d) {
args.forEach(function(x) { d = d && d[x]; });
return d;
};
function m(f) {
f.or = function(x) { return m(function(d) { return f(d) || x; }); };... | mit |
zachdimitrov/Homework | CSharp-Part-2/01.Arrays/15.PrimeNumbers/Properties/AssemblyInfo.cs | 1406 | 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: AssemblyTitle("15... | mit |
chyno/chynosurf | src/services/http.js | 1949 | // A-> $http function is implemented in order to follow the standard Adapter pattern
var $http = function(url){
// A small example of object
var core = {
// Method that performs the ajax request
ajax : function(method, url, args){
// Establishing a promise in return
return ... | mit |
max-barry/generator-jumpstart-static | generators/gulp/templates/gulp/fonts.js | 367 | // Load general packages
var gulp = require('gulp'),
pkg = require('../package.json'),
path = require('path');
// Fonts variables
var src = path.join(pkg.src.fonts, '**/*.{eot,woff,woff2,svg,ttf}');
var dest = pkg.build.fonts;
// Copy font files to dest directory
gulp.task('fonts', function() {
return gul... | mit |
knordman/getflags | index.d.ts | 973 | // Type definitions for getflags 1.3.0
// Project: getflags
// Definitions by: Kristian Nordman knordman.github@cxz.fi
export = getflags;
declare function getflags(args: string[], configuration: getflags.Configuration): getflags.Flags;
declare namespace getflags {
interface ConfigurationEntry {
/** Short... | mit |
JosefFriedrich-nodejs/baldr | src/mgmt/cli/dist/node/commands/downloader/action.js | 1788 | "use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { t... | mit |
viejalospelos/proyectoCupon | src/Cupon/BackendBundle/Form/CiudadType.php | 897 | <?php
namespace Cupon\BackendBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class CiudadType extends AbstractType
{
/**
* @param FormBuilderInterface $builder
* @param array $options
... | mit |
manuSrep/fast_science | scr/generic/input_output/reader.cpp | 3034 | //
// reader.cpp
// fast_science
//
//
// Created by Manuel on 12.06.15.
//
//
#include "reader.h"
template <class T>
fs::Reader<T>::Reader(std::string const & file, std::string const & path) {
_suffix = new std::string;
_file = new std::string;
_path = new std::string;
std::string tmp_str = file;
... | mit |
saroad2/units | units_java/src/unitsLib/java/com/units/frequency/Megahertz.java | 1576 | /* This file is auto generated.
* DO NOT EDIT IT MANUALLY!
*/
package com.units.frequency;
import com.units.internal.Multipliers;
public class Megahertz extends Frequency {
public static final double _scale =
Multipliers.mega * Hertz._scale;
public Megahertz(double value) {
super(value);
}
@Override
p... | mit |
IQReserve/react-contextmenu | examples/multiple-targets/target.js | 461 | "use strict";
import React from "react";
import { ContextMenuLayer } from "../../src";
import MenuTypes from "./constants";
const MenuTarget = React.createClass({
displayName: "MenuTarget",
render() {
return (
<div className="well">
{this.props.name}
</div>
... | mit |
creative2020/homespotchoice | wp-content/plugins/groups/lib/core/class-groups-capability.php | 8597 | <?php
/**
* class-groups-capability.php
*
* Copyright (c) "kento" Karim Rahimpur www.itthinx.com
*
* This code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt.
*
* This code is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warr... | mit |
sapphiredev/twitter-archiver | src/client/reducers/StatsReducer.ts | 415 | import {
StatsKeys,
StatsAction,
} from '~/client/actions/types';
export interface StatsState {
queueCount: number;
}
const initialState: StatsState = {
'queueCount': 0,
};
export function stats(state = initialState, action: StatsAction): StatsState {
switch (action.type) {
case StatsKeys.UPDATE_QUEUE_COUNT:
... | mit |
Azure/azure-sdk-for-go | services/network/mgmt/2018-02-01/network/availableendpointservices.go | 5901 | package network
// 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.
// Changes may cause incorrect behavior and will be lost if the code is regenerated... | mit |
mesh0000/poolui | app/user/payments/payments.js | 450 | 'use strict';
app.controller('PaymentsCtrl', function($scope, dataService) {
$scope.payments = {};
$scope.selected = [];
$scope.options = {
page: 1,
limit: 15
}
$scope.loadPayments = function () {
var params = angular.copy($scope.options);
params.page -= 1;
var urlParams = $.param(params)
dataSer... | mit |
kinkome/pipe2me | config/metric_system.rb | 131 | require "metric_system"
METRIC_SYSTEM_SOCKET = "var/metric_system.socket"
METRIC_SYSTEM_DATABASE = "var/metric_system.sqlite"
| mit |
davidsbond/brock | container/siblings_test.go | 2012 | package container_test
import (
"fmt"
"testing"
"github.com/davidsbond/brock/container"
"github.com/stretchr/testify/assert"
)
func TestSibling_Add(t *testing.T) {
siblings := container.NewSiblingContainer()
tt := []struct {
Location string
ExpectedError string
ExpectedCount int
}{
{Location: "l... | mit |
sporchia/alttp_vt_randomizer | app/Console/Commands/JsonToCsv.php | 1946 | <?php
namespace ALttP\Console\Commands;
use Illuminate\Console\Command;
use ALttP\Item;
use ALttP\Randomizer;
use ALttP\World;
/**
* This converts json files to csv.
*/
class JsonToCsv extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $s... | mit |
Senither/ShareX-Media-Server | database/migrations/2014_10_12_000000_create_users_table.php | 833 | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateUsersTable extends Migration
{
public function up()
{
Schema::create('users', function (Blueprint $table) {
$table->id();
$table->boo... | mit |
randy-girard/app_perf_rpm | lib/app_perf_rpm/introspector.rb | 1093 | # frozen_string_literal: true
module AppPerfRpm
class Introspector
VALID_RUNNERS = [
:PhusionPassenger,
:Puma,
:Rainbows,
:Resque,
:Sidekiq,
:Sinatra,
:Unicorn,
:Webrick
]
class << self
def agentable?
if raking? || rspecing?
AppPer... | mit |
karim/adila | database/src/main/java/adila/db/hwc8600.java | 191 | // This file is automatically generated.
package adila.db;
/*
* Huawei
*
* DEVICE: hwc8600
* MODEL: C8600
*/
final class hwc8600 {
public static final String DATA = "Huawei||";
}
| mit |
frig-neutron/PIPE | pipe-gui/src/main/java/pipe/controllers/application/PipeApplicationController.java | 9414 | package pipe.controllers.application;
import pipe.actions.gui.PipeApplicationModel;
import pipe.controllers.*;
import pipe.gui.PetriNetTab;
import pipe.historyActions.AnimationHistoryImpl;
import uk.ac.imperial.pipe.animation.PetriNetAnimator;
import uk.ac.imperial.pipe.models.manager.PetriNetManager;
import u... | mit |
konvajs/site | react-demos/image-label-tool/src/components/App.js | 866 | import React from "react";
import Canvas from "./Canvas";
import RegionsList from "./RegionsList";
import useStore from "../store";
export default () => {
const { setBrightness } = useStore();
return (
<React.Fragment>
<h2>Image annotate prototype</h2>
<p className="description">Draw objects con... | mit |
mogria/void.php | lib/Asset/Asset.php | 6148 | <?php
namespace Void;
/**
* Represents an Asset (a .css or a .js file or similiar which is not directly in the html
* Inside this file you can use certain statements like in the following example:
*
* -- application.css --
* //= require style.css
* //= require_tree modules
*
*
* if the directory structure i... | mit |
longze/vue2-study-together | element-ui-project/build/webpack.base.conf.js | 1626 | var path = require('path')
var utils = require('./utils')
var config = require('../config')
var vueLoaderConfig = require('./vue-loader.conf')
function resolve (dir) {
return path.join(__dirname, '..', dir)
}
module.exports = {
entry: {
app: './src/main.js'
},
output: {
path: config.build.assetsRoot,
... | mit |
DominikWiesend/wiesend-dll | projects/Wiesend.Media/Media/ExtensionMethods/ScreenExtensions.cs | 8571 | #region Project Description [About this]
// =================================================================================
// The whole Project is Licensed under the MIT License
// =================================================================================
// =======================================... | mit |
sooth-sayer/Rubeque | lib/rubeque/baby_got_stacks.rb | 582 | module Rubeque
module BabyGotStacks
class Stack
def initialize(initial_array)
@stack = (initial_array.is_a? Array) ? initial_array : Array.try_convert(initial_array)
end
def pop(count = 0)
if (count == 0)
@stack.pop
else
@stack.pop(count).r... | mit |
PAlexcom/Spider4Schema | dist/type/landform.php | 525 | <?php
/**
* A landform or physical feature. Landform elements include mountains, plains, lakes, rivers, seascape and oceanic waterbody interface features such as bays, peninsulas, seas and so forth, including sub-aqueous terrain features such as submersed mountain ranges, volcanoes, and the great ocean basins.
*
* @... | mit |
vernonzheng/scala-for-the-Impatient | src/Chapter07/exercise07.scala | 572 | /**
* 在前一个练习中,将所有引入语句移动到尽可能小的作用域里
*/
object Q7 extends App{
import java.util.{HashMap => JavaHashMap}
val javaMap = new JavaHashMap[Int,String]
javaMap.put(1, "One");
javaMap.put(2, "Two");
javaMap.put(3, "Three");
javaMap.put(4, "Four");
import collection.mutable.{HashMap => ScalaHashMap, Map => Sc... | mit |
rossedlin/cryslo-php | src/Core/Str.php | 2209 | <?php
namespace Cryslo\Core;
/**
* Created by PhpStorm.
*
* @author Ross Edlin <contact@rossedlin.com>
*
* Date: 15/03/18
* Time: 16:52
*
* Class Str
* @package Cryslo\Core
*/
class Str
{
/**
* @param $key
* @return string
*/
public static function cacheFriendlyKey($key)
{
... | mit |
Hyperspaces/Hyperspace.DotLua | src/Irony.Interpreter/InterpretedLanguageGrammar.cs | 2532 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Irony.Ast;
using Irony.Parsing;
using Irony.Interpreter.Ast;
namespace Irony.Interpreter
{
/// <summary> Base class for languages that use Irony Interpreter to execute scripts. </summary>
public abstract class Interpr... | mit |
SequencingDOTcom/Weather-My-Way-RTP-App | Android/app/src/main/java/com/sequencing/weather/dagger/EventBusModule.java | 150 | package com.sequencing.weather.dagger;
import dagger.Module;
/**
* Created by omazurova on 5/16/2017.
*/
@Module
public class EventBusModule {
}
| mit |
ddierschow/bamca | bin/ehelps.py | 1639 | #!/usr/local/bin/python
from sprint import sprint as print
import sys
import mbdata
jsfun = '''<SCRIPT LANGUAGE="JavaScript">
<!--
function pick(symbol) {
if (window.opener && !window.opener.closed)
window.opener.document.%s.value = symbol;
window.close();
}
// -->
</SCRIPT>
'''
def countries_help():
... | mit |
Avit22/proposal | application/views/kaprodi_ptik/lihat_proposal.php | 2981 | <!DOCTYPE html>
<html lang="en">
<?php $this->view('template/head'); ?>
<body class="nav-md">
<div class="container body">
<div class="main_container">
<?php $this->view('template/sidebar'); ?>
<?php $this->view('template/top'); ?>
<!-- page con... | mit |
javulorg/javul | database/migrations/2016_10_06_091902_forum_topic.php | 944 | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class ForumTopic extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
//
Schema::create('forum_topic', function (Blueprint $table) {
... | mit |
bblais/plasticity | plasticity/dialogs/waxy/demos/FileDialog.py | 2539 | #!/usr/bin/env python
from waxy import *
wildcard = "Python source (*.py)|*.py|" \
"Compiled Python (*.pyc)|*.pyc|" \
"SPAM files (*.spam)|*.spam|" \
"Egg file (*.egg)|*.egg|" \
"All files (*.*)|*.*"
class MainFrame(Frame): # frame has a sizer built in
d... | mit |
takuya-takeuchi/Demo | Xamarin.Forms.Portable8/Xamarin.Forms.Portable8/Xamarin.Forms.Portable8.UWP/App.xaml.cs | 4136 | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xam... | mit |
Shkyrockett/engine | Engine.Experimental/Physics/Enums/Area.cs | 1229 | // <copyright file="Areas.cs" company="Shkyrockett" >
// Copyright © 2005 - 2020 Shkyrockett. All rights reserved.
// </copyright>
// <author id="shkyrockett">Shkyrockett</author>
// <license>
// Licensed under the MIT License. See LICENSE file in the project root for full license information.
// </license>
//... | mit |
mipengine/mip-extensions-platform | mip-showcase-icon/mip-showcase-icon.js | 573 | /**
* @file mip-showcase-icon 组件
* @author zhuguoxi
* @description 此组件只为showcase,请勿在正式产品使用。
*/
define(function (require) {
'use strict';
var customElement = require('customElement').create();
// 需要提前显示占位
customElement.prototype.firstInviewCallback = function () {
var me = this;
var... | mit |
keepkey/device-client | src/transport.ts | 3940 | import ByteBuffer = require('bytebuffer');
const OLD_MESSAGE_HEADER_START = '##';
const MESSAGE_HEADER_START = String.fromCharCode(0x3f) + '##';
export abstract class Transport {
public static MSG_HEADER_LENGTH = 6;
public deviceInUse: boolean = false;
private messageMaps = {};
private messageMap;
private... | mit |
Azure/azure-sdk-for-ruby | management/azure_mgmt_batchai/lib/2018-03-01/generated/azure_mgmt_batchai/models/image_source_registry.rb | 1953 | # encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
module Azure::BatchAI::Mgmt::V2018_03_01
module Models
#
# Details of the container image such as name, URL and credentials.
#
class Image... | mit |
waltersoto/brief | Brief/Query.cs | 835 |
using System.Data;
using System.Data.SqlClient;
namespace Brief {
public class Query : Command {
private int timeOut = -1;
public Query() { }
public Query(string queryTxt) {
SqlCommand = new SqlCommand(queryTxt) { CommandType = CommandType.Text };
}
public ... | mit |
Adrymne/KC3Kai | src/pages/strategy/tabs/lscs/lscs.js | 2537 | (function(){
"use strict";
KC3StrategyTabs.lscs = new KC3StrategyTab("lscs");
KC3StrategyTabs.lscs.definition = {
tabSelf: KC3StrategyTabs.lscs,
/* INIT
Prepares all data needed
---------------------------------*/
init :function(){
},
/* EXECUTE
Places data onto the inte... | mit |
davidaq/aq-web-front-node | lib/set.js | 388 | module.exports = set;
function set(arr) {
this.map = {};
if (Array.isArray(arr)) {
for (var i = 0; i < arr.length; i++)
this.add(arr[i]);
}
}
set.prototype.have = function(id) {
return this.map['$$' + id];
};
set.prototype.add = function(id) {
this.map['$$' + id] = 1;
};
set.... | mit |
Patrick-Vogt/bookery | app/Http/Requests/PasswordUpdateRequest.php | 1202 | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Hash;
use Illuminate\Validation\Validator;
class PasswordUpdateRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
pu... | mit |
GKotfis/csharp | generators/Output/TestMethodBodyData.cs | 4035 | using System;
using System.Collections.Generic;
using System.Linq;
using Generators.Input;
namespace Generators.Output
{
public class TestMethodBodyData
{
private const string SutVariableName = "sut";
private const string TestedVariableName = "actual";
private const string ExpectedVaria... | mit |
codekuangben/Android | Test/TestLibs/Libs/src/main/java/Libs/FrameWork/GlobalEventCmd.java | 192 | package Libs.FrameWork;
/**
* @brief 全局性的事件
*/
public class GlobalEventCmd
{
static public void onSample()
{
}
static public void onEnterWorld()
{
}
} | mit |
Iliyan7/SoftUni-Training | ProgrammingFundamentals/Arrays-Lab/Tripple_Sum/Tripple_Sum.cs | 920 | using System;
using System.Linq;
namespace Tripple_Sum
{
public class Tripple_Sum
{
public static void Main()
{
//long[] numbers = Console.ReadLine().Split(' ').Select(long.Parse).ToArray();
string[] strNumbers = Console.ReadLine().Split(' ');
long[] number... | mit |
JadeBuhler/CodeIgniterBlog | application/controllers/Posts.php | 4224 | <?php
/*
* Posts controller
*/
class Posts extends CI_Controller
{
//Handles the display of the posts page.
public function index()
{
$data['title'] = "Latest Posts";
//Retrieves posts from the database using the get_posts() method.
$data['posts'] = $this->Post_model->get_posts();
//Loads the head... | mit |
cgx9/evoflux | src/dispatcher.js | 940 | "use strict";
//source code from:bleeding-edge-sample-app
var Dispatcher = function(){
this.handlers = [];
this.isDispatching = false;
this.pendingPayload = null;
}
Dispatcher.prototype.register = function(cb) {
this.handlers.push({
isPending:false,
isHandled:false,
callback:cb
});
};
Dispatcher... | mit |
omeganetresearch/SoNetCMS | assets/core/resources/javascript/ckeditor/plugins/sonet_ajaxsaveas/plugin.js | 678 | /*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/
/**
* @ajaxSaveAs plugin.
*/
CKEDITOR.plugins.add('sonet_ajaxsaveas', {
init: function(editor) {
var pluginName = 'sonet_ajaxsaveas';
editor... | mit |
adrilo/headek | app/app.js | 274 | import React from 'react';
import Router from 'react-router';
import routes from './routes';
Router.run(routes, Router.HistoryLocation, function (Root, state) {
var params = state.params;
React.render(<Root params={params} />, document.getElementById('app'));
});
| mit |
interarticle/ssctp | SSCTP.test.cs.cs | 2476 | //
// SimpleSerialCommandTransferProtocol
//
// Copyright (c) 2013 赵迤晨 (Zhao, Yichen) <max.zhaoyichen@gmail.com>
//
// 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, inc... | mit |
bosondata/bosonnlp.py | bosonnlp/exceptions.py | 344 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
from requests.exceptions import HTTPError
class TaskNotFoundError(HTTPError):
"""任务不存在。"""
class TaskError(HTTPError):
"""分析任务出错。"""
class TimeoutError(Exception):
"""分析任务超时。"""
| mit |
giv2giv/giv2giv-rails | db/migrate/20130921022322_remove_token_pin_from_payment_accounts.rb | 322 | class RemoveTokenPinFromPaymentAccounts < ActiveRecord::Migration
def change
remove_column :payment_accounts, :token if ActiveRecord::Base.connection.column_exists?(:payment_accounts, :token)
remove_column :payment_accounts, :pin if ActiveRecord::Base.connection.column_exists?(:payment_accounts, :pin)
end
e... | mit |
Spiddekauga/common-utils | src/main/java/net/_01001111/text/LoremIpsum.java | 5057 | package net._01001111.text;
import java.util.Random;
/*
* Copyright 2010 Oliver C Dodd http://01001111.net Licensed under the MIT license:
* http://www.opensource.org/licenses/mit-license.php
*/
@SuppressWarnings("javadoc")
public class LoremIpsum {
/*
* The Lorem Ipsum Standard Paragraph
*/
protected final... | mit |
skipify/vitexframework | vitex/service/model/exception/NotFoundConfigException.php | 128 | <?php
namespace vitex\service\model\exception;
use vitex\core\Exception;
class NotFoundConfigException extends Exception
{
} | mit |
oscarw3/Springies | src/Viscosity.java | 378 | import org.jbox2d.common.Vec2;
public class Viscosity {
double myK =0.4;
public Viscosity(Double k){
this.myK =k;
}
public void setViscosity(double K){
myK = K;
}
@SuppressWarnings("static-access")
protected void applyViscosity(Mass gMass){
gMass.applyForce(new Vec2((float)-myK*(float)gMass.gam... | mit |
karunasagark/ps | hourRank2/p2.cpp | 362 | #include <iostream>
#include <algorithm>
#define MOD 1000000009
using namespace std;
int main()
{
int n, s = 0, ans = 0; cin >> n;
int f[100000] = {};
for (int m = 3; m < n; m++)
{
s = 0;
for (int i = 1; i < m; i++)
{
s += ( f[i] + f[m - i + 1] ) % MOD;
}
f[m] = s;
ans += s;
}... | mit |
spazzarama/Direct3D-Rendering-Cookbook | Ch06_01DisplacementMapping_TangentSpace/ConstantBuffers.cs | 3500 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
using SharpDX;
namespace Ch06_01DisplacementMapping
{
public static class ConstantBuffers
{
/// <summary>
/// Per Object constant buffer (m... | mit |
Nappa9693/elfenben | lib/elfenben.js | 5353 | // Generated by Elfenben v1.0.16
require("./require");
var fs = require("fs"),
path = require("path"),
ls = require("./ls"),
repl = require("./repl"),
watcher = require("./watcher"),
isValidFlag = /-h\b|-r\b|-v\b|-b\b|-s\b/,
error = function(err) {
console.error(err.message);
ret... | mit |
rjurado01/rails_jwt_auth | spec/controllers/invitations_controller_spec.rb | 5628 | require 'rails_helper'
RSpec.describe RailsJwtAuth::InvitationsController do
%w[ActiveRecord Mongoid].each do |orm|
context "Using #{orm}" do
before(:all) { initialize_orm(orm) }
let(:invited_user) { RailsJwtAuth.model.invite email: 'valid@example.com' }
let(:json) { JSON.parse(response.body) ... | mit |
Keyang/notebox | tests/nb-u.js | 1335 | var assert = require("assert");
var db = require("../db");
var fs = require("fs");
var dbFile = __dirname + "/testdb";
var d;
var c = require("../core/config");
var note = require("../core/note");
var spawn = require("child_process").spawn;
describe("CLI: update note", function() {
before(function(done) {
d = db... | mit |
kevin-montrose/stacman-java | src/com/stackexchange/stacman/FilterType.java | 97 | package com.stackexchange.stacman;
public enum FilterType {
Safe,
Unsafe,
Invalid
}
| mit |
3pillarlabs/hailstorm-sdk | hailstorm-client-exchange/src/main/java/com/tpg/labs/hailstorm/clientexchange/LogEvent.java | 1447 | package com.tpg.labs.hailstorm.clientexchange;
import com.fasterxml.jackson.annotation.JsonIgnore;
import java.time.Duration;
public class LogEvent {
private String projectCode;
private long timestamp;
private int priority;
private String level;
private String message;
private long id;
... | mit |
czukowski/CodeGenerator | tests/CodeGenerator/Framework/Testcase.php | 3167 | <?php
/**
* Base testcase class for PHPUnit
*
* @package CodeGenerator
* @category Framework
* @author Korney Czukowski
* @copyright (c) 2012 Korney Czukowski
* @license MIT License
*/
namespace CodeGenerator\Framework;
abstract class Testcase extends \PHPUnit_Framework_TestCase
{
/**
* @var ... | mit |
iplo/Specter | specter/envirementcontroller.py | 119 | import os
def appname():
cwd = os.getcwd()
array = cwd.split('/')
arraylen = len(array)
return array[arraylen - 1] | mit |
christophla/Angular2Skeleton.Node | src/tools/get-webpack-assets.js | 1205 | 'use strict';
/**
* Gathers the web assets from build generated webpack-assets.json
*/
var config = require('./../config/variables');
var path = require('path');
var assetsJsonPath = path.resolve(config.webpack.assetsPath, config.webpack.assetsFilename);
/**
* @type {function}
* @returns {object}
*/
var getWeb... | mit |
reimagined/resolve | examples/ts/personal-data/common/aggregates/blog-post.projection.ts | 439 | import { AggregateProjection } from '@resolve-js/core'
import { BLOG_POST_CREATED, BLOG_POST_DELETED } from '../blog-post.events'
const projection: AggregateProjection = {
Init: () => ({
isExist: false,
}),
[BLOG_POST_CREATED]: (state, { payload: { authorId } }) => ({
...state,
authorId,
isExist:... | mit |
busbud/pongdome | chat/index.js | 9852 | const Table = require('cli-table2')
const fs = require('fs')
const numeral = require('numeral')
const io = require('socket.io-client')
const Stdbot = require('stdbot')
const uuid = require('uuid')
const makeConfig = require('../config')
const debug = require('../debug')('pongdome:chat')
const defaults = require('./con... | mit |
impraise/omniauth-saml | lib/omniauth-saml/version.rb | 62 | module OmniAuth
module SAML
VERSION = '1.5.0'
end
end
| mit |
ruche7/VoiceroidUtil | VoiceroidUtil/ViewModel/ViewModelBase.cs | 13657 | using System;
using System.ComponentModel;
using System.Linq.Expressions;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using System.Threading.Tasks;
using System.Windows.Input;
using Reactive.Bindings;
using Reactive.Bindings.Extensions;
using RucheHome.Util;
using VoiceroidUtil.Extensions;
using sta... | mit |
chvillap/LAComp | src/test/LACompTest.java | 1367 | package test;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.runner.JUnitCore;
import static org.junit.Assert.assertEquals;
import java.io.IOException;
import comp.LAComp;
/**
* Unit tests for the ... | mit |
kairera0467/TJAP2fPC | FDK17プロジェクト/コード/02.入力/CInput管理.cs | 7517 | using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using System.Runtime.InteropServices;
using SlimDX;
using SlimDX.DirectInput;
namespace FDK
{
public class CInput管理 : IDisposable
{
// 定数
public static int n通常音量 = 110;
// プロパティ
public List<IInputDevice> list入力デ... | mit |
crafn/clover | code/source/physics/world.cpp | 12274 | #include "box2d.hpp"
#include "chunk_util.hpp"
#include "debug/draw.hpp"
#include "draw.hpp"
#include "fluid_mgr.hpp"
#include "global/cfg_mgr.hpp"
#include "ghostlydynamics.hpp"
#include "material.hpp"
#include "object_rigid.hpp"
#include "collision/baseshape_circle.hpp"
#include "collision/baseshape_polygon.hpp"
#inc... | mit |
abecede753/trax | website/events/pitassistant_views.py | 1474 | import os
from django.conf import settings
from django.contrib import messages
from django import forms
from django.contrib.auth.decorators import login_required
from django.http import Http404
from django.http import HttpResponseRedirect
from django.http import JsonResponse
from django.urls import reverse
from django... | mit |
bSchnepp/PathToolKit | PathToolKit/event/event.cpp | 568 | /*
* event.cpp
*
* Created on: Feb 19, 2017
* Author: Brian Schnepp
* License: See 'LICENSE' in root of this repository.
*/
#include "event.h"
#include "../component.h"
#include "xcb/xcb.h"
namespace PathEvent
{
Event::Event() :
Event::Event(nullptr)
{
}
Event::Event(PathDraw::Component* source)... | mit |
danmayer/travel_calculator | db/migrate/20150125192515_rename_destination_options.rb | 176 | class RenameDestinationOptions < ActiveRecord::Migration
def change
add_column :destinations, :default_options, :text
remove_column :destinations, :options
end
end
| mit |
AlgusDark/bloomer | test/components/Panel/Panel.test.tsx | 868 | import * as React from 'react';
import { shallow } from 'enzyme';
import { Panel } from './../../../src/components/Panel/Panel';
describe('Panel', () => {
it('should render a nav with .panel', () => {
const component = shallow(<Panel>My Panel</Panel>);
expect(component.contains(<nav className='pan... | mit |
codequest-eu/busy_bunny | spec/subscriber_spec.rb | 1683 | require 'spec_helper'
module BusyBunny # rubocop:disable Style/Documentation
describe Subscriber do
let(:channel) { double('channel') }
let(:queue) { double('queue') }
let(:thread) { double('thread') }
subject { MockSubscriber.new(channel, queue, thread) }
describe '#run_forever' do
be... | mit |
vishaltelangre/hygien | lib/hygien/config_validator.rb | 3114 | class Hygien::ConfigValidator
def initialize(config = {})
@config = config
validate
end
def verified
@config
end
private
def validate
# check root-level keys
validate_root_level_keys(@config.keys)
# check keys under db_config
validate_db_config_keys(@config[:db_config].keys)... | mit |
diasks2/confidential_info_redactor | lib/confidential_info_redactor/extractor.rb | 3325 | require 'confidential_info_redactor/word_lists'
module ConfidentialInfoRedactor
# This class extracts proper nouns from a text
class Extractor
# Rubular: http://rubular.com/r/qE0g4r9zR7
EXTRACT_REGEX = /(?<=\s|^|\s\"|\s\“|\s\«|\s\‹|\s\”|\s\»|\s\›)([A-Z]\S*\s)*[A-Z]\S*(?=(\s|\.|\z))|(?<=\s|^|\s\"|\s\”|\s\»|... | mit |
aserg-ufmg/RefDiff | refdiff-java/src/main/java/refdiff/parsers/java/Visibility.java | 230 | package refdiff.parsers.java;
public enum Visibility {
PUBLIC,
PRIVATE,
PROTECTED,
PACKAGE;
@Override
public String toString() {
return this.name().toLowerCase();
}
}
| mit |