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
# An initializer like this can go into your Rails project's config/initializers/ folder # require 'arma_fixer' module ArmaFixer # APP = YourRailsAppName::Application # # Depending on which gem you are using for your attachments, you will need a your own criteria of what is a valid file. # ATTR_CHECKER = -> (at...
humzashah/arma_fixer
samples/arma_fixer.rb
Ruby
mit
1,355
package test_locally.app; import com.slack.api.Slack; import com.slack.api.SlackConfig; import com.slack.api.app_backend.SlackSignature; import com.slack.api.app_backend.dialogs.response.Option; import com.slack.api.bolt.App; import com.slack.api.bolt.AppConfig; import com.slack.api.bolt.request.RequestHeaders; import...
seratch/jslack
bolt/src/test/java/test_locally/app/DialogSuggestionTest.java
Java
mit
4,212
<?php namespace App\Http\Controllers; use App\Manuales; use App\Manuales_servicios; use App\Servicios; use Illuminate\Http\Request; use Illuminate\Support\Facades\Redirect; class ManualServiciosController extends Controller { public function __construct() { $this->middleware('auth'); } /** ...
Smiithx/facturacion
app/Http/Controllers/ManualServiciosController.php
PHP
mit
8,987
/* * Farseer Physics Engine: * Copyright (c) 2012 Ian Qvist * * Original source Box2D: * Copyright (c) 2006-2011 Erin Catto http://www.box2d.org * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of t...
Xaer033/YellowSign
YellowSignUnity/Assets/ThirdParty/Networking/TrueSync/Physics/Farseer/Dynamics/Joints/DistanceJoint.cs
C#
mit
11,561
<?php namespace keeko\tools\generator\serializer; use gossi\codegen\model\PhpClass; use gossi\codegen\model\PhpMethod; use gossi\codegen\model\PhpParameter; use keeko\framework\utils\NameUtils; use gossi\codegen\model\PhpProperty; class TypeInferencerGenerator extends AbstractSerializerGenerator { public function g...
keeko/tools
src/generator/serializer/TypeInferencerGenerator.php
PHP
mit
2,783
var moduleName = "ngApp.controllers"; import timeCtrl from './controller/time-controller.js'; // import yourCtrlHere from './controller/your-controller'; var ctrls = Array.from([ //yourCtrlHere, timeCtrl ]); var app = angular.module(moduleName, []); for(var ctrl of ctrls){ app.controller(ctrl.name, ctrl...
hiramsoft/es6-ng-twbs-gulp-start
src/main/es6/controllers.js
JavaScript
mit
356
import pandas as pd df_ab = pd.DataFrame({'a': ['a_1', 'a_2', 'a_3'], 'b': ['b_1', 'b_2', 'b_3']}) df_ac = pd.DataFrame({'a': ['a_1', 'a_2', 'a_4'], 'c': ['c_1', 'c_2', 'c_4']}) print(df_ab) # a b # 0 a_1 b_1 # 1 a_2 b_2 # 2 a_3 b_3 print(df_ac) # a c # 0 a_1 c_1 # 1 a_2 c_2 # 2 a_4 c_4 ...
nkmk/python-snippets
notebook/pandas_merge_join.py
Python
mit
5,590
package me.alb_i986.hbs.utils; import java.util.*; public class Utility { public static List<String> stringToList(String input){ List<String> list = new ArrayList<String>(); for(String element : input.split("-")) { list.add(element); } return list; } }
alb-i986/HorseBettingSystem
src/main/java/me/alb_i986/hbs/utils/Utility.java
Java
mit
309
import { SearchFunction, GetSrcPageFunction, handleNoResult, handleNetWorkError } from '../helpers' import axios, { AxiosResponse } from 'axios' export const getSrcPage: GetSrcPageFunction = async text => { const suggests = await getSuggests(text).catch(() => null) if (suggests) { const tarId = s...
Crimx/crx-saladict
src/components/dictionaries/mojidict/engine.ts
TypeScript
mit
5,361
using System; using System.Collections.Generic; using Xamarin.Forms; namespace Combinado { public partial class PurchaseOrderPage : ContentPage { private List<Product> products; private List<Client> clients; public PurchaseOrderPage () { Title = "Pedido"; InitializeComponents ().ConfigureAwait(false...
nchicas/Combinado
Combinado/Pages/PurchaseOrderPage.cs
C#
mit
1,030
require 'thor' module CodeclimateCi class CLI < Thor method_option :codeclimate_api_token, required: true method_option :repo_id, required: true method_option :branch_name method_option :retry_count method_option :sleep_time desc('check', 'Check code quality with CodeClimate') def check...
fs/codeclimate_ci
lib/codeclimate_ci/cli.rb
Ruby
mit
1,219
''' Created on Apr 28, 2011 @author: Bartosz Alchimowicz ''' ############################ # Collection # ############################ class ScreenSpec(object): def __init__(self): self.children = [] def append(self, screen): assert isinstance(screen, Screen) self.children.append(screen) re...
perfidia/screensketch
src/screensketch/screenspec/model.py
Python
mit
7,161
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.1" language="en"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About StarCoin</source> <translation>About StarCoin</translation> </message> <messa...
coinstar/star
src/qt/locale/bitcoin_en.ts
TypeScript
mit
124,082
/* * Created by SharpDevelop. * User: lexli * Date: 2008-12-14 * Time: 14:08 * * To change this template use Tools | Options | Coding | Edit Standard Headers. */ using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Net; using System.Net.Sockets; using Syste...
yonglehou/sharpsnmplib
snmpd/MainForm.cs
C#
mit
11,042
<?php /* * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS B...
Roave/RoaveDeveloperTools
test/RoaveTest/DeveloperTools/Inspection/TimeInspectionTest.php
PHP
mit
1,640
<?php defined('SYSPATH') or die('No direct script access.'); /** * Forum Topic model * * @package Forum * @author Antti Qvickström * @copyright (c) 2010-2013 Antti Qvickström * @license http://www.opensource.org/licenses/mit-license.php MIT license */ class Anqh_Model_Forum_Topic extends AutoModeler_O...
anqh/anqh
modules/forum/classes/anqh/model/forum/topic.php
PHP
mit
10,580
<?php /** * @author Tim Gunter <tim@vanillaforums.com> * @copyright 2016 Tim Gunter * @license MIT */ namespace Kaecyra\AppCommon\Log; /** * A logger that writes to the filesystem. * * @package app-common * @since 1.0 */ class FilesystemLogger extends BaseLogger { /** * File path * @var strin...
kaecyra/app-common
src/Log/FilesystemLogger.php
PHP
mit
2,570
package com.mygdx.game.entites.entitiycomponents; import com.badlogic.ashley.core.Component; import com.badlogic.gdx.graphics.g2d.Sprite; public class SpriteComponent implements Component { public Sprite sprite; public SpriteComponent(Sprite sprite){ this.sprite = sprite; } }
JoakimRW/ExamensArbeteTD
core/src/com/mygdx/game/entites/entitiycomponents/SpriteComponent.java
Java
mit
286
class Image < ActiveRecord::Base has_many :pages has_attachment :content_type => :image, :storage => :file_system, :path_prefix => 'public/system/images', :processor => 'Rmagick', :thumbnails => ((((thumbnails = RefinerySetting.find_or_set(:i...
aunderwo/sobc-refinery
vendor/plugins/images/app/models/image.rb
Ruby
mit
1,414
<?php /** * Created by PhpStorm. * User: brian * Date: 8/18/14 * Time: 11:19 AM */ namespace FzyAuth\Validator; use Zend\Validator\Identical; class PasswordIdentical extends Identical { /** * Error messages * @var array */ protected $messageTemplates = array( self::NOT_SAME =...
fousheezy/auth
module/FzyAuth/src/FzyAuth/Validator/PasswordIdentical.php
PHP
mit
441
class Sonnet < Formula desc "Spelling framework for Qt" homepage "https://github.com/KDE/sonnet" url "https://github.com/KDE/sonnet/archive/v5.28.0.tar.gz" sha256 "08a5cd2aabfb2513f09e67d9f7a2569aa642af4456a14902a22f19cb1b070db0" depends_on "cmake" => :build depends_on "extra-cmake-modules" => :build dep...
muellermartin/homebrew-kde
sonnet.rb
Ruby
mit
1,207
/* * The MIT License (MIT) * * Copyright (c) 2017 Comapi (trading name of Dynmark International Limited) * * 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 w...
comapi/comapi-sdk-android
COMAPI/foundation/src/main/java/com/comapi/internal/network/ComapiResult.java
Java
mit
6,459
import xRay from 'x-ray' const xray = xRay() import { map, slice, compose } from 'ramda' import { writeFile } from 'fs' import routeNames from '../resources/routes.json' import { getNameFromMatchedObject } from '../js/core' import { convertStopData } from '../../server/controllers/helpers' export const addRouteName =...
natac13/london-ontario-data
app/utils/scrapStops.js
JavaScript
mit
2,405
try: __version__ = __import__('pkg_resources').require('booleanOperations')[0].version except Exception: __version__ = 'unknown'
moyogo/booleanoperations
Lib/booleanOperations/version.py
Python
mit
137
'use strict'; const Rx = require('rxjs/Rx'); const counter = Rx.Observable.interval(100); const subscriptionA = counter.subscribe(i => console.log(`A ${i}`)); const subscriptionB = counter.subscribe(i => console.log(`B ${i}`)); setTimeout(() => { console.log(`Cancelling subscriptionB`); subscriptionB.unsubscribe...
miguelmota/rxjs-examples
examples/unsubscribe.js
JavaScript
mit
333
package com.isel.lteshakedownapp.testUnity; public class SignalStrTest extends AbstractTest { @Override public boolean isNative() { return false; } @Override public TestType getType() { return TestType.STATIONARY; } @Override public TestResult runTest() { TestResult ret = new TestResult(); ret.orig...
isel-31612/NetworkShakedownApp
sources/LteShakeDownApp/src/com/isel/lteshakedownapp/testUnity/SignalStrTest.java
Java
mit
528
/* * RPC2Rest.cpp * * Created on: 14. 1. 2016 * Author: ondra */ #include "RPC2Rest.h" #include <lightspeed/base/text/textstream.tcc> #include <lightspeed/utils/json/jsonexception.h> #include "lightspeed/utils/json/jsonbuilder.h" #include "../httpserver/queryParser.h" #include "lightspeed/base/streams/fil...
ondra-novak/jsonrpcserver
jsonrpc/RPC2Rest.cpp
C++
mit
6,452
<?php namespace AppBundle\Document\Paciente; use Gedmo\Mapping\Annotation as Gedmo; use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM; /** * Documento para mapear las citas * * @ODM\EmbeddedDocument */ class PacienteCitas { /** * @ODM\Id */ protected $id; /** * @ODM\String */ ...
Adriwr/Clinica
src/AppBundle/Document/Paciente/PacienteCitas.php
PHP
mit
1,744
import numpy import chainer from chainer.backends import cuda from chainer import function_node from chainer.utils import type_check def _as_mat(x): if x.ndim == 2: return x return x.reshape(len(x), -1) def _ij_ik_il_to_jkl(a, b, c): ab = chainer.functions.matmul(a[:, :, None], b[:, None, :]) ...
rezoo/chainer
chainer/functions/connection/bilinear.py
Python
mit
8,648
package org.openkoala.gqc.infra.util; import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * 数据库工具类 ...
guokaijava/YGCMS
ygcms-infra/src/main/java/org/openkoala/gqc/infra/util/DatabaseUtils.java
Java
mit
2,621
Rails.application.routes.draw do # The priority is based upon order of creation: first created -> highest priority. # See how all your routes lay out with "rake routes". # You can have the root of your site routed with "root" root 'ship_labels#index' resources :ship_labels # root 'welcome#index' # Exa...
ganeshkbalaji/dot-bo-challenge
config/routes.rb
Ruby
mit
1,629
default[:logstash][:version] = "1.4"
foxycoder/chef-logstash
attributes/default.rb
Ruby
mit
37
<?php namespace Midnight\Crawler\Plugin\TestData; class RakuenTestData extends AbstractTestData { /** * @var string **/ protected $rss_name = 'rakuen.xml'; /** * @var array **/ protected $html_paths = array( 'rakuen/880.html', 'rakuen/error.html', 'rakuen/e...
app2641/AdultMidnight
src/Midnight/Crawler/Plugin/TestData/RakuenTestData.php
PHP
mit
341
var NexSportsFrScraper, Xray = require('x-ray'), Datastore = require('nedb'), bunyan = require('bunyan'); var NexSportsFrScraper = (function(){ var X = Xray(); X.delay(500, 1000); var log = bunyan.createLogger({name: 'scraperlogger'}); var BASE_URL = "http://www.sports.fr"; var CLUBS_LIGUE_1_URI = "/...
Boussadia/NexFootballStatistics
NexSportsFrScraper.js
JavaScript
mit
9,732
/** * Manages state for the `browse` page */ import R from 'ramda'; import { SORT, SET_SORT, ADD_COMPOSITIONS } from 'src/actions/browse'; const initialState = { loadedCompositions: [], totalCompositions: 100, selectedSort: 'NEWEST', }; export default (state=initialState, action={}) => { switch(action.typ...
Ameobea/noise-asmjs
src/reducers/browseReducer.js
JavaScript
mit
707
<!doctype html> <html class="no-js" lang=""> <head> <title>Zabuun - Learn Egyptian Arabic for English speakers</title> <meta name="description" content=""> <?php include $_SERVER['DOCUMENT_ROOT'].'/layout/head.php';?> </head> <body> <?php include $_SERVER['DOCUMENT_ROOT'].'/layout/ie8.php';?> <?php inc...
javanigus/zabuun
essay/2328-summer-job.php
PHP
mit
1,554
/** * Created by santhoshkumar on 17/09/15. * * Find the sum of contiguous subarray within a one-dimensional array of numbers which has the largest sum. Kadane’s Algorithm: Initialize: max_so_far = 0 max_ending_here = 0 Loop for each element of the array (a) max_ending_here = max_ending_here + a[i] (...
skcodeworks/dp-algo-in-js
js/largestsumcontiguoussubarray.js
JavaScript
mit
2,369
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.hatapp.comandas.entity; import java.io.Serializable; import java.util.List; import javax.persistence.Basic; impo...
ivanbanos/SistemaComandasYInventarioRestaurantes
SistemaComandas/SistemaComandas-api/src/main/java/com/hatapp/comandas/entity/Atributosclientes.java
Java
mit
3,447
<?php namespace Nekland\Bundle\FeedBundle\Item; interface ItemInterface { /* * Return the title of your rss, something like "My blog rss" * @return string */ public function getFeedTitle(); /* * Return the description of your rss, something like "This is the rss of my blog about foo a...
Nekland/FeedBundle
Item/ItemInterface.php
PHP
mit
1,114
require File.expand_path('../boot', __FILE__) require 'rails/all' Bundler.require require "spik" module Dummy class Application < Rails::Application # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers # -...
gazay/spik
test/dummy/config/application.rb
Ruby
mit
1,786
(function (root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define([root], factory); } else { // Browser globals root.slugify = factory(root); } }(this, function (window) { var from = 'àáäãâèéëêìíïîòóöôõùúüûñç·...
LeandroLovisolo/MyDataStructures
website/bower_components/slugify/slugify.js
JavaScript
mit
795
<?php /* * Copyright 2015 Sven Sanzenbacher * * This file is part of the naucon package. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Naucon\File; /** * File Writer Interface * * @abstract * @package File * @a...
naucon/File
src/FileWriterInterface.php
PHP
mit
994
package com.wj.caidengmi2; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.util.Log; public class SqlHelper { public static final String DB_NAME = "data/data/com.game.zhongqiuguess/databases/...
JeffreyWei/caidengming
src/com/wj/caidengmi2/SqlHelper.java
Java
mit
2,463
package cmd import ( "fmt" "github.com/spf13/cobra" "os" ) const ( bashCompletionFunc = ` __todoist_select_one() { fzf } __todoist_select_multi() { fzf -m } __todoist_filter_ids() { COMPREPLY=( $(todoist filter list | __todoist_select_multi | awk '{print $1}' | tr '\n' ' ') ) } __todoist_item_id() { COMPRE...
kobtea/go-todoist
cmd/todoist/cmd/completion.go
GO
mit
5,866
<?php namespace AerialShip\SamlSPBundle\Error; class EmptySamlResponseException extends \RuntimeException { }
HearstCorp/SamlSPBundle
src/AerialShip/SamlSPBundle/Error/EmptySamlResponseException.php
PHP
mit
112
package org.penguin.kayako.domain; import org.junit.Test; import org.penguin.kayako.UnmarshallerFactory; import org.penguin.kayako.domain.NoteCollection; import org.penguin.kayako.util.ContentLoader; import javax.xml.bind.Unmarshaller; import java.io.StringReader; import static org.junit.Assert.assertEquals; import ...
penguinboy/kayako-api
src/test/java/org/penguin/kayako/domain/NoteCollectionTests.java
Java
mit
878
__author__ = 'Emil E Nielsen' start = 1 end = 17 for i in range (8): for x in range(start, end): print chr(x), if x >= 128: break print "\n" start = end + 1 end = start + 16
EENielsen/school-python
ascii-tabel.py
Python
mit
222
'use strict'; /** * Module dependencies. */ var CP_cache = require('../lib/CP_cache'); var CP_get = require('../lib/CP_get.min'); var CP_regexp = require('../lib/CP_regexp'); /** * Configuration dependencies. */ var config = require('../config/production/config'); var modules = require('../config/productio...
CinemaPress/CinemaPress-ACMS
routes/rss.js
JavaScript
mit
8,046
({ "clearFilterDialogTitle": "Εκκαθάριση φίλτρου", "filterDefDialogTitle": "Φίλτρο", "ruleTitleTemplate": "Κανόνας ${0}", "conditionEqual": "ίσο", "conditionNotEqual": "όχι ίσο", "conditionLess": "είναι μικρότερο από", "conditionLessEqual": "μικρότερο ή ίσο", "conditionLarger": "είναι μεγαλύτερο από", "condi...
henry-gobiernoabierto/geomoose
htdocs/libs/dojo/dojox/grid/enhanced/nls/el/Filter.js
JavaScript
mit
3,906
module Affiliator VERSION = "0.2.1" end
andrewls/affiliator
lib/affiliator/version.rb
Ruby
mit
42
#include "portremapsettingswidget.h" #include "controls/midichannelcombodelegate.h" #include "controls/midicontrollercombodelegate.h" #include "ui_portremapsettingswidget.h" #include <QLabel> PortRemapSettingsWidget::PortRemapSettingsWidget(PortDirection direction, QWidget *parent) : QWidget(parent), ui...
dehnhardt/mioconfig
src/widgets/portremapsettingswidget.cpp
C++
mit
10,679
import * as path from 'path'; import * as assert from 'assert'; import * as ttm from 'vsts-task-lib/mock-test'; import tl = require('vsts-task-lib'); import * as shared from './TestShared'; describe('Kubernetes Suite', function() { this.timeout(30000); before((done) => { process.env[shared.TestEnvVars....
aldoms/vsts-tasks
Tasks/Kubernetes/Tests/L0.ts
TypeScript
mit
34,309
Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the web serv...
azusanakano/rails-devise-ja
config/environments/development.rb
Ruby
mit
2,070
(function() { 'use strict'; angular .module('ngRouteApp') .controller('AboutController', AboutController); /** @ngInject */ function AboutController() { } })();
Toilal/showcase-ng-routers
ng-route-app/src/app/about/about.controller.js
JavaScript
mit
182
<?php namespace Cradle\Sql; use StdClass; use PHPUnit_Framework_TestCase; use Cradle\Resolver\ResolverHandler; use Cradle\Profiler\InspectorHandler; /** * Generated by PHPUnit_SkeletonGenerator on 2016-07-27 at 02:11:02. */ class Cradle_Sql_AbstractSql_Test extends PHPUnit_Framework_TestCase { /** * @var...
CradlePHP/packages
test/Sql/AbstractSql.php
PHP
mit
15,278
/* * The MIT License (MIT) * * Copyright (c) 2013 Milad Naseri. * * 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...
agileapes/dragonfly
dragonfly-core/src/main/java/com/mmnaseri/dragonfly/metadata/PagingMetadata.java
Java
mit
1,516
<?php /** * This file is part of the contentful/contentful-management package. * * @copyright 2015-2022 Contentful GmbH * @license MIT */ declare(strict_types=1); namespace Contentful\Management\Resource; use Contentful\Core\Api\Link; use Contentful\Core\Resource\SystemPropertiesInterface; use Contentful\Man...
contentful/contentful-management.php
src/Resource/BaseResource.php
PHP
mit
1,597
# A simple DOC file parser based on pyole import os import struct import logging import datetime from pyole import * class FIBBase(OLEBase): wIdent = 0 nFib = 0 unused = 0 lid = 0 pnNext = 0 Flags1 = 0 fDot = 0 fGlsy = 0 fComplex = 0 fHasPic = 0 cQuickSaves = 0 fEncry...
z3r0zh0u/pyole
pydoc.py
Python
mit
14,460
"use strict"; var $ = require("jquery"); var _ = require("underscore"); /** * Adds relative attribute functions: minimum, maximum, equals. * * @param c The comparator function * @param a The attribute name * @param e1 The first element (the element to act upon) * @param s The selector to evaluate as an element ...
sjohnr/behaviors.js
src/main/js/lib/Relative.js
JavaScript
mit
852
<?php namespace EntityManager50f974421cab3_546a8d27f194334ee012bfe64f629947b07e4919\__CG__\Doctrine\ORM; /** * CG library enhanced proxy class. * * This code was generated automatically by the CG library, manual changes to it * will be lost upon next generation. */ class EntityManager extends \Doctrine\ORM\Entit...
ultimo/tr
app/cache/dev/jms_diextra/doctrine/EntityManager_50f974421cab3.php
PHP
mit
16,022
module.exports = function(grunt) { "use strict"; require("matchdep").filterDev("grunt-*").forEach(grunt.loadNpmTasks); grunt.initConfig({ pkg: grunt.file.readJSON("package.json"), bannercss: "/*! =============================================================\n" + "...
AZMAG/map-Developments
Gruntfile.js
JavaScript
mit
8,849
import {Reducer} from "redux"; import {ActionType, getType} from "typesafe-actions"; import * as Actions from './actions'; import ld_filter from 'lodash/filter'; import ld_find from 'lodash/find'; import {PanelPermission, RoleClearance} from "./types"; export interface PermissionReducerState { panelPermissions: Pa...
mrkirby153/KirBotPanel
resources/assets/js/components/dashboard/permissions/reducer.ts
TypeScript
mit
2,674
/** * Created by ndyumin on 29.05.2015. * @exports UIModule */ define(function(require) { require('./styles/field.less'); var Wreqr = require('backbone.wreqr'); var globalBus = Wreqr.radio.channel('global'); var UIController = require('./UIController'); return function(app) { var contr...
nikitadyumin/tetris
src/app/game_ui/UIModule.js
JavaScript
mit
427
<?php /** * @package framework * @subpackage control */ class RequestProcessor { private $filters = array(); public function __construct($filters = array()) { $this->filters = $filters; } public function setFilters($filters) { $this->filters = $filters; } public function preRequest(SS_HTTPRequest $req...
harrymule/nairobi-webportal
framework/control/RequestProcessor.php
PHP
mit
823
package com.witchworks.common.brew; import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.util.EnumFacing; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import javax.annotation.Nullable; /** * This class was created by Arekkuusu on 11/06/20...
backuporg/Witchworks
src/main/java/com/witchworks/common/brew/GrassGrowBrew.java
Java
mit
1,298
from setuptools import setup from os.path import join as join_path from os import walk def files_in(package, directory): paths = [] for root, dirs, files in walk(join_path(package, directory)): for file in files: paths.append(join_path(root, file)[(len(package) + 1):]) return paths a...
LuRsT/datdash
setup.py
Python
mit
825
module MickTagger class FileStore attr_reader :content def initialize(content) @content = content end def files_for(tag) @content.select {|file, tags| tags.include?(tag) }.keys end def add_tag_to(file, tag) @content[file] ||= [] @content[file] << tag @content[f...
mrnugget/micktagger
lib/micktagger/file_store.rb
Ruby
mit
716
import json import os from collections import OrderedDict from difflib import unified_diff import pytest from dash.development._py_components_generation import generate_class from dash.development.component_generator import reserved_words from . import _dir, expected_table_component_doc @pytest.fixture def componen...
plotly/dash
tests/unit/development/test_generate_class.py
Python
mit
4,761
require('../../stylus/components/_dialogs.styl') // Mixins import Dependent from '../../mixins/dependent' import Detachable from '../../mixins/detachable' import Overlayable from '../../mixins/overlayable' import Stackable from '../../mixins/stackable' import Toggleable from '../../mixins/toggleable' // Directives im...
azaars/vuetify
src/components/VDialog/VDialog.js
JavaScript
mit
4,409
package service import ( "net/http" "github.com/codegangsta/negroni" "github.com/gorilla/mux" "github.com/unrolled/render" ) func NewServer() *negroni.Negroni { formatter := render.New(render.Options{ IndentJSON:true, }) n := negroni.Classic() mx := mux.NewRouter() initRoutes(mx, formatter) ...
mmsikora/gogo-service
service/service.go
GO
mit
691
using UnityEngine; using System.Collections; using System; using Epm3d; /// <summary> /// Manages a single PO. Calls GameManager to update PO approval status, waits for response. /// Listens to highlight events, does other highlight stuff like PO display (via script PoGui), halting /// movement, everything not relat...
KevinSmall/HanaShine3d
Epm3d/Assets/_Scripts/Po/PoManager.cs
C#
mit
8,495
# ============================================================================== # Copyright 2019 - Philip Paquette # # NOTICE: 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 rest...
diplomacy/research
diplomacy_research/models/policy/order_based/model.py
Python
mit
28,290
package com.currencycloud.client.model; import com.currencycloud.client.Utils; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.PropertyNamingStrategy; import com.fas...
CurrencyCloud/currencycloud-java
src/main/java/com/currencycloud/client/model/Iban.java
Java
mit
4,309
module.exports = function() { let heroes = ["leto", "duncan", "goku", "batman", "asterix", "naruto", "totoro"]; for(let index = Math.max(0, heroes.length - 5), __ks_0 = Math.min(heroes.length, 3), hero; index < __ks_0; ++index) { hero = heroes[index]; console.log("The hero at index %d is %s", index, hero); } };
kaoscript/kaoscript
test/fixtures/compile/for/for.block.in.from.asc.wbn.wep.ns.js
JavaScript
mit
319
// Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). // For example: // Given binary tree {3,9,20,#,#,15,7}, // 3 // / \ // 9 20 // / \ // 15 7 // return its level order traversal as: // [ // [3], // [9,20], // [15,7] // ] ...
Vrturo/Algo-Gem
Algorithms/JS/trees/binaryLvlOrderTraverse.js
JavaScript
mit
1,066
""" Django settings for sippa project. Generated by 'django-admin startproject' using Django 1.10.2. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ import os i...
luissiqueira/sippa-no-api
sippa/settings.py
Python
mit
4,223
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; using System.Collections.Immutable; using System.IO; using ILCompil...
yizhang82/corert
src/ILCompiler.Compiler/src/Compiler/Compilation.cs
C#
mit
20,193
using System.Text.RegularExpressions; using SharpRaven.Logging; namespace SentryWeb.Scrubbing { /// <summary> /// Silly example of replacing zero with hero when the divide by zero exception is thrown. /// </summary> public class DivisionByZeroFilter : IFilter { private static readonly Regex...
olsh/serilog-sinks-sentry
demos/SentryWeb/Scrubbing/DivisionByZeroFilter.cs
C#
mit
519
require 'spec_helper' require 'lumberg/whm' CERT = File.read('./spec/sample_certs/main.crt') SELF_CERT = File.read('./spec/sample_certs/sample.crt') SELF_KEY = File.read('./spec/sample_certs/sample.key') module Lumberg describe Whm::Cert do before(:each) do @login = { host: @whm_host, hash: @whm_hash } ...
site5/lumberg
spec/whm/cert_spec.rb
Ruby
mit
3,549
// import { CallLogs } from '../index'; import expect from 'expect'; // import { shallow } from 'enzyme'; // import React from 'react'; describe('<CallLogs />', () => { it('Expect to have unit tests specified', () => { expect(true).toEqual(false); }); });
luis-teixeira/react-twilio-webphone
app/containers/CallLogs/tests/index.test.js
JavaScript
mit
266
using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Http; using System.Threading.Tasks; using System.Web; using System.Web.Mvc; using BookClient.Enum; using BookClient.Interface; using BookClient.Models; using BookClient.ViewModels; namespace BookClient.Controllers { ...
Yaxuan/BookApp
BookClient/Controllers/BookController.cs
C#
mit
4,685
namespace Kanbang.Core.Events { using System; internal static class EventTypes { public static readonly EventType<Exception> ExceptionOccured = new EventType<Exception>(1000, "Exception occured"); } }
niaher/kanbang
Kanbang.Core/Events/EventTypes.cs
C#
mit
210
'use strict'; import axios from 'axios'; export default { search: (criteria) => { return axios.post('/gameSystemRankings/search', criteria) .then(function(response) { return response.data; }); }, createOrUpdate: (data) => { return axios.post('/gameSystemRankings', data) .then(function(response) { ...
zdizzle6717/battle-comm
src/services/GameSystemRankingService.js
JavaScript
mit
496
namespace Light.Data { internal class LightStringMatchDataFieldInfo : LightDataFieldInfo, ISupportNotDefine, IDataFieldInfoConvert { private bool _isNot; private readonly bool _starts; private readonly bool _ends; private readonly object _left; private readonly object _right; public LightStringMatch...
aquilahkj/Light.Data2
src/Light.Data/DataField/LightStringMatchDataFieldInfo.cs
C#
mit
1,919
<?php header("Content-type:application/json; charset=utf-8"); require_once('db.php'); if($link){ @$newsId = $_POST['newsId']; mysqli_query($link,'SET NAMES utf8'); //防止中文变成问号或乱码 $sql = "DELETE FROM `news` WHERE `news`.`id` = {$newsId}"; mysqli_query($link,$sql); ec...
pengxiaohua/baiduNews-by-PHP
server/delete.php
PHP
mit
450
# encoding: utf-8 from views import dogs, breeds, users urls = [ ('/dogs/', dogs.DogAPI.as_view('dog_api')), ('/user_dogs/', dogs.UserDogsAPI.as_view('user_dogs_api')), ('/breeds/', breeds.BreedAPI.as_view('breed_api')), ('/breed_dogs/', breeds.BreedDogsAPI.as_view('breed_dogs_api')), ('/users/', u...
gabrielecker/DogAdoption-Backend
project/urls.py
Python
mit
467
<?php /* * The MIT License (MIT) * * Copyright (c) 2014-2015 Spomky-Labs * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. */ namespace SpomkyLabs\IpFilterBundle\Model; use Symfony\Bridge\Doctrine\RegistryInterface; class IpManager impl...
Spomky-Labs/IpFilterBundle
Model/IpManager.php
PHP
mit
2,234
var StatusSelector = React.createClass({ handleChange: function(event) { this.props.updateStatusFilter(event.target.value) }, handleNodeGrep: function(event) { this.props.updateNodeFilter(event.target.value) }, handleKeyGrep: function(event) { this.props.updateKeyFilter(event.target.value) }, ...
fujiwara/consul-kv-dashboard
assets/scripts/dashboard.js
JavaScript
mit
7,248
module SimpleSalesforce module SalesforceObject # :nodoc: module CreatorsAndUpdaters def self.included(klass) klass.class_eval do extend ClassMethods include InstanceMethods end end module ClassMethods # Create a new SalesforceObject fr...
webcollective/simple_salesforce
lib/simple_salesforce/salesforce_object/creators_and_updaters.rb
Ruby
mit
2,391
<?php /** * Zend Framework * * LICENSE * * This source file is subject to the new BSD license that is bundled * with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://framework.zend.com/license/new-bsd * If you did not receive a copy of the license an...
jodier/tmpdddf
web/private/tine20/library/Zend/InfoCard/Xml/Assertion/Interface.php
PHP
mit
2,251
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class Comments extends MY_Shoptotalk { public $blockCommentsDelta = 0; public function __construct() { parent::__construct(); } public function index() { $post_id = $this->input->post('post_id'); $this...
Shoptotalk/SHOPTOTALK
application/controllers/Comments.php
PHP
mit
3,085
using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using ChronicNetCore.Tags.Repeaters; using ChronicNetCore; namespace ChronicNetCore.Handlers { public class RmnSdSyHandler : IHandler { public Span Handle(IList<Token> tokens, Options options) { ...
messier51a/ChronicNetCore
src/ChronicNetCore/Handlers/RmnSdSyHandler.cs
C#
mit
911
module SS module TmpDirSupport def self.extended(obj) obj.before(:example) do obj.metadata[:tmpdir] = ::Dir.mktmpdir end obj.after(:example) do tmpdir = obj.metadata[:tmpdir] obj.metadata[:tmpdir] = nil ::FileUtils.rm_rf(tmpdir) if tmpdir end obj.cla...
shirasagi/ss-handson
spec/support/ss/tmp_dir_support.rb
Ruby
mit
1,917
<?php /* Element Description: VC Image Box */ // Element Class class vc_facebook_button extends WPBakeryShortCode { // Element Init function __construct() { add_action( 'init', array( $this, 'vc_facebook_button_mapping' ) ); add_shortcode( 'vc_facebook_button', array( $this, 'vc_render_facebook_button' ) ); ...
whothat-dk/Slagelse-Lift
wp-content/themes/whothat/composer/socialFacebook.php
PHP
mit
3,239
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("Cin...
izabelk/CinemaWorld
CinemaWorldProject/CinemaWorld.Web/Properties/AssemblyInfo.cs
C#
mit
1,361
/* TDD style with BDD statements */ import LoggerWithMetadata from './index'; import clogy from '../../lib/clogy.js'; // Passing arrow functions to Mocha is discouraged. Their lexical binding of the // this value makes them unable to access the Mocha context, and statements like // this.timeout(1000); will not work i...
pgmanutd/clogy
extensions/logger-with-metadata/index.spec.js
JavaScript
mit
928
import json from unittest import TestCase from mock import Mock, patch, create_autospec class CommandTestCase(TestCase): """A TestCase for unit testing bot requests and responses. To use it: * provide your bot in *bot_class* (and optionally a config). * use self.send_message inside your test ca...
venmo/slouch
slouch/testing.py
Python
mit
1,912
'use strict'; const expect = require('chai').use(require('chai-string')).expect; const RSVP = require('rsvp'); const request = RSVP.denodeify(require('request')); const AddonTestApp = require('ember-cli-addon-tests').AddonTestApp; describe('FastBoot config', function () { this.timeout(400000); let app; befor...
ember-fastboot/ember-cli-fastboot
packages/ember-cli-fastboot/test/fastboot-config-test.js
JavaScript
mit
1,367
<?php include 'functions.php'; // laços (for,while,do..while,foreach) // for for ($i=0; $i < 10; $i++) { echo "ola for $i".linha(); } // while (testa sempre antes de entrar no bloco) $j = 11; while ($j <= 10) { echo "ola while $j".linha(); $j++; } // do..while (executa ao menos uma vez antes de t...
mrecondo/linguagem_php
src/lacos.php
PHP
mit
586
@extends('pdf_layout') @section('style') <style> th{ padding: 5px; } .rotate { text-align: center; white-space: nowrap; vertical-align: middle; width: 1.5em; } .rotate div{ /* FF3.5+ */ -moz-transform: rotate(-90.0deg); /* Opera 10.5 */ -o-transform: rotate(-90.0deg); /* Saf3.1...
bhurivaj/erp
resources/views/Project/pdf/project_schedule.blade.php
PHP
mit
3,610