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
# -*- coding: utf-8 -*- """ Utils has nothing to do with models and views. """ from datetime import datetime from flask import current_app def get_current_time(): return datetime.utcnow() def format_date(value, format='%Y-%m-%d %H:%M:%S'): return value.strftime(format) def get_resource_as_string(name...
vovantics/flask-bluebone
app/utils.py
Python
mit
427
# Copyright (c) 2016 kamyu. All rights reserved. # # Google Code Jam 2016 Round 1A - Problem B. Rank and File # https://code.google.com/codejam/contest/4304486/dashboard#s=p1 # # Time: O(N^2) # Space: O(N^2), at most N^2 numbers in the Counter # from collections import Counter def rank_and_file(): N = input() ...
kamyu104/GoogleCodeJam-2016
Round 1A/rank-and-file.py
Python
mit
774
package workspace; import java.util.Collection; import javax.swing.JComponent; import renderable.RenderableBlock; /** WorkspaceWidgets are components within the workspace other than blocks that * include bars, buttons, factory drawers, and single instance widgets such as * the MiniMap and the TrashCan. */ pu...
boubre/BayouBot
Workspace/src/workspace/WorkspaceWidget.java
Java
mit
3,255
import babel from 'rollup-plugin-babel'; export default { plugins: [babel()] };
alexeyraspopov/message-script
rollup.config.js
JavaScript
mit
83
var lang = navigator.language; exports.set_lang=function(_lang,msgs){ lang = _lang || navigator.language; if(lang.indexOf('en')===0){ lang = 'en'; }else if(lang.indexOf('es')===0){ lang = 'es'; }else{ lang = 'en'; } var nodes = document.querySelectorAll('[msg]'); for(var i = 0; i < nodes.leng...
Technogi/website
src/scripts/msg.js
JavaScript
mit
1,145
<?php include("session.php"); $debug=$_GET['d']; ?> <!DOCTYPE html> <!-------------------------------------------- LICENSE (MIT) ------------------------------------------------- Copyright (c) 2015 Conor Walsh Website: http://www.conorwalsh.net GitHu...
conorwalsh/SEM
Web/nonadmin.php
PHP
mit
6,313
'use strict'; const postcodeApi = require('../index.js'); const sinon = require('sinon'); const chai = require('chai'); const expect = chai.expect; const sinonChai = require('sinon-chai'); const requestApi = require('../lib/requestApi.js'); before(() => { chai.use(sinonChai); }); var sandbox; beforeEach(() => { s...
joostdebruijn/node-postcode-nl
test/helpers.followNext.js
JavaScript
mit
6,658
<?php class User_Form_Validate_PasswordMatch extends Zend_Validate_Abstract { const NOT_MATCH = 'notMatch'; protected $_messageTemplates = array( self::NOT_MATCH => 'Geslo in ponovi geslo se ne ujemata' ); public function isValid($value, $context = null) { $value = (string) $value; $this->_setValue($valu...
freshcrm/fresh-crm
plugins/User/lib/User/Form/Validate/PasswordMatch.php
PHP
mit
590
version https://git-lfs.github.com/spec/v1 oid sha256:ba1edb37cd9663c92048dc14cd2f7e9e81d2ce7364194e973ba9e1238f9198a2 size 878
yogeshsaroya/new-cdnjs
ajax/libs/extjs/4.2.1/src/lang/Number.min.js
JavaScript
mit
128
package xyz.hotchpotch.jutaime.throwable.matchers; import java.util.Objects; import org.hamcrest.Matcher; import xyz.hotchpotch.jutaime.throwable.Testee; /** * スローされた例外を検査する {@code Matcher} です。<br> * この {@code Matcher} は、スローされた例外そのものの型やメッセージが期待されたものかを検査します。<br> * 検査対象のオペレーションが正常終了した場合は、不合格と判定します。<br> ...
nmby/jUtaime
project/src/main/java/xyz/hotchpotch/jutaime/throwable/matchers/RaiseExact.java
Java
mit
3,077
/** * Module dependencies */ var uuid = require('uuid'); var utils = require('../utils'); var safeRequire = utils.safeRequire; var helpers = utils.helpers; var couchbase = safeRequire('couchbase'); var CouchBase; exports.initialize = function (schema, callback) { var db, opts; opts = schema.settings || {}; ...
biggora/caminte
lib/adapters/couchbase.js
JavaScript
mit
9,831
var ObjectExplorer = require('../') var explorer = document.getElementById('explorer') var add = document.getElementById('add') var obj = { a: 10, b: true, reg: /foo/g, dat: new Date('2013-08-29'), str: "fooo, bar" } obj.self = obj obj.arr = [obj, obj, obj] obj.longArr = [] for (i = 0; i < 500; i++) obj.long...
ForbesLindesay/object-explorer
demo/client.js
JavaScript
mit
503
package service import ( "fmt" "jarvis/log" "os/exec" "strings" "time" ) type CommandResult struct { Text string Error error } type Docker struct{} func (d Docker) RunShInContainer(command string, timeout time.Duration) (string, error) { log.Info("Executing command '%v' in container 'ubuntu'", command) re...
mhoc/jarvis
src/jarvis/service/docker_service.go
GO
mit
1,804
var global = window; var Stack = require('lib/swing/stack'), Card = require('lib/swing/card'); global.gajus = global.gajus || {}; global.gajus.Swing = { Stack: Stack, Card: Card }; module.exports = { Stack: Stack, Card: Card };
unbug/generator-webappstarter
app/templates/app/src/lib/swing/swing.js
JavaScript
mit
242
require 'spec_helper' describe Unitpay do it 'has a version number' do expect(Unitpay::VERSION).not_to be nil end end
ssnikolay/unitpay
spec/unitpay_spec.rb
Ruby
mit
127
package org.ethereum.net.rlpx.discover; import io.netty.bootstrap.Bootstrap; import io.netty.channel.*; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.nio.NioDatagramChannel; import org.ethereum.crypto.ECKey; import org.ethereum.net.rlpx.Node; import org.ethereum.net.rlpx.discover.table....
BlockchainSociety/ethereumj-android
ethereumj-core/src/main/java/org/ethereum/net/rlpx/discover/UDPListener.java
Java
mit
3,443
# frozen_string_literal: true require 'request_store' # Requiring this file, or calling `Gecko.enable_logging` will hook into the provided # ActiveSupport::Notification hooks on requests and log ActiveRecord-style messages # on API requests. class GeckoLogSubscriber < ActiveSupport::LogSubscriber ENV_KEY = :"gecko-...
tradegecko/gecko
lib/gecko/ext/log_subscriber.rb
Ruby
mit
1,160
import os import numpy as np import pandas as pd import patools.packing as pck class Trial: def __init__(self, directory=os.getcwd(), nbs=False): self.packings = self.loadTrials(directory, nbs) self.df = pd.DataFrame(index=self.packings.keys()) self._getSphereRads() self._getPartic...
amas0/patools
patools/trial.py
Python
mit
5,966
txt = "the quick brown fox jumped over thethe lazy dog" txt2 = txt.replace("the","a") print txt print txt2
treeform/pystorm
tests/strings/replace.py
Python
mit
110
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. // Code generated by Microsoft (R) AutoRest Code Generator. package com.azure.resourcemanager.apimanagement; import com.azure.core.util.Context; /** Samples for ContentItem Get. */ public final class ContentItemGetSamples...
Azure/azure-sdk-for-java
sdk/apimanagement/azure-resourcemanager-apimanagement/src/samples/java/com/azure/resourcemanager/apimanagement/ContentItemGetSamples.java
Java
mit
918
using System; using System.Collections.Generic; using System.ComponentModel; using System.Net.Http.Headers; namespace WebApiProxy.Api.Sample.Areas.HelpPage { /// <summary> /// This is used to identify the place where the sample should be applied. /// </summary> public class HelpPageSampleKey { ...
lust4life/WebApiProxy
WebApiProxy.Api.Sample/Areas/HelpPage/SampleGeneration/HelpPageSampleKey.cs
C#
mit
6,486
/** * @license * Copyright Google Inc. All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ import { Injectable } from '@angular/core'; @Injectable() export class Service839Service { constructor() { } }
angular/angular-cli-stress-test
src/app/services/service-839.service.ts
TypeScript
mit
320
/** * Definition for binary tree with next pointer. * struct TreeLinkNode { * int val; * TreeLinkNode *left, *right, *next; * TreeLinkNode(int x) : val(x), left(NULL), right(NULL), next(NULL) {} * }; */ class Solution { public: void connect(TreeLinkNode *root) { if (!root) return; queue<Tr...
cloudzfy/leetcode
src/117.populating_next_right_pointers_in_each_node_ii/code2.cpp
C++
mit
717
<?php declare(strict_types=1); /** * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files m...
dakota/cakephp
src/View/Widget/WidgetInterface.php
PHP
mit
1,400
#pragma once #include <cstddef> // size_t struct InputEvent { struct Player *player = 0; virtual void apply(struct Game &) {} virtual ~InputEvent() {} static InputEvent *parse(const char *, size_t); }; struct Connect : InputEvent { Connect() {} void apply(struct Game &) override; }; struct Disconnect : ...
xzfc/agarsk
inputEvent.hpp
C++
mit
392
package be.ugent.oomt.labo3; import android.app.Activity; import android.os.Bundle; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } }
VDBBjorn/Mobiele-applicaties
Labo_03/Labo3/app/src/main/java/be/ugent/oomt/labo3/MainActivity.java
Java
mit
304
class Solution(object): def findSubstring(self, s, words): """ :type s: str :type words: List[str] :rtype: List[int] """
xingjian-f/Leetcode-solution
30. Substring with Concatenation of All Words.py
Python
mit
173
#include "bitcoinunits.h" #include <QStringList> BitcoinUnits::BitcoinUnits(QObject *parent): QAbstractListModel(parent), unitlist(availableUnits()) { } QList<BitcoinUnits::Unit> BitcoinUnits::availableUnits() { QList<BitcoinUnits::Unit> unitlist; // unitlist.append(BTC); unitlist.append(...
bitchip/bitchip
src/qt/bitcoinunits.cpp
C++
mit
4,375
import { AudioStreamFormat } from 'microsoft-cognitiveservices-speech-sdk'; export { AudioStreamFormat };
billba/botchat
packages/testharness/pre/external/microsoft-cognitiveservices-speech-sdk/index.js
JavaScript
mit
107
app.controller('MapsCTRL2', function($scope) { app.value('NEW_TODO_ID', -1); app.service('mapService', function () { var map; this.setMap = function (myMap) { map = myMap; }; this.getMap = function () { if (map) return map; throw new Error("Map not defined"); ...
hopeeen/instaApp
www/scripts/controllers/maps2.js
JavaScript
mit
13,504
import mongoose from 'mongoose'; import request from 'supertest-as-promised'; import httpStatus from 'http-status'; import chai, { expect } from 'chai'; import app from '../../index'; chai.config.includeStack = true; /** * root level hooks */ after((done) => { // required because https://github.com/Automattic/mon...
CaptainSid/WarSid-Swissport
server/tests/Compte.test.js
JavaScript
mit
3,205
import React, { Component } from 'react'; import PropTypes from 'prop-types'; import AppActions from '../../actions/AppActions'; /* |-------------------------------------------------------------------------- | Child - Audio settings |-------------------------------------------------------------------------- */ expo...
Eeltech/SpaceMusik
src/ui/components/Settings/SettingsAudio.react.js
JavaScript
mit
1,248
using System.IO; namespace Benchmark { using System; using System.Diagnostics; public static unsafe class Benchmark { private const string OutputFilename = "results.csv"; private static readonly double TicksPerMicrosecond = (double)Stopwatch.Frequency/1000000; private static S...
doubleyewdee/dotnet-fixed-benchmark
src/Program.cs
C#
mit
5,659
require_relative 'extensions/encoding_extensions' require_relative 'extensions/string_extensions' module Rubikey class KeyConfig using Rubikey::EncodingExtensions using Rubikey::StringExtensions attr_reader :public_id attr_reader :secret_id attr_reader :insert_counter def initialize(u...
sigfrid/rubikey
lib/rubikey/key_config.rb
Ruby
mit
1,393
package br.com.portalCliente.util.dateUtilities; import java.util.Calendar; import java.util.Date; import java.util.TimeZone; public class DateInterceptorUtils { private static TimeZone tz = TimeZone.getTimeZone("America/Recife"); public static int FIRST_HOUR_DAY [] = {0,0,0}; public static int LAST_HOUR_DAY [] ...
dfslima/portalCliente
src/main/java/br/com/portalCliente/util/dateUtilities/DateInterceptorUtils.java
Java
mit
5,148
// WARNING // // This file has been generated automatically by Xamarin Studio from the outlets and // actions declared in your storyboard file. // Manual changes to this file will not be maintained. // using Foundation; using System; using System.CodeDom.Compiler; using UIKit; namespace Thingamabot { [Register ("Joys...
petergolde/wheelchair-robot
iOS/Thingamabot/JoystickViewController.designer.cs
C#
mit
602
%% %% Qt5xHb - Bindings libraries for Harbour/xHarbour and Qt Framework 5 %% %% Copyright (C) 2020 Marcos Antonio Gambeta <marcosgambeta AT outlook DOT com> %% $project=Qt5xHb $module=QtScriptTools $header #include <QtCore/Qt> #ifndef __XHARBOUR__ #include <QtScriptTools/QtScriptToolsVersion> #endif ...
marcosgambeta/Qt5xHb
codegen/QtScriptTools/QtScriptToolsVersion.cpp
C++
mit
666
package mg.fishchicken.core.conditions; import groovy.lang.Binding; import java.util.Locale; import mg.fishchicken.gamelogic.characters.GameCharacter; import mg.fishchicken.gamelogic.characters.GameCharacter.Skill; import mg.fishchicken.gamelogic.inventory.Inventory.ItemSlot; import mg.fishchicken.gamelogic...
mganzarcik/fabulae
core/src/mg/fishchicken/core/conditions/HasMeleeWeaponEquipped.java
Java
mit
3,758
import { BrowserModule, Title } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { AppComponent } from './app.component'; import { ItemsComponent } from './items/items.component'; @NgModule({ declarations: [ AppComponent, ItemsComponent ], imports: [ BrowserModule ...
railsstudent/angular-30
Day27-Click-And-Drag/src/app/app.module.ts
TypeScript
mit
412
<?php declare(strict_types = 1); namespace Innmind\TimeContinuum\Earth\Timezone\Europe; use Innmind\TimeContinuum\Earth\Timezone; /** * @psalm-immutable */ final class Simferopol extends Timezone { public function __construct() { parent::__construct('Europe/Simferopol'); } }
Innmind/TimeContinuum
src/Earth/Timezone/Europe/Simferopol.php
PHP
mit
301
package live; /** * A class implements this interface can call back * @author Han */ public interface Callback { public void callback(); }
haneev/TweetRetriever
src/live/Callback.java
Java
mit
153
//--------------------------------------------------------------------------- // Copyright (c) 2016 Michael G. Brehm // // 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...
djp952/tools-llvm
clang/ExtentExtensions.cpp
C++
mit
2,354
using System.Reflection; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Windows; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated ...
CNinnovation/WPFWorkshopSep2016
WPF/WPFSamples/TriggerSAmples/Properties/AssemblyInfo.cs
C#
mit
2,387
package com.thales.ntis.subscriber.services; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import com.thales.ntis.subscriber.datex.BasicData; import com.thales.ntis.subscriber.datex.D2LogicalModel; import com.thales.ntis.subscriber.date...
ntisservices/ntis-java-web-services-Release2.5
SubscriberService/src/main/java/com/thales/ntis/subscriber/services/FusedSensorOnlyTrafficDataServiceImpl.java
Java
mit
4,105
// @flow import type { ChooView } from "../app"; const html = require("choo/html"); const messages = require("../messages"); const textInput = ({ label, name }) => html` <label> ${label} <input name=${name}/> </label>`; const signupForm = ({ onSubmit }) => html` <form onsubmit=${onSubmit}> ${textInput({ l...
fczuardi/videochat-client
src/views/signup.js
JavaScript
mit
981
package net.lemonfactory.sudokusolver.gui; import java.io.UnsupportedEncodingException; import java.util.Enumeration; import java.util.Locale; import java.util.PropertyResourceBundle; import java.util.ResourceBundle; /** * ResourceBundle with UTF-8. See * http://www.thoughtsabout.net/blog/archives/000044.html. * ...
clee704/sudokusolver
src/main/net/lemonfactory/sudokusolver/gui/Utf8ResourceBundle.java
Java
mit
1,980
//Copyright (c) 2011 Kenneth Evans // //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, //di...
KennethEvans/Misc
app/src/main/java/net/kenevans/android/misc/SMSActivity.java
Java
mit
22,554
package lamrongol.javatools; import org.apache.commons.io.FileUtils; import java.io.File; import java.util.Collection; import java.util.List; /** * known bugs: * Serializable will be duplicate if a class already has Serializable * doesn't work correctly for generics with extends */ public class MakeClassSerializ...
lamrongol/MakeJavaClassSerializable
src/main/java/lamrongol/javatools/MakeClassSerializable.java
Java
mit
2,307
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class AgenciasPromotores extends CI_Controller { public function __construct() { parent::__construct(); $this->load->model('AgenciasPromotores_Model', 'model'); } //---------------------------------------------------------...
naycont/naybam
application/controllers/AgenciasPromotores.php
PHP
mit
5,333
import { DRAFT_MIME_TYPES, PACKAGE_TYPE } from '../constants'; export interface AutoResponder { StartTime: number; EndTime: number; Repeat: number; DaysSelected: number[]; Subject: string; Message: string; IsEnabled: boolean; Zone: string; } export interface MailSettings { DisplayN...
ProtonMail/WebClient
packages/shared/lib/interfaces/MailSettings.ts
TypeScript
mit
1,328
var notice_this_is_a_global_var = "WAT?"; window.getGlobalTemplate = function() { var compiled = _.template('<h1>Hello from a <strong>Global</strong> module running a <%= templateName %>!</h1>'); return compiled({ 'templateName': 'Lodash template' }); };
staxmanade/jspm-presentation
demo-commonjs-amd-global/globalModule.js
JavaScript
mit
270
const DrawCard = require('../../drawcard.js'); const { Locations, Players, CardTypes } = require('../../Constants'); class MyAncestorsStrength extends DrawCard { setupCardAbilities(ability) { // eslint-disable-line no-unused-vars this.action({ title: 'Modify base military and political skills',...
jeremylarner/ringteki
server/game/cards/04.4-TEaF/MyAncestorsStrength.js
JavaScript
mit
2,289
/** * Cineast RESTful API * Cineast is vitrivr\'s content-based multimedia retrieval engine. This is it\'s RESTful API. * * The version of the OpenAPI document: v1 * Contact: contact@vitrivr.org * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-gener...
vitrivr/vitrivr-ng
openapi/cineast/model/tagsQueryResult.ts
TypeScript
mit
484
(function () { var fullpage = (function () { 'use strict'; var Cell = function (initial) { var value = initial; var get = function () { return value; }; var set = function (v) { value = v; }; var clone = function () { return Cell(get()); }; return { get: get,...
AnttiKurittu/kirjuri
vendor/tinymce/tinymce/plugins/fullpage/plugin.js
JavaScript
mit
16,270
/* Copyright 1987, 1989, 1990 by Abacus Research and * Development, Inc. All rights reserved. */ /* Forward declarations in ResourceMgr.h (DO NOT DELETE THIS LINE) */ #include <base/common.h> #include <ResourceMgr.h> #include <FileMgr.h> #include <MemoryMgr.h> #include <res/resource.h> using namespace Executor; ...
autc04/executor
src/res/resIMIV.cpp
C++
mit
1,328
<?php use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateMstDataUserTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('mst_data_user', function (Blueprint $table) { ...
r3k4/ujianonline
database/migrations/2015_10_27_130540_create_MstDataUser_table.php
PHP
mit
833
package UIComponent import ( "github.com/chslink/JinYongXGo/system/input" "github.com/chslink/JinYongXGo/utils/logs" "github.com/hajimehoshi/ebiten" ) //TODO event //Button Sprites type Button struct { *Sprite Text *Lable Active bool Pressed bool clickFun func() activeFun func(screen *ebiten.Image) pr...
chslink/JinYongXGo
system/UIComponent/button.go
GO
mit
2,010
$(document).ready(function(){ SC.initialize({ client_id: "472760520d39b9fa470e56cdffc71923", }); $('.leaderboard tr').each(function(){ var datacell = $(this).find('.datacell').data('url'); var data = datacell.data('url'); SC.oEmbed(data, {auto_play: false}, datacell); }) /* SC.oEmbed($('#cru...
srhoades28/CI_Crunchoff
assets/js/leaderboard.js
JavaScript
mit
498
/** * SmithNgine Game Framework * * Copyright (C) 2013 by Erno Pakarinen / Codesmith (www.codesmith.fi) * All Rights Reserved */ namespace Codesmith.SmithNgine.Gfx { using System; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; usin...
codesmith-fi/smithngine
smithNgine/Gfx/SpriteButton.cs
C#
mit
6,992
#!/usr/bin/env node /** * Extremely simple static website serving script * This is provided in case you need to deploy a quick demo * * Install + run: * * # from parent directory * * cd demo * npm install * node server * */ var bodyParser = require('body-parser'); var express = require('express'); var humanize = ...
MomsFriendlyDevCo/angular-ui-history
demo/server.js
JavaScript
mit
3,855
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("Lab...
DenicaAtanasova/02.TechModule
01. Programming Fundamentals/Lesson2ConditionsAndLoops/Lab2PassedOrFailed/Properties/AssemblyInfo.cs
C#
mit
1,407
import { I18N } from "../../src/i18n"; import { BindingSignaler } from "aurelia-templating-resources"; import { NfValueConverter } from "../../src/nf/nf-value-converter"; import { EventAggregator } from "aurelia-event-aggregator"; describe("nfvalueconverter tests", () => { let sut: I18N; let nfvc: NfValueConverter...
aurelia/i18n
test/unit/nfvalueconverter.spec.ts
TypeScript
mit
1,542
/** * Plural rules for the fi (Finnish, suomi, suomen kieli) language * * This plural file is generated from CLDR-DATA * (http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html) * using js-simple-plurals and universal-i18n * * @param {number} p * @return {number} 0 - one, 1 - other *...
megahertz/js-simple-plurals
web/fi.js
JavaScript
mit
750
using Microsoft.SharePoint.Client.NetCore.Runtime; using System; using System.ComponentModel; namespace Microsoft.SharePoint.Client.NetCore { [ScriptType("SP.EventReceiverDefinition", ServerTypeId = "{a8d3515c-1135-4fff-95a6-4e5e5fff4adc}")] public sealed class EventReceiverDefinition : ClientObject { ...
OneBitSoftware/NetCore.CSOM
Microsoft.SharePoint.Client.NetCore/EventReceiverDefinition.cs
C#
mit
5,375
from functools import wraps import os from flask import request from werkzeug.utils import redirect ssl_required_flag = os.environ.get('SSL_REQUIRED', False) == 'True' def ssl_required(fn): @wraps(fn) def decorated_view(*args, **kwargs): if ssl_required_flag and not request.is_secure: return redirect(request.u...
hectorbenitez/flask-heroku
flas/decorators.py
Python
mit
408
using System; using System.Collections.Generic; using System.Web.UI; using System.Xml; namespace RSSFeed { public partial class RssView : Page { protected void Page_Load(object sender, EventArgs e) { BindRssRepeater(); } private void BindRssRepeater() { ...
dsjomina/RSSFeed
RSSFeed/RSSFeed/RssView.aspx.cs
C#
mit
2,341
/*global Ghetto*/ (function ($) { $('div').on('click', '.save-button', function (e) { var id = $(this).attr('data-id'); //trim genre off the end of id (it was there for uniqueness on the page) id = id.substring(0, id.indexOf('_')); $('[id^=save-button-div-' + id + ']').collapse('h...
jajmo/Ghetto-IMDB
static/js/movies.js
JavaScript
mit
6,246
'use strict'; var fs = require( 'fs' ); var path = require( 'path' ); var readlineSync = require( 'readline-sync' ); require( 'plus_arrays' ); require( 'colors' ); var freqTable = require( './freqTable' ); function annotateRandomSample( inputFile, options ) { // if path is not absolute, make it absolute with resp...
Planeshifter/node-wordnetify-sample
lib/annotateRandomSample.js
JavaScript
mit
1,860
<?php /* [UCenter] (C)2001-2099 Comsenz Inc. This is NOT a freeware, use is subject to license terms $Id: user.php 1078 2011-03-30 02:00:29Z monkey $ */ !defined('IN_UC') && exit('Access Denied'); class usermodel { var $db; var $base; function __construct(&$base) { $this->usermodel($bas...
MyController/ucclient
src/uc_client/model/user.php
PHP
mit
9,134
<?php /** * Configula Library * * @license http://opensource.org/licenses/MIT * @link https://github.com/caseyamcl/configula * @version 4 * @package caseyamcl/configula * @author Casey McLaughlin <caseyamcl@gmail.com> * * For the full copyright and license information, - please view the LICENSE.md * file tha...
caseyamcl/Configula
src/Util/LocalDistFileIterator.php
PHP
mit
2,452
package pad // // Paxos library, to be included in an application. // Multiple applications will run, each including // a Paxos peer. // // Manages a sequence of agreed-on values. // The set of peers is fixed. // Copes with network failures (partition, msg loss, &c). // Does not store anything persistently, so cannot ...
jdhenke/pad
server/pad/paxos.go
GO
mit
13,355
<?php namespace Jenny\ImportBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; class JennyImportBundle extends Bundle { }
jennydjen/NoteDeFrais
src/Jenny/ImportBundle/JennyImportBundle.php
PHP
mit
130
using System; namespace LexicalAnalysis { /// <summary> /// String literal /// </summary> public sealed class TokenString : Token { public TokenString(String val, String raw) { if (val == null) { throw new ArgumentNullException(nameof(val)); } ...
phisiart/C-Compiler
Scanner/String.cs
C#
mit
4,376
package org.common; import java.io.BufferedReader; import java.io.IOException; import java.io.PrintWriter; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import javax.xml.bind.DatatypeConverter; /** * Common utilities and code shared for both the client and server. * */ publi...
or-drop-tables-team/sup
common/src/main/java/org/common/Utils.java
Java
mit
5,092
<?php namespace Rareloop\Primer\Commands; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Rareloop\Primer\Pri...
joelambert/primer-core
src/Primer/Commands/PatternMake.php
PHP
mit
1,788
using System.ComponentModel.DataAnnotations; using KPI.Infrastructure; namespace KPI.Catalog.Domain { public class Brand : Entity { public string Name { get; set; } public string SeoTitle { get; set; } [StringLength(5000)] public string Description { get; set; } publ...
netcoreangular2group/Dot-Net-Core-Rest-Api
Modules/Catalog/KPI.Catalog.Domain/Brand.cs
C#
mit
409
<?php namespace App\UserBundle\DataFixtures\ORM; use Doctrine\Common\Persistence\ObjectManager; use Doctrine\Common\DataFixtures\AbstractFixture; use Doctrine\Common\DataFixtures\OrderedFixtureInterface; use App\SettingsBundle\Entity\Settings; class SettingsData extends AbstractFixture implements OrderedFixtureInter...
gisoftlab/SymfonyCMS
src/App/SettingsBundle/DataFixtures/ORM/SettingsData.php
PHP
mit
1,535
using UnityEngine; using System.Collections; public class SelfDestructPS : MonoBehaviour { ParticleSystem ps; // Use this for initialization void Start () { ps = GetComponent<ParticleSystem>(); } // Update is called once per frame void Update () { if (!ps.IsAlive()) Destroy(ga...
thk123/WizardsRitual
Get Off My Spawn/Assets/SelfDestructPS.cs
C#
mit
338
//@@author A0147996E package seedu.address.testutil; import java.util.ArrayList; import java.util.Collections; import java.util.List; import seedu.address.commons.exceptions.IllegalValueException; import seedu.address.model.TaskManager; import seedu.address.model.task.Task; import seedu.address.model.task.UniqueTaskL...
CS2103JAN2017-W10-B1/main
src/test/java/seedu/address/testutil/TypicalTestEvents.java
Java
mit
7,866
/*! * datastructures-js * priorityQueue * Copyright(c) 2015 Eyas Ranjous <eyas@eyasranjous.info> * MIT Licensed */ var queue = require('./queue'); function priorityQueue() { 'use strict'; var prototype = queue(), // queue object as the prototype self = Object.create(prototype); // determin...
Bryukh/datastructures-js
lib/priorityQueue.js
JavaScript
mit
1,632
package org.runetranscriber.core; import java.awt.Font; /** * Defines methods required by a rune to font letter transcriber. * * @param <R> Rune type parameter. * @param <F> Font letter type parameter. */ public interface FontTranscriber<R extends Rune, F extends FontLetter> extends Transcriber<RuneList...
jmthompson2015/runetranscriber
core/src/main/java/org/runetranscriber/core/FontTranscriber.java
Java
mit
748
Minder.run(function($rootScope) { angular.element("body").fadeIn(300); // Add runtime tasks here });
jeremythuff/minderui
app/config/runTime.js
JavaScript
mit
107
package HealthAndFitnessBlog.bindingModel; import javax.validation.constraints.NotNull; public class UserBindingModel { @NotNull private String email; @NotNull private String fullName; @NotNull private String password; @NotNull private String confirmPassword; public String getE...
HealthAndFitnessBlog/HealthAndFitnessBlog
blog/src/main/java/HealthAndFitnessBlog/bindingModel/UserBindingModel.java
Java
mit
939
<?php namespace Acf\AdminBundle\Form\Autoinc; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\TextareaType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; /** * * @author sasedev <seif.salah@gmail.com> */ class UpdateT...
sasedev/acf-expert
src/Acf/AdminBundle/Form/Autoinc/UpdateTForm.php
PHP
mit
1,494
package scratchlib.objects; import java.io.IOException; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import scratchlib.project.ScratchProject; import scratchlib.writer.ScratchOutputStream; /** * Maps instances of {@link ScratchObject} to reference IDs, offering insertion, * lookup...
JangoBrick/scratchlib
src/main/java/scratchlib/objects/ScratchReferenceTable.java
Java
mit
2,833
#include "choice.h" #include "header.h" #include "destination.h" #include <cassert> #include "parse_tree_visitor.h" namespace fabula { namespace parsing { namespace node { Choice::Choice(const std::shared_ptr<Header>& header, const std::shared_ptr<Destination>& destination) ...
lightofanima/Fabula
src/ParseNodes/choice.cpp
C++
mit
517
var Scene = function(gl) { this.noiseTexture = new Texture2D(gl, "media/lab4_noise.png"); this.brainTexture = new Texture2D(gl, "media/brain-at_1024.jpg"); this.brainTextureHD = new Texture2D(gl, "media/brain-at_4096.jpg"); this.matcapGreen = new Texture2D(gl, "media/Matcap/matcap4.jpg"); this.skyCubeTexture = new...
RyperHUN/RenderingExamples
RayMarchingVolumetric_Brain/js/Scene.js
JavaScript
mit
3,266
package nsqd // the core algorithm here was borrowed from: // Blake Mizerany's `noeqd` https://github.com/bmizerany/noeqd // and indirectly: // Twitter's `snowflake` https://github.com/twitter/snowflake // only minor cleanup and changes to introduce a type, combine the concept // of workerID + datacenterId into a sin...
feixiao/nsq-0.3.7
nsqd/guid.go
GO
mit
2,223
from .base import KaffeError from .core import GraphBuilder, DataReshaper, NodeMapper from . import tensorflow
polltooh/FineGrainedAction
nn/kaffe/__init__.py
Python
mit
111
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('va...
ordinarygithubuser/chat-es7
server/model/message.js
JavaScript
mit
4,285
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var RandomFloat = /** @class */ (function () { function RandomFloat() { } RandomFloat.nextFloat = function (min, max) { if (max === void 0) { max = null; } if (max == null) { max = min; min =...
pip-services/pip-services-commons-node
obj/src/random/RandomFloat.js
JavaScript
mit
892
class AddFleetNameAssetFleets < ActiveRecord::Migration[4.2] def change add_column :asset_fleets, :fleet_name, :string, after: :agency_fleet_id end end
camsys/transam_transit
db/migrate/20180124192034_add_fleet_name_asset_fleets.rb
Ruby
mit
160
#!/usr/bin/env python ### # (C) Copyright (2012-2015) Hewlett Packard Enterprise Development LP # # 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 limita...
ufcg-lsd/python-hpOneView
examples/scripts/define-network-set.py
Python
mit
6,316
require 'spec_helper' describe RBattlenet::D3::Act, type: :community do describe "#find_act" do it "fetches act data" do with_connection("d3_act") do result = RBattlenet::D3::Act.find(1) expect(result.name).to eq "Act I" end end end describe "#find_multiple_acts" do it "...
wingyu/rbattlenet
spec/lib/d3/act_spec.rb
Ruby
mit
758
<?php session_start(); require_once ('conn.php'); $action = $_GET['action']; if ($action == 'login') { $user = stripslashes(trim($_POST['usrname'])); $pass = stripslashes(trim($_POST['password'])); if (empty ($user)) { echo '用户名不能为空'; exit; } if (empty ($pass)) { echo '密码不能为空'; exit; } $sha1pass = sha1(...
denghongcai/GyBook
login.php
PHP
mit
2,757
! function() { "use strict"; function t(t, i, n, e) { function r(t, i) { for (var n = 0; n < t.length; n++) { var e = t[n]; i(e, n) } } function a(t) { s(t), o(t), u(t) } function s(t) { t.addEventListener("mouseover", function(i) { r(f, function(i, n) { document.getElementBy...
teacher144123/npo_map
server/js/dict/rating.min.js
JavaScript
mit
1,615
/* * The MIT License (MIT) * * Copyright (c) 2015 FTC team 6460 et. al. * * 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 ...
niskyRobotics/javadeck
src/main/java/ftc/team6460/javadeck/api/planner/ObstacleSensor.java
Java
mit
1,706
<?php /* * ServerAuth v3.0 by EvolSoft * Developer: Flavius12 * Website: https://www.evolsoft.tk * Copyright (C) 2015-2018 EvolSoft * Licensed under MIT (https://github.com/EvolSoft/ServerAuth/blob/master/LICENSE) */ namespace ServerAuth\Importers; use pocketmine\command\CommandSender; use Serve...
EvolSoft/ServerAuth
ServerAuth/src/ServerAuth/Importers/Importer.php
PHP
mit
726
"use strict"; // INCLUDES if (typeof exports !== "undefined") { global.URL = require("url"); global.fs = require("fs"); global.http = require("http"); global.https = require("https"); global.WSServer = require("websocket").server; global.WebSocketConnection = require("./websocketconnection"); global.logger ...
ptesavol/webjsonrpc
websocketserver.js
JavaScript
mit
4,196
struct Input { enum class Device : unsigned { None, Joypad, Multitap, Mouse, SuperScope, Justifier, Justifiers, USART, }; enum class JoypadID : unsigned { B = 0, Y = 1, Select = 2, Start = 3, Up = 4, Down = 5, Left = 6, Right = 7, A = 8, X = 9, L ...
ircluzar/RTC3
Real-Time Corruptor/BizHawk_RTC/waterbox/libsnes/bsnes/snes/system/input.hpp
C++
mit
757