repo_name stringlengths 4 116 | path stringlengths 4 379 | size stringlengths 1 7 | content stringlengths 3 1.05M | license stringclasses 15
values |
|---|---|---|---|---|
talosdigital/TDJobs | db/migrate/20150710204352_create_invitations.rb | 173 | class CreateInvitations < ActiveRecord::Migration
def change
create_table :invitations do |t|
t.string :status
t.timestamps null: false
end
end
end
| mit |
TheDreamSanctuary/DreamPlus | main/java/com/thedreamsanctuary/main/java/dreamplus/commands/DreamTrailCommand.java | 2060 | package com.thedreamsanctuary.main.java.dreamplus.commands;
import com.thedreamsanctuary.main.java.dreamplus.DreamPlus;
import com.thedreamsanctuary.main.java.dreamplus.listener.DPListener;
import static com.thedreamsanctuary.main.java.dreamplus.listener.DPListener.trails;
import java.util.regex.Pattern;
import org.bu... | mit |
malteclasen/AutomatedTestDemo | AutomatedTestDemo.Tests/NunitTest.cs | 297 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NUnit.Framework;
namespace AutomatedTestDemo.Tests
{
[TestFixture]
public class NunitTest
{
[Test]
public void OneEqualsOne()
{
Assert.AreEqual(1,1);
}
}
}
| mit |
rcarmo/pngcanvas | setuputils.py | 466 | import codecs
import os.path
import re
def read(*parts):
file_path = os.path.join(os.path.dirname(__file__), *parts)
return codecs.open(file_path, 'r').read()
def find_version(*parts):
version_file = read(*parts)
version_match = re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]',
... | mit |
z1c0/HUGO | public/colors.js | 3608 | 'use strict';
const colors = [
'#993366',
'#CC6699',
'#FF99CC',
'#FF0099',
'#990066',
'#CC3399',
'#FF66CC',
'#CC0099',
'#FF33CC',
'#FF00CC',
'#FF00FF',
'#CC00CC',
'#FF33FF',
'#990099',
'#CC33CC',
'#FF66FF',
'#660066',
'#993399',
'#CC66CC',
'#FF99FF',
'#330033',
'#663366',
... | mit |
thatguystone/paratec | src/opts_test.cpp | 1909 | /**
* @author Andrew Stone <a@stoney.io>
* @copyright 2014 Andrew Stone
*
* This file is part of paratec and is released under the MIT License:
* http://opensource.org/licenses/MIT
*/
#include <limits>
#include <stdlib.h>
#include "opts.hpp"
#include "util_test.hpp"
namespace pt
{
static struct {
std::vector<... | mit |
xs-embedded-llc/l2dbus | test/utils/traverse.lua | 4608 | -------------------------------------------------------------------------------
-- This module implements a function that traverses all live objects.
-- You can implement your own function to pass as a parameter of traverse
-- and give you the information you want. As an example we have implemented
-- countreferences a... | mit |
operator1/op1 | op1/src/main/java/com/op1/iff/IffReader.java | 2772 | package com.op1.iff;
import com.op1.iff.types.*;
import java.io.Closeable;
import java.io.DataInputStream;
import java.io.EOFException;
import java.io.IOException;
public class IffReader implements Closeable {
private final DataInputStream dataInputStream;
public IffReader(DataInputStream dataInputStream) ... | mit |
aanaedu/clementinejs-mod | app/routes/index.js | 3347 | 'use strict';
var path = process.cwd();
var userController = require(path + '/app/controllers/userController.server.js');
var User = require(path + '/app/models/users.js');
module.exports = function (app, passport) {
var userCtrl = new userController();
function isLoggedIn (req, res, next) {
if (req.isAuthentic... | mit |
elifesciences/builder | src/buildercore/cloudformation.py | 12323 | """module concerns itself with the creation, updating and deleting of Cloudformation template instances.
see `trop.py` for the *generation* of Cloudformation templates."""
from collections import namedtuple
from contextlib import contextmanager
import logging
import json
import os
from pprint import pformat
from func... | mit |
alpsayin/radiotftp | doc/html/search/all_69.js | 2731 | var searchData=
[
['idle_5fflag',['idle_flag',['../radiotftp_8c.html#a02fecce62db76d446cceec8d87e330f9',1,'radiotftp.c']]],
['info',['info',['../structdev.html#a17b6b9e15213b3ba2719406193446c8a',1,'dev']]],
['initfcs',['INITFCS',['../ax25_8c.html#a60045958d81758eaafdc718a7d34e848',1,'ax25.c']]],
['io',['io',['.... | mit |
andrewgremlich/presence-keeper | pk_static_files_server/app/js/util/DataControl.js | 369 |
class DataControl {
constructor() {
this.appData
updateData()
}
updateData() {
this.appData = fetcherama()
}
fetcherama() {
lib.fetch(`http://localhost:8080/api/class/getNearbyClasses/${coor.long}/${coor.lat}`, opt, data => {
if (data.success === true) {
return data.classes
... | mit |
marvinpinto/charlesbot-rundeck | tests/test_lock_unlock_rundeck_job.py | 2258 | import asynctest
from asynctest.mock import patch
from asynctest.mock import call
from charlesbot_rundeck.rundeck_job import RundeckJob
class TestLockUnlockRundeckJob(asynctest.TestCase):
def setUp(self):
patcher1 = patch('charlesbot_rundeck.rundeck_lock.RundeckLock.seed_job_list') # NOQA
self.a... | mit |
eliezedeck/goweb | validation/schemas.go | 1391 | package validation
import (
"fmt"
"log"
"strings"
"github.com/xeipuuv/gojsonschema"
)
var schemaCache map[string]*gojsonschema.Schema
func init() {
schemaCache = make(map[string]*gojsonschema.Schema)
}
// LoadSchema loads a JSON Schema file from `path` and assigns it to the `schemaid`.
// Note that any error ... | mit |
madgik/exareme | Exareme-Docker/files/root/exareme/convert-csv-dataset-to-db.py | 13753 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
"""
This script creates multiple dbs for each pathology folder containing a dataset csv file and a metadata json file.
"""
import csv
import json
import os
import sqlite3
from argparse import ArgumentParser
MAX_ROWS_TO_INSERT_INTO_SQL = 100
# This metadata... | mit |
lyuboasenov/scheduler | packages/AForge.NET Framework-2.2.5/Tools/DebuggerVisualizers/ImageView.cs | 4484 | // AForge debugging visualizers
// AForge.NET framework
// http://www.aforgenet.com/framework/
//
// Copyright © AForge.NET, 2011
// contacts@aforgenet.com
//
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging... | mit |
keripix/laravel42x | src/Illuminate/Foundation/Testing/Client.php | 1076 | <?php namespace Illuminate\Foundation\Testing;
use Illuminate\Foundation\Application;
use Symfony\Component\HttpKernel\HttpKernelBrowser;
use Symfony\Component\BrowserKit\Request as DomRequest;
class Client extends HttpKernelBrowser {
/**
* Convert a BrowserKit request into a Illuminate request.
*
* @param \... | mit |
cartridge/cartridge-module-util | index.js | 12600 | 'use strict';
var CONFIG_FILE = '/.cartridgerc';
var MATCH_REGEX = /(\[\/\/\]: <> \(Modules start\)\s)([^[]*)(\[\/\/\]: <> \(Modules end\)\s)/g;
var EXIT_OK = 0;
var EXIT_FAIL = 1;
var path = require('path');
var chalk = require('chalk');
var template = require('lodash/template');
var Promise = req... | mit |
Vizzuality/undp_cabo_verde | vendor/assets/javascripts/LeafletTextPath/leaflet.textpath.js | 6282 | /*
* Inspired by Tom Mac Wright article :
* http://mapbox.com/osmdev/2012/11/20/getting-serious-about-svg/
*/
(function () {
var __onAdd = L.Polyline.prototype.onAdd,
__onRemove = L.Polyline.prototype.onRemove,
__updatePath = L.Polyline.prototype._updatePath,
__bringToFront = L.Polyline.prototype.bring... | mit |
kristianmandrup/easy-table | spec/easy-table/table/base_spec.rb | 3332 | require 'spec_helper'
require 'sugar-high/includes'
require 'easy-table/namespaces'
require 'easy-table/table'
describe EasyTable::ViewExt::Table::Base do
extend_view_with EasyTable::ViewExt, :table, :row, :cell, :tag
before :each do
@post = stub(:title => 'my post', :id => 1, :author => 'kristian' )
... | mit |
DaveyEdwards/myiworlds | src/routes/createCircle/index.js | 739 | // /**
// * React Starter Kit (https://www.reactstarterkit.com/)
// *
// * Copyright © 2014-present Kriasoft, LLC. All rights reserved.
// *
// * This source code is licensed under the MIT license found in the
// * LICENSE.txt file in the root directory of this source tree.
// */
import React from 'react';
impo... | mit |
dr3am3r/nexttrack | src/3rd-party/sc.api.js | 7323 | var SC = SC || {};
SC.Widget = function(n) {
function t(r) {
if (e[r]) return e[r].exports;
var o = e[r] = {
exports: {},
id: r,
loaded: !1
};
return n[r].call(o.exports, o, o.exports, t), o.loaded = !0, o.exports
}
var e = {};
return t... | mit |
bfontaine/99Scala | src/test/scala/P91Spec.scala | 105 | package org.bfn.ninetynineprobs
import org.scalatest._
class P91Spec extends UnitSpec {
// TODO
}
| mit |
mind0n/hive | Cache/Libs/net46/wpf/src/Core/CSharp/System/Windows/Input/Command/KeyGesture.cs | 11847 | //---------------------------------------------------------------------------
//
// <copyright file=KeyGesture.cs company=Microsoft>
// Copyright (C) Microsoft Corporation. All rights reserved.
// </copyright>
//
//
// Description: The KeyGesture class is used by the developer to create Keyboard Input Bindings
//
/... | mit |
ExpoSEJS/ExpoSE | Distributor/src/Strategies/Default.js | 1952 | /* Copyright (c) Royal Holloway, University of London | Contact Blake Loring (blake@parsed.uk), Duncan Mitchell (Duncan.Mitchell.2015@rhul.ac.uk), or Johannes Kinder (johannes.kinder@rhul.ac.uk) for details or support | LICENSE.md for license details */
class Strategy {
constructor() {
//Buckets can be sorted by... | mit |
conanite/reservation | spec/dummy/db/schema.rb | 1857 | # encoding: UTF-8
# This file is auto-generated from the current state of the database. Instead
# of editing this file, please use the migrations feature of Active Record to
# incrementally modify your database, and then regenerate this schema definition.
#
# Note that this schema.rb definition is the authoritative sou... | mit |
andpol5/QueryParsingForInlp | Part2/XMLScorer.py | 5255 | #This code has been developed by Daniel Duato Catalan, Luis Fabregues de los Santos and Javier Selva Castello
import xml.etree.ElementTree as ET
class Query:
def __init__(self,query_no,query,local,query_what,query_type,geo_relation,query_where,lat_long):
self.query_no=query_no
self.query=query
... | mit |
superdweebie/doctrine-extensions | tests/Sds/DoctrineExtensions/Test/Identity/CredentialTraitTest.php | 2141 | <?php
namespace Sds\DoctrineExtensions\Test\Identity;
use Sds\Common\Crypt\Hash;
use Sds\DoctrineExtensions\Manifest;
use Sds\DoctrineExtensions\Test\Identity\TestAsset\Document\CredentialTraitDoc;
use Sds\DoctrineExtensions\Test\BaseTest;
use Sds\DoctrineExtensions\Test\TestAsset\Identity;
class CredentialTraitTest... | mit |
Jastrzebowski/algolia-search | src/components/Facets.js | 917 | import React, { PropTypes, Component } from "react"
import Facet from "../components/Facet"
const facetsLabels = {
"category": "Category",
"manufacturer": "Manufacturer",
"salePrice_range": "Price range",
"shipping": "Shipping",
"type": "Type",
}
export default class Facets extends Component {
static pr... | mit |
shing1630/hk_rain | server/src/app/repository/ForecastRepository.ts | 2048 | /**
* Created by Josh Chan on 02-12-2016.
*/
import ForecastModel = require("./../model/ForecastModel");
import IForecastModel = require("./../model/interfaces/IForecastModel");
import ForecastSchema = require("./../dataAccess/schemas/ForecastSchema");
import RepositoryBase = require("./BaseRepository");
imp... | mit |
semyen/SimpleBTS | src/OroAcademic/Bundle/SimpleBTSBundle/Controller/Api/Rest/IssueController.php | 7218 | <?php
namespace OroAcademic\Bundle\SimpleBTSBundle\Controller\Api\Rest;
use OroAcademic\Bundle\SimpleBTSBundle\Entity\Issue;
use OroAcademic\Bundle\SimpleBTSBundle\Form\Type\IssueApiType;
use Oro\Bundle\SoapBundle\Controller\Api\Rest\RestController;
use Oro\Bundle\SoapBundle\Entity\Manager\ApiEntityManager;
use Oro\B... | mit |
zdizzle6717/battle-comm | compiled-server/routes/api/newsPosts.js | 3947 | 'use strict';
var _joi = require('joi');
var _joi2 = _interopRequireDefault(_joi);
var _handlers = require('../handlers');
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
module.exports = [
// News Posts
{
'method': 'GET',
'path': '/api/newsPosts/{id}',
'config': ... | mit |
i-den/SoftwareUniversity | Software University/04) PHP Web Development Basics/14) OOP FUNDAMENTS PART II - Exercises/05. Mass Effect/index.php | 174 | <?php
use Game\Game;
use Models\Ships\Cruiser;
use Models\Ships\Dreadnought;
use Models\Ships\Frigate;
require './Core/autoload.php';
$game = new Game();
$game->start();
| mit |
Gushh/Viteltonemia | js/app.js | 11263 | var firstTimePhrases = [
'Mmm, qué olor a pito. Te hubieses lavado los dientes por lo menos.',
'Wow sos un boludo que piensa que un micrófono puede detectar olores. ¿Qué te pensás, que estamos en el 2025? Forro.',
'Su soplido ha sido guarda... | mit |
Dario2023/Programacion4 | Funcion Actualizar Condicion.php | 1833 | <?php
function actualizarCondicion(&$notas,&$asistencia){
// 3)Completar la condición de cada alumno
foreach ($notas as $nroPersona => $value) { // <--- recorro los id alumnos
if ((($notas[$nroPersona] ["parcial_1"] + $notas[$nroPersona] ["parcial_2"])/2)<=6) { // <--- desaprobaro... | mit |
jeeyoungk/exercise | java/src/main/java/com/kimjeeyoung/datastruct/LinkedQueue.java | 858 | // Copyright 2015 Square, Inc.
package com.kimjeeyoung.datastruct;
import java.util.NoSuchElementException;
/**
* Queue implemented in linked list
*/
public class LinkedQueue<T> implements Queue<T> {
private static final class Node<T> {
T value;
Node<T> next;
}
private Node<T> head;
private Node<T>... | mit |
spreemo/bcrypt_hmac | lib/bcrypt_hmac.rb | 1163 | require 'devise'
require 'devise-encryptable'
require 'bcrypt'
require 'bcrypt_hmac/railtie' if defined?(Rails)
module BcryptHmac
class Encryptor < Devise::Encryptable::Encryptors::Base
def self.digest(password, stretches = nil, _salt = nil, pepper = nil)
pre_bcrypt_hash = prepare_for_bcrypt(password, pepp... | mit |
nazar/wasters | vendor/gems/ri_cal-0.8.5/spec/spec_helper.rb | 1505 | #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license
require File.expand_path(File.join(File.dirname(__FILE__), %w[.. lib ri_cal]))
require 'cgi'
require 'tzinfo'
module Kernel
if ENV.keys.find {|env_var| env_var.match(/^TM_/)}
def rputs(*args)
puts( *["<pre>", args.c... | mit |
markusjohnsson/cil.js | Tests/ComparisonTests/IsInstInterface.cs.ciljs.exe.js | 12531 |
var CILJS = require("../CilJs.Runtime/Runtime");
var asm1 = {};
var asm = asm1;
var asm0 = CILJS.findAssembly("mscorlib");
asm.FullName = "IsInstInterface.cs.ciljs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null";/* A..ctor()*/
asm.x6000001 = function _ctor(arg0)
{
/* IL_00: ldarg.0 */
/* IL_01: call... | mit |
ChilliConnect/Samples | UnitySamples/PushNotifications/Assets/ChilliConnect/GeneratedSource/Responses/LogInUsingFacebookResponse.cs | 4049 | //
// This file was auto-generated using the ChilliConnect SDK Generator.
//
// The MIT License (MIT)
//
// Copyright (c) 2015 Tag Games Ltd
//
// 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... | mit |
i8wu/Converrency | android/app/src/main/java/com/converrency/MainActivity.java | 367 | package com.converrency;
import com.facebook.react.ReactActivity;
public class MainActivity extends ReactActivity {
/**
* Returns the name of the main component registered from JavaScript.
* This is used to schedule rendering of the component.
*/
@Override
protected String getMainComponent... | mit |
krzysztofkolek/github-bugtracker | client/src/components/HomeComponent.js | 461 | 'use strict';
require('styles//Home.css');
import React from 'react';
import { connect } from "react-redux"
@connect((store) => {
return {
};
})
class HomeComponent extends React.Component {
propTypes: {
}
defaultProps: {
}
constructor(props) {
super(props);
}
render() {
return (
... | mit |
lucionei/chamadotecnico | chamadosTecnicosFinal-app/node_modules/date-fns/esm/fp/getOverlappingDaysInIntervalsWithOptions/index.js | 333 | // This file is generated automatically by `scripts/build/fp.js`. Please, don't change it.
import fn from '../../getOverlappingDaysInIntervals/index.js'
import convertToFP from '../_lib/convertToFP/index.js'
var getOverlappingDaysInIntervalsWithOptions = convertToFP(fn, 3)
export default getOverlappingDaysInInterval... | mit |
rberec/AlgorithmsCourse | src/UnionFind.cpp | 1228 | #include "UnionFind.hpp"
void UnionFind::connect(uint64_t p, uint64_t q) {
doConnect(p, q);
}
bool UnionFind::connected(uint64_t p, uint64_t q) {
return doConnected(p, q);
}
bool QuickFindUF::doConnected(uint64_t p, uint64_t q) {
return id_[p] == id_[q];
}
void QuickFindUF::doConnect(uint64_t p, uint64_... | mit |
fredericlefeurmou/utravel | src/UTravel/AdminBundle/Entity/WelcomeWidget.php | 1476 | <?php
namespace UTravel\AdminBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* WelcomeWidget
*
* @ORM\Table(name="widget")
* @ORM\Entity
*/
class WelcomeWidget
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*... | mit |
Michayal/michayal.github.io | node_modules/mathjs/src/entry/dependenciesAny/dependenciesUnitClass.generated.js | 1593 | /**
* THIS FILE IS AUTO-GENERATED
* DON'T MAKE CHANGES HERE
*/
import { BigNumberDependencies } from './dependenciesBigNumberClass.generated'
import { ComplexDependencies } from './dependenciesComplexClass.generated'
import { FractionDependencies } from './dependenciesFractionClass.generated'
import { absDependencie... | mit |
shalles/fepro | src/proTpl/gulp/src/scripts/app-1.js | 605 | // new project please excute
// $ bower install && npm install
// $ gulp
// at project build/base path same as package.json
// about require more see https://github.com/shalles/gulp-fecmd
// or https://www.npmjs.com/package/gulp-fecmd or fecmd
var $ = require('jquery!!');
var utils = require('lib/utils');
var Calc = ... | mit |
FreezyBee/DoctrineFormMapper | tests/Mock/Entity/TestDate.php | 939 | <?php
declare(strict_types=1);
/*
* This file is part of the some package.
* (c) Jakub Janata <jakubjanata@gmail.com>
* For the full copyright and license information, please view the LICENSE file.
*/
namespace FreezyBee\DoctrineFormMapper\Tests\Mock\Entity;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
/**
... | mit |
makskay/Tidy | src/me/makskay/tidy/commands/InvestigateCommand.java | 3360 | /*
* Copyright (c) 2012 Max Kreminski
*
* 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 use, copy, modify, merge, p... | mit |
SingularInversions/FaceGenBaseLibrary | source/LibTpBoost/boost_1_67_0/boost/asio/ip/address_v6.hpp | 10281 | //
// ip/address_v6.hpp
// ~~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2018 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef BOOST_ASIO_IP_A... | mit |
uniter/uniter-jquery | build/fs.js | 665 | /*
* Demo of packaging PHP files up with Browserify+Uniter
*
* MIT license.
*/
'use strict';
var fs = require('fs'),
globby = require('globby'),
path = require('path'),
files = globby.sync([
__dirname + '/../php/**/*.php',
'!' + __dirname + '/../php/src/Demo/PhpQuery/**',
'!' + ... | mit |
StasPiv/playzone | src/CoreBundle/Model/Request/Call/CallDeleteAcceptRequest.php | 996 | <?php
/**
* Created by PhpStorm.
* User: stas
* Date: 17.01.16
* Time: 20:58
*/
namespace CoreBundle\Model\Request\Call;
use CoreBundle\Model\Request\SecurityRequestAwareTrait;
use CoreBundle\Model\Request\SecurityRequestInterface;
use JMS\Serializer\Annotation as JMS;
use Symfony\Component\Validator\Constraints... | mit |
scen/ionlib | src/sdk/hl2_ob/game/client/c_baseentity.cpp | 176903 | //===== Copyright © 1996-2005, Valve Corporation, All rights reserved. ======//
//
// Purpose:
//
// $NoKeywords: $
//===========================================================================//
#include "cbase.h"
#include "c_baseentity.h"
#include "prediction.h"
#include "model_types.h"
#include "iviewrender_beams.h... | mit |
Philip-Trettner/GlmSharp | GlmSharp/GlmSharp/Mat2x3/gmat2x3.glm.cs | 1035 | using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Numerics;
using System.Linq;
using GlmSharp.Swizzle;
// ReSharper disable InconsistentNaming
namespace GlmSharp
{
/// <summar... | mit |
alanctgardner/gogen-avro | v8/generator/package.go | 1236 | // Utility methods for managing and writing generated code
package generator
import (
"fmt"
gofmt "go/format"
"io/ioutil"
"path/filepath"
"sort"
)
// Package represents the output package
type Package struct {
name string
header string
files map[string]string
}
func NewPackage(name, header string) *Packag... | mit |
koharjidan/bitcoin | src/qt/locale/bitcoin_it.ts | 180363 | <<<<<<< HEAD
<<<<<<< HEAD
<TS language="it" version="2.1">
<<<<<<< HEAD
=======
<context>
<name>AboutDialog</name>
<message>
<source>About Bitcoin Core</source>
<translation>Info su Bitcoin Core</translation>
</message>
<message>
<source><b>Bitcoin Core</b> version</s... | mit |
EricShiGit/personalblog | djangoblog/urls.py | 723 | from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.conf import settings
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'djangoblog.views.home', name='home'),
# url(r'^blog/', include('blog.ur... | mit |
Yordanov101/OperatorsAndExpressionsHW | 16.BitExchangeTwo/BitExchangeTwo.cs | 2027 | using System;
class BitExchangeTwo
{
// Program that exchanges bits {p, p+1, …, p+k-1} with bits {q, q+1, …, q+k-1} of a given 32-bit
// unsigned integer.The first and the second sequence of bits may not overlap.
static void Main()
{
uint number = uint.Parse(Console.ReadLine());
int pB... | mit |
dinosaurwithakatana/Google-I-O-Bingo | app/src/androidTest/java/io/dwak/googleiobingo/ApplicationTest.java | 352 | package io.dwak.googleiobingo;
import android.app.Application;
import android.test.ApplicationTestCase;
/**
* <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
*/
public class ApplicationTest extends ApplicationTestCase<Application> {
public ApplicationTest() {
s... | mit |
plastic-karma/junit-flakey-detector | testrunner/src/main/java/de/plastickarma/flakeyunit/PrintStreamListener.java | 1079 | package de.plastickarma.flakeyunit;
import org.junit.runner.Description;
import java.io.PrintStream;
import java.util.List;
/**
* Example listener, that prints a message to the given PrintStream, if a flakey test was discovered.
*/
public final class PrintStreamListener implements FlakeyTestcaseListener {
priv... | mit |
redaktor/exiftool.js | src/exiftool/filetypes/435.js | 2877 | exports.info = { FormatID: '1222',
FormatName: 'Drawing Interchange File Format (ASCII)',
FormatVersion: '2010/2011/2012',
FormatAliases: '',
FormatFamilies: '',
FormatTypes: 'Image (Vector)',
FormatDisclosure: '',
FormatDescription: 'This is an outline record only, and requires further details, research ... | mit |
DataFire/Integrations | integrations/generated/google_servicecontrol/index.js | 175 | "use strict";
let datafire = require('datafire');
let openapi = require('./openapi.json');
module.exports = datafire.Integration.fromOpenAPI(openapi, "google_servicecontrol"); | mit |
brocaar/loraserver | internal/downlink/downlink.go | 1097 | package downlink
import (
"time"
"github.com/pkg/errors"
"github.com/brocaar/chirpstack-network-server/internal/config"
"github.com/brocaar/chirpstack-network-server/internal/downlink/data"
"github.com/brocaar/chirpstack-network-server/internal/downlink/join"
"github.com/brocaar/chirpstack-network-server/inter... | mit |
kyokley/MediaViewer | mediaviewer/models/path.py | 6522 | import time
from django.db import models
from django.core.urlresolvers import reverse
from mediaviewer.models.file import File
from mediaviewer.models.posterfile import PosterFile
from mediaviewer.models.usercomment import UserComment
from mediaviewer.models.genre import Genre
from datetime import datetime as dateObj
f... | mit |
raadhuis/modx-basic | core/components/formit/model/formit/formit.class.php | 11235 | <?php
/**
* FormIt
*
* Copyright 2009-2012 by Shaun McCormick <shaun@modx.com>
*
* FormIt is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option) any
* late... | mit |
tableau/TabPy | tabpy/tabpy_server/app/util.py | 2635 | import csv
from datetime import datetime
import logging
from OpenSSL import crypto
import os
logger = logging.getLogger(__name__)
def validate_cert(cert_file_path):
with open(cert_file_path, "r") as f:
cert_buf = f.read()
cert = crypto.load_certificate(crypto.FILETYPE_PEM, cert_buf)
date_forma... | mit |
mcqueary/jnats | src/test/java/io/nats/client/impl/HeadersTests.java | 33640 | package io.nats.client.impl;
import io.nats.client.support.IncomingHeadersProcessor;
import io.nats.client.support.Status;
import io.nats.client.support.Token;
import io.nats.client.support.TokenType;
import org.junit.jupiter.api.Test;
import java.nio.charset.StandardCharsets;
import java.util.*;
import java.util.fun... | mit |
kanonirov/lanb-client | src/main/java/ru/lanbilling/webservice/wsdl/GetSharedPostsCategories.java | 1917 |
package ru.lanbilling.webservice.wsdl;
import javax.annotation.Generated;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
... | mit |
staafl/dotnet-bclext | to-integrate/libcs_staaflutil/Business/Controls/Text_Boxes/Our_MaskedTextBox.cs | 1084 |
using System;
using System.Windows.Forms;
namespace Common.Controls
{
#if NO_CALCULATOR
public class Our_MaskedTextBox : MaskedTextBox
#else
public partial class Our_MaskedTextBox : MaskedTextBox, ICalculatorTextBox
#endif
{
public Our_MaskedTextBox() {
(this).A... | mit |
danielholgate/marklogic-kinesis-connector | src/main/java/com/marklogic/kinesis/implementations/MarkLogicEmitter.java | 1741 | package com.marklogic.kinesis.implementations;
import com.amazonaws.services.kinesis.connectors.KinesisConnectorConfiguration;
import com.amazonaws.services.kinesis.connectors.UnmodifiableBuffer;
import com.amazonaws.services.kinesis.connectors.interfaces.IEmitter;
import com.marklogic.kinesis.MarkLogicSender;
import ... | mit |
NiklasFauth/33c3-hot-wire | software/main.cpp | 17591 |
#include <RFM12B.h>
#include <SPI.h>
#include "bma2XX_regs.h"
#include <CounterLib_t.h>
#include "Energia.h"
Counter<> freqCounter; // create counter that counts pulses on pin P1.0
#define NODEID 42 //network ID used for this unit
#define NETWORKID 137 //the network ID we are on
#define GATEWAYID ... | mit |
bitzesty/trade-tariff-frontend | spec/models/heading_spec.rb | 660 | require 'spec_helper'
describe Heading do
describe '#to_param' do
let(:heading) { Heading.new(attributes_for(:heading).stringify_keys) }
it 'returns heading code as param' do
expect(heading.to_param).to eq heading.short_code
end
end
describe '#commodity_code' do
let(:heading) { Heading.ne... | mit |
guigrpa/storyboard | packages/storyboard-examples/src/clientWithUpload.js | 1634 | /* eslint-env browser */
import { mainStory, chalk, addListener } from 'storyboard';
import browserExtensionListener from 'storyboard-listener-browser-extension';
import wsClientListener from 'storyboard-listener-ws-client';
require('babel-polyfill'); /* from root packages */ // eslint-disable-line
require('isomorph... | mit |
VitorCBSB/DinoReborn | src/systems/InputSystem.cpp | 625 | /*
* InputSystem.cpp
*
* Created on: 15/07/2014
* Author: vitor
*/
#include "InputSystem.h"
void InputSystem::process(double dt) {
SDL_Event event;
while (SDL_PollEvent(&event)) {
switch (event.type) {
case SDL_QUIT:
world_ptr.lock()->get_event_manager().broadcast<Quit>();
break;
case SDL_KEY... | mit |
gibbok/dojo-keyboard-shortcuts | keysJs.js | 2953 | // module:
// keysJs
// summary:
// Set of keycodes based on English keyboard.
// description:
// Common set of keycodes based on English keyboard.
// Non-English keyboards are not mapped.
// Any additional keys can be added in this module.
define({
3: "break",
8: "backspace / delete",
... | mit |
pocky/user | src/User/Application/DTO/DisableUserDTO.php | 367 | <?php
namespace Black\User\Application\DTO;
/**
* Class DisableUserDTO
*/
final class DisableUserDTO
{
/**
* @var
*/
private $id;
/**
* @param $id
*/
public function __construct($id)
{
$this->id = $id;
}
/**
* @return mixed
*/
public function g... | mit |
YuChenTech/yilai | vendor/amranidev/scaffold-interface/src/Http/Controllers/GuiController.php | 8717 | <?php
namespace Amranidev\ScaffoldInterface\Http\Controllers;
use Amranidev\Ajaxis\Ajaxis;
use Amranidev\ScaffoldInterface\Attribute;
use Amranidev\ScaffoldInterface\Datasystem\Database\DatabaseManager;
use Amranidev\ScaffoldInterface\Models\Relation;
use Amranidev\ScaffoldInterface\Models\Scaffoldinterface;
use AppC... | mit |
cloudcmd/gritty | test/client/get-el.js | 574 | 'use strict';
const test = require('supertape');
const stub = require('@cloudcmd/stub');
const getEl = require('../../client/get-el');
test('gritty: get-el: object', (t) => {
const el = {};
t.equal(getEl(el), el, 'should return el');
t.end();
});
test('gritty: get-el: string', (t) => {
const el... | mit |
aleacoin/aleacoin-release | src/qt/locale/bitcoin_fi.ts | 130862 | <?xml version="1.0" ?><!DOCTYPE TS><TS language="fi" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Aleacoin</source>
<translation>Tietoa Aleacoinista</translation>
</message>
<message>
<... | mit |
heisedebaise/ranch | ranch-paypal/src/main/java/org/lpw/ranch/paypal/NotExistsValidatorImpl.java | 768 | package org.lpw.ranch.paypal;
import org.lpw.tephra.ctrl.validate.ValidateWrapper;
import org.lpw.tephra.ctrl.validate.ValidatorSupport;
import org.springframework.stereotype.Controller;
import javax.inject.Inject;
/**
* @author lpw
*/
@Controller(PaypalService.VALIDATOR_NOT_EXISTS)
public class NotExistsValidator... | mit |
teco-kit/jActivity | node/features/audiolevel.destroy.js | 42 | meter.stopListening();
meter.disconnect(); | mit |
alex-ta/Chat-Server | server/config.js | 344 | module.exports = {
jwtSecret: 'somesecretkeyforjsonwebtoken',
databaseUrl: 'mongodb://localhost/chatdb',
serverPort: 3000,
chatLimit: 5,
url: {
logout: '/logout',
login: '/login',
exists: '/exists',
success: '/',
failure: '/login',
signup: '/signup',
authenticated: '/auth',
ava... | mit |
J-Y/RubyQuiz | ruby_quiz/quiz49_sols/solutions/Brian Schroeder/adventure-refaktored.rb | 12065 | #!/usr/bin/ruby
#
# This is a refaktored version of the lisp tutorial at
#
# http://www.lisperati.com/casting.html
#
# into the ruby programming language.
#
# This code is under the ruby licence.
#
# The code can be found at http://ruby.brian-schroeder.de/quiz/adventure/
# A Thing in the adventure world. Parall... | mit |
spiral/orm | source/Spiral/ORM/Entities/Nodes/ArrayInterface.php | 187 | <?php
/**
* Spiral, Core Components
*
* @author Wolfy-J
*/
namespace Spiral\ORM\Entities\Nodes;
/**
* Indicates that node represent array sub-set.
*/
interface ArrayInterface
{
} | mit |
D4rk4/talks-on-map | model/Info.js | 492 | 'use strict';
let mongoose = require('mongoose');
let itemSchema = new mongoose.Schema({
city: {
type: Number,
index: true
},
date: {
type: Date,
index: true
},
accident: {
type: Number
},
level: {
type: Number
},
weather: {
code: {
type: String
},
wind: {
... | mit |
shimengyv/js-study | object.js | 321 | /**
* 2017-09-14 Shi Mengyv
*/
var person = {
hascar : true,
age : 20,
info : function () {
console.log(this.hascar);
console.log(this.age);
console.log(this.info);
console.log(`hascar => ${ this.hascar} age => ${ this.age} info => ${ this.info}`)
}
};
person.info();... | mit |
wusuopu/web.rb | lib/webrb.rb | 279 | require "webrb/version"
require "webrb/routing"
require "webrb/util"
require "webrb/dependencies"
require "webrb/controller"
require "webrb/file_model"
module Webrb
class Application
def call env
rack_app = get_rack_app env
rack_app.call env
end
end
end
| mit |
vdt/matching-engine | test/update_precision.py | 539 | # a simple script to update the precision for the tests
import json, sys, os
def update(file):
with open(file) as f:
o = json.load(f);
for x in o:
p = x.get('payload')
if not p: continue
size = p.get('size')
if not size: continue
p['size'] = int(round(p['size... | mit |
BaderLab/openPIP | src/AppBundle/Controller/AutoCompleteController.php | 3596 | <?php
namespace AppBundle\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
... | mit |
cuckata23/wurfl-data | data/sagem_myx_6_ver2_sub6224105_20.php | 175 | <?php
return array (
'id' => 'sagem_myx_6_ver2_sub6224105_20',
'fallback' => 'sagem_myx_6_ver1_subr2',
'capabilities' =>
array (
'max_data_rate' => '40',
),
);
| mit |
fpgentil/gitlabhq | app/models/note.rb | 8749 | # == Schema Information
#
# Table name: notes
#
# id :integer not null, primary key
# note :text
# noteable_type :string(255)
# author_id :integer
# created_at :datetime
# updated_at :datetime
# project_id :integer
# attachment :string(255)
# line_code :string(2... | mit |
arnau/ISO8601 | lib/iso8601/errors.rb | 1225 | # frozen_string_literal: true
module ISO8601
##
# Contains all ISO8601-specific errors.
module Errors
##
# Catch-all exception.
class StandardError < ::StandardError
end
##
# Raised when the given pattern doesn't fit as ISO 8601 parser.
class UnknownPattern < StandardError
def ... | mit |
thisishugo/thisishugo.github.com | src/images/index.d.ts | 78 | declare module "*.jpg" {
const content: string;
export default content;
}
| mit |
Connor-R/nba_shot_charts | charting/TODO_temp_helper.py | 23829 | import urllib
import os
import shutil
import sys
import glob
import math
import pandas as pd
import argparse
from datetime import date, datetime
from time import time
import matplotlib as mpb
import matplotlib.pyplot as plt
from matplotlib import offsetbox as osb
from matplotlib.patches import RegularPolygon
from datet... | mit |
baguss42/autoshop | assets/plugins/filemanager/config/config.php | 19654 | <?php
if (session_id() == '') session_start();
mb_internal_encoding('UTF-8');
date_default_timezone_set('Asia/Jakarta');
/*
|--------------------------------------------------------------------------
| Optional security
|--------------------------------------------------------------------------
|
| if set to true onl... | mit |
secondrotation/dump_truck | lib/dump_truck.rb | 1365 | require 'dump_truck/version'
require 'colorize'
require 'dump_truck/configuration'
require 'dump_truck/database_configuration'
require 'dump_truck/schema_configuration'
require 'dump_truck/table_configuration'
require 'dump_truck/target'
require 'dump_truck/truck'
require 'dump_truck/loggable_truck'
require 'dump_tr... | mit |
atonse/mobiledoc-kit | tests/unit/parsers/mobiledoc/0-3-test.js | 5216 | import MobiledocParser from 'mobiledoc-kit/parsers/mobiledoc/0-3';
import { MOBILEDOC_VERSION } from 'mobiledoc-kit/renderers/mobiledoc/0-3';
import PostNodeBuilder from 'mobiledoc-kit/models/post-node-builder';
const DATA_URL = "data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACwAAAAAAQABAAACAkQBADs=";
const { module, ... | mit |
FARIDMESCAM/Manufacture | config.php | 5884 | <?php
if (!isset($_SERVER['HTTP_HOST'])) {
exit('This script cannot be run from the CLI. Run it from a browser.');
}
//if (!in_array(@$_SERVER['REMOTE_ADDR'], array(
// '127.0.0.1',
// '::1',
//))) {
// header('HTTP/1.0 403 Forbidden');
// exit('This script is only accessible from localhost... | mit |
eidias/Training | BestPractices/BestPractices.Shell/Patterns/Visitor.cs | 149 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VisitorPattern
{
}
| mit |
akashnautiyal013/ImpactRun01 | components/ImpactLeague/ImpactLeagueHome.js | 9198 |
'use strict';
import React, { Component } from 'react';
import{
StyleSheet,
View,
Image,
ScrollView,
Dimensions,
TouchableOpacity,
Text,
ListView,
AlertIOS,
NetInfo,
AsyncStorage,
RefreshControl,
} from 'react-native';
import apis from '../apis';
import commonStyles f... | mit |