code stringlengths 3 1.05M | repo_name stringlengths 4 116 | path stringlengths 3 942 | language stringclasses 30
values | license stringclasses 15
values | size int32 3 1.05M |
|---|---|---|---|---|---|
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using System.Diagnostics;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace LinqToDB.Data
{
using Linq;
using Common;
using ... | ronnyek/linq2db | Source/LinqToDB/Data/DataConnection.QueryRunner.cs | C# | mit | 17,014 |
# Swagger JSON
This is a swagger JSON built by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project.

| jamestao/azure-sdk-for-net | src/SDKs/PostgreSQL/Management.PostgreSQL/README.md | Markdown | mit | 288 |
/*
* Copyright 2004 The WebRTC Project Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing ... | koobonil/Boss2D | Boss2D/addon/webrtc-jumpingyang001_for_boss/rtc_base/win32socketserver.cc | C++ | mit | 22,653 |
class R:
def __init__(self, c):
self.c = c
self.is_star = False
def match(self, c):
return self.c == '.' or self.c == c
class Solution(object):
def isMatch(self, s, p):
"""
:type s: str
:type p: str
:rtype: bool
"""
rs = []
"... | SF-Zhou/LeetCode.Solutions | solutions/regular_expression_matching.py | Python | mit | 1,032 |
# escape=`
FROM mcr.microsoft.com/windows/servercore as msi
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
ENV MONGO_VERSION 3.4.5
ENV MONGO_DOWNLOAD_URL https://downloads.mongodb.com/win32/mongodb-win32-x86_64-enterprise-windows-64-${MONGO_VERSION}-sign... | StefanScherer/dockerfiles-windows | mongo/3.4/enterprise/Dockerfile | Dockerfile | mit | 1,448 |
namespace GameBoySharp.Domain.Contracts
{
public interface IContiguousMemory : IReadableMemory, IWriteableMemory
{
}
} | taspeotis/GameBoySharp | GameBoySharp.Domain/Contracts/IContiguousMemory.cs | C# | mit | 133 |
public class App {
public static void main(String[] args) {
System.out.println("Old man, look at my life...");
}
}
| zelark/test | src/main/java/App.java | Java | mit | 119 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_102) on Thu Jan 05 15:34:48 PST 2017 -->
<title>Uses of Class main.CurrentDateAndTime</title>
<meta name="date" content="2017-01-05">
<link rel... | tliang1/Java-Practice | Practice/Intro-To-Java-8th-Ed-Daniel-Y.-Liang/Chapter-5/Chapter05P24/doc/main/class-use/CurrentDateAndTime.html | HTML | mit | 3,986 |
version https://git-lfs.github.com/spec/v1
oid sha256:83b131c4d8b0acf16d0579e177572a462b114180f95c7444ebae08cb7370e68f
size 3656
| yogeshsaroya/new-cdnjs | ajax/libs/pure/0.2.0/grids.css | CSS | mit | 129 |
var score = 0;
var scoreText;
var map_x = 14;
var map_y = 10;
var game = new Phaser.Game(map_x * 16, map_y * 16, Phaser.AUTO, '', { preload: preload, create: create, update: update });
function preload() {
// game.scale.maxWidth = 600;
// game.scale.maxHeight = 600;
game.scale.scaleMode = Phaser.ScaleMan... | henripal/henripal.github.io | game/game.js | JavaScript | mit | 3,879 |
package com.thebluealliance.androidclient.gcm.notifications;
import android.app.Notification;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.support.v4.app.NotificationCompat;
import android.util.Log;
import android.view.LayoutInflater;
import androi... | Adam8234/the-blue-alliance-android | android/src/main/java/com/thebluealliance/androidclient/gcm/notifications/ScoreNotification.java | Java | mit | 11,766 |
import { expect } from 'chai';
import { Curry } from './curry';
describe('curry', () => {
it('should curry the method with default arity', () => {
class MyClass {
@Curry()
add(a: any, b?: any) {
return a + b;
}
}
const myClass = new MyClass();
const add5 = myClass.add(5);
... | steelsojka/lodash-decorators | src/curry.spec.ts | TypeScript | mit | 1,375 |
module Fog
module XenServer
class Compute
module Models
class CrashDumps < Collection
model Fog::XenServer::Compute::Models::CrashDump
end
end
end
end
end | fog/fog-xenserver | lib/fog/xenserver/compute/models/crash_dumps.rb | Ruby | mit | 204 |
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class DebugWindow : MonoBehaviour {
public Text textWindow;
string freshInput;
// Use this for initialization
void Start () {
if (textWindow == null)
throw new UnityException ("Debug Window has no text box to output to.");
}
// Up... | tlsteenWoo/UnityNeedler | New Unity Project/Assets/Game/Scripts/DebugWindow.cs | C# | mit | 505 |
// Copyright (c) Pomelo Foundation. All rights reserved.
// Licensed under the MIT. See LICENSE in the project root for license information.
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Query;
using Microsoft.EntityFrameworkCore.Storage;
using Pomelo.EntityFrameworkCore.MySql.Query.ExpressionT... | PomeloFoundation/Pomelo.EntityFrameworkCore.MySql | src/EFCore.MySql.Json.Microsoft/Query/Internal/MySqlJsonMicrosoftMemberTranslatorPlugin.cs | C# | mit | 1,377 |
export { default } from 'ember-flexberry-gis/services/map-store';
| Flexberry/ember-flexberry-gis | app/services/map-store.js | JavaScript | mit | 66 |
from flask import Flask, render_template, flash
from flask_material_lite import Material_Lite
from flask_appconfig import AppConfig
from flask_wtf import Form, RecaptchaField
from flask_wtf.file import FileField
from wtforms import TextField, HiddenField, ValidationError, RadioField,\
BooleanField, SubmitField, Int... | HellerCommaA/flask-material-lite | sample_application/__init__.py | Python | mit | 2,763 |
#!/usr/bin/env python3
from __future__ import print_function, division
import numpy as np
from sht.grids import standard_grid, get_cartesian_grid
def test_grids():
L = 10
thetas, phis = standard_grid(L)
# Can't really test much here
assert thetas.size == L
assert phis.size == L**2
grid = ge... | praveenv253/sht | tests/test_grids.py | Python | mit | 386 |
This is an older post
| TheNeikos/hemera.space | _posts/2017-03-12-old-post.md | Markdown | mit | 22 |
var Keyboard_Space = new function(){
this.initKeyboard = function(testing){
testmode = testing;
return new Keyboard();
}
var Keyboard = function(){
for(var i = 0; i < numChains; i++)
currentSounds.push([]);
var this_obj = this;
Zip_Space... | Dan12/Launchpad | app/assets/javascripts/keyboard.js | JavaScript | mit | 13,120 |
angular.module('booksAR')
.directive('userNavbar', function(){
return{
restrict: 'E',
templateUrl: './app/components/directives/user/user-navbar.html'
};
})
.directive('userBooksTable', function(){
return{
restrict: 'E',
templateUrl: './app/components/directives/user/user-books... | AlejandroAcostaT/TypewriterAR | frontend/app/components/directives/user/user.js | JavaScript | mit | 1,158 |
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
<div th:fragment="common-header">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>WickedThymeleafDemo</title>
<link th:href="@{/webjars/bootstrap/3.3.7/css/bootstrap.min.css}" rel="stylesheet" me... | WickedWitchWarsaw/ThymeleafSpringDemo | src/main/resources/templates/common/header.html | HTML | mit | 662 |
# Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.
class ApplicationController < ActionController::Base
helper :all
helper_method :current_user_session, :current_user
filter_parameter_logging :password, :password... | markbates/warp_drive | test_apps/enterprise/app/controllers/application_controller.rb | Ruby | mit | 1,267 |
<?php
namespace App\AAS_Bundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use App\AAS_Bundle\Utils\AAS as AAS;
/**
* Person
*/
class Person
{
/**
* @var integer
*/
private $id;
/**
* @var string
*/
private $surname;
/**
* @var string
*/
... | mrkonovalov/AAS | src/App/AAS_Bundle/Entity/Person.php | PHP | mit | 8,735 |
package me.streib.janis.nanhotline.web;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.net.InetSocketAddress;
import org.eclipse.jetty.server.Handler;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.SessionManager;
import org.eclipse.jetty.server.h... | janisstreib/nan-hotline | webFrontend/src/me/streib/janis/nanhotline/web/Launcher.java | Java | mit | 2,118 |
const test = require('tap').test
const GF = require('core/galois-field')
test('Galois Field', function (t) {
t.throw(function () { GF.log(0) }, 'Should throw for log(n) with n < 1')
for (let i = 1; i < 255; i++) {
t.equal(GF.log(GF.exp(i)), i, 'log and exp should be one the inverse of the other')
t.equal(... | soldair/node-qrcode | test/unit/core/galois-field.test.js | JavaScript | mit | 746 |
import chalk = require("chalk");
import { take, select } from "redux-saga/effects";
import path = require("path");
import moment = require("moment");
import { titleize } from "inflection";
import { parallel } from "mesh";
import { weakMemo } from "../memo";
import AnsiUp from "ansi_up";
import { reader } from "../mona... | crcn/aerial | packages/aerial-common2/src/log/console.ts | TypeScript | mit | 4,631 |
<?php
namespace Payname\Security;
use Payname\Exception\ApiCryptoException;
/**
* Class Crypto
* Extract from https://github.com/illuminate/encryption
*/
class Crypto
{
/**
* The algorithm used for encryption.
*
* @var string
*/
private static $cipher = 'AES-128-CBC';
/**
* En... | tplessis/Payname-php-sdk | src/Payname/Security/Crypto.php | PHP | mit | 3,450 |
# Wildcard string matcher
## Requirements
- PHP 5.4 or greater (recommended).
## Installation
1. [Download all libraries](https://github.com/pedzed/libs/archive/master.zip)
or [specifically download this one](https://raw.githubusercontent.com/pedzed/libs/master/src/pedzed/libs/WildcardStringMatcher.php).
2. Move ... | pedzed/libs | docs/wildcard-string-matcher.md | Markdown | mit | 1,166 |
---
layout: page
title: Island Networks Seminar
date: 2016-05-24
author: Sharon Gamble
tags: weekly links, java
status: published
summary: Duis posuere erat eu orci faucibus, ac.
banner: images/banner/leisure-05.jpg
booking:
startDate: 05/27/2017
endDate: 05/29/2017
ctyhocn: OKCBTHX
groupCode: INS
published: tr... | KlishGroup/prose-pogs | pogs/O/OKCBTHX/INS/index.md | Markdown | mit | 2,909 |
'use strict';
// Test dependencies are required and exposed in common/bootstrap.js
require('../../common/bootstrap');
process.on('uncaughtException', function(err) {
console.error(err.stack);
});
var codeContents = 'console.log("testing deploy");';
var reference = new Buffer(codeContents);
var lists = deployment.j... | nodebotanist/t2-cli | test/unit/deployment/javascript.js | JavaScript | mit | 105,275 |
"""
Visualize possible stitches with the outcome of the validator.
"""
import math
import random
import matplotlib.pyplot as plt
import networkx as nx
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
import stitcher
SPACE = 25
TYPE_FORMAT = {'a': '^', 'b': 's', 'c': 'v'}
def show(graphs, request, title... | tmetsch/graph_stitcher | stitcher/vis.py | Python | mit | 5,618 |
package de.verygame.surface.screen.base;
import com.badlogic.gdx.InputMultiplexer;
import com.badlogic.gdx.graphics.g2d.PolygonSpriteBatch;
import com.badlogic.gdx.utils.viewport.Viewport;
import java.util.Map;
/**
* @author Rico Schrage
*
* Context which can contain several subscreens.
*/
public class SubScreen... | VeryGame/gdx-surface | gdx-surface/src/main/java/de/verygame/surface/screen/base/SubScreenContext.java | Java | mit | 4,133 |
package x7c1.linen.scene.updater
import android.app.Service
import x7c1.linen.database.control.DatabaseHelper
import x7c1.linen.glue.service.ServiceControl
import x7c1.linen.repository.date.Date
import x7c1.linen.repository.dummy.DummyFactory
import x7c1.linen.repository.preset.PresetFactory
import x7c1.wheat.macros.l... | x7c1/Linen | linen-scene/src/main/scala/x7c1/linen/scene/updater/UpdaterMethods.scala | Scala | mit | 997 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_65) on Wed Dec 03 20:33:24 CET 2014 -->
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>net.sourceforge.pmd... | byronka/xenos | utils/pmd-bin-5.2.2/docs/pmd-xml/testapidocs/net/sourceforge/pmd/lang/xsl/rule/xpath/package-summary.html | HTML | mit | 5,034 |
import test from 'ava';
import escapeStringRegexp from './index.js';
test('main', t => {
t.is(
escapeStringRegexp('\\ ^ $ * + ? . ( ) | { } [ ]'),
'\\\\ \\^ \\$ \\* \\+ \\? \\. \\( \\) \\| \\{ \\} \\[ \\]'
);
});
test('escapes `-` in a way compatible with PCRE', t => {
t.is(
escapeStringRegexp('foo - bar'),
... | sindresorhus/escape-string-regexp | test.js | JavaScript | mit | 484 |
---
layout: post
title: 《青铜时代》
date: 2015-04-03
categories:
- 一书
tags: [book]
status: publish
type: post
published: true
author_copyright: true
author_footer: false
---
>他要是发现自己对着时空作思想工作,一定以为是对牛弹琴,除了时空,还有诗意──妈的,他怎么会懂得什么叫做诗意。除了诗意,还有恶意。这个他一定能懂。这是他唯一懂得的东西。
>不过我倒因此知道了文明是什么。照我看,文明就是人们告别了原始的游猎生活,搬到一起来住。从此抬头不见低头见,大家都产生了一些共同的... | ilao5/ilao5.github.io | _posts/2015-04-03-book-qtsd.md | Markdown | mit | 5,091 |
<!DOCTYPE html>
<html class="no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Place favicon.ico a... | lffv/Timeline | index.html | HTML | mit | 2,519 |
require File.dirname(__FILE__) + '/../lib/ruby_js'
require 'test/unit'
require 'active_support/test_case'
RubyJS::Translator.load_paths << File.join(File.dirname(__FILE__), "mock")
RubyJS::Translator.load
| sinisterchipmunk/rubyjs | test/test_helper.rb | Ruby | mit | 206 |
---
layout: post
title: 課業|蒙文通的經史觀
date: 2018-10-29
categories: blog
tags: 功課
description: 蒙文通的經史觀
---
20160627。大一下朞專必《歷史學理論與方法》作業。主題是「我心目中的歷史學」。當時班主任過來給我說「老師們覺㝵你那篇作業寫㝵不錯,我來轉達一下。」後來成績確實挺髙,不過我覺㝵也沒多好啊。㝡中二的是最後一節,當時剛接觸經學,就有這些中二想法,實際上多是別人的想法。䋣簡自動轉換,改了一些,可能還有錯。
------
> `摘要` 本札記旨在槩述蒙文通對經學與史學關係的認識,這也是他治經的主要成就之一。蒙文通之治經,繞過西漢... | kujihhoe/kujihhoe.github.io | _posts/2018-10-29-mgwfts.md | Markdown | mit | 27,812 |
const { InventoryError,
NotFoundError } = require('../../errors')
const checkExists = (data) => {
return (entity) => {
if (!entity) throw new NotFoundError(`${data} not found`)
return entity
}
}
module.exports = (sequelize, DataTypes) => {
const Pokemon = sequelize.define('Pokemon', {
name: DataTy... | gcaraciolo/pokemon-challenge | src/database/models/Pokemon.js | JavaScript | mit | 1,131 |
// File auto generated by STUHashTool
using static STULib.Types.Generic.Common;
namespace STULib.Types.Dump {
[STU(0x6250465B)]
public class STU_6250465B : STUInstance {
[STUField(0x6674CA34)]
public string m_6674CA34;
[STUField(0xDC05EA3B)]
public ulong m_DC05EA3B;
[S... | kerzyte/OWLib | STULib/Types/Dump/STU_6250465B.cs | C# | mit | 381 |
import hbs from 'htmlbars-inline-precompile';
import { moduleForComponent, test } from 'ember-qunit';
moduleForComponent('advanced-form/integer', {
integration: true
});
test('Render component with attributes', function(assert) {
this.render(
hbs`{{advanced-form/integer min=10 max=20 value=5}}`
);
var $c... | jakkor/ember-advanced-form | tests/integration/components/integer-test.js | JavaScript | mit | 411 |
class DeluxePublisher::Settings < ActiveRecord::Base
set_table_name 'deluxe_publisher_settings'
end | PaulRaye/Deluxe-Publisher | app/models/deluxe_publisher/settings.rb | Ruby | mit | 101 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.core.http.policy;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.logging.LogLevel;
import reactor.core.publisher.Mono;
/**
* Manages logging HTTP requests in {@link HttpLogg... | Azure/azure-sdk-for-java | sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpRequestLogger.java | Java | mit | 1,343 |
import React from 'react'
import { Hero } from '../../components'
const HeroContainer = () => (
<Hero />
)
export default HeroContainer
| saelili/F3C_Website | app/containers/Hero/HeroContainer.js | JavaScript | mit | 140 |
/*
* 2007-2016 [PagSeguro Internet Ltda.]
*
* NOTICE OF LICENSE
*
* 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 requir... | girinoboy/lojacasamento | pagseguro-api/src/main/java/br/com/uol/pagseguro/api/common/domain/Document.java | Java | mit | 1,173 |
# -*- coding: utf-8 -*-
# django-simple-help
# simple_help/admin.py
from __future__ import unicode_literals
from django.contrib import admin
try: # add modeltranslation
from modeltranslation.translator import translator
from modeltranslation.admin import TabbedDjangoJqueryTranslationAdmin
except ImportErro... | DCOD-OpenSource/django-simple-help | simple_help/admin.py | Python | mit | 1,108 |
using UnityEngine;
using System.Collections;
public class MuteButton : MonoBehaviour {
public Sprite MuteSprite;
public Sprite PlaySprite;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
}
| incredible-drunk/incredible-drunk | Assets/MuteButton.cs | C# | mit | 269 |
using UnityEngine;
using System.Collections;
public class CameraShake : MonoBehaviour
{
// Transform of the camera to shake. Grabs the gameObject's transform
// if null.
public Transform camTransform;
// How long the object should shake for.
public float shakeDuration = 0f;
// Amplitude of the shake. A larg... | hakur/shooter | Assets/Shooter/Scripts/Shooter/CameraShake.cs | C# | mit | 924 |
### 1.2.1
[Full Changelog](https://github.com/frdmn/alfred-imgur/compare/1.2.0...1.2.1)
* Bring back hotkey functionality
* Copy URL to uploaded file into clipboard
### 1.2.0
[Full Changelog](https://github.com/frdmn/alfred-imgur/compare/1ca0ed7...1.2.0)
* Complete rewrite in NodeJS and with [Alfy](https://github.co... | frdmn/alfred-imgur | CHANGELOG.md | Markdown | mit | 453 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
namespace MyW... | Microsoft-Build-2016/CodeLabs-WebDev | Module3-DeploymentAndAzure/Source/MyWebApp/src/MyWebApp/Startup.cs | C# | mit | 2,018 |
# -*- coding: utf-8 -*-
import sys
from io import BytesIO
import argparse
from PIL import Image
from .api import crop_resize
parser = argparse.ArgumentParser(
description='crop and resize an image without aspect ratio distortion.')
parser.add_argument('image')
parser.add_argument('-w', '-W', '--width', metavar='<... | codeif/crimg | crimg/bin.py | Python | mit | 1,481 |
'use strict';
let sounds = new Map();
let playSound = path => {
let sound = sounds.get(path);
if (sound) {
sound.play();
} else {
sound = new Audio(path);
sound.play();
}
};
export default playSound;
| attilahorvath/infinitree | src/infinitree/play_sound.js | JavaScript | mit | 224 |
using System;
using System.Windows.Input;
namespace RFiDGear.ViewModel
{
/// <summary>
/// Description of RelayCommand.
/// </summary>
public class RelayCommand : ICommand
{
public event EventHandler CanExecuteChanged
{
add { CommandManager.RequerySuggested += value; }
remove { CommandManager.RequerySu... | c3rebro/RFiDGear | PluginSystem/DataAccessLayer/RelayCommand.cs | C# | mit | 985 |
html { background-image: url('../../img/embed/will_encode.jpeg'); }
body { background-image: url('../../img/embed/not_encode.jpeg'); }
div { background-image: url('../../img/not_encode.png'); } | camMCC/grunt-data-uri | sample/css/raw/main.css | CSS | mit | 194 |
{% extends 'layouts/default.html' %}
{% block content %}
That site was not found!
{% endblock %} | andychase/codebook | topics/templates/topics/site_not_found.html | HTML | mit | 101 |
// Generated automatically from com.google.common.collect.SortedSetMultimap for testing purposes
package com.google.common.collect;
import com.google.common.collect.SetMultimap;
import java.util.Collection;
import java.util.Comparator;
import java.util.Map;
import java.util.SortedSet;
public interface SortedSetMulti... | github/codeql | java/ql/test/stubs/guava-30.0/com/google/common/collect/SortedSetMultimap.java | Java | mit | 571 |
package com.etop.service;
import com.etop.dao.UserDAO;
import com.etop.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 用户服务,与dao进行对接
* <... | brucevsked/vskeddemolist | vskeddemos/projects/shirodemo/SpringMVC_Shiro/src/com/etop/service/UserService.java | Java | mit | 930 |
from __future__ import print_function
import os
import sys
import subprocess
import pkg_resources
try:
import pkg_resources
_has_pkg_resources = True
except:
_has_pkg_resources = False
try:
import svn.local
_has_svn_local = True
except:
_has_svn_local = False
def test_helper():
return... | MetaPlot/MetaPlot | metaplot/helpers.py | Python | mit | 4,900 |
// Copyright © 2015, Peter Atashian
// Licensed under the MIT License <LICENSE.md>
extern crate build;
fn main() {
build::link("urlmon", true)
}
| Boddlnagg/winapi-rs | lib/urlmon/build.rs | Rust | mit | 150 |
package states;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.util.ArrayList;
import database.DeleteGame;
import database.LoadGame;
import game.Game;
import graphics.ButtonAction;
import graphics.Text;
import graphics.UIButton;
import graphics.... | BrunoMarchi/Chess_Game-LCP_2017 | ChessGame/src/states/MenuState.java | Java | mit | 11,128 |
<?php
declare(strict_types = 1);
use PHPUnit\Framework\TestCase;
use Sop\JWX\JWA\JWA;
use Sop\JWX\JWS\Algorithm\NoneAlgorithm;
use Sop\JWX\JWT\Parameter\AlgorithmParameter;
use Sop\JWX\JWT\Parameter\JWTParameter;
/**
* @group jwt
* @group parameter
*
* @internal
*/
class JWTAlgorithmParameterTest extends TestCa... | sop/jwx | test/unit/jwt/parameter/AlgorithmTest.php | PHP | mit | 896 |
# frozen_string_literal: true
module HelperFunctions
def log_in
email = 'test@sumofus.org'
password = 'password'
User.create! email: email, password: password
visit '/users/sign_in'
fill_in 'user_email', with: email
fill_in 'user_password', with: password
click_button 'Log in'
end
de... | SumOfUs/Champaign | spec/support/helper_functions.rb | Ruby | mit | 1,244 |
import { Directive, Input, OnChanges, SimpleChanges } from '@angular/core';
import { AbstractControl, NG_VALIDATORS, Validator, ValidatorFn, Validators } from '@angular/forms';
export function forbiddenNameValidator(nameRe: RegExp): ValidatorFn {
return (control: AbstractControl): {[key: string]: any} => {
const... | TaylorPzreal/curriculum-vitae | src/app/func/sign-up/forbidden-name.directive.ts | TypeScript | mit | 1,223 |
namespace TransferCavityLock2012
{
partial class LockControlPanel
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
... | jstammers/EDMSuite | TransferCavityLock2012/LockControlPanel.Designer.cs | C# | mit | 18,415 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using BasicInfrastructureWeb.DependencyResolution;
using IoC = LiveScore.App_Start.IoC;
namespace LiveScore
{
public class WebA... | thiagosgarcia/RSSS-ReallySimpleScoreStreaming | LiveScore/Global.asax.cs | C# | mit | 749 |
#include "..\stdafx.h"
#pragma once
class CMutex
{
private:
HANDLE m_mutex;
bool m_isLocked;
void Lock()
{
WaitForSingleObject(this->m_mutex, INFINITE);
}
void Unlock()
{
if (this->m_isLocked)
{
this->m_isLocked = false;
ReleaseMutex(this->m_mutex);
}
}
public:
CMutex()
{
this->m_mutex =... | fieryorc/gitprompt | cache/Utils/Mutex.h | C | mit | 637 |
/**
* Wheel, copyright (c) 2017 - present by Arno van der Vegt
* Distributed under an MIT license: https://arnovandervegt.github.io/wheel/license.txt
**/
const testLogs = require('../../utils').testLogs;
describe(
'Test repeat',
() => {
testLogs(
it,
'Should repeat ten times',... | ArnoVanDerVegt/wheel | test/compiler/loop/testRepeat.js | JavaScript | mit | 1,499 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>tlc: 2 m 40 s</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="styles... | coq-bench/coq-bench.github.io | clean/Linux-x86_64-4.10.0-2.0.6/extra-dev/dev/tlc/20200328.html | HTML | mit | 23,112 |
from django.db import models
from .workflow import TestStateMachine
class TestModel(models.Model):
name = models.CharField(max_length=100)
state = models.CharField(max_length=20, null=True, blank=True)
state_num = models.IntegerField(null=True, blank=True)
other_state = models.CharField(max_length=20... | andrewebdev/django-ostinato | ostinato/tests/statemachine/models.py | Python | mit | 509 |
<?php namespace Fisharebest\Localization\Locale;
use Fisharebest\Localization\Territory\TerritoryNi;
/**
* Class LocaleEsNi
*
* @author Greg Roach <fisharebest@gmail.com>
* @copyright (c) 2015 Greg Roach
* @license GPLv3+
*/
class LocaleEsNi extends LocaleEs {
public function territory() {
retur... | fweber1/Annies-Ancestors | webtrees/vendor/fisharebest/localization/src/Locale/LocaleEsNi.php | PHP | mit | 344 |
use internal;
#[repr(C)]
#[derive(Debug, PartialEq, PartialOrd, Copy, Clone)]
#[cfg_attr(feature = "serde_support", derive(Serialize, Deserialize))]
pub struct Size {
pub width: f32,
pub height: f32,
}
impl From<Size> for internal::YGSize {
fn from(s: Size) -> internal::YGSize {
internal::YGSize {
width: s.wi... | bschwind/yoga-rs | src/ffi_types/size.rs | Rust | mit | 355 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>bignums: 1 m 56 s 🏆</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel=... | coq-bench/coq-bench.github.io | clean/Linux-x86_64-4.08.1-2.0.5/extra-dev/8.10.0/bignums/8.10+beta1.html | HTML | mit | 15,698 |
require 'builder'
module MWS
module API
class Fulfillment < Base
include Feeds
## Takes an array of hash AmazonOrderID,FulfillmentDate,CarrierName,ShipperTrackingNumber,sku,quantity
## Returns true if all the orders were updated successfully
## Otherwise raises an exception
def... | tinabme/ruby-mws | lib/ruby-mws/api/fulfillment.rb | Ruby | mit | 1,850 |
import { NgModule } from '@angular/core';
import { SharedModule } from '../shared/shared.module';
import { HelloRoutingModule } from './hello-routing.module';
import { HelloComponent } from './hello.component';
@NgModule({
imports: [
SharedModule,
HelloRoutingModule,
],
declarations: [
HelloCompone... | rangle/angular2-starter | src/app/hello/hello.module.ts | TypeScript | mit | 361 |
package de.espend.idea.shopware.util.dict;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiFile;
import com.intellij.psi.PsiManager;
import com.intellij.psi.PsiRecursiveElementWalkingVisitor;
import com.intellij.ps... | ShopwareHackathon/idea-php-shopware-plugin | src/de/espend/idea/shopware/util/dict/PsiParameterStorageRunnable.java | Java | mit | 5,005 |
/********************************************************************************
* The MIT License (MIT) *
* *
* Copyright (C) 2016 Alex Nolasco ... | alexandern/ccdaviewer | ccdaparser/ccdaparser/model/summary/HL7CCDSummary.h | C | mit | 2,319 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('geokey_sapelli', '0005_sapellifield_truefalse'),
]
operations = [
migrations.AddField(
model_name='sapelliprojec... | ExCiteS/geokey-sapelli | geokey_sapelli/migrations/0006_sapelliproject_sapelli_fingerprint.py | Python | mit | 468 |
using UnityEngine;
using System.Collections;
public class HurtSusukeOnContact : MonoBehaviour {
public int damageToGive;
public float bounceOnEnemy;
private Rigidbody2D myRigidbody2D;
// Use this for initialization
void Start () {
myRigidbody2D = transform.parent.GetComponent<Rigidbody2D> ();
}
// Up... | SafeRamen/Nerd-Quest | Nerd Quest/Assets/Scripts/HurtSusukeOnContact.cs | C# | mit | 611 |
# lsyncd
Docker image allowing you to use lsyncd as a docker command
## Usage
```
docker run -d -v /docker/lsyncd/src:/src -v /docker/lsyncd/target:/target -v /docker/lsyncd/lrsync.lua:/etc/lrsync/lrsync.lua zeroboh/lsyncd:2.1-alpine
```
| egobude/docker | lsyncd/2.1-alpine/README.md | Markdown | mit | 241 |
#include "Internal.hpp"
#include <LuminoEngine/Graphics/Texture.hpp>
#include <LuminoEngine/Rendering/Material.hpp>
#include <LuminoEngine/Mesh/Mesh.hpp>
#include <LuminoEngine/Visual/StaticMeshComponent.hpp>
namespace ln {
//=============================================================================
... | lriki/Lumino | src/LuminoEngine/src/Visual/StaticMeshComponent.cpp | C++ | mit | 2,432 |
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="../../lib/vue.js"></script>
<titl... | lian01chen/navigator | vueCode/vueTest/Vue.html | HTML | mit | 912 |
<!DOCTYPE html>
<html class="no-js" lang="es">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="p5.js a JS client-side library for creating graphic and interactive ... | mayaman/p5js-website | es/examples/simulate-multiple-particle-systems.html | HTML | mit | 8,643 |
---
layout: tagpage
tag: quartz
--- | Abel-Liu/Abel-Liu.github.io | tag/quartz.md | Markdown | mit | 35 |
#!/usr/bin/env bats
## tests with https://github.com/sstephenson/bats
die() {
echo "$@" >/dev/stderr
exit 1
}
export DOCKHACK_SKIP_UID_CHECK=1
################################################################################
## mocked docker command
#which docker &>/dev/null || die "ERROR: docker must be inst... | tavisrudd/dockhack | tests.bat | Batchfile | mit | 1,708 |
<?php namespace App\Controllers\Admin;
use BaseController;
use DB, View, Datatables, Input, Redirect, Str, Validator, Image, File;
use App\Models\Music;
class MusicController extends BaseController {
private $upload_path = "uploads/music/";
public function getList()
{
$music_count = Music::count();
$data = ar... | benhanks040888/subud | app/controllers/admin/MusicController.php | PHP | mit | 3,793 |
package org.jabref.logic.importer.fetcher;
import java.io.IOException;
import java.net.URL;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import org.jabref.logic.formatter.bibtexfields.ClearFormatter;
import org.jabref.logic.formatter.bibtexfields.NormalizePagesFormatter;
import org.... | zellerdev/jabref | src/main/java/org/jabref/logic/importer/fetcher/DoiFetcher.java | Java | mit | 3,259 |
from __future__ import division, print_function #, unicode_literals
"""
Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples
of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
Find the sum of all the multiples of 3 or 5 below 1000.
"""
import numpy as np
# Setup.
nu... | Who8MyLunch/euler | problem_001.py | Python | mit | 632 |
<#
Microsoft provides programming examples for illustration only, without warranty either expressed or
implied, including, but not limited to, the implied warranties of merchantability and/or fitness
for a particular purpose.
This sample assumes that you are familiar with the programming language being demonst... | joerodgers/powershell | SharePoint/ServiceApplications/Search/Get-CustomResultSource.ps1 | PowerShell | mit | 4,744 |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>ordinal: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css... | coq-bench/coq-bench.github.io | clean/Linux-x86_64-4.08.1-2.0.5/released/8.11.2/ordinal/0.5.0.html | HTML | mit | 6,503 |
RSpec.configure do |config|
config.before(:suite) do
DatabaseCleaner.clean_with(:deletion)
end
config.before(:each) do
DatabaseCleaner.strategy = :transaction
end
config.before(:each, :js => true) do
DatabaseCleaner.strategy = :deletion
end
config.before(:each) do
DatabaseCleaner.start
... | osulp/valley-rails-generator | templates/database_cleaner_rspec.rb | Ruby | mit | 387 |
s="the quick brown fox jumped over the lazy dog"
t = s.split(" ")
for v in t:
print(v)
r = s.split("e")
for v in r:
print(v)
x = s.split()
for v in x:
print(v)
# 2-arg version of split not supported
# y = s.split(" ",7)
# for v in y:
# print v
| naitoh/py2rb | tests/strings/split.py | Python | mit | 266 |
<!DOCTYPE html>
<html>
<head>
<title>Zefu Li</title>
<link rel="stylesheet" type="text/css" href="official.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="official.js"></script>
</head>
<body>
<ul>
<li><a h... | seriouswork/seriouswork.github.io | official.html | HTML | mit | 2,378 |
module Xronor
class DSL
module Checker
class ValidationError < StandardError
end
def required(name, value)
invalid = false
if value
case value
when String
invalid = value.strip.empty?
when Array, Hash
invalid = value.empty?
... | dtan4/xronor | lib/xronor/dsl/checker.rb | Ruby | mit | 483 |
var mongoose = require('mongoose');
var statuses = ['open', 'closed', 'as_expected'];
var priorities = ['major','regular','minor','enhancement'];
var Comment = new mongoose.Schema(
{
comment: String,
username: String,
name: String,
dca: {type: Date, default: Dat... | baliganikhil/Storm | models/bug.js | JavaScript | mit | 1,110 |
#include "EngineImplDefine.h"
void BlendColor::Init(D3DCOLOR defaultColor, D3DCOLOR disabledColor, D3DCOLOR hiddenColor)
{
for (decltype(States.size()) i = 0; i != States.size(); ++i)
{
States[i] = defaultColor;
}
States[STATE_DISABLED] = disabledColor;
States[STATE_HIDDEN] = hiddenColor;
Current = hiddenColo... | ss-torres/UI-Editor | UI Editor/DrawEngine/EngineImplDefine.cpp | C++ | mit | 1,118 |
class AddColumnToRequestSchema < ActiveRecord::Migration
def change
add_column :request_schemata, :name, :string, null: false, default: ""
end
end
| opentie/opentie-app | db/migrate/20150502043108_add_column_to_request_schema.rb | Ruby | mit | 155 |
ActionController::Routing::Routes.draw do |map|
map.resources :companies,
:member => {
:filter_available_members => :get, :delete_member => :post, :add_members => :post,
:filter_available_projects => :get, :delete_project => :post, :add_projects => :post
}
end
| splendeo/chiliproject_companies | config/routes.rb | Ruby | mit | 283 |
//
// ViewController.h
// MKDevice
//
// Created by Michal Konturek on 18/11/2013.
// Copyright (c) 2013 Michal Konturek. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@property (nonatomic, strong) IBOutlet UIButton *button;
- (IBAction)onAction:(id)sender;
@end
| michalkonturek/MKDevice | Example/MKDevice/Demo/ViewController.h | C | mit | 319 |