repo_name stringlengths 4 116 | path stringlengths 4 379 | size stringlengths 1 7 | content stringlengths 3 1.05M | license stringclasses 15
values |
|---|---|---|---|---|
dibu13/TxAndpu_Engine | TxAndpu_Engine/TxAndpu_Engine/ModuleCamera3D.cpp | 4109 | #include "Globals.h"
#include "Application.h"
#include "ModuleCamera3D.h"
#include "ModuleInput.h"
ModuleCamera3D::ModuleCamera3D(bool startEnabled) : Module(startEnabled)
{
LOG("Camera3D: Creation.");
calculateViewMatrix();
X = vec3(1.0f, 0.0f, 0.0f);
Y = vec3(0.0f, 1.0f, 0.0f);
Z = vec3(0.0f, 0.0f, 1.0f);
po... | mit |
DkoSoftware/WebPlataform | FamintusApi/Areas/HelpPage/SampleGeneration/TextSample.cs | 887 | using System;
namespace FamintusApi.Areas.HelpPage
{
/// <summary>
/// This represents a preformatted text sample on the help page. There's a display template named TextSample associated with this class.
/// </summary>
public class TextSample
{
public TextSample(string text)
{
... | mit |
willdurand/Propilex | src/Propilex/View/Endpoint.php | 58 | <?php
namespace Propilex\View;
final class Endpoint
{
}
| mit |
GerMarS/gmk-user-role-test | application/models/users_model.php | 3897 | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class users_model extends CI_Model
{
function __construct()
{
// Call the Model constructor
parent::__construct();
}
function get_users_and_roles()
{
$query = $this->db->query("select * from users");
$user_list = [];
foreach ($... | mit |
netodeolino/curso-angular-2 | diretivas/src/app/app.module.ts | 669 | import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { AppComponent } from './app.component';
import { DiretivaNgifComponent } from './diretiva-ngif/diretiva-ngif.component';... | mit |
Aurelsicoko/prestashop-14 | themes/default-bootstrap/modules/blockbestsellers/translations/fr.php | 2304 | <?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{blockbestsellers}default-bootstrap>blockbestsellers_9862f1949f776f69155b6e6b330c7ee1'] = 'Bloc meilleures ventes';
$_MODULE['<{blockbestsellers}default-bootstrap>blockbestsellers_ed6476843a865d9daf92e409082b76e1'] = 'Ajoute un bloc qui affiche les meilleures vente... | mit |
joserochadocarmo/sau | app/view1/view1.js | 4969 | //'use strict';
angular.module('myApp.view1', ['ngRoute', 'ui.bootstrap'])
.config(['$routeProvider', function ($routeProvider) {
$routeProvider
.when('/view1', {
templateUrl: 'view1/view1.html',
controller: 'View1Ctrl'
})
.when('/detail... | mit |
ICJIA/icjia-tvpp | statamic/core/Search/Algolia/Index.php | 3392 | <?php
namespace Statamic\Search\Algolia;
use Statamic\API\Str;
use AlgoliaSearch\Client;
use Statamic\Search\ItemResolver;
use AlgoliaSearch\AlgoliaException;
use Statamic\Events\SearchQueryPerformed;
use Statamic\Search\Index as AbstractIndex;
use Statamic\Search\IndexNotFoundException;
class Index extends Abstract... | mit |
haystack/eyebrowse-server | notifications/models.py | 7781 | from __future__ import unicode_literals
from __future__ import print_function
import base64
import datetime
from django.db import models
from django.db.models.query import QuerySet
from django.core.exceptions import ImproperlyConfigured
from django.contrib.contenttypes.models import ContentType
from django.contrib.au... | mit |
ksaluja24/scratch-bench | src/scratchbench/KController.java | 3835 | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package scratchbench;
import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;
import java.util.logging.Le... | mit |
carbon/Amazon | src/Amazon.Sqs.Tests/Requests/RecieveMessagesRequestTests.cs | 388 | namespace Amazon.Sqs.Tests
{
public class RecieveMessagesRequestTests
{
[Fact]
public void CanConstruct()
{
var request = new RecieveMessagesRequest(5, TimeSpan.FromSeconds(10), TimeSpan.FromSeconds(20));
Assert.Null(request.AttributeNames);
... | mit |
zhangqiang110/my4j | pms/src/main/java/com/swfarm/biz/product/dao/StockKeepingUnitGroupDao.java | 248 | package com.swfarm.biz.product.dao;
import com.swfarm.biz.product.bo.StockKeepingUnitGroup;
import com.swfarm.pub.framework.dao.GenericDao;
public interface StockKeepingUnitGroupDao extends
GenericDao<StockKeepingUnitGroup, Long> {
}
| mit |
TeleSign/node_telesign | examples/phoneid/2_cleansing_updated_number.js | 1428 | // note change this to the following if using npm package: require('telesignsdk);
const TeleSignSDK = require('../../src/TeleSign');
//var TeleSignSDK = require('telesignsdk');
const customerId = "customer_id"; // Todo: find in portal.telesign.com
const apiKey = "dGVzdCBhcGkga2V5IGZvciBzZGsgZXhhbXBsZXM="; // Todo: fin... | mit |
ezrondre/bootstrap_forms | lib/bootstrap_forms/bootstrap_form_helper.rb | 1586 |
module BootstrapForms
module BootstrapFormHelper
ALERT_TYPES = [:danger, :info, :success, :warning] unless const_defined?(:ALERT_TYPES)
def bootstrap_flash(messages = nil)
flash_messages = []
(messages || flash).each do |type, message|
# Skip empty messages, e.g. for devise messages set... | mit |
nudesign/media_magick | spec/dummy/app/uploaders/post_uploader.rb | 479 | # encoding: utf-8
require "media_magick/image/dimensions"
class PostUploader < CarrierWave::Uploader::Base
include CarrierWave::MiniMagick
include MediaMagick::Image::Dimensions
storage :file
def store_dir
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end
# process :resize_to_f... | mit |
concord-consortium/energy3d | src/main/java/org/concord/energy3d/undo/ChangeFoundationSolarReflectorOpticalEfficiencyCommand.java | 1654 | package org.concord.energy3d.undo;
import java.util.List;
import javax.swing.undo.CannotRedoException;
import javax.swing.undo.CannotUndoException;
import org.concord.energy3d.model.Foundation;
import org.concord.energy3d.model.SolarReflector;
public class ChangeFoundationSolarReflectorOpticalEfficiencyCommand exte... | mit |
fredericcormier/WesternMusicElements | WesternMusicElements/Ruby/WMRubyData.rb | 3782 | module WMRubyData
FILE_HEADER = <<HEADER
//
// WMData.h
// WesternMusicElements
//
// Created by Cormier Frederic on 06/03/12.
// Copyright (c) 2012 International MicrOondes. All rights reserved.
//
HEADER
CHORDS = {
"Major" => [0,4,7],
"Major 6" => [0,4,7,9 ],
"Major... | mit |
nfqakademija/indigo | src/Indigo/MainBundle/Resources/public/js/demo.js | 18484 |
// Polyfills
//
(function() {
// Array indexOf
if (!Array.prototype.indexOf) {
Array.prototype.indexOf = function (searchElement, fromIndex) {
if ( this === undefined || this === null ) {
throw new TypeError( '"this" is null or not defined' );
}
var length = this.length >>> 0; // Hack... | mit |
ChangFeng2015/leetcode | src/main/java/leetCode/designPattern/state/OpenningState.java | 350 | package leetCode.designPattern.state;
/**
* @Author:Dave
* @Description:
* @Date: 2017/9/12 17:22
*/
public class OpenningState extends LiftState{
public void open() {
System.out.println("the lift is opening!");
}
public void close() {
// supe
}
public void run() {
}
... | mit |
pushbullet/engineer | vendor/google.golang.org/genproto/googleapis/ads/googleads/v2/enums/tracking_code_type.pb.go | 6436 | // Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v2/enums/tracking_code_type.proto
package enums
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
)
// Reference imports to suppress errors if they are... | mit |
rs/rest-layer | schema/dict_example_test.go | 524 | package schema_test
import "github.com/rs/rest-layer/schema"
func ExampleDict() {
_ = schema.Schema{
Fields: schema.Fields{
"dict": schema.Field{
Validator: &schema.Dict{
// Limit dict keys to foo and bar keys only
KeysValidator: &schema.String{
Allowed: []string{"foo", "bar"},
},
... | mit |
allForMoney/SysMng | frontsrc/src/configs/index.js | 114 | // AJAX 请求超时时间,单位秒
export const REQUEST_TIMEOUT = 20;
export ERROR_CODE from './ERROR_CODE';
| mit |
robin-solutions/spree-refinery | app/decorators/refinery_user_decorator.rb | 657 | Refinery::User.class_eval do
class DestroyWithOrdersError < StandardError; end
include Spree::UserAddress
include Spree::UserPaymentSource
before_validation :copy_username_from_email
before_destroy :check_completed_orders
has_many :orders, class_name: 'Spree::Order'
def store_admin?
has_spree_role... | mit |
Karasiq/scalajs-highcharts | src/main/scala/com/highcharts/config/PlotOptionsBubbleStatesHoverMarkerStates.scala | 2076 | /**
* Automatically generated file. Please do not edit.
* @author Highcharts Config Generator by Karasiq
* @see [[http://api.highcharts.com/highcharts]]
*/
package com.highcharts.config
import scalajs.js, js.`|`
import com.highcharts.CleanJsObject
import com.highcharts.HighchartsUtils._
/**
* @note JavaScri... | mit |
bkahlert/seqan-research | raw/pmsb13/pmsb13-data-20130530/sources/130wu1dgzoqmxyu2/2013-04-11T10-12-03.179+0200/sandbox/my_sandbox/apps/first_app/first_app.cpp | 863 | #include <iostream>
#include <seqan/align.h>
#include <seqan/sequence.h>
#include <seqan/seq_io.h>
#include <seqan/index.h>
using namespace seqan;
using namespace std;
void assignmentIndex2(){
String<char> text = "TTATTAAGCGTATAGCCCTATAAATATAA";
StringSet<char> set;
String<char> pattern1 = "TA";
String<char> pat... | mit |
jeanklann/M3PlusMicrocontrollerSimulator | CircuitSimulator/Components/Digital/Gates/XnorGate.cs | 323 | namespace CircuitSimulator
{
public class XnorGate : Gate
{
public XnorGate(int inputQuantity = 2, string name = "Xnor Gate") : base(name, inputQuantity + 1)
{
}
protected internal override float Operation(Pin pin)
{
return Output.Xnor(pin);
}
}
... | mit |
tenpercent/gauss-invert | multiplication.cpp | 2986 | int simpleMatrixMultiply(double* const a, double* const b, double* const out, int p, int q, int r) {
//умножение двух блоков PxQ * QxR
int m, i, j;
double *pc, *pb, *pa;
double s10, s11, s00, s01;
for (m = 0; m < p * r; ++m) {
out[m] = 0.;
}
if ( !(p&1) ) {
if ( !(r&1) ) {
for (m = 0, pc = ... | mit |
brainless/intown | intown/apps/institutions/urls.py | 153 | from django.conf.urls import url
from .views import RegisterInstitutionView
urlpatterns = [
url(r'^register/$', RegisterInstitutionView.as_view())
]
| mit |
yun90/hrs | manage.py | 345 | import os
from app import create_app, db
import app.models
from flask_script import Manager, Shell
from flask_migrate import Migrate, MigrateCommand
app = create_app(os.getenv('FLASK_CONFIG') or 'default')
migrate = Migrate(app, db)
manager = Manager(app)
manager.add_command('db', MigrateCommand)
if __name__ == '__ma... | mit |
project-sothis/project-sothis | app/shared/helpers/selectors/logAnalyzerSelectors.js | 349 | import _ from 'lodash'
export function getLogHeader (state) {
return state.logAnalyzer.data.header
}
export function getLogFilename (state) {
return state.logAnalyzer.data.filename
}
export function getLogEntries (state) {
const entries = state.logAnalyzer.data.entries
const entriesKey = _.keys(entries)
re... | mit |
ekoeppen/gdcl | nsof/nsof.go | 12418 | package nsof
import (
"fmt"
"io"
"strconv"
"unicode/utf16"
)
type Data []byte
type Writer interface {
WriteNSOF(*Data)
}
type Reader interface {
ReadNSOF(*Data, *ObjectStream) Object
}
type Object interface {
fmt.Stringer
Reader
Writer
}
type ObjectStream []Object
func (data Data) PeekXLong() int32 {
v... | mit |
apihackers/wapps | wapps/gallery/models.py | 7069 | from django.db import models
from django.utils.translation import ugettext_lazy as _
from wagtail.wagtailcore.fields import RichTextField
from wagtail.wagtailcore.models import Page, Orderable
from wagtail.wagtailadmin.edit_handlers import FieldPanel, MultiFieldPanel, InlinePanel
from wagtail.wagtailimages.edit_handle... | mit |
Pomona/Pomona | tests/Pomona.UnitTests/TestResources/TestResourcePostForm.cs | 3133 | #region License
// Pomona is open source software released under the terms of the LICENSE specified in the
// project's repository, or alternatively at http://pomona.io/
#endregion
using System.Collections.Generic;
using Pomona.Common.Proxies;
namespace Pomona.UnitTests.TestResources
{
public class TestResourc... | mit |
paulfitz/sheetsite | sheetsite/destination/csv_ss.py | 373 | import csv
def write_destination_csv(params, state):
workbook = state['workbook']
output_file = params['output_file']
for sheet in workbook.worksheets():
title = sheet.title
rows = sheet.get_all_values()
with open(output_file, 'w') as csvfile:
writer = csv.writer(csvfile... | mit |
Bitblade-org/mgsim | cli/lookup.cpp | 1415 | #include "commands.h"
#include <sstream>
using namespace std;
bool DoCommand(vector<string>& args, cli_context& ctx)
{
bool match = false;
bool quit = false;
stringstream backup;
backup.copyfmt(cout);
for (const command_descriptor *p = &command_table[0]; p->prefix[0] != 0; ++p)
{
// F... | mit |
axelpale/tresdb | client/components/Entry/CommentFormAdmin/index.js | 2068 | /* eslint-disable max-statements */
// Form for comment creation and edit
var ui = require('georap-ui');
var emitter = require('component-emitter');
var RemoveView = require('../Remove');
var ErrorView = require('../Error');
var template = require('./template.ejs');
var entryApi = tresdb.stores.entries;
module.export... | mit |
adrn/gary | gala/dynamics/mockstream/tests/test_df.py | 3276 | # Third-party
import astropy.units as u
import numpy as np
import pytest
# Custom
from ....integrate import DOPRI853Integrator
from ....potential import (Hamiltonian, HernquistPotential, MilkyWayPotential,
ConstantRotatingFrame)
from ....units import galactic
from ...core import PhaseSpacePo... | mit |
Papipo/locomotivecms-search | lib/locomotive/search/engine.rb | 678 | module Locomotive::Search
class Engine < ::Rails::Engine
initializer "locomotive.search.concerns", before: "locomotive.content_types" do |app|
require "locomotive/search/content_type_reindexer"
require "locomotive/search/concerns"
app.config.autoload_paths += %W(#{config.root}/app/services/loc... | mit |
KlusterKite/KlusterKite | Docs/Doxygen/html/dir_44a57085ea6129e28033f3819d38a708.js | 632 | var dir_44a57085ea6129e28033f3819d38a708 =
[
[ "Installer.cs", "_kluster_kite_8_security_2_kluster_kite_8_security_8_session_redis_2_installer_8cs.html", [
[ "Installer", "class_kluster_kite_1_1_security_1_1_session_redis_1_1_installer.html", "class_kluster_kite_1_1_security_1_1_session_redis_1_1_installer" ]... | mit |
BathHacked/wheelmap-stats | grab_counts.php | 1125 | <?php
//This should be run on cron.
include_once('config.php');
$mysqli = new mysqli($dbhost, $dbuser, $dbpass, $dbname);
if ($mysqli->connect_errno) {
echo "Failed to connect to MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error;
}
$timeNow = gmdate("Y-m-d H:i:s");
$saved = 0;
for( $categoryId ... | mit |
rainforestapp/circlemator | spec/spec_helper.rb | 1009 | # frozen_string_literal: true
require 'vcr'
require 'simplecov'
require 'simplecov-lcov'
SimpleCov::Formatter::LcovFormatter.config.report_with_single_file = true
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(
[SimpleCov::Formatter::LcovFormatter, SimpleCov::Formatter::HTMLFormatter]
)
SimpleCov.sta... | mit |
ZhouHengYi/https---github.com-ZhouHengYi-RenRen_react-starter-kit | src/components/Banner/USA/Banner/Banner.js | 6335 | /*! React Starter Kit | MIT License | http://www.reactstarterkit.com/ */
import React, { PropTypes } from 'react';
import styles from './Banner.less';
import withStyles from '../../../../decorators/withStyles';
import Link from '../../../../utils/Link';
import $ from 'jquery';
var CSlider = require('react-slick');
va... | mit |
pranavmaneriker/template-creator | db/migrate/20141125165935_add_resume_filename_to_resume_relations.rb | 198 | class AddResumeFilenameToResumeRelations < ActiveRecord::Migration
def change
add_column :resume_relations, :resume_filename, :string
add_index :resume_relations, :resume_filename
end
end
| mit |
dispyfree/xhstt | constraint/ClusterBusyTimesConstraint.cpp | 812 | /*
* File: ClusterBusyTimesConstraint.cpp
*
*/
#include "ClusterBusyTimesConstraint.h"
#include "Instance.h"
#include "CostFunction.h"
#include "ObjectCreation.h"
using namespace khe;
using cbtc = ClusterBusyTimesConstraint;
cbtc::ClusterBusyTimesConstraint(Instance inst, const std::string &id, const std::str... | mit |
ArekkuusuJerii/Solar | src/main/java/arekkuusu/implom/common/theorem/ModTheorems.java | 894 | /*
* Arekkuusu / Improbable plot machine. 2018
*
* This project is licensed under the MIT.
* The source code is available on github:
* https://github.com/ArekkuusuJerii/Improbable-plot-machine
*/
package arekkuusu.implom.common.theorem;
import arekkuusu.implom.api.research.Theorem;
import arekkuusu.implom.common... | mit |
RononDex/Sun.Plasma | Sun.Plasma/Sun.Plasma/Settings.xaml.cs | 1563 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Med... | mit |
QoboLtd/cakephp-search | webroot/js/exporter.js | 2083 | ;(function ($, document, window) {
'use strict';
/**
* Exporter plugin.
*/
function Exporter(element, options)
{
this.element = element;
this.options = options;
var pages = Math.ceil(this.options.count / this.options.limit);
this.init(1, pages);
}
Exp... | mit |
lanyudhy/Halite-II | environment/networking/Networking.cpp | 25652 | #include "Networking.hpp"
#include "BotInputError.hpp"
#include <exception>
#include <sstream>
#include <thread>
#include <core/hlt.hpp>
std::mutex coutMutex;
std::string serializeMapSize(const hlt::Map& map) {
std::string returnString = "";
std::ostringstream oss;
oss << map.map_width << ' ' << map.map_... | mit |
marcosgambeta/Qt5xHb | codegen/QtSerialPort/QtSerialPortVersion.cpp | 934 | %%
%% Qt5xHb - Bindings libraries for Harbour/xHarbour and Qt Framework 5
%%
%% Copyright (C) 2020 Marcos Antonio Gambeta <marcosgambeta AT outlook DOT com>
%%
$project=Qt5xHb
$module=QtSerialPort
$header
#include <QtCore/Qt>
#ifndef __XHARBOUR__
#if (QT_VERSION >= QT_VERSION_CHECK(5,1,0))
#include <... | mit |
l33tdaima/l33tdaima | pr1220h/count_vowel_permutation.py | 416 | class Solution:
def countVowelPermutation(self, n: int) -> int:
a, e, i, o, u = 1, 1, 1, 1, 1
for _ in range(n - 1):
a, e, i, o, u = e + i + u, a + i, e + o, i, i + o
return (a + e + i + o + u) % (10 ** 9 + 7)
# TESTS
for n, expected in [
(1, 5),
(2, 10),
(5, 68),
]... | mit |
flyelmos/Software-University | 04. C# Advanced/03. Matrices Exercises/07. Lego Blocks/LegoBlocks.cs | 3216 | namespace _07.Lego_Blocks
{
using System;
using System.Linq;
public class LegoBlocks
{
public static void Main()
{
/*
This program recieves two jagged arrays. Each array represents a Lego block containing integers.
After that it reverses the secon... | mit |
AspectCore/Abstractions | src/AspectCore.Abstractions/DependencyInjection/IManyEnumerable.cs | 254 | using System.Collections;
using System.Collections.Generic;
using AspectCore.DynamicProxy;
namespace AspectCore.DependencyInjection
{
[NonAspect, NonCallback]
public interface IManyEnumerable<out T> : IEnumerable<T>, IEnumerable
{
}
} | mit |
cinhtau/kaffee-pelion | lang/src/test/java/net/cinhtau/demo/MathDemoTest.java | 2364 | package net.cinhtau.demo;
import org.junit.Before;
import org.junit.Test;
import java.util.ArrayList;
import java.util.List;
import static java.util.stream.Collectors.toList;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.*;
public class MathDemoTest {
private MathDemo mathDemo;
... | mit |
Telerik-Homework-ValentinRangelov/Homework | C#/C# 2/Homework Numeral Systems/Problem 7. One system to any other/Program.cs | 2994 | using System;
using System.Linq;
//Write a program to convert from any numeral system of given base s to any other numeral system of base d (2 ≤ s, d ≤ 16).
class OneSystemToAnyOther
{
static void Main()
{
Console.Write("Number's base X: ");
int baseX = int.Parse(Console.ReadLine()... | mit |
liruqi/bigfoot | Interface/AddOns/Collector/Widget/PlanItem.lua | 3690 |
BuildEnv(...)
local PlanItem = Addon:NewClass('PlanItem', GUI:GetClass('ItemButton'))
function PlanItem:Constructor()
local Icon = self:CreateTexture(nil, 'ARTWORK') do
Icon:SetPoint('LEFT', 4, 0)
Icon:SetSize(38, 38)
Icon:SetTexture([[Interface\ICONS\Achievement_BG_winbyten]])
... | mit |
DemSquirrel/Le_Coinflip | www/js/admin/stathandler.js | 1432 | var socket = io()
var statHandler = {
getToken: function () {
swal({
title: "The token i gave you, I need",
text: "",
type: "input",
imageUrl: "https://monomythic.files.wordpress.com/2015/12/yoda-main-clean.jpg",
showCancelButton: false,
closeOnConfirm: false,
animation:... | mit |
thekosmix/interview-street | oprp/_php/init_student.php | 662 | <?php
require_once("config.php");
require_once("functions.php");
require_once("database.php");
require_once("session.php");
require_once("user.php");
require_once("branch.php");
require_once("student.php");
require_once("announcement.php");
require_once("acad_be.php");
require_once("acad_me.php")... | mit |
david-driscoll/bike-computer | services/PathService.ts | 771 | import {Observable} from 'rxjs';
import {Injectable} from '@angular/core';
import _ from 'lodash';
import angles from 'angles';
import {DistanceService} from './DistanceService';
import {LocationService, LngLatArray} from './LocationService';
@Injectable()
export class PathService {
private _trip: Observable<LngLa... | mit |
mipmip/rspec_testlink_formatters | lib/rspec_testlink_formatters.rb | 211 | require "rspec_testlink_formatters/version"
require File.expand_path(File.dirname(__FILE__) + "/rspec_testlink_export_cases")
require File.expand_path(File.dirname(__FILE__) + "/rspec_testlink_junit_formatter")
| mit |
StevenUpForever/LeetCode_Java | src/bit_operation/Q751IPToCIDR.java | 3877 | package bit_operation;
import java.util.ArrayList;
import java.util.List;
public class Q751IPToCIDR {
//Difficulty: easy
//TAG: Airbnb
//TAG: bit operation
/**
* 751. IP to CIDR
* Given a start IP address ip and a number of ips we need to cover n, return a representation of the range as a ... | mit |
piiswrong/dec | caffe/src/caffe/test/test_entropy_t_loss_layer.cpp | 6205 | #include <cmath>
#include <cstdlib>
#include <cstring>
#include <vector>
#include "gtest/gtest.h"
#include "caffe/blob.hpp"
#include "caffe/common.hpp"
#include "caffe/filler.hpp"
#include "caffe/vision_layers.hpp"
#include "caffe/test/test_caffe_main.hpp"
#include "caffe/test/test_gradient_check_util.hpp"
namespac... | mit |
zekewang918/QuitSmoking | bbs/source/class/extend/extend_thread_rushreply.php | 5555 | <?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: extend_thread_rushreply.php 33048 2013-04-12 08:50:27Z zhangjie $
*/
if(!defined('IN_DISCUZ')) {
exit('Access Denied');
}
class extend_thread_rushreply extends extend_t... | mit |
drem-darios/heartbeat | src/main/java/com/drem/heartbeat/common/EventListenerList.java | 10080 | /*
* %W% %E%
*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package com.drem.heartbeat.common;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Seriali... | mit |
pwnbus/scoring_engine | tests/scoring_engine/web/web_test.py | 2286 | import importlib
from flask import render_template as render_template_orig
from scoring_engine.web import app
from scoring_engine.models.team import Team
from scoring_engine.models.user import User
from tests.scoring_engine.unit_test import UnitTest
from mock import MagicMock, call
class WebTest(UnitTest):
def... | mit |
nuzzio/grunt-strip-code | test/fixtures/legacy_start_end.js | 174 | /* start-test-block */
// call a func that does something
/* end-test-block */
function free(a, b, c /* start-test-block */ , d /* end-test-block */) {
// do something
}
| mit |
wizawu/1c | @types/jdk/java.net.SocketOption.d.ts | 153 | declare namespace java {
namespace net {
interface SocketOption<T> {
name(): java.lang.String
type(): java.lang.Class<T>
}
}
}
| mit |
EffectHub/effecthub | application/views/mail/mailboxsend.php | 6502 | <?php $this->load->view('header') ?>
<div id="content" class="group">
<div class="notice-alert">
<h3><!-- message goes here --></h3>
<a href="http://effecthub.com/#" class="close">
<img alt="Icon-x-30-white" src="<?=base_url()?>images/icon-x-30-white.png" width="15">
</a>
</div>
<div id="main" class="main">
<?p... | mit |
billhj/Etoile-java | OdeApp/src/org/etoile/animation/ode/JointType.java | 1430 | /*
* The MIT License
*
* Copyright 2014 Jing Huang <gabriel.jing.huang@gmail.com or jing.huang@telecom-paristech.fr>.
*
* 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 r... | mit |
rocktavious/DevToolsLib | DTL/api/decorators.py | 6338 | import sys
import time
import cProfile
import pstats
import datetime
from functools import wraps
from DTL.api import loggingUtils, threadlib, Path
#------------------------------------------------------------
#------------------------------------------------------------
class PreAndPost(object):
__metaclass__ = l... | mit |
VAGAScom/basquiat | lib/basquiat/adapters/rabbitmq/requeue_strategies/dead_lettering.rb | 1630 | # frozen_string_literal: true
module Basquiat
module Adapters
class RabbitMq
class DeadLettering < BaseStrategy
class << self
attr_reader :options
def setup(opts)
@options = {
session: {
queue: {
options: {
... | mit |
bredele/drag | test/drag.js | 397 |
/**
* Test dependencies.
*/
var assert = require('assert');
var drag = require('..');
var round = require('round');
describe("drag forces", function() {
describe('dry air', function() {
describe("ball", function() {
var area = 0.0001 * Math.PI * 15 * 15;
it('velocity 10 m.s-2', function() {
asser... | mit |
mjrasobarnett/ucnsim | geom/source_tube/sourcetube_gaps.C | 8275 | // This is a model of the 'Real' cryoEDM sourcetube - 25/01/2010
#include "TGeoManager.h"
#include "TGLViewer.h"
#include "TGLCamera.h"
#include "TGLPerspectiveCamera.h"
#include "../../include/Units.h"
#include "../../include/Constants.h"
#include "../../include/Materials.h"
#include "../../include/GeomParameters.h"
... | mit |
certong0507/shoppingu | public/js/controllers/users/userprofilemain.js | 943 | 'use strict';
angular.module('mean.articles')
.controller('UserProfileMainController', ['$scope', 'Global', '$stateParams', '$state', 'fileReader', function($scope, Global, $stateParams, $state, fileReader){
$scope.global = Global;
$scope.accountMenu = [{accId: 'a1',accName: 'Profiles', accLink: "userpr... | mit |
thilina01/kpi-client | src/app/pages/absenteeism/components/absenteeismTable/index.ts | 46 | export * from './absenteeismTable.component';
| mit |
danshapir/ember-bootstrap-components | app/components/bs-component.js | 77 | export { default } from 'ember-bootstrap-components/components/bs-component'; | mit |
vvlad/lita-capistrano | lib/lita/capistrano/application.rb | 1087 | require 'net/ssh'
module Lita # :nodoc:
module Capistrano # :nodoc:
class Application
attr_reader :name, :environment, :ssh
def initialize(name:, environment:, ssh: )
@name = name
@ssh = ssh
@environment = environment
end
def deploy(bot)
bot.reply "Deployi... | mit |
adam4813/Sigma | src/components/GLMesh.cpp | 20443 | #include "components/GLMesh.h"
#ifndef __APPLE__
#include "GL/glew.h"
#endif
#include "strutils.h"
#include <algorithm>
#include <stdexcept>
#include <fstream>
#include <iostream>
#include <sstream>
#include "resources/GLTexture.h"
#include "systems/OpenGLSystem.h"
namespace Sigma{
// static member initialization... | mit |
konradovsky/KNWDHackYeahFront | src/views/VolunteerProfile/Volunteer_styles.js | 1485 | import styled from 'styled-components';
import { Container } from '../../utils/styledComponents';
import { colorPalette } from '../../utils/constants/styles';
export const Wrapper = styled.div`
display: flex;
justify-content: center;
width: 100%;
height: 100%;
background-color: ${colorPalette.primary1Color};... | mit |
kinpa200296/FollowTheTask | FollowTheTask.Web/App_Start/FilterConfig.cs | 253 | using System.Web.Mvc;
namespace FollowTheTask.Web
{
public class FilterConfig
{
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
{
filters.Add(new HandleErrorAttribute());
}
}
} | mit |
markpad/markpad | src/json-to-params.js | 180 | const JSONToParams = (object) => {
return Object.keys(object).map((k) => encodeURIComponent(k) + '=' + encodeURIComponent(object[k])).join('&');
};
export default JSONToParams; | mit |
godosou/smaroute | src/PathGeneration/Enumeration/patEnumeratePaths.cc | 2858 | /*
* patEnumeratePaths.cc
*
* Created on: May 25, 2012
* Author: jchen
*/
#include "patEnumeratePaths.h"
#include <tr1/unordered_map>
#include <set>
#include "patRoadBase.h"
#include "patMultiModalPath.h"
#include "patException.h"
using namespace std;
using namespace std::tr1;
patEnumeratePaths::patEnumerat... | mit |
MrPIvanov/SoftUni | 04-Csharp Advanced/03-STACKS AND QUEUES/03-StacksAndQueuesLab/04-MatchingBrackets/StartUp.cs | 659 | namespace _04_MatchingBrackets
{
using System;
using System.Collections.Generic;
class StartUp
{
static void Main(string[] args)
{
var str = Console.ReadLine();
var input = str.ToCharArray();
var stack = new Stack<int>();
for (int i = 0;... | mit |
dplummer/services_test_server | lib/services_test_server/db_controller.rb | 768 | require 'drb'
require 'thread'
module ServicesTestServer
class DbController
def self.only_one_connection
ActiveRecord::ConnectionAdapters::ConnectionPool.class_eval do
alias_method :old_checkout, :checkout
def checkout
@cached_connection ||= old_checkout
end
end
... | mit |
Arasz/Optimization-techniques | Travelling salesman problem/Algorithms/RandomPathAlgorithm.cs | 1280 | using ConsoleApplication.Graphs;
using System;
using System.Collections.Generic;
using System.Linq;
namespace ConsoleApplication.Algorithms
{
public class RandomPathAlgorithm : AlgorithmBase
{
private readonly Random _randomGenerator;
public RandomPathAlgorithm(int steps, IEdgeFinder edgeF... | mit |
UCSB-CS56-W14/CS56-W14-lab06 | src/edu/ucsb/cs56/W14/drawings/buzdar/advanced/WritePictureToFile.java | 3182 | package edu.ucsb.cs56.w14.drawings.buzdar.advanced;
import java.awt.image.BufferedImage;
import java.awt.Graphics2D;
import java.awt.Color;
import java.io.File;
import javax.imageio.ImageIO;
import java.io.IOException;
import edu.ucsb.cs56.w14.drawings.utilities.ShapeTransforms;
import edu.ucsb.cs56.w14.dra... | mit |
chrissorchard/malucrawl | demo/classifier.py | 1745 | from __future__ import division
from pebl.util import levenshtein
from malware_crawl.models import Malicouse_sites
_mal_list = []
def read_from_database_to_dict():
"""
Reads the malwares from the database and returns a mal_dict
"""
malwares = Malicouse_sites.objects.all()
mal_dict = {}
... | mit |
laerciosb/fractal_test | db/migrate/20170421125241_create_products.rb | 282 | # frozen_string_literal: true
class CreateProducts < ActiveRecord::Migration[5.0]
def change
create_table :products do |t|
t.string :name
t.references :supplier, foreign_key: true
t.references :place, foreign_key: true
t.timestamps
end
end
end
| mit |
larsth/go-rmsggpsbinmsg | misc_test.go | 1409 | package binmsg
import (
"strconv"
"testing"
)
func TestFloat32MarshalBinary(t *testing.T) {
want := []byte{0x42, 0x5e, 0xc4, 0x11}
got := float32MarshalBinary(float32(55.69147))
if s, ok := byteSliceCheck(0, got, want); ok == false {
t.Fatal(s)
}
}
func TestFloat32MarshalBinaryValues(t *testing.T) {
want :=... | mit |
anycmd/anycmd | src/Anycmd/Engine/Ac/Groups/GroupRemovedEvent.cs | 504 |
namespace Anycmd.Engine.Ac.Groups
{
using Events;
public sealed class GroupRemovedEvent : DomainEvent
{
public GroupRemovedEvent(IAcSession acSession, GroupBase source)
: base(acSession, source)
{
}
internal GroupRemovedEvent(IAcSession acSession, GroupBase so... | mit |
Aprogiena/StratisBitcoinFullNode | src/Stratis.SmartContracts.Tools.Sct/Program.cs | 798 | using McMaster.Extensions.CommandLineUtils;
using Stratis.SmartContracts.Tools.Sct.Build;
using Stratis.SmartContracts.Tools.Sct.Deployment;
using Stratis.SmartContracts.Tools.Sct.Validation;
namespace Stratis.SmartContracts.Tools.Sct
{
[Command(ThrowOnUnexpectedArgument = false)]
[Subcommand("validate", type... | mit |
lukasz-jakub-adamczuk/sapi | src/AppBundle/Entity/UserPermission.php | 1210 | <?php
namespace AppBundle\Entity;
/**
* UserPermission
*/
class UserPermission
{
/**
* @var integer
*/
private $idUser;
/**
* @var boolean
*/
private $idPermission;
/**
* @var integer
*/
private $idUserPermission;
/**
* Set idUser
*
* @par... | mit |
zwippie/trailblazer | test/rails/fake_app/song/operations.rb | 2227 | class Song < ActiveRecord::Base
class Create < Trailblazer::Operation
include CRUD
include Responder
model Song, :create
contract do
property :title, validates: {presence: true}
property :length
end
def process(params)
validate(params[:song]) do
contract.save
... | mit |
nicklasjepsen/GravatarSharp | GravatarSharp/GravatarModels/Name.cs | 355 | using Newtonsoft.Json;
namespace GravatarSharp.GravatarModels
{
internal class Name
{
[JsonProperty("givenName")]
public string GivenName { get; set; }
[JsonProperty("familyName")]
public string FamilyName { get; set; }
[JsonProperty("formatted")]
public strin... | mit |
tomru/switchmon | test/swm.tests.js | 5847 | 'use strict';
const sinon = require('sinon');
const assert = require('assert');
const proxyquire = require('proxyquire');
describe('swm', () => {
let sandbox;
beforeEach(() => {
sandbox = sinon.sandbox.create();
});
afterEach(() => {
sandbox.restore();
});
describe('getDevic... | mit |
giorgosbarkos2/sysAdmin | src/projectAdmin/principalBundle/Controller/DefaultController.php | 10348 | <?php
namespace projectAdmin\principalBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use projectAdmin\loginBundle\Entity\Categoria;
use projectAdmin\loginBundle\Entity\Producto;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;
class DefaultC... | mit |
the-ress/vscode | src/vs/platform/list/browser/listService.ts | 44339 | /*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... | mit |
wind-rider/nuimo-client.ts | examples/serialise.ts | 816 | import "source-map-support/register";
import { withNuimo } from "../src";
import { Update, ClickUpdate, TurnUpdate, SwipeUpdate } from "../src/update/update";
/**
* a serialiser implemented using the update's visitor API
*/
const Serialiser = {
serialise(update: Update) {
return {
type: update.type,
... | mit |
smylydon/msc-project | src/app/models/updateAttempt.js | 469 | 'use strict';
import mongoose from 'mongoose';
// create new schema
const schema = new mongoose.Schema({
type: String,
data: {
cell_id: String,
formula: String,
user_id: String,
browserTimestamp: Boolean,
timestamp: Number,
type: {type:String},
transaction_id: Number
}
}, {
strict: false
});
// virt... | mit |
QuinntyneBrown/virtual-for | examples/filter/filter.ts | 1188 | var app = angular.module("filterApp", ["virtualFor"]);
module Filter {
export class AppController {
public movies: Array<any> = [
{ "name": "Matrix" },
{ "name": "This the End" },
{ "name": "Ghostbusters" },
{ "name": "300" },
{ "name": "Top F... | mit |
tony19760619/PHPRunnerProjects | Finance/output/LoanStatements_print.php | 3036 | <?php
@ini_set("display_errors","1");
@ini_set("display_startup_errors","1");
require_once("include/dbcommon.php");
require_once("classes/searchclause.php");
require_once('include/xtempl.php');
require_once('classes/printpage.php');
require_once('classes/printpage_details.php');
require_once('classes/reportpage.php');... | mit |