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 clusterconf
import (
"encoding/json"
"fmt"
"math/rand"
"net/url"
"path"
"path/filepath"
"strconv"
"strings"
"sync"
"time"
"github.com/cerana/cerana/acomm"
"github.com/cerana/cerana/pkg/errors"
)
const bundlesPrefix string = "bundles"
// BundleDatasetType is the type of dataset to be used in a bu... | cerana/cerana | providers/clusterconf/bundle.go | GO | mit | 11,671 |
/* global expect */
describe('outputFormat', () => {
describe('when given a format', () => {
it('decides the output that will be used for serializing errors', () => {
expect(
function () {
const clonedExpect = expect.clone().outputFormat('html');
clonedExpect(42, 'to equal', 24);... | unexpectedjs/unexpected | test/api/outputFormat.spec.js | JavaScript | mit | 1,096 |
require 'json'
require 'net/http'
require 'open-uri'
require 'uri'
require 'ostruct'
module DismalTony # :nodoc:
# Umbrella module for all mixins for Directives
module DirectiveHelpers
# Basic template , adds the inheritence methods through metaprogramming so
# that n-children inherit class methods and ins... | jtp184/DismalTony | lib/dismaltony/directive_helpers.rb | Ruby | mit | 12,093 |
'use strict';
const fs = require('fs');
const remote = require('electron').remote;
const mainProcess = remote.require('./main');
module.exports = {
template: `
<v-list dense class="pt-0">
<v-list-tile to="recent-projects" :router="true">
<v-list-tile-action>
<v-icon>list</v-icon>
</v-list-tile-acti... | mglaman/conductor | src/components/MainNavigation.js | JavaScript | mit | 1,947 |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="sl_SI" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About AmeroX</source>
<translation>O AmeroX</translation>
</message>
<message>
<location l... | ameroxcoin/AmeroX | src/qt/locale/bitcoin_sl_SI.ts | TypeScript | mit | 130,618 |
// **********************************************************************
//
// <copyright>
//
// BBN Technologies
// 10 Moulton Street
// Cambridge, MA 02138
// (617) 873-8000
//
// Copyright (C) BBNT Solutions LLC. All rights reserved.
//
// </copyright>
// ***************************************************... | d2fn/passage | src/main/java/com/bbn/openmap/image/ImageServerUtils.java | Java | mit | 5,229 |
/*
* Copyright (C) 2013-2018 The Project Lombok Authors.
*
* 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, ... | Lekanich/lombok | src/utils/lombok/javac/JavacTreeMaker.java | Java | mit | 34,532 |
var sys = require("sys"),
my_http = require("http"),
path = require("path"),
url = require("url"),
filesys = require("fs");
my_http.createServer(function(request,response){
var my_path = url.parse(request.url).pathname;
var full_path = path.join(process.cwd(),my_path);
path.exists(full_path,function(exists){
if(!e... | mark-hahn/node-ide | test.js | JavaScript | mit | 914 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BreakoutGL
{
public class Program
{
public static void Main(string[] args)
{
using (Game game = new Game())
{
game.Run();
... | minalear/Breakout | src/BreakoutGL/Program.cs | C# | mit | 348 |
# -*- coding: utf-8 -*-
""" Sahana Eden Common Alerting Protocol (CAP) Model
@copyright: 2009-2015 (c) Sahana Software Foundation
@license: MIT
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to dea... | michaelhowden/eden | modules/s3db/cap.py | Python | mit | 86,498 |
using System.Data.Entity;
using LauraAndChad.Models;
namespace LauraAndChad
{
public class LauraAndChadContext : DbContext
{
public LauraAndChadContext() : base("name=LauraAndChadContext")
{
}
public DbSet<Rsvp> Rsvps { get; set; }
}
}
| chad-ramos/laura-and-chad | LauraAndChad/LauraAndChadContext.cs | C# | mit | 285 |
var path = require('path');
var fs = require('fs');
var Writer = require('broccoli-writer');
var Handlebars = require('handlebars');
var walkSync = require('walk-sync');
var RSVP = require('rsvp');
var helpers = require('broccoli-kitchen-sink-helpers');
var mkdirp = require('mkdirp');
v... | michaellopez/broccoli-handlebars | index.js | JavaScript | mit | 2,973 |
from django.shortcuts import render, render_to_response, get_object_or_404
from django.template import RequestContext
# Create your views here.
from django.views.generic import ListView, DetailView
from .models import Category, Product
from cart.forms import CartAddProductForm
def category_list(request):
return... | sunlaiqi/fundiy | src/shop/views.py | Python | mit | 1,636 |
class ::Numeric
include GlobalizeNumeric::CoreExtensions::Numeric
end
class ::String
include GlobalizeNumeric::CoreExtensions::String
end
#class ::Locale
# include GlobalizeNumeric::Locale
#end
#Locale.class_eval do
# include GlobalizeNumeric::Locale
#end
| yeameen/globalize_numeric | lib/core_ext_hook.rb | Ruby | mit | 266 |
var _a;
import app from './app';
import toHTML from './vdom-to-html';
import { _createEventTests, _createStateTests } from './apprun-dev-tools-tests';
app['debug'] = true;
window['_apprun-help'] = ['', () => {
Object.keys(window).forEach(cmd => {
if (cmd.startsWith('_apprun-')) {
cmd... | yysun/apprun | esm/apprun-dev-tools.js | JavaScript | mit | 8,440 |
using AdfToArm.Core.Models.LinkedServices.LinkedServiceTypeProperties;
using Newtonsoft.Json;
namespace AdfToArm.Core.Models.LinkedServices
{
[JsonObject]
public class AzureSqlDatabase : LinkedService
{
public AzureSqlDatabase()
{
Properties = new LinkedServicePropert... | deepnetworkgmbh/adfToArm | src/AdfToArm.Core/Models/LinkedServices/AzureSqlDatabase.cs | C# | mit | 615 |
module Blorgh::Concerns::Models::Post
extend ActiveSupport::Concern
# 'included do' causes the included code to be evaluated in the
# context where it is included (post.rb), rather than being
# executed in the module's context (blorgh/concerns/models/post).
included do
attr_accessor :author_name
bel... | juanortizthirdwave/ruby_guides_engine | lib/concerns/models/post.rb | Ruby | mit | 638 |
import './index.css';
import React, {Component} from 'react';
import { postToggleDevice } from '../ajax';
export default class SocketDevice extends Component {
constructor() {
super();
this.state = {clicked: false, device: {}};
this.clicked = this.clicked.bind(this);
}
componentWi... | aspic/wemo-control | src/SocketDevice/index.js | JavaScript | mit | 1,491 |
package com.jsoniter.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.ANNOTATION_TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER})
@Retention(RetentionPol... | json-iterator/java | src/main/java/com/jsoniter/annotation/JsonIgnore.java | Java | mit | 452 |
var config = {
container: "#basic-example",
connectors: {
type: 'step'
},
node: {
HTMLclass: 'nodeExample1'
}
},
ceo = {
text: {
name: "Mark Hill",
title: "Chief executive officer",
... | fperucic/treant-js | examples/basic-example/basic-example.js | JavaScript | mit | 6,298 |
require 'spec_helper'
describe User do
before do
@user = User.new(name: "Example User", email: "user@example.com",
password: "foobar800", password_confirmation: "foobar800")
end
subject {@user}
it {should respond_to(:name)}
it {should respond_to(:email)}
it {should respond_to(:password_digest)}
it {s... | mbreecher/task_app | spec/models/user_spec.rb | Ruby | mit | 3,092 |
# -*- encoding: utf-8 -*-
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe Mugshot::Storage do
it "should convert an id to path with 6 levels of directories" do
@fs = Mugshot::Storage.new
@fs.send(:id_to_path, "a9657a30c7df012c736512313b021ce1").should == "a9/65/7a/30/c7/df/012c7... | globocom/mugshot | spec/mugshot/storage_spec.rb | Ruby | mit | 347 |
# 005_cleaner.py
#####################################################################
##################################
# Import des modules et ajout du path de travail pour import relatif
import sys
sys.path.insert(0 , 'C:/Users/WILLROS/Perso/Shade/scripts/LocalWC-Shade-App/apis/')
from voca import AddLog , ... | sighill/shade_app | apis/raw/005_raw/005_cleaner.py | Python | mit | 1,625 |
#Attr Methods
# I worked on this challenge by myself.
# I spent [#] hours on this challenge.
# Pseudocode
# Input:
# Output:
# Steps:
class NameData
end
class Greetings
end
# Release 1
#What are these methods doing?
# These methods set a name, age, and occupation, then they allow those instance variables to ... | ryanfs/phase-0 | week-6/attr/my_solution.rb | Ruby | mit | 2,388 |
require( ['build/index'] );
| pixelsnow/arkanoid-uni | scripts/index.js | JavaScript | mit | 28 |
<?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... | cyrilBezel/application_tex | application/config/config.php | PHP | mit | 17,766 |
<?php
namespace Gwa\Remote;
/**
* @brief Loads a remote resource using curl.
* @class RemoteResource
*/
class RemoteResource
{
private $_url;
private $_errno;
private $_errmsg;
private $_content;
private $_header;
private $_options;
/**
* @brief The constructor.
* @param strin... | gwa/gwRemoteResource | src/Gwa/Remote/RemoteResource.php | PHP | mit | 2,909 |
package com.fteams.siftrain.entities;
import com.fteams.siftrain.util.SongUtils;
public class SimpleNotesInfo implements Comparable<SimpleNotesInfo>{
public Double timing_sec;
public Integer effect;
public Double effect_value;
public Integer position;
@Override
public int compareTo(SimpleNot... | kbz/SIFTrain | core/src/com/fteams/siftrain/entities/SimpleNotesInfo.java | Java | mit | 503 |
const app = require('../server');
const readline = require('readline');
const {
User,
Role,
RoleMapping,
} = app.models;
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
});
Role.findOne({ where: { name: 'admin' } })
.then((role) => {
if (!role) {
console.log('No ad... | oamaok/kinko | server/scripts/create-admin.js | JavaScript | mit | 1,056 |
/*Owner & Copyrights: Vance King Saxbe. A.*//*Copyright (c) <2014> Author Vance King Saxbe. A, and contributors Power Dominion Enterprise, Precieux Consulting and other contributors. Modelled, Architected and designed by Vance King Saxbe. A. with the geeks from GoldSax Consulting and GoldSax Technologies email @vsaxbe@... | VanceKingSaxbeA/FOREX-Engine | App/USDMOP.php | PHP | mit | 9,398 |
<?php
namespace JeroenNoten\LaravelAdminLte\Menu;
use Illuminate\Support\Arr;
use JeroenNoten\LaravelAdminLte\Helpers\MenuItemHelper;
class Builder
{
protected const ADD_AFTER = 0;
protected const ADD_BEFORE = 1;
protected const ADD_INSIDE = 2;
/**
* The set of menu items.
*
* @var ar... | JeroenNoten/Laravel-AdminLTE | src/Menu/Builder.php | PHP | mit | 6,853 |
<?php
namespace Bonsai\Mapper\Converter;
use \Bonsai\Module\Tools;
class LocalizeUrl implements Converter
{
public function convert($output)
{
return Tools::localizeURL($output);
}
}
| TheCargoAgency/BonsaiPHP | src/Mapper/Converter/LocalizeUrl.php | PHP | mit | 208 |
package org.nww.core.data.filter;
import java.util.List;
/**
* A simple filter criteria implementation checking the existence of a string
* inside a list of strings. Does only match if the list contains a totally
* equal string like the context one.
*
* @author MGA
*/
public class StringInListFilterC... | NetzwerkWohnen/NWW | src/main/java/org/nww/core/data/filter/StringInListFilterCriteria.java | Java | mit | 877 |
declare module "diagram-js/lib/features/global-connect/GlobalConnect" {
import EventBus from "diagram-js/lib/core/EventBus";
import { Base } from "diagram-js/lib/model";
import Canvas from "diagram-js/lib/core/Canvas";
import Dragging from "diagram-js/lib/features/dragging/Dragging";
export default class Glo... | ProcessHub/processhub-sdk | src/process/types/diagram-js/lib/features/global-connect/globalconnect.d.ts | TypeScript | mit | 1,101 |
#!/usr/bin/python
"""
title : testtermopi.py
description : This program runs the termopi.py
: Displays the status of the resources (cpu load and memory usage) consumed by a Raspberry Pi
computer and the resources consumed by one or more containers instantiated in the Pi... | AdL1398/PiCasso | source/modules/tester/testtermopi.py | Python | mit | 1,603 |
var dbm = require('db-migrate');
var type = dbm.dataType;
exports.up = function(db, callback) {
db.addColumn("troop_type", "production_cost", "int", callback);
};
exports.down = function(db, callback) {
};
| Codes-With-Eagles-SWE2014/Server | web_server/migrations/20141116202453-troopcost.js | JavaScript | mit | 210 |
<?php
/*
* This file is part of the Zephir.
*
* (c) Zephir Team <team@zephir-lang.com>
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Zephir\Optimizers\FunctionCall;
use function Zephir\add_slashes;
use Zephir\Call;
u... | dreamsxin/zephir | Library/Optimizers/FunctionCall/MemstrOptimizer.php | PHP | mit | 1,887 |
import { Inject, Injectable } from '@angular/core';
import { Http, Response } from '@angular/http';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';
import 'rxjs/operator/mergeMap';
import 'rxjs/operator/switchMap';
import 'rxjs/add/operator/debounceTime';
@Injectable()
export class Sandbo... | dav793/angular2-seed | app/components/sandbox/sandbox3/sandbox3.service.ts | TypeScript | mit | 524 |
'use strict';
// you have to require the utils module and call adapter function
const utils = require('@iobroker/adapter-core'); // Get common adapter utils
const adapterName = require('./package.json').name.split('.').pop();
// include node-ssdp and node-upnp-subscription
const {Client, Server} = require('node-ssdp'... | Jey-Cee/ioBroker.upnp | main.js | JavaScript | mit | 83,360 |
if(Bar.app("Início")) throw "Barra já existe!";
/*/LOADING BAR
$.get("http://hosts.medorc.org/xn--stio-vpa/json/bar.Home.json"),
function(data){
//if(Bar.app(data.name)) throw "Barra já existe!";
$('#header').bar({
toolbox: data,
callback: function(bar){
//(auto) lo... | vieiralisboa/ze | private/bars/bar.Home.js | JavaScript | mit | 2,099 |
System.config({
baseURL: "/",
defaultJSExtensions: true,
transpiler: "babel",
babelOptions: {
"optional": [
"runtime"
],
"stage": 1
},
paths: {
"github:*": "jspm_packages/github/*",
"npm:*": "jspm_packages/npm/*"
},
map: {
"angular2": "npm:angular2@2.0.0-beta.1",
"babe... | gilAsier/angular2beta_errors | public/config.js | JavaScript | mit | 14,023 |
<?php
/*
* This file is part of PHPExifTool.
*
* (c) 2012 Romain Neutron <imprec@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPExiftool\Driver\Tag\HP;
use JMS\Serializer\Annotation\ExclusionPolicy;
use ... | romainneutron/PHPExiftool | lib/PHPExiftool/Driver/Tag/HP/PreviewImage.php | PHP | mit | 860 |
$(document).ready(function() {
$.getJSON('/backend/go/' + go_term['id'] + '/locus_details', function(data) {
create_go_table(data);
});
$.getJSON('/backend/go/' + go_term['id'] + '/ontology_graph', function(data) {
var cy = create_cytoscape_vis("cy", layout, graph_style, data, null, false, "goOntology");
... | yeastgenome/SGDFrontend | src/sgd/frontend/yeastgenome/static/js/go.js | JavaScript | mit | 7,443 |
package com.dreamteam.octodrive.model;
import com.parse.ParseObject;
public abstract class OctoObject {
protected String _objectId;
protected ParseObject _parseObject;
public ParseObject parseObject() {
return _parseObject;
}
public void setObjectId(String objectId) {
_objectId... | lordzsolt/OctoDrive | app/src/main/java/com/dreamteam/octodrive/model/OctoObject.java | Java | mit | 500 |
!function($) {
$(document).on("keydown", 'input[data-type="numeric"]', function (e)
{
var key = e.charCode || e.keyCode || 0;
// allow backspace, tab, delete, arrows, numbers and keypad numbers ONLY
return (
key == 8 ||
key == 9 ||
key == 46 ||
(key >= 37 && key <= 40) ||
(... | carlalexander/jquery.numeric.input | jquery.numeric.input.js | JavaScript | mit | 420 |
package ca.ulaval.glo2004.Domain.Matrix;
import ca.ulaval.glo2004.Domain.StationExitPoint;
import java.io.Serializable;
public class ExitProductSortingHolder implements Serializable{
public StationExitPoint exitPoint;
public double value;
public ExitProductSortingHolder(StationExitPoint exitPoint, double... | klafooty/projetJava | src/main/java/ca/ulaval/glo2004/Domain/Matrix/ExitProductSortingHolder.java | Java | mit | 401 |
import Chip from '../../components/Chip'
import { vueTest } from '../utils'
describe('Chip', () => {
let vm
before((done) => {
vm = vueTest(Chip)
vm.$nextTick(done)
})
it('renders with text', () => {
const el = vm.$('#chip')
el.should.contain.text('Basic chip')
el.should.not.have.class('md... | posva/vue-mdl | test/unit/specs/Chip.spec.js | JavaScript | mit | 1,991 |
#!/usr/bin/ruby
#
# Script to immediately start playing a track in the media player.
#
# Author:: Nicholas J Humfrey (mailto:njh@aelius.com)
# Copyright:: Copyright (c) 2008 Nicholas J Humfrey
# License:: Distributes under the same terms as Ruby
#
$:.unshift File.dirname(__FILE__)+'/../lib'
require 'mpris'
rai... | njh/ruby-mpris | examples/play_track.rb | Ruby | mit | 443 |
from . import packet
class Packet5(packet.Packet):
def __init__(self, player, slot):
super(Packet5, self).__init__(0x5)
self.add_data(player.playerID)
self.add_data(slot)
self.add_structured_data("<h", 0) # Stack
self.add_data(0) # Prefix
self.add_structured_data... | flammified/terrabot | terrabot/packets/packet5.py | Python | mit | 340 |
module Blackbeard
class FeatureMetric < SegmentedMetric
end
end
| goldstar/blackbeard | lib/blackbeard/feature_metric.rb | Ruby | mit | 68 |
import { hashHistory } from 'react-router'
import { auth } from 'lib/firebase'
export const redirect = path => hashHistory.push(path)
export const signInWithGoogle = () => {
const provider = new auth.GoogleAuthProvider()
provider.addScope('https://www.googleapis.com/auth/userinfo.profile')
return auth().signI... | panelando/panelando | app/lib/auth.js | JavaScript | mit | 629 |
#include "Chapter7.h"
#include "Interactable.h"
bool IInteractable::CanInteract_Implementation()
{
return true;
}
void IInteractable::PerformInteract_Implementation()
{
}
| sunithshetty/Unreal-Engine-4-Scripting-with-CPlusPlus-Cookbook | Chapter07/Source/Chapter7/Interactable.cpp | C++ | mit | 175 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('managers', '0011_auto_20150422_2018'),
]
operations = [
migrations.AlterField(
model_name='managerprofile',
... | ritashugisha/ASUEvents | ASUEvents/managers/migrations/0012_auto_20150422_2019.py | Python | mit | 511 |
/**
* @author: @AngularClass
*/
const helpers = require('./helpers');
const webpackMerge = require('webpack-merge'); // used to merge webpack configs
const commonConfig = require('./webpack.common.js'); // the settings that are common to prod and dev
/**
* Webpack Plugins
*/
const DefinePlugin = requir... | AnastasiaPavlova/Angular2Traning | config/webpack.prod.js | JavaScript | mit | 9,907 |
package junit.util;
import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;
/**
* JUnit4からのassertThatアサーションを使いやすくするためのラッパー処理群。<br>
* isのためのimportが面倒、Boxingは避けたいという御仁向け。<br>
* assertThatのシグネチャが改善される可能性を考慮してメソッド名は別名にしています。
*
* @author cobot00
*/
public final class AssertWrapper {
priva... | cobot00/JUnitForEnterprise | test/junit/util/AssertWrapper.java | Java | mit | 2,145 |
from distutils.core import setup
version = '1.1.1'
setup(name='CacheGenerator',
version=version,
description="CacheGenerator for Django",
author="Ricardo Santos",
author_email="ricardo@getgears.com",
url="http://github.com/ricardovice/CacheGenerator/",
packages = ['cachegenerator']... | ricardovice/CacheGenerator | setup.py | Python | mit | 329 |
package log
import (
"io"
"github.com/sirupsen/logrus"
)
type Fields logrus.Fields
type Level uint8
var DebugLevel = Level(logrus.DebugLevel)
var InfoLevel = Level(logrus.InfoLevel)
var WarnLevel = Level(logrus.WarnLevel)
var ErrorLevel = Level(logrus.ErrorLevel)
var logger = logrus.New()
func SetOutput(w io.W... | cadenzr/cadenzr | log/log.go | GO | mit | 1,909 |
<?php
/*
|--------------------------------------------------------------------------
| Defining Global Patterns
|--------------------------------------------------------------------------
| If you would like a route parameter to always be constrained by a given
| regular expression, you may use the pattern method:
|
*... | egalink/proveedores | app/routes.php | PHP | mit | 7,126 |
/* eslint no-console: warn */
const _ = require('lodash');
const { processScore } = require('../helpers/game.js');
const getRandomQuiz = require('../../app/helpers/quizRandomizer.js');
module.exports = function socketHandler(io) {
const players = [];
const game = io.of('/game');
game.on('connect', function (sock... | OperationSpark/code-clash | src/socket/index.js | JavaScript | mit | 1,848 |
'use strict';
import Component from './component';
import VolumeAttachment from './volume-attachment';
import Port from './port';
import {isString} from './util';
const Server = function (properties) {
if (!(this instanceof Server)) {
return new Server(properties);
}
Component.call(this, {
ports: [],... | kazet15/heat-templates | src/server.js | JavaScript | mit | 1,872 |
/**
* Copyright 2014 Kakao Corp.
*
* Redistribution and modification in source or binary forms are not permitted without specific prior written permission.
*
* 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 co... | haruio/haru-example-memo | kakao/src/com/kakao/UnlinkResponseCallback.java | Java | mit | 4,973 |
<?php
/**
* (c) shopware AG <info@shopware.com>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace ShopwarePlugins\Connect\Components\ShippingCosts;
use Shopware\Connect\ShippingCosts\Rule;
use Shopware\Connect\ShippingCosts\Ru... | shopware/SwagConnect | Components/ShippingCosts/ShippingCostRuleVisitor.php | PHP | mit | 4,969 |
package com.target.control;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
public class JpaUtil {
private static EntityManager em;
private static EntityManagerFactory factory;
static {
try {
factory = Persistence.create... | Malehaly/studies-java-jpa-junit | jpa/ExercicioHandsOn09/src/com/target/control/JpaUtil.java | Java | mit | 530 |
package com.crescentflare.appconfig.helper;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Color;
import android.os.Build;
import android.util.TypedValue;
/**
* Library helper: resource access
* A helper library to access app resources for skinning the user interface... | crescentflare/DynamicAppConfigAndroid | AppConfigLib/src/main/java/com/crescentflare/appconfig/helper/AppConfigResourceHelper.java | Java | mit | 1,901 |
using System.Linq;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace UrbanSketchers.Pages
{
/// <summary>
/// the root page
/// </summary>
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class RootPage
{
private bool _isFirst = true;
/// <summary>
... | mscherotter/UrbanSketchers | UrbanSketchers/UrbanSketchers/Pages/RootPage.xaml.cs | C# | mit | 1,707 |
require "rack/tls_tools/hpkp"
require "rack/tls_tools/hsts"
require "rack/tls_tools/secure_cookies"
module Rack
module TlsTools
end
end
| jkraemer/rack-tls_tools | lib/rack/tls_tools.rb | Ruby | mit | 141 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Qwack.Core.Basic;
using Qwack.Core.Curves;
using Qwack.Core.Models;
namespace Qwack.Models.Risk.Mutators
{
public class CurveShiftMutator
{
public static IAssetFxModel AssetCurveShiftRelative(string assetId, dou... | cetusfinance/qwack | src/Qwack.Models/Risk/Mutators/CurveShiftMutator.cs | C# | mit | 2,852 |
define([
'./src/vertebrae'
], function(Vertebrae) {
return Vertebrae;
}); | Evisions/vertebrae | index.js | JavaScript | mit | 78 |
class Image < ActiveRecord::Base
dragonfly_accessor :image
attr_accessible :image, :title
end
| ggouzi/Rails_Exif_Information | app/models/image.rb | Ruby | mit | 99 |
//==================================================================================
// Copyright (c) 2016 , Advanced Micro Devices, Inc. All rights reserved.
//
/// \author AMD Developer Tools Team
/// \file gdDeprecationStatisticsView.cpp
///
//========================================================================... | ilangal-amd/CodeXL | CodeXL/Components/GpuDebugging/AMDTGpuDebuggingComponents/views/src/gdDeprecationStatisticsView.cpp | C++ | mit | 26,164 |
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xam... | Ugonna/AutocompleteTextBox | ComponentTest/App.xaml.cs | C# | mit | 4,221 |
using Microsoft.Xna.Framework;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using Spectrum.Framework.Entities;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Spectrum.Framework.Content
{
public class InitDataPars... | alex-sherman/Spectrum | Framework/Content/InitDataParser.cs | C# | mit | 1,040 |
<?php
namespace pizza\SiteBundle\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://symfony.... | KatrienDeSmet/PizzaWebsite | src/pizza/SiteBundle/DependencyInjection/Configuration.php | PHP | mit | 875 |
<?php
/*
* This file is part of PHPExifTool.
*
* (c) 2012 Romain Neutron <imprec@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPExiftool\Driver\Tag\Lytro;
use JMS\Serializer\Annotation\ExclusionPolicy;
u... | romainneutron/PHPExiftool | lib/PHPExiftool/Driver/Tag/Lytro/AccelerometerY.php | PHP | mit | 815 |
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("Ht... | TelerikAcademy/Windows-Applications | 16. Working-with-Remote-Data/Demo/HttpWebRequestInUWP/Properties/AssemblyInfo.cs | C# | mit | 1,058 |
#!/usr/bin/env python3
# JN 2015-07-29
"""
Log file parser for Cheetah by Johannes Niediek
This script reads out the reference settings
by sequentially following all crs, rbs, and gbd commands.
Please keep in mind that the following scenario is possible with Cheetah:
Start the recording
Stop the recording
Change the... | jniediek/combinato | tools/parse_cheetah_logfile.py | Python | mit | 19,113 |
<?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateEscuelasTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('escuelas', fun... | nelsonalejandrosaz/SIUPS | database/migrations/2017_06_06_212901_create_escuelas_table.php | PHP | mit | 690 |
/*
* Copyright 2007 ZXing authors
*
* 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 ... | zxing-js/library | src/core/qrcode/detector/Detector.ts | TypeScript | mit | 16,330 |
# Simple plotter for Gut books.
# All this does is draw a sqare for every stat in the input
# and color it based on the score.
#
# Another fine example of how Viz lies to you. You will
# need to fudge the range by adjusting the clipping.
import numpy as np
import matplotlib.pyplot as plt
import sys as sys
if len(s... | craigulmer/gut-buster | squareplot.py | Python | mit | 1,320 |
using NBitcoin;
using ReactiveUI;
using Splat;
using System;
using System.Globalization;
using System.Linq;
using System.Reactive;
using System.Reactive.Disposables;
using System.Reactive.Linq;
using WalletWasabi.Blockchain.TransactionOutputs;
using WalletWasabi.CoinJoin.Client.Rounds;
using WalletWasabi.CoinJoin.Commo... | nopara73/HiddenWallet | WalletWasabi.Gui/Controls/WalletExplorer/CoinViewModel.cs | C# | mit | 8,992 |
/*Problem 13. Solve tasks
Write a program that can solve these tasks:
Reverses the digits of a number
Calculates the average of a sequence of integers
Solves a linear equation a * x + b = 0
Create appropriate methods.
Provide a simple text-based menu for the user to choose which task to solve.
Validate the in... | MarinMarinov/C-Sharp-Part-2 | Homework 03-Methods/Problem 13. Solve tasks/Program.cs | C# | mit | 3,087 |
import Ember from 'ember';
import StatefulMixin from './mixins/stateful';
export default Ember.Object.extend(StatefulMixin);
| IvyApp/ivy-stateful | addon/state-machine.js | JavaScript | mit | 126 |
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("Qtm... | qualisys/RTClientSDK.Net | QtmCaptureBroadcasts/Properties/AssemblyInfo.cs | C# | mit | 1,451 |
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import {
Animated,
Easing,
View,
} from 'react-native';
const INDETERMINATE_WIDTH_FACTOR = 0.3;
const BAR_WIDTH_ZERO_POSITION = INDETERMINATE_WIDTH_FACTOR / (1 + INDETERMINATE_WIDTH_FACTOR);
export default class ProgressBar extends Co... | fengshanjian/react-native-komect-uikit | src/Progress/Bar.js | JavaScript | mit | 3,584 |
package gr.iti.openzoo.pojos;
/**
*
* @author Michalis Lazaridis <michalis.lazaridis@iti.gr>
*/
public class Triple<L,M,R> {
private final L left;
private final M middle;
private final R right;
public Triple(L left, M middle, R right) {
this.left = left;
this.middle = middle;
this.right = righ... | VisualComputingLab/OpenZoo | OpenZUI/src/java/gr/iti/openzoo/pojos/Triple.java | Java | mit | 1,025 |
package us.myles.ViaVersion.protocols.protocol1_9to1_8;
import us.myles.ViaVersion.api.PacketWrapper;
import us.myles.ViaVersion.api.remapper.PacketHandler;
import us.myles.ViaVersion.api.type.Type;
import us.myles.ViaVersion.protocols.protocol1_9to1_8.storage.MovementTracker;
public class PlayerMovementMapper extend... | Matsv/ViaVersion | common/src/main/java/us/myles/ViaVersion/protocols/protocol1_9to1_8/PlayerMovementMapper.java | Java | mit | 696 |
<?php
namespace PMocks\Loader;
class Exception extends \PMocks\Exception
{
} | psmokotnin/PMocks | PMocks/Loader/Exception.php | PHP | mit | 78 |
const basicJson = require('./basic.json')
export const jsonExport = {
basicJson
}
| ericwooley/jsonable | tests/files/json-include.json.js | JavaScript | mit | 85 |
package dp;
/**
* Question: http://www.geeksforgeeks.org/count-number-binary-strings-without-consecutive-1s/
*/
public class CountBinaryWithoutConsecutiveOnes {
public int count(int N) {
int[][] memo = new int[N + 1][2];
for (int i = 0; i < memo.length; i++) {
for (int j = 0; j < memo... | scaffeinate/crack-the-code | geeks-for-geeks/src/dp/CountBinaryWithoutConsecutiveOnes.java | Java | mit | 1,025 |
from verbs.baseforms import forms
class SuspendForm(forms.VerbForm):
name = "Suspend"
slug = "suspend"
duration_min_time = forms.IntegerField() | Bionetbook/bionetbook | bnbapp/bionetbook/_old/verbs/forms/suspend.py | Python | mit | 159 |
Csabuilder::Application.configure do
# Settings specified here will take precedence over those in config/application.rb
# In the development environment your application's code is reloaded on
# every request. This slows down response time but is perfect for development
# since you don't have to restart the web... | giratikanon/csa-builder | config/environments/development.rb | Ruby | mit | 1,595 |
/*
* wjquery.calendar 0.1.1
* by composite (wonchu.net@gmail.com)
* http://www.wonchu.net
* This project licensed under a MIT License.
0.1.0 : 최초작성
0.1.1 : 소스정리
*/
(function ($) {
const WCALENDAR_SV = {
ns: "wcalendar",
dateFormat: "YYYYMMDD",
lang: {
ko: {... | bibaboo/bibaboo.github.com | js/lib/wjquery/wjquery.calendar.js | JavaScript | mit | 12,657 |
<?php
/* SensioDistributionBundle::Configurator/final.html.twig */
class __TwigTemplate_97f044a3817b39b7b53a0966d7ee406e extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = $this->env->loadTemplate("SensioDistributionBundle::C... | edconolly/symfony-test | app/cache/dev/twig/97/f0/44a3817b39b7b53a0966d7ee406e.php | PHP | mit | 3,293 |
export * as dijkstra from './dijkstra';
export * as unweighted from './unweighted';
export {
singleSource,
singleSourceLength,
bidirectional,
brandes
} from './unweighted';
export {edgePathFromNodePath} from './utils';
| graphology/graphology | src/shortest-path/index.d.ts | TypeScript | mit | 229 |
# Copyright 2008-2009 Amazon.com, Inc. or its affiliates. All Rights
# Reserved. Licensed under the Amazon Software License (the
# "License"). You may not use this file except in compliance with the
# License. A copy of the License is located at
# http://aws.amazon.com/asl or in the "license" file accompanying this
... | sujoyg/tool | vendor/ec2-ami-tools-1.3-66634/lib/ec2/amitools/uploadbundle.rb | Ruby | mit | 12,081 |
<?php
if (!defined('DS')) {
define('DS', DIRECTORY_SEPARATOR);
}
define('ROOT', realpath(__DIR__) . DS);
if (!file_exists($autoload = ROOT . 'vendor/autoload.php')) {
throw new RuntimeException('Dependencies not installed.');
}
require $autoload;
unset($autoload); | basekit/imanee | bootstrap.php | PHP | mit | 273 |
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: AssemblyTi... | PhilipDaniels/Lithogen | Lithogen/Lithogen.Core/Properties/AssemblyInfo.cs | C# | mit | 1,438 |
from __future__ import absolute_import
import json
from twisted.internet import defer, error
from twisted.python import failure
from twisted.test import proto_helpers
from twisted.trial import unittest
from txjsonrpc import jsonrpc, jsonrpclib
class TestJSONRPC(unittest.TestCase):
def setUp(self):
self.... | Julian/txjsonrpc-tcp | txjsonrpc/tests/test_jsonrpc.py | Python | mit | 8,101 |
import { exec } from "child_process"
import test from "tape"
import cliBin from "./utils/cliBin"
test("--watch error if no input files", (t) => {
exec(
`${ cliBin }/testBin --watch`,
(err, stdout, stderr) => {
t.ok(
err,
"should return an error when <input> or <output> are missing when ... | MoOx/cli-for-files | src/__tests__/watcher.error-no-input.js | JavaScript | mit | 579 |
module Iibee
VERSION = "0.1.21"
end
| quantiguous/iibee | lib/iibee/version.rb | Ruby | mit | 38 |