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 main
import (
"bytes"
"encoding/json"
"errors"
"flag"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
"time"
)
const usageStr = `The Lucifer binary makes requests to the Lucifer server.
Usage:
lucifer command [arguments]
The commands are:
invalidate Invalidate the cache for a given file
... | Shyp/lucifer | lucifer/main.go | GO | mit | 4,305 |
define([], function () {
"use strict";
/**
* @param {$http} $http
* @param $q
* @param $resource
* @constructor
*/
function Post($http, $q, $resource) {
this.$http = $http;
this.$q = $q;
return $resource('/posts/:postId', { postId: '@_id' });
}
Pos... | lib3d/lib3d-blog | public/javascripts/app/Main/component/resource/Post.js | JavaScript | mit | 781 |
# Your Names
# 1) Marti
# 2) Jillian
# We spent [1 1/2] hours on this challenge.
# Bakery Serving Size portion calculator.
def serving_size_calc(item_to_make, num_of_ingredients)
library = {"cookie" => 1, "cake" => 5, "pie" => 7}
#Set counter to check if any of the ingredients match any key in the library
un... | Marti113/phase-0 | week-6/gps.rb | Ruby | mit | 2,337 |
Meteor.startup(function() {
Tracker.autorun(function() {
if (TAGT.settings.get('OTR_Enable') && window.crypto) {
TAGT.OTR.crypto = window.crypto.subtle || window.crypto.webkitSubtle;
TAGT.OTR.enabled.set(true);
TAGT.TabBar.addButton({
groups: ['directmessage'],
id: 'otr',
i18nTitle: 'OTR',
i... | YY030913/tg | packages/tagt-otr/client/tabBar.js | JavaScript | mit | 478 |
Package.describe({
name: "nova:email-templates",
summary: "Telescope email templates package",
version: "1.2.0",
git: "https://github.com/TelescopeJS/Telescope.git"
});
Package.onUse(function (api) {
api.versionsFrom(['METEOR@1.0']);
api.use([
'nova:core@1.2.0',
'nova:posts@1.2.0',
'nova:user... | HelloMeets/HelloMakers | packages/nova-email-templates/package.js | JavaScript | mit | 1,251 |
using PoESkillTree.Computation.Core.Events;
namespace PoESkillTree.Computation.Core.Graphs
{
/// <summary>
/// Determines whether nodes can be removed by <see cref="ICalculationGraphPruner"/>.
/// </summary>
public interface IDeterminesNodeRemoval
{
/// <summary>
/// Returns true i... | l0g0sys/PoESkillTree | PoESkillTree.Computation.Core/Graphs/IDeterminesNodeRemoval.cs | C# | mit | 751 |
/*
* Kodkod -- Copyright (c) 2005-present, Emina Torlak
* Pardinus -- Copyright (c) 2013-present, Nuno Macedo, INESC TEC
*
* 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... | nmacedo/Pardinus | src/main/java/kodkod/engine/satlab/PMaxYicesExternal.java | Java | mit | 11,458 |
var data = [
{
"RT":0,
"Metacritic":18,
"IMDB":1.5,
"Title":"Saving Christmas"
},
{
"RT":64,
"Metacritic":52,
"IMDB":1.5,
"Title":"Justin Bieber: Never Say Never"
},
{
"RT":0,
"Metacritic":1,
"IMDB":1.6,
"Title":"The Singing Forest"
},
{
"RT":57,
"Me... | SimonbJohnson/movie-ratings-comparison | data/data.js | JavaScript | mit | 771,035 |
"use strict";
// handle post request for new link post
const submitLinkButton = document.querySelector(".postLink");
if (submitLinkButton) {
submitLinkButton.addEventListener("click", function(event) {
event.preventDefault();
handleNewPost(submitLinkButton);
});
}
function handleNewPost(submitLinkButton) {
sub... | marieeriksson/linkify | assets/scripts/newpost.js | JavaScript | mit | 4,257 |
namespace WindowsFormsApplication1 {
public partial class Database1DataSet {
}
}
| timepiss/konnectify | WindowsFormsApplication1/Database1DataSet.cs | C# | mit | 102 |
class PointOfSalePaymentReceipt{
formattedReceipt = null;
receiptValues = null;
any = null;
type = null;
}
export default PointOfSalePaymentReceipt; | diekeure/docdatapayments-1.3 | src/pointofsalepaymentreceipt.js | JavaScript | mit | 169 |
from tpe_parking import ParkingLotInfoProvider
def main():
info_provider = ParkingLotInfoProvider()
#info_provider.update_db()
my_location = (25.041340, 121.611751)
parks = info_provider.find_parking_lot_by_coordinate(my_location, 1000)
parks = info_provider.find_parking_lot('信義區')
for park i... | shyboynccu/tpe_parking | example.py | Python | mit | 913 |
from .goods_insert import SellCreateView
from .goods_list import GoodsListView
from .goods_detail import GoodsDetailView
from .goods_modify import SellUpdateView
from .order_page import OrderPageView
from .order_check import OrderCheckView
from .order_complete import OrderCompleteView
from .attach_comment import Commen... | yevgnenll/but | but/trades/views/__init__.py | Python | mit | 367 |
var _ = require('lodash'),
config = require('../../config'),
getConfig;
getConfig = function getConfig(name) {
var defaults = {
home: {
name: 'home',
route: '/home',
frontPageTemplate: 'home'
},
// index: {
// name: 'index',
//... | elcarim5efil/GBlog | core/server/controllers/frontend/channel-config.js | JavaScript | mit | 1,440 |
import {Injectable} from '@angular/core';
import {Headers, Http} from "@angular/http";
import {AppSettings} from "../app.settings";
import {Sprint, SprintBurnDown, Retrospective} from "../_models/index";
import {Observable} from "rxjs";
@Injectable()
export class SprintService {
private headers = new Headers({'Con... | dabruns/FHMS-PM-Frontend | src/app/_services/sprint.service.ts | TypeScript | mit | 8,290 |
<script type="text/javascript">
$(function() {
$("#kas").dropdownchecklist({emptyText: " - All -", maxDropHeight: 240, width: 180});
});
</script>
<tr id="department"><td>Kas</td><td>:</td><td><select name="kas[]" multiple id="kas"><!--<option value="_all">All Department</option>--><?php foreach($listkas ... | abdulghanni/gsm | application/modules/report/views/category/kas.php | PHP | mit | 434 |
version https://git-lfs.github.com/spec/v1
oid sha256:aeb9ed3a009b8b6c1de0436e4dc3a4119a78ec6d64bdbb7daad4683d2d40a36e
size 1589
| yogeshsaroya/new-cdnjs | ajax/libs/globalize/0.1.1/cultures/globalize.culture.uz-Cyrl-UZ.min.js | JavaScript | mit | 129 |
# -*- encoding : utf-8 -*-
module SimpleCaptcha #:nodoc
module ViewHelper #:nodoc
# Simple Captcha is a very simplified captcha.
#
# It can be used as a *Model* or a *Controller* based Captcha depending on what options
# we are passing to the method show_simple_captcha.
#
# *show_simple_captc... | xiuxian123/loyals | projects/loyal_simple_captcha/lib/simple_captcha/view.rb | Ruby | mit | 3,608 |
// ********************************************************************************************************
// Product Name: DotSpatial.Symbology.dll
// Description: Contains the business logic for symbology layers and symbol categories.
// ***************************************************************************... | JasminMarinelli/DotSpatial | Source/DotSpatial.Symbology/LayerSelectedEventArgs.cs | C# | mit | 1,848 |
/**
* Configuration option specific to a production environment.
* The values of these fields will override those in the common options, if they clash.
*/
const productionConfig = {
};
export default productionConfig;
| LINKIWI/apache-auth | config/production.js | JavaScript | mit | 223 |
using Xunit;
namespace Platibus.UnitTests.Filesystem
{
[CollectionDefinition(Name)]
public class FilesystemCollection : ICollectionFixture<FilesystemFixture>
{
public const string Name = "UnitTests.Filesystem";
}
}
| sweetlandj/Platibus | Source/Platibus.UnitTests/Filesystem/FilesystemCollection.cs | C# | mit | 243 |
function otherScripts(){
}
function clickHandlers(){
removeFromTable("tasks","/wstaskdefinition/remove",function(id){});
}
function formHandlers(){
$("#frmTaskDefinition").ajaxForm(function(resp){
if(resp.state==true){
alertify.success("İşlem başarı ile gerçekleştirildi.");
... | irfanHasbek/mkb-integral | views/js/pages-js/TaskDefinitionPage.js | JavaScript | mit | 1,031 |
<?php
namespace Kit\SystemBundle\Entity;
use Doctrine\ORM\EntityRepository;
/**
* ModuleRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class ModuleRepository extends EntityRepository
{
}
| novikov-anton/kit | src/Kit/SystemBundle/Entity/ModuleRepository.php | PHP | mit | 260 |
package ameba.lib.el;
import com.google.common.collect.Maps;
import javax.el.ValueExpression;
import javax.el.VariableMapper;
import java.util.Collections;
import java.util.Map;
/**
* @author icode
*/
public class MapBasedVariableMapper extends VariableMapper {
private Map<String, ValueExpression> map = Collec... | icode/ameba | src/main/java/ameba/lib/el/MapBasedVariableMapper.java | Java | mit | 679 |
import RequestHelper from "../request-helper";
import { BaseModule } from "./base-module";
import { AddPoolRequestOptions, DatabaseCreateClusterRequest, DatabaseResizeClusterRequest } from "../types/databases";
import { HttpMethods } from "../common";
export default class Databases extends BaseModule {
private bas... | matt-major/do-wrapper | src/modules/databases.ts | TypeScript | mit | 6,006 |
export {
SocialLoginService,
SocialLoginServiceImpl
} from "./social-login.service";
export { SocialLoginServiceStub } from "./social-login.service.stub";
export { SocialLoginResponse, SocialLoginRequest } from "./model";
export { PerformLoginComponent } from "./perform-login";
| jSherz/lsd-members | frontend/src/app/members/social-login/index.ts | TypeScript | mit | 286 |
namespace SoundFingerprinting.Hashing.MinHash
{
using SoundFingerprinting.Dao;
using SoundFingerprinting.Infrastructure;
public class DatabasePermutations : IPermutations
{
private readonly IModelService modelService;
public DatabasePermutations()
: this(DependencyResolver... | Stevoman/DuplicatesDetector | SoundFingerprinting/Hashing/MinHash/DatabasePermutations.cs | C# | mit | 745 |
<?php
/*
Safe sample
input : get the field UserData from the variable $_POST
Uses a number_int_filter via filter_var function
construction : use of sprintf via a %d
*/
/*Copyright 2015 Bertrand STIVALET
Permission is hereby granted, without written agreement or royalty fee, to
use, copy, modify, and distribute t... | stivalet/PHP-Vulnerability-test-suite | Injection/CWE_89/safe/CWE_89__POST__func_FILTER-CLEANING-number_int_filter__select_from_where-sprintf_%d.php | PHP | mit | 1,674 |
package projectmanager.dada.adapter;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;
import com.amap.api.services.core.PoiItem;
import java.util.List;
import projectmanager.d... | jichaofdu/PM_Project | Client/Dada/app/src/main/java/projectmanager/dada/adapter/LocationAdapter.java | Java | mit | 1,105 |
class MiniMatch:
_defaults = dict(
follow_links=True,
list_directories=True
)
def __init__(self, *patterns, **kwargs):
self._patterns = patterns
self.__dict__.update(MiniMatch._defaults)
self.__dict__.update(kwargs)
| spiralx/py-minimatch | minimatch/match.py | Python | mit | 270 |
using System.Xml.Serialization;
namespace MyFlightscope.Proxy.DTO
{
public class BallForGolfBag
{
[XmlElement("ID")]
public string ID { get; set; }
[XmlElement("BallIndex")]
public int BallIndex { get; set; }
[XmlElement("Ball")]
public Ball Ball { get; set; }
... | judgie79/MyFlight | MyFlightscope.Proxy/DTO/BallForGolfBag.cs | C# | mit | 327 |
package config
import "testing"
func TestNodeResourceConfigParsing(t *testing.T) {
yaml := `
Scheduler:
Node:
Resources:
Cpus: 42
RamGb: 2.5
DiskGb: 50.0
`
conf := Config{}
Parse([]byte(yaml), &conf)
if conf.Scheduler.Node.Resources.Cpus != 42 {
t.Fatal("unexpected cpus")
}
if conf.Sc... | buchanae/funnel | config/config_test.go | GO | mit | 1,127 |
/*
*
* Copyright (c) Microsoft. All rights reserved.
* Licensed under the MIT license.
*
* Project Oxford: http://ProjectOxford.ai
*
* Project Oxford Mimicker Alarm Github:
* https://github.com/Microsoft/ProjectOxford-Apps-MimickerAlarm
*
* Copyright (c) Microsoft Corporation
* All rights reserved.
*
* MIT... | Microsoft/ProjectOxford-Apps-MimickerAlarm | Mimicker/app/src/main/java/com/microsoft/mimickeralarm/globalsettings/VolumeSliderPreference.java | Java | mit | 3,648 |
// Fill out your copyright notice in the Description page of Project Settings.
using UnrealBuildTool;
using System.Collections.Generic;
public class Chapter1Target : TargetRules
{
public Chapter1Target(TargetInfo Target)
{
Type = TargetType.Game;
}
//
// TargetRules interface.
//
public override void Setup... | sunithshetty/Unreal-Engine-4-Scripting-with-CPlusPlus-Cookbook | Chapter01/Source/Chapter1.Target.cs | C# | mit | 534 |
import { expect } from 'chai'
import * as numeral from 'numeral'
import 'numeral/locales/en-gb'
import { NumberFormatter } from 'utils/numberFormatter'
describe('NumberFormatter', () => {
numeral.locale('en-gb')
describe('formatMoney', () => {
it('format numeric value to money', () => {
expect(NumberF... | hmcts/cmc-legal-rep-frontend | src/test/app/utils/numberFormatter.ts | TypeScript | mit | 674 |
package quantum
// 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... | Azure/azure-sdk-for-go | services/preview/quantum/mgmt/2019-11-04-preview/quantum/workspace.go | GO | mit | 4,476 |
/**
* Created by sbortman on 9/2/15.
*/
//= require jquery
//= require mapWidget
//= require_self
var MapView = (function ()
{
'use strict';
function init()
{
//alert('here');
MapWidget.init();
}
return {
init: init
};
})();
| sbortman/joker | apps/joker-ui/grails-app/assets/javascripts/mapView.js | JavaScript | mit | 278 |
var RoomMirror = require('./lib');
module.exports = RoomMirror;
| all-user/RoomMirror | index.js | JavaScript | mit | 64 |
// The MIT License (MIT)
//
// Copyright (c) 2016 Yunzhu Li
//
// 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,... | yunzhu-li/remote-exec | utils/utils.go | GO | mit | 3,709 |
// build-dependencies: observable
// build-dependencies: describe
// build-dependencies: functionconstruction
// build-dependencies: updatebarrier
// build-dependencies: dispatcher
// build-dependencies: optional
// build-dependencies: helpers
// build-dependencies: _
function PropertyDispatcher(property, subscribe, h... | vvilhonen/bacon.js | src/property.js | JavaScript | mit | 3,967 |
var assert = require('assert');
var path = require('path');
var fs = require('fs');
var streamEqual = require('stream-equal');
var nock = require('./nock');
var ytdl = require('..');
var VIDEO_BASE = 'https://www.youtube.com/watch?v=';
describe('Download video', function() {
var ... | DreamBig98/Youtube-Converter | test/download-test.js | JavaScript | mit | 2,155 |
<h2><?= $title ;?></h2>
<hr>
<div class="create-form">
<?php echo validation_errors(); ?>
<?php echo form_open_multipart('categories/create'); ?>
<div class="form-group">
<label>Name</label>
<input type="text" class="form-control" name="name" placeholder="Enter Category Name">
</div>
... | sagarthakore/ci | application/views/categories/create.php | PHP | mit | 406 |
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("He... | stanchev/Telerik-Academy | NumeralSystems/HexadecimalToBinary/Properties/AssemblyInfo.cs | C# | mit | 1,414 |
class AddRecipientDetailsToSubscriber < ActiveRecord::Migration
def change
add_column :shoppe_subscribers, :recipient_name, :string
add_column :shoppe_subscribers, :recipient_email, :string
add_column :shoppe_subscribers, :recipient_phone, :string
end
end
| dznicol/shoppe_subscriptions | db/migrate/20170326075850_add_recipient_details_to_subscriber.rb | Ruby | mit | 272 |
'use babel';
import React, { Component } from 'react'
import { findDOMNode } from 'react-dom'
class Start extends Component {
handleBtnGithubClick(event) {
let input_token = findDOMNode(this.refs.input_token)
input_token.style.display = "block"
}
handleChange(e) {
const { connectToGithub } = this.... | mertkahyaoglu/atom-video | lib/components/Start.js | JavaScript | mit | 1,358 |
var _ = require('lodash')
, gulp = require('gulp')
;
| mark-hudson/mdnotes | gulpfile.js | JavaScript | mit | 62 |
'use strict';
// Setting up route
/*
angular.module('articles').config(['$stateProvider',
function($stateProvider) {
// Articles state routing
$stateProvider.
state('listArticles', {
url: '/articles',
templateUrl: 'modules/articles/views/list-articles.client.view.html'
}).
state('createArticle', {
... | CSC-ORG/Dynamic-Dashboard-2015 | public/modules/articles/config/articles.client.routes.js | JavaScript | mit | 705 |
const fs = require('fs')
const renderSchema = require('./renderSchema')
function updateMarkdown(doc, newContent, options = {}) {
const includeMarkers = options.includeMarkers !== false
const startMarker = options.startMarker || '<!-- START graphql-markdown -->'
const endMarker = options.endMarker || '<!-- END gr... | exogen/graphql-markdown | src/updateSchema.js | JavaScript | mit | 1,842 |
##
# This module requires Metasploit: http://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##
require 'msf/core'
class MetasploitModule < Msf::Exploit::Remote
Rank = NormalRanking
include Msf::Exploit::Remote::Ftp
def initialize(info = {})
super(upda... | hahwul/mad-metasploit | archive/exploits/windows/remote/39662.rb | Ruby | mit | 2,067 |
import {ADD_TODO, DELETE_TODO, EDIT_TODO, COMPLETE_TODO, COMPLETE_ALL, CLEAR_COMPLETED} from '../constants/ActionTypes';
import {assign} from '../assign';
const initialState = [
{
text: 'Use Redux',
completed: false,
id: 0
}
];
export default function todos(state: any = initialState, action: any) {
... | FountainJS/generator-fountain-react | generators/todoMVC/modules/templates/src/app/reducers/todos.tsx | TypeScript | mit | 1,294 |
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("Ave... | Avarea/Programming-Fundamentals | AllProblems-Updated/AverageCharacterDelimiter/Properties/AssemblyInfo.cs | C# | mit | 1,421 |
namespace Nancy.Tests.Unit
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using FakeItEasy;
using Nancy.IO;
using Xunit;
using Xunit.Extensions;
public class RequestFixture
{
[Fact]
publ... | 151706061/Nancy | src/Nancy.Tests/Unit/RequestFixture.cs | C# | mit | 24,280 |
"""
@name: Modules/House/Security/login.py
@author: D. Brian Kimmel
@contact: D.BrianKimmel@gmail.com
@copyright: (c) 2019-2020 by D. Brian Kimmel
@note: Created on Jul 23, 2019
@license: MIT License
@summary: Handle logging in.
"""
# Import system type stuff
# Import PyMh files and modules.
from... | DBrianKimmel/PyHouse | Project/src/Modules/Core/Config/login.py | Python | mit | 1,248 |
# Copyright (c) 2013 Nicolas Dandrimont <nicolas.dandrimont@crans.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 restriction, including without limitation
# the rights to use,... | hcarvalhoalves/hy | hy/lex/exceptions.py | Python | mit | 1,352 |
module Demoable
class AccessResource < ActiveResource::Base
self.site = Demoable.master_site
self.element_name = "access_codes"
end
end | mlohstroh/demoable | app/models/demoable/access_resource.rb | Ruby | mit | 147 |
using System.Collections;
using Backgammon.Framework.Enumerations;
using Backgammon.Framework.Interfaces;
namespace Backgammon.Framework.Constants
{
public static class Setup
{
public static readonly IPosition[] Positions =
{
new Position(20, 10),
new Positio... | Arjestin/code-value-course | Backgammon.Ver2/Backgammon.Framework/Constants/Setup.cs | C# | mit | 3,658 |
package org.syxc.zhihudaily.model;
/**
* 最新消息
* Created by syxc on 16/1/7.
*/
public final class LatestNews {
}
| syxc/ZhihuDaily-Android | app/src/main/java/org/syxc/zhihudaily/model/LatestNews.java | Java | mit | 124 |
// Regular expression that matches all symbols in the Tifinagh block as per Unicode v6.3.0:
/[\u2D30-\u2D7F]/; | mathiasbynens/unicode-data | 6.3.0/blocks/Tifinagh-regex.js | JavaScript | mit | 110 |
package FileChooser_7;
import javafx.fxml.FXML;
import javafx.scene.Node;
import javafx.scene.control.*;
import javafx.stage.FileChooser;
import javafx.stage.Window;
import java.io.File;
/**
* Created by akshayrajgollahalli on 15/08/15.
*/
public class controller{
@FXML
private TextField myText;
@F... | akshaybabloo/JavaFX | src/FileChooser_7/controller.java | Java | mit | 732 |
// Copyright 2016 The go-okcoin Authors
// This file is part of the go-okcoin library.
//
// The go-okcoin library is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
/... | ManyCoin/ManyCoin | console/prompter.go | GO | mit | 6,282 |
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("9.... | svetlai/TelerikAcademy | Programming-with-C#/High-Quality-Code/09-Code-Tuning-and-Optimization/03-CompareAdvancedMaths/Properties/AssemblyInfo.cs | C# | mit | 1,442 |
old = '-1.py'
import os
os.remove(old)
data = 'old = \'' + str(int(old[:-3]) + 1) + '.py\'\n'
for line in file(str(int(old[:-3]) + 1) + '.py').readlines()[1:]:
data += line
file(str(int(old[:-3]) + 2) + '.py', 'w').write(data)
os.startfile(str(int(old[:-3]) + 2) + '.py')
| ActiveState/code | recipes/Python/440636_eight_most_annoying_lines_code_I_ever_did/recipe-440636.py | Python | mit | 276 |
package org.spoutcraft.api.gui.widget;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.util.Color;
public class Button extends Label {
public static final ResourceLocation DEFAULT_BACKGROUND = new ResourceLocation("spoutcraft", "textures/gui/button_background.png");
public static final ResourceLocatio... | THEDevTeam/SpoutcraftMod | src/main/java/org/spoutcraft/api/gui/widget/Button.java | Java | mit | 1,264 |
/*
* Property of RECAPT http://recapt.com.ec/
* Chief Developer Ing. Eduardo Alfonso Sanchez eddie.alfonso@gmail.com
*/
package com.recapt.trace;
import java.util.Date;
/**
*
* @author Eduardo
*/
public class Trace {
public static final String TRACE_RESULT_ERROR = "ERROR";
public static final String T... | edecisions/recapt | src/main/java/com/recapt/trace/Trace.java | Java | mit | 2,732 |
# -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2017-06-25 17:50
from __future__ import unicode_literals
from decimal import Decimal
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependen... | thiagopena/djangoSIGE | djangosige/apps/financeiro/migrations/0001_initial.py | Python | mit | 6,744 |
<?php
namespace Listreat\UserBundle\Entity;
use FOS\UserBundle\Entity\User as BaseUser;
use Doctrine\ORM\Mapping as ORM;
/**
* Listreat\UserBundle\Entity\User
*
* @ORM\Table()
* @ORM\Entity(repositoryClass="Listreat\UserBundle\Entity\UserRepository")
*/
class User extends BaseUser
{
/**
* @var integer ... | cgeoffray/virtualshops | src/Listreat/UserBundle/Entity/User.php | PHP | mit | 7,240 |
using System.Threading.Tasks;
using System.Web.Mvc;
using SFA.DAS.Authorization.Mvc.Attributes;
using SFA.DAS.EAS.Web.Extensions;
namespace SFA.DAS.EAS.Web.Controllers
{
[DasAuthorize]
[RoutePrefix("accounts")]
public class SearchOrganisationController : Controller
{
[HttpGet]
[Route("... | SkillsFundingAgency/das-employerapprenticeshipsservice | src/SFA.DAS.EAS.Web/Controllers/SearchOrganisationController.cs | C# | mit | 1,026 |
'use strict';
var util = require('util');
var path = require('path');
var fs = require('fs');
var yeoman = require('yeoman-generator');
var MixdownGenerator = module.exports = function MixdownGenerator(args, options, config) {
yeoman.generators.Base.apply(this, arguments);
this.on('end', function () {
this.in... | mixdown/generator-mixdown-cli | app/index.js | JavaScript | mit | 3,283 |
// variants of simple loop construct
class SimpleLoop {
void forLoop1(int m){
for(int i = 0; i < m; ++i);
}
void forLoop2(int m){
for(int i = m; i >= 0; --i);
}
void whileLoop(int m){
int i = 0;
while(i < m) i++;
}
void doWhileLoop(int m){
int i = m;
do
--i;
while(i >= 0);
}
}
| ComputationWithBoundedResources/grumpy | examples/SimpleLoop.java | Java | mit | 311 |
String text = "First Line\n" +
"Second Line\n" +
"Third Line";
| leomindez/From-Java-To-Ceylon | code/java/basic/strings-ii.java | Java | mit | 91 |
package com.afforess.sftp.sync.exception;
public class SFTPConnectionException extends SFTPException{
private static final long serialVersionUID = 1L;
public SFTPConnectionException(String message, Throwable cause) {
super(message, cause);
}
}
| Afforess/sftp-sync | src/main/java/com/afforess/sftp/sync/exception/SFTPConnectionException.java | Java | mit | 251 |
Router.configure({
layoutTemplate: 'applicationLayout',
loadingTemplate: 'loading',
notFoundTemplate: 'notFound'
});
Router.route('/', {name: 'home'});
Router.route('/discover', {name: 'discover'});
Router.route('/support', {name: 'support'});
Router.route('/signup', {name: 'signup'});
Router.route('/about', {n... | exyzzy/meteoryte | lib/router.js | JavaScript | mit | 2,662 |
using System;
using System.Collections.Generic;
namespace GAPrototype
{
public class PopulationGenerator
{
private Chromosome[] Population;
private int popSize;
private int chromosomeLength;
private Random R;
public int ChromosomeLength {
get {
return this.chromosomeLength;
}
set {
... | keym/Monoalphabetic-Cipher-Solving-Genetic-Algorithm | Code/Pre-alpha/GAPrototype/GAPrototype/PopulationGeneration.cs | C# | mit | 2,280 |
/**
* CloudMapping - Sistema de Extração de Dados de Mapeamento dos Experimentos em Computação em Nuvem
*
* Copyright (c) AssertLab.
*
* Este software é confidencial e propriedade da AssertLab. Não é permitida sua distribuição ou divulgação
* do seu conteúdo sem expressa autorização do AssertLab. Este arquivo ... | assertlab/extractviewer_project | mapping-application-web/src/main/java/br/ufpe/cin/cloud/mapeamento/negocio/extracaodados/dao/SelecaoEstudoDAO.java | Java | mit | 2,412 |
/**
/// ScrimpNet.Core Library
/// Copyright © 2005-2011
///
/// This module is Copyright © 2005-2011 Steve Powell
/// All rights reserved.
///
/// This library is free software; you can redistribute it and/or
/// modify it under the terms of the Microsoft Public License (Ms-PL)
///
/// This library is distributed in... | HashTagDotNet/WCF-Membership-Provider | __TestProjects/HashTag.ApplicationServices.Tests Project/TestUtils.cs | C# | mit | 10,070 |
#include <gxx/inet/dgramm.h>
#include <gxx/print.h>
int main() {
gxx::inet::udp_socket udp_sock(gxx::inet::localhost, 11001);
//gxx::inet::rdm_socket rdm_sock(gxx::inet::localhost, 11002);
char buf[128];
gxx::inet::netaddr inaddr;
size_t ret;
while(1) {
ret = udp_sock.recvfrom(buf, 128, &inaddr);
gxx::fpr... | Mirmik/gxx | tests/HIDE/datagramm_receiver/main.cpp | C++ | mit | 515 |
package net.nitrado.api;
import com.google.gson.*;
import com.google.gson.reflect.TypeToken;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonToken;
import com.google.gson.stream.JsonWriter;
import net.nitrado.api.common.Value;
import net.nitrado.api.common.exceptions.NitrapiErrorException;
... | nitrado/Nitrapi-Java | src/main/java/net/nitrado/api/Nitrapi.java | Java | mit | 15,532 |
(function() {
/**
@const
@type {boolean}
*/
var WEB = true;
;
var SubDoc, clone, depath, exports, isArray, json, pathEquals, text, traverse;
var __slice = Array.prototype.slice;
exports = window['sharejs'];
if (typeof WEB !== "undefined" && WEB !== null) {
text = exports.types.text;
} else {
t... | devjones/sharenow | webclient/json.uncompressed.js | JavaScript | mit | 24,532 |
var mod = require('mod').init({name: 'Cros'});
console.log(mod.getName()); | cros79/nodesperiments | app.js | JavaScript | mit | 77 |
///<reference path="../../../scripts/typings/q/Q.d.ts"/>
import moment = require('moment');
import Q = require('q');
import ArticleSource = require('../../models/article-source');
import ArticlesIndexDocument = require('./articles-index-document');
import Article = require('../article');
module ArticlesIndex {
e... | stephenzsy/octopus | dolphin/app/document/index/articles-index.ts | TypeScript | mit | 1,683 |
package network
// 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... | Azure/azure-sdk-for-go | services/network/mgmt/2018-01-01/network/routefilterrules.go | GO | mit | 20,510 |
/*
* Legal Notice
*
* This document and associated source code (the "Work") is a part of a
* benchmark specification maintained by the TPC.
*
* The TPC reserves all right, title, and interest to the Work as provided
* under U.S. and international laws, including without limitation all patent
* and trademark rig... | ermia-db/ermia | benchmarks/egen/AddressTable.cpp | C++ | mit | 13,288 |
import React from 'react';
import Icon from '../Icon';
export default class PermIdentityIcon extends Icon {
getSVG(){return <svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48"><path d="M24 11.8c2.32 0 4.2 1.88 4.2 4.2s-1.88 4.2-4.2 4.2-4.2-1.88-4.2-4.2 1.88-4.2 4.2-4.2m0 18c5.95 0 12.2... | kiloe/ui | src/icons/PermIdentityIcon.js | JavaScript | mit | 512 |
<?php
namespace ROH\Jobs\Provider;
use \ROH\Jobs\Jobs;
class JobProvider extends \Bono\Provider\Provider
{
public function initialize()
{
$app = $this->app;
if (empty($this->options)) {
$this->options = array();
}
Jobs::init($this->options);
// do someth... | reekoheek/bono-jobs | src/ROH/Jobs/Provider/JobProvider.php | PHP | mit | 337 |
<?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| ... | dekiakbar/siakad | routes/web.php | PHP | mit | 5,031 |
package com.normalexception.app.rx8club.fragment.pm;
/************************************************************************
* NormalException.net Software, and other contributors
* http://www.normalexception.net
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this softwar... | paimonsoror/RX8Club.com-Forum-Application | src/com/normalexception/app/rx8club/fragment/pm/PrivateMessageViewFragment.java | Java | mit | 10,076 |
module QbwcRequests
module ItemNonInventory
module V07
class Add < QbwcRequests::Base
field :name
field :is_active
field :pricetype
ref_to :parent, 1000
validates :name, presence: true
end
end
end
end
| apotema/qbwc_requests | lib/qbwc_requests/item_non_inventory/v07/add.rb | Ruby | mit | 280 |
/**
* @fileoverview Tests for IgnoredPaths object.
* @author Jonathan Rajavuori
*/
"use strict";
//------------------------------------------------------------------------------
// Requirements
//------------------------------------------------------------------------------
const assert = require("chai").assert,
... | Gillespie59/eslint | tests/lib/ignored-paths.js | JavaScript | mit | 30,040 |
<?php
/* 401.php
* application HTTP 401 page
*/
defined('HEADER') || include_once('header.php');
?>
<div class="cleft left error">
You must login to access this URL
</div>
<div class="cleft left info">
If you just installed a new SSL certificate, try <a target="_blank" href="http://code.google.com/p/chromium/issues... | linkeddata/ldphp | www/inc/401.php | PHP | mit | 649 |
/*
Copyright 2016 The Kubernetes Authors All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or ag... | huangliangjun/vessel | vendor/k8s.io/kubernetes/pkg/volume/azure_file/azure_file.go | GO | mit | 7,889 |
#!/usr/bin/env python3
#Copyright (C) 2013 by Ngan Nguyen
# Copyright (C) 2012-2019 by UCSC Computational Genomics Lab
#
#Released under the MIT license, see LICENSE.txt
"""Snake tracks
"""
from optparse import OptionGroup
import re
def addSnakeOptions(parser):
group = parser.add_argument_group("SNAKE TRACKS", "... | glennhickey/hal | assemblyHub/snakeTrack.py | Python | mit | 1,869 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('editorial', '0064_auto_20171202_2016'),
]
operations = [
migrations.RenameField(
model_name='assignment',
... | ProjectFacet/facet | project/editorial/migrations/0065_auto_20171202_2022.py | Python | mit | 402 |
<?php
declare(strict_types=1);
namespace Overblog\GraphQLBundle\Annotation\Relay;
use Attribute;
use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor;
use Overblog\GraphQLBundle\Annotation\Annotation;
use Overblog\GraphQLBundle\Annotation\Type;
/**
* Annotation for GraphQL connection edge.
*
* @An... | overblog/GraphQLBundle | src/Annotation/Relay/Edge.php | PHP | mit | 606 |
using System;
using System.Collections.Generic;
namespace GtkSharpExtensions.Automotive
{
/// <summary>
/// Stores information about an Automobile Type
/// </summary>
public class Automobile
{
public Manufacturer Make { get; set; }
public AutoModel Model { get; set; }
public int Year { get; set; }
pub... | TDubClark/GtkSharpExtensions | GtkSharpExtensions/Automotive/Automobile.cs | C# | mit | 571 |
using System;
using System.IO;
using System.Net;
namespace Dongle.System.IO.Ftp
{
public class FtpFileInfo
{
private readonly string _fileName;
private readonly NetworkCredential _networkCredential;
public FtpFileInfo(string fileName, NetworkCredential networkCredential)
{
... | webbers/dongle.net | src/Dongle/System/IO/Ftp/FtpFileInfo.cs | C# | mit | 3,281 |
// Chapter 19, exercise 03: template class Pair to hold pair of values of any
// type; use to implement symbol table like the one used in calculator (§7.8)
#include "../lib_files/std_lib_facilities.h"
// -----------------------------------------------------------------------------
template<class T, class U> struct P... | bewuethr/stroustrup_ppp | chapter19/chapter19_ex03.cpp | C++ | mit | 3,000 |
const Helpers = require('../../../../common/databaseHelpers.js');
const Assert = require('chai').assert;
module.exports = function() {
it('return default query part with no parameter', function() {
Assert.equal(Helpers.getOrderByQuery(), ' ORDER BY id ASC');
});
it('return correct query part with single ascendin... | waiterio/api | test/unit/common/databaseHelpers/testGetOrderByQuery.js | JavaScript | mit | 1,362 |
<?php
namespace App\Controllers\Api\Admin;
use Slim\Http\Request;
use Slim\Http\Response;
use App\Models\Node;
use App\Models\TrafficLog;
use App\Controllers\BaseController;
class NodeController extends BaseController
{
public function index(Request $req, Response $res, $args)
{
$pageNum = 1;
... | ma321c/SS-panel_V4 | app/Controllers/Api/Admin/NodeController.php | PHP | mit | 2,300 |
class RevisionsController < ApplicationController
before_filter :load_article
def new
@revision = @article.revisions.new
@revision.body = @article.current_revision.body
end
def create
@revision = @article.revisions.create(revision_params)
if @revision.persisted?
redirect_to article_path... | locriani/magmawiki | app/controllers/revisions_controller.rb | Ruby | mit | 574 |
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: google/ads/googleads/v1/enums/asset_type.proto
package enums
import (
fmt "fmt"
math "math"
proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
)
// Reference imports to suppress errors if they are not oth... | pushbullet/engineer | vendor/google.golang.org/genproto/googleapis/ads/googleads/v1/enums/asset_type.pb.go | GO | mit | 5,428 |