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 |
|---|---|---|---|---|---|
package net.gree.aurora.application.config.defaultconfig;
/**
* Redis用{@link AuroraDefaultConfig}。
*/
public interface AuroraDefaultRedisConfig extends AuroraDefaultConfig {
/**
* データベース番号を取得する。
*
* @return データベース番号
*/
Integer getDatabaseNumber();
/**
* パスワードを取得する。
*
... | gree/aurora | aurora-core/src/main/java/net/gree/aurora/application/config/defaultconfig/AuroraDefaultRedisConfig.java | Java | mit | 453 |
import { h } from 'omi';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(h("path", {
d: "M2 6.67V22h20V6H8.3l8.26-3.34L15.88 1 2 6.67zM7 20c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm13-8h-2v-2h-2v2H4V8h16v4z"
}), 'RadioSharp'); | AlloyTeam/Nuclear | components/icon/esm/radio-sharp.js | JavaScript | mit | 272 |
<?php
/*
* This file is part of OAuth 2.0 Laravel.
*
* (c) Luca Degasperi <packages@lucadegasperi.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace LucaDegasperi\OAuth2Server\Storage;
use Carbon\Carbon;
use League\O... | BunceeLLC/oauth2-server-laravel | src/Storage/FluentAuthCode.php | PHP | mit | 3,992 |
using System;
using System.Collections.Generic;
using System.Linq;
namespace School
{
public class Teacher : Person
{
//field
private string comments;
//property
public List<Discipline> SetOfDisciplines{ get; private set; }
public string Comments
{
... | niki-funky/Telerik_Academy | Programming/OOP/05. OOP Principles I/01. School/Teacher.cs | C# | mit | 1,097 |
/**
* @author: @NikhilS
*/
require('ts-node/register');
var helpers = require('./helpers');
exports.config = {
baseUrl: 'http://localhost:3000/',
// use `npm run e2e`
specs: [
helpers.root('src/**/**.e2e.ts'),
helpers.root('src/**/*.e2e.ts')
],
exclude: [],
framework: 'jasmine2',
allScripts... | nikhilsarvaiye/PeopleManager | config/protractor.conf.js | JavaScript | mit | 931 |
<?php
namespace BlogBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\Session;
class DefaultController extends Controller
{
public function indexAction(){
return $this->render('BlogBundle:Entr... | alexciobanu4/symfony3 | src/BlogBundle/Controller/DefaultController.php | PHP | mit | 451 |
#include<cstdio>
void main()
{
int queenNum,i;
while(scanf("%d",&queenNum))
{
if(queenNum==0)break;
if(queenNum%6!=2 && queenNum%6!=3)
{
for(i=2;i<=queenNum;i+=2)printf("%d ",i);
for(i=1;i<=queenNum;i+=2)printf("%d ",i);
}
else
{
if((queenNum/2)%2==0)
{
for(i=queenNum/2;... | junzh0u/poj-solutions | 3239/3002024_AC_0MS_72K.cpp | C++ | mit | 834 |
from carapace import config
from carapace.sdk import registry
config.updateConfig()
registry.registerConfig(config)
| oubiwann/carapace | carapace/app/__init__.py | Python | mit | 118 |
# frozen_string_literal: true
require "set"
# Niceness of a node means that it cannot be nil.
#
# Note that the module depends on the includer
# to provide #scope (for #nice_variable)
module Niceness
# Literals are nice, except the nil literal.
NICE_LITERAL_NODE_TYPES = [
:self,
:false, :true,
:int, :... | yast/zombie-killer | lib/zombie_killer/niceness.rb | Ruby | mit | 1,574 |
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using UNIFreelancerDataBaseEntry.CCandidateService;
namespace UNIFreelancerDataBaseEntry
{
public pa... | mayurdo/UNISoftware | UNIFreelancerDataBaseEntry/Form1.cs | C# | mit | 759 |
require File.dirname(__FILE__) + '/test_helper.rb'
class TestScbiFastq < Test::Unit::TestCase
def setup
@test_file='/tmp/sanger.fastq';
@test_file_gz='/tmp/sanger.fastq.gz';
@seq_fasta='ACTG'
@seq_qual=[31]
@seq_name='SEQ'
end
def test_gz_sanger
fqr=FastqFile.new(Fi... | dariogf/scbi_fastq | test/scbi_fastq_test.rb | Ruby | mit | 4,582 |
// Include assertion library "Should"
var should = require('should'); // jshint ignore:line
var PowerupElection = require('polyball/shared/powerups/PowerupElection.js');
var Vote = require('polyball/shared/model/Vote.js');
// An example test that runs using Mocha and uses "Should" for assertion testing
describe('Power... | polyball/polyball | polyball/tests/shared/model/PowerupElectionTests.js | JavaScript | mit | 3,626 |
version https://git-lfs.github.com/spec/v1
oid sha256:92a4f24d3a4ad4de3bbed1013b330d5ca23f4d0cbeed4a7536dcd6b3cd3e492d
size 4461
| yogeshsaroya/new-cdnjs | ajax/libs/dojo/1.7.2/nls/nb/colors.js | JavaScript | mit | 129 |
version https://git-lfs.github.com/spec/v1
oid sha256:50ef15b4c4f47fb98410127b48f1db6e32dc7f759cab685bd27afbfcfd7fdd38
size 23119
| yogeshsaroya/new-cdnjs | ajax/libs/yui/3.17.1/jsonp/jsonp-coverage.js | JavaScript | mit | 130 |
<?php
/**
* Handle BB code.
*
* This plugin is the most powerful plugin, if you don't want to write every
* text in HTML. It also enables users that are not allowed to post HTML to
* format their text.
*
* A detailed documentation of how to use the tags can be found at
* http://github.com/marcoraddatz/candyCMS... | cnlpete/candybox | plugins/Bbcode/Bbcode.controller.php | PHP | mit | 9,003 |
//
// Created by Per-Arne on 27.02.2017.
//
#ifndef WARC2SIM_COLORCONVERTER_H
#define WARC2SIM_COLORCONVERTER_H
#include <SFML/Graphics/Color.hpp>
class ColorConverter {
public:
static sf::Color hsv(double hue, double sat, double val)
{
hue = fmod(hue, 360);
while(hue<0) hue += 360;
... | UIA-CAIR/DeepRTS | src/util/ColorConverter.hpp | C++ | mit | 1,098 |
package morbrian.mormessages.controller;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.anno... | morbrian/mormessages | src/main/java/morbrian/mormessages/controller/Subscription.java | Java | mit | 4,448 |
/* transparency component */
define([
'dojo/_base/declare',
'dojo/_base/lang',
'dojo/_base/array',
'dojo/query',
'dojo/dom-style',
'dijit/PopupMenuItem',
'dijit/TooltipDialog',
'dijit/form/HorizontalSlider',
'dijit/form/HorizontalRuleLabels'
], function (
declare,
lang,
a... | pri0ri7y/OpenMap | js/widgets/templates/layercontrol/plugins/Transparency.js | JavaScript | mit | 1,864 |
class AswersController < ApplicationController
def index
@aswers = Aswer.all
respond_to do |format|
format.html # index.html.erb
format.xml { render :xml => @aswers }
end
end
def show
@aswer = Aswer.find(params[:id])
respond_to do |format|
format.html #show.ht... | serviceweb2012/Plugin-Enquete | generators/enquete/templates/app/controllers/aswers_controller.rb | Ruby | mit | 391 |
// DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
// Version 2, December 2004
//
// Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
//
// Everyone is permitted to copy and distribute verbatim or modified
// copies of this license document, and changing it is allowed as long
// as the name is... | beeva-hodeilopez/beeva-data-visualization-hackathon | three-js/map3d.js | JavaScript | mit | 4,972 |
logparser = r'(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2},\d{3})\s+' \
r'(DEBUG|ERROR|INFO)\s+\[(\w+):(\w+):?(\w+)?\]\s+(.+)$'
| the-zebulan/CodeWars | katas/kyu_6/parse_the_log.py | Python | mit | 134 |
using System;
using System.Net;
using System.Net.Http;
namespace AonWeb.FluentHttp.Exceptions
{
public interface IWriteableExceptionResponseMetadata : IExceptionResponseMetadata
{
new HttpStatusCode StatusCode { get; set; }
new string ReasonPhrase { get; set; }
new long? ResponseConten... | aonweb/fluent-http | AonWeb.FluentHttp.Serialization/Exceptions/IWriteableExceptionResponseMetadata.cs | C# | mit | 601 |
using UnityEngine;
using System.Collections;
public class ItemBase : MonoBehaviour {
//public GameObject brokenItemsPrefab;
public int life;
public int speeddown;
public int super;
public int confuse;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () ... | seonggwang/blueberry-pi | Assets/Scripts/ItemBase.cs | C# | mit | 551 |
module SwiftServer
module Controllers
class Keystone1 < ApplicationController
include Concerns::CredentialsHelper
attr_accessor :tenant, :username
def show
if authorize
safe_append_header('X-Storage-Url', app.url('/v1/AUTH_tester'))
safe_append_header('X-Auth-Token',... | mdouchement/swift-server | lib/swift_server/controllers/keystone_1.rb | Ruby | mit | 775 |
package edu.rutgers.rumad.rumadworkshopthree.completed;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.wid... | RutgersMobileApplicationDevelopment/RUMADWorkshopThree | app/src/main/java/edu/rutgers/rumad/rumadworkshopthree/completed/MainActivity.java | Java | mit | 6,604 |
<!DOCTYPE html>
<html lang="en">
<head>
<?php include('head.php') ?>
<style>
a.link{
text-decoration: none;
}
</style>
</head>
<body>
<!--Menu Begin-->
<?php include('menu.php') ?>
<!--Menu Ends-->
<div class="container">
<table class="table table-responsive">
<form method="post" action="<?php echo base_url... | soorajnraju/oruma | application/views/price_change.php | PHP | mit | 1,165 |
module StatefulJobs
module Controller
extend ActiveSupport::Concern
included do
class << self
attr_accessor :stateful_jobs_class, :stateful_jobs_options
end
end
module ClassMethods
def stateful_jobs klass, options = {}
self.stateful_jobs_class = klass.to_s.camelcas... | metascape/stateful_jobs | lib/stateful_jobs/controller.rb | Ruby | mit | 955 |
class BaseWoodTile < MapTile
def initialize(position)
super
@type = :wood
@speed_modifier = Settings.wood_floor_movement_points
end
end
class ClientWoodTile < BaseWoodTile
def initialize(position)
super
@image = Images[:wood_floor]
end
end
| MichaelBaker/zombie-picnic | lib/game/lib/map_tiles/wood_tile.rb | Ruby | mit | 279 |
package problems;
/**
* Created by wanghongkai on 2017/1/16.
*
* 问题:将一个字符串转为正数,实现atoi的功能
*
* 思路:注意正负号,注意溢出判断
*
* 更优解法:优化溢出时的判断,参考p007
*/
public class P008_string_to_integer {
public static int myAtoi(String str) {
if (str == null) {
return 0;
}
str = str.trim();
... | ironwang/leetcode | src/problems/P008_string_to_integer.java | Java | mit | 2,145 |
using BlueSheep.Interface;
using BlueSheep.Interface.Text;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows;
namespace BlueSheep.Engine.Types
{
public class WatchDog
{
#region Fields
private AccountUC m_Account;
... | Sadikk/BlueSheep | BlueSheep/Engine/Types/WatchDog.cs | C# | mit | 2,065 |
<!DOCTYPE html>
<html>
<head>
<title>Other page</title>
</head>
<body>
<h1>You know... some other page</h1>
</body>
</html>
| alexandresalome/php-webdriver | website/other.php | PHP | mit | 156 |
#include <bits/stdc++.h>
using namespace std;
int n, m;
struct Edge {
int u, v, r;
Edge() {}
Edge(int _u, int _v, int _r) : u(_u), v(_v), r(_r) {}
};
vector<Edge> e[10];
int bit_count(int x) {
int c = 0;
while (x) {
++c;
x -= x&(-x);
}
return c;
}
int f(int r, int sta) ... | hangim/ACM | HDU/5305_Friends/5305.cc | C++ | mit | 1,603 |
using System;
using System.Management.Automation;
using Microsoft.SharePoint.Client;
using SharePointPnP.PowerShell.CmdletHelpAttributes;
using SharePointPnP.PowerShell.Commands.Base.PipeBinds;
using SharePointPnP.PowerShell.Commands.Enums;
namespace SharePointPnP.PowerShell.Commands.Features
{
[Cmdlet(VerbsLifec... | iiunknown/PnP-PowerShell | Commands/Features/DisableFeature.cs | C# | mit | 2,265 |
<?php
namespace Tutto\CommonBundle\Form\Subscriber;
use Exception;
/**
* Class SubscriberException
* @package Tutto\CommonBundle\Form\Subscriber
*/
class SubscriberException extends Exception { } | apihour/crm | src/Tutto/CommonBundle/Form/Subscriber/SubscriberException.php | PHP | mit | 201 |
package seedu.task.ui;
import java.net.URL;
import java.util.logging.Logger;
import javafx.fxml.FXML;
import javafx.scene.Scene;
import javafx.scene.layout.Region;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
import seedu.task.MainApp;
import seedu.task.commons.core.LogsCenter;
import seedu.task.common... | CS2103JAN2017-F14-B2/main | src/main/java/seedu/task/ui/HelpWindow.java | Java | mit | 1,518 |
package com.network.gui;
/**
* MainModel.
*
* @author ningzhangnj
*/
public class MainModel {
private int localPort;
private String remoteHost;
private int remotePort;
public int getLocalPort() {
return localPort;
}
public void setLocalPort(int localPort) {
this.localPor... | ningzhangnj/NetCapPlay | src/main/java/com/network/gui/MainModel.java | Java | mit | 669 |
'''dossier.fc Feature Collections
:class:`dossier.fc.FeatureCollection` provides
convenience methods for working with collections of features
such as :class:`dossier.fc.StringCounter`.
A feature collection provides ``__add__`` and ``__sub__`` so that
adding/subtracting FeatureCollections does the right thing for its
... | dossier/dossier.fc | python/dossier/fc/feature_collection.py | Python | mit | 26,206 |
<?php
/**
* Template for "My company" page.
*
* @author: Andrii Birev
*/
defined('BEXEC')or die('No direct access!');
?>
<div id="companies_newcompany">
<div class="header">
<h1 class="page-header">Create company</h1>
</div>
<?php $this->breadcrumbs->draw(); ?>
<div>
form
</div>
</div>
| konservs/financello | templates/members/companies.newcompany.d.php | PHP | mit | 302 |
/*
* This file is part of ThaumicSpongeAPI, licensed under the MIT License (MIT).
*
* Copyright (c) Gabriel Harris-Rouquette
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to dea... | gabizou/ThaumicSpongeAPI | src/main/java/com/gabizou/thaumicsponge/api/entity/EldritchMonster.java | Java | mit | 1,382 |
import { Java } from './java';
import * as path from 'path';
import { ChildProcess } from "child_process";
import { LoggerContext } from './lib/logger-context';
import { Logger } from './lib/logger';
function emitLines(stream): void {
let backlog = '';
stream.on('data', function (data) {
backlog += da... | SkaceKamen/vscode-sqflint | server/src/sqflint.ts | TypeScript | mit | 13,048 |
// Fill out your copyright notice in the Description page of Project Settings.
#include "Chapter5.h"
#include "TimeOfDayHandler.h"
#include "Clock.h"
// Sets default values
AClock::AClock()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryA... | sunithshetty/Unreal-Engine-4-Scripting-with-CPlusPlus-Cookbook | Chapter05/source/Chapter5/Clock.cpp | C++ | mit | 2,382 |
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Media.Imaging;
using C1.WPF.Toolbar;
using Memento.Component.WPF;
namespace Memento.JMS.Toolbar
{
/// <summary>
/// 菜单栏通用组件
/// </summary>
public pa... | Memento1990/Memento | JMS/JMSToolbar/ToolbarControl.xaml.cs | C# | mit | 10,199 |
'use strict';
angular.module('ucllApp')
.controller('LogoutController', function (Auth) {
Auth.logout();
});
| craftworkz/ucll-workshop-jhipster | jhipster-demo/src/main/webapp/scripts/app/account/logout/logout.controller.js | JavaScript | mit | 126 |
/* The following code example is taken from the book
* "The C++ Standard Library - A Tutorial and Reference, 2nd Edition"
* by Nicolai M. Josuttis, Addison-Wesley, 2012
*
* (C) Copyright Nicolai M. Josuttis 2012.
* Permission to copy, use, modify, sell and distribute this software
* is granted provided this copyr... | iZhangHui/cppstdlib | stl/unordmap1.cpp | C++ | mit | 1,036 |
/*
* Copyright (C) 2012 David Geary. This code is from the book
* Core HTML5 Canvas, published by Prentice-Hall in 2012.
*
* License:
*
* 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 Softwar... | yuesir/HTML5-Canvas | ch03/example-3.9/example.js | JavaScript | mit | 4,545 |
// @flow
import React, { type Node } from 'react';
import classnames from 'classnames';
import { Tooltip as ReactAccessibleTooltip } from 'react-accessible-tooltip';
import './tooltip.scss';
function Tooltip({ label, overlay }: { label: Node, overlay: Node }) {
return (
<ReactAccessibleTooltip
... | ryami333/react-accessible-tooltip | packages/docs/src/components/Tooltip/Tooltip.js | JavaScript | mit | 1,166 |
<?php
namespace Adriatic\PHPAkademija\DesignPattern\FactoryMethod\MailerImplementations;
use Adriatic\PHPAkademija\DesignPattern\FactoryMethod\Newsletter;
class GiveawayNewsletter extends Newsletter
{
public function getContent() : string
{
return $this->recipientName . ', nagradna igra!';
}
}
| adriatichr/php-academy | example/src/DesignPattern/FactoryMethod/MailerImplementations/GiveawayNewsletter.php | PHP | mit | 318 |
<?php
function draw_html(){
set_lang();
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<script src="inc/js/kvm-vdi-openstack.js"></script>
</head>
<body>
<style>
.input-group-addon {
min-width:80px;
}
</style>
<form id="new_vm">
<div class="modal-conte... | Seitanas/kvm-vdi | inc/modules/OpenStack/NewVM.php | PHP | mit | 5,047 |
var router = new AiRouter();
router.route('/',{
name:'HOME',
action:function(params, query) {
document.getElementById("switch").innerHTML = "Changed to Home page!";
console.log('Home Page');
},
});
router.route('/projects/:projectId/tests/:testId',{
name:'HOME',
action:function(par... | nedyalkovV/AiRouter | demo/demo/demo.js | JavaScript | mit | 1,653 |
#!/usr/local/bin/python3
import argparse
import gym
import logging
import tensorflow as tf
from dqn_agent import DQNAgent
from network import Network
from replay_memory import ReplayMemory
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument('--log_level', default='INFO', help='Log verbosity... | viswanathgs/dist-dqn | src/main.py | Python | mit | 7,997 |
User.inject({
statics: {
log: function() {
var str = Array.create(arguments).join(' ');
if (session && session.user)
str = '[' + session.user.name + '] ' + str;
app.log(str);
},
logError: function(title, e) {
var shortDesc = (e.fileName
? 'Error in ' + e.fileName + ', Line ' + e.lineNumber
... | lehni/boots | base/helma/User/functions.js | JavaScript | mit | 1,599 |
import { bootstrap } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
import { HTTP_PROVIDERS } from '@angular/http';
import { DestinyGrimoireAppComponent, environment } from './app/';
if (environment.production) {
enableProdMode();
}
bootstrap(DestinyGrimoireAppComponent, [... | Foshkey/destiny-grimoire | src/main.ts | TypeScript | mit | 339 |
class CreateTweets < ActiveRecord::Migration
def change
create_table :tweets do |t|
t.string :xid
t.string :name
t.string :screen_name
t.text :text
t.text :media_url
t.text :profile_image_url
t.datetime :tweeted_at
t.timestamps
end
end
end
| cbetta/battlehack-dashboard | db/migrate/20130716134921_create_tweets.rb | Ruby | mit | 301 |
/**
* @since 2019-07-19 14:13
* @author vivaxy
*
* Call simple function. 7.964s
* Call function await promise. 16.687s
* Call function with if logic. 9.612s
*/
let resolved = false;
function request() {
return new Promise(function(resolve) {
setTimeout(function() {
resolve(true);
}, 1000);
});... | vivaxy/course | benchmark/await-resolved-promise/index.js | JavaScript | mit | 1,223 |
package speedy.model.database.mainmemory.datasource.nodes;
import speedy.model.database.mainmemory.datasource.operators.INodeVisitor;
public class SetNode extends IntermediateNode {
boolean cloned = false;
public SetNode(String label) {
super(label);
}
public SetNode(String label, Objec... | dbunibas/Speedy | src/speedy/model/database/mainmemory/datasource/nodes/SetNode.java | Java | mit | 700 |
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { HttpModule } from '@angular/http';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { Ng2CompleterModule } from "ng2-completer";
import { AgmCoreModule } from "angular2-google-map... | pratik-trianz/hello_weather | src/app/app.module.ts | TypeScript | mit | 1,066 |
/*
* This file is part of Sponge, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered.org <http://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Soft... | Fozie/SpongeAPI | src/main/java/org/spongepowered/api/entity/living/complex/ComplexLivingPart.java | Java | mit | 1,706 |
package com.icharge.newCache;
import org.json.JSONException;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Vector;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.PriorityBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurre... | jinsen47/iCharge | Client/app/src/main/java/com/icharge/newCache/ThreadQueue.java | Java | mit | 2,652 |
package com.youdevise.hsd;
public enum QueryType {
SELECT("select"),
INSERT("insert"),
UPDATE("update"),
DELETE("delete");
private String keyword;
private QueryType(String keyword) {
this.keyword = keyword;
}
public boolean matches(String sql) {
return sql.trim... | tim-group/High-Speed-Dirt | src/main/java/com/youdevise/hsd/QueryType.java | Java | mit | 673 |
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("Su... | dakh93/ProgrammingFundamentals | Arrays/SimpleArrayProcessing/SumArrayElements/Properties/AssemblyInfo.cs | C# | mit | 1,426 |
class AddOpenAllEntriesToUsers < ActiveRecord::Migration[5.2]
def up
add_column :users, :open_all_entries, :boolean, null: false, default: false
User.all.each do |u|
u.update_column :open_all_entries, false
end
end
def down
change_column :users, :open_all_entries, :boolean
end
end
| amatriain/feedbunch | FeedBunch-app/db/migrate/20131121205700_add_open_all_entries_to_users.rb | Ruby | mit | 314 |
using System;
using System.Collections.Generic;
namespace Puresharp
{
static public partial class Data
{
public class Store<T> : IStore<T>
where T : class
{
private Dictionary<string, T> m_Dictionary;
public Store()
{
this.m_Dict... | Virtuoze/Puresharp | Puresharp/Puresharp/Data/Data.Store.cs | C# | mit | 933 |
// Copyright (c) 2014 The Drivercoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "crypto/hmac_sha256.h"
#include <string.h>
CHMAC_SHA256::CHMAC_SHA256(const unsigned char* key, size_t keylen)
{
... | drivercoin/drivercoin | src/crypto/hmac_sha256.cpp | C++ | mit | 900 |
'use strict';
FbFriends.StatsView = Backbone.View.extend({
events: {
},
initialize: function(options) {
_.extend(this, options);
this.friends.on('reset', this.render, this);
},
render: function(event) {
this.showSexRepartition();
// this.showTopVille();
this.showR... | FXHibon/facebook-fun | frontend/app/friends/statistics/StatsView.js | JavaScript | mit | 4,807 |
# 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::Network::Mgmt::V2018_02_01
module Models
#
# The routes table associated with the ExpressRouteCircuit.
#
class ExpressRouteC... | Azure/azure-sdk-for-ruby | management/azure_mgmt_network/lib/2018-02-01/generated/azure_mgmt_network/models/express_route_circuit_routes_table_summary.rb | Ruby | mit | 2,716 |
package com.weixin.util;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.ParseException;
import org.apache.http... | ScorpionJay/wechat | src/main/java/com/weixin/util/WeixinUtil.java | Java | mit | 17,181 |
// Copyright (c) 2013-2016 Jae-jun Kang
// See the file LICENSE for details.
using System;
#if XML_CONFIG
using System.Configuration;
#endif
namespace x2
{
/// <summary>
/// Provides the global configuration properties.
/// </summary>
public static class Config
{
/// <summary>
///... | jaykang920/x2clr | x2/Config.cs | C# | mit | 5,917 |
'use strict';
const Perceptron = require('./perceptron');
const PerceptronTrainer = require('./perceptron.trainer');
const trainer = new PerceptronTrainer();
trainer.setLearningRate(2.0);
// and-perceptron: weights: [1,4], bias: -5
const perceptron = new Perceptron();
perceptron.setWeights([-20,-30]);
perceptron.se... | pascalvree/example-perceptron-implementation | src/example.js | JavaScript | mit | 998 |
require 'rails_helper'
RSpec.describe ComponentsController, type: :controller do
describe "GET a_z" do
before(:each) do
get :a_z
end
it "returns http success" do
expect(response).to have_http_status(:success)
end
it "rendered using the correct template" do
expect(response).to r... | naseberry/styleguide | spec/controllers/components_controller_spec.rb | Ruby | mit | 2,542 |
/*
*
* DynamicObject
* ledger-core
*
* Created by Pierre Pollastri on 08/03/2017.
*
* The MIT License (MIT)
*
* Copyright (c) 2016 Ledger
*
* 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... | LedgerHQ/lib-ledger-core | core/src/collections/DynamicObject.cpp | C++ | mit | 9,037 |
import { getElementIfNotEmpty } from './getElementIfNotEmpty.js';
export function getStackDataIfNotEmpty(viewportIndex) {
const element = getElementIfNotEmpty(viewportIndex);
if (!element) {
return;
}
const stackToolData = cornerstoneTools.getToolState(element, 'stack');
if (!stackToolData... | NucleusIo/HealthGenesis | viewerApp/Packages/ohif-viewerbase/client/lib/getStackDataIfNotEmpty.js | JavaScript | mit | 518 |
class AddTeamIdToUsersAndBuckets < ActiveRecord::Migration
def change
add_column :users, :team_id, :integer
add_column :buckets, :team_id, :integer
end
end
| jonmagic/i-got-issues | db/migrate/20140608063204_add_team_id_to_users_and_buckets.rb | Ruby | mit | 170 |
<?php
/**
* A simple component which returns a list of controllers plus the corresponding action names.
*
* See also: http://cakebaker.42dh.com/2006/07/21/how-to-list-all-controllers
*
* This code is in the public domain, use it in any way you like ;-)
*/
class ControllerListComponent extends Object {
public ... | ambagasdowa/kml | app/controllers/components/controller_list.php | PHP | mit | 1,033 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
namespace Wpf.Controls.Demo
{
public class DelegateCommand : ICommand
{
private Action<object> _executeMethod;
private Func<object, bool> ... | fengdingfeilong/FssControls | Wpf.Controls.Demo/DelegateCommand.cs | C# | mit | 1,265 |
// Markup.cpp: implementation of the CMarkup class.
//
// Markup Release 11.2
// Copyright (C) 2009 First Objective Software, Inc. All rights reserved
// Go to www.firstobject.com for the latest CMarkup and EDOM documentation
// Use in commercial applications requires written permission
// This software is provid... | Bam4d/Neuretix | CMarkup/Markup.cpp | C++ | mit | 172,274 |
<?php
namespace Craft;
use Cake\Utility\Hash as Hash;
class VzAddressFeedMeFieldType extends BaseFeedMeFieldType
{
// Templates
// =========================================================================
public function getMappingTemplate()
{
return 'vzaddresshelper/_integrations/feedme/fiel... | engram-design/FeedMe-Helpers | vzaddresshelper/integrations/feedme/fields/VzAddressFeedMeFieldType.php | PHP | mit | 923 |
using AxosoftAPI.NET.Core.Interfaces;
using AxosoftAPI.NET.Models;
namespace AxosoftAPI.NET.Interfaces
{
public interface IFeatures : IItemResource<Item>
{
}
}
| Axosoft/AxosoftAPI.NET | AxosoftAPI.NET/Interfaces/IFeatures.cs | C# | mit | 167 |
# == Schema Information
#
# Table name: users
#
# id :integer not null, primary key
# name :string(255)
# password_digest :string(255)
# created_at :datetime not null
# updated_at :datetime not null
#
require 'spec_helper'
describe User do
it "is vali... | trackingtrain/spoonfeeder | spec/models/user_spec.rb | Ruby | mit | 1,692 |
#!/usr/bin/env ruby
require "minitest/autorun"
require 'rlisp'
##
# Passes if +expected+.eql?(+actual).
#
# Note that the ordering of arguments is important, since a helpful
# error message is generated when this one fails that tells you the
# values of expected and actual.
#
# Example:
# assert_eql 'MY STRING', 'm... | taw/rlisp | tests/test_parser.rb | Ruby | mit | 3,497 |
using System;
using System.Media;
namespace AnimalHierarchy
{
class Kitten : Cat
{
public Kitten()
{
}
public Kitten(int age, string name)
: base(age,name)
{
this.Sex = "Female";
}
public override void ProduceSound()
{
... | siderisltd/Telerik-Academy | All Courses Homeworks/OOP/4. PrinciplesOne - OOP/AnimalHierarchy/Kitten.cs | C# | mit | 450 |
import asynctest
from asynctest.mock import patch
import json
class TestRundeckJob(asynctest.TestCase):
def setUp(self):
patcher1 = patch('charlesbot_rundeck.rundeck_job.http_get_request')
self.addCleanup(patcher1.stop)
self.mock_http_get_request = patcher1.start()
from charlesbo... | marvinpinto/charlesbot-rundeck | tests/test_rundeck_job.py | Python | mit | 2,175 |
package com.tyrfing.games.tyrlib3.util;
public interface IErrorHandler {
public void onError();
}
| TyrfingX/TyrLib | com.tyrfing.games.tyrlib3/src/com/tyrfing/games/tyrlib3/util/IErrorHandler.java | Java | mit | 105 |
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("06... | niki-funky/Telerik_Academy | Programming/Data Structures and Algorithms/01. Algo/06. RemoveNumbers/Properties/AssemblyInfo.cs | C# | mit | 1,410 |
package com.dpaulenk.webproxy.common;
import com.dpaulenk.webproxy.inbound.InboundHandlerState;
import com.dpaulenk.webproxy.utils.ChannelUtils;
import io.netty.buffer.ByteBuf;
import io.netty.channel.Channel;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel... | Fantast/simple-web-proxy-server | src/main/java/com/dpaulenk/webproxy/common/AbstractProxyHandler.java | Java | mit | 2,222 |
// Load the test base
const reload = require('require-reload')(require);
const tests = reload('../base/tests');
module.exports = function promiseTestRunner (qb) {
Object.keys(tests).forEach(describeName => {
describe(describeName, async () => {
let currentSuite = tests[describeName];
Object.keys(currentSuite)... | timw4mail/node-query | test/base/adapterPromiseTestRunner.js | JavaScript | mit | 6,181 |
package com.parikls.movieland.web.dao;
import com.parikls.movieland.web.controller.dto.movie.MovieSearchRequestDTO;
import com.parikls.movieland.web.dao.entity.Movie;
import com.parikls.movieland.web.dao.rowmapper.MovieRowMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframewor... | parikls/movieland | src/main/java/com/parikls/movieland/web/dao/MovieDAO.java | Java | mit | 1,925 |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| Base Site URL
|--------------------------------------------------------------------------
|
| URL to your CodeIgniter root. Typically this will be your base URL,
| WITH... | edisetiawan/hijabaisyahshop | application/config/config.php | PHP | mit | 18,152 |
<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$ci =& get_instance();
require_once __DIR__ . '/Validations/Site_validation.php';
/*$config = [
// Users
'user' => [
[
'field' => 'company',
'label' => 'lang:company',
'rules' => 'trim|requ... | normeno/codeigniter-base | application/modules/admin/config/form_validation.php | PHP | mit | 2,111 |
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "init.h"
#include "util.h"
#include "sync.h"
#include "ui_interface.h"
#includ... | high5coin/high5coin | src/bitcoinrpc.cpp | C++ | mit | 48,577 |
/**
* This software is released as part of the Pumpernickel project.
*
* All com.pump resources in the Pumpernickel project are distributed under the
* MIT License:
* https://raw.githubusercontent.com/mickleness/pumpernickel/master/License.txt
*
* More information about the Pumpernickel project is available he... | mickleness/pumpernickel | src/main/java/com/pump/io/location/SearchResults.java | Java | mit | 594 |
var Quad = Class.create(Renderable, {
initialize: function($super, width, height, position) {
this.width = width;
this.height = height;
$super();
if (position) this.orientation.setPosition(position);
},
setWidth: function(width) { this.setSize(width, this.height); },
setHeight: function(heigh... | sinisterchipmunk/rails-webgl | public/javascripts/objects/quad.js | JavaScript | mit | 1,039 |
<?php
/* EverFailMainBundle:Vendor:edit.html.twig */
class __TwigTemplate_a12efb1d848d1c6d16be064b9c9d634d8c4a329fc5fa3d7cb6d00bf19fafeb3b extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = $this->env->loadTemplate("::base.ht... | Bhathiya90/EverfailRepo | app/cache/dev/twig/a1/2e/fb1d848d1c6d16be064b9c9d634d8c4a329fc5fa3d7cb6d00bf19fafeb3b.php | PHP | mit | 1,732 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace dbFontAwesome.Test
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
stat... | diegobittencourt/dbFontAwesome | dbFontAwesome.Test/Program.cs | C# | mit | 524 |
/*
* SpriteContainer
* Visit http://createjs.com/ for documentation, updates and examples.
*
* Copyright (c) 2010 gskinner.com, inc.
*
* 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
... | iwangx/createjs | src/easeljs/display/SpriteContainer.js | JavaScript | mit | 7,122 |
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("Qui... | dpesheva/QuizFactory | QuizFactory/QuizFactory.MVC/Properties/AssemblyInfo.cs | C# | mit | 1,361 |
package com.reason.ide.highlight;
import static com.intellij.openapi.editor.colors.TextAttributesKey.createTextAttributesKey;
import static com.intellij.psi.TokenType.BAD_CHARACTER;
import com.intellij.lexer.Lexer;
import com.intellij.openapi.editor.DefaultLanguageHighlighterColors;
import com.intellij.openapi.editor... | reasonml-editor/reasonml-idea-plugin | src/com/reason/ide/highlight/ORSyntaxHighlighter.java | Java | mit | 24,489 |
/**
* Babel plugin for removing specific properties that match a given regular expression.
*
*/
"use strict";
exports.default = function() {
return {
visitor: {
// ObjectProperty Visitor
ObjectProperty: function ObjectProperty(path, state) {
/**
... | bdupharm/babel-plugin-remove-object-properties | lib/plugin.js | JavaScript | mit | 998 |
using System;
using System.Reflection;
namespace AssemblyLoader
{
/// <summary>
/// Cross platform AssemblyLoader implementations
/// </summary>
public static class Loader
{
/// <summary>
/// Loads the assembly with a common object file format (COFF)-based image containing ... | rdavisau/loadassembly-for-pcl | AssemblyLoader/AssemblyLoader.Plugin/AssemblyLoader.cs | C# | mit | 1,294 |
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpClient\Response;
use Symfony\Component\HttpClient... | shieldo/symfony | src/Symfony/Component/HttpClient/Response/ResponseTrait.php | PHP | mit | 12,832 |
module Meta
module Filelib
def self.create_directory(name)
unless name.nil?
if File.directory?(name)
puts "directory already exists".yellow
else
FileUtils.mkdir_p(name)
puts "directory #{name} created".green
end
end
end
def self.crea... | stephenhu/meta | lib/meta/filelib.rb | Ruby | mit | 1,226 |