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.Collections;
public class BooleanKeypadShim : ComponentSolverShim
{
public BooleanKeypadShim(TwitchModule module)
: base(module, "BooleanKeypad")
{
ModInfo = ComponentSolverFactory.GetModuleInfo(GetModuleType(), "Use '!{0} press 2 4' to press buttons 2 and 4. | Buttons are indexed 1-4 in reading ord... | samfun123/KtaneTwitchPlays | TwitchPlaysAssembly/Src/ComponentSolvers/Modded/Shims/BooleanKeypadShim.cs | C# | mit | 679 |
'use strict';
angular
.module('facebookMe', [
])
;
| codealchemist/insight | app/facebook-me/facebook-me.js | JavaScript | mit | 55 |
package com.recursivechaos.boredgames.domain;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.springframework.data.annotation.Id;
/**
* Created by Andrew Bell 5/28/2015
* www.recursivechaos.com
* andrew@recursivechaos.com
* Licensed under MIT License 2015. See license.txt for details.
*/
public c... | AndrewBell/boredgames-mongo | src/main/java/com/recursivechaos/boredgames/domain/Game.java | Java | mit | 888 |
// Code generated by protoc-gen-go.
// source: meta.proto
// DO NOT EDIT!
/*
Package internal is a generated protocol buffer package.
It is generated from these files:
meta.proto
It has these top-level messages:
Series
Tag
MeasurementFields
Field
*/
package from090
import proto "github.com/golang/protobuf/prot... | vladlopes/influxdb-migrate | from090/store.pb.go | GO | mit | 2,750 |
# frozen_string_literal: true
# An InternalId is a strictly monotone sequence of integers
# generated for a given scope and usage.
#
# The monotone sequence may be broken if an ID is explicitly provided
# to `.track_greatest_and_save!` or `#track_greatest`.
#
# For example, issues use their project to scope internal i... | iiet/iiet-git | app/models/internal_id.rb | Ruby | mit | 6,777 |
RSpec.describe Unidom::Certificate::China::IdentificationNumberValidator, type: :validator do
valid_values = %w{
231024198506186916
231024198506188110
231024198506185470
231024198506182851
231024198506187193
}
invalid_values = %w{
231024198506186917
231024198506188111
... | topbitdu/unidom-certificate-china | lib/rspec/validators/unidom/certificate/china/identification_number_validator_spec.rb | Ruby | mit | 484 |
using OpenQA.Selenium;
namespace Vzhzhzh.SeleniumWrapper.Examples.Proprietary.Pages.Operator.Shared
{
public abstract class SubForm : PageElement
{
protected SubForm(DriverHolder driver)
: base(driver)
{
}
public virtual IWebElement SaveButton
{
... | vzhzhzh/Vzhzhzh.SeleniumWrapper | Vzhzhzh.SeleniumWrapper.Examples/Proprietary/Pages/Operator/Shared/SubForm.cs | C# | mit | 829 |
package edu.harvard.fas.rbrady.tpteam.tpbridge.hibernate;
// Generated Nov 10, 2006 5:22:58 PM by Hibernate Tools 3.2.0.beta8
import java.util.HashSet;
import java.util.Set;
/**
* TestType generated by hbm2java
*/
public class TestType implements java.io.Serializable {
// Fields
private stati... | bobbrady/tpteam | tpbridge/src/edu/harvard/fas/rbrady/tpteam/tpbridge/hibernate/TestType.java | Java | mit | 1,142 |
# coding=utf-8
# --------------------------------------------------------------------------
# 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 ... | AutorestCI/azure-sdk-for-python | azure-mgmt-servicebus/azure/mgmt/servicebus/models/destination.py | Python | mit | 1,856 |
<?php
// Add new input type "border width"
if ( function_exists('smile_add_input_type'))
{
smile_add_input_type('margin' , 'margin_settings_field' );
}
add_action( 'admin_enqueue_scripts', 'enqueue_margin_param_scripts' );
function enqueue_margin_param_scripts( $hook ){
$cp_page = strpos( $hook, 'plug_page... | 20steps/alexa | web/wp-content/plugins/framework/lib/fields/margin/margin.php | PHP | mit | 5,319 |
/**
* interact.js v1.1.2
*
* Copyright (c) 2012, 2013, 2014 Taye Adeyemi <dev@taye.me>
* Open source under the MIT License.
* https://raw.github.com/taye/interact.js/master/LICENSE
*/
(function () {
'use strict';
var document = window.document,
SVGElement = window.SVGElement ... | emilkje/interact.js | interact.js | JavaScript | mit | 210,270 |
var base64url = require('urlsafe-base64')
, After = require('json-list-response').After
, inherits = require('util').inherits
module.exports = DateAfter
function DateAfter(value, options) {
After.call(this, value, options)
this.skip = 0
this.value = 0
if (value) {
value = base64url.decode(value)
... | tellnes/mongo-list | lib/after/date.js | JavaScript | mit | 1,122 |
<?php
require __DIR__ . "/../vendor/autoload.php";
// NOTE: To run this you need to have installed violent-death
// see https://github.com/gabrielelana/violent-death
// Sorry but I don't want to have an explicit dependency
// with violent-death (wich is not so easy to install) only
// to run this example
// The out... | gabrielelana/graceful-death | examples/catch_segmentation_fault.php | PHP | mit | 606 |
"""94. Binary Tree Inorder Traversal
https://leetcode.com/problems/binary-tree-inorder-traversal/
Given a binary tree, return the in-order traversal of its nodes' values.
Example:
Input: [1,null,2,3]
1
\
2
/
3
Output: [1,3,2]
Follow up: Recursive solution is trivial, could you do it iteratively?... | isudox/leetcode-solution | python-algorithm/leetcode/problem_94.py | Python | mit | 1,229 |
import React, { MouseEvent, FunctionComponent } from 'react';
import classnames from 'classnames';
import rcFont from '../../assets/RcFont/RcFont.scss';
import styles from './styles.scss';
export interface RemoveButtonProps {
className?: string;
visibility?: boolean;
onClick: (ev: MouseEvent) => void;
}
export ... | ringcentral/ringcentral-js-widget | packages/ringcentral-widgets/components/RemoveButton/RemoveButton.tsx | TypeScript | mit | 790 |
export goCommand from './goCommand'
export goReducer from './goReducer'
export parseBestmove from './parseBestmove'
export parseId from './parseId'
export parseInfo from './parseInfo'
export parseOption from './parseOption'
export initReducer from './initReducer'
| ebemunk/node-uci | src/parseUtil/index.js | JavaScript | mit | 264 |
package domain;
import java.util.Date;
/**
* @author Verbroucht Johann
* Test Java Date : 15 aot. 2011
*/
public class Mark {
private Date date;
private int mark;
public Mark(Date _date, int _mark) {
this.date = _date;
this.mark = _mark;
}
public Date getDate() {
return date;
... | johannv/javaTestEasy | src/domain/Mark.java | Java | mit | 497 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Collections.ObjectModel;
using System.Text.RegularExpressions;
using SharpDX;
namespace Oggy
{
public class MapLayoutResource : IDisposable// : ResourceBase
{
#region properties
priv... | oggy83/OculusWalkerDemo | OculusWalkerDemo/Map/MapLayoutResource.cs | C# | mit | 1,291 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using PubSub;
using Microsoft.Framework.ConfigurationModel;
using Microsoft.Framework.DependencyInjection;
using System.Threading;
namespace MonitorTest
{
public class Program
{
IConfiguration Config { get... | zbrad/WebSocketsDemo | archive/MonitorDemo/MonitorTest/Program.cs | C# | mit | 4,080 |
<?php
namespace Tyler\TopTrumpsBundle\Controller;
use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\ORM\Query;
use Doctrine\ORM\QueryBuilder;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\DependencyInjection\ContainerInterface;
class RequestUtilityFunctions
{
/**
* @param Obj... | DaveTCode/TopTrumps-PHPSymfony | src/Tyler/TopTrumpsBundle/Controller/RequestUtilityFunctions.php | PHP | mit | 2,688 |
exports.translate = function(tag) {
return this.import("riot").compile(tag);
};
| lixiaoyan/jspm-plugin-riot | riot.js | JavaScript | mit | 82 |
<?php
return array (
'id' => 'lenovo_a2207_ver1_suban41',
'fallback' => 'lenovo_a2207_ver1',
'capabilities' =>
array (
'device_os_version' => '4.1',
),
);
| cuckata23/wurfl-data | data/lenovo_a2207_ver1_suban41.php | PHP | mit | 170 |
package cognitiveservices
// 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 r... | Azure/azure-sdk-for-go | services/cognitiveservices/mgmt/2021-04-30/cognitiveservices/privatelinkresources.go | GO | mit | 5,466 |
# -*- coding: utf-8 -*-
from django.core.cache import cache
from django.shortcuts import render
from django.http import Http404
from styleguide.utils import (Styleguide, STYLEGUIDE_DIR_NAME,
STYLEGUIDE_DEBUG, STYLEGUIDE_CACHE_NAME,
STYLEGUIDE_ACCESS)
def in... | andrefarzat/django-styleguide | styleguide/views.py | Python | mit | 897 |
from quotes.models import Quote
from django.contrib import admin
class QuoteAdmin(admin.ModelAdmin):
list_display = ('message', 'name', 'program', 'class_of',
'submission_time')
admin.site.register(Quote, QuoteAdmin)
| k4rtik/alpo | quotes/admin.py | Python | mit | 243 |
<div class="main-content">
<div class="main-content-inner">
<div class="breadcrumbs ace-save-state" id="breadcrumbs">
<ul class="breadcrumb">
<li>
<i class="ace-icon fa fa-home home-icon"></i>
<a href="<?php echo site_url('Home') ?>">Sistem Informasi Kasir</a>
</li><li>
<i class="ac... | ElfanRodh/sikame | application/views/modal/edit.php | PHP | mit | 3,353 |
using UnityEngine;
using System.Collections;
/// <summary>
/// THIS IS OBSOLETE CLASS
/// Use PowerUpManager instead
/// </summary>
public class PowerUpElement : MonoBehaviour {
const float SUPERCHARGE_BASE_TIME = 5.0f;
Animator animator;
public enum PowerUpType { pu_triple_shot, pu_safety_net, pu_reinforced_gl... | gbudiman/glass | Gloria_Huixin_Glass/Assets/Networking/PowerUpElement.cs | C# | mit | 4,705 |
en.resources.define("audio",{
name: "Engine",
src: "./audio/ship_engine.ogg",
}, function(content, callback){
var sound = client.audio.createSound();
sound.load(content.src, function(sound){
content.sound = sound;
callback(content.type, content);
});
}, function(content){
return content.sound;
}); | thehink/GLWars | client/assets_types/audio.js | JavaScript | mit | 319 |
from tkinter import *
import tkinter
import HoursParser
class UserInterface(tkinter.Frame):
def __init__(self, master):
self.master = master
self.events_list = []
# Set window size
master.minsize(width=800, height=600)
master.maxsize(width=800, height=600)
... | itsknob/TechnicalServicesScheduler-Python | interface.py | Python | mit | 3,856 |
required_states = ['accept', 'reject', 'init']
class TuringMachine(object):
def __init__(self, sigma, gamma, delta):
self.sigma = sigma
self.gamma = gamma
self.delta = delta
self.state = None
self.tape = None
self.head_position = None
return
... | ssanderson/turing.py | turing.py | Python | mit | 2,182 |
using System.Web;
using System.Web.Optimization;
namespace SimpleSTS
{
public class BundleConfig
{
// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new ScriptB... | johnproctor/ThinktectureSSODemo | SimpleSTS/App_Start/BundleConfig.cs | C# | mit | 1,240 |
<?php
namespace ZfbUser\Options;
/**
* Interface ResetPasswordFormOptionsInterface
*
* @package ZfbUser\Options
*/
interface ResetPasswordFormOptionsInterface extends FormOptionsInterface
{
/**
* @return string
*/
public function getCredentialFieldLabel(): string;
/**
* @return string
... | narekps/ZfbUser | src/Options/ResetPasswordFormOptionsInterface.php | PHP | mit | 583 |
module ArrayNamedAccess
def second
self[1]
end
def third
self[2]
end
end | jimjames99/group_by_summary | lib/array_named_access.rb | Ruby | mit | 91 |
/*
* Copyright 2013 Google Inc.
*
* 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 ... | wawaeasybuy/jobandroid | Job/app/src/main/java/com/mardin/job/widgets/wizard/ui/SingleChoiceFragment.java | Java | mit | 4,068 |
/// <reference path="../../tsd.d.ts" />
import {
Component, View,
} from 'angular2/core';
import { CORE_DIRECTIVES } from 'angular2/common';
import {tabs} from '../../ng2-bootstrap';
import {TimepickerDemo} from './timepicker/timepicker-demo';
let name = 'Timepicker';
let src = 'https://github.com/valor-software/ng... | ciriarte/ng2-bootstrap | demo/components/timepicker-section.ts | TypeScript | mit | 1,970 |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="tr" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Mojocoin</source>
<translation>Mojocoin Hakkında</translation>
</message>
<message>
<lo... | MOJOv3/mojocoin | src/qt/locale/bitcoin_tr.ts | TypeScript | mit | 131,730 |
var express = require("express");
var Pusher = require("pusher");
var bodyParser = require("body-parser");
var env = require("node-env-file");
var app = express();
app.use(bodyParser.urlencoded());
try {
env(__dirname + "/.env");
} catch (_error) {
error = _error;
console.log(error);
}
var pusher = new Pusher... | adambutler/geo-pusher | server.js | JavaScript | mit | 735 |
module Protobuf
module ActiveRecord
class Railtie < Rails::Railtie
config.protobuf_active_record = Protobuf::ActiveRecord.config
ActiveSupport.on_load(:active_record) do
on_inherit do
include Protobuf::ActiveRecord::Model if Protobuf::ActiveRecord.config.autoload
end
e... | film42/protobuf-activerecord | lib/protobuf/active_record/railtie.rb | Ruby | mit | 623 |
<html>
<head>
<title>
The rising resistance
</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<?php include "../../legacy-includes/Script.htmlf" ?>
</head>
<body bgcolor="#FFFFCC" text="000000" link="990000" vlink="660000" alink="003366" leftmargin="0" topmargin="0">
<table width="744... | ISO-tech/sw-d8 | web/2003-1/440/440_03_Resistance.php | PHP | mit | 4,954 |
var app = angular.module("ethics-app");
// User create controller
app.controller("userCreateController", function($scope, $rootScope, $routeParams, $filter, $translate, $location, config, $window, $authenticationService, $userService, $universityService, $instituteService) {
/************************************... | sitcomlab/Ethics-app | public/member-client/js/controllers/user/createController.js | JavaScript | mit | 5,089 |
package sample.rabbitmq;
import static sample.rabbitmq.annotation.RabbitDirectRouting.*;
import java.util.Arrays;
import java.util.concurrent.*;
import org.springframework.amqp.rabbit.annotation.*;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.amqp.rabbit.listener.ListenerCon... | jkazama/sandbox | amqp/src/main/java/sample/rabbitmq/RabbitDirectChecker.java | Java | mit | 3,030 |
/*
* Author: 陈志杭 Caspar
* Contact: 279397942@qq.com qq:279397942
* Description: 数据接口契约文件
* 文件由模板生成,请不要直接修改文件,如需修改请创建一个对应的partial文件
*/
using System;
using System.Collections;
using Zh.DAL.Define.Entities;
using Zh.DAL.Define;
using Zh.DAL.Base.Define;
using Zh.DAL.Define.Contracts;
namespace Zh.DAL.Define.Contrac... | Caspar12/Csharp | src/Zh.DAL.Define/Contracts/Imp/AutoCode/dtArticleDao.cs | C# | mit | 580 |
/*
* Author: 陈志杭 Caspar
* Contact: 279397942@qq.com qq:279397942
* Description: 数据契约实体模型文件
* 文件由模板生成,请不要直接修改文件,如需修改请创建一个对应的partial文件
*/
using System;
using System.Collections;
using System.Collections.Generic;
using Zh.DAL.Define.Entities;
using Zh.DAL.Base.Define.Entities;
namespace Zh.DAL.Define.Entities
{
#r... | Caspar12/Csharp | src/Zh.DAL.Define/Entities/AutoCode/Activity_AC_Match.cs | C# | mit | 3,078 |
#!/usr/bin/env node
var child_process = require('child_process');
var argv = require('yargs')
.boolean(['readability', 'open'])
.argv;
var pdfdify = require('../lib');
var srcUrl = argv._[0];
console.log("Convertering: '"+srcUrl+"'");
pdfdify.convert({
title:argv.title|| srcUrl,
readability:argv.readability,
... | darvin/prince-bookmarklet | bin/pdfdify.js | JavaScript | mit | 507 |
module WargamingApi::Util
end
require 'wargaming_api/util/uri'
require 'wargaming_api/util/params'
require 'wargaming_api/util/http' | DmitryDrobotov/wargaming_api_ruby | lib/wargaming_api/util.rb | Ruby | mit | 133 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using HelpTheHomelessApp.Models;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace HelpTheHomelessApp
{
public partial class SurveyPage : ContentPage
{
public List<SurveyQuestionModel> ... | leightonb/HomelessHack2017 | HelpTheHomelessApp/HelpTheHomelessApp/SurveyPage.xaml.cs | C# | mit | 4,006 |
package graphql.analysis;
import graphql.PublicApi;
import graphql.execution.AbortExecutionException;
import graphql.execution.instrumentation.InstrumentationContext;
import graphql.execution.instrumentation.SimpleInstrumentation;
import graphql.execution.instrumentation.parameters.InstrumentationValidationParameters;... | graphql-java/graphql-java | src/main/java/graphql/analysis/MaxQueryComplexityInstrumentation.java | Java | mit | 7,538 |
package com.github.maxopoly.finale.combat;
public class CombatConfig {
private int cpsLimit;
private long cpsCounterInterval;
private boolean noCooldown;
private double maxReach;
private boolean sweepEnabled;
private CombatSoundConfig combatSounds;
private double horizontalKb;
private double verticalKb;
priv... | Maxopoly/Finale | src/main/java/com/github/maxopoly/finale/combat/CombatConfig.java | Java | mit | 4,053 |
//
// Created by Chris Richards on 28/04/2016.
//
#include <gtest/gtest.h>
#include <DbfTable.h>
class Dbase31TableFixture : public ::testing::Test {
protected:
virtual void SetUp() {
dbf_table_ = DbfTablePtr(new DbfTable("/Users/chrisr/Development/ClionProjects/dbf2csv/dbf_tests/fixtures/dbase_31.dbf"));... | yellowfeather/dbf2csv | dbf_tests/dbase31_tests/Dbase31TableFixture.cpp | C++ | mit | 699 |
/**
* Sizzle Engine Support v2.2.0
* http://rightjs.org/plugins/sizzle
*
* Copyright (C) 2009-2011 Nikolay Nemshilov
*/
/**
* sizzle initialization script
*
* Copyright (C) 2010-2011 Nikolay Nemshilov
*/
RightJS.Sizzle = {
version: '2.2.0'
};
/*!
* Sizzle CSS Selector Engine - v1.0
* Copyright 2009, ... | MadRabbit/right-rails | vendor/assets/javascripts/right/sizzle-src.js | JavaScript | mit | 30,339 |
#!/usr/bin/python
import argparse
from os import path as os_path
import demo_project as demo
import traceback
def set_host_url_arg():
parser.add_argument('--host', required=True,
help='the url for the Materials Commons server')
def set_datapath_arg():
parser.add_argument('--datapath', ... | materials-commons/materialscommons.org | backend/scripts/demo-project/build_project.py | Python | mit | 1,400 |
import React from 'react';
import PropTypes from 'prop-types';
import {connect} from 'react-redux';
import getIn from '@mzvonar/getin';
import isEvent from './../utils/isEvent';
import getPath from './../utils/getPath';
import deepEqual from 'react-fast-compare';
function deleteChildren(object, children) {
let del... | mzvonar/modular-redux-form | src/components/ConnectedInput.js | JavaScript | mit | 6,941 |
using System.Xml.Serialization;
namespace MovieDatabase.ImportDataFromFiles.ImportingData.XMLModels
{
public class Director
{
[XmlElement("firstName")]
public string FirstName { get; set; }
[XmlElement("lastName")]
public string LastName { get; set; }
[XmlElement("age... | Team-Singapore-Sling/TeamWork | MovieDatabase/MovieDatabase.ImportDataFromFiles/ImportingData/XMLModels/Director.cs | C# | mit | 446 |
# frozen_string_literal: true
# Job is a base class that jobs must subclass
class DivvyUp::Job
class << self
attr_reader :queue
def perform_async(*args)
DivvyUp.service.enqueue job_class: self, args: args
end
end
end
| nilobject/divvyup | lib/divvyup/job.rb | Ruby | mit | 241 |
using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;
using Quasar.Communication.Packets.Outgoing.Users;
using Quasar.Database.Interfaces;
namespace Quasar.Communication.Packets.Incoming.Users
{
class CheckValidNameEvent : IPacketEvent
{
public void Parse(HabboHotel.... | slaapkopamy/PlusEmu-making-ready-for-linux-server | Communication/Packets/Incoming/Users/CheckValidNameEvent.cs | C# | mit | 2,939 |
# frozen_string_literal: true
module Eve
class RegionContractsJob < ApplicationJob
queue_as :default
retry_on EveOnline::Exceptions::Timeout,
EveOnline::Exceptions::ServiceUnavailable,
EveOnline::Exceptions::BadGateway,
EveOnline::Exceptions::InternalServerError,
OpenSSL::SSL::SSLErr... | biow0lf/evemonk | app/jobs/eve/region_contracts_job.rb | Ruby | mit | 504 |
/**
* Global Variable Configuration
* (sails.config.globals)
*
* Configure which global variables which will be exposed
* automatically by Sails.
*
* For more information on configuration, check out:
* http://sailsjs.org/#!/documentation/reference/sails.config/sails.config.globals.html
*/
module.exports.global... | dcamachoj/rauxa-code | config/globals.js | JavaScript | mit | 3,304 |
/***
* Inferno Engine v4 2015-2017
* Written by Tomasz "Rex Dex" Jonarski
*
* [# filter: elements\controls\simple #]
***/
#include "build.h"
#include "uiProgressBar.h"
#include "ui/toolkit/include/uiStaticContent.h"
namespace ui
{
//---
// active area element, does nothing but is
class ProgressBarArea ... | InfernoEngine/engine | dev/src/ui/widgets/src/uiProgressBar.cpp | C++ | mit | 3,017 |
<?php
/**
* Flash Messenger - implement session-based messages
*
* @author Loïc Frering <loic.frering@gmail.com>
*/
class LoSo_Zend_Controller_Action_Helper_FlashMessenger extends Zend_Controller_Action_Helper_FlashMessenger
{
/**
* preDispatch() - runs before action is dispatched.
*
* @return Lo... | loicfrering/losolib | src/LoSo/Zend/Controller/Action/Helper/FlashMessenger.php | PHP | mit | 1,579 |
#include "MW_Timer.hpp"
MW_Timer::MW_Timer(double periodInSeconds): period(periodInSeconds)
{
reset();
}
bool MW_Timer::get() const
{
b_mutex.lock();
bool retVal = MPI::Wtime() > expirationTime;
b_mutex.unlock();
return retVal;
}
void MW_Timer::reset()
{
b_mutex.lock();
expirationTime = MPI::Wtime() + perio... | seanjh/parallel_lab2 | MW_Timer.cpp | C++ | mit | 344 |
using StatsdClient.MetricTypes;
using System;
using System.Collections.Generic;
namespace StatsdClient
{
public interface IStatsd
{
void Send<TCommandType>(string name, int value) where TCommandType : Metric, IAllowsInteger, new();
void Send<TCommandType>(string name, double value) whe... | Kyle2123/statsd-csharp-client | src/StatsdClient/IStatsd.cs | C# | mit | 714 |
#require 'byebug'
require_relative '../models/url'
get '/' do
@urls = Url.last
erb :"static/index"
end
post '/urls' do
x = Url.new(long_url: params[:long_url])
x.shorten
x.save!
x.to_json
# redirect to '/'
#use return @long_url to immediately return the long_url without going to the controller
#ajax is usin... | anyatan/bitly-clone | app/controllers/static.rb | Ruby | mit | 504 |
this.NesDb = this.NesDb || {};
NesDb[ '9F3DE783494F7FF30679A17B0C5B912834121095' ] = {
"$": {
"name": "Nekketsu Kouha Kunio-kun",
"altname": "熱血硬派くにおくん",
"class": "Licensed",
"catalog": "TJC-KN",
"publisher": "Technos",
"developer": "Technos",
"region": "Japan",
"players": "2",
"date": "1987-04-17"
... | peteward44/WebNES | project/js/db/9F3DE783494F7FF30679A17B0C5B912834121095.js | JavaScript | mit | 1,227 |
<?php
/*
* This file is part of Pimple.
*
* Copyright (c) 2009 Fabien Potencier
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the... | alpipego/resizefly | src/Common/Pimple/Exception/UnknownIdentifierException.php | PHP | mit | 1,717 |
/**
* Interaction for the tags module
*
* @author Tijs Verkoyen <tijs@sumocoders.be>
*/
jsBackend.tags =
{
// init, something like a constructor
init: function()
{
$dataGridTag = $('.jsDataGrid td.tag');
if($dataGridTag.length > 0) $dataGridTag.inlineTextEdit({ params: { fork: { action: 'edit' } }, tooltip:... | jlglorences/jorge_prueba | src/Backend/Modules/Tags/Js/Tags.js | JavaScript | mit | 392 |
/* global WebFont */
(function () {
'use strict';
function FontLoaderFactory () {
return {
setFonts : function () {
WebFont.load({
custom: {
families: [ 'FontAwesome','Ubuntu','Oxygen','Open Sans' ],
urls: [ '/fonts/base.css']
}
});
}
... | dlfinis/master-sigma | assets/angular/components/core/fontloader/fontloader.mdl.js | JavaScript | mit | 428 |
module.exports = handler
var debug = require('../debug').server
var fs = require('fs')
function handler (err, req, res, next) {
debug('Error page because of ' + err.message)
var ldp = req.app.locals.ldp
// If the user specifies this function
// then, they can customize the error programmatically
if (ldp.e... | nicola/ldnode | lib/handlers/error-pages.js | JavaScript | mit | 941 |
export interface IArticle {
articleId: number,
name: string,
description: string,
prix: number,
stock: number
} | milleniu/JavaForWeb.CandiesForAll | app/candiesForAll/src/app/model/article.model.ts | TypeScript | mit | 131 |
package redis.clients.jedis.util;
import java.io.FilterOutputStream;
import java.io.IOException;
import java.io.OutputStream;
/**
* The class implements a buffered output stream without synchronization There are also special
* operations like in-place string encoding. This stream fully ignore mark/reset and should ... | xetorthio/jedis | src/main/java/redis/clients/jedis/util/RedisOutputStream.java | Java | mit | 4,015 |
/***********************************************************************\
| |
| File: SGD_AudioManager.cpp |
| Author: Douglas Monroe |
| Last Modified: 2014-03-10 |
| |
| Purpose: To load and play audio files |
| .wav - sound effect |
| ... | Poofyfancypants/Destiny-Falls | DestinyFalls/SGD Wrappers/SGD_AudioManager.cpp | C++ | mit | 40,414 |
<?php
/** Tabbed Pane.
*
* Copyright (c) 2008 Oliver C Dodd
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the righ... | oliverdodd/0 | components/php/TabbedPane.php | PHP | mit | 6,362 |
const DateTime = Jymfony.Component.DateTime.DateTime;
const DateTimeZone = Jymfony.Component.DateTime.DateTimeZone;
const TimeSpan = Jymfony.Component.DateTime.TimeSpanInterface;
const { expect } = require('chai');
describe('[DateTime] DateTime', function () {
it('should accept string on construction', () => {
... | alekitto/jymfony | src/Component/DateTime/test/DateTimeTest.js | JavaScript | mit | 9,292 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace abbTools
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Ma... | piopon/abb-tools | abbTools/Program.cs | C# | mit | 514 |
class ParticipantInvitation < ActiveRecord::Base
include Invitable
before_create :generate_token
belongs_to :event
validates_uniqueness_of :email, scope: :event
def create_participant(person)
event.participants.create(person: person, role: role)
end
private
def generate_token
self.token = ... | jsis/cfp.jsconf.is | app/models/participant_invitation.rb | Ruby | mit | 698 |
package com.imrenagi.service_auth.service.security;
import com.imrenagi.service_auth.AuthApplication;
import com.imrenagi.service_auth.domain.User;
import com.imrenagi.service_auth.repository.UserRepository;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks... | imrenagi/microservice-skeleton | service-auth/src/test/java/com/imrenagi/service_auth/service/security/MysqlUserDetailsServiceTest.java | Java | mit | 2,072 |
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package net.daw.bean;
import com.google.gson.annotations.Expose;
/**
*
* @author rafa
*/
public class Element implements IElement ... | Josecho93/ExamenCliente | src/main/java/net/daw/bean/Element.java | Java | mit | 1,120 |
package org.vitrivr.cineast.api.rest.handlers.actions.metadata;
import io.javalin.http.Context;
import io.javalin.plugin.openapi.dsl.OpenApiBuilder;
import io.javalin.plugin.openapi.dsl.OpenApiDocumentation;
import java.util.Map;
import org.vitrivr.cineast.api.messages.result.MediaObjectMetadataQueryResult;
import org... | vitrivr/cineast | cineast-api/src/main/java/org/vitrivr/cineast/api/rest/handlers/actions/metadata/FindObjectMetadataFullyQualifiedGetHandler.java | Java | mit | 2,769 |
require 'fileutils'
module TwitterSms
class Logger
def initialize(filename,log_size=5)
@log_size=log_size
@raw_filename = filename
@file = File.new(filename, "a") # 2x check mode
write_intro
end
def log(message)
@file.puts("#{Time.now.strftime("(%b %d - %H:%M:%S)")} #{messa... | rkneufeld/twitter-sms | lib/twitter-sms/logger.rb | Ruby | mit | 648 |
using System;
using System.Data;
using Signum.Utilities;
using Signum.Engine.Maps;
using System.IO;
using System.Data.Common;
using System.Linq.Expressions;
using Signum.Entities;
using Signum.Utilities.Reflection;
using System.Reflection;
using System.Threading.Tasks;
using System.Threading;
using System.D... | avifatal/framework | Signum.Engine/Connection/Connector.cs | C# | mit | 8,153 |
<?php
declare(strict_types=1);
namespace Fc2blog\Model;
class Validate
{
/**
* 必須チェック
* @param $value
* @param bool $isNeed true/false
* @return bool|string True is valid, string is some error message.
*/
public static function required($value, bool $isNeed)
{
if ($value =... | fc2blog/blog | app/src/Model/Validate.php | PHP | mit | 11,269 |
module.exports = function () {
var modules = [];
var creeps = Game.creeps;
var spawn = Game.spawns.Spawn1;
var score = spawn ? spawn.room.survivalInfo.score : 0;
var minions = {
total: 0,
build: 0,
carry: 0,
harvest: 0,
guard: 0,
medic: 0,
runn... | cameroncondry/cbc-screeps | game/clock.js | JavaScript | mit | 1,928 |
using System;
using System.IO;
using System.Text;
namespace VirtualObjects.Core
{
class TextWriterStub : TextWriter
{
public override Encoding Encoding
{
get { return null; }
}
}
}
| AlienEngineer/VirtualObjects | VirtualObjects/TextWriterStub.cs | C# | mit | 233 |
package com.indignado.logicbricks.utils.builders.joints;
import com.badlogic.gdx.physics.box2d.World;
/**
* @author Rubentxu
*/
public class JointBuilder {
private final World world;
private DistanceJointBuilder distanceJointBuilder;
private FrictionJointBuilder frictionJointBuilder;
private GearJoi... | Rubentxu/GDX-Logic-Bricks | gdx-logic-bricks/src/main/java/com/indignado/logicbricks/utils/builders/joints/JointBuilder.java | Java | mit | 2,754 |
# -*- coding: utf-8 -*-
# ProjectEuler/src/python/problem404.py
#
# Crisscross Ellipses
# ===================
# Published on Sunday, 2nd December 2012, 01:00 am
#
# Ea is an ellipse with an equation of the form x2 + 4y2 = 4a2. Ea' is the
# rotated image of Ea by θ degrees counterclockwise around the origin O(0, 0)
# ... | olduvaihand/ProjectEuler | src/python/problem404.py | Python | mit | 944 |
/**
* @class A wrapper around WebGL.
* @name GL
* @param {HTMLCanvasElement} element A canvas element.
* @param {function} onload A callback function.
* @param {function} callbacks.onerror A callback function.
* @param {function} callbacks.onprogress A callback function.
* @param {function} callbacks.onloadstart... | emnh/mdx-m3-viewer | src/gl/gl.js | JavaScript | mit | 15,053 |
using System;
using System.Collections.Generic;
using PMKS;
using PMKS.PositionSolving;
using StarMathLib;
namespace PMKS
{
internal class GearData
{
internal readonly double radius1;
internal readonly double radius2;
internal readonly int gearTeethIndex;
internal ... | DesignEngrLab/PMKS | PlanarMechanismSimulator/gearData.cs | C# | mit | 13,965 |
module Generators
module Hobo
module Migration
class HabtmModelShim < Struct.new(:join_table, :foreign_keys, :connection)
def self.from_reflection(refl)
result = self.new
result.join_table = refl.options[:join_table].to_s
result.foreign_keys = [refl.primary_key_name.t... | activestylus/hobofields | lib/generators/hobo/migration/migrator.rb | Ruby | mit | 16,330 |
import hotkeys from "hotkeys-js";
export default class HotkeyHandler {
constructor(hotkeyRegistry) {
this.hotkeyRegistry = hotkeyRegistry;
hotkeys("*", { keyup: true, keydown: false }, event => {
event.preventDefault();
this.hotkeyRegistry.resetLastPressedKeyCodes();
return false;
})... | UnderNotic/KeyJitsu | src/game/HotkeyRegistry/index.js | JavaScript | mit | 602 |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Rank extends MX_Controller {
public function __construct()
{
parent::__construct();
$this->load->config('rank');
$this->configs_rank = config_item('rank');
$this->players = $this->load->model('account/player_model');
$this->lo... | WebATS/WebAAC | application/modules/tfs0.4/players/controllers/rank.php | PHP | mit | 4,297 |
<?php
namespace Helpers;
/**
* Assets static helper
* @date 27th November, 2014
* @date May 18 2015
*/
class Assets
{
/**
* @var array Asset templates
*/
protected static $templates = array
(
'js' => '<script src="%s" type="text/javascript"></script>',
'css' => '<link href="... | NandoKstroNet/babita | app/Helpers/Assets.php | PHP | mit | 1,175 |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="de" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Blizzardcoin</source>
<translation>Über Blizzardcoin</translation>
... | blizzardcoin/blizzardcoin | src/qt/locale/bitcoin_de.ts | TypeScript | mit | 120,925 |
$(function(){
BrowserDetect.init();
$('.minifyme').on("navminified", function() {
// $('td.expand,th.expand').toggle();
});
// Activate all popovers (if NOT mobile)
if ( !BrowserDetect.isMobile() ) {
$('[data-toggle="popover"]').popover();
}
});
$.fn.pressEnter = function(fn) {
... | empath-io/empath | app/assets/javascripts/main.js | JavaScript | mit | 2,251 |
import { PickScaleConfigWithoutType, ScaleConfigWithoutType } from './types/ScaleConfig';
import { DefaultThresholdInput, D3Scale, PickD3Scale } from './types/Scale';
import { StringLike, DefaultOutput } from './types/Base';
import scaleOperator, { ALL_OPERATORS } from './operators/scaleOperator';
const applyAllOperat... | hshoff/vx | packages/visx-scale/src/updateScale.ts | TypeScript | mit | 5,310 |
<?php
session_start();
//echo "filename:". $_REQUEST['fn'];
ini_set('display_errors', 'Off');
ini_set('display_startup_errors', 'Off');
error_reporting(0);
include("../config.php");
include("../class/mysql.class.php");
if ($_REQUEST['r'])
$resource = $_REQUEST['r'];
$db = new MySQL(true);
if ($db->Error())... | yellowelise/crypt2share | assets/mysite/editor.php | PHP | mit | 4,709 |
/*
Author: Gerard Lamusse
Created: 08/2015
Version: 1.0
URL: https://github.com/u12206050/jsonZipper
*/
var jsonZipper = (function(){
var jz = function(_jsonObj, _options) {
var Z = this;
var MAP = [];
var opts = _options && typeof(_options) !== "boolean" ? _options : {};
/* Public Func... | mboulette/incendie | javascript/jsonZipper.js | JavaScript | mit | 8,405 |
/******************************************************************************
* The MIT License
* Copyright (c) 2003 Novell Inc. www.novell.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 Sof... | jjenki11/blaze-chem-rendering | qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/Novell.Directory.Ldap/Novell.Directory.Ldap/MessageVector.cs | C# | mit | 3,366 |
package com.github.daneko.simpleitemanimator;
import android.support.v4.view.ViewCompat;
import android.support.v4.view.ViewPropertyAnimatorCompat;
import android.view.View;
import fj.F;
import fj.F2;
import fj.F3;
import fj.Unit;
import fj.data.Option;
/**
* @see {@link android.support.v7.widget.DefaultItemAnimato... | daneko/SimpleItemAnimator | library/src/main/java/com/github/daneko/simpleitemanimator/DefaultAnimations.java | Java | mit | 3,855 |
<?php
// Newfoundland Genetics Project
// https://github.com/opyum/nlgp
// Admin Functions
// "admin.php"
// Get config and start session
require 'inc/config.php';
session_start();
$uid = $_SESSION['UserID'];
if (isset($_SESSION['UserLoggedIn']) && ($_SESSION['UserLevel'] == 2)) {
// Print Token
if (isset($_... | opyum/nlgp | public_html/admin.php | PHP | mit | 23,962 |
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FormErrorsComponent } from './form-errors/form-errors.component';
import { PasswordCharacterMessageBuilderPipe } from './form-errors/password-character-message-builder.pipe';
@NgModule({
imports: [
CommonModule
]... | CharlBest/nean-stack-starter | src/client/app/shared/form-errors/form-errors.module.ts | TypeScript | mit | 488 |
#include<iostream>
template<classy T>
class CSL // CommaSeparatedList
{
private:
int size;
public:
CSL(T *d, int s);
void showList();
};
CSL<T>::CSL(T *d, int s): data(s),size(d)
template<typename T>
void CSL<T>::showList()
{
cout<<"Comma separated list:"<<endl;
for(int x = 0; x < s ++x)
{
... | JamesMarino/CSCI204 | Tutorials/Week 10/Support/CSL.cpp | C++ | mit | 2,261 |