code stringlengths 3 1.05M | repo_name stringlengths 4 116 | path stringlengths 4 991 | language stringclasses 9
values | license stringclasses 15
values | size int32 3 1.05M |
|---|---|---|---|---|---|
package com.weixin.util;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.ParseException;
import org.apache.http... | ScorpionJay/wechat | src/main/java/com/weixin/util/WeixinUtil.java | Java | mit | 17,181 |
'use strict';
const Perceptron = require('./perceptron');
const PerceptronTrainer = require('./perceptron.trainer');
const trainer = new PerceptronTrainer();
trainer.setLearningRate(2.0);
// and-perceptron: weights: [1,4], bias: -5
const perceptron = new Perceptron();
perceptron.setWeights([-20,-30]);
perceptron.se... | pascalvree/example-perceptron-implementation | src/example.js | JavaScript | mit | 998 |
require 'rails_helper'
RSpec.describe ComponentsController, type: :controller do
describe "GET a_z" do
before(:each) do
get :a_z
end
it "returns http success" do
expect(response).to have_http_status(:success)
end
it "rendered using the correct template" do
expect(response).to r... | naseberry/styleguide | spec/controllers/components_controller_spec.rb | Ruby | mit | 2,542 |
import { getElementIfNotEmpty } from './getElementIfNotEmpty.js';
export function getStackDataIfNotEmpty(viewportIndex) {
const element = getElementIfNotEmpty(viewportIndex);
if (!element) {
return;
}
const stackToolData = cornerstoneTools.getToolState(element, 'stack');
if (!stackToolData... | NucleusIo/HealthGenesis | viewerApp/Packages/ohif-viewerbase/client/lib/getStackDataIfNotEmpty.js | JavaScript | mit | 518 |
class AddTeamIdToUsersAndBuckets < ActiveRecord::Migration
def change
add_column :users, :team_id, :integer
add_column :buckets, :team_id, :integer
end
end
| jonmagic/i-got-issues | db/migrate/20140608063204_add_team_id_to_users_and_buckets.rb | Ruby | mit | 170 |
<?php
/**
* A simple component which returns a list of controllers plus the corresponding action names.
*
* See also: http://cakebaker.42dh.com/2006/07/21/how-to-list-all-controllers
*
* This code is in the public domain, use it in any way you like ;-)
*/
class ControllerListComponent extends Object {
public ... | ambagasdowa/kml | app/controllers/components/controller_list.php | PHP | mit | 1,033 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
namespace Wpf.Controls.Demo
{
public class DelegateCommand : ICommand
{
private Action<object> _executeMethod;
private Func<object, bool> ... | fengdingfeilong/FssControls | Wpf.Controls.Demo/DelegateCommand.cs | C# | mit | 1,265 |
// Markup.cpp: implementation of the CMarkup class.
//
// Markup Release 11.2
// Copyright (C) 2009 First Objective Software, Inc. All rights reserved
// Go to www.firstobject.com for the latest CMarkup and EDOM documentation
// Use in commercial applications requires written permission
// This software is provid... | Bam4d/Neuretix | CMarkup/Markup.cpp | C++ | mit | 172,274 |
<?php
namespace Craft;
use Cake\Utility\Hash as Hash;
class VzAddressFeedMeFieldType extends BaseFeedMeFieldType
{
// Templates
// =========================================================================
public function getMappingTemplate()
{
return 'vzaddresshelper/_integrations/feedme/fiel... | engram-design/FeedMe-Helpers | vzaddresshelper/integrations/feedme/fields/VzAddressFeedMeFieldType.php | PHP | mit | 923 |
using AxosoftAPI.NET.Core.Interfaces;
using AxosoftAPI.NET.Models;
namespace AxosoftAPI.NET.Interfaces
{
public interface IFeatures : IItemResource<Item>
{
}
}
| Axosoft/AxosoftAPI.NET | AxosoftAPI.NET/Interfaces/IFeatures.cs | C# | mit | 167 |
# == Schema Information
#
# Table name: users
#
# id :integer not null, primary key
# name :string(255)
# password_digest :string(255)
# created_at :datetime not null
# updated_at :datetime not null
#
require 'spec_helper'
describe User do
it "is vali... | trackingtrain/spoonfeeder | spec/models/user_spec.rb | Ruby | mit | 1,692 |
using System;
using System.Media;
namespace AnimalHierarchy
{
class Kitten : Cat
{
public Kitten()
{
}
public Kitten(int age, string name)
: base(age,name)
{
this.Sex = "Female";
}
public override void ProduceSound()
{
... | siderisltd/Telerik-Academy | All Courses Homeworks/OOP/4. PrinciplesOne - OOP/AnimalHierarchy/Kitten.cs | C# | mit | 450 |
package com.tyrfing.games.tyrlib3.util;
public interface IErrorHandler {
public void onError();
}
| TyrfingX/TyrLib | com.tyrfing.games.tyrlib3/src/com/tyrfing/games/tyrlib3/util/IErrorHandler.java | Java | mit | 105 |
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("06... | niki-funky/Telerik_Academy | Programming/Data Structures and Algorithms/01. Algo/06. RemoveNumbers/Properties/AssemblyInfo.cs | C# | mit | 1,410 |
package com.dpaulenk.webproxy.common;
import com.dpaulenk.webproxy.inbound.InboundHandlerState;
import com.dpaulenk.webproxy.utils.ChannelUtils;
import io.netty.buffer.ByteBuf;
import io.netty.channel.Channel;
import io.netty.channel.ChannelFuture;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel... | Fantast/simple-web-proxy-server | src/main/java/com/dpaulenk/webproxy/common/AbstractProxyHandler.java | Java | mit | 2,222 |
package com.parikls.movieland.web.dao;
import com.parikls.movieland.web.controller.dto.movie.MovieSearchRequestDTO;
import com.parikls.movieland.web.dao.entity.Movie;
import com.parikls.movieland.web.dao.rowmapper.MovieRowMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframewor... | parikls/movieland | src/main/java/com/parikls/movieland/web/dao/MovieDAO.java | Java | mit | 1,925 |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| Base Site URL
|--------------------------------------------------------------------------
|
| URL to your CodeIgniter root. Typically this will be your base URL,
| WITH... | edisetiawan/hijabaisyahshop | application/config/config.php | PHP | mit | 18,152 |
<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
$ci =& get_instance();
require_once __DIR__ . '/Validations/Site_validation.php';
/*$config = [
// Users
'user' => [
[
'field' => 'company',
'label' => 'lang:company',
'rules' => 'trim|requ... | normeno/codeigniter-base | application/modules/admin/config/form_validation.php | PHP | mit | 2,111 |
// Copyright (c) 2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "init.h"
#include "util.h"
#include "sync.h"
#include "ui_interface.h"
#includ... | high5coin/high5coin | src/bitcoinrpc.cpp | C++ | mit | 48,577 |
/**
* This software is released as part of the Pumpernickel project.
*
* All com.pump resources in the Pumpernickel project are distributed under the
* MIT License:
* https://raw.githubusercontent.com/mickleness/pumpernickel/master/License.txt
*
* More information about the Pumpernickel project is available he... | mickleness/pumpernickel | src/main/java/com/pump/io/location/SearchResults.java | Java | mit | 594 |
var Quad = Class.create(Renderable, {
initialize: function($super, width, height, position) {
this.width = width;
this.height = height;
$super();
if (position) this.orientation.setPosition(position);
},
setWidth: function(width) { this.setSize(width, this.height); },
setHeight: function(heigh... | sinisterchipmunk/rails-webgl | public/javascripts/objects/quad.js | JavaScript | mit | 1,039 |
<?php
/* EverFailMainBundle:Vendor:edit.html.twig */
class __TwigTemplate_a12efb1d848d1c6d16be064b9c9d634d8c4a329fc5fa3d7cb6d00bf19fafeb3b extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = $this->env->loadTemplate("::base.ht... | Bhathiya90/EverfailRepo | app/cache/dev/twig/a1/2e/fb1d848d1c6d16be064b9c9d634d8c4a329fc5fa3d7cb6d00bf19fafeb3b.php | PHP | mit | 1,732 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace dbFontAwesome.Test
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
stat... | diegobittencourt/dbFontAwesome | dbFontAwesome.Test/Program.cs | C# | mit | 524 |
/*
* SpriteContainer
* Visit http://createjs.com/ for documentation, updates and examples.
*
* Copyright (c) 2010 gskinner.com, 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
... | iwangx/createjs | src/easeljs/display/SpriteContainer.js | JavaScript | mit | 7,122 |
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("Qui... | dpesheva/QuizFactory | QuizFactory/QuizFactory.MVC/Properties/AssemblyInfo.cs | C# | mit | 1,361 |
package com.reason.ide.highlight;
import static com.intellij.openapi.editor.colors.TextAttributesKey.createTextAttributesKey;
import static com.intellij.psi.TokenType.BAD_CHARACTER;
import com.intellij.lexer.Lexer;
import com.intellij.openapi.editor.DefaultLanguageHighlighterColors;
import com.intellij.openapi.editor... | reasonml-editor/reasonml-idea-plugin | src/com/reason/ide/highlight/ORSyntaxHighlighter.java | Java | mit | 24,489 |
using System;
using System.Reflection;
namespace AssemblyLoader
{
/// <summary>
/// Cross platform AssemblyLoader implementations
/// </summary>
public static class Loader
{
/// <summary>
/// Loads the assembly with a common object file format (COFF)-based image containing ... | rdavisau/loadassembly-for-pcl | AssemblyLoader/AssemblyLoader.Plugin/AssemblyLoader.cs | C# | mit | 1,294 |
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpClient\Response;
use Symfony\Component\HttpClient... | shieldo/symfony | src/Symfony/Component/HttpClient/Response/ResponseTrait.php | PHP | mit | 12,832 |
module Meta
module Filelib
def self.create_directory(name)
unless name.nil?
if File.directory?(name)
puts "directory already exists".yellow
else
FileUtils.mkdir_p(name)
puts "directory #{name} created".green
end
end
end
def self.crea... | stephenhu/meta | lib/meta/filelib.rb | Ruby | mit | 1,226 |
package org.lff.plugin.dupfinder;
import org.lff.plugin.dupfinder.vo.SourceVO;
import javax.swing.table.AbstractTableModel;
import java.util.*;
/**
* @author Feifei Liu
* @datetime Jul 10 2017 13:54
*/
public class DuplicatesTableModel extends AbstractTableModel {
static final String[] NAMES = new String[]{"... | lff0305/duplicateClassFinder | src/org/lff/plugin/dupfinder/DuplicatesTableModel.java | Java | mit | 1,932 |
using OmniConf.Core.Interfaces;
namespace OmniConf.Web
{
public class SiteSettings : ISiteSettings
{
public int SiteConferenceId { get; set; }
}
}
| ardalis/OmniConf | src/OmniConf.Web/SiteSettings.cs | C# | mit | 171 |
// Simple JavaScript Templating
// Heavily based on: John Resig - http://ejohn.org/blog/javascript-micro-templating/
var argName = 'data';
function getFuncBody(str) {
return argName+"="+argName+"||{};var p=[];p.push('"
+ str
.replace(/[\r\t\n]/g, " ")
.split("<%").join("\t")
.replace(/((^|%>)[^\t]*)'... | theakman2/node-modules-mtmpl | lib/index.js | JavaScript | mit | 756 |
<?php
/**
* Created by PhpStorm.
* Author: Misha Serenkov
* Email: mi.serenkov@gmail.com
* Date: 30.11.2016 11:39
*/
namespace miserenkov\sms\client;
use miserenkov\sms\exceptions\BalanceException;
use miserenkov\sms\exceptions\Exception;
use miserenkov\sms\exceptions\SendException;
use miserenkov\sms\exceptions... | miserenkov/yii2-sms | src/client/SoapClient.php | PHP | mit | 8,357 |
/*
Edison is designed to be simpler and more performant unit/integration testing framework.
Copyright (c) 2015, Matthew Kelly (Badgerati)
Company: Cadaeic Studios
License: MIT (see LICENSE for details)
*/
using System;
namespace Edison.Engine.Core.Exceptions
{
public class ParseException : Exception
{
... | Badgerati/Edison | Edison.Engine/Core/Exceptions/ParseException.cs | C# | mit | 406 |
module Bondora
VERSION = "0.2.0"
end
| cschritt/bondora | lib/bondora/version.rb | Ruby | mit | 39 |
#ifndef __tcode_byte_buffer_h__
#define __tcode_byte_buffer_h__
#include <tcode/block.hpp>
namespace tcode {
/*!
@class byte_buffer
@brief memory block Á¶ÀÛ °ü·Ã ÀÎÅÍÆäÀ̽º
@author tk
@detail ¸î¸î ÀÎÅÍÆäÀ̽º ( rd_ptr / wr_ptr / etc ) µîÀº ACE message_block µî¿¡¼ ÂüÁ¶\n
³»°¡ »ç¿ëÇÏ±â ÆíÇϵµ·Ï Á¤¸®ÇÑ class\n
³»... | aoziczero/tcode | include/tcode/byte_buffer.hpp | C++ | mit | 2,754 |
<?php
namespace FromSelect\ServiceProvider;
use FromSelect\Controller\ControllerDecorator;
use FromSelect\DecoratingCallableResolver;
use FromSelect\FromSelect;
class RouteServiceProvider implements ServiceProviderInterface
{
/**
* Provides routes for application.
*
* @param FromSelect $app
*... | Albert221/FromSelect | src/ServiceProvider/RouteServiceProvider.php | PHP | mit | 671 |
<main>
<div class="container1">
<div id="liste" class="row z-depth-1" style="margin-bottom: 80px">
<div class="col s12">
<h2 class="header">Liste des OPR <a href="#importer" class="modal-trigger waves-effect waves-light btn blue">Importer</a> </h2>
<div class="row... | raoultahin/aropa | application/views/liste_opr.php | PHP | mit | 6,593 |
using Medallion.Threading.Internal;
using Medallion.Threading.Redis.RedLock;
using StackExchange.Redis;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Medallion.Threading.Redis.Primitives
{
internal class RedisMutexPrimitive : IRedLock... | madelson/DistributedLock | DistributedLock.Redis/Primitives/RedisMutexPrimitive.cs | C# | mit | 2,369 |
<?php
/*
* This file is part of the Behat Gherkin.
* (c) Konstantin Kudryashov <ever.zet@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Behat\Gherkin\Node;
/**
* Represents Gherkin Scenario.
*
* @author K... | Behat/Gherkin | src/Behat/Gherkin/Node/ScenarioNode.php | PHP | mit | 2,730 |
#include "../gc/GC.h"
#include "../misc/Debug.h"
#include "../misc/NativeMethod.h"
#include "../misc/Option.h"
#include "../misc/Utils.h"
#include "../runtime/JavaClass.h"
#include "../runtime/JavaHeap.hpp"
#include "../runtime/MethodArea.h"
#include "../runtime/RuntimeEnv.h"
#include "YVM.h"
YVM::ExecutorThreadPool Y... | racaljk/yvm | src/vm/YVM.cpp | C++ | mit | 4,611 |
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Moq;
using PholioVisualisation.DataConstruction;
using PholioVisualisation.DataSorting;
using PholioVisualisation.PholioObjects;
namespace PholioVisualisation.DataConstructionTest
{
[TestClass]
publi... | PublicHealthEngland/fingertips-open | PholioVisualisationWS/DataConstructionTest/ParentChildAreaRelationshipBuilderTest.cs | C# | mit | 2,757 |
package rbfs.server;
import java.net.Socket;
import java.util.List;
import com.google.gson.*;
/**
* A thread that handles an incoming connection and responds to the embedded request.
* @author James Hoak
* @version 1.0
*/
final class ConnectionHandler implements Runnable {
// TODO null check, idiot
// TOD... | jhoak/RBFS | src/rbfs/server/ConnectionHandler.java | Java | mit | 3,453 |
"use strict";
const assert = require("assert");
const Message = require("../lib/vehicle-message");
describe("vehicle-message", () => {
it("get MQTT packet and return VehicleMessage data model", () => {
const msg = Message.from({
topic: "vehicle/foo",
payload: new Buffer(JSON.stringify({
time... | esmusssein/SNU-grad-proj | broker/test/vehicle-message.js | JavaScript | mit | 1,804 |
namespace NwaDg.Web.Areas.HelpPage.ModelDescriptions
{
public class CollectionModelDescription : ModelDescription
{
public ModelDescription ElementDescription { get; set; }
}
} | nwadg/nwadg-website | NwaDg.Web/Areas/HelpPage/ModelDescriptions/CollectionModelDescription.cs | C# | mit | 196 |
module Memorandom
module Plugins
class URLParams < PluginTemplate
@description = "This plugin looks for interesting URL parameters and POST data"
@confidence = 0.50
# Scan takes a buffer and an offset of where this buffer starts in the source
def scan(buffer, source_offset)
buffer.scan(
/[%a-z0-9_\... | kn0/memorandom | lib/memorandom/plugins/url_params.rb | Ruby | mit | 679 |
import re
import struct
from traitlets import Bytes, Unicode, TraitError
# reference to https://stackoverflow.com/a/385597/1338797
float_re = r'''
(?:
[-+]? # optional sign
(?:
(?: \d* \. \d+ ) # .1 .12 .123 etc 9.1 etc 98.1 etc.
|
(?: \d+ \.? ) # 1. 12. 123. etc 1 12 123 etc.
)... | K3D-tools/K3D-jupyter | k3d/validation/stl.py | Python | mit | 1,932 |
#ifndef LOCI_CollectionLocus
#define LOCI_CollectionLocus
#include "../core/Locus.hpp"
#include <vector>
class CollectionLocus : public Locus {
private:
protected:
std::vector<boost::any> population;
CollectionLocus();
CollectionLocus(std::vector<boost::any> population);
void setPopulation(std::vector<boost::... | NGTOne/libHierGA | include/loci/CollectionLocus.hpp | C++ | mit | 833 |
$(function() {
var background = chrome.extension.getBackgroundPage();
var defaultOptions = background.defaultOptions;
var options = {};
function createFrames() {
var frames = options.frames.split('\n');
$('.js-frame').remove();
for (var i = 0; i < frames.length; i++) {
var src = frames[i];
... | laurentguilbert/overseer | js/frames.js | JavaScript | mit | 1,827 |
<div class="white-area-content">
<div class="db-header clearfix">
<div class="page-header-title"> <span class="glyphicon glyphicon-user"></span> <?php echo lang("ctn_1") ?></div>
<div class="db-header-extra">
</div>
</div>
<ol class="breadcrumb">
<li><a href="<?php echo site_url("backend/admin") ?>"><?php e... | dodeagung/KLGH | application/views/admin/email_templates.php | PHP | mit | 1,032 |
class AddInfoFieldsToPhoto < ActiveRecord::Migration
def change
add_column :photos, :year, :string
add_column :photos, :place, :string
add_column :photos, :people, :text
end
end
| macool/antano | db/migrate/20140530001952_add_info_fields_to_photo.rb | Ruby | mit | 194 |
module.exports = {
presets: [
[
'@babel/preset-env',
{
targets: {
node: '12',
},
},
],
'@babel/preset-react',
],
};
| dannegm/danielgarcia | .babelrc.js | JavaScript | mit | 236 |
/*
* Module dependencies
*/
var conf = module.exports = require('nconf');
/* Last fallback : environment variables */
conf.env().argv();
/* Dev fallback : config.json */
conf.file(__dirname + '/../config.json');
/* Default values */
conf.defaults({
title: 'Meishengo',
debug: false,
port: 8000,
host: '... | dawicorti/meishengo | lib/conf.js | JavaScript | mit | 372 |
/*
* This file is part of SpongeAPI, licensed under the MIT License (MIT).
*
* Copyright (c) SpongePowered <https://www.spongepowered.org>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Soft... | frogocomics/SpongeAPI | src/main/java/org/spongepowered/api/item/inventory/entity/HumanInventory.java | Java | mit | 1,889 |
# -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015-2018 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Sphinx configuration."""
from __future__ import print_function
import os
# -- G... | inveniosoftware/invenio-search-ui | docs/conf.py | Python | mit | 10,173 |
#!/usr/bin/ruby
# file: xml-to-haml.rb
require 'rexml/document'
class XMLtoHAML
include REXML
def initialize(s)
doc = Document.new(s)
@haml = xml_to_haml(doc)
end
def to_s
@haml
end
def xml_to_haml(nodex, indent ='')
buffer = nodex.elements.map do |node|
attributex = ' '
... | jrobertson/xml-to-haml | lib/xml-to-haml.rb | Ruby | mit | 832 |
<?php
namespace AppBundle\Service\Crud;
use AppBundle\Service\Crud\Exception\EntityNotFound;
/**
* @author Alexandr Sibov<cyberdelia1987@gmail.com>
*/
interface DeleteInterface
{
/**
* Remove an entity
*
* @param mixed $identity
*
* @throws EntityNotFound
*/
public function del... | Cyberdelia1987/symfony-test | src/AppBundle/Service/Crud/DeleteInterface.php | PHP | mit | 337 |
<?php
namespace CarBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\HttpFoundation\Request;
... | aRastini/symfonyExample | src/CarBundle/Controller/DefaultController.php | PHP | mit | 1,759 |
/**
* Author: Carter
*/
#include <iostream>
#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_image_write.h"
using namespace std;
int main(int argc, char** argv) {
if (argc != 2) {
cout << "Incorrect number of arguments\nUsage: run.out output_file.png" << endl;
return 1;
}
const int width = 1920... | clccmh/RayTracingInOneWeekend | Ch1/src/create.cpp | C++ | mit | 921 |
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
require 'image_zoomer'
| vdtejeda/Image_Zoomer | spec/spec_helper.rb | Ruby | mit | 82 |
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("Cl... | mkpetrov/Programming-Fundamentals-SoftUni-Jan2017 | Objects and Simple Classes/Closest Two Points/Properties/AssemblyInfo.cs | C# | mit | 1,412 |
module.exports = {
mixins: [__dirname],
fragmentsFile: '<rootDir>/fragmentTypes.json',
graphqlMockServerPath: '/graphql',
configSchema: {
fragmentsFile: {
type: 'string',
absolutePath: true,
},
graphqlSchemaFile: {
type: 'string',
absolutePath: true,
},
graphqlMockSch... | xing/hops | packages/apollo-mock-server/preset.js | JavaScript | mit | 493 |
package org.jinstagram.auth.model;
public class Constants {
public static final String INSTAGRAM_OAUTH_URL_BASE = "https://api.instagram.com/oauth";
public static final String ACCESS_TOKEN_ENDPOINT = INSTAGRAM_OAUTH_URL_BASE + "/access_token";
public static final String AUTHORIZE_URL = INSTAGRAM_OAUTH_URL_BASE... | thesocialstation/jInstagram | src/main/java/org/jinstagram/auth/model/Constants.java | Java | mit | 470 |
# -*- coding: utf-8 -*-
"""
Send many mails
===============
Send mail to students. The script consider two columns from
one spreadsheets. The first one is about the receivers,
the second one about the customized message for each of them.
"""
#########################################
# logging et import
import os
impo... | sdpython/ensae_teaching_cs | _doc/examples/automation/send_mails.py | Python | mit | 3,434 |
package org.mce.teknoservice.security;
import org.springframework.security.core.Authentication;
import org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler;
import org.springframework.stereotype.Component;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletReq... | MarcoCeccarini/teknoservice | src/main/java/org/mce/teknoservice/security/AjaxAuthenticationSuccessHandler.java | Java | mit | 881 |
from __future__ import unicode_literals
from django import template
from django.utils.html import mark_safe
from .. import conf
from ..models import Icon
register = template.Library()
@register.simple_tag
def svg_icons_icon(name, **kwargs):
filters = {'name__iexact': name}
value = ''
if kwargs.get('gr... | rouxcode/django-svg-icons | svg_icons/templatetags/svg_icons_tags.py | Python | mit | 1,258 |
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;
namespace SoftJail.Data.Models
{
public class Mail
{
[Key]
[Required]
public int Id { get; set; }
[Required]
public string Description { get; set; }
... | Steffkn/SoftUni | 04.CSharpDB/02.EntityFrameworkCore/00.Exams/SoftJail/SoftJail/Data/Models/Mail.cs | C# | mit | 614 |
package com.passwordLib;
import android.content.Context;
import android.os.AsyncTask;
import com.jcraft.jsch.Channel;
import com.jcraft.jsch.ChannelSftp;
import com.jcraft.jsch.JSch;
import com.jcraft.jsch.JSchException;
import com.jcraft.jsch.Session;
import com.jcraft.jsch.SftpException;
public class SendPasswordT... | aarongolliver/SmartPass | src/com/passwordLib/SendPasswordTask.java | Java | mit | 1,660 |
class ValidateAddReminderDayOfMonthAndDeadlineDayOfMonth < ActiveRecord::Migration[6.1]
def change
validate_check_constraint :partner_groups, name: "deadline_day_of_month_check"
validate_check_constraint :partner_groups, name: "reminder_day_of_month_check"
validate_check_constraint :partner_groups, name: ... | rubyforgood/diaper | db/migrate/20220103232639_validate_add_reminder_day_of_month_and_deadline_day_of_month.rb | Ruby | mit | 386 |
import {
CHOOSE_MEMORY,
LOAD_PHOTO_ERROR,
LOAD_PHOTO_SUCCESS,
} from './constants';
export function chooseMemory({ id, index }) {
return {
type: CHOOSE_MEMORY,
id,
index,
};
}
export function photoLoadSuccess({
host,
gallery,
setCurrentMemory,
album,
id,
photoLink,
}) {
return {
... | danactive/history | ui/app/containers/App/actions.js | JavaScript | mit | 556 |
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <boost/assign/list_of.hpp> // for 'map_list_of()'
#include <boost/foreach.hpp>
#include "checkpoints.h"
#include "m... | wrapperproject/wrapper | src/checkpoints.cpp | C++ | mit | 5,010 |
function saveUser({state, input}) {
state.set(['user', 'user'], input.user);
state.set(['session', 'jwt'], input.jwt);
}
export default saveUser;
| testpackbin/testpackbin | app/modules/home/actions/saveUser.js | JavaScript | mit | 151 |
import React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<React.Fragment><path d="M20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69zm-2 5.79V18h-3.52L12 20.48 9.52 18H6v-3.52L3.52 12 6 9.52V6h3.52L12 3.52 14.48 ... | kybarg/material-ui | packages/material-ui-icons/src/Brightness7Outlined.js | JavaScript | mit | 593 |
'use strict';
// Listens for the app launching then creates the window
chrome.app.runtime.onLaunched.addListener(function() {
var width = 600;
var height = 400;
chrome.app.window.create('index.html', {
id: 'main',
bounds: {
width: width,
height: height,
... | yogiekurniawan/JayaMekar-ChromeApp | app/scripts/main.js | JavaScript | mit | 454 |
var lint = require('mocha-eslint');
var paths = [
'src',
];
var options = {
// Note: we saw timeouts with the 2000ms mocha timeout setting,
// thus raised to 5000ms for eslint
timeout: 5000, // Defaults to the global mocha `timeout` option
};
// Run the tests
lint(paths, options); | iulia0103/taste-of-code | linter.js | JavaScript | mit | 293 |
// The MIT License (MIT)
//
// Copyright (c) Andrew Armstrong/FacticiusVir 2020
//
// 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 r... | FacticiusVir/SharpVk | src/SharpVk/AllocationCallbacks.gen.cs | C# | mit | 4,718 |
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2015 The Urals Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "wallet_ismine.h"
#include "key.h"
#include "keystore.h"
#include "script... | JohnMnemonick/UralsCoin | src/wallet/wallet_ismine.cpp | C++ | mit | 2,907 |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Identity_service {
private $ci;
public function __construct()
{
// to load ci instance
$this->ci =& get_instance();
}
public function set($User)
{
if(isset($User['id']) && isset($User['role']))
{
$this->ci->session->set_user... | trisetiobr/labscheduler | application/libraries/services/Identity_service.php | PHP | mit | 799 |
using System;
namespace Agiil.Domain
{
public interface IIndictesSuccess
{
bool IsSuccess { get; }
}
}
| csf-dev/agiil | Agiil.Domain/IIndictesSuccess.cs | C# | mit | 116 |
var express = require('express');
var router = express.Router();
var fs = require('fs');
var instasync = require('instasync');
var helpers = instasync.helpers;
var queries = helpers.queries;
//set Content type
router.use(function(req,res,next){
res.header("Content-Type", "text/html");
res.header("X-Frame-Options","D... | Mewte/InstaSync | web/routes/rooms.js | JavaScript | mit | 1,039 |
<?php
namespace ORM\MainBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* GdConfigurations
*
* @ORM\Table(name="gd_configurations")
* @ORM\Entity
*/
class GdConfigurations
{
/**
* @var integer
*
* @ORM\Column(name="configuration_id", type="integer", nullable=false)
* @ORM\Id
* @... | Barbar76/ExpTech-PHP | src/ORM/MainBundle/Entity/GdConfigurations.php | PHP | mit | 4,351 |
#ifndef AWTIMETABLE_HPP
#define AWTIMETABLE_HPP
#include <string>
#include <vector>
#include <SFML/Graphics/Font.hpp>
namespace sf
{
class RenderWindow;
}
namespace aw
{
namespace priv
{
struct Player
{
std::string name;
float time;
sf::Color color;
Player() : Player("", 0, sf::Color::White)
... | AlexAUT/Kroniax_Cpp | include/modules/game/timeTable.hpp | C++ | mit | 1,196 |
package ordering;
import com.google.common.collect.Lists;
import com.google.common.collect.Ordering;
import org.junit.Before;
import org.junit.Test;
import java.util.Collections;
import java.util.List;
import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;
public class OrderingExamples {
... | alexrios/guava-labs | src/test/java/ordering/OrderingExamples.java | Java | mit | 2,760 |
DEBUG = False
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': '', # Or path to database file i... | anler/django-paginator-ext | tests/settings.py | Python | mit | 5,356 |
/**
* body-checker
* A simple tool to protect your API against bad request parameters
*
* @param {Object} body request body
* @param {Object} options configuration parmaters
* @param {Function} cb callback function
*
*/
var check = require('check-types');
module.exports = function(body, options, cb) ... | luceracloud/body-checker | index.js | JavaScript | mit | 1,461 |
using System.Linq;
namespace Powercards.Core.Cards
{
[CardInfo(CardSet.Intrigue, 5, true)]
public class Upgrade : CardBase, IActionCard
{
#region methods
public void Play(TurnContext context)
{
context.ActivePlayer.DrawCards(1, context);
context.RemainingAct... | whence/powerlife | csharp/Core/Cards/Upgrade.cs | C# | mit | 2,052 |
require 'spec_helper'
describe Chouette::Exporter, :type => :model do
subject { Chouette::Exporter.new("test") }
describe "#export" do
let(:chouette_command) { double :run! => true }
before(:each) do
allow(subject).to receive_messages :chouette_command => chouette_command
end
it "should ... | afimb/ninoxe | spec/models/chouette/exporter_spec.rb | Ruby | mit | 739 |
# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
module Azure::ServiceFabric::V6_2_0_9
module Models
#
# Describes how the scaling should be performed
#
class ScalingPolicyDescription
... | Azure/azure-sdk-for-ruby | data/azure_service_fabric/lib/6.2.0.9/generated/azure_service_fabric/models/scaling_policy_description.rb | Ruby | mit | 2,007 |
/// <reference path="0-bosun.ts" />
bosunApp.directive('tsResults', function() {
return {
templateUrl: '/partials/results.html',
link: (scope: any, elem, attrs) => {
scope.isSeries = v => {
return typeof (v) === 'object';
};
},
};
});
bosunApp.di... | seekingalpha/bosun | cmd/bosun/web/static/js/directives.ts | TypeScript | mit | 41,222 |
require "rdg/analysis/propagater"
module RDG
module Control
class Case < Analysis::Propagater
register_analyser :case
def prepare
@expression, *@consequences = nodes
end
def internal_flow_edges
nodes.each_cons(2).to_a
end
def start_node
@expression
... | mutiny/rdg | lib/rdg/control/case.rb | Ruby | mit | 400 |
import * as React from "react";
import * as ReactDOM from "react-dom";
import Start from "./awesome-sec-audit.tsx";
// Dedicating a file to this basic call allows us to import all major modules
// into test suites.
const item = document.getElementById("content");
if (item == null) {
console.log("Render container ... | technion/awesome-sec-audit | assets/awesome-sec-audit-run.tsx | TypeScript | mit | 402 |
'use strict';
/* Services */
angular.module('nhsApp.services', [])
.config(function($httpProvider){
delete $httpProvider.defaults.headers.common['X-Requested-With'];
})
.factory('nhsApiService', function($http) {
var nhsAPI = {};
nhsAPI.getLetters = function() {
return $http({
metho... | denniskenny/Nhs-Choices-Angular | app/js/services.js | JavaScript | mit | 1,529 |
<?php
namespace Analatica\ForfaitBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class DefaultController extends Controller
{
public function indexAction($name)
{
return $this->render('AnalaticaForfaitBundle:Default:index.html.twig', array('name' => $name));
}
}
| portalsway2/AnalaticaV2 | src/Analatica/ForfaitBundle/Controller/DefaultController.php | PHP | mit | 317 |
import * as decimal from 'break_infinity.js';
declare global {
interface Decimal {
cos(): Decimal
lessThanOrEqualTo(other: decimal.Decimal): boolean
lessThan(other: decimal.Decimal): boolean
greaterThan(other: decimal.Decimal): boolean
greaterThanOrEqualTo(other: decimal.Decimal): boolean
}
}... | scorzy/IdleAnt | src/index.d.ts | TypeScript | mit | 321 |
export { default } from 'ember-disqus/components/disqus-comment-count'; | sir-dunxalot/ember-disqus | app/components/disqus-comment-count.js | JavaScript | mit | 71 |
import re, sys, os
from gunicorn.app.wsgiapp import run
if __name__ == '__main__':
sys.argv[0] = __file__
sys.exit(run())
| commitmachine/pg-hoffserver | pghoffserver/gunicorn_python.py | Python | mit | 131 |
/**
* Created by peter on 9/19/16.
*/
// ==UserScript==
// @name Super Rookie
// @namespace http://v.numag.net/grease/
// @description locate new posts on piratebay
// @include https://thepiratebay.org/top/*
// ==/UserScript==
(function () {
function $x() {
var x='';
... | motord/elbowgrease | grease/superrookie.user.js | JavaScript | mit | 2,103 |
/* @flow */
const babelJest = require('babel-jest');
module.exports = babelJest.createTransformer({
presets: [
[
'env',
{
targets: {
ie: 11,
edge: 14,
firefox: 45,
chrome: 49,
safari: 10,
node: '6.11',
},
modules: 'co... | boldr/boldr-ui | internal/jest/transform.js | JavaScript | mit | 489 |
import { name, autoService } from 'knifecycle';
import type { LogService } from 'common-services';
import type { JsonValue } from 'type-fest';
export type APMService<T = string> = (type: T, data: JsonValue) => void;
export default name('apm', autoService(initAPM));
const noop = () => undefined;
/**
* Application m... | nfroidure/whook | packages/whook-http-transaction/src/services/apm.ts | TypeScript | mit | 806 |
//******************************************************************************************************
// Serialization.cs - Gbtc
//
// Copyright © 2012, Grid Protection Alliance. All Rights Reserved.
//
// Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
// t... | rmc00/gsf | Source/Libraries/GSF.Core/Serialization.cs | C# | mit | 30,963 |