repo_name stringlengths 4 116 | path stringlengths 4 379 | size stringlengths 1 7 | content stringlengths 3 1.05M | license stringclasses 15
values |
|---|---|---|---|---|
paxhujing/Tumbler.Addin.v2 | Tumbler.Addin/Tumbler.Addin.Core/IMessagePoint.cs | 351 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Tumbler.Addin.Core
{
/// <summary>
/// 表示该对象可以收发消息,但不是宿主、插件和服务。
/// </summary>
public interface IMessagePoint : IMessageSource, IMessageTarget
{
}
}
| mit |
YaniLozanov/Software-University | C#/03. C# OOP/01. C# Advanced/04. Functional Programming Exercises/01. Action Point/Program.cs | 337 | using System;
using System.Linq;
namespace _01._Action_Point
{
class Program
{
static void Main(string[] args)
{
Action<string> print = x => Console.WriteLine(x);
Console.ReadLine()
.Split()
.ToList()
.ForEach(print);
... | mit |
jaspervdm/pogoprotos-php | src/POGOProtos/Networking/Responses/UseItemCaptureResponse.php | 16418 | <?php
/**
* Generated by Protobuf protoc plugin.
*
* File descriptor : POGOProtos/Networking/Responses/UseItemCaptureResponse.proto
*/
namespace POGOProtos\Networking\Responses;
/**
* Protobuf message : POGOProtos.Networking.Responses.UseItemCaptureResponse
*/
class UseItemCaptureResponse extends \Protobuf\Abs... | mit |
jtneal/learn-clean-code | src/DesignPatterns/Adapter/Radio.php | 565 | <?php
namespace LearnCleanCode\DesignPatterns\Adapter;
/**
* Class Radio
* @package LearnCleanCode\DesignPatterns\Adapter
*/
class Radio
{
/**
* @var int
*/
private $state = 0;
/**
* Turn On
*/
public function radioOn()
{
$this->state = 1;
}... | mit |
mbr/flask-nav | setup.py | 741 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(name='flask-nav',
version='0.6.dev1',
description='Easily create navigation for Flask applications.',
... | mit |
dapengchen123/code_v1 | reid/models/resnetlstm_btfu.py | 3442 | from __future__ import absolute_import
import torch.nn.functional as F
import torch.nn.init as init
from torch import nn
from torch.autograd import Variable
from torchvision.models import resnet18, resnet34, resnet50, resnet101, \
resnet152
from torch import zeros as t_zeros
LSTM_hidden = 128
LSTM_layer = 2
d... | mit |
Comp4711Bengals/a2 | application/views/League/leagueConf.php | 3561 | <div class="row">
<div class="text">
<button><a href="/League/layout/leagueConf">Conference</a></button>
<button><a href="/League/layout/leagueDiv">Division</a></button>
<button><a href="/League/layout/league">League</a></button>
<br/>
<br/>
<h2>NFL Teams - American ... | mit |
hattonpoint/SendWithUs.Client | SendWithUs.Client.Tests/Unit/DripCampaignDeactivateAllResponseTests.cs | 3596 | // Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
/... | mit |
hisune/Echarts-PHP | src/Doc/IDE/SingleAxis/SplitArea/AreaStyle.php | 1247 | <?php
/**
* Created by Hisune EchartsPHP AutoGenerate.
* @author: Hisune <hi@hisune.com>
*/
namespace Hisune\EchartsPHP\Doc\IDE\SingleAxis\SplitArea;
use Hisune\EchartsPHP\Property;
/**
* @property array $color Default: '[\'rgba(250,250,250,0.3)\',\'rgba(200,200,200,0.3)\']'
* Color of split area.
* Spl... | mit |
lafaiDev/vente-en-ligne | src/Catalogue/CatalogueBundle/Entity/ProduitOption.php | 1810 | <?php
namespace Catalogue\CatalogueBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* ProduitOption
*
* @ORM\Table()
* @ORM\Entity(repositoryClass="Catalogue\CatalogueBundle\Entity\ProduitOptionRepository")
*/
class ProduitOption
{
/**
* @var integer
*
* @ORM\Column(name="id", type="intege... | mit |
castlegateit/cgit-static-site-template | index.php | 900 | <?php
$page_info = [
'title' => 'Static Site Template',
'heading' => 'Static Site Template',
'description' => 'A template for static sites in PHP.',
];
include $_SERVER['DOCUMENT_ROOT'] . '/includes/header.php';
?>
<div class="main" role="main">
<h1>Home</h1>
<p>Lorem ips... | mit |
vdkhai/neatHR | app/views/admin/employeeemergencycontacts/index.blade.php | 3062 | @extends('admin.layouts.default')
{{-- Web site Title --}}
@section('title')
{{{ $title }}} :: @parent
@stop
{{-- Content --}}
@section('content')
<div class="page-header">
<h3>
{{{ $title }}}
<div class="pull-right">
<a data-toggle="modal" data-target="#modal" id="create" href="#" class="btn btn-small btn-in... | mit |
WebHare/designfiles | wh.compat.base/wh.compat.base.js | 46336 | /* generated from Designfiles Public by generate_data_designfles */
require ('frameworks.mootools.core');
/*! LOAD: frameworks.mootools.core
!*/
/* This file is always included when wh.compat.base is requested. It only contains non-browser stuff, like generic object
extensions. All browser stuff, like Element exten... | mit |
vlad20012/pushall-api-java | src/main/java/ru/pushall/api/request/NotificationBuilder.java | 2868 | package ru.pushall.api.request;
import ru.pushall.api.response.BroadcastResponse;
import ru.pushall.api.response.SelfResponse;
import ru.pushall.api.response.UnicastResponse;
import java.util.Objects;
public class NotificationBuilder<R>
{
private final RequestType type;
private final long id;
private final String... | mit |
zsgithub3895/common.code | src/com/zs/leetcode/stack/PostorderTraversal.java | 1201 | package com.zs.leetcode.stack;
import java.util.Arrays;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Stack;
public class PostorderTraversal {
public static void main(String[] args) {
int[] array = { 12, 8, 18 };
TreeNode root = new TreeNode(array... | mit |
tguzik/mybatis-metrics | integration-tests/integration-test-commons/src/main/java/com/tguzik/metrics/mybatis/integrationtests/IntegrationTestVerificationUtil.java | 2580 | package com.tguzik.metrics.mybatis.integrationtests;
import static com.codahale.metrics.MetricRegistry.name;
import static org.assertj.core.api.Assertions.assertThat;
import com.codahale.metrics.MetricRegistry;
/**
* The reason why we're bothering with inheritance in these integration tests is that we want to have ... | mit |
KuangPF/mySport | models/user/userInfo.js | 561 | /**
* Created by ForeverW on 2017/5/9.
*/
var mongoose=require('mongoose');
mongoose.Promise = global.Promise;
/**
* 用户模型
*/
var userInfoCshema= new mongoose.Schema({
/*用户基本信息*/
username:{type:String},
userActualName:{type:String},
usernameIDNum:{type:String},
usernameEmail:{type:String},
... | mit |
emergenzeHack/emergenzeHack.github.io | node_modules/electron-to-chromium/full-versions.js | 18771 | module.exports = {
"10.0.0-nightly.20200325": "83.0.4087.0",
"10.0.0-nightly.20200324": "83.0.4087.0",
"10.0.0-nightly.20200323": "83.0.4087.0",
"10.0.0-nightly.20200320": "83.0.4087.0",
"10.0.0-nightly.20200318": "83.0.4087.0",
"10.0.0-nightly.20200317": "83.0.4087.0",
"10.0.0-nightly.20200316": "83.0.4086.0",
... | mit |
e-koch/VLA_Lband | 14B-088/HI/visualization/yt_viz.py | 1794 |
'''
Image rendering with yt's Scene functionality.
'''
from spectral_cube import SpectralCube
from astropy.io import fits
import yt
import numpy as np
cube = SpectralCube.read("M33_14B-088_HI.clean.image.pbcov_gt_0.5_masked.fits")
mask = fits.open("M33_14B-088_HI.clean.image.pbcov_gt_0.5_masked_source_mask.fits")[0]... | mit |
opbeat/opbeat-react | test/e2e/react/simple.failsafe.js | 691 | describe('failsafe react-app', function () {
// Can't use utils.verifyNoBrowserErrors since console is not available in ie9
it('should have no errors', function (done) {
browser
.url('/react/index.html')
.executeAsync(
function (cb) {
var errors = []
window.onerror = fun... | mit |
ProfilerTeam/Profiler | protected/vendors/Zend/Tool/Project/Context/Interface.php | 1135 | <?php
/**
* Zend Framework
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://framework.zend.com/license/new-bsd
* If you did not receive a copy of the license an... | mit |
DLRSP/django-sp | src/socialprofile/migrations/0006_auto_20211030_2242.py | 494 | # Generated by Django 2.2.19 on 2021-10-30 22:42
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("socialprofile", "0005_auto_20211030_2237"),
]
operations = [
migrations.AlterField(
model_name="socialprofile",
nam... | mit |
paazmaya/tozan | tests/lib/store-data_test.js | 1045 | /**
* tozan
* https://github.com/paazmaya/tozan
* Index filesystem by creating metadata database
*
* Copyright (c) Juga Paazmaya <paazmaya@yahoo.com> (https://paazmaya.fi)
* Licensed under the MIT license
*/
import tape from 'tape';
import storeData from '../../lib/store-data.js';
tape('storeData - interface'... | mit |
lrt/lrt | vendor/gedmo/doctrine-extensions/tests/Gedmo/Mapping/Xml/TimestampableMappingTest.php | 2087 | <?php
namespace Gedmo\Mapping\Xml;
use Doctrine\Common\EventManager;
use Doctrine\ORM\Mapping\Driver\DriverChain;
use Doctrine\ORM\Mapping\Driver\XmlDriver;
use Gedmo\Timestampable\TimestampableListener;
use Tool\BaseTestCaseOM;
/**
* These are mapping extension tests
*
* @author Gediminas Morkeviciu... | mit |
ebernhardson/l2r | code/dbn_random_set.py | 1338 | import numpy as np
import pandas as pd
import config
from utils import table_utils
def main():
df = table_utils._read(config.CLICK_DATA) \
.join(table_utils._read(config.RELEVANCE_DATA).set_index(['norm_query', 'hit_title']), on=['norm_query', 'hit_title'], how='inner')
dfQ = df['norm_query'].drop_duplicates()
... | mit |
501st-alpha1/php-mcrypt | attributes/default.rb | 508 | #
# Cookbook Name:: php-mcrypt
#
# Copyright 2014, Michael Beattie
#
# Licensed under the MIT License.
# You may obtain a copy of the License at
#
# http://opensource.org/licenses/MIT
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS"... | mit |
Azure/azure-sdk-for-java | sdk/recoveryservicesbackup/azure-resourcemanager-recoveryservicesbackup/src/main/java/com/azure/resourcemanager/recoveryservicesbackup/models/AzureVmWorkloadSqlDatabaseProtectedItem.java | 7466 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.recoveryservicesbackup.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import ... | mit |
Bob-Thomas/V100PC-school | Catch/include/reporters/catch_reporter_xml.hpp | 9374 | /*
* Created by Phil on 28/10/2010.
* Copyright 2010 Two Blue Cubes Ltd. All rights reserved.
*
* Distributed under the Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef TWOBLUECUBES_CATCH_REPORTER_XML_HPP_INCLUDED
#define... | mit |
ucndm/0215-Web-Development-Open-Source | web1.local/Database/links3.php | 1721 | <?php
//HTTP headers
header('Content-type: text/html');
//variables
$message = new stdClass();
$message->alert = '';
$links = array();
try {
//db connection
$conn = new PDO('mysql:host=localhost;dbname=links', 'test_user', 'test_user_pw');
//inserting new links
if($_SERVER['REQUEST_METHOD'] == 'POST'... | mit |
typetools/annotation-tools | annotation-file-utilities/tests/issue155/Issue155.java | 80 | package test;
class Issue155 {
void foo() {
B result[] = new B[2];
}
}
| mit |
JamesBarwell/probabilitydrive.js | example/persistent/script/main.js | 1309 | (function() {
if (!window.localStorage) {
console.warn('Sorry, this example needs localStorage support');
return;
}
// Get ProbabilityDrive and a localStorage data store
var probabilitydrive = new window.probabilitydrive;
var cache = window.localStorage;
// Make it available gl... | mit |
netrack/openflow | ofp/packet_test.go | 2964 | package ofp
import (
"encoding/gob"
"testing"
"github.com/netrack/openflow/internal/encodingtest"
)
func TestPacketIn(t *testing.T) {
tests := []encodingtest.MU{
{ReadWriter: &PacketIn{
Buffer: NoBuffer,
Length: 0x38,
Reason: PacketInReasonAction,
Table: Table(2),
Cookie: 0xdeadbeef,
Match: ... | mit |
mr-karan/Udacity-FullStack-ND004 | Project1/assignments/turtle/turtleproject.py | 266 | import turtle
def draw_shape():
window = turtle.Screen()
window.bgcolor("blue")
jeff = turtle.Turtle()
jeff.color("brown")
jeff.shape("classic")
jeff.speed(1)
for i in range(36):
jeff.rt(3)
jeff.rt(120)
jeff.fd(120)
window.exitonclick()
draw_shape()
| mit |
patricepalau/leetcode | src/removedups2/Solution.java | 1475 | package removedups2;
/**
* https://oj.leetcode.com/problems/remove-duplicates-from-sorted-list-ii/
*
* Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list.
*
* For example
* - Given 1->2->3->3->4->4->5, return 1->2->5.
* - Given 1->1->... | mit |
niki-funky/Telerik_Academy | Programming/02.Csharp/02. Arrays/02.Compare2Arrays/02.Compare2Arrays.cs | 1478 | using System;
class Compare2Arrays
{
//Write a program that reads two arrays from
//the console and compares them element by element.
static void Main()
{
//variables
//int n = int.Parse(Console.ReadLine());
//int m = int.Parse(Console.ReadLine());
//int[] array1 = ne... | mit |
matortheeternal/zedit | src/javascripts/Views/editValueModal.js | 5194 | ngapp.controller('editValueModalController', function($scope, $timeout, errorService, hotkeyService) {
// variables
let opts = $scope.modalOptions,
node = opts.targetNode,
handle = node.handles[opts.targetIndex],
value = node.cells[opts.targetIndex + 1].value,
vtLabel = xelib.val... | mit |
orobogenius/batchdownloaderbot | app/Messages/AddressMessage.php | 752 | <?php
namespace App\Messages;
/**
* @implements AbstractMessage
*/
class AddressMessage extends BaseMessage implements AbstractMessage
{
/**
* @var Update
*/
protected $update;
/**
* Create a new address message instance.
*
* @param Update
* @return void
*/
funct... | mit |
codefornigeria/project-tame-api | src/models/antidote.model.js | 599 | // antidote-model.js - A mongoose model
//
// See http://mongoosejs.com/docs/models.html
// for more of what you can do here.
module.exports = function (app) {
const mongooseClient = app.get('mongooseClient');
const antidote = new mongooseClient.Schema({
name: { type: String},
description: { type: 'String'... | mit |
asiboro/asiboro.github.io | vsdoc/search--/s_2733.js | 107 | search_result['2733']=["topic_0000000000000688_methods--.html","MasterBadgesPersonResponseDto Methods",""]; | mit |
swaggest/go-code-builder | src/Style/Initialisms.php | 1339 | <?php
namespace Swaggest\GoCodeBuilder\Style;
class Initialisms
{
public $values;
public function __construct()
{
$this->values = json_decode('{
"API": true,
"ASCII": true,
"CPU": true,
"CSS": true,
"DNS": true,
"EOF": true,
"HTML": true,
"HTTP": true,
... | mit |
wangyanxing/Demi3D | src/addons/K2/K2StaticObj.cpp | 1120 | /**********************************************************************
This source file is a part of Demi3D
__ ___ __ __ __
| \|_ |\/|| _)| \
|__/|__| || __)|__/
Copyright (c) 2013-2014 Demi team
https://github.com/wangyanxing/Demi3D
Released under the MIT License
https://github.com/wangyanxing/De... | mit |
gtamazian/bioformats | bioformats/scripts/gff3_bed12.py | 979 | #!/usr/bin/env python3
# -*- coding: utf8 -*-
# Gaik Tamazian, 2019
# mail (at) gtamazian (dot) com
"""
Convert a GFF3 file to the BED12 format.
The script converts gene records from a GFF3 file to the BED12 format.
Each gene transcript is converted to one line in the output file. The
converted file is printed to st... | mit |
Azure/azure-sdk-for-go | sdk/resourcemanager/changeanalysis/armchangeanalysis/ze_generated_example_operations_client_test.go | 1293 | //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... | mit |
foothing/laravel-boilerplate | app/Activation.php | 266 | <?php namespace App;
use Illuminate\Database\Eloquent\Model;
class Activation extends Model {
public function getCode() {
return $this->code;
}
public function getDates() {
return ['created_at', 'updated_at', 'completed_at'];
}
}
| mit |
TorchPowered/Thallium | src/main/java/net/minecraft/command/server/CommandBanIp.java | 4149 | package net.minecraft.command.server;
import java.util.Date;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import net.minecraft.command.CommandBase;
import net.minecraft.command.CommandException;
import net.minecraft.command.CommandSender;
import net.minecraft.command.PlayerNot... | mit |
vkhorikov/CSharpFunctionalExtensions | CSharpFunctionalExtensions/ValueObject/SimpleValueObject.cs | 702 | using System;
using System.Collections.Generic;
namespace CSharpFunctionalExtensions
{
[Serializable]
public abstract class SimpleValueObject<T> : ValueObject
{
public T Value { get; }
protected SimpleValueObject(T value)
{
Value = value;
}
protected o... | mit |
seanpdoyle/ember-test-helpers | tests/test-module-for-integration-test.js | 8859 | import Ember from 'ember';
import hasEmberVersion from 'ember-test-helpers/has-ember-version';
import { TestModuleForComponent } from 'ember-test-helpers';
import test from 'tests/test-support/qunit-test';
import qunitModuleFor from 'tests/test-support/qunit-module-for';
import { setResolverRegistry } from 'tests/test-... | mit |
rangermeier/flaskberry | flaskberry/static/player-controls.js | 6123 | var statusMap = new can.Map({
enabled: false
})
statusMap.bind("src", function(ev, newVal, oldVal){
if(newVal) {
statusMap.attr("fileName", decodeURI(newVal).split("/").pop())
} else {
statusMap.removeAttr("currentTime")
statusMap.removeAttr("duration")
}
})
statusMap.bind("cons... | mit |
Hoene84/perzist | jdbc/src/test/java/ch/hoene/perzist/jdbc/db/db2instance/Db2Product.java | 763 | package ch.hoene.perzist.jdbc.db.db2instance;
import ch.hoene.perzist.access.creator.ResultCreator;
import ch.hoene.perzist.jdbc.db.Tables;
import ch.hoene.perzist.model.Product;
import java.sql.ResultSet;
import java.sql.SQLException;
public class Db2Product implements ResultCreator<Tables.Products, Product, Result... | mit |
vulcansteel/autorest | AutoRest/Generators/CSharp/CSharp.Tests/Expected/AcceptanceTests/BodyBoolean/IBoolModel.cs | 3772 | // 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 code is
// regenerated.
namespa... | mit |
pancfab/thaurusbeats | app/cache/dev/assetic/config/8/8e2fb05ed27d4d063aec79c8d60ab62a.php | 400 | <?php
// ShabloThaurusBeatsBundle:Edit:edituserpanel.html.twig
return array (
'547e906' =>
array (
0 =>
array (
0 => 'bundles/thaurus/css/*',
),
1 =>
array (
),
2 =>
array (
'output' => '_controller/css/547e906.css',
'name' => '547e906',
'debug' => NULL,
... | mit |
sarahtrop/dance-index | db/migrate/20170510212444_remove_progression_id_from_contra.rb | 139 | class RemoveProgressionIdFromContra < ActiveRecord::Migration
def change
remove_column :contras, :progression_id, :integer
end
end
| mit |
ajozwik/akka-smtp-server | akka-smtp/src/main/scala/pl/jozwik/smtp/server/command/HelloCommand.scala | 1989 | /*
* Copyright (c) 2017 Andrzej Jozwik
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publ... | mit |
flexelektro/texture-packer | dist/BinPackingAlgorithm.js | 3140 | "use strict";
var BinPackingAlgorithm = function BinPackingAlgorithm(blocks, w, h) {
this.root = { x: 0, y: 0, w: w, h: h };
this.fit = function (blocks) {
var n, node, block;
for (n = 0; n < blocks.length; n++) {
block = blocks[n];
if (node = this.findNode(this.root, b... | mit |
nilbot/furry-sansa | src/github.com/nilbot/note.app/notes/note_test.go | 2569 | package notes
import (
"crypto/sha512"
"fmt"
"io"
"testing"
)
func newNoteOrFatal(t *testing.T, content string) *Note {
note, err := NewNote(content)
if err != nil {
t.Fatalf("new note: %v", err)
}
return note
}
func TestNewNote(t *testing.T) {
content := "copied from campoy/todo"
hash := sha512.New()
i... | mit |
magdkudama/phatic-blog-extension | src/MagdKudama/PhaticBlogExtension/Parser/PostsParser.php | 1392 | <?php
namespace MagdKudama\PhaticBlogExtension\Parser;
use MagdKudama\PhaticBlogExtension\Model\Collection\PostCollection;
use MagdKudama\PhaticBlogExtension\Model\Post;
use Symfony\Component\Finder\SplFileInfo;
use Symfony\Component\Yaml\Yaml;
use DateTime;
class PostsParser extends BaseParser
{
public function... | mit |
Hochfrequenz/aurelia-openui5-bridge | sample/vendor/openui5/sap/ui/unified/CalendarMonthIntervalRenderer-dbg.js | 2637 | /*!
* UI development toolkit for HTML5 (OpenUI5)
* (c) Copyright 2009-2017 SAP SE or an SAP affiliate company.
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
*/
sap.ui.define(['jquery.sap.global'],
function(jQuery) {
"use strict";
/**
* Calendar renderer.
* @namespace
*/
var Calend... | mit |
martyn82/aphajs | src/test/Apha/Projections/Projection.spec.ts | 1311 |
import {expect} from "chai";
import {Projection} from "../../../main/Apha/Projections/Projection";
describe("Projection", () => {
describe("copy", () => {
it("should copy the projection", () => {
const original = new ProjectionSpecProjection("foo", 12, true, new Date());
const copy... | mit |
ksss/text2svg | lib/text2svg/typography.rb | 7203 | require 'cgi'
require 'freetype'
require 'text2svg/option'
module Text2svg
class OptionError < StandardError
end
class Typography
WHITESPACE = /[[:space:]]/
IDEOGRAPHIC_SPACE = /[\u{3000}]/
NEW_LINE = /[\u{000A}]/
NOTDEF_GLYPH_ID = 0
INTER_CHAR_SPACE_DIV = 50r
class << self
def bu... | mit |
magrumadha/ekuesioner | js/login.js | 1662 | // Set Message Error Untuk OnLoad
function customValidLoad() {
i = document.getElementById("username");
j = document.getElementById("password");
checkValidUserName(i);
checkValidPassword(j);
}
function checkValidUserName(input) {
if (input.value == "") {
input.setCustomValidity("Masukan username");
} else if (... | mit |
arturictus/hash_map | spec/examples/collections_spec.rb | 1649 | require 'spec_helper'
describe 'Collections' do
class Things < HashMap::Base
properties :name, :age
end
class Collections < HashMap::Base
collection :things, mapper: Things
collection :numbers, mapper: proc { |n| n.to_i }
end
let(:original) do
{
things: [
{ name: 'one thing',... | mit |
hackathongi/2015-recomanacio | recommend/index.php | 897 | <?php
$description = htmlspecialchars($_GET["description"]);
$reccomender_id = htmlspecialchars($_GET["reccomender_id"]);
$job_id = htmlspecialchars($_GET["job_id"]);
$application_id = htmlspecialchars($_GET["application_id"]);
$url = 'https://api.wallyjobs.com/recommendations' ;
$post = array(
... | mit |
gdb/doom-py | doom_py/vizdoom_src/src/v_video.cpp | 41371 | // Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
// $Id:$
//
// Copyright (C) 1993-1996 by id Software, Inc.
//
// This source is available for distribution and/or modification
// only under the terms of the DOOM Source Code License as
... | mit |
Dyndrilliac/java-custom-api | api/util/sicxe/SICXE_AssemblerProgram.java | 65298 | /*
* Title: SICXE_AssemblerProgram
* Author: Matthew Boyette
* Date: 3/27/2015 - 4/23/2015
*
* The purpose of this class is to provide a feature complete implementation for a two-pass SIC/XE assembler.
*
* @formatter:off
* TODO: Pass 1 - Relative Symbols vs Absolute Symbols
* TODO: Pass 1 - USE Directive and... | mit |
htmlpdfapi/hpa-ruby | lib/hpa/pdf.rb | 106 | module Hpa
class Pdf
def self.create(options={})
Hpa.create(:pdf, options)
end
end
end | mit |
luobotang/old-js-dependency-analysis | lib/analyze.js | 1133 | var esprima = require('esprima')
var escope = require('escope')
var GlobalVarsInBrowser = require('./global-vars-browser')
var helpers = require('./array-helpers')
module.exports = analyze
/*
* @type AnalysisResult
* @property {string} file
* @property {string[]} defineVars
* @property {string[]} requireVars
*/... | mit |
seanpue/al340 | lessons/textanalysis/Untitled0.py | 1100 | # -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <codecell>
import nltk
%matplotlib inline
# <codecell>
import os
from nltk.corpus.reader.plaintext import PlaintextCorpusReader
corpusdir = 'data/texts/' # Directory of corpus.
corpus0 = PlaintextCorpusReader(corpusdir, '.*')
corpus = nltk.Text(corpus0.words(... | mit |
Caijiacheng/pig | lib/lib-util/src/main/java/com/mm/util/db/WrapperConn.java | 7480 | package com.mm.util.db;
import java.sql.Array;
import java.sql.Blob;
import java.sql.CallableStatement;
import java.sql.Clob;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.NClob;
import java.sql.PreparedStatement;
import java.sql.SQLClientInfoException;
import java.sql.SQLException;
imp... | mit |
rolandjitsu/ionic-app-scripts | src/dev-server/http-server.ts | 4589 | import * as path from 'path';
import { injectNotificationScript } from './injector';
import { injectLiveReloadScript } from './live-reload';
import * as express from 'express';
import * as fs from 'fs';
import * as url from 'url';
import {
ServeConfig,
LOGGER_DIR,
IONIC_LAB_URL,
IOS_PLATFORM_PATH,
ANDROID_PLA... | mit |
gtkatakura/furb-desenvolvimento-plataformas-moveis | backend/app/controllers/institutes_controller.rb | 1215 | class InstitutesController < ApplicationController
before_action :authenticate_user!
before_action :set_institute, only: [:show, :update, :destroy]
# GET /institutes
def index
@institutes = Institute.all
render json: @institutes
end
# GET /institutes/1
def show
render json: @institute
end... | mit |
Xeroeta/nkcgo-webapp | src/Screens/AboutScreen.js | 1837 | import React, { Component } from 'react';
import appConfig from '../Config/params';
const style = {
width: '100%',
height: '100%',
margin: '0px'
}
const line1 = "Welcome to the Ultimate Guide to North Kansas City, MO!";
const line2 = "Check-in at dozens of points of interests along our famous mile-and-a-half Pi... | mit |
Telerivet/cloud-script-example | commands/unsubscribe.js | 154 |
var config = require('../config');
var subscribers = project.getOrCreateGroup(config.GROUP_NAME);
contact.removeFromGroup(subscribers);
contact.save();
| mit |
integratedfordevelopers/integrated | src/Common/Queue/Exception/UnexpectedTypeException.php | 640 | <?php
/*
* This file is part of the Integrated package.
*
* (c) e-Active B.V. <integrated@e-active.nl>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Integrated\Common\Queue\Exception;
/**
* @author Jan Sanne Mulder ... | mit |
robertzml/Aglaia | Aglaia.API/Areas/HelpPage/HelpPageConfigurationExtensions.cs | 24076 | using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Linq;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Web.Http;
using System.Web... | mit |
Quramy/ts-graphql-plugin | src/language-service-plugin/index.ts | 41 | export * from './plugin-module-factory';
| mit |
jadu/meteor | src/Package/Migrations/MigrationsCopier.php | 1172 | <?php
namespace Meteor\Package\Migrations;
use Meteor\Filesystem\Filesystem;
use Meteor\IO\IOInterface;
class MigrationsCopier
{
/**
* @var Filesystem
*/
private $filesystem;
/**
* @var IOInterface
*/
private $io;
/**
* @param Filesystem $filesystem
* @param IOInte... | mit |
alice1017/gitTools | git-todo.py | 11140 | #!/usr/bin/env python
#coding: utf-8
import os
import sys
import miniparser
from util import core
from util import adjust
from util import objects
from util.git import *
from util.color import *
from util.objects import Todo
from subprocess import Popen, PIPE
from StringIO import StringIO
from datetime import dateti... | mit |
nailsapp/module-email | webpack.config.js | 946 | const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const path = require('path');
module.exports = {
entry: {
'admin': './assets/js/admin.js',
'debugger': './assets/js/debugger.js'
},
output: {
filename: '[name].min.js',
path: path.resolve(__dirname, 'assets/js... | mit |
ethical-jobs/ethical-jobs-redux | src/assertions.js | 6007 | import Immutable from 'immutable';
import ImmutableUtils from './immutable';
/**
* Asserts a modules "initial" state
*
* @author Andrew McLagan <andrew@ethicaljobs.com.au>
*/
function initialState(reducer, expectedState) {
return Immutable.is(reducer(undefined), expectedState);
}
/**
* Asserts a modules "clea... | mit |
mbme/cman | spec/repository_spec.rb | 4982 | require 'spec_helper'
describe Cman::Repository do
include FakeFS::SpecHelpers
before :each do
FileUtils.mkdir_p BASE_DIR
@repo_name = 'i3'
@repo = new @repo_name
end
def new(name)
Cman::Repository.new name
end
it "exist when it's dir exist and config exists" do
FileUtils.mkdir File.j... | mit |
sue445/gitpeach | app/controllers/sessions_controller.rb | 736 | class SessionsController < ApplicationController
def create
api_response = Gitlab.session(params[:login], params[:password])
user = User.find_or_create_by(gitlab_user_id: api_response.id)
user.username = api_response.username
user.private_token = api_response.private_token
user.email ... | mit |
robinleej/billund | packages/billund-framework-core/lib/server/modules/actionbinder.js | 7168 | 'use strict';
const isDev = (process.env.LEGO_ENV === 'development' || process.env.LEGO_ENV === 'dev' || process.env.BILLUND_ENV === 'development' || process.env.BILLUND_ENV === 'dev');
const path = require('path');
const _ = require('lodash');
const legoUtils = require('billund-utils');
const decache = require('deca... | mit |
NuCode1497/TimekeeperWPF | TimekeeperWPF/Calendar/NowMarker.xaml.cs | 651 | 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.Media.Imaging;... | mit |
eaglewangy/advanced-list-adapter | Sample/src/com/example/bindableadaptertest/MockImageLoader.java | 298 | package com.example.bindableadaptertest;
import android.widget.ImageView;
import com.peony.listadapter.interfaces.DynamicImageLoader;
public class MockImageLoader implements DynamicImageLoader {
@Override
public void loadImage(String url, ImageView view) {
//does nothing! :)
}
}
| mit |
j0kaso/ngl | src/viewer/viewer-constants.js | 2343 | /**
* @file Viewer Constants
* @author Alexander Rose <alexander.rose@weirdbyte.de>
* @private
*/
import { Debug } from '../globals.js'
if (typeof window !== 'undefined' && window.WebGLRenderingContext) {
const wrcp = window.WebGLRenderingContext.prototype
// wrap WebGL debug function used by three.js and
... | mit |
Terricide/ReVision | src/ReVision.Forms/Controls/ListBox.cs | 347 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace System.Windows.Forms
{
public class ListBox : ListControl
{
public override string ControlName
{
get
{
return "ListBox";
... | mit |
ForbesLindesay/monploy-agent | bin/cli.js | 957 | #!/usr/bin/env node
var forever = require('forever');
var request = require('then-request');
var command = process.argv[2];
function start() {
// see https://github.com/nodejitsu/forever-monitor for options
forever.startDaemon('server.js', {
sourceDir: __dirname,
cwd: process.cwd(),
uid: 'monploy-age... | mit |
almostcake/TimetableWebAPI | src/TimetableWebAPI/Extensions/Database.cs | 1755 | using Microsoft.AspNetCore.Builder;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using TimetableWebAPI.Infrastructure.Contexts;
using TimetableWebAPI.Tests.Data;
namespace TimetableWebAPI.Extensions
{
public static class Database
{
/// <summary>
/// ... | mit |
johngatti/mozu-java | mozu-java-core/src/main/java/com/mozu/api/clients/platform/developer/DeveloperAdminUserAuthTicketClient.java | 7504 | /**
* This code was auto-generated by a Codezu.
*
* Changes to this file may cause incorrect behavior and will be lost if
* the code is regenerated.
*/
package com.mozu.api.clients.platform.developer;
import java.util.List;
import java.util.ArrayList;
import com.mozu.api.MozuClient;
im... | mit |
voxsoftware/vox-core | submodules/vox-core-moment/dist/locale/dv.js | 2243 | var $mod$368 = core.VW.Ecma2015.Utils.module(require('../moment'));
var months = [
'ޖެނުއަރީ',
'ފެބްރުއަރީ',
'މާރިޗު',
'އޭޕްރީލު',
'މޭ',
'ޖޫން',
'ޖުލައި',
'އޯގަސްޓު',
'ސެޕްޓެމްބަރު',
'އޮކްޓޯބަރު',
'ނޮވެމްބަރު',
'ޑިސެމްބަރު'
... | mit |
NoaYHM/Augmented-Reality-using-Unity3D | Assets/Scripts/Facebook.cs | 331 |
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Facebook : MonoBehaviour {
private GameObject FacebookButton;
void Start ()
{
}
void OnMouseDown(){
// this object was clicked - do something
Application.OpenURL("https://www.facebook.com/BoyaKabini... | mit |
FernFerret/demobrowser | run.py | 379 | #!/usr/bin/env python
from demobrowser import app, db
#db.drop_all()
db.create_all()
app.debug = app.config.get('DEBUG', False)
# This is required.
app.secret_key = app.config.get('SECRET_KEY', None)
if app.secret_key is None:
print "ERROR: SECRET_KEY not found in settings.cfg. Please see README.md for help!"
el... | mit |
sidlors/microservicios | Chapter 1/firstboot/src/test/java/com/sample/firstboot/SampleApplicationTest.java | 690 | package com.sample.firstboot;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* Unit test for simple App.
*/
public class SampleApplicationTest
extends TestCase
{
/**
* Create the test case
*
* @param testName name of the test case
*/
... | mit |
krishl/restaurant-planner | config/environments/production.rb | 3592 | Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests.
config.cache_classes = true
# Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both threaded web serve... | mit |
xrstf/libhg | tests/Dummies/Client.php | 2969 | <?php
/*
* Copyright (c) 2012, Christoph Mewes, http://www.xrstf.de/
*
* This file is released under the terms of the MIT license. You can find the
* complete text in the attached LICENSE file or online at:
*
* http://www.opensource.org/licenses/mit-license.php
*/
/**
* dummy client
*/
class libhg_Dummies_Cli... | mit |
odellus/year_of_code | nested.py | 297 | #! /usr/bin/env python
def solution(A):
st = []
for ch in S:
if ch == '(':
st.append(ch)
elif len(st) < 1:
return 0
elif st.pop(-1) != '(' or ch != ')':
return 0
if len(st) == 0:
return 1
else:
return 0
| mit |
LykkeCity/Notary | glue/src/py/example.py | 130 | # simple python module for testing interop
def hello(s):
return "hello, " + s + " how are you."
def calc(x):
return x+2
| mit |
JohnJosuaPaderon/Scarlet.NET | Scarlet.NetFramework/DbValueConverter.Definitions.NullableByte.cs | 436 | using System;
namespace Scarlet
{
partial class DbValueConverter
{
public static byte? ToNullableByte(object value)
{
return ConversionBase(value, ValueConverter.ToNullableByte);
}
public static byte? ToNullableByte(object value, IFormatProvider formatProvider)
... | mit |
callemall/material-ui | packages/material-ui-icons/src/LocalGasStationRounded.js | 600 | import * as React from 'react';
import createSvgIcon from './utils/createSvgIcon';
export default createSvgIcon(
<path d="M19.77 7.23l.01-.01-3.19-3.19c-.29-.29-.77-.29-1.06 0-.29.29-.29.77 0 1.06l1.58 1.58c-1.05.4-1.76 1.47-1.58 2.71.16 1.1 1.1 1.99 2.2 2.11.47.05.88-.03 1.27-.2v7.21c0 .55-.45 1-1 1s-1-.45-1-1V14c0... | mit |
OSUrobotics/rgbd_numpy | rgbd_numpy/scripts/python_pointclouds.py | 3342 | #!/usr/bin/env python
from sensor_msgs.msg import PointCloud2, PointField, Image
import numpy as np
import struct
import cv
from cv_bridge import CvBridge
import copy
import code # HACK for debugging
fmt_full = ''
_DATATYPES = {}
_DATATYPES[PointField.INT8] = ('b', 1)
_DATATYPES[PointField.UINT8] = ('B', 1)
_... | mit |