code stringlengths 3 1.05M | repo_name stringlengths 4 116 | path stringlengths 4 991 | language stringclasses 9
values | license stringclasses 15
values | size int32 3 1.05M |
|---|---|---|---|---|---|
using System;
using System.IO;
using System.Net;
namespace Dongle.System.IO.Ftp
{
public class FtpFileInfo
{
private readonly string _fileName;
private readonly NetworkCredential _networkCredential;
public FtpFileInfo(string fileName, NetworkCredential networkCredential)
{
... | webbers/dongle.net | src/Dongle/System/IO/Ftp/FtpFileInfo.cs | C# | mit | 3,281 |
// Chapter 19, exercise 03: template class Pair to hold pair of values of any
// type; use to implement symbol table like the one used in calculator (§7.8)
#include "../lib_files/std_lib_facilities.h"
// -----------------------------------------------------------------------------
template<class T, class U> struct P... | bewuethr/stroustrup_ppp | chapter19/chapter19_ex03.cpp | C++ | mit | 3,000 |
const Helpers = require('../../../../common/databaseHelpers.js');
const Assert = require('chai').assert;
module.exports = function() {
it('return default query part with no parameter', function() {
Assert.equal(Helpers.getOrderByQuery(), ' ORDER BY id ASC');
});
it('return correct query part with single ascendin... | waiterio/api | test/unit/common/databaseHelpers/testGetOrderByQuery.js | JavaScript | mit | 1,362 |
<?php
namespace App\Controllers\Api\Admin;
use Slim\Http\Request;
use Slim\Http\Response;
use App\Models\Node;
use App\Models\TrafficLog;
use App\Controllers\BaseController;
class NodeController extends BaseController
{
public function index(Request $req, Response $res, $args)
{
$pageNum = 1;
... | ma321c/SS-panel_V4 | app/Controllers/Api/Admin/NodeController.php | PHP | mit | 2,300 |
class RevisionsController < ApplicationController
before_filter :load_article
def new
@revision = @article.revisions.new
@revision.body = @article.current_revision.body
end
def create
@revision = @article.revisions.create(revision_params)
if @revision.persisted?
redirect_to article_path... | locriani/magmawiki | app/controllers/revisions_controller.rb | Ruby | mit | 574 |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v1/enums/asset_type.proto
package enums
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
)
// Reference imports to suppress errors if they are not oth... | pushbullet/engineer | vendor/google.golang.org/genproto/googleapis/ads/googleads/v1/enums/asset_type.pb.go | GO | mit | 5,428 |
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("05.... | PhilipYordanov/Software-University-CSharp-Fundamentals-track | CSharpAdvance/Stacks and Queues/05. Calculate Sequence with Queue/Properties/AssemblyInfo.cs | C# | mit | 1,437 |
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Xml.Linq;
using ApprovalTests.Reporters;
using Mono.Cecil;
using NUnit.Framework;
[TestFixture]
[UseReporter(typeof(VisualStudioReporter))]
public class PureDotNetAssembl... | distantcam/Costura | Tests/PureDotNetAssemblyTests.cs | C# | mit | 4,751 |
// -----------------------------------------------------------
// visualizer.js - main code for visualizing hands
// Created by Raquel Vélez
//
// 30 Dec 2011 - Reviewing code for submission. For future
// development: fix bugs, implement inverse kinematic model
// for single-point drag of each finger (more human-like
... | rwaldron/vektor | example/public/js/visualizer.js | JavaScript | mit | 52,295 |
(function () {
'use strict';
angular
.module('app')
.factory('config', config);
function config() {
return {
baseApiUrl: "http://localhost:3000/api"
// baseApiUrl: "https://nuflow.herokuapp.com/api"
};
}
})();
| Alberto19/nuflow-web | public/config/config.js | JavaScript | mit | 298 |
namespace WebBlocks.Types.DataContracts
{
public interface ISortable
{
int SortOrder { get; }
}
}
| dyatlov-a/WebBlocks | src/WebBlocks.Types/DataContracts/ISortable.cs | C# | mit | 121 |
#ifndef CALC_CPP
#define CALC_CPP
#include "../include/calc.hpp"
std::unordered_map<std::string, double> Calculator::constants;
int Calculator::get_prim(char*& expr) {
skip_spaces(expr);
bool is_negative = false;
switch (*expr) {
case '+': {
expr++;
break;
}
case '-': {
is_negative = true;
expr++;... | mtrempoltsev/msu_cpp_autumn_2017 | homework/Kulagin/03/src/calc.cpp | C++ | mit | 2,738 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('clients', '0010_auto_20151024_2343'),
]
operations = [
migrations.AddField(
model_name='client',
nam... | deafhhs/adapt | clients/migrations/0011_client_napis_id.py | Python | mit | 425 |
package com.zebdar.tom;
import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AbsListView;
import android.widget.AbsListView.OnScrollL... | cowthan/Ayo2022 | Ayo/app-talker/src/main/java/com/zebdar/tom/DropdownListView.java | Java | mit | 8,410 |
from django import forms
from django_filters.widgets import RangeWidget
class DropDownFilterWidget(forms.widgets.ChoiceWidget):
template_name = 'foirequest/widgets/dropdown_filter.html'
def __init__(self, *args, **kwargs):
self.get_url = kwargs.pop('get_url', None)
super().__init__(*args, **... | stefanw/froide | froide/foirequest/widgets.py | Python | mit | 1,895 |
package com.gulj.app.admin.config;
import com.gulj.entity.common.bo.JoinAnnotationBeanNameGenerator;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.P... | gulijian/joingu | gulj-app-admin-biz/src/main/java/com/gulj/app/admin/config/AdminBizConfig.java | Java | mit | 952 |
<?php
namespace Kernel\Snmp;
use Kernel\Interfaces\OltInterface;
/**
* @ This class work with only zte olt
* @author Xeleniumz Fx
* @version 1.1
* @date 2/3/2017
* */
class Olt implements OltInterface
{
private $olt_name = '1.3.6.1.2.1.1.5.0';
private $snmp_get_octet = '1.3.6.1.2.1.2.2.1.1';
private $gpon_nam... | xeleniumz/zte-libraries-php | Kernel/Snmp/Olt.php | PHP | mit | 1,896 |
from ..operations import Operations
from .migration import MigrationContext
from .. import util
class EnvironmentContext(util.ModuleClsProxy):
"""A configurational facade made available in an ``env.py`` script.
The :class:`.EnvironmentContext` acts as a *facade* to the more
nuts-and-bolts objects of :cl... | graingert/alembic | alembic/runtime/environment.py | Python | mit | 35,396 |
<?php
echo "This feature is under construction";
?> | mjcurry/LinkStor | directory.php | PHP | mit | 53 |
using Leak.Common;
namespace Leak.Listener
{
public class PeerListenerHandshake
{
private readonly Handshake handshake;
public PeerListenerHandshake(Handshake handshake)
{
this.handshake = handshake;
}
public bool HasExtensions
{
get { ... | amacal/leak | sources/Leak.Listener/PeerListenerHandshake.cs | C# | mit | 402 |
RSpec.describe CharactersController do
include ActiveJob::TestHelper
describe "GET index" do
let(:user) { create(:user) }
it "requires login without an id" do
get :index
expect(response).to redirect_to(root_url)
expect(flash[:error]).to eq("You must be logged in to view that page.")
... | Marri/glowfic | spec/controllers/characters_controller_spec.rb | Ruby | mit | 56,627 |
<?php get_template_part('templates/page', 'header'); ?>
<?php if (!have_posts()) : ?>
<div data-alert class="alert-box warning">
<?php _e('Sorry, no results were found.', 'roots'); ?>
</div>
<?php get_search_form(); ?>
<?php endif; ?>
<?php while (have_posts()) : the_post(); ?>
<?php get_template_part('te... | atanasiuswau/furai | index.php | PHP | mit | 706 |
Package.describe({
summary: "Stanford Javascript Crypto Library with public key cryptography support"
});
Package.on_use(function (api, where) {
api.export('sjcl', 'client');
api.add_files('sjcl.js', 'client', {
bare: true
});
});
| lencinhaus/ubersafe | app/packages/sjcl/package.js | JavaScript | mit | 254 |
<?php
namespace Crocos\SecurityBundle\Security\AuthLogic;
/**
* AuthLogicInterface.
*
* @author Katsuhiro Ogawa <ogawa@crocos.co.jp>
*/
interface AuthLogicInterface
{
/**
* Set authentication domain.
*/
public function setDomain($domain);
/**
* Log in.
*
* @param user $user
... | crocos/CrocosSecurityBundle | Security/AuthLogic/AuthLogicInterface.php | PHP | mit | 632 |
module WeMeet
class ActivityCategory
attr_accessor :name
def initialize(name)
@name = name.capitalize
end
def similar_to?(other)
return (@name.downcase.include? other.downcase or other.downcase.include? @name.downcase)
end
def ==(other)
return @name.downcase == other.name.downcase
end
end
en... | dcaba/wemeet | lib/we_meet/activity_category.rb | Ruby | mit | 322 |
module Tod
module TasksRepository
class InMemory
def initialize
@tasks = {}
@id = 0
end
def persist(task)
@id += 1
task.id = @id
tasks[@id] = task
task
end
def count
tasks.length
end
private
attr_reader :ta... | bezelga/tod | lib/tod/tasks_repository/in_memory.rb | Ruby | mit | 342 |
<?php
/* TwigBundle:Exception:trace.txt.twig */
class __TwigTemplate_9059c36d2d4ecdaa941ebef449cf6897e5465f46e03b305a1a47f53905e11533 extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = array(
... | Oukhay/smjetsetmag | app/cache/dev/twig/90/59/c36d2d4ecdaa941ebef449cf6897e5465f46e03b305a1a47f53905e11533.php | PHP | mit | 3,171 |
var expect = require('chai').expect;
var _ = require('lodash');
var ReadlineStub = require('../../helpers/readline');
var fixtures = require('../../helpers/fixtures');
var Expand = require('../../../lib/prompts/expand');
describe('`expand` prompt', function () {
beforeEach(function () {
this.fixture = _.clone(f... | senshuu/Inquirer.js | test/specs/prompts/expand.js | JavaScript | mit | 3,372 |
var engine = require("../../engine").engine;
var task;
var factories = require("../spec_helper").component_factories;
describe("error scenarios", function(){
beforeEach(function(){
waits(500);
runs(function(){
this.identifier = "error" + Math.floor(Math.random() * 100000);
this.intake = factori... | rehanift/engine.js | spec/end-to-end/errors_spec.js | JavaScript | mit | 4,732 |
/* Copyright 1986, 1989, 1990 by Abacus Research and
* Development, Inc. All rights reserved.
*/
#if !defined (OMIT_RCSID_STRINGS)
char ROMlib_rcsid_qRegular[] =
"$Id: qRegular.c 63 2004-12-24 18:19:43Z ctm $";
#endif
/* Forward declarations in QuickDraw.h (DO NOT DELETE THIS LINE) */
#include "rsys/common.h... | MaddTheSane/executor | src/qRegular.cpp | C++ | mit | 4,494 |
using System;
using System.Windows.Forms;
using System.Text.RegularExpressions;
namespace LentilToolbox
{
//-------------------派生文本框类----------------------
//修改后不会影响dB和dd的参数
public class TextBoxInt: TextBox
{
public TextBoxInt()
{
}
private int value = 0;
publi... | Lentil1016/LTB | v1.1/LentilToolbox/TextBox.cs | C# | mit | 2,271 |
/**
* Copyright 2013 Facebook, 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 ... | M3kH/tire-bouchon | node_modules/grunt-react/node_modules/react-tools/build/modules/ReactInputSelection.js | JavaScript | mit | 4,502 |
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
import frappe
def get_parent_doc(doc):
"""Returns document of `reference_doctype`, `reference_doctype`"""
if not hasattr(doc, "parent_doc"):
if doc.reference_doctype and doc.reference_name:
doc.parent_doc = fra... | mhbu50/frappe | frappe/core/utils.py | Python | mit | 2,081 |
/*
Problem 1. Say Hello
Write a method that asks the user for his name and prints “Hello, <name>”
Write a program to test this method.
Example:
input output
Peter Hello, Peter!
*/
using System;
class SayHello
{
static void PrintHello(string name)
{
Console.WriteLine("Hello, {0}!", name);
... | AdrianApostolov/TelerikAcademy | Homeworks/C#2/MethodsHomework/01.SayHello/SayHello.cs | C# | mit | 497 |
// Copied from the lunr.js test suite
var stemmingFixture = { "läufer": "lauf" };
test('should stem words correctly', function () {
Object.keys(stemmingFixture).forEach(function (testWord) {
var expected = stemmingFixture[testWord];
equal(lunr.de.stemmer(testWord), expected);
});
});
test('should be reg... | severinh/lunr.de.js | test/stemmer_test.js | JavaScript | mit | 492 |
import React from 'react';
import { render, fireEvent } from '@testing-library/react';
import { getComponentTestId } from 'utils/test-utils';
import { head } from 'ramda';
import Modal from 'react-modal';
import * as nodeValidation from 'validations/node';
import * as eventUtils from 'utils/event';
import EditNodeCptMo... | fhelwanger/bayesjs-editor | src/components/EditNodeCptModal/index.test.js | JavaScript | mit | 7,502 |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="nb" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About TheoremCoin</source>
<translation>Om TheoremCoin</translation>
</message>
<message>
<lo... | TheoremCrypto/TheoremCoin | src/qt/locale/bitcoin_nb.ts | TypeScript | mit | 120,368 |
<?php
namespace minipipo1\BlogBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilder;
class CommentType extends AbstractType
{
/**
* @var \minipipo1\UserBundle\Entity\User $current_user
*/
private $current_user;
public function __construct(\min... | ilancoulon/familyWeb | src/minipipo1/BlogBundle/Form/CommentType.php | PHP | mit | 1,893 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Lidgren.Network;
using ClientServerExtension;
using System.ComponentModel;
namespace Troma
{
public class GameClient
{
#region Constants
private const string APP_NAME = "... | dethi/troma | src/Game/Troma/Troma/Game/GameClient.cs | C# | mit | 11,170 |
<?php
abstract class Controller {
public $view;
public $input;
private $_uri;
private $_errors;
private $_success;
private $_renderView;
private $_name;
const VALIDATION_NUMBER = 1;
const VALIDATION_ALPHANUM = 2;
public function __construct() {
$this->view = new stdClass();
$this->input = new stdC... | bryhardt/grcpool | classes/core/Controller.php | PHP | mit | 3,916 |
/*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React, { Component } from 'react/addons'; // eslint-disable-line no-unused-vars
import EventEmitter from 'eventemitter3';
import { canUseDOM } from '../../node_modules/react/lib/ExecutionEnvironment';
let EE;
let viewport = {width: 1366, ... | tonikarttunen/tonikarttunen-com | src/decorators/withViewport.js | JavaScript | mit | 1,757 |
module Nodectl
VERSION = "0.2.5.dev"
end
| sybis/nodectl | lib/nodectl/version.rb | Ruby | mit | 43 |
#include <iostream>
#include <iomanip>
#include <stdlib.h>
using namespace std;
void c_to_f(void);
void f_to_c(void);
int main(void)
{
int choice;
char again;
do
{
system("CLS");
cout<<setw(10)<<" "<< "What conversion would you like to make?\n";// menu
cout<<setw(20)<<" "<< "1. Celsius to Fahrenhei\n\n";
/... | wshca/Modelling_ClimateChange_Forest_CPP | converter.cpp | C++ | mit | 1,540 |
import React from 'react';
import Utils from '../utils/utils';
import Mixins from '../utils/mixins';
import __reactComponentSlots from '../runtime-helpers/react-component-slots.js';
import __reactComponentSetProps from '../runtime-helpers/react-component-set-props.js';
class F7AccordionContent extends React.Component ... | AdrianV/Framework7 | packages/react/components/accordion-content.js | JavaScript | mit | 1,003 |
# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-08-16 21:29
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependen... | nivbend/memoir | quotes/migrations/0002_mentions.py | Python | mit | 885 |
<?php
namespace Biz\File\Service\Impl;
use Biz\BaseService;
use Biz\File\Dao\UploadFileDao;
use Biz\File\Service\FileImplementor;
use AppBundle\Common\FileToolkit;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Biz\User\Service\UserService;
class LocalFileImplementorImpl extends BaseService implements F... | richtermark/SMEAGOnline | src/Biz/File/Service/Impl/LocalFileImplementorImpl.php | PHP | mit | 8,475 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
'''
File name: myWirelessRouter.py
Author: xu42 <https://github.com/xu42>
Date created: 04/04/2016
Python Version: 3.5
监测某台无线设备是否接入路由器, 同时猜解当前任务
适用于 Mercury MW310R 型号的无线路由器
'''
import http.client
import base64
import re
import time
# 配置参数
# url: 路由器后台登陆地址
# port... | xu42/Python | myWirelessRouter/myWirelessRouter.py | Python | mit | 2,628 |
<?php
namespace Orchestra\Foundation\Http\Controllers;
use Illuminate\Http\Request;
use Orchestra\Contracts\Foundation\Listener\Account\UserCreator;
use Orchestra\Contracts\Foundation\Listener\Account\UserRemover;
use Orchestra\Contracts\Foundation\Listener\Account\UserUpdater;
use Orchestra\Contracts\Foundation\List... | orchestral/foundation | src/Http/Controllers/UsersController.php | PHP | mit | 7,310 |
require 'cgi'
require 'net/http'
require 'uri'
require 'yaml'
module HtmlMockup
class W3CValidator
ValidationUri = "http://validator.w3.org/check"
class RequestError < StandardError; end
attr_reader :valid,:response,:errors,:warnings,:status
class << self
def validation_uri
... | DigitPaint/html_mockup | lib/html_mockup/w3c_validator.rb | Ruby | mit | 3,595 |
from django.urls import path
from . import views
urlpatterns = [
path('overview/', views.overview, name='overview'),
]
| mrts/foodbank-campaign | src/locations/urls.py | Python | mit | 125 |
<?php
namespace App\Http\Controllers\Asset;
use App\Http\Controllers\Controller as BaseController;
use App\Http\Requests\Asset\ManualRequest;
use App\Http\Requests\AttachmentUpdateRequest;
use App\Repositories\Asset\ManualRepository;
use App\Repositories\Asset\Repository as AssetRepository;
class ManualController ex... | stevebauman/maintenance | app/Http/Controllers/Asset/ManualController.php | PHP | mit | 5,254 |
using System;
using System.Web.Http;
using System.Web.Http.Tracing;
namespace WebConfigTransformations
{
// TODO: To enable tracing in your application, please add the following line of code
// to your startup code (WebApiConfig.cs or Global.asax.cs in an MVC 4 project):
// TraceConfig.Register(config... | MicrosoftLearning/20487-DevelopingWindowsAzureAndWebServices | Allfiles/20487C/Mod08/DemoFiles/WebConfigTransformations/end/WebConfigTransformations/App_Start/TraceConfig.cs | C# | mit | 1,429 |
#include "askpassphrasedialog.h"
#include "ui_askpassphrasedialog.h"
#include "guiconstants.h"
#include "walletmodel.h"
#include <QMessageBox>
#include <QPushButton>
#include <QKeyEvent>
AskPassphraseDialog::AskPassphraseDialog(Mode mode, QWidget *parent) :
QDialog(parent),
ui(new Ui::AskPassphraseDialog),
... | topcoin/topcoin | src/qt/askpassphrasedialog.cpp | C++ | mit | 8,937 |
import React, { createElement, forwardRef, useRef, useState } from 'react';
import { decorate, observable } from 'mobx';
import { observer, useObserver } from 'mobx-react';
import 'mobx-react-lite/batchingForReactDom';
class Todo {
constructor() {
this.id = Math.random();
this.title = 'initial';
this.finished =... | developit/preact | demo/mobx.js | JavaScript | mit | 1,434 |
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePersonsReferencesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('perso... | Vabrins/CadernetaDoIdoso | database/migrations/2017_08_23_025525_create_persons_references_table.php | PHP | mit | 1,549 |
// Test logging in
casper.test.comment('Test logging in');
casper.start('http://localhost:3000/', function() {
this.clickLabel('Login', 'a');
this.then(function() {
this.test.assertExists('form', 'login form exists');
this.test.assertUrlMatch('http://localhost:3000/auth/login');
this.... | ShaneKilkelly/YesodExample | casper/loginTest.js | JavaScript | mit | 916 |
<?php
function shorten($url, $qr=NULL){
if(function_exists('curl_init')){
$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, 'http://goo.gl/api/shorten');
curl_setopt($ch, CURLOPT_POST, TRUE);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'security_token=null&url='.urlencode($url));
$r... | voidabhi/reddy | ShortUrl.php | PHP | mit | 942 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Jam;
using MySql.Data.MySqlClient;
using System.Web.UI.HtmlControls;
public partial class Track : JamPage
{
public Track()
{
m_Code = 22;
}
private ... | hardsky/music-head | web/Track.aspx.cs | C# | mit | 6,295 |
<?php
/*
* This file is part of the symfony package.
* (c) Fabien Potencier <fabien.potencier@symfony-project.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Propel filter form generator.
*
* This class generates a P... | jenkins-khan/Jenkins-Khan | plugins/sfPropelORMPlugin/lib/generator/sfPropelFormFilterGenerator.class.php | PHP | mit | 10,039 |
// Initialize your app
var myApp = new Framework7({
cache: false,
});
// Export selectors engine
var $$ = Dom7;
// Add views
var leftView = myApp.addView('.view-left', {
// Because we use fixed-through navbar we can enable dynamic navbar
dynamicNavbar: true
,ignoreCache : true
});
var mainView = myApp... | tobya/wageminder | clockin/js/my-app.js | JavaScript | mit | 5,892 |
<?php
namespace Tests\QueryBuilder\PostgreSQL;
use Furry\Database;
trait Table
{
/**
* @dataProvider tableNameProvider
*
* @param $tableName
* @param $expected
*/
public function testTable($tableName, $expected)
{
/** @var Database $db */
$db = $this->db;
... | gpawru/furry-framework-database | Tests/QueryBuilder/PostgreSQL/Table.php | PHP | mit | 861 |
# frozen_string_literal: true
require "test_helper"
describe Committee::Drivers::OpenAPI2::ParameterSchemaBuilder do
before do
end
it "reflects a basic type into a schema" do
data = {
"parameters" => [
{
"name" => "limit",
"type" => "integer",
}
]
}
s... | interagent/committee | test/drivers/open_api_2/parameter_schema_builder_test.rb | Ruby | mit | 5,146 |
from schedulerEdge import SchedulerEdge
import time
if __name__ == '__main__':
#scheduler = BackgroundScheduler()
#scheduler.add_job(tick, 'cron', second = '5,10',minute = '40' , id = "12")
#scheduler.start()
#while True:
# time.sleep(1)
test_sched = SchedulerEdge()
#test_sched.add_job(3... | hubertokf/lupsEdgeServer | projects/old_files/moduleOfRules/testesched.py | Python | mit | 613 |
define(["app/helpers"], function(helpers) {
return ["$http", function($http) {
// This is a constructor function for the singleton SnippetLoader service. It will be called exactly once by the AngularJS Dependecy Injector.
this.loadContentTemplate = function(contentType) {
return new Promise(function(resol... | ucam-cl-dtg/scooter | app/js/app/services/SnippetLoader.js | JavaScript | mit | 1,288 |
import os.path
import sqlite3
from config import CONFIG
def init_db():
"""初始化数据库"""
f = os.path.exists(CONFIG['DB_FILE'])
if f:
print("数据库文件存在...")
with open(CONFIG['SQL_SCRIPT_FILE'], 'r', encoding='utf8') as f:
file_content = f.read()
con = sqlite3.connect(CONFIG['DB_FILE'])
... | zzir/white | init_db.py | Python | mit | 493 |
using UnityEngine;
using System.Collections;
public class SpeedSynchro : MonoBehaviour {
private VelocityFPC vfpc;
private RelativisticObject obj;
// Use this for initialization
void Start () {
vfpc = this.GetComponent<VelocityFPC>();
obj = this.GetComponent<RelativisticObject>();
}
// Update is called... | stonneau/Celerity | Sources/Assets/OpenRelativity/SpeedSynchro.cs | C# | mit | 385 |
class CreateSubscribers < ActiveRecord::Migration
def self.up
create_table :subscribers do |t|
t.string :name
t.string :email
t.timestamps
end
end
def self.down
drop_table :subscribers
end
end
| beef/Subscribers | generators/subscribers_migration/templates/migration.rb | Ruby | mit | 237 |
/*
* Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved.
*
* 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 ri... | alicoding/nimble | src/language/CSSUtils.js | JavaScript | mit | 60,267 |
(function(){
"use strict";
angular.module('app.controllers').controller('HomeCtrl', function(){
//
});
})();
| apps-libX/myapp | angular/app/app/home/home.js | JavaScript | mit | 131 |
// ***********************************************************************
// Assembly : ACBr.Net.NFSe
// Author : RFTD
// Created : 05-19-2016
//
// Last Modified By : RFTD
// Last Modified On : 05-19-2016
// ***********************************************************************
// <copyrig... | rafd75/ACBr.Net.NFSe | src/ACBr.Net.NFSe.Shared/Nota/TipoRps.cs | C# | mit | 1,736 |
#include "worker.h"
#include "sharedbuffer.h"
#include "nan.h"
#include "util.h"
using namespace v8;
static Persistent<ObjectTemplate> worker_template;
static Persistent<String> id_symbol;
NAN_METHOD(Eval) {
NanScope();
NanReturnUndefined();
}
Worker::Worker() {
m_error = 0;
}
Worker::~Worker() {
}
//stati... | yejingfu/multithread | src/worker.cc | C++ | mit | 4,222 |
// stdafx.cpp : source file that includes just the standard includes
// Pookie.DayTime.Client.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file
| jleo2255/c_challenges | Pookie.DayTime.Client/Pookie.DayTime.Client/stdafx.cpp | C++ | mit | 300 |
/* -----------------------------------------------------------------------------------------------------------
Software License for The Fraunhofer FDK AAC Codec Library for Android
© Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
All rights reserved.
1. INTRODUCTION... | alesaccoia/asutilities | thirdparty/fdk-aac/libAACdec/src/block.cpp | C++ | mit | 26,810 |
#!/usr/bin/env python
#
# Copyright (c) 2001 - 2016 The SCons Foundation
#
# 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 rights to us... | EmanueleCannizzaro/scons | test/scons-time/mem/stage.py | Python | mit | 2,679 |
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("2.... | Ico093/TelerikAcademy | C#1/Homework/6.Loops/6.Loops/2.NotDevisableBy3And7/Properties/AssemblyInfo.cs | C# | mit | 1,418 |
using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Microsoft.Diagnostics.Runtime.Utilities;
using System.IO;
using System.Diagnostics;
using System.Linq;
using System.Runtime.InteropServices;
using Microsoft.CSharp;
using System.CodeDom.Compiler;
using System.Collections.Generic;
using Microsoft.... | JeffCyr/clrmd | src/Microsoft.Diagnostics.Runtime.Tests/Helpers.cs | C# | mit | 3,242 |
(function() {
packages = {
// Lazily construct the package hierarchy from class names.
root: function(classes) {
var map = {};
function find(name, data) {
var node = map[name], i;
if (!node) {
node = map[name] = data || {name: name, children: []};
if (name.length) {
node.parent = fi... | gxm/soccer-visuals | web/js-lib/packages.js | JavaScript | mit | 1,109 |
require 'spec_helper'
describe Neoid::Relationship do
let(:user) { User.create!(name: "Elad Ossadon", slug: "elado") }
let(:movie) { Movie.create!(name: "Memento", slug: "memento-1999", year: 1999) }
it "should call neo_save after relationship model creation" do
Like.any_instance.should_receive(:neo_save)... | glsignal/neoid | spec/neoid/relationship_spec.rb | Ruby | mit | 2,983 |
'use strict';
exports.__esModule = true;
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _propTypes = r... | aggiedefenders/aggiedefenders.github.io | node_modules/react-big-calendar/lib/EventRow.js | JavaScript | mit | 2,891 |
module.exports = function brify (text) {
return text.replace(/\n/g, '<br/>');
}; | intesso/brify | index.js | JavaScript | mit | 82 |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<g><path d="M20 5H4c-1.1 0-1.99.9-1.99 2L2 17c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm-9 3h2v2h-2V8zm0 3h2v2h-2v-2zM8 8h2v2H8V8zm0 3h2v2H8v-2zm-1 2H5v-2h2v2zm0-3H5V8h2v2zm9 7H8v-2h8v2zm0-4h-2v-2h2v2z... | cherniavskii/material-ui | packages/material-ui-icons/src/Keyboard.js | JavaScript | mit | 387 |
import sys
import os
import os.path
from jinja2 import Template
from configparser import ConfigParser
import io
if __name__ == "__main__":
if len(sys.argv) != 3:
print("Usage: <program> <deploy_cfg_template_file> <file_with_properties>")
print("Properties from <file_with_properties> will be applied... | briehl/narrative-test | scripts/prepare_deploy_cfg.py | Python | mit | 2,057 |
#include "variant/pwm_platform.hpp"
#include "hal.h"
static const PWMConfig MOTOR_PWM_CONFIG {
500000, // 500 kHz PWM clock frequency.
1000, // PWM period 2.0 ms.
NULL, // No callback.
{
{PWM_OUTPUT_ACTIVE_HIGH, NULL},
{PWM_OUTPUT_ACTIVE_HIGH, NULL},
{PWM_OUTPUT_ACTIVE_HIGH, NULL},
... | OSURoboticsClub/aerial_control | variants/platforms/stm32f4discovery/pwm_platform.cpp | C++ | mit | 844 |
require 'yaml'
$messages = YAML.load_file(File.dirname(__FILE__) + '/messages.yml')
$language = 'en'
public
##
# Translate the given key with the default language
# @param [Symbol|String] key the key
# @return the translated text
def translate(key)
$messages[$language][key.to_s]
end
##
# Set the language to be us... | thomsmits/markdown-tools | mdc/lib/messages.rb | Ruby | mit | 417 |
<?php
namespace Application\Migrations;
use Doctrine\DBAL\Migrations\AbstractMigration;
use Doctrine\DBAL\Schema\Schema;
/**
* Auto-generated Migration: Please modify to your needs!
*/
class Version20170318145737 extends AbstractMigration
{
/**
* @param Schema $schema
*/
public function up(Schema... | spopovic14/cedeum_final | app/DoctrineMigrations/Version20170318145737.php | PHP | mit | 1,122 |
var MongoClient = require('mongodb').MongoClient;
/**
* Count the number of talks in the database
*
* @param {string} dburl Database url string.
* @param {function} callback Callback function to execute with results.
*/
function count(dburl, callback) {
'use strict';
MongoClient.connect(dburl, functi... | tlksio/libtlks | lib/talk.js | JavaScript | mit | 19,184 |
# frozen_string_literal: true
class ConvertExternalServiceReceiverData < ActiveRecord::Migration[4.2]
def up
ExternalServiceReceiver.find_each do |receiver|
show_url = receiver.response_data
new_data = { show_url: show_url, edit_url: "#{show_url}/take" }
receiver.update_attribute :response_dat... | tablexi/nucore-open | db/migrate/20140320184445_convert_external_service_receiver_data.rb | Ruby | mit | 570 |
#include "unitinventoryhandler.h"
/*!
* @author kovlev
*/
bool UnitInventoryHandler::matches(UnitType unitType, ItemType itemType) {
switch (unitType) {
case UnitType::FIGHTER:
return (itemType == ItemType::MELEE ||
itemType == ItemType::SHIELD ||
itemType == ItemType::ARMOR ||
itemType == ItemTyp... | kovleventer/FoD | src/player/unitinventoryhandler.cpp | C++ | mit | 1,049 |
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System;
using System.Linq;
using osu.Framework.Caching;
using osu.Framework.Configuration;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Cont... | Damnae/osu | osu.Game/Rulesets/Timing/ScrollingContainer.cs | C# | mit | 3,838 |
# frozen_string_literal: true
module RuboCop
module Cop
module Layout
# Here we check if the elements of a multi-line array literal are
# aligned.
class AlignArray < Cop
include AutocorrectAlignment
MSG = 'Align the elements of an array literal if they span more ' \
... | mclark/rubocop | lib/rubocop/cop/layout/align_array.rb | Ruby | mit | 456 |
/*
* Copyright (c) 2002-2010 "Neo Technology,"
* Network Engine for Objects in Lund AB [http://neotechnology.com]
*
* This file is part of Neo4j.
*
* Neo4j is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Softwa... | alexmsmartins/GraphDHT | neo4j/kernel-1.0/src/main/java/org/neo4j/graphdb/PropertyContainer.java | Java | mit | 6,071 |
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("Pr... | fr0wsTyl/TelerikAcademy-2015 | Telerik - C# 1/HOMEWORK - loops/Problem 8. Catalan Numbers/Properties/AssemblyInfo.cs | C# | mit | 1,428 |
# -*- coding: utf-8 -*-
"""Objects representing WikidataQuery query syntax and API."""
#
# (C) Pywikibot team, 2013
#
# Distributed under the terms of the MIT license.
from __future__ import unicode_literals
import json
import sys
if sys.version_info[0] > 2:
from urllib.parse import quote
basestring = (str, )... | hperala/kontuwikibot | pywikibot/data/wikidataquery.py | Python | mit | 16,312 |
#include "FileStream.hpp"
#include <cstring>
namespace warped {
//////////////////////////////// Constructors ///////////////////////////////////////////}
FileStream::FileStream(const std::string& filename, std::ios_base::openmode mode) {
fstream_.open(filename, mode);
}
FileStream::FileStream (FileStream&& x)... | wilseypa/warped2 | src/FileStream.cpp | C++ | mit | 6,479 |
<div class="alert alert-danger">
<?php echo $errorName; ?>
</div> | Mcfloy/Intranet | views/global/error.php | PHP | mit | 66 |
//= require "prism.js"
//= require "jquery/dist/jquery.min.js"
//= require "ga.js"
| nakanishy/blog.nakanishy.com | source/javascripts/all.js | JavaScript | mit | 83 |
#include "transactionview.h"
#include "transactionfilterproxy.h"
#include "transactionrecord.h"
#include "walletmodel.h"
#include "addresstablemodel.h"
#include "transactiontablemodel.h"
#include "bitcoinunits.h"
#include "csvmodelwriter.h"
#include "transactiondescdialog.h"
#include "editaddressdialog.h"
#include "op... | techcoincommunity/firecoin | src/qt/transactionview.cpp | C++ | mit | 15,306 |
<?php
/**
* User: Dre
* Date: 27-1-2016
* Time: 11:55
*/
namespace CF\DataStruct\Join;
abstract class DataStructJoin {
const TYPE_OBJECT = 'object';
const TYPE_EXTENSION = 'extension';
const ORDER_ONE_TO_MANY = 'oneToMany';
const ORDER_ONE_TO_ONE = 'oneToOne';
const STRUCTURE_INNER = 'inn... | ConscriboOS/CF | src/DataStruct/Join/DataStructJoin.php | PHP | mit | 1,690 |
/*
Written by John MacCallum, The Center for New Music and Audio Technologies,
University of California, Berkeley. Copyright (c) 2009, The Regents of
the University of California (Regents).
Permission to use, copy, modify, distribute, and distribute modified versions
of this software and its documentation without... | MugenSAS/osc-cpp-qt | osc/OscPatternMatching.cpp | C++ | mit | 7,646 |
<?php
namespace SportChecked\ContactBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
/**
* This is the class that validates and merges configuration from your app/config files
*
* To learn more see {@link http:... | leoestela/sportchecked | src/SportChecked/ContactBundle/DependencyInjection/Configuration.php | PHP | mit | 882 |