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
// { dg-require-namedlocale "ja_JP.eucjp" } // { dg-require-namedlocale "de_DE" } // { dg-require-namedlocale "en_HK" } // 2001-08-15 Benjamin Kosnik <bkoz@redhat.com> // Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation // // This file is part of the GNU ISO C++ Library. This library is free // s...
SanDisk-Open-Source/SSD_Dashboard
uefi/gcc/gcc-4.6.3/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/wrapped_locale.cc
C++
gpl-2.0
1,387
/* * Copyright 2012-2015 the original author or authors. * * 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 ap...
rokn/Count_Words_2015
testing/spring-boot-master/spring-boot-samples/spring-boot-sample-testng/src/main/java/sample/testng/service/HelloWorldService.java
Java
mit
928
<?php namespace Codeception\Exception; class ExtensionException extends \Exception { public function __construct($extension, $message, \Exception $previous = null) { parent::__construct($message, $previous); if (is_object($extension)) { $extension = get_class($extension); } ...
yeqingwen/Yii2_PHP7_Redis
yii2/vendor/codeception/base/src/Codeception/Exception/ExtensionException.php
PHP
apache-2.0
391
/* YUI 3.17.1 (build 0eb5a52) Copyright 2014 Yahoo! Inc. All rights reserved. Licensed under the BSD License. http://yuilibrary.com/license/ */ YUI.add('event-custom-base', function (Y, NAME) { /** * Custom event engine, DOM event listener abstraction layer, synthetic DOM * events. * @module event-custom */ Y.En...
extend1994/cdnjs
ajax/libs/yui/3.17.1/event-custom-base/event-custom-base-debug.js
JavaScript
mit
75,885
<?php namespace Drupal\Tests\serialization\Kernel; use Drupal\Core\Url; use Drupal\entity_test\Entity\EntityTestMulRev; use Drupal\field\Entity\FieldConfig; use Drupal\field\Entity\FieldStorageConfig; /** * Tests that entities references can be resolved. * * @group serialization */ class EntityResolverTest exten...
sunlight25/d8
web/core/modules/serialization/tests/src/Kernel/EntityResolverTest.php
PHP
gpl-2.0
2,605
/** * Copyright 2011 Rackspace * * 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 agree...
zendey/Zendey
zendey/platforms/android/cordova/node_modules/elementtree/lib/elementpath.js
JavaScript
gpl-3.0
6,742
var now = require('../time/now') var timeout = require('./timeout') var append = require('../array/append') // ensure a minimum delay for callbacks function awaitDelay (fn, delay) { var baseTime = now() + delay return function () { // ensure all browsers will execute it asynchronously (avoid hard // to ca...
akileez/toolz
src/function/awaitDelay.js
JavaScript
isc
694
import chai from 'chai'; import cas from 'chai-as-promised'; chai.use(cas); export default { expect: chai.expect };
romeovs/all
test/instrument.js
JavaScript
isc
121
export type StyleToHexColor = Readonly<Record<string, string>>; export const styleToHexColor: StyleToHexColor = { orange: 'ff5f00', grayLight: '808080', 'gray-light': '808080', };
christophehurpeau/nightingale
packages/nightingale-formatter/src/styleToHexColor.ts
TypeScript
isc
187
'use strict'; var test = require('tap').test, _ = require('lodash'), parse = require('../../../lib/parsers/javascript'), inferMembership = require('../../../lib/infer/membership')(); function toComment(fn, file) { return parse({ file: file, source: fn instanceof Function ? '(' + fn.toString() + ')' : ...
researchgate/documentation
test/lib/infer/membership.js
JavaScript
isc
7,692
// This takes in a set of pairs and writes them to the database. /*jshint node: true */ "use strict"; var csv = require('fast-csv'); var database = require('./database'); var data = csv.fromPath('team.csv', {headers : true}). on("data", function(datum) { database.writeUser({name: datum.User, location: datum.Locat...
tahoemph/random_pairs
import_users.js
JavaScript
isc
345
import capitalize from './util/capitalize'; const unitNames = { npc_dota_roshan_spawner: 'Roshan', dota_item_rune_spawner_powerup: 'Rune', dota_item_rune_spawner_bounty: 'Bounty Rune', ent_dota_tree: 'Tree', npc_dota_healer: 'Shrine', ent_dota_fountain: 'Fountain', npc_dota_fort: 'Ancient',...
devilesk/dota-interactive-map
src/js/getPopupContent.js
JavaScript
isc
2,819
package br.com.gestaoigrejas.sgi.model; import java.util.Date; import java.util.List; import javax.persistence.Basic; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.EnumType; import javax.persistence.Enumerated; import javax.persistence.GeneratedValue; import javax.persiste...
danielpinna/sgi-back
src/main/java/br/com/gestaoigrejas/sgi/model/Task.java
Java
isc
2,343
package main import ( "log" "net/http" "github.com/dim13/gold/articles" ) type rss struct { URL string Title string Subtitle string Articles articles.Articles } func rssHandler(w http.ResponseWriter, r *http.Request) { app := conf.Blog.ArticlesPerPage a := art.Enabled().Limit(app) rss := rss{ U...
dim13/gold
rss.go
GO
isc
518
/** Markup under cursor and editing */ var Reflux=require("reflux"); var docfilestore=require("./docfile"); var markupNav=require("../markup/nav"); var markupStore=Reflux.createStore({ listenables:[require("../actions/markup")] ,markupsUnderCursor:[] ,ctrl_m_handler:null ,editing:null ,hovering:null ,onMarkup...
ksanaforge/pannaloka
src/stores/markup.js
JavaScript
isc
2,579
/*jslint node: true*/ "use strict"; var fs = require('fs'), path = require('path'), util = require('util'), protocolHandler = {}, moment = require('moment'); protocolHandler.http = require('http'); protocolHandler.https = require('https'); function asArray(a) { if (Array.isArray(a)) { re...
westtoer/node-winapi
lib/winapi.js
JavaScript
isc
20,578
<?php namespace MooPhp\MooInterface\Request; use MooPhp\Api; use MooPhp\MooInterface\Data\ImageBasket; use MooPhp\MooInterface\Data\Side; /** * @package MooPhp * @author Jonathan Oddy <jonathan@moo.com> * @copyright Copyright (c) 2012, Moo Print Ltd. */ class RenderSideUrl extends CommonRenderSide { public fu...
moodev/moo-php
lib/MooPhp/MooInterface/Request/RenderSideUrl.php
PHP
isc
429
/* * Copyright (c) 2011 Pierre-Etienne Bougué <pe.bougue(a)gmail.com> * Copyright (c) 2011 Florian Colin <florian.colin28(a)gmail.com> * Copyright (c) 2011 Kamal Fadlaoui <kamal.fadlaoui(a)gmail.com> * Copyright (c) 2011 Quentin Lequy <quentin.lequy(a)gmail.com> * Copyright (c) 2011 Guillaume Pinot <guillaume.pino...
gturri/roadef2012
src/alg/MCTS/SolutionALG.cc
C++
isc
4,222
// Copyright (c) 2014 The btcsuite developers // Use of this source code is governed by an ISC // license that can be found in the LICENSE file. package btcjson_test import ( "encoding/json" "reflect" "testing" "github.com/adiabat/btcd/btcjson" ) // TestIsValidIDType ensures the IsValidIDType function behaves a...
adiabat/btcd
btcjson/jsonrpc_test.go
GO
isc
4,149
//////////////////////////////////////////////////////////////////////////////// // GaProject.cpp // Includes #include "GaProject.h" // Games #include "PgMain.h" pgMain project; //////////////////////////////////////////////////////////////////////////////// // Init void GaProject::Create() { project.Create(); } ...
thecreativeexchange/labella
OpenLab_Apps/LabellaApp/Mirror/GaProject.cpp
C++
isc
1,487
// Generated by typings // Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/e0abafb1a6ff652f7ff967120e312d5c1916eaef/lodash/lodash.d.ts declare var _: _.LoDashStatic; declare module _ { interface LoDashStatic { /** * Creates a lodash object which wraps the given value to en...
sumbad/calendarium
typings/globals/lodash/index.d.ts
TypeScript
isc
547,077
var sendError = require('../../util/send-error'); // Create a new todo module.exports = function (options) { // Shorter reference to data store var store = options.store; return function (req, res) { var todo = store.todos.filter(function (t) { return t.id === req.params.id; })[0]; // No todo with that i...
wesleytodd/express-todo-api
handlers/todos/assign.js
JavaScript
isc
784
var pi = require('./src/pi'); function run() { pi.send(parseInt(process.argv[2], 10)); setTimeout(run(), 2000); } run();
LucioFranco/bota2015
single.js
JavaScript
isc
128
'use strict' const net = require('net') const assert = require('assert') const eventList = require('../src/event-list') const tcpEmitterServer = require('../src/index') const { net: netUtils, payload: payloadUtils } = require('./utils') describe('TCP Emitter Server Tests:', function () { describe('Scenario: Creatin...
tcp-emitter/server
test/tcp-emitter-server-test.js
JavaScript
isc
29,571
#!/usr/bin/env python3 def __safe_call(f, a): """Call a function and capture all exceptions.""" try: return f(a) except Exception as e: return "{}@{}({})".format(a.__class__.__name__, id(a), e) def __safe_error(msg, a, b): """Generate the error message for assert_XX without causing an ...
SymbiFlow/symbiflow-arch-defs
utils/lib/asserts.py
Python
isc
1,746
export default { isMobile(window) { return window.innerWidth <= 420 }, generateTranslation(current, columnCount, elWidth, increment) { var position = current.position var value = current.value if (increment) { if (position < columnCount-1) { position = position + 1 } } el...
sprintly/sprintly-kanban
app/views/pages/helpers.js
JavaScript
isc
987
import React from 'react'; import { render } from 'react-dom'; import $ from 'jquery'; import IconAuthorAttrib from './subComponents/iconAuthorAttrib' import site_footer_switch from './helpers/site_footer_switch' export default class Foot extends React.Component { render(){ // console.log(this.props, 'was ...
MelanistOnca/Pers
public/js/foot.js
JavaScript
isc
1,660
import React, { Component } from "react"; import { autobind } from "core-decorators"; import { DiscoverAddressesFormHeader as DiscoverAddressesHeader, DiscoverAddressesFormBody } from "./Form"; @autobind class DiscoverAddressesBody extends Component { constructor(props) { super(props); this.state = this...
oktapodia/decrediton-appveyor-test
app/components/views/GetStartedPage/DiscoverAddresses/index.js
JavaScript
isc
1,439
'use strict'; module.exports = function(err, req, res, next) { let statusCode = err.statusCode || 500; let message = err.message || 'doh!'; let stack = err.stack || ''; res.status(statusCode).json({ message: message, stack: stack }); }
joerx/proto-ci
app/modules/api/error-handler.js
JavaScript
isc
256
// adopted from: https://github.com/fshost/node-dir // Copyright (c) 2012 Nathan Cartwright <fshost@yahoo.com> (MIT) var fs = require('fs') var path = require('path') var mm = require('../glob/minimatch') /** * merge two objects by extending target object with source object * @param target object to merge * @param...
akileez/toolz
src/stream/read-file-stream.js
JavaScript
isc
4,333
// Copyright 2012 the V8 project authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // Defined when linking against shared lib on Windows. #if defined(USING_V8_SHARED) && !defined(V8_SHARED) #define V8_SHARED #endif #ifdef COMPRESS_ST...
tempbottle/v8.rs
src/d8.cc
C++
isc
56,683
var http = require('http'); var util = require('util'); module.exports.createServer = createServer; module.exports.Server = Server; module.exports.install = install; function createServer(listener) { var server = http.createServer.apply(http, arguments); return install(server); } function Server() { ...
AtsushiSuzuki/http-graceful-close
index.js
JavaScript
isc
2,024
const {createServer} = require('http') const {readFileSync} = require('fs') const template = readFileSync(__dirname + '/index.html') createServer((req, res) => { if (req.url === '/favicon.ico') { res.writeHead(404) res.end() } else if (req.headers.referer && req.url !== '/') { res.writeHead(302, { ...
overra/oblink
index.js
JavaScript
isc
447
require 'spec_helper' require 'time' describe Server do before(:each) do end it "should create a new instance given valid attributes" do s = Factory.build(:server) s.valid?.should be true end it "should not be valid when no hostname is given" do s = Factory.build(:server) s.hostname = nil ...
Wijnand/retcon-web
spec/models/server_spec.rb
Ruby
isc
10,201
require 'sidewalk/controller_mixins/view_templates' require 'sidewalk/app_uri' class IndexController < Sidewalk::Controller # If this was a real app, you'd probably do this include in your # ApplicationController or similar: # Look for views/foo.bar, render it with BarHandler. include Sidewalk::ControllerMixin...
fredemmott/sidewalk
examples/controllers/index_controller.rb
Ruby
isc
484
'use strict'; const XmlNode = require('./XmlNode'); /** A processing instruction within an XML document. @public */ class XmlProcessingInstruction extends XmlNode { /** @param {string} name @param {string} [content] */ constructor(name, content = '') { super(); /** Name of this processing inst...
rgrove/parse-xml
src/lib/XmlProcessingInstruction.js
JavaScript
isc
841
package com.computing.cloud.service.impl; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.computing.cloud.dao.InstanceRepository; import com.computing.cloud...
ralphavalon/cloud-computing-instance-management
src/main/java/com/computing/cloud/service/impl/InstanceServiceImpl.java
Java
mit
741
import auth from './authReducer' export { auth }
nattatorn-dev/expo-with-realworld
modules/Auth/reducers/index.js
JavaScript
mit
50
/*********************************************************** * Credits: * * Created By: Joe Mayo, 8/26/08 * *********************************************************/ using System; using System.Collections.Generic; using System.Globalization; using System.Text.Json; using System.Xml.Serialization; using LinqToTw...
JoeMayo/LinqToTwitter
src/LinqToTwitter6/LinqToTwitter/User/User.cs
C#
mit
12,718
import { h } from 'omi'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon(h("path", { d: "M2 6.67V22h20V6H8.3l8.26-3.34L15.88 1 2 6.67zM7 20c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm13-8h-2v-2h-2v2H4V8h16v4z" }), 'RadioSharp');
AlloyTeam/Nuclear
components/icon/esm/radio-sharp.js
JavaScript
mit
272
<?php /* * This file is part of OAuth 2.0 Laravel. * * (c) Luca Degasperi <packages@lucadegasperi.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace LucaDegasperi\OAuth2Server\Storage; use Carbon\Carbon; use League\O...
BunceeLLC/oauth2-server-laravel
src/Storage/FluentAuthCode.php
PHP
mit
3,992
using System; using System.Collections.Generic; using System.Linq; namespace School { public class Teacher : Person { //field private string comments; //property public List<Discipline> SetOfDisciplines{ get; private set; } public string Comments { ...
niki-funky/Telerik_Academy
Programming/OOP/05. OOP Principles I/01. School/Teacher.cs
C#
mit
1,097
/** * @author: @NikhilS */ require('ts-node/register'); var helpers = require('./helpers'); exports.config = { baseUrl: 'http://localhost:3000/', // use `npm run e2e` specs: [ helpers.root('src/**/**.e2e.ts'), helpers.root('src/**/*.e2e.ts') ], exclude: [], framework: 'jasmine2', allScripts...
nikhilsarvaiye/PeopleManager
config/protractor.conf.js
JavaScript
mit
931
<?php namespace BlogBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Session\Session; class DefaultController extends Controller { public function indexAction(){ return $this->render('BlogBundle:Entr...
alexciobanu4/symfony3
src/BlogBundle/Controller/DefaultController.php
PHP
mit
451
#include<cstdio> void main() { int queenNum,i; while(scanf("%d",&queenNum)) { if(queenNum==0)break; if(queenNum%6!=2 && queenNum%6!=3) { for(i=2;i<=queenNum;i+=2)printf("%d ",i); for(i=1;i<=queenNum;i+=2)printf("%d ",i); } else { if((queenNum/2)%2==0) { for(i=queenNum/2;...
junzh0u/poj-solutions
3239/3002024_AC_0MS_72K.cpp
C++
mit
834
# frozen_string_literal: true require "set" # Niceness of a node means that it cannot be nil. # # Note that the module depends on the includer # to provide #scope (for #nice_variable) module Niceness # Literals are nice, except the nil literal. NICE_LITERAL_NODE_TYPES = [ :self, :false, :true, :int, :...
yast/zombie-killer
lib/zombie_killer/niceness.rb
Ruby
mit
1,574
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using UNIFreelancerDataBaseEntry.CCandidateService; namespace UNIFreelancerDataBaseEntry { public pa...
mayurdo/UNISoftware
UNIFreelancerDataBaseEntry/Form1.cs
C#
mit
759
// Include assertion library "Should" var should = require('should'); // jshint ignore:line var PowerupElection = require('polyball/shared/powerups/PowerupElection.js'); var Vote = require('polyball/shared/model/Vote.js'); // An example test that runs using Mocha and uses "Should" for assertion testing describe('Power...
polyball/polyball
polyball/tests/shared/model/PowerupElectionTests.js
JavaScript
mit
3,626
version https://git-lfs.github.com/spec/v1 oid sha256:92a4f24d3a4ad4de3bbed1013b330d5ca23f4d0cbeed4a7536dcd6b3cd3e492d size 4461
yogeshsaroya/new-cdnjs
ajax/libs/dojo/1.7.2/nls/nb/colors.js
JavaScript
mit
129
version https://git-lfs.github.com/spec/v1 oid sha256:50ef15b4c4f47fb98410127b48f1db6e32dc7f759cab685bd27afbfcfd7fdd38 size 23119
yogeshsaroya/new-cdnjs
ajax/libs/yui/3.17.1/jsonp/jsonp-coverage.js
JavaScript
mit
130
<?php /** * Handle BB code. * * This plugin is the most powerful plugin, if you don't want to write every * text in HTML. It also enables users that are not allowed to post HTML to * format their text. * * A detailed documentation of how to use the tags can be found at * http://github.com/marcoraddatz/candyCMS...
cnlpete/candybox
plugins/Bbcode/Bbcode.controller.php
PHP
mit
9,003
// // Created by Per-Arne on 27.02.2017. // #ifndef WARC2SIM_COLORCONVERTER_H #define WARC2SIM_COLORCONVERTER_H #include <SFML/Graphics/Color.hpp> class ColorConverter { public: static sf::Color hsv(double hue, double sat, double val) { hue = fmod(hue, 360); while(hue<0) hue += 360; ...
UIA-CAIR/DeepRTS
src/util/ColorConverter.hpp
C++
mit
1,098
package morbrian.mormessages.controller; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; import com.fasterxml.jackson.databind.anno...
morbrian/mormessages
src/main/java/morbrian/mormessages/controller/Subscription.java
Java
mit
4,448
/* transparency component */ define([ 'dojo/_base/declare', 'dojo/_base/lang', 'dojo/_base/array', 'dojo/query', 'dojo/dom-style', 'dijit/PopupMenuItem', 'dijit/TooltipDialog', 'dijit/form/HorizontalSlider', 'dijit/form/HorizontalRuleLabels' ], function ( declare, lang, a...
pri0ri7y/OpenMap
js/widgets/templates/layercontrol/plugins/Transparency.js
JavaScript
mit
1,864
class AswersController < ApplicationController def index @aswers = Aswer.all respond_to do |format| format.html # index.html.erb format.xml { render :xml => @aswers } end end def show @aswer = Aswer.find(params[:id]) respond_to do |format| format.html #show.ht...
serviceweb2012/Plugin-Enquete
generators/enquete/templates/app/controllers/aswers_controller.rb
Ruby
mit
391
// DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE // Version 2, December 2004 // // Copyright (C) 2004 Sam Hocevar <sam@hocevar.net> // // Everyone is permitted to copy and distribute verbatim or modified // copies of this license document, and changing it is allowed as long // as the name is...
beeva-hodeilopez/beeva-data-visualization-hackathon
three-js/map3d.js
JavaScript
mit
4,972
logparser = r'(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2},\d{3})\s+' \ r'(DEBUG|ERROR|INFO)\s+\[(\w+):(\w+):?(\w+)?\]\s+(.+)$'
the-zebulan/CodeWars
katas/kyu_6/parse_the_log.py
Python
mit
134
using System; using System.Net; using System.Net.Http; namespace AonWeb.FluentHttp.Exceptions { public interface IWriteableExceptionResponseMetadata : IExceptionResponseMetadata { new HttpStatusCode StatusCode { get; set; } new string ReasonPhrase { get; set; } new long? ResponseConten...
aonweb/fluent-http
AonWeb.FluentHttp.Serialization/Exceptions/IWriteableExceptionResponseMetadata.cs
C#
mit
601
using UnityEngine; using System.Collections; public class ItemBase : MonoBehaviour { //public GameObject brokenItemsPrefab; public int life; public int speeddown; public int super; public int confuse; // Use this for initialization void Start () { } // Update is called once per frame void Update () ...
seonggwang/blueberry-pi
Assets/Scripts/ItemBase.cs
C#
mit
551
module SwiftServer module Controllers class Keystone1 < ApplicationController include Concerns::CredentialsHelper attr_accessor :tenant, :username def show if authorize safe_append_header('X-Storage-Url', app.url('/v1/AUTH_tester')) safe_append_header('X-Auth-Token',...
mdouchement/swift-server
lib/swift_server/controllers/keystone_1.rb
Ruby
mit
775
package edu.rutgers.rumad.rumadworkshopthree.completed; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.ActionBarActivity; import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.wid...
RutgersMobileApplicationDevelopment/RUMADWorkshopThree
app/src/main/java/edu/rutgers/rumad/rumadworkshopthree/completed/MainActivity.java
Java
mit
6,604
<!DOCTYPE html> <html lang="en"> <head> <?php include('head.php') ?> <style> a.link{ text-decoration: none; } </style> </head> <body> <!--Menu Begin--> <?php include('menu.php') ?> <!--Menu Ends--> <div class="container"> <table class="table table-responsive"> <form method="post" action="<?php echo base_url...
soorajnraju/oruma
application/views/price_change.php
PHP
mit
1,165
module StatefulJobs module Controller extend ActiveSupport::Concern included do class << self attr_accessor :stateful_jobs_class, :stateful_jobs_options end end module ClassMethods def stateful_jobs klass, options = {} self.stateful_jobs_class = klass.to_s.camelcas...
metascape/stateful_jobs
lib/stateful_jobs/controller.rb
Ruby
mit
955
class BaseWoodTile < MapTile def initialize(position) super @type = :wood @speed_modifier = Settings.wood_floor_movement_points end end class ClientWoodTile < BaseWoodTile def initialize(position) super @image = Images[:wood_floor] end end
MichaelBaker/zombie-picnic
lib/game/lib/map_tiles/wood_tile.rb
Ruby
mit
279
package problems; /** * Created by wanghongkai on 2017/1/16. * * 问题:将一个字符串转为正数,实现atoi的功能 * * 思路:注意正负号,注意溢出判断 * * 更优解法:优化溢出时的判断,参考p007 */ public class P008_string_to_integer { public static int myAtoi(String str) { if (str == null) { return 0; } str = str.trim(); ...
ironwang/leetcode
src/problems/P008_string_to_integer.java
Java
mit
2,145
using BlueSheep.Interface; using BlueSheep.Interface.Text; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Windows; namespace BlueSheep.Engine.Types { public class WatchDog { #region Fields private AccountUC m_Account; ...
Sadikk/BlueSheep
BlueSheep/Engine/Types/WatchDog.cs
C#
mit
2,065
<!DOCTYPE html> <html> <head> <title>Other page</title> </head> <body> <h1>You know... some other page</h1> </body> </html>
alexandresalome/php-webdriver
website/other.php
PHP
mit
156
#include <bits/stdc++.h> using namespace std; int n, m; struct Edge { int u, v, r; Edge() {} Edge(int _u, int _v, int _r) : u(_u), v(_v), r(_r) {} }; vector<Edge> e[10]; int bit_count(int x) { int c = 0; while (x) { ++c; x -= x&(-x); } return c; } int f(int r, int sta) ...
hangim/ACM
HDU/5305_Friends/5305.cc
C++
mit
1,603
using System; using System.Management.Automation; using Microsoft.SharePoint.Client; using SharePointPnP.PowerShell.CmdletHelpAttributes; using SharePointPnP.PowerShell.Commands.Base.PipeBinds; using SharePointPnP.PowerShell.Commands.Enums; namespace SharePointPnP.PowerShell.Commands.Features { [Cmdlet(VerbsLifec...
iiunknown/PnP-PowerShell
Commands/Features/DisableFeature.cs
C#
mit
2,265
<?php namespace Tutto\CommonBundle\Form\Subscriber; use Exception; /** * Class SubscriberException * @package Tutto\CommonBundle\Form\Subscriber */ class SubscriberException extends Exception { }
apihour/crm
src/Tutto/CommonBundle/Form/Subscriber/SubscriberException.php
PHP
mit
201
package seedu.task.ui; import java.net.URL; import java.util.logging.Logger; import javafx.fxml.FXML; import javafx.scene.Scene; import javafx.scene.layout.Region; import javafx.scene.web.WebView; import javafx.stage.Stage; import seedu.task.MainApp; import seedu.task.commons.core.LogsCenter; import seedu.task.common...
CS2103JAN2017-F14-B2/main
src/main/java/seedu/task/ui/HelpWindow.java
Java
mit
1,518
package com.network.gui; /** * MainModel. * * @author ningzhangnj */ public class MainModel { private int localPort; private String remoteHost; private int remotePort; public int getLocalPort() { return localPort; } public void setLocalPort(int localPort) { this.localPor...
ningzhangnj/NetCapPlay
src/main/java/com/network/gui/MainModel.java
Java
mit
669
'''dossier.fc Feature Collections :class:`dossier.fc.FeatureCollection` provides convenience methods for working with collections of features such as :class:`dossier.fc.StringCounter`. A feature collection provides ``__add__`` and ``__sub__`` so that adding/subtracting FeatureCollections does the right thing for its ...
dossier/dossier.fc
python/dossier/fc/feature_collection.py
Python
mit
26,206
<?php /** * Template for "My company" page. * * @author: Andrii Birev */ defined('BEXEC')or die('No direct access!'); ?> <div id="companies_newcompany"> <div class="header"> <h1 class="page-header">Create company</h1> </div> <?php $this->breadcrumbs->draw(); ?> <div> form </div> </div>
konservs/financello
templates/members/companies.newcompany.d.php
PHP
mit
302
/* * This file is part of ThaumicSpongeAPI, licensed under the MIT License (MIT). * * Copyright (c) Gabriel Harris-Rouquette * Copyright (c) contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to dea...
gabizou/ThaumicSpongeAPI
src/main/java/com/gabizou/thaumicsponge/api/entity/EldritchMonster.java
Java
mit
1,382
import { Java } from './java'; import * as path from 'path'; import { ChildProcess } from "child_process"; import { LoggerContext } from './lib/logger-context'; import { Logger } from './lib/logger'; function emitLines(stream): void { let backlog = ''; stream.on('data', function (data) { backlog += da...
SkaceKamen/vscode-sqflint
server/src/sqflint.ts
TypeScript
mit
13,048
// Fill out your copyright notice in the Description page of Project Settings. #include "Chapter5.h" #include "TimeOfDayHandler.h" #include "Clock.h" // Sets default values AClock::AClock() { // Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it. PrimaryA...
sunithshetty/Unreal-Engine-4-Scripting-with-CPlusPlus-Cookbook
Chapter05/source/Chapter5/Clock.cpp
C++
mit
2,382
using System; using System.Collections.Generic; using System.Reflection; using System.Windows.Controls; using System.Windows.Input; using System.Windows.Media.Imaging; using C1.WPF.Toolbar; using Memento.Component.WPF; namespace Memento.JMS.Toolbar { /// <summary> /// 菜单栏通用组件 /// </summary> public pa...
Memento1990/Memento
JMS/JMSToolbar/ToolbarControl.xaml.cs
C#
mit
10,199
'use strict'; angular.module('ucllApp') .controller('LogoutController', function (Auth) { Auth.logout(); });
craftworkz/ucll-workshop-jhipster
jhipster-demo/src/main/webapp/scripts/app/account/logout/logout.controller.js
JavaScript
mit
126
/* The following code example is taken from the book * "The C++ Standard Library - A Tutorial and Reference, 2nd Edition" * by Nicolai M. Josuttis, Addison-Wesley, 2012 * * (C) Copyright Nicolai M. Josuttis 2012. * Permission to copy, use, modify, sell and distribute this software * is granted provided this copyr...
iZhangHui/cppstdlib
stl/unordmap1.cpp
C++
mit
1,036
/* * Copyright (C) 2012 David Geary. This code is from the book * Core HTML5 Canvas, published by Prentice-Hall in 2012. * * License: * * 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 Softwar...
yuesir/HTML5-Canvas
ch03/example-3.9/example.js
JavaScript
mit
4,545
// @flow import React, { type Node } from 'react'; import classnames from 'classnames'; import { Tooltip as ReactAccessibleTooltip } from 'react-accessible-tooltip'; import './tooltip.scss'; function Tooltip({ label, overlay }: { label: Node, overlay: Node }) { return ( <ReactAccessibleTooltip ...
ryami333/react-accessible-tooltip
packages/docs/src/components/Tooltip/Tooltip.js
JavaScript
mit
1,166
<?php namespace Adriatic\PHPAkademija\DesignPattern\FactoryMethod\MailerImplementations; use Adriatic\PHPAkademija\DesignPattern\FactoryMethod\Newsletter; class GiveawayNewsletter extends Newsletter { public function getContent() : string { return $this->recipientName . ', nagradna igra!'; } }
adriatichr/php-academy
example/src/DesignPattern/FactoryMethod/MailerImplementations/GiveawayNewsletter.php
PHP
mit
318
<?php function draw_html(){ set_lang(); ?> <!DOCTYPE html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <script src="inc/js/kvm-vdi-openstack.js"></script> </head> <body> <style> .input-group-addon { min-width:80px; } </style> <form id="new_vm"> <div class="modal-conte...
Seitanas/kvm-vdi
inc/modules/OpenStack/NewVM.php
PHP
mit
5,047
var router = new AiRouter(); router.route('/',{ name:'HOME', action:function(params, query) { document.getElementById("switch").innerHTML = "Changed to Home page!"; console.log('Home Page'); }, }); router.route('/projects/:projectId/tests/:testId',{ name:'HOME', action:function(par...
nedyalkovV/AiRouter
demo/demo/demo.js
JavaScript
mit
1,653
#!/usr/local/bin/python3 import argparse import gym import logging import tensorflow as tf from dqn_agent import DQNAgent from network import Network from replay_memory import ReplayMemory def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('--log_level', default='INFO', help='Log verbosity...
viswanathgs/dist-dqn
src/main.py
Python
mit
7,997
User.inject({ statics: { log: function() { var str = Array.create(arguments).join(' '); if (session && session.user) str = '[' + session.user.name + '] ' + str; app.log(str); }, logError: function(title, e) { var shortDesc = (e.fileName ? 'Error in ' + e.fileName + ', Line ' + e.lineNumber ...
lehni/boots
base/helma/User/functions.js
JavaScript
mit
1,599
import { bootstrap } from '@angular/platform-browser-dynamic'; import { enableProdMode } from '@angular/core'; import { HTTP_PROVIDERS } from '@angular/http'; import { DestinyGrimoireAppComponent, environment } from './app/'; if (environment.production) { enableProdMode(); } bootstrap(DestinyGrimoireAppComponent, [...
Foshkey/destiny-grimoire
src/main.ts
TypeScript
mit
339
class CreateTweets < ActiveRecord::Migration def change create_table :tweets do |t| t.string :xid t.string :name t.string :screen_name t.text :text t.text :media_url t.text :profile_image_url t.datetime :tweeted_at t.timestamps end end end
cbetta/battlehack-dashboard
db/migrate/20130716134921_create_tweets.rb
Ruby
mit
301
/** * @since 2019-07-19 14:13 * @author vivaxy * * Call simple function. 7.964s * Call function await promise. 16.687s * Call function with if logic. 9.612s */ let resolved = false; function request() { return new Promise(function(resolve) { setTimeout(function() { resolve(true); }, 1000); });...
vivaxy/course
benchmark/await-resolved-promise/index.js
JavaScript
mit
1,223
package speedy.model.database.mainmemory.datasource.nodes; import speedy.model.database.mainmemory.datasource.operators.INodeVisitor; public class SetNode extends IntermediateNode { boolean cloned = false; public SetNode(String label) { super(label); } public SetNode(String label, Objec...
dbunibas/Speedy
src/speedy/model/database/mainmemory/datasource/nodes/SetNode.java
Java
mit
700
import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { HttpModule } from '@angular/http'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { Ng2CompleterModule } from "ng2-completer"; import { AgmCoreModule } from "angular2-google-map...
pratik-trianz/hello_weather
src/app/app.module.ts
TypeScript
mit
1,066
/* * This file is part of Sponge, licensed under the MIT License (MIT). * * Copyright (c) SpongePowered.org <http://www.spongepowered.org> * Copyright (c) contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Soft...
Fozie/SpongeAPI
src/main/java/org/spongepowered/api/entity/living/complex/ComplexLivingPart.java
Java
mit
1,706
package com.youdevise.hsd; public enum QueryType { SELECT("select"), INSERT("insert"), UPDATE("update"), DELETE("delete"); private String keyword; private QueryType(String keyword) { this.keyword = keyword; } public boolean matches(String sql) { return sql.trim...
tim-group/High-Speed-Dirt
src/main/java/com/youdevise/hsd/QueryType.java
Java
mit
673
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("Su...
dakh93/ProgrammingFundamentals
Arrays/SimpleArrayProcessing/SumArrayElements/Properties/AssemblyInfo.cs
C#
mit
1,426
class AddOpenAllEntriesToUsers < ActiveRecord::Migration[5.2] def up add_column :users, :open_all_entries, :boolean, null: false, default: false User.all.each do |u| u.update_column :open_all_entries, false end end def down change_column :users, :open_all_entries, :boolean end end
amatriain/feedbunch
FeedBunch-app/db/migrate/20131121205700_add_open_all_entries_to_users.rb
Ruby
mit
314
using System; using System.Collections.Generic; namespace Puresharp { static public partial class Data { public class Store<T> : IStore<T> where T : class { private Dictionary<string, T> m_Dictionary; public Store() { this.m_Dict...
Virtuoze/Puresharp
Puresharp/Puresharp/Data/Data.Store.cs
C#
mit
933
// Copyright (c) 2014 The Drivercoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "crypto/hmac_sha256.h" #include <string.h> CHMAC_SHA256::CHMAC_SHA256(const unsigned char* key, size_t keylen) { ...
drivercoin/drivercoin
src/crypto/hmac_sha256.cpp
C++
mit
900
'use strict'; FbFriends.StatsView = Backbone.View.extend({ events: { }, initialize: function(options) { _.extend(this, options); this.friends.on('reset', this.render, this); }, render: function(event) { this.showSexRepartition(); // this.showTopVille(); this.showR...
FXHibon/facebook-fun
frontend/app/friends/statistics/StatsView.js
JavaScript
mit
4,807
# encoding: utf-8 # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::Network::Mgmt::V2018_02_01 module Models # # The routes table associated with the ExpressRouteCircuit. # class ExpressRouteC...
Azure/azure-sdk-for-ruby
management/azure_mgmt_network/lib/2018-02-01/generated/azure_mgmt_network/models/express_route_circuit_routes_table_summary.rb
Ruby
mit
2,716