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 |
|---|---|---|---|---|---|
# encoding: UTF-8
# Some monkeypatches to the `Integer` class.
class Integer
# Convert this number to a given `base`.
# @param (see Bases::Number#to_base)
# @return [String]
# @see Bases::Number#to_base
def to_base(base, opts = {})
Bases.val(self).to_base(base, opts)
end
# Convert this number in bin... | whatyouhide/bases | lib/bases/monkeypatches/integer.rb | Ruby | mit | 557 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _03.Animals
{
public class Dog
{
public string Name { get; set; }
public int Age { get; set; }
public int NumberOfLegs { get; set; }
public sta... | vankatalp360/Programming-Fundamentals-2017 | Objects and Simple Classes - More Exercises/03. Animals/Dog.cs | C# | mit | 486 |
package model;
public class InputInfo {
private String compiler_version;
private String language;
private String code_text;
private String compiler_option;
public String getCompiler_version() {
return compiler_version;
}
public void setCompiler_version(String compiler_version) {
... | GainSury/eClang | src/model/InputInfo.java | Java | mit | 884 |
<?php
/**
* This file is part of the PropelBundle package.
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @license MIT License
*/
namespace Propel\PropelBundle\Tests\DataFixtures\Loader;
use Propel\PropelBundle\Tests\DataFixtu... | phpchap/mainhostel | vendor/propel/propel-bundle/Propel/PropelBundle/Tests/DataFixtures/Loader/YamlDataLoaderTest.php | PHP | mit | 17,260 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.core.validators
class Migration(migrations.Migration):
dependencies = [
('django_graph', '0001_initial'),
('cyborg_identity', '0001_initial'),
]
operations = [
... | shawnhermans/cyborg-identity-manager | cyborg_identity/migrations/0002_iscontactemailaddress_iscontactphonenumber_phonenumber.py | Python | mit | 2,204 |
// import React from 'react';
// import { shallow } from 'enzyme';
// import About from '../index';
describe('<About />', () => {
it('Expect to have unit tests specified', () => {
expect(true).toEqual(true);
});
});
| mhoffman/CatAppBrowser | app/components/About/tests/index.test.js | JavaScript | mit | 226 |
// ------------------------------------------------------
// SwarmOps - Numeric and heuristic optimization for Java
// Copyright (C) 2003-2011 Magnus Erik Hvass Pedersen.
// Please see the file license.txt for license details.
// SwarmOps on the internet: http://www.Hvass-Labs.org/
// -----------------------------... | gto76/sphere-swarm-optimization | src/sso/pso/random/Random.java | Java | mit | 4,104 |
import $ from "jquery"
import Template from "hb-template"
import _ from "lodash"
const renderNavigation = (customerDetails) => {
const navigation = Template.Navigation(customerDetails)
$('#customer-details').append(navigation)
}
const createPostalAddress = (medium) => {
return medium.street1 + ', ' + medium.cit... | avinandi/demo-project-poc | app/js/customerDetails.js | JavaScript | mit | 1,416 |
<!doctype html>
<html class="fixed sidebar-left-collapsed">
<head>
<?php
$title = "U-Dashboard";
include 'partials/head.php';
?>
<style type="text/css">
<?php
foreach ($types as $type){
$color = dechex(hexdec($type['color']) + 60);
... | CamilaAlvarez/IndicadoresDCC | application/views/index.php | PHP | mit | 5,084 |
#include "app.h"
#include <QtWidgets/QApplication>
#include <QLibraryInfo>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
App w;
w.show();
return a.exec();
}
| patemckin/HestonOptions | OptCalc/App/main.cpp | C++ | mit | 181 |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
* 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.
*/
/**
* Description of privilege
*
* @author loong
*/
class ... | chengsann/citest | application/controllers/admin/privilege.php | PHP | mit | 2,565 |
class CreatePages < ActiveRecord::Migration[5.0]
def change
create_table :pages do |t|
t.string :title
t.string :slug
t.text :text
t.timestamps null: false
end
end
end
| CollegeSTAR/collegestar_org | db/migrate/20161107195717_create_pages.rb | Ruby | mit | 204 |
<?php
namespace SuProfile\BlogBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\ExecutionContextInterface;
/**
* SuProfile\BlogBundle\Entity\Article
*
* @ORM\Table(name="article")
* @ORM\En... | jlafay/SuProfile | src/SuProfile/BlogBundle/Entity/Article.php | PHP | mit | 4,382 |
import React, { Component } from 'react';
import _ from 'lodash';
import { connect } from 'react-redux';
import { Link } from 'react-router-dom';
import { fetchPosts } from '../actions';
class PostsIndex extends Component {
componentDidMount() {
this.props.fetchPosts();
}
renderPosts() {
return _.map(t... | arianithetemi/ReactBlog | src/components/posts_index.js | JavaScript | mit | 1,050 |
class Api::ConfirmationsController < ApplicationController
def create
@confirmation = Confirmation.new(confirmation_params)
@confirmation.user_id = current_user.id
@home = Home.find(confirmation_params[:home_id])
start_date = confirmation_params[:start_date].to_date
end_date = confirmation_params... | qydchen/SafeHavn | app/controllers/api/confirmations_controller.rb | Ruby | mit | 1,177 |
var gulp = require('gulp'),
connect = require('gulp-connect'),
open = require('gulp-open'),
concat = require('gulp-concat'),
flatten = require('gulp-flatten'),
port = process.env.port || 3051;
gulp.task('open', function(){
var options = {
url: 'http://localhost:' + port,
};
gulp.src('./app/index.html')
.pi... | oalami/trends | web/gulpfile.js | JavaScript | mit | 1,155 |
import {
AppState
} from 'react-native';
import BackgroundTimer from 'react-native-background-timer';
import * as AppStateActionCreators from 'app/redux/shared_actions/AppStateActionCreators';
var state = AppState.currentState;
export default function (store) {
AppState.addEventListener('change', (nextAppSta... | squatsandsciencelabs/OpenBarbellApp | app/services/AppState.js | JavaScript | mit | 811 |
using System;
using System.Collections.Generic;
public class IntervalTree
{
private class Node
{
internal Interval interval;
internal double max;
internal Node right;
internal Node left;
public Node(Interval interval)
{
this.interval = interval;
... | metodiobetsanov/Tech-Module-CSharp | Data Structures/11. QUAD TREES, K-D TREES, INTERVAL TREES - Lab/IntervalTree/IntervalTree/IntervalTree.cs | C# | mit | 2,951 |
// Author: Daniele Giardini - http://www.demigiant.com
// Created: 2015/02/05 10:28
using DG.Tweening.Core.Enums;
using UnityEngine;
#pragma warning disable 1591
namespace DG.Tweening.Core
{
public class DOTweenSettings : ScriptableObject
{
public const string AssetName = "DOTweenSettings";
... | winddyhe/knight | knight-client/Packages/Knight-Lib/Knight.Framework.Tweening/Runtime/DOTween/Core/DOTweenSettings.cs | C# | mit | 1,589 |
from . import _version
__version__ = _version.__version__
import os, math, pysam
from clint.textui import progress, puts_err
import sqlite3 as lite
import tempfile, warnings, pickle
def example_reads():
"""
returns the path to the example BAM file
"""
return os.path.join(os.path.join(os.path.dirname(_... | jpiper/pyDNase | pyDNase/__init__.py | Python | mit | 25,452 |
# Copyright (c) 2012 Bingoentreprenøren AS
# Copyright (c) 2012 Patrick Hanevold
#
# 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 righ... | patrickhno/crayfish | lib/crayfish/version.rb | Ruby | mit | 1,182 |
import Immutable from 'immutable';
import uuid from './uuid';
export default function (suffix) {
return Immutable.fromJS([
{
_id: uuid(),
label: 'Startpage',
children: []
},
{
_id: uuid(),
label: `Page 1 (${suffix})`,
children: [
{
_id: uuid(),
... | choffmeister/react-nestedlist | public/data.js | JavaScript | mit | 602 |
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("08... | HMNikolova/Telerik_Academy | CSharpPartOne/5. ConditionalStatements/08. DigitAsWord/Properties/AssemblyInfo.cs | C# | mit | 1,406 |
# By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.
# What is the 10 001st prime number?
import math
from Utilities import Primes
from Problem import Problem
class N10001stPrime(Problem):
def __init__(self):
self.answer = 104743
def do(self):
... | hperreault/ProjectEuler | 007_N10001stPrime.py | Python | mit | 932 |
#ignore this file
| Fire-Hound/Linear-Regression-APK | ignore.py | Python | mit | 18 |
var async = require('async');
var mongoose = require('mongoose');
// Denormalize values from foreign refs into local model
var denormalizeFrom = function(schema, from) {
return function(next) {
var self = this;
var funcs = [];
for (var key in from) {
var items = from[key];
... | scttnlsn/mongoose-denormalize | lib/index.js | JavaScript | mit | 3,736 |
<?php
use Illuminate\Database\Seeder;
class CategoriesTableSeeder extends Seeder {
/**
* Auto generated seed file
*
* @return void
*/
public function run()
{
\DB::table('categories')->delete();
\DB::table('categories')->insert(array (
0 =>
array (
'id' => 15,
'parent_id' => NUL... | IvanBernatovic/gameshop | database/seeds/CategoriesTableSeeder.php | PHP | mit | 2,824 |
const express = require('express');
const config = require('./config/config');
const glob = require('glob');
const mongoose = require('mongoose');
mongoose.connect(config.db);
const db = mongoose.connection;
db.on('error', function () {
throw new Error('unable to connect to database at ' + config.db);
});
const mode... | weld-io/bug-hunter-game | app/app.js | JavaScript | mit | 634 |
<?php
namespace ERP\CRMBundle\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bu... | Kstro/erpsystem | src/ERP/CRMBundle/Controller/CrmLlamadasController.php | PHP | mit | 54,864 |
define(function(){
var Track = function Track(options){
this.url = options && options.url || '';
this.instrument = options && options.instrument || '';
};
return Track;
}); | leesus/beat-laboratory | js/src/models/track.js | JavaScript | mit | 191 |
const path = require('path');
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const extractApp = new ExtractTextPlugin({
filename: 'assets/[name].[hash].css'
});
const extractAntd = new ExtractTextPlugin({
filename: 'assets/antd.[hash].css'
});
module.exports... | ecozoic/atl4fort | webpack/webpack.prod.js | JavaScript | mit | 1,435 |
$('.carousel').carousel({
interval: false
})
/////////////////////////////////////////
// begin navbar collapse on selection ///
$('.navbar-collapse').click('li', function() {
$('.navbar-collapse').collapse('hide');
});
// end navbar collapse on selection ///
/////////////////////////////////////// | deepakswami07/deepakfx | js/custom.js | JavaScript | mit | 319 |
require 'ffi/disarm/args/bkpt'
require 'ffi/disarm/args/bl'
require 'ffi/disarm/args/blx_imm'
require 'ffi/disarm/args/blx_reg'
require 'ffi/disarm/args/clz'
require 'ffi/disarm/args/cp_data'
require 'ffi/disarm/args/cp_ls'
require 'ffi/disarm/args/cp_reg'
require 'ffi/disarm/args/data_imm'
require 'ffi/disarm/args/dat... | sophsec/ffi-disarm | lib/ffi/disarm/args.rb | Ruby | mit | 976 |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="fa" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Unstakeable</source>
<translation>در مورد Unstakeable</translation>
... | Action-Committee/unstakeable | src/qt/locale/bitcoin_fa.ts | TypeScript | mit | 119,415 |
/*
MIT License
Copyright (c) 2022 Looker Data Sciences, Inc.
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, modi... | looker-open-source/components | packages/filter-expressions/src/locales/resources/zh-CN.ts | TypeScript | mit | 4,142 |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="vi" version="2.1">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About ReturnCoin</source>
<translation type="unfinished"/>
</message>
<message>
<location lin... | ReturnCoin/ReturnCoin | src/qt/locale/bitcoin_vi.ts | TypeScript | mit | 107,681 |
require 'gyazo/version'
require 'gyazo/error'
require 'gyazo/client'
| masui/gyazo-ruby | lib/gyazo.rb | Ruby | mit | 69 |
/**
* description:维修保养
* author: dongooo
* create: 2016-09-18 下午2:38
* php: https://github.com/dongooo
**/
| dongooo/yonyouAuto | yyauto-web/src/main/webapp/webui/src/app/module/maintain/maintain.js | JavaScript | mit | 130 |
/* jshint unused:true, undef:true, node:true */
/*
* The lame logger. Standardize the level of message using html tag names
* as logging methods.
*/
var path = require("path");
var util = require("util");
// Just in case colors was not required previously, we need it here.
require("colors");
var argsToArray = f... | jeremyosborne/llogger | llogger.js | JavaScript | mit | 10,299 |
using MvvmCross;
using MvvmCross.Plugin;
namespace MvvX.Plugins.OAuthClient
{
[MvxPlugin]
public class Plugin : IMvxPlugin
{
public void Load()
{
Mvx.IoCProvider.RegisterSingleton<IOAuthClient>(new PlatformOAuthClient());
}
}
} | mathieumack/MvvX.Plugins.OauthClient | MvvX.Plugins.OAuthClient/platforms/android/Plugin.cs | C# | mit | 280 |
# frozen_string_literal: true
# This class extends an OpenStruct object by adding predicate methods to mimic
# ActiveRecord access. We rely on the initial values being true or false to
# determine whether to define a predicate method because for a newly-added
# column that has not been migrated yet, there is no way to... | mmkassem/gitlabhq | lib/gitlab/fake_application_settings.rb | Ruby | mit | 1,150 |
package dorp
import (
"errors"
"fmt"
"io"
"golang.org/x/crypto/nacl/secretbox"
)
// A SetMessage is the Go representation of the JSON message
// sent to set states
type SetMessage struct {
DoorState string
LightState string
}
// A State is a binary condition of the door or lights.
type State byte
//go:gene... | millere/dorp | dorp.go | GO | mit | 2,034 |
package com.mczal.nb.controller;
import com.mczal.nb.dto.InputSetDtoRequest;
import com.mczal.nb.service.hdfs.HdfsService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.spring... | mczal/spring-naivebayes | src/main/java/com/mczal/nb/controller/InputSetController.java | Java | mit | 9,792 |
// setup global chai methods
import { expect } from 'chai'
import Vue from 'vue/dist/vue.common'
import VueTouch from '../helpers/vue-touch'
import {
createFromTemplate,
isEnabled,
isDisabled,
allDisabled
} from '../helpers'
describe('VueTouch.enabledProps', () => {
beforeEach(() => {
Vue.use(VueTouch)... | whjvenyl/vue-touch-next | test/specs/enabledProps.js | JavaScript | mit | 1,679 |
namespace SubClassing
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param ... | Dhiraj3005/Mastering-C-Sharp-and-.NET-Framework | Chapter13/1-SubClassing/SubClassing/Form1.Designer.cs | C# | mit | 1,383 |
import React, {Component} from 'react';
import {StyleSheet, Image, View, Text} from 'react-native';
export default class PersonalInfo extends Component {
static navigationOptions = {
headerTitle: "我",
};
render() {
return (
<View style={styles.container}>
<Imag... | panyz/GankAndPanyz | src/pages/PersonalInfoPage.js | JavaScript | mit | 1,320 |
<html>
<head>
<title>
Why can't Congress oppose the war?
</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<?php include "../../legacy-includes/Script.htmlf" ?>
</head>
<body bgcolor="#FFFFCC" text="000000" link="990000" vlink="660000" alink="003366" leftmargin="0" topmargin="0">
<tab... | ISO-tech/sw-d8 | web/2007-1/620/620_03_Congress.php | PHP | mit | 6,602 |
//2D sprite class
//Created by James Vanderhyde, 31 May 2010
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.GraphicsConfiguration;
import java.awt.Image;
import java.awt.Rectangle;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import javax.swing.ImageIcon;
public class ... | jvanderhyde/worlds-tiniest-platformer | TiniestPlatformer/src/ImageSprite.java | Java | mit | 2,494 |
#include "guiutil.h"
#include "bitcoinaddressvalidator.h"
#include "walletmodel.h"
#include "bitcoinunits.h"
#include "util.h"
#include "init.h"
#include "base58.h"
#include <QString>
#include <QDateTime>
#include <QDoubleValidator>
#include <QFont>
#include <QLineEdit>
#include <QUrl>
#include <QTextDocument> // For ... | dynius/densecoin | src/qt/guiutil.cpp | C++ | mit | 13,505 |
/**
* @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-2654',
templateUrl: './comp... | angular/angular-cli-stress-test | src/app/components/comp-2654/comp-2654.component.ts | TypeScript | mit | 484 |
import {Injectable} from '@angular/core';
import {IJenkinsData} from 'jenkins-api-ts-typings';
import {IJenkinsNode} from 'jenkins-api-ts-typings';
import {IJenkinsJob} from 'jenkins-api-ts-typings';
import {IJenkinsBuild} from 'jenkins-api-ts-typings';
import {IJenkinsUser} from 'jenkins-api-ts-typings';
import {IJen... | Andrei-Straut/statkins | src/main/webapp/src/app/test-mock/services/jenkins-data.mock.service.ts | TypeScript | mit | 1,159 |
# frozen_string_literal: true
require 'spec_helper'
describe Projects::DiscussionsController do
let(:user) { create(:user) }
let(:merge_request) { create(:merge_request) }
let(:project) { merge_request.source_project }
let(:note) { create(:discussion_note_on_merge_request, noteable: merge_request, project: pr... | stoplightio/gitlabhq | spec/controllers/projects/discussions_controller_spec.rb | Ruby | mit | 5,740 |
/**
* https://gist.github.com/gaearon/830490fc17d3fccc88c9
* Inspiration and apdatation from code in the link above
*/
import React, { Component, PropTypes } from 'react'
import ReactDOM from 'react-dom'
export default class AudioPlayer extends Component {
static propTypes = {
source: PropTypes.string.isRequ... | wwwfreedom/FreeCodeCamp | src/components/PomoTime/AudioPlayer/AudioPlayer.js | JavaScript | mit | 2,976 |
//
// System.Web.UI.WebContrls.FormViewModeEventHandler.cs;
//
// Authors:
// Sanjay Gupta (gsanjay@novell.com)
//
// (C) 2004 Novell, Inc (http://www.novell.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Soft... | jjenki11/blaze-chem-rendering | qca_designer/lib/ml-pnet-0.8.1/mcs-sources/class/System.Web/System.Web.UI.WebControls/FormViewModeEventHandler.cs | C# | mit | 1,400 |
package org.openfact.ubl.send;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import org.apache.cxf.configuration.jsse.TLSClientParameters;
import org.apache.cxf.configuration.security.FiltersType;
import org.apache.cxf.endpoint.Client;
import org.apache.cxf.frontend.ClientProxy;
import ... | openfact/openfact-temp | services/src/main/java/org/openfact/ubl/send/ServiceWrapper.java | Java | mit | 3,016 |
export * from './modules';
import {dependencies} from './dependencies';
import {default as bootstrap} from './bootstrap';
import {default as run} from './run';
export const application: angular.IModule = angular.module(
'Beacon',
dependencies
);
// Bootstrap the application.
bootstrap(application).then((): void... | BeaconPlatform/frontend | application/entry.ts | TypeScript | mit | 376 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace probno
{
class Program
{
static void Main(string[] args)
{
}
}
}
| vasilchavdarov/SoftUniHomework | Projects/Exam Programing Fundamentals/probno/Program.cs | C# | mit | 244 |
// Copyright (c) 2015-2018 Robert Rypuła - https://audio-network.rypula.pl
'use strict';
var
AudioMonoIO = AudioNetwork.Rewrite.WebAudio.AudioMonoIO,
WaveAnalyser = AudioNetwork.Rewrite.Dsp.WaveAnalyser;
function init() {
}
function checkWaveAnalyserPerformance() {
var log;
log = '';
log += runP... | robertrypula/AudioNetwork | example/00-03-02-wave-analyser-performance/wave-analyser-performance.js | JavaScript | mit | 2,472 |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.FileMatcher = exports.excludedNames = undefined;
var _bluebirdLst;
function _load_bluebirdLst() {
return _bluebirdLst = require("bluebird-lst");
}
var _bluebirdLst2;
function _load_bluebirdLst2() {
return _bluebirdLst2... | 302bis/figma-app-ubuntu | app/node_modules/electron-builder/out/fileMatcher.js | JavaScript | mit | 11,762 |
;(function($){
"use strict";
// youtube
var fnResizeMedia = function() {
$("div.movie").each(function(i, el){
$("iframe", el).each(function(j, iframe){
var w = $(el).width();
var h = w * 0.5625;
$(iframe).width(w);
$(iframe).height(h);
})
})
};
// --
fnResizeMedia();
$(window).resiz... | scienceaction/scienceaction.github.io | assets/js/scienceaction.js | JavaScript | mit | 350 |
// Relabelling.cpp
// created by Kuangdai on 6-Jun-2016
// particle relabelling
#include "Relabelling.h"
#include "Quad.h"
#include "SpectralConstants.h"
#include "Geometric3D.h"
#include "XMath.h"
#include "Geodesy.h"
#include "PreloopFFTW.h"
#include "PRT_1D.h"
#include "PRT_3D.h"
Relabelling::Relabelling(const Qu... | kuangdai/AxiSEM3D | SOLVER/src/preloop/physics/relabelling/Relabelling.cpp | C++ | mit | 11,028 |
#ifndef GENETIC_RANDOMPOPULATIONGENERATOR_HPP_
#define GENETIC_RANDOMPOPULATIONGENERATOR_HPP_
#include "data/Graph.hpp"
#include "genetic/Population.hpp"
namespace tsp
{
class RandomPopulationGenerator
{
private:
const Graph &graph_;
unsigned int startNode_;
public:
RandomPopul... | AvS2016/ParallelTSP | src/genetic/RandomPopulationGenerator.hpp | C++ | mit | 610 |
package at.fishkog.als.ui.actions;
import java.util.Stack;
import at.fishkog.als.AdvancedLogicSimulator;
public class Actions {
//TODO Temp needs to be initialized in each project
public static final Actions instance = new Actions();
private Stack<Action> actions;
public Actions() {
actions ... | domkog/AdvancedLogicSimulator | AdvancedLogicSimulator/src/at/fishkog/als/ui/actions/Actions.java | Java | mit | 750 |
// This software is part of the Autofac IoC container
// Copyright (c) 2013 Autofac Contributors
// https://autofac.org
//
// 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
// restr... | autofac/Autofac.Extras.NHibernate | src/Autofac.Extras.NHibernate/Bytecode/AutofacReflectionOptimizer.cs | C# | mit | 2,949 |
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import datetime
import numpy as np
from copy import deepcopy
import sys
import logging
class System:
def __init__(self, _start_time, start_power=0, test_plan=None):
self.start_power = start_power
self.power_left = self.start_power
self.last_ev... | pwcz/ml_embedded | simulation_tool/symulator.py | Python | mit | 11,083 |
<h4 id="buttons" class="section-header">Buttons</h4>
<div class="bs-component">
<a class="button-link" href="">Button Link</a>
<a class="button" href="">Anchor Button</a>
<button>Button Element</button>
<input type="submit" value="submit input">
<input type="button" value="button input">
</div>
| darkmuzo/staging | components/forms/button.php | PHP | mit | 309 |
package org.accela.minesweeper.controller.fordialog;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.ComponentAdapter;
import java.awt.event.ComponentEvent;
import java.awt.event.ComponentListener;
import org.accela.minesweeper.control... | accelazh/MineSweeper | MineSweeper/src/org/accela/minesweeper/controller/fordialog/CustomMineFieldController.java | Java | mit | 3,412 |
declare global {
namespace NodeJS {
interface ProcessEnv {
TOKEN: string;
SENTRY_DSN: string;
LOG_LEVEL?: string;
DATABASE_URL?: string;
SAUCENAO_API_KEY?: string;
}
}
}
// If this file has no import/export statements (i.e. is a script)
// convert it into a module by adding an... | omegavesko/Shinoa | src/internal/env.d.ts | TypeScript | mit | 356 |
<?php
use Illuminate\Database\Seeder;
class WorkTypeSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('work_types')->delete();
for ($i = 1; $i <= 30; $i++) {
\App\Models\WorkType::create([
... | fourmix-pub/fourmix-system | database/seeds/WorkTypeSeeder.php | PHP | mit | 383 |
namespace P03_CombinationsWithoutDuplicates
{
using System;
public class ReccursiveCombinationsWithoutDuplicates
{
public static void Main()
{
int numberOfElements = 4;
int subsetSize = 2;
int[] combination = new int[subsetSize];
GetNextNum... | dechoD/Telerik-Homeworks | Module II Homeworks/DSA/Recursion/P03_CombinationsWithoutDuplicates/ReccursiveCombinationsWithoutDuplicates.cs | C# | mit | 901 |
# Accelerator for pip, the Python package manager.
#
# Author: Peter Odding <peter.odding@paylogic.com>
# Last Change: November 16, 2014
# URL: https://github.com/paylogic/pip-accel
"""
:py:mod:`pip_accel.caches.local` - Local cache backend
======================================================
This module implements... | theyoprst/pip-accel | pip_accel/caches/local.py | Python | mit | 3,310 |
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... | gerich-home/ROI-Web-School | Docs/Practice/ProductAssistant/ProductAssistant.DAL/Properties/AssemblyInfo.cs | C# | mit | 1,452 |
#include <cstdio>
#include <iostream>
#include <fstream>
#include <algorithm>
#include <vector>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <string>
#include <memory.h>
#include <sstream>
#include <ctime>
#include <Windows.h>
using name... | LoDThe/algorithms | other/Hash hack.cpp | C++ | mit | 3,247 |
/**
*
*/
package me.chris.NetherControl;
import java.util.logging.Logger;
import net.milkbowl.vault.permission.Permission;
/**
* @author Christopher Pybus
* @date Mar 25, 2012
* @file SimpleChatVariables.java
* @package me.chris.SimpleChat
*
* @purpose
*/
public class Vars
{
//public... | hotshot2162/NetherControl | src/me/chris/NetherControl/Vars.java | Java | mit | 887 |
/*******************************************************************************
* The MIT License (MIT)
*
* Copyright (c) 2015 Igor Deplano
*
* 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 So... | IDepla/polibox | src/main/java/it/polito/ai/polibox/service/notification/message/CondivisioneRichiesta.java | Java | mit | 1,892 |
import React, { Component } from 'react';
// eslint-disable-next-line
import TabNavigationView from 'ringcentral-widgets/components/TabNavigationView';
import DialPadIcon from 'ringcentral-widgets/assets/images/DialPadNav.svg';
import CallsIcon from 'ringcentral-widgets/assets/images/Calls.svg';
import MessageIcon from... | ringcentral/ringcentral-js-widget | packages/ringcentral-widgets-docs/src/app/pages/Components/TabNavigationView/Demo.js | JavaScript | mit | 3,500 |
export default {
path: 'robots',
getComponent(location, cb) {
if (__CLIENT__) {
require.ensure([], require => {
cb(null, require('../../components/Projects/Robots').default);
});
} else {
cb(null, require('../../components/Projects/Robots').default);
}
},
};
| chanceeakin/portfolio-material | src/routes/projects/robots.js | JavaScript | mit | 303 |
import update from 'immutability-helper'
import {
REQUEST_PAGES,
RECEIVE_PAGES,
NEW_PAGE,
UPDATE_PAGE,
DELETE_PAGE
} from 'actions/pageActions'
export default function pages (state = {}, action) {
switch (action.type) {
case REQUEST_PAGES: {
return {
...state,
isFetching: true,
... | JasonEtco/flintcms | app/reducers/pages.js | JavaScript | mit | 2,095 |
// Template Source: Enum.java.tt
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// -------------------------------------------------... | microsoftgraph/msgraph-sdk-java | src/main/java/com/microsoft/graph/models/AlertSeverity.java | Java | mit | 835 |
package com.microsoft.azure.documentdb;
import java.util.ArrayList;
import java.util.Collection;
import org.apache.commons.lang3.text.WordUtils;
import org.json.JSONArray;
import org.json.JSONObject;
public class IncludedPath extends JsonSerializable {
private Collection<Index> indexes;
/**
* Construc... | rnagpal/azure-documentdb-java | src/com/microsoft/azure/documentdb/IncludedPath.java | Java | mit | 3,007 |
// $Id: HTIOP_Acceptor_Impl.cpp 1861 2011-08-31 16:18:08Z mesnierp $
#ifndef HTIOP_ACCEPTOR_IMPL_CPP
#define HTIOP_ACCEPTOR_IMPL_CPP
#include "orbsvcs/HTIOP/HTIOP_Acceptor_Impl.h"
#include "orbsvcs/HTIOP/HTIOP_Completion_Handler.h"
#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */... | binary42/OCI | orbsvcs/HTIOP/HTIOP_Acceptor_Impl.cpp | C++ | mit | 2,845 |
import { Component, Input } from '@angular/core';
import { MatSnackBar } from '@angular/material';
import { Title } from '@angular/platform-browser';
import { FormGroup, FormBuilder } from '@angular/forms';
import { TranslateService } from '@ngx-translate/core';
import { BaseViewComponent } from '../../../../site/base... | boehlke/OpenSlides | client/src/app/site/motions/components/motion-comments/motion-comments.component.ts | TypeScript | mit | 5,713 |
module ActiveNode
# = Active Record Belongs To Has One Association
module Associations
class HasOneAssociation < SingularAssociation #:nodoc:
end
end
end
| klobuczek/active_node | lib/active_node/associations/has_one_association.rb | Ruby | mit | 168 |
//go:build go1.16
// +build go1.16
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the cod... | Azure/azure-sdk-for-go | sdk/resourcemanager/msi/armmsi/zz_generated_models.go | GO | mit | 13,955 |
require 'capistrano/bundler'
load File.expand_path('../tasks/docker-cloud.rake', __FILE__)
| YourCursus/capistrano-docker-cloud | lib/capistrano/docker-cloud.rb | Ruby | mit | 91 |
(function() {
var module = namespace('trigram');
var matchWords = "(?:\\S+\\s*?)";
function getWordMatchRegex(numberOfWords, fromStart) {
var exp = matchWords;
exp += "{" + numberOfWords + "}";
exp = (fromStart ? "^" + exp : exp + "$");
return new RegExp(exp);
};
function extractWords(input,... | mr-rampage/n-trigram | src/trigram.js | JavaScript | mit | 2,104 |
using System;
using System.Globalization;
using System.IO;
using System.Windows.Data;
using System.Windows.Media.Imaging;
namespace Desktop.ViewModel
{
public class ArticleImageConverter : IValueConverter
{
public object Convert(Object value, Type targetType, Object parameter, CultureInfo culture)
... | balintsoos/WAF-bead2 | News/Desktop/ViewModel/Converters/ArticleImageConverter.cs | C# | mit | 1,296 |
/**
* Created by zhujili on 2015/11/17.
* 这是一个常量类,在 facade 类中实例化并提供给全局调用
*/
js.constant.Cons = function () {
//把所有产量定义为私有变量
var NOTICE_NAME = "contro_change_greet";
//提供变量获取方法,通过只读方式来获取变量值可防止变量值被修改
this.GET_NOTICE_NAME = function(){
return NOTICE_NAME;
}
}; | kally788/jsmvc | js/constant/Cons.js | JavaScript | mit | 420 |
<?php
return array(
/*
|--------------------------------------------------------------------------
| Application Debug Mode
|--------------------------------------------------------------------------
|
| When your application is in debug mode, detailed error messages with
| stack traces will be shown on every ... | amiridon/com.lavishimage | lavishimage/app/config/app.php | PHP | mit | 7,478 |
package br.com.moip.resource;
import br.com.moip.MoipHttp;
import br.com.moip.resource.structure.Address;
import br.com.moip.resource.structure.FundingInstrument;
import br.com.moip.resource.structure.Phone;
import br.com.moip.resource.structure.TaxDocument;
import com.google.gson.Gson;
public class Customer extends ... | mariodias/moip-sdk-java | src/main/java/br/com/moip/resource/Customer.java | Java | mit | 2,631 |
#include "Boolean.h"
BooleanPair::BooleanPair(void) { clear(); }
BooleanPair::BooleanPair(const bool is);
| eirTony/eirTasker | src/apps/console/TaskConsole/hold/BooleanPair.cpp | C++ | mit | 110 |
package be.wegenenverkeer.atomium.japi.client;
import be.wegenenverkeer.atomium.japi.format.Entry;
import be.wegenenverkeer.atomium.japi.format.Feed;
import be.wegenenverkeer.atomium.japi.format.Link;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
/**
* Created by Karel Maesen, Geov... | joachimvda/atomium | modules/client-java/src/main/java/be/wegenenverkeer/atomium/japi/client/FeedWrapper.java | Java | mit | 2,689 |
require 'spec_helper'
describe Salesforce::Persistence do
let(:klass) { Account }
# describe '#save' do
# context 'given a new object' do
# it 'returns object' do
# pending
# klass.new(:name => 'Test').save.should be_a(klass)
# end
# it 'writes valid id' do
# pend... | i0rek/salesforce | spec/unit/salesforce/persistence_spec.rb | Ruby | mit | 416 |
//{
#include<iostream>
#include<iomanip>
#include<cstdio>
#include<cstring>
#include<string>
#include<set>
#include<map>
#include<vector>
#include<algorithm>
#include<sstream>
#include<cmath>
#include<queue>
#include<stack>
using namespace std;
typedef long long ll;
typedef double lf;
typedef pair<ll,ll> ii;
#define R... | brianbbsu/program | code archive/GJ/z014.cpp | C++ | mit | 1,912 |
var unique = require('./unique');
module.exports = function(/* arguments */) {
if(!arguments.length) return this;
return unique.call(Array.prototype.concat.apply(this.slice(), arguments));
}; | nbroslawsky/setops | lib/union.js | JavaScript | mit | 193 |
module.exports = function () {
return handleRangeRequests
}
function handleRangeRequests (req, rsp) {
rsp.headers.set('Accept-Ranges', 'bytes')
if (!rsp.createReadStream) return
let rangeHeader = /^bytes=(\d+)-(\d+)?$/g.exec(req.headers.get('Range'))
if (rangeHeader && rangeHeader[1]) {
let oldStream = r... | xuset/planktos | lib/middleware/range.js | JavaScript | mit | 884 |
# frozen_string_literal: true
require 'spec_helper'
describe 'Profile > Personal Access Tokens', :js do
let(:user) { create(:user) }
def active_personal_access_tokens
find(".table.active-tokens")
end
def no_personal_access_tokens_message
find(".settings-message")
end
def created_personal_access... | stoplightio/gitlabhq | spec/features/profiles/personal_access_tokens_spec.rb | Ruby | mit | 3,870 |
var React = require('react');
var RoutedViewListMixin = require('reapp-routes/react-router/RoutedViewListMixin');
var Components = require('reapp-ui/all');
var store = require('./store');
var theme = require('./theme');
var action = require('./action');
var ContextTypes = require('./ContextTypes');
module.exports = fu... | reapp/reapp-kit | src/lib/Reapp.js | JavaScript | mit | 1,579 |
package service;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Calendar;
import java.util.HashMap;
import java.util.Map;
import java.util.TimerTask;
import java.util.UUID;
import java.util.concurrent.ExecutorService;
import java.util.... | hhymarco/ServiceDog | src/service/AutoUpdater.java | Java | mit | 14,383 |
version https://git-lfs.github.com/spec/v1
oid sha256:6983db5b6619c0c95a82458eff2bc9bef5e22b8f9b5451e00bf1b07ecd685978
size 34671
| yogeshsaroya/new-cdnjs | ajax/libs/ace/1.1.01/mode-velocity.js | JavaScript | mit | 130 |