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 |
|---|---|---|---|---|---|
class TimeUtil
def self.timestamp_to_seconds(timestamp)
hours, minutes, seconds = timestamp.split(':').map(&:to_i)
hours * 3600 + minutes * 60 + seconds
end
def self.seconds_to_timestamp(seconds)
hours, remainder = seconds.divmod(3600)
minutes, seconds = remainder.divmod(60)
"#{hours}:#{min... | burennto/tennis-highlights-maker | src/util/time_util.rb | Ruby | mit | 338 |
/**
* @license
* Copyright UIUX Engineering All Rights Reserved.
*/
import { createIndexDict } from './create-indexed-dict';
import { IIndexedItem, IIndexedItemDict, IIndexedTableItem } from './interfaces';
import { createTableItem } from './create-table-item';
import { hasValue } from '@uiux/cdk/value';
describe(... | UIUXEngineering/ix-material | libs/z_deprecated-cdk/store/src/indexed-table/reducers/create-table-item.spec.ts | TypeScript | mit | 2,343 |
package edu.buffalo.cse.maybeclient.rest;
import retrofit.GsonConverterFactory;
import retrofit.Retrofit;
/**
* Created by xcv58 on 10/15/15.
*/
public class ServiceFactory {
public static <T> T createRetrofitService(final Class<T> clazz, final String endPoint) {
final Retrofit retrofit = new Retrofit.B... | blue-systems-group/project.maybe.java.client | src/main/java/edu/buffalo/cse/maybeclient/rest/ServiceFactory.java | Java | mit | 505 |
<?php
//-------------------------------------------------------------
// * Name: PHP-PostGIS2GeoJSON v2
// * Purpose: GeoLab
// * Date: 2018/10/18
// * Author: Chingchai Humhong (chingchaih@nu.ac.th)
// * Acknowledgement:
//-------------------------------------------------------------
// Database connection setting... | chingchai/workshop | leaflet/condata.php | PHP | mit | 1,942 |
import { curry } from 'lodash/fp';
const checkIfClickedOutSideContainer = (containerEle, element) => {
if (!element) {
return true;
} else if (element === containerEle) {
return false;
} else {
return checkIfClickedOutSideContainer(containerEle, element.parentNode);
}
}
const o... | Attrash-Islam/infinite-autocomplete | src/onDocumentClick/index.js | JavaScript | mit | 612 |
load 'setup/undefine.rb'
require 'elasticsearch/model/extensions/all'
ActiveRecord::Schema.define(:version => 1) do
create_table :articles do |t|
t.string :title
t.datetime :created_at, :default => 'NOW()'
end
create_table :comments do |t|
t.integer :article_id
t.string :body
t.datetime :cr... | crowdworks/elasticsearch-model-extensions | spec/setup/articles_with_comments.rb | Ruby | mit | 2,214 |
import pandas as pd
import os
import subprocess as sub
import re
import sys
from Bio import SeqUtils
import matplotlib.pyplot as plt
import numpy as np
from scipy import stats
path = os.path.join(os.path.expanduser('~'),'GENOMES_BACTER_RELEASE69/genbank')
# ['DbxRefs','Description','FeaturesNum','GenomicID','Genomi... | sergpolly/Thermal_adapt_scripts | composition_analysis_Thermo.py | Python | mit | 11,114 |
package com.armandgray.seeme.views;
import android.content.BroadcastReceiver;
import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.database.Cursor;
import android.net.Uri;
import android.os.Bundle;
import android.suppo... | armandgray/SeeMe | SeeMe/app/src/main/java/com/armandgray/seeme/views/NotesFragment.java | Java | mit | 7,802 |
/*!
* jquery.analytics.js
* API Analytics agent for jQuery
* https://github.com/Mashape/analytics-jquery-agent
*
* Copyright (c) 2015, Mashape (https://www.mashape.com)
* Released under the @LICENSE license
* https://github.com/Mashape/analytics-jquery-agent/blob/master/LICENSE
*
* @version @VERSION
* @date @... | Mashape/analytics-agent-jquery | src/jquery.analytics.js | JavaScript | mit | 11,673 |
include_recipe "markosamuli_workstation::git"
brew "tmux"
brew "reattach-to-user-namespace"
| markosamuli/osx-dev-setup | markosamuli_workstation/recipes/tmux.rb | Ruby | mit | 92 |
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("RA... | bigfont/2013-128CG-Vendord | HelpfulStuff/rapi2-86240/RAPI2/RAPI2TestM/Properties/AssemblyInfo.cs | C# | mit | 1,395 |
# 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 |
<?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 |
'''
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
/**
* @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 |
/*
* 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 |
/*
* 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 |
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 |
(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 |
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 |
/*
* 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 |
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 |
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 |
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 |
@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 |
using AzureFromTheTrenches.Commanding.Abstractions;
namespace InMemoryCommanding.Commands
{
public class CommandWithoutResult : ICommand
{
public string DoSomething { get; set; }
}
}
| JamesRandall/AccidentalFish.Commanding | Samples/InMemoryCommanding/Commands/CommandWithoutResult.cs | C# | mit | 207 |
/*
* Copyright (C) 2020 wea_ondara
*
* BungeePerms is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* BungeePerms is distribu... | weaondara/BungeePerms | src/main/java/net/alpenblock/bungeeperms/TabCompleter.java | Java | mit | 12,243 |
using EleicaoBrasil.Web.ModelView;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web;
namespace EleicaoBrasil.Web.Util
{
public class HttpUtil
{
public static HttpResponseMessage TrataException(Exception e, HttpRequestMessage r... | Politbook/politbook_server | EleicaoBrasil.Web/Util/HttpUtil.cs | C# | mit | 744 |
require 'model_id/version'
require 'model_id/base'
module ModelId
end
| abonec/model_id | lib/model_id.rb | Ruby | mit | 71 |
import {storeFreeze} from "ngrx-store-freeze";
import {localStorageSync} from "ngrx-store-localstorage";
import {combineReducers, StoreModule} from "@ngrx/store";
import {appReducers} from "./shared/store/reducers/app.reducer";
import {AgmCoreModule} from "angular2-google-maps/core";
import {RouterStoreModule} from "@... | apollo-utn-frd/apollo | client/src/app/app.exports.ts | TypeScript | mit | 2,209 |