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 |
|---|---|---|---|---|---|
namespace ArchitectNow.ApiStarter.Api.Models.ViewModels
{
public class LoginResultVm
{
public string AuthToken { get; set; }
public UserVm CurrentUser { get; set; }
}
} | ArchitectNow/ArchitectNow.ApiStarter | src/ArchitectNow.ApiStarter.Api/Models/ViewModels/LoginResultVm.cs | C# | mit | 199 |
class ExpressionRelationshipType < ActiveRecord::Base
attr_accessible :name, :position, :definition, :url
acts_as_list
end
| nabeta/enju_root | app/models/expression_relationship_type.rb | Ruby | mit | 127 |
<?php
#############################################################################
# IMDBPHP (c) Giorgos Giagas & Itzchak Rehberg #
# written by Giorgos Giagas #
# extended & maintained by Itzchak Rehberg <izzysoft AT qumran DOT org> #
# ... | rnavarro/Movie-Magic | imdbphp2/imdb_budget.class.php | PHP | mit | 15,927 |
/*jshint node: true, eqnull: true*/
exports.purge = require('./lib/purge').AkamaiPurge; | patrickkettner/grunt-akamai-clear | node_modules/akamai/akamai.js | JavaScript | mit | 88 |
() => {
const [startDate, setStartDate] = useState(new Date());
let handleColor = (time) => {
return time.getHours() > 12 ? "text-success" : "text-error";
};
return (
<DatePicker
showTimeSelect
selected={startDate}
onChange={(date) => setStartDate(date)}
timeClassName={handleCo... | Hacker0x01/react-datepicker | docs-site/src/examples/customTimeClassName.js | JavaScript | mit | 340 |
'use strict';
var arg = require('../util').arg;
var oneDHeightmapFactory = require('../1d-heightmap');
var rng = require('../rng');
var random = rng.float;
var randomRange = rng.range;
var randomRangeInt = rng.rangeInt;
var randomSpacedIndexes = rng.space... | unstoppablecarl/1d-heightmap | src/key-indexes/index.js | JavaScript | mit | 11,619 |
namespace PaintShop.Models
{
using System.Security.Claims;
using System.Threading.Tasks;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
public class ApplicationUser : IdentityUser
{
public async Task<ClaimsIdentity> GenerateUserIdentityAsync(UserManag... | georgipyaramov/PaintShop | PaintShop/PaintShop.Models/ApplicationUser.cs | C# | mit | 693 |
package ruanmianbao.binetwork;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.Socket;
import java.net.UnknownHostException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.text.SimpleDateFormat;
import java.util.Calendar;
... | flairyu/binetwork | src/ruanmianbao/binetwork/Main.java | Java | mit | 7,911 |
using Keeper.Warm;
using System;
using System.Collections.Generic;
namespace Keeper.Warm
{
public class QueryResult
{
private Machine machine;
private Variable[] variables;
public QueryResult(bool success, Variable[] variables, Machine machine)
{
this.Success = suc... | FacticiusVir/Warm | Keeper.Warm/QueryResult.cs | C# | mit | 3,572 |
using System;
using System.IO;
using System.Linq;
using SharpCompress.IO;
namespace SharpCompress.Common.SevenZip
{
internal class SevenZipFilePart : FilePart
{
private CompressionType? _type;
private readonly Stream _stream;
private readonly ArchiveDatabase _database;
interna... | adamhathcock/sharpcompress | src/SharpCompress/Common/SevenZip/SevenZipFilePart.cs | C# | mit | 3,350 |
using System;
using System.Collections.Generic;
using Mailer.NET.Mailer.Rendering;
using Mailer.NET.Mailer.Transport;
using Mailer.NET.Mailer.Internal;
using Mailer.NET.Mailer.Response;
using System.Threading.Tasks;
namespace Mailer.NET.Mailer
{
public class Email
{
public AbstractTransport Transport ... | Inside-Sistemas/mailer.net | src/Mailer.NET/Mailer/Email.cs | C# | mit | 3,511 |
// <copyright file="ParsingTests.cs" company="MIT License">
// Licensed under the MIT License. See LICENSE file in the project root for license information.
// </copyright>
namespace SmallBasic.Tests.Compiler
{
using SmallBasic.Compiler;
using SmallBasic.Compiler.Diagnostics;
using Xunit;
public seale... | OmarTawfik/SuperBasic | Source/SmallBasic.Tests/Compiler/ParsingTests.cs | C# | mit | 11,842 |
'use strict';
/**
* practice Node.js project
*
* @author Huiming Hou <240050497@qq.com>
*/
import mongoose from 'mongoose';
module.exports = function(done){
const debug = $.createDebug('init:mongodb');
debug('connecting to MongoDB...');
const conn = mongoose.createConnection($.config.get('db.mongodb'));
... | hhmpro/node-practice-project | src/init/mongodb.js | JavaScript | mit | 450 |
#!/usr/bin/env ruby
require 'rubygems'
require 'json'
require 'net/http'
require 'google_drive'
require 'yaml'
require 'time'
require 'twitter'
require 'active_support/all'
require 'pry'
require 'logger'
def log_time(input, type = 'info')
puts Time.now.to_s + " " + type + ": " + input
$LOG.error(input) if type == ... | AmnestyInternational/visor | twitter_to_gdoc.rb | Ruby | mit | 7,536 |
<?php
location(BASEURL ."/view/t411/search"); | Reeska/restinpi | src/server/plugins/t411/views/index.php | PHP | mit | 46 |
using System;
using System.Collections.Generic;
using System.Linq;
using Polyglot;
using Cysharp.Threading.Tasks;
using LiteDB;
using Sentry;
using UnityEngine;
#if UNITY_IOS
using UnityEngine.iOS;
#elif UNITY_ANDROID
using Google.Play.Review;
#endif
public class Player
{
public string Id => Settings.PlayerId;
... | TigerHix/Cytoid | Assets/Scripts/Player/Player.cs | C# | mit | 24,520 |
namespace GiveCRM.Web.Areas.Admin.Controllers
{
using System;
using System.Web;
using System.Web.Mvc;
internal class ElmahResult : ActionResult
{
private readonly string resourceType;
public ElmahResult(): this(null)
{ }
public ElmahResult(string resourceType)
... | GiveCampUK/GiveCRM | src/GiveCRM.Web/Areas/Admin/Controllers/ElmahResult.cs | C# | mit | 1,826 |
// Copyright (C) 2011-2019 Roki. Distributed under the MIT License
#ifndef INCLUDED_SROOK_TMPL_VT_SET_DIFFERENCE_HPP
#define INCLUDED_SROOK_TMPL_VT_SET_DIFFERENCE_HPP
#include <srook/tmpl/vt/detail/config.hpp>
#include <srook/tmpl/vt/unique.hpp>
#include <srook/tmpl/vt/concat.hpp>
#include <srook/tmpl/vt/not_fn.hpp>
#... | falgon/SrookCppLibraries | srook/tmpl/vt/set_difference.hpp | C++ | mit | 1,711 |
/*
* The MIT License
*
* Copyright 2014 Paulius Šukys.
*
* 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, m... | shookees/SmartFood_old | src/smartfood/YummlyWrapper.java | Java | mit | 7,629 |
var request = require('request'),
Q = require('q'),
xml2js = require('xml2js'),
_ = require('lodash');
module.exports = {
/**
* Helper function that handles the http request
*
* @param {string} url
*/
httprequest: function(url) {
var deferred = Q.defer();
request(url, ... | LoganArnett/node-zillow | lib/helpers.js | JavaScript | mit | 1,998 |
# frozen_string_literal: true
module Signable
module Concerns
module Query
extend ActiveSupport::Concern
def save
return false unless valid?
persisted? ? update : create
end
def delete
self.class.client.delete self.class.entry_point, id
end
def pers... | smartpension/signable | lib/signable/concerns/query.rb | Ruby | mit | 1,321 |
var closet = closet || {};
(function($) {
closet.folders = (function() {
var iconPlus = '<img class="icon" style="width:10px" src="/static/image/16x16/Plus.png"/>';
var iconMinus = '<img class="icon" style="width:10px" src="/static/image/16x16/Minus.png"/>';
var iconEmpty = '<img class="icon" style="width:... | mudynamics/pcapr-local | lib/pcapr_local/www/static/script/closet/closet.folders.js | JavaScript | mit | 3,861 |
import sys
import pdb
import svgfig
import json
import os
import math
import random
def show_help():
print("Usage: main.py input_file [--silent] [--output=<out.svg>]" +
" [--order=order.txt]")
print("Input file is either a text file containing t u v," +
"or a JSON file where the following ... | JordanV/LinkStreamViz | main.py | Python | mit | 11,963 |
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-comp-4719',
templateUrl: './comp... | angular/angular-cli-stress-test | src/app/components/comp-4719/comp-4719.component.ts | TypeScript | mit | 484 |
from django.contrib import admin
from player.models import Room, PlaylistTrack
from ordered_model.admin import OrderedModelAdmin
class RoomAdmin(admin.ModelAdmin):
list_display = ('name', 'shuffle', 'current_music', 'can_adjust_volume')
class ItemAdmin(OrderedModelAdmin):
list_display = ('move_up_down_link... | Amoki/Amoki-Music | player/admin.py | Python | mit | 434 |
define(function(require) {
var $ = require('jquery');
var Point = require('joss/geometry/Point');
var _scrollIsRelative = !($.browser.opera || $.browser.safari && $.browser.version < "532");
/**
* Returns a DOM element lying at a point
*
* @param {joss/geometry/Point} p
* @return {Element}
*/
var fr... | zship/joss | src/joss/util/elements/fromPoint.js | JavaScript | mit | 681 |
/* Google Material Design Icons */
export declare const sharp10k: string;
export declare const sharp10mp: string;
export declare const sharp11mp: string;
export declare const sharp12mp: string;
export declare const sharp13mp: string;
export declare const sharp14mp: string;
export declare const sharp15mp: string;
expo... | pdanpdan/quasar | extras/material-icons-sharp/index.d.ts | TypeScript | mit | 88,356 |
import gulp from 'gulp';
import runSequence from 'run-sequence';
gulp.task('dev', ['clean'], function(cb) {
global.isProd = false;
runSequence(['styles', 'images', 'fonts', 'views','vendor'], 'browserify', 'watch', cb);
});
| tungptvn/tungpts-ng-blog | gulp/tasks/development.js | JavaScript | mit | 239 |
export class AddProduct {
public title: string;
public description: string;
public author: number;
public price: number;
public photos: any;
constructor(data) {
this.title = data.title;
this.description = data.description;
this.author = data.author;
this.price = data.price;
this.photos ... | PavelVak/sell-it | src/app/shared/models/add-product.model.ts | TypeScript | mit | 341 |
module QueryStringSearch
class MatcherFactory
def self.build(search_option, build_options)
matcher_to_build = build_options.detect { |m| m.build_me?(search_option) }
if matcher_to_build
matcher = matcher_to_build.new
matcher.attribute = search_option.attribute
... | umn-asr/query_string_search | lib/query_string_search/matcher_factory.rb | Ruby | mit | 473 |
package formatters
import (
"fmt"
"testing"
)
type str struct{}
func (s str) String() string {
return "test"
}
func TestFormatArray(t *testing.T) {
testCases := []struct {
name string
in interface{}
ret string
}{
{"array string", []string{"value 1", "value 2", "value 3"}, `{"value 1","value 2","valu... | nuveo/prest | adapters/postgres/formatters/formatters_test.go | GO | mit | 931 |
import 'syncfusion-javascript/Scripts/ej/web/ej.radiobutton.min';
import { CommonModule } from '@angular/common';
import { EJComponents } from './core';
import { EventEmitter, Type, Component, ElementRef, ChangeDetectorRef, Input, Output, NgModule, ModuleWithProviders, Directive, forwardRef } from '@angular/core';
impo... | Dyalog/MiServer | PlugIns/Syncfusion-15.3.0.33/assets/angular2/radiobutton.component.ts | TypeScript | mit | 2,349 |
class HomeController < ApplicationController
def index
# asdsa
end
end
| shamithc/tailf | test/dummy/app/controllers/home_controller.rb | Ruby | mit | 78 |
<?php
require_once 'frontHomeLogin.php';
require_once 'backOpenSession.php';
require_once 'backCloseSession.php';
require_once 'backCheckLogin.php';
manageLogin();
function manageLogin() {
$user = (string) $_POST["username"];
$password = (string) $_POST["password"];
if (checkLogin($user, $pass... | martinbosse/exercice_login | middleLogin.php | PHP | mit | 626 |
<?php
/**
* Copyright (c) 2017. Puerto Parrot Booklet. Written by Dimitri Mostrey for www.puertoparrot.com
* Contact me at admin@puertoparrot.com or dmostrey@yahoo.com
*/
namespace App\Listeners\Articles\Comments;
use App\Events\Articles\Comments\Approved;
use App\Mail\Articles\Comments\ApprovedToAdmin;
use App\Mo... | Dimimo/Booklet | app/Listeners/Articles/Comments/ApprovedEmailAdmin.php | PHP | mit | 1,155 |
/**
*
* @type {*}
* @private
*/
jDoc.Engines.RTF.prototype._specialControlWords = [
"chpgn",
"chftn",
"chdate",
"chtime",
"chatn",
"chftnsep",
"/",
":",
"*",
"~",
"-",
"_",
"'hh",
"page",
"line",
"раr",
"sect",
"tab",
"сеll",
"row",
... | pavel-voronin/jDoc | js/engines/RTF/reader/private/_specialControlWords.js | JavaScript | mit | 383 |
//using System;
//using Microsoft.EntityFrameworkCore.Infrastructure;
//using Discord.Commands;
//using Microsoft.Extensions.DependencyInjection;
//using System.Collections.Generic;
//namespace Discord.Addons.SimplePermissions
//{
// /// <summary> </summary>
// public sealed class EFCommandServiceExtension : ID... | Joe4evr/Discord.Addons | src/Discord.Addons.SimplePermissions.EFProvider/EFCommandServiceExtension.cs | C# | mit | 1,588 |
export default function album() {
return {
getAlbum: id => this.request(`${this.apiURL}/albums/${id}`),
getAlbums: ids => this.request(`${this.apiURL}/albums/?ids=${ids}`),
getTracks: id => this.request(`${this.apiURL}/albums/${id}/tracks`),
};
}
| dtfialho/js-tdd-course | module-06/src/album.js | JavaScript | mit | 263 |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="sah" version="2.0">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About NSAcoin Core</source>
<translation type="unfinished"/>
</message>
<message>
<location ... | nsacoin/nsacoin | src/qt/locale/bitcoin_sah.ts | TypeScript | mit | 130,888 |
package ru.sendto.gwt.client.html;
public class Th extends WidgetBase {
public Th() {
super("th");
}
public void setRowspan(String rows){
getElement().setAttribute("rowspan", rows);
}
public void setColspan(String cols){
getElement().setAttribute("colspan", cols);
}
}
| nleva/gwthtml | HtmlGwt/src/main/java/ru/sendto/gwt/client/html/Th.java | Java | mit | 287 |
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("Pas... | spiderbait90/Step-By-Step-In-Coding | C# Fundamentals/C# Advanced/Multidimensional Arrays/Pascal Triangle/Properties/AssemblyInfo.cs | C# | mit | 1,431 |
function airPollution(sofiaMap, forces) {
for (let i = 0; i < sofiaMap.length; i++) {
sofiaMap[i] = sofiaMap[i].split(' ').map(Number)
}
for (let i = 0; i < forces.length; i++) {
forces[i] = forces[i].split(' ')
}
for (let i = 0; i < forces.length; i++) {
for (let k = 0; k < ... | b0jko3/SoftUni | JavaScript/Core/Fundamentals/Exams/11_Feb_2018/02._Air_Pollution.js | JavaScript | mit | 1,937 |
using System;
using System.ComponentModel;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Windows.Forms;
public class GradientPanel : Panel
{
public Color GradientFirstColor = Color.FromArgb(33, 33, 33);
public Color GradientSecondColor = Color.FromArgb(22, 22, 22);
public GradientPane... | mikadev001/SublimeText-Overlay | SublimeOverlay/GradientPanel.cs | C# | mit | 908 |
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.data.tables.models;
import com.azure.core.annotation.Fluent;
/**
* A model representing configurable metrics settings of the Table service.
*/
@Fluent
public final class TableServiceMetrics {
/*
... | Azure/azure-sdk-for-java | sdk/tables/azure-data-tables/src/main/java/com/azure/data/tables/models/TableServiceMetrics.java | Java | mit | 3,217 |
# frozen_string_literal: true
module Eve
class LocalPlanetsImporter
def import
Eve::Planet.pluck(:planet_id).each do |planet_id|
Eve::UpdatePlanetJob.perform_later(planet_id)
end
end
end
end
| biow0lf/evemonk | app/importers/eve/local_planets_importer.rb | Ruby | mit | 224 |
package com.scut.picturelibrary.manager;
import android.content.Context;
import android.media.AudioManager;
import android.media.MediaPlayer;
import android.media.MediaPlayer.OnCompletionListener;
import android.media.MediaPlayer.OnErrorListener;
import android.media.MediaPlayer.OnPreparedListener;
import android.view... | inexistence/PictureLibrary | src/com/scut/picturelibrary/manager/VideoManager.java | Java | mit | 1,631 |
using System;
using System.Configuration;
using System.Web;
using Portal.Core.Content;
namespace Portal.Web.Helpers
{
public static class CookieHelper
{
private static readonly HttpContext HttpContext;
private static readonly string NameCookieContentType;
private static readonly string... | EtwasGE/InformationPortal | Portal.Web/Helpers/CookieHelper.cs | C# | mit | 4,698 |
class RequirementsController < ApplicationController
before_filter :authenticate_user!
before_filter :require_project_involvement
before_filter :find_story
def create
@requirement = @story.pending_requirements.build(params[:requirement])
if @requirement.save
flash[:notice] = 'Requirement added'
... | avdgaag/storyteller | app/controllers/requirements_controller.rb | Ruby | mit | 701 |
<?php
/**
*
* @author dev
* @created 2015-09-17 10:57:04
*/
namespace Application;
use Application\Parse\TodoGrid;
use Bluz;
return
/**
* @return \closure
*/
function () use ($view) {
$view->grid = new TodoGrid();
}; | bashmach/bluz-skeleton-parse | application/modules/parse/controllers/grid.php | PHP | mit | 231 |
require 'spec_helper'
# Specs in this file have access to a helper object that includes
# the ProductsHelper. For example:
#
# describe ProductsHelper do
# describe "string concat" do
# it "concats two strings with spaces" do
# helper.concat_strings("this","that").should == "this that"
# end
# end
# ... | LRDesign/mizugumo_demo | spec/helpers/products_helper_spec.rb | Ruby | mit | 355 |
<?php
namespace Anetwork\Validation;
use Anetwork\Validation\ValidationMessages;
/**
* @author Shahrokh Niakan <sh.niakan@anetwork.ir>
* @since May 21, 2016
*/
class ValidationRules
{
/**
* @var boolean
*/
protected $status;
/**
* validate persian alphabet and space
* @param $attri... | anetwork/validation | src/ValidationRules.php | PHP | mit | 13,284 |
<?php
/**
* WPSEO plugin file.
*
* @package WPSEO\Admin\Links
*/
/**
* Represents the link count storage.
*/
class WPSEO_Meta_Storage implements WPSEO_Installable {
const TABLE_NAME = 'yoast_seo_meta';
/**
* @var WPSEO_Database_Proxy
*/
protected $database_proxy;
/**
* @deprecated
*
* @var null|... | agencja-acclaim/gulp-bower-webapp | wp-content/plugins/wordpress-seo/admin/class-meta-storage.php | PHP | mit | 2,857 |
package net.coding.program.task;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.view.ActionMode;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import net.coding.program.R;
import net.coding.program.common.Global;
import... | Coding/Coding-Android | app/src/main/java/net/coding/program/task/TaskDescripMdFragment.java | Java | mit | 3,443 |
"use strict";
exports.default = {
type: "html",
url: "http://www.xnview.com/en/xnviewmp/",
getVersion: function($) {
return $("#downloads p")
.contains("Download")
.find("strong")
.version("XnView MP @version");
}
};
| foxable/app-manager | storage/apps/xnview-mp/versionProvider.js | JavaScript | mit | 277 |
///////////////////////////////////////////////////////////////////////////
// Copyright © Esri. All Rights Reserved.
//
// 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.ap... | tmcgee/cmv-wab-widgets | wab/2.13/widgets/ParcelDrafter/nls/tr/strings.js | JavaScript | mit | 5,323 |
/*globals $:false, _:false, Firebase:false */
'use strict';
var url = 'https://jengaship.firebaseio.com/',
fb = new Firebase(url),
gamesFb = new Firebase(url + 'games'),
games,
avaGames = [],
emptyGames = [],
myGames = [],
myBoardPositions = [],
current... | kylemcco/jengaship | app/scripts/index.js | JavaScript | mit | 19,418 |
require_relative "test_helper"
class TestService < Mailkick::Service
def opt_outs
[
{email: "test@example.com", time: Time.current, reason: "bounce"},
{email: "test2@example.com", time: 1.day.ago, reason: "spam"}
]
end
end
class ServiceTest < Minitest::Test
def setup
super
Mailkick.s... | ankane/mailkick | test/service_test.rb | Ruby | mit | 1,549 |
<?php
namespace {AppNamespace}Components\{ComponentName};
use Teepluss\Component\BaseComponent;
use Illuminate\Foundation\Application as Application;
use Teepluss\Component\Contracts\BaseComponent as BaseComponentContract;
class {ComponentName} extends BaseComponent implements BaseComponentContract
{
/**
*... | teepluss/laravel-component | src/templates/component/ExampleComponent.php | PHP | mit | 1,609 |
<?php
return array (
'id' => 'alltel_ppc6800_ver1',
'fallback' => 'sprint_ppc6800_ver1_subie711',
'capabilities' =>
array (
'brand_name' => 'HTC',
'model_extra_info' => 'Alltel',
'playback_acodec_amr' => 'nb',
'playback_wmv' => '7',
),
);
| cuckata23/wurfl-data | data/alltel_ppc6800_ver1.php | PHP | mit | 266 |
// Copyright (c) 2017 AB4D d.o.o.
//
// 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, publish,... | ab4d/Ab3d.OculusWrap | Ab3d.OculusWrap/Ab3d.OculusWrap/TrackerFlags.cs | C# | mit | 1,882 |
#include "googletest/googletest/include/gtest/gtest.h"
#include "main.h"
#include "mocks/mtxdb.h"
#include "wallet.h"
// how many times to run all the tests to have a chance to catch errors that only show up with particular
// random shuffles
#define RUN_TESTS 100
// some tests fail 1% of the time due to bad luck.
/... | NeblioTeam/neblio | wallet/test/wallet_tests.cpp | C++ | mit | 16,924 |
# coding:utf-8
require 'test_helper'
class VacancyTest < ActiveSupport::TestCase
test 'is invalid without a vacancy_id' do
vacancy = Factory.build(:vacancy, :vacancy_id => nil)
assert_equal false, vacancy.valid?
end
test '.to_solr_document' do
vacancy = Factory.build(:vacancy,
... | gds-attic/jobs | test/unit/vacancy_test.rb | Ruby | mit | 5,259 |
import { Durations } from '../../Constants.js';
const DrawCard = require('../../drawcard.js');
const AbilityDsl = require('../../abilitydsl.js');
class MatsuKoso extends DrawCard {
setupCardAbilities() {
this.action({
title: 'Lower military skill',
condition: context => context.sour... | gryffon/ringteki | server/game/cards/12-SoW/MastuKoso.js | JavaScript | mit | 964 |
package typhon
import (
"context"
"net/http"
"testing"
"github.com/monzo/terrors"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func TestExpirationFilter(t *testing.T) {
t.Parallel()
svc := Service(func(req Request) Response {
return req.Response("ok")
})
svc = svc.Filter(... | monzo/typhon | expire_test.go | GO | mit | 1,033 |
#include <iostream>
#include <vector>
#include <cstdlib>
#include <ctime>
#include <queue>
#include "queue.h"
#include "../test_helpers.h"
template<template<typename T> class ConcreteQueue>
void test_queue(TestHelper& th) {
{
th.message("Default construction");
ConcreteQueue<int> q;
th.tassert();
th.... | fcarreiro/crashingthecode | structures/queue.test.cc | C++ | mit | 3,768 |
//
// Copyright (c) 2016 Terry Seyler
//
// Distributed under the MIT License
// See accompanying file LICENSE.md
//
#include <boost/bind.hpp>
#include <core/server/proto_tcp_text_server.hpp>
#include <core/client/proto_tcp_text_client.hpp>
using namespace boost::asio::ip;
namespace proto_net
{
using namespac... | tseyler/proto-server | proto_server/core/server/proto_tcp_text_server.cpp | C++ | mit | 2,872 |
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: AssemblyConfigu... | JasonYang-MSFT/azure-sdk-for-net | src/SdkCommon/ClientRuntime/Test/ClientRuntime.E2E.Tests/Properties/AssemblyInfo.cs | C# | mit | 856 |
#!/usr/bin/env python
# Copyright (c) 2002-2003 ActiveState Corp.
# Author: Trent Mick (TrentM@ActiveState.com)
"""Test suite for which.py."""
import sys
import os
import re
import tempfile
import unittest
import testsupport
#XXX:TODO
# - def test_registry_success(self): ...App Paths setting
# - def test_regist... | fsys/which | test/test_which.py | Python | mit | 6,969 |
// tslint:disable:no-empty
import { Component, Input, OnInit } from '@angular/core';
/**
* Foo doc
*/
@Component({
selector: '[foo]',
template: '<button (click)="forTemplateOnly()">{{buttonTxt}}</button>',
exportAs: 'foo'
})
export class FooComponent implements OnInit {
@Input() buttonTxt;
constructor() {... | valor-software/ng2-handsontable | scripts/docs/api-doc-test-cases/component-with-internal-methods.ts | TypeScript | mit | 553 |
package br.com.digituz.mailer.controller;
import br.com.digituz.mailer.model.Email;
import br.com.digituz.mailer.model.Message;
import br.com.digituz.mailer.service.EmailService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springfra... | Digituz/mailer | src/main/java/br/com/digituz/mailer/controller/EmailController.java | Java | mit | 1,350 |
require 'spec_helper'
describe Worochi::Helper do
describe '.is_s3_path?', :aws do
it 'recognizes an S3 path' do
expect(Worochi::Helper.is_s3_path?('s3:test/path')).to be_true
end
it 'rejects other paths' do
expect(Worochi::Helper.is_s3_path?('test/path')).to be_false
expect(Worochi::... | Pixelapse/worochi | spec/worochi/helper_spec.rb | Ruby | mit | 1,045 |
# frozen_string_literal: true
require 'spec_helper'
describe RubyRabbitmqJanus::Janus::Responses::Admin, type: :responses,
name: :admin do
let(:response) { described_class.new(message) }
describe '#libnice_debug' do
context 'with no libnice_debug' do
... | dazzl-tv/ruby-rabbitmq-janus | spec/ruby_rabbitmq_janus/janus/responses/admin_libnice_debug_spec.rb | Ruby | mit | 656 |
package main
import (
"fmt"
"io/ioutil"
"net/http"
"net/http/httptest"
"os"
"testing"
"github.com/darwinfroese/gowt/mux"
)
const expectedOutput string = "Hello World"
var srv *httptest.Server
func TestMain(m *testing.M) {
setup()
code := m.Run()
shutdown()
os.Exit(code)
}
func setup() {
m := mux.Ne... | darwinfroese/gowt | tests/mux/main_test.go | GO | mit | 897 |
#!/usr/bin/env ruby
#
# setup.rb
#
# Copyright (c) 2000-2005 Minero Aoki
#
# This program is free software.
# You can distribute/modify this program under the terms of
# the GNU LGPL, Lesser General Public License version 2.1.
#
unless Enumerable.method_defined?(:map) # Ruby 1.4.6
module Enumerable
alias map c... | rsms/rhp | install.rb | Ruby | mit | 34,762 |
package main
import (
"encoding/json"
"errors"
"fmt"
"log"
"net/http"
"regexp"
"strconv"
"strings"
"github.com/dghubble/go-twitter/twitter"
"github.com/dghubble/oauth1"
)
var (
twitterUsername string
twitterConsumerKey string
twitterConsumerSecret string
twitterAuthToken string
twitterAu... | rjchee/spongemock | cmd/worker/twitter.go | GO | mit | 8,721 |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v1/common/tag_snippet.proto
package common
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
wrappers "github.com/golang/protobuf/ptypes/wrappers"
enums "google.golang.org/genproto/googleapis/ads/googleads/v1/... | pushbullet/engineer | vendor/google.golang.org/genproto/googleapis/ads/googleads/v1/common/tag_snippet.pb.go | GO | mit | 6,534 |
'use strict';
require('../../../TestHelper');
/* global bootstrapDiagram, inject */
var modelingModule = require('../../../../lib/features/modeling'),
bendpointsModule = require('../../../../lib/features/bendpoints'),
rulesModule = require('./rules'),
interactionModule = require('../../../../lib/feature... | camunda-internal/bpmn-quiz | node_modules/diagram-js/test/spec/features/bendpoints/BendpointsSpec.js | JavaScript | mit | 4,569 |
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux'
import Landing from './../Landing'
import * as UserActions from './../actions/User'
function mapStateToProps(state) {
return {
user: state.userStore.user
}
}
const mapDispatchToProps = (dispatch) => {
return bindActio... | Briseus/Kape | src/containers/Landing.js | JavaScript | mit | 425 |
# Made by Christian Oliveros on 04/10/2017 for MMKF15
# Imports Used
import decimal as d
try:
from .constants import VL, EPSILON, STEP_MAX
except SystemError as e:
from constants import VL, EPSILON, STEP_MAX
class Vector3(object):
"""Class that represents a Vector with 3 coordinates"""
def __init__(self, x=0.0... | maniatic0/rasppi-printer | Utilities/vector.py | Python | mit | 5,714 |
import Resolver from 'ember/resolver';
import loadInitializers from 'ember/load-initializers';
Ember.MODEL_FACTORY_INJECTIONS = true;
var App = Ember.Application.extend({
modulePrefix: 'tvdb', // TODO: loaded via config
Resolver: Resolver
});
loadInitializers(App, 'tvdb');
export default App;
| bolotyuh/ember-symfony-starterkit | web/ember/foo/app/app.js | JavaScript | mit | 302 |
YUI.add('dataschema-array', function (Y, NAME) {
/**
* Provides a DataSchema implementation which can be used to work with data
* stored in arrays.
*
* @module dataschema
* @submodule dataschema-array
*/
/**
Provides a DataSchema implementation which can be used to work with data
stored in arrays.
See the `app... | braz/mojito-helloworld | node_modules/mojito/node_modules/yui/dataschema-array/dataschema-array.js | JavaScript | mit | 6,625 |
using Reactive.Bindings;
namespace LiveLinq.Tests
{
public class SelectObservableCollectionViewModel
{
public SelectObservableCollectionViewModel(string name)
{
Name = new ReactiveProperty<string>(name);
}
public ReactiveProperty<string> Name { get; private set; }
... | ApocalypticOctopus/Apocalyptic.Utilities.Net | LiveLinq.Tests/SelectObservableCollectionViewModel.cs | C# | mit | 327 |
import { hash as calculateHash } from '@collectable/core';
import { getHash } from '../internals/primitives';
import { HashMapStructure } from '../internals/HashMap';
import { NOTHING } from '../internals/nodes';
export function has<K, V> (key: K, map: HashMapStructure<K, V>): boolean;
export function has<K, V> (key: ... | frptools/collectable | packages/map/src/functions/has.ts | TypeScript | mit | 454 |
/*
Licensed under MIT license
(c) 2017 Reeleezee BV
*/
package misc
import (
"crypto/rand"
"fmt"
)
func MaxString(data interface{}, length int) string {
if data != nil {
data := data.(string)
if len(data) > length {
return data[:length]
}
return data
}
return ""
}
// NO REAL UUID!
// Consider a bette... | reeleezee/reeleezee-api-go | misc/string.go | GO | mit | 696 |
module.exports = (function () {
var moduleName = 'cut-media-queries';
var lolArrayDiff = function(array1, array2) {
var diff1 = array1.filter(function(elem){
return array2.indexOf(elem) === -1;
});
var diff2 = array2.filter(function(elem){
return array1.indexOf(elem) === -1;
});
return diff1.conca... | iVariable/csscomb-cut-media-queries | options/cut-media-queries.js | JavaScript | mit | 2,636 |
<?php
/**
* Copyright (c) 2017 - 2019 - Bas Milius <bas@mili.us>
*
* This file is part of the Cappuccino package.
*
* For the full copyright and license information, please view the
* LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Cappuccino\Loader;
use Cappucci... | basmilius/Cappuccino | src/Cappuccino/Loader/ChainLoader.php | PHP | mit | 3,459 |
# This file is NOT licensed under the GPLv3, which is the license for the rest
# of YouCompleteMe.
#
# Here's the license text for this file:
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either... | astrellon/cotsb | server/.ycm_extra_conf.py | Python | mit | 5,739 |
using System;
using System.Collections.Generic;
using System.Linq;
using SMLimitless.Interfaces;
using SMLimitless.Physics;
namespace SMLimitless.Extensions
{
/// <summary>
/// Contains extension methods for types implementing the <see
/// cref="IPositionable2" /> interface.
/// </summary>
public static clas... | smldev/smlimitless | MonoGame/SMLimitless/SMLimitless/Extensions/PositionableExtensions.cs | C# | mit | 1,698 |
package com.group.cms.core.dao;
import java.io.Serializable;
import java.util.List;
public interface BaseDao<T, ID extends Serializable> {
/**
* insert
* @param entity
* @return 插入的行数
*/
int insert(T entity);
/**
* update
* @param entity
* @return 修改的行数
*/
int update(T entity);
/**
* delet... | iyujian/cms | cms-core/src/main/java/com/group/cms/core/dao/BaseDao.java | Java | mit | 762 |
package xyz.gsora.toot;
import MastodonTypes.Status;
import android.app.IntentService;
import android.app.NotificationManager;
import android.content.Context;
import android.content.Intent;
import android.support.v4.app.NotificationCompat;
import android.util.Log;
import io.reactivex.Observable;
import io.reactivex.an... | gsora/TootApp | app/src/main/java/xyz/gsora/toot/PostStatus.java | Java | mit | 5,531 |
// Dependencies
const {types} = require('focus').component;
// Components
const ContextualActions = require('../action-contextual').component;
const CheckBox = require('../../common/input/checkbox').component;
// Mixins
const translationMixin = require('../../common/i18n').mixin;
const referenceMixin = require('..... | JRLK/focus-components | src/list/selection/line.js | JavaScript | mit | 4,528 |
package net.loomchild.maligna.filter.aligner.align;
import static net.loomchild.maligna.util.TestUtil.assertAlignmentEquals;
import static org.junit.Assert.assertEquals;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import net.loomchild.maligna.coretypes.Alignment;
import org.juni... | loomchild/maligna | maligna/src/test/java/net/loomchild/maligna/filter/aligner/align/AlignAlgorithmMockTest.java | Java | mit | 1,986 |
#include <xpcc/architecture.hpp>
#include <xpcc/communication.hpp>
#include <xpcc/communication/backend/tipc/tipc.hpp>
#include <xpcc/debug/logger.hpp>
// set new log level
#undef XPCC_LOG_LEVEL
#define XPCC_LOG_LEVEL xpcc::log::DEBUG
#include "component_receiver/receiver.hpp"
#include "component_sender/sender.hpp... | jrahlf/3D-Non-Contact-Laser-Profilometer | xpcc/examples/linux/communication/basic/main.cpp | C++ | mit | 1,053 |
class AddUserIdToFriends < ActiveRecord::Migration
def change
add_column :friends, :user_id, :integer
end
end
| suntorytime/project_mate2 | db/migrate/20160422230113_add_user_id_to_friends.rb | Ruby | mit | 118 |
'use strict';
var assert = require('assert');
var extraStep = require('../../../lib/tasks/extra-step');
var MockUI = require('../../helpers/mock-ui');
describe('Extra Step', function() {
var ui;
var dummySteps = [
{ command: 'echo "command number 1"' },
{ command: 'echo "command number 2"' },
{... | AReallyGoodName/ember-cli-s3-sync-index-last-no-cache | tests/unit/tasks/extra-step-test.js | JavaScript | mit | 2,577 |
# -*- coding: utf-8 -*-
#
# py-uwerr documentation build configuration file, created by
# sphinx-quickstart on Sat Nov 24 19:07:07 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# Al... | dhesse/py-uwerr | doc/conf.py | Python | mit | 7,830 |
/*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/NYSE-Engine | App/WEC.php | PHP | mit | 5,298 |
// ==========================================================================
// SeqAn - The Library for Sequence Analysis
// ==========================================================================
// Copyright (c) 2006-2012, Knut Reinert, FU Berlin
// All rights reserved.
//
// Redistribution ... | bkahlert/seqan-research | raw/pmbs12/pmsb13-data-20120615/sources/wtg1fr816tg4hs6w/5/core/tests/basic/test_basic_metaprogramming.cpp | C++ | mit | 10,082 |
package model.neighbors;
import java.util.List;
import model.patches.Patch;
import model.gridrules.GridRules;
public abstract class Neighbors {
//will contain methods to construct neighbor list and check neighbors, etc.
//extended by different type of neighbor functions?
//or perhaps different neighbor fu... | jananzhu/cellsociety | src/model/neighbors/Neighbors.java | Java | mit | 3,084 |
// Copyright 2019 Google LLC.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Code generated file. DO NOT EDIT.
// Package datafusion provides access to the Cloud Data Fusion API.
//
// For product documentation, see: https://cloud.google.com/data-fusion/docs... | pushbullet/engineer | vendor/google.golang.org/api/datafusion/v1beta1/datafusion-gen.go | GO | mit | 150,488 |