repo_name
stringlengths
4
116
path
stringlengths
4
379
size
stringlengths
1
7
content
stringlengths
3
1.05M
license
stringclasses
15 values
NotARealTree/tyche
scala/src/main/scala/xyz/notarealtree/items/ProcessingThread.scala
320
package xyz.notarealtree.items /** * Created by Francis on 21/07/2016. */ class ProcessingThread(val interval: Long, val processor: Processor) extends Runnable{ override def run(): Unit = { while(!Thread.currentThread().isInterrupted){ Thread.sleep(interval) } } }
mit
bryant-pham/brograder
webapp/src/app/guard/auth.guard.spec.ts
1403
import { describe, it, expect, beforeEachProviders, beforeEach, inject } from '@angular/core/testing'; import { provide } from '@angular/core'; import { Router } from '@angular/router'; import { Subject } from 'rxjs/Subject'; import { AuthGuard } from './auth.guard'; import { AuthenticationService } from '...
mit
liufeiit/itmarry
source/Apollo/Apollo/src/com/andrew/apolloMod/ui/fragments/grid/ArtistsFragment.java
8855
/** * */ package com.andrew.apolloMod.ui.fragments.grid; import android.app.Fragment; import android.app.LoaderManager.LoaderCallbacks; import android.content.BroadcastReceiver; import android.content.Context; import android.content.CursorLoader; import android.content.Intent; import android.content.IntentFilter; ...
mit
Sigurdurhelga/Sigurdurhelga.github.io
drawio/js/init.js
1504
$(function () { $('#colorpicker').farbtastic('#color'); /* get all available fonts from google webfonts and include them into the project */ $.ajax({ type: "GET", headers: { Accept: "application/json", }, url: "https://www.googleapis.com/webfonts/v1/...
mit
tompo-andri/IUT
Second Year (2013-2014)/OMGL6/TP4/Exercice 1/src/USAddressFactory.java
229
public class USAddressFactory implements AddressFactory{ public Address createAddress(){ return new USAddress(); } public PhoneNumber createPhoneNumber(){ return new USPhoneNumber(); } }
mit
cknow/checker
src/Console/Command/Git/InstallCommand.php
7346
<?php namespace ClickNow\Checker\Console\Command\Git; use ClickNow\Checker\Config\Checker; use ClickNow\Checker\Exception\FileNotFoundException; use ClickNow\Checker\IO\IOInterface; use ClickNow\Checker\Repository\Filesystem; use SplFileInfo; use Symfony\Component\Console\Command\Command; use Symfony\Component\Consol...
mit
Jam3/glsl-version-regex
index.js
62
module.exports = /^\s*\#version\s+([0-9]+(\s+[a-zA-Z]+)?)\s*/
mit
jbasdf/cms-lite
test/rails_test/test/functional/cms_lite_controller_test.rb
1109
require File.dirname(__FILE__) + '/../test_helper' class CmsLiteControllerTest < ActionController::TestCase tests CmsLiteController context "cms lite controller" do context "unprotected pages" do setup do get :show_page, :content_key => 'open', :content_page => ['hello'] end should ...
mit
Opifer/CmsBundle
Controller/Backend/DashboardController.php
989
<?php namespace Opifer\CmsBundle\Controller\Backend; use Opifer\CmsBundle\Manager\ContentManager; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Response; class DashboardController extends Controller { /** * @return Response */ public function viewAct...
mit
Blackrush/Rocket
network/src/main/java/org/rocket/network/guice/ControllerFactoryModule.java
1622
package org.rocket.network.guice; import com.google.inject.AbstractModule; import com.google.inject.Provider; import org.rocket.network.Controller; import org.rocket.network.ControllerFactory; import org.rocket.network.NetworkClient; import java.lang.annotation.Annotation; import java.util.Set; public final class Co...
mit
istrwei/pocent
admin/Document/my.php
2941
<?php /** * @param Protty * @url www.pder.org **/ if ($_GET['c']=='my'){ require_once EXE . 'PerClass' . EXP . 'State.admin.php'; $ver = LoginStaFun($_SESSION['id'], $config); require_once EXE . 'Delivery' . EXP . 'my.html'; if (!empty($_POST['update_set'])){ require_once EXE . 'PerClass' . E...
mit
xAleXXX007x/Witcher-RolePlay
witcherrp/plugins/hunger/items/alcohol/sh_nastoy.lua
158
ITEM.name = "Самогон из мандрагоры" ITEM.desc = "Уникальный алкоголь." ITEM.force = 90 ITEM.thirst = 15 ITEM.quantity = 3
mit
gricelsepulveda/arbifup
application/views/estaticos/navegacion.php
5999
<!DOCTYPE html> <html lang="en" ng-app="app2"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"><!--AUX RESPONSIVO--> <meta http-equiv="x-ua-compatible" content="ie=edge"> <title>ARBIFUP Asocación de Árbitros Profesionales</title> <link rel="shortcut ...
mit
Ohjel/wood-process
test/clock.py
120
import pygame pygame.init() clk = pygame.time.Clock() for i in range(0, 20): print(clk.tick(60)) pygame.quit()
mit
haboustak/XdsKit
Source/XdsKit/XdsKit/Properties/AssemblyInfo.cs
125
using System.Reflection; [assembly: AssemblyTitle("XdsKit")] [assembly: AssemblyDescription("IHE XDS.b implementation")]
mit
skeetr/skeetr
tests/Skeetr/Tests/Debugger/Watchers/RecursiveIteratorWatcherTest.php
660
<?php namespace Skeetr\Tests\Gearman; use Skeetr\Tests\TestCase; use Skeetr\Debugger\Watchers\RecursiveIteratorWatcher; class RecursiveIteratorWatcherTest extends TestCase { public function testWatch() { $watcher = new RecursiveIteratorWatcher(); $watcher->addPattern(sys_get_temp_dir() . '/*.p...
mit
akira-baruah/nes-pacs
src/tests/cpu_tb.cpp
1694
#include <cstdio> #include <iostream> #include "Vcpu.h" using namespace std; #define MEMSIZE 65536 void tick(Vcpu *cpu); void print_stats(Vcpu *cpu, int time); int main(int argc, char **argv) { Verilated::commandArgs(argc, argv); if (argc < 2) { cerr << "usage: " << argv[0] << " <6502 executable>"...
mit
jwg2s/bond-ruby
lib/bond/account.rb
423
require 'faraday' require 'json' module Bond class Account attr_accessor :first_name, :last_name, :email, :credits, :links def initialize response = Bond::Connection.connection.get('/account') json = JSON.parse(response.body) Bond::BondError.handle_errors(json) json['data'].each { ...
mit
choodur/aviator
test/aviator/openstack/identity/v3/public/create_token_test.rb
1560
require 'test_helper' class Aviator::Test describe 'aviator/openstack/identity/v3/public/create_token' do validate_response 'parameters are valid' do #puts V3::Environment.openstack_admin[:auth_service].inspect #puts RequestHelper.admin_bootstrap_session_data service = Aviator::Service.new( ...
mit
plankt/Photo-Editor
Photo Editor/App.xaml.cs
1199
using System; using System.Diagnostics; using System.Windows; using PhotoEditor.Data.Database; using PhotoEditor.Views; using PhotoEditor.Views.UserControls; namespace PhotoEditor { /// <summary> /// Interaction logic for App.xaml /// </summary> public partial class App { public App() ...
mit
paintsnow/paintsnow
Source/Driver/Script/TCC/ZScriptTCC.cpp
7363
#include "ZScriptTCC.h" using namespace PaintsNow; // only one script tcc is allowed to present at the same time within one module. bool ZScriptTCC::instanceMutex = false; ZScriptTCC::ZScriptTCC(IThread& threadApi) : IScript(threadApi) { assert(!instanceMutex); instanceMutex = true; defaultRequest = NewRequest(...
mit
planettelex/wpf-bootstrap
SampleApplication.Modules.ModuleB/Views/ModuleBView.xaml.cs
574
using SampleApplication.Modules.ModuleB.ViewModels; namespace SampleApplication.Modules.ModuleB.Views { /// <summary> /// Interaction logic for ModuleBView.xaml /// </summary> public partial class ModuleBView { /// <summary> /// Initializes a new instance of the <see cref="ModuleBV...
mit
goodwinxp/Yorozuya
library/ATF/PMIDL_XMIT_TYPE.hpp
225
// This file auto generated by plugin for ida pro. Generated code only for x64. Please, dont change manually #pragma once #include <common/common.h> START_ATF_NAMESPACE typedef void *PMIDL_XMIT_TYPE; END_ATF_NAMESPACE
mit
vefimov/simon
Gruntfile.js
1343
'use strict'; module.exports = function(grunt) { // Project configuration. grunt.initConfig({ nodeunit: { files: ['test/**/*_test.js'], }, coffee: { glob_to_multiple: { expand: true, cwd: "lib/coffee", src: ["**/*.coffee"], dest: "lib/js", ext: ".js"...
mit
dotnet236/aloha-rails
vendor/assets/javascripts/aloha/lib/aloha/observable.js
3357
/*! * This file is part of Aloha Editor Project http://aloha-editor.org * Copyright � 2010-2011 Gentics Software GmbH, aloha@gentics.com * Contributors http://aloha-editor.org/contribution.php * Licensed unter the terms of http://www.aloha-editor.org/license.html *//* * Aloha Editor is free software: you can redistr...
mit
Nirklav/Tanks
app/src/main/java/com/ThirtyNineEighty/Base/Menus/BaseMenu.java
1761
package com.ThirtyNineEighty.Base.Menus; import android.view.MotionEvent; import com.ThirtyNineEighty.Base.Menus.Controls.IControl; import com.ThirtyNineEighty.Base.BindableHost; import com.ThirtyNineEighty.Base.Renderable.Renderer; import java.util.ArrayList; public abstract class BaseMenu extends BindableHost<I...
mit
Oxyless/highcharts-export-image
lib/highcharts.com/samples/issues/highcharts-4.0.4/3390-heatmap-single-point/demo.js
717
$(function () { $('#container').highcharts({ chart: { type: 'heatmap' }, title: { text: 'Single point heatmap - border and gradient' }, series: [{ borderWidth: 1, borderColor: 'black', color: { linea...
mit
WindomZ/go-dice
roll/roll_test.go
1406
package roll import ( "github.com/WindomZ/testify/assert" "testing" ) func TestNewRoll(t *testing.T) { roll := NewRoll() assert.NotEmpty(t, roll) } func Test_Roll_Weight(t *testing.T) { roll := NewRoll() assert.NotEmpty(t, roll.AddRoll(-1, -1).AddRoll(0, 0)) assert.NotEmpty(t, roll.AddRoll(int8(1), 1).AddRol...
mit
Cyberuben/node-postcode
src/request.js
2223
const https = require("https"); class JSONRequest { constructor(options) { this._options = options; } _requestOptions(method, path, headers, encoding) { if(!headers) { headers = { "Content-Type": "application/json" }; } if(!encoding) { encoding = "utf8"; } return { method, headers, en...
mit
lateefj/fresh
runner/runner.go
832
package runner import ( "flag" "io" "os/exec" "strings" ) var cmdArgs string func init() { flag.StringVar(&cmdArgs, "a", "", "Command line arguments to pass to the process") } func run() bool { runnerLog("Running...") var cmd *exec.Cmd if cmdArgs != "" { args := strings.Split(cmdArgs, " ") ...
mit
steamclock/internetmap
Common/Code/DefaultVisualization.hpp
1851
// // DefaultVisualization.h // InternetMap // #ifndef InternetMap_DefaultVisualization_hpp #define InternetMap_DefaultVisualization_hpp #include "Visualization.hpp" //TODO: move these to a better place #define SELECTED_NODE_COLOR_HEX 0x00A8EC #define SELECTED_CONNECTION_COLOR_SELF_HEX 0x383838 #define SELECTED_CO...
mit
degica/barcelona
app/auth/vault/cap_probe.rb
1526
module Vault class CapProbe # Maps HTTP methods to vault actions METHOD_MAP = { 'POST' => 'create', 'PATCH' => 'update', 'PUT' => 'update', 'GET' => 'read', 'DELETE' => 'delete' }.freeze def initialize(vault_uri, vault_token, vault_path_prefix) @vault_uri = vault_u...
mit
PokeGroup/pokemon-join
db/seeds/eyedees.js
195
var data = require('../id-data.js') exports.seed = function(knex, Promise) { return knex('eyedees') .del() .then(function () { return knex('eyedees').insert(data) }) }
mit
jithu21/acme
packages/custom/analytics/server/controllers/users-online.js
1543
var fs = require('fs'); var async = require('async'); var MongoClient = require('mongodb').MongoClient; var url = 'mongodb://localhost:27017/acme'; module.exports.users_online= function(req, res,next) { res.send(200); // MongoClient.connect(url, function (err, db) { // if (err) // return err; // var c...
mit
PioBeat/Audio-Home-UI
control/MPDController.php
4047
<?php /* */ /** * Description of MPDController * * @author Dome */ class MPDController implements IMusicControl { private $playlistdir; private $filename; private $filepath; private $streamList; private $server; public function __construct() { $this->playlistdir = "/mnt/mpd/radiostreams"; $this->fil...
mit
BunqCommunity/BunqDesktop
src/react/Functions/IpChecker.js
205
import axios from "axios"; export default async () => { try { return await axios.get("https://ipinfo.io/ip").then(response => response.data); } catch (ex) { return false; } };
mit
joergkrause/netrix
NetrixDemo/RibbonLib/Samples/CS/07-RibbonColor/Properties/Settings.Designer.cs
1068
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.1 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------...
mit
sguzunov/PingPongGame
PingPong/PingPong.Logic/GameObjects/GameObject.cs
495
using System; using PingPong.Logic.GameObjects.Contracts; namespace PingPong.Logic.GameObjects { public class GameObject : IGameObject { private Position position; public GameObject(Position initialPosition) { this.Position = initialPosition; } public Pos...
mit
Aedius/crowfall-royaumes-eternel
src/AppBundle/Controller/Front/ArticleController.php
4124
<?php namespace AppBundle\Controller\Front; use AppBundle\Component\Helper\Pagination; use AppBundle\Entity\Article; use AppBundle\Entity\Comment; use AppBundle\Repository\ArticleRepository; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symf...
mit
ChibiFR/rythmoos-engine
build/lib/Scene.js
2108
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var Map_1 = require("./Map"); /** * A scene contains all the game objects in a specific "screen" of your game.<br> * For example, you may have a "MainScreen" scene that will contain everything * that is in the main screen of your game.<br> ...
mit
Goldinteractive/periskop
src/assets/js/layouts/BaseLayout.js
491
define([ 'collections/Images', 'components/images-slider/View', 'layoutmanager' ], function(Images, ImagesSliderComponent) { var imagesCollection = new Images(); return Backbone.Layout.extend({ el: 'body', collection: imagesCollection, views: { '.slider-container': new ImagesSliderComponent(...
mit
smgladkovskiy/querier
spec/SMGladkovskiy/Querier/ValidationQueryBusSpec.php
1818
<?php namespace spec\SMGladkovskiy\Querier; use Illuminate\Foundation\Application; use SMGladkovskiy\Querier\QueryBus; use SMGladkovskiy\Querier\QueryTranslator; use PhpSpec\ObjectBehavior; use Prophecy\Argument; class ValidationQueryBusSpec extends ObjectBehavior { function let(QueryBus $bus, Application $appli...
mit
kybarg/material-ui
packages/material-ui-icons/src/MoreVertTwoTone.js
292
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" /> , 'MoreVertTwoTone');
mit
morkai/h5.modbus
lib/messages/WriteSingleCoilResponse.js
2970
// Part of <http://miracle.systems/p/h5.modbus> licensed under <MIT> 'use strict'; const helpers = require('../helpers'); const FunctionCode = require('../FunctionCode'); const Response = require('../Response'); /** * The write single coil response (code 0x05). * * A binary representation of this response is 5 by...
mit
SlashGames/slash-framework
Source/Slash.Unity.StrangeIoC/Source/Initialization/Initializer.cs
868
// -------------------------------------------------------------------------------------------------------------------- // <copyright file="Initializer.cs" company="Slash Games"> // Copyright (c) Slash Games. All rights reserved. // </copyright> // --------------------------------------------------------------------...
mit
mc437-g01/mutant-spotlight
src/main/java/br/unicamp/ic/mc437/g1/entity/package-info.java
228
/** * Created by fernandogoncalves on 10/17/14. */ @XmlAccessorType(XmlAccessType.FIELD) package br.unicamp.ic.mc437.g1.entity; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType;
mit
lcidral/yii2-brazilian-freight-module
src/validators/DeliveryRangeValidator.php
632
<?php namespace lcidral\yii2\freight\validators; use lcidral\yii2\freight\models\DeliveryRanges; use lcidral\yii2\freight\Module; use yii\validators\Validator; class DeliveryRangeValidator extends Validator { public function validateAttribute($model, $attribute) { $range = (int) DeliveryRanges::find(...
mit
AnnArborTees/spree_digital
spec/models/digital_spec.rb
849
require 'spec_helper' describe Spree::Digital do context 'validation' do it { should belong_to(:variant) } end context "#create" do end context "#destroy" do it "should destroy associated digital_links" do digital = create(:digital) 3.times { digital.digital_links.create!({ :line_it...
mit
getinsomnia/insomnia
packages/openapi-2-kong/src/kubernetes/plugins.test.ts
20378
import { HttpMethod } from '../common'; import { dummyPluginDoc, pluginDummy, UserK8sPlugin } from '../declarative-config/jest/test-helpers'; import { OperationPlugin, PathPlugin } from '../types/k8s-plugins'; import { OA3Components, OA3Operation, OA3PathItem, OA3Paths, OA3Server, OpenApi3Spec, } from '../t...
mit
Vrturo/Algo-Gem
Algorithms/JS/integers/primeFactors.js
478
// How could you find all prime factors of a number? // the prime factors of a positive integer are the prime numbers that divide that integer exactly. // Run a while loop. start dividing by two and if not divisible increase divider until u r done. function primeFactors(n){ var factors = [], divisor = 2; ...
mit
pekzeki/PopulationAnalysis
all_cities.py
1356
# -*- coding: utf-8 -*- ''' Reads all the CSV file inside 'data/' folder as a Pandas DataFrame Plot total population of each city w.r.t their plate numbers to a Line Chart for each year under output/ folder @author: pekzeki ''' import commons import pygal import glob import os from operator import itemgetter ...
mit
mpapierski/eventspout
utils.py
671
from twisted.internet import reactor from twisted.internet.protocol import Protocol from twisted.internet.defer import Deferred def getBody(response): """Deferred that delivers body from `response`. """ class BodyReceiver(Protocol): def dataReceived(self, data): chunks.append(data) ...
mit
gocms-io/gocms
domain/plugin/plugin_services/installed_plugins.go
1593
package plugin_services import ( "fmt" "github.com/gocms-io/gocms/domain/plugin/plugin_model" "github.com/gocms-io/gocms/utility/log" "os" "path/filepath" "runtime" ) func (ps *PluginsService) RefreshInstalledPlugins() error { // find all plugins err := filepath.Walk("./content/plugins", ps.visitPlugin) if...
mit
Sowapps/orpheus-website
src/Demo/DemoTest_MSSQL.php
231
<?php namespace Demo; /** A sample demo test class using MS SQL * * Example of how to use the permanent object. */ class DemoTest_MSSQL extends DemoTest { //Attributes protected static ?string $instanceName = 'mssql'; }
mit
Moussi/FullMEANAppSnapShot
client/js/app.js
4507
'use strict'; angular.module('angular-client-side-auth', ['ngCookies', 'ui.router']) .config(['$stateProvider', '$urlRouterProvider', '$locationProvider', '$httpProvider', function ($stateProvider, $urlRouterProvider, $locationProvider, $httpProvider) { var access = routingConfig.accessLevels; // Public...
mit
adam-boduch/coyote
app/Http/Resources/Elasticsearch/StreamResource.php
462
<?php namespace Coyote\Http\Resources\Elasticsearch; use Illuminate\Http\Resources\Json\JsonResource; class StreamResource extends JsonResource { /** * Transform the resource into an array. * * @param \Illuminate\Http\Request $request * @return array */ public function toArray($req...
mit
BlueDress/School
C# OOP Advanced/Generics Exercises/Custom List Sorter/Sorter.cs
139
namespace Custom_List_Sorter { public class Sorter { public static void Sort() { } } }
mit
baSSiLL/LpmsB.Connect
LpmsB.Connect/LpmsBluetoothDevice.cs
17516
using System; using System.Diagnostics.Contracts; using System.Linq; using System.Net.Sockets; using LpmsB.Bluetooth; using LpmsB.Protocol; namespace LpmsB { public class LpmsBluetoothDevice { /// <summary> /// Finds all LPMS-B sensors visible to Bluetooth adapters of this computer. //...
mit
stefanw/froide
froide/foirequest/urls/__init__.py
2032
from django.conf.urls import url, include from django.conf import settings from django.utils.translation import pgettext_lazy from ..views import ( search, auth, shortlink, AttachmentFileDetailView, project_shortlink ) from . import ( make_request_urls, list_requests_urls, request_urls, projec...
mit
bjdixon/js-unit-test-template
js/tests.js
169
module("Unit tests"); test( "smoke test", function() { ok( 1 == "1", "Passed!" ); }); module("Lint tests"); jsHintTest("Test file against linter", "../js/app.js");
mit
darklilium/Factigis_2
arcgis_js_api/library/3.17/3.17/esri/dijit/editing/nls/Editor_pt-pt.js
7909
// All material copyright ESRI, All Rights Reserved, unless otherwise specified. // See http://js.arcgis.com/3.17/esri/copyright.txt for details. //>>built define("esri/dijit/editing/nls/Editor_pt-pt",{"dijit/_editor/nls/commands":{bold:"Negrito",copy:"Copiar",cut:"Cortar","delete":"Eliminar",indent:"Indentar",insertHo...
mit
MartinRemi/yolo-octo-meme
src/client/display/GraphicCircle.js
2630
/** * @author Rémi MARTIN <martinremi60@gmail.com> * @copyright 2014 Rémi MARTIN */ /** * Creates a new GraphicCircle object. * The GraphicCircle is defined with a circle and some colors. * @class GraphicCircle * @classdesc yom - GraphicCircle * @constructor * @param {yom.Circle} [circle] - T...
mit
ankitagupta12/karafka
spec/lib/karafka/errors_spec.rb
867
# frozen_string_literal: true RSpec.describe Karafka::Errors do describe 'BaseError' do subject(:error) { described_class::BaseError } specify { expect(error).to be < StandardError } end describe 'ParserError' do subject(:error) { described_class::ParserError } specify { expect(error).to be < ...
mit
Artem-Romanenia/machine-learning
LearningVisualizer/Views/TrainingResultsDialog.xaml.cs
323
using System.Windows; namespace LearningVisualizer.Views { /// <summary> /// Interaction logic for ExperimentResultsDialog.xaml /// </summary> public partial class TrainingResultsDialog : Window { public TrainingResultsDialog() { InitializeComponent(); } } }...
mit
huwylphi/nPOauditTrailViewer
reportLastYear.php
361
<?php /* * version: 1.0 * date: 2015-03-04 * developer: Ph. Huwyler */ // get start-date and end-date for last month $startDate = date('Y-m-d', strtotime(date('Y')."-01-01 -1 year")); $endDate = date('Y-m-d', strtotime(date('Y')."-01-01 -1 day")); // export data to csv (out path will be got in expor...
mit
kbdancer/myTools
headerScan/updateArea.py
2202
#!/usr/bin/env python # coding=gb2312 # code by 92ez.com from threading import Thread import requests import Queue import json import sys reload(sys) sys.setdefaultencoding('gb2312') requests.packages.urllib3.disable_warnings() def bThread(iplist): thread_list = [] queue = Queue.Queue() hosts = iplist ...
mit
ActiveState/code
recipes/Python/111971_Format_version_numbers/recipe-111971.py
148
def StringVersion( seq ): return '.'.join( ['%s'] * len( seq )) % tuple( seq ) def TupleVersion( str ): return map( int, str.split( '.' ))
mit
bitmazk/django-libs
django_libs/static/django_libs/js/libs_image_widget.js
1289
$(document).ready(function() { // showing the correct elements $('.libsImageWidgetHidden').hide(); $('.libsImageWidget').show(); // TODO styling to be moved into css file $('.libsImageWidgetControls').css({ 'display': 'inline-block' }); $('.libsImageWidgetLabel').css('display', 'inl...
mit
Nabid/BluetoothRobotController
app/src/main/java/com/prome/bluetoothdevicecontroller/fragments/AboutFragment.java
734
package com.prome.bluetoothdevicecontroller.fragments; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.prome.bluetoothdevicecontroller.R; /** * Create...
mit
LiuXiaotian/ProtocolTestFramework
src/reportingtool/DerivedRequirement.cs
5806
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System; using System.Collections.Generic; using System.Text; namespace Microsoft.Protocols.ReportingTool { internal enum DerivedType { Unknown =...
mit
telemed-duth/carre-edu
client/app/translations/translation.service.js
2629
'use strict'; angular.module('edumaterialApp') .service('Translate', function (Auth) { var TranslationObj = { 'en':{ 'depth_of_coverage':'Depth of Coverage', 'comprehensiveness':'Comprehensiveness', 'relevancy':'Relevancy', 'accuracy':'Accuracy', 'educational_lev...
mit
jazdev/interactivepy
Mini-project-3.py
1660
# template for "Stopwatch: The Game" import simplegui # define global variables t=0 # stores time time='' # stores time in string suc = 0 # number of successes alle = 0 # total number of presses # define helper function format that converts time # in tenths of seconds into formatted string A:BC.D def format(t): ...
mit
fadre/sandhills
src/main/java/ch/fadre/sandhills/Main.java
2021
package ch.fadre.sandhills; import ch.fadre.sandhills.output.CSVWriter; import ch.fadre.sandhills.output.ImageWriter; import java.awt.image.BufferedImage; import java.io.IOException; public class Main { private static int width = 250; private static int height = 250; private static long iterationCount =...
mit
openstax/action_interceptor
lib/action_interceptor/action_controller/base.rb
2725
require 'addressable/uri' module ActionInterceptor module ActionController module Base def self.included(base) base.helper_method :current_page?, :current_url, :stored_url end protected def current_page?(url) # Return true for blank (blank links redirect to the same pag...
mit
rkeplin/sf2-blog
src/Keplin/BlogBundle/Service/CategoryService.php
2521
<?php /** * Rob's Blog (http://www.robkeplin.com) * * @link http://www.robkeplin.com * @copyright Copyright (c) 2012 Rob Keplin * @license TBD */ namespace Keplin\BlogBundle\Service; /** * Category Service * * @package Blog\Service */ class CategoryService extends AbstractService { /** * @const...
mit
RConDev/RaptoRCon
src/RaptoRCon.Server/Startup.cs
641
using Owin; using RaptoRCon.Server.Config; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Web.Http; namespace RaptoRCon.Server { public class Startup { public void Configuration(IAppBuilder app) { var config = new HttpConfiguratio...
mit
nisrinabia/KomplainTelkom
application/views/design/footer.php
13112
<footer class="main-footer no-print"> <div class="pull-right hidden-xs"> <b>Version</b> 1.0 </div> <!-- Modal --> <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> <div class="modal-dialog"> <div class=...
mit
cfranklin11/budget-pie
public/javascripts/views/budget-view.js
1343
'use strict'; var bbApp = bbApp || {}; (function($) { bbApp.BudgetView = Backbone.View.extend({ className: 'col-xs-12 col-sm-6 col-md-3 col-lg-3 flip', events: { 'click .flipControl': 'flip' }, initialize: function () { }, flip: function (e) { var personas, thisCard; e.pr...
mit
boxmein/boxnode
lib/toplog/index.js
2946
// Simple logger var util = require('util'); var DEFAULTS = { // Logging levels. Case insensitive. // Smallest index is most verbose, biggest index is most important. 'loglevels': ['VERBOSE', 'DEBUG', 'INFO', 'WARNING', 'ERROR', 'FATAL'], // Level at which log entries are allowed in the output. 'loglevel': ...
mit
qx/FullRobolectricTestSample
src/test/java/org/robolectric/shadows/RemoteViewsTest.java
2817
package org.robolectric.shadows; import android.app.Activity; import android.app.PendingIntent; import android.content.Intent; import android.graphics.Bitmap; import android.view.View; import android.widget.ImageView; import android.widget.RemoteViews; import android.widget.TextView; import org.junit.Test; import org....
mit
lowang/bluemedia_payments
spec/bluemedia_payments/verification_spec.rb
4044
require 'spec_helper' describe BluemediaPayments::Verification do let(:itn_xml) { <<-EOS <?xml version="1.0" encoding="UTF-8"?> <transactionList> <merchantID>1</merchantID> <transactions> <transaction> <orderID>11_4234</orderID> <transID>9F1LQWXK</transID> ...
mit
rogersd/php-resque
lib/Resque/Log.php
1698
<?php /** * Resque default logger PSR-3 compliant * * @package Resque/Stat * @author Chris Boulton <chris@bigcommerce.com> * @license http://www.opensource.org/licenses/mit-license.php */ class Resque_Log extends Psr\Log\AbstractLogger { public $verbose; public function __construct($verbose = false) { $t...
mit
FormsCommunityToolkit/FormsCommunityToolkit
src/CommunityToolkit/Xamarin.CommunityToolkit/ObjectModel/ObservableRangeCollection.shared.cs
5300
using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Collections.Specialized; using System.ComponentModel; #nullable enable namespace Xamarin.CommunityToolkit.ObjectModel { /// <summary> /// Represents a dynamic data collection that provides notifications when items ge...
mit
abendaniocarlo/seatwork
application/views/students/new_student.php
1553
<h2>New Student</h2> <form role="form" class="" method="post" action="<?php echo base_url('sms/save?a=add'); ?>" > <div class="text-danger"> <?php if( isset($errors) ){ echo $errors; } ?> </div> <div class="form-group"> <label for="idno">ID No.:</label> <input type="...
mit
ShreyK/Android-Game-Development-Framework
Framework/RenderView.java
1845
package shreyk.o.Framework; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Rect; import android.view.SurfaceHolder; import android.view.SurfaceView; /** * Created by Shrey on 12/16/2015. */ public class RenderView extends SurfaceView implements Runnable { Gam...
mit
Jayser/angular2-bootstraping
src/app/core/components/core-component.module.ts
353
import { NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; import { HeaderModule } from './header'; import { FooterModule } from './footer'; @NgModule({ imports: [ CommonModule, HeaderModule, FooterModule, ], exports: [ HeaderModule, FooterModule ] }) expor...
mit
centurionmedia/blank_altumo
htdocs/project/plugins/sfGuardPlugin/lib/form/base/BasesfGuardUserForm.class.php
5263
<?php /** * sfGuardUser form base class. * * @method sfGuardUser getObject() Returns the current form's model object * * @package ##PROJECT_NAME## * @subpackage form * @author ##AUTHOR_NAME## */ abstract class BasesfGuardUserForm extends BaseFormPropel { public function setup() { $this->setWidge...
mit
lKaza/VideoJuegosFisicosChile
ScrapySVGTodoJuegos/ScrapySVGTodoJuegos/settings.py
3258
# -*- coding: utf-8 -*- # Scrapy settings for ScrapySVGTodoJuegos project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # http://doc.scrapy.org/en/latest/topics/settings.html # http://scrapy.readthedocs.o...
mit
lidongkai/god
laravel/storage/framework/views/fa55a065b99ed46f7a51b385bc020c5b1f26d159.php
29654
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="csrf-token" content="<?php echo e(csrf_token()); ?>"> <title><?php echo e(config('app.name')); ?>-<?php echo e($title); ?></title> <meta name="csrf-token" content="<?php echo e(csrf_token()...
mit
isaacs/website
config/app.js
5218
var express = require('express') , auth = require('mongoose-auth') , env = require('./env') , util = require('util') , port = env.port , secrets = env.secrets , EventEmitter = require('events').EventEmitter , commits = require('./../controllers/commits'); // express var app = module.exports = express.cre...
mit
shiftkey/electron
atom/browser/session_preferences.cc
1642
// Copyright (c) 2017 GitHub, Inc. // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. #include "atom/browser/session_preferences.h" #include "atom/common/options_switches.h" #include "base/command_line.h" #include "base/memory/ptr_util.h" namespace atom { namespace {...
mit
fmingorance/laradoc
src/Cache/NullProvider.php
298
<?php namespace Mingorance\LaraDoc\Cache; class NullProvider implements Provider { public function make($config = null) { return null; } public function isAppropriate($provider) { return $provider == null || $provider == 'null' || $provider == 'NULL'; } }
mit
selfrefactor/rambda
source/partitionAsync.js
933
import {_isArray} from './_internals/_isArray' async function whenObject(predicate, input) { const yes = {} const no = {} Object.entries(input).forEach(([prop, value]) => { if (predicate(value, prop)) { yes[prop] = value } else { no[prop] = value } }) return [yes, no] } async functi...
mit
IsaacMiguel/Maresa
models/mCondicion.js
140
var conn = require('../config/db').conn; module.exports = { getAll: getAll } function getAll(cb){ conn("select * from condicion", cb); }
mit
Broomspun/shanque
framework/builtin/video/processor.php
682
<?php /** * [WeEngine System] Copyright (c) 2014 shanque.zhangshuoyin.cn * WeEngine is NOT a free software, it under the license terms, visited http://shanque.zhangshuoyin.cn/ for more details. */ defined('IN_IA') or exit('Access Denied'); class VideoModuleProcessor extends WeModuleProcessor { public function resp...
mit
Adrianacmy/Classic-Interesting-CS-Mini-Programs
Python-language/global_local.py
253
''' # 作用域 globals() locals() LEGB local -> enclosing function -> globals -> buitins check all builtins dir(__buitins__) ''' n = 100 def space(): n = 200 def space2(): n = 300 print(n) return space2 n = space() n()
mit
thiagodebastos/react-future-stack
components/TodoApp/Input.js
529
// @flow import React from 'react'; import { Button, Input } from 'semantic-ui-react'; import 'semantic-ui-css/components/icon.css'; type Props = { onChange: Function, onSubmit: Function, value: string }; const InputComponent = ({ onChange, onSubmit, value }: Props) => <form onSubmit={onSubmit}> <Input ...
mit
bound1ess/codeforces-problemset-2
349/a.cpp
634
#include <cstdio> int main() { freopen("input", "rt", stdin); freopen("output", "wt", stdout); int n, x, v25 = 0, v50 = 0, v100 = 0; scanf("%d", &n); for (int i = 0; i < n; ++i) { scanf("%d", &x); ++(25 == x ? v25 : (50 == x ? v50 : v100)); if (25 == x) { continue; } if (50 == x) { ...
mit
dieng444/projet-miriade
web/assets/versions/miriade/plan.php
2202
<?php include('header.inc'); ?> <div class="container"> <div class="row"> <div class="col-md-9"> <script src="http://maps.google.com/maps/api/js?sensor=false"></script> <script> function init_map() { var var_location = new google.maps.LatLng(49.18710...
mit
qrush/skyway-railsconf2016
config/routes.rb
1544
Skyway::Application.routes.draw do resource :tour resources :shows do resource :setlist collection do get :latest, format: :json end end resources :songs do member do patch :merge end end resources :venues do member do patch :merge end end resources :im...
mit