repo_name stringlengths 4 116 | path stringlengths 4 379 | size stringlengths 1 7 | content stringlengths 3 1.05M | license stringclasses 15
values |
|---|---|---|---|---|
you21979/node-hashpjw | example/es6.js | 190 | const hash = require('hashpjw');
let w = [
"qwerty",
"123456",
"12345678",
"00000001",
"NPC0001",
"@@@@@@@@"
].map(v => ({ key: hash(v), value: v}))
console.log(w);
| mit |
lcustodio/angular-grunt-to-webpack | app/scripts/vendor.js | 747 | 'use strict';
module.exports = function () {
/* Styles */
//require('../index.scss');
//require('../../node_modules/mdi/css/materialdesignicons.min.css');
//require('../../node_modules/node-lumx/dist/scss/_lumx.scss');
/* JS */
global.$ = global.jQuery = require('jquery');
//require('veloci... | mit |
ls1intum/ArTEMiS | src/main/webapp/app/entities/entity.module.ts | 1588 | import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { ArTEMiSCourseModule } from './course/course.module';
import { ArTEMiSExerciseModule } from './exercise/exercise.module';
import { ArTEMiSQuizExerciseModule } from './quiz-exercise/quiz-exercise.module';
import { ArTEMiSParticipationModule } fro... | mit |
pacopablo/gp10 | gp10/__init__.py | 822 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2009 John Hampton <pacopablo@pacopablo.com>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
#
# Author: John Hampton <pacopablo@pacopablo.com>
# Third Party Imports
from sqlal... | mit |
Teknologica/js-sdk | src/resources/blacklists-resource.js | 740 | export default function BlacklistsResource({apiHandler}) {
return {
async getAll({limit = null, offset = null, sort = null, q = null, filter = null} = {}) {
const params = {
limit,
offset,
sort,
q,
filter
... | mit |
activecollab/promises | src/Promise/Promise.php | 967 | <?php
/*
* This file is part of the Active Collab Promises.
*
* (c) A51 doo <info@activecollab.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace ActiveCollab\Promises\Promise;
use InvalidArgumentException;
/**
* @package ActiveC... | mit |
rlbaltha/engDept | src/English/DonateBundle/Controller/DonateController.php | 6112 | <?php
namespace English\DonateBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
use Symfony\Component\Secur... | mit |
selesse/WineDB | src/main/java/com/selesse/android/winedb/activity/SingleWineViewActivity.java | 4475 | package com.selesse.android.winedb.activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.support.v4.view.ViewPager;
import android.support.v7.app.ActionBarActivity;
import... | mit |
foxnewsnetwork/arrows | spec/spec_helper.rb | 217 | # TODO: move the specs in also lol
require 'pry'
require File.expand_path("../../lib/arrows", __FILE__)
module Composable
def compose(f, g)
-> (x) { f.(g.(x)) }
end
def *(g)
compose(self, g)
end
end
| mit |
terraria-crafting/tui | src/app/search/index.js | 188 | import angular from 'angular';
import {searchBar} from './searchBar';
export const searchModule = 'search';
angular
.module(searchModule, [])
.component('tcSearch', searchBar);
| mit |
c14410312/FrenchMadeEasy | src/CurrentCategory.java | 177 | public class CurrentCategory {
String fr;
String eng;
CurrentCategory(String line){
String[] parts = line.split(",");
fr = parts[0];
eng = parts[1];
}
}
| mit |
theill/billedid | test/functional/photos_controller_test.rb | 84 | require 'test_helper'
class PhotosControllerTest < ActionController::TestCase
end
| mit |
enlim/core | app/Http/Controllers/VisitTransfer/Site/Reference.php | 1581 | <?php
namespace App\Http\Controllers\VisitTransfer\Site;
use App\Http\Controllers\BaseController;
use App\Http\Requests\VisitTransfer\ReferenceSubmitRequest;
use App\Models\Sys\Token;
use Exception;
use Input;
use Redirect;
class Reference extends BaseController
{
public function getComplete(Token $token)
{
... | mit |
scalableminds/scala-presseportal | src/main/scala/com/scalableminds/presseportal/PressePortalJSONProtocol.scala | 2785 | package com.scalableminds.presseportal
import org.joda.time.DateTime
import play.api.libs.json._
import play.api.libs.functional.syntax._
trait APIResult { val success: Boolean }
case class APISuccess(success: Boolean, request: RequestInfo, content: List[Article]) extends APIResult
case class APIFailure(success: Boo... | mit |
tulios/kafkajs | src/consumer/offsetManager/__tests__/isInvalidOffset.spec.js | 809 | const isInvalidOffset = require('../isInvalidOffset')
describe('Consumer > OffsetMananger > isInvalidOffset', () => {
it('returns true for negative offsets', () => {
expect(isInvalidOffset(-1)).toEqual(true)
expect(isInvalidOffset('-1')).toEqual(true)
expect(isInvalidOffset(-2)).toEqual(true)
expect(... | mit |
CS2103JAN2017-F14-B3/main | src/test/java/onlythree/imanager/model/task/NameTest.java | 1653 | package onlythree.imanager.model.task;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
public class NameTest {
//@@author A0140023E
@Test
public void isValidName_invalidName_falseReturned() {
assertFalse(Name.isValidName("")); // empt... | mit |
mathiasbynens/unicode-data | 4.0.1/blocks/Tai-Le-regex.js | 108 | // Regular expression that matches all symbols in the Tai Le block as per Unicode v4.0.1:
/[\u1950-\u197F]/; | mit |
yunta-mb/dashboard | config/application.rb | 1046 | require File.expand_path('../boot', __FILE__)
require 'rails/all'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env)
module Dashboard
class Application < Rails::Application
# Settings in config/environments/* take ... | mit |
tonikarttunen/tonikarttunen-com | src/components/MenuToggle/MenuToggle.js | 991 | // MenuToggle
import React from 'react/addons';
import styles from './MenuToggle.less';
import withStyles from '../../decorators/withStyles';
import MenuActions from '../../actions/MenuActions';
const MenuToggleInternal = React.createClass({
propTypes: {
isOpen: React.PropTypes.bool
},
getDefaultProps: () ... | mit |
rahulpneo/symfonyAdminPanel | app/cache/prod/twig/42/4248f4ac595644236d0b2658b3857e212e06b90dc2cf79527627d754342203fa.php | 1385 | <?php
/* @Framework/Form/range_widget.html.php */
class __TwigTemplate_8800f2ed6e14f89deae53b0e4e79f2b5ddd9269e85bf269ac16b7c74c70bbbb7 extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = array(... | mit |
chjj/dilated | lib/utils.js | 3094 | /**
* dilated: utils.js
* Copyright (c) 2011-2014, Christopher Jeffrey (MIT License)
*/
/**
* Utilities
*/
var crypto = require('crypto');
exports.hash = function(str) {
return crypto
.createHash('sha256')
.update(str)
.digest('hex');
};
exports.escapeHTML = function(html, once) {
return (html ... | mit |
SYCstudio/OI | Practice/2018/2018.7.30/BZOJ5130.cpp | 961 | #include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<algorithm>
using namespace std;
#define ll long long
#define mem(Arr,x) memset(Arr,x,sizeof(Arr))
const int maxN=14;
const int Mod=998244353;
const int inf=2147483647;
int n,m;
int St[maxN],Next[maxN];
int Ans=0,Cnt[maxN];
void dfs(int... | mit |
vicobu/DistributedSystem | src/main/scala/actors/node/protocol/how/HowAlgorithm.scala | 860 | /**
* @author Victor Caballero (vicaba)
* @author Xavier Domingo (xadobu)
*/
package actors.node.protocol.how
/**
* HowAlgorithm companion object. Defines three actions with the transactions.
* Active: execute the transaction and replicate the result.
* Passive: Replicate the transaction and execute it.
* Core... | mit |
EconocomGrenoble/MvvX.Plugins.Open-XML-SDK | src/OpenXMLSDK.Engine/Word/ReportEngine/Models/UniformGrid.cs | 1245 | namespace OpenXMLSDK.Engine.Word.ReportEngine.Models
{
/// <summary>
/// Uniform Grid
/// </summary>
public class UniformGrid : Table
{
/// <summary>
/// Model of each cell
/// </summary>
public Cell CellModel { get; set; }
/// <summary>
/// Indicate... | mit |
ahansb/BeerApp | Source/Data/BeerApp.Data.Models/VoteType.cs | 146 | namespace BeerApp.Data.Models
{
public enum VoteType
{
Negative = -1,
Neutral = 0,
Positive = 1
}
} | mit |
tijhaart/webpack-foundation | src/components/todo/todo-editor/todo-editor.controller.js | 3178 | import Rx from 'rx';
import _ from 'lodash';
import u from 'updeep';
import angular from 'angular';
import classNames from 'classnames';
export default class TodoEditorController {
constructor($ngRedux, $element, $scope, TodoDataService) {
'ngInject';
const ctrl = this;
activate();
function activa... | mit |
davidlung/vection | src/Common/ArrayObject.php | 8021 | <?php
namespace Vection\Common;
/**
* Class ArrayObject
* @package Vection\Common
*/
class ArrayObject implements \ArrayAccess, \JsonSerializable, \Serializable, \Countable
{
/** @var array */
protected $data;
/**
* ArrayObject constructor.
* @param array $data
*/
public function __... | mit |
hiendv/octicons-modular | packages/octicons-modular/es/icons/telescope.js | 593 | import factory from '../octicon.js';
// This is an auto-generated ES2015 icon from the modularize script. Please do not modify this file.
var telescope = factory('telescope', 14, 16, {"fill-rule":"evenodd","d":"M8 9l3 6h-1l-2-4v5H7v-6l-2 5H4l2-5 2-1zM7 0H6v1h1V0zM5 3H4v1h1V3zM2 1H1v1h1V1zM.63 9a.52.52 0 0 0-.16.67l.55... | mit |
jiadaizhao/LeetCode | 0501-0600/0552-Student Attendance Record II/0552-Student Attendance Record II.cpp | 1624 | class Solution {
public:
int checkRecord(int n) {
int dp[1 + n][2][3] = {1, 1, 1, 1, 1, 1};
int m = 1000000007;
for (int i = 1; i <= n; ++i) {
for (int j = 0; j <= 1; ++j) {
for (int k = 0; k <= 2; ++k) {
int val = dp[i - 1][j][2]; // P
... | mit |
koobonil/Boss2D | Boss2D/addon/webrtc-jumpingyang001_for_boss/modules/video_coding/video_sender_unittest.cc | 18367 | /*
* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contribut... | mit |
DiabHelp/DiabHelp-Website | src/DH/APIBundle/Controller/ProchePatientController.php | 15175 | <?php
namespace DH\APIBundle\Controller;
use DH\APIBundle\Entity\ProchePatientLink;
use DH\APIBundle\Controller\CommonController;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Serializer\Enco... | mit |
Azure/azure-sdk-for-go | services/preview/logic/mgmt/2018-07-01-preview/logic/integrationaccountcertificates.go | 17808 | package logic
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
... | mit |
bitcake/bitstrap | Assets/Editor/Inspector/ScriptTemplate/ScriptTemplatePreferences.cs | 2501 | using UnityEditor;
using UnityEngine;
namespace BitStrap
{
/// <summary>
/// Draws the preferences for editor script templates (<see cref="ScriptTemplatePreference"/>).
/// This class also provides access to the defined templates as well as other settings from
/// its static properties.
/// To use script templat... | mit |
SkillsFundingAgency/das-employerapprenticeshipsservice | src/SFA.DAS.EmployerAccounts.Web.UnitTests/Controllers/EmployerAccountControllerTests/GatewayInform/When_I_Call_GatewayInform_Without_HashedAccountId.cs | 3395 | using System.Diagnostics.CodeAnalysis;
using System.Net;
using System.Web.Mvc;
using System.Web.Routing;
using MediatR;
using Moq;
using NUnit.Framework;
using SFA.DAS.Authentication;
using SFA.DAS.Authorization;
using SFA.DAS.EmployerAccounts.Interfaces;
using SFA.DAS.EmployerAccounts.Web.Controllers;
using SFA.DAS.E... | mit |
mojo00/TicTacToe-Java | CPUPlayer.java | 1578 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
* CPU player class. Implements Player interface.
* Does not find best move. Chooses random move.
*
*
* @author jkwong
*/
import java.util.Scanner;
import java.util.ArrayList;
import java.util.Random;
pu... | mit |
ernieyu/pfcviewer | src/pfc/export/ExportException.java | 1689 | /*
* Copyright (c) 2002 Ernest Yu. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to
* deal in the Software without restriction, including without limitation the
* rights to use, copy, ... | mit |
johnnoone/salt-targeting | src/salt/targeting/rules.py | 11990 | '''
salt.targeting.rules
~~~~~~~~~~~~~~~~~~~~
'''
from abc import abstractmethod
import logging
log = logging.getLogger(__name__)
from salt.utils.matching import glob_match, pcre_match, pcre_compile, ipcidr_match
__all__ = [
'Rule',
'AllRule',
'AnyRule',
'NotRule',
'GlobRule',
'PCRERule',
... | mit |
baptiste333/le-drone | php/membre.php | 236 | <?php
/* Redirection de la personne en fonction de si elle est connecté ou non */
session_start();
if(isset($_SESSION['login'])) {
header('Location: ../profil.php');
} else {
header('Location: ../connection.php');
}
?> | mit |
olark/txroutes | txroutes/__init__.py | 8046 | import logging
import routes
from twisted.internet.defer import Deferred, inlineCallbacks
from twisted.web.resource import Resource
from twisted.web.server import NOT_DONE_YET
from twisted.python.failure import Failure
DEFAULT_404_HTML = '<html><head><title>404 Not Found</title></head>' \
'<body><h1>Not found... | mit |
kedromelon/babel | packages/babel-polyfill/src/core-js/modules/es6.number.max-safe-integer.js | 56 | require("core-js/modules/es6.number.max-safe-integer");
| mit |
mllnd/Java-Paint | src/main/java/xyz/mllnd/javapaint/JavaPaint.java | 4704 | package main.java.xyz.mllnd.javapaint;
import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.Line2D;
import java.util.Vector;
public class JavaPaint extends Applet implements MouseListener, MouseMotionListener {
/**
* Add listeners and buttons to the frame
*/
J... | mit |
vainyl/doctrine-orm-bridge | src/DoctrineEntityManager.php | 6124 | <?php
/**
* Vainyl
*
* PHP Version 7
*
* @package Doctrine-ORM-Bridge
* @license https://opensource.org/licenses/MIT MIT License
* @link https://vainyl.com
*/
declare(strict_types=1);
namespace Vainyl\Doctrine\ORM;
use Doctrine\Common\EventManager;
use Doctrine\Common\Persistence\Mapping\MappingExcep... | mit |
freeuni-sdp/arkanoid-16 | src/main/java/ge/edu/freeuni/sdp/arkanoid/model/geometry/Size.java | 1192 | package ge.edu.freeuni.sdp.arkanoid.model.geometry;
public class Size {
private int _width;
private int _height;
public Size(int width, int height) {
if (width < 0) throw new IllegalArgumentException("width");
if (height < 0) throw new IllegalArgumentException("height");
_width = ... | mit |
jordanams/lunchr | lunchr_extranet/app/view/menu/update_produit.php | 2419 | <?php include_once('../app/view/include/header.inc.php'); ?>
<div class="col-lg-12">
<h1> Administration des cartes / menus / produits</h1>
<br/>
<?php include_once('../app/view/include/header_carte_menu.inc.php'); ?>
<br/>
<?php echo 'Restaurant sélectionné :  ... | mit |
xzrunner/easyeditor | easydb/src/easydb/SearchList.cpp | 3127 | #include "SearchList.h"
#include "Database.h"
#include "MainList.h"
#include "LeafNode.h"
#include "IndexNode.h"
#include <easyimage.h>
#include <ee/SymbolFile.h>
#include <sprite2/SymType.h>
#include <gum/FilepathHelper.h>
namespace edb
{
BEGIN_EVENT_TABLE(SearchList, wxTreeCtrl)
EVT_TREE_ITEM_ACTIVATED(ID_CTRL,... | mit |
narekps/ZfbUser | src/Adapter/Factory/DbAdapterFactory.php | 1349 | <?php
namespace ZfbUser\Adapter\Factory;
use Interop\Container\ContainerInterface;
use Zend\ServiceManager\Factory\FactoryInterface;
use ZfbUser\Adapter\DbAdapter;
use ZfbUser\Mapper\UserMapperInterface;
use ZfbUser\Options\ModuleOptions;
use ZfbUser\Repository\UserRepositoryInterface;
/**
* Class DbAdapterFactory
... | mit |
yyssc/ssc-grid | docs/examples/TreeBasic.js | 2247 | const treeData = [
{
'title': '0-0-label',
'key': '0-0-key',
'children': [
{
'title': '0-0-0-label',
'key': '0-0-0-key',
'children': [
{
'title': '0-0-0-0-label',
'key': '0-0-0-0-key'
},
{
'title': '0-0-0-1-lab... | mit |
fengnovo/webpack-react | zhihu/src/js/Reddit/reducers.js | 1331 | import { combineReducers } from 'redux'
import {
SELECT_SUBREDDIT, INVALIDATE_SUBREDDIT ,
REQUEST_POSTS, RECEIVE_POSTS
} from './actions'
function selectedSubreddit(state = 'reactjs', action) {
switch (action.type) {
case SELECT_SUBREDDIT:
return action.subreddit
default:
return state
}
}
... | mit |
dokaptur/coreutils | src/fmt/parasplit.rs | 22192 | /*
* This file is part of `fmt` from the uutils coreutils package.
*
* (c) kwantam <kwantam@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use core::iter::Peekable;
use std::io::Lines;
use std::slice::Items;
use std::s... | mit |
zfang399/LeetCode-Problems | 69.cpp | 268 | class Solution {
public:
int mySqrt(int x) {
long long f=0,r=x,mid;
while(f<=r){
mid=(f+r)/2;
if(mid*mid==x) return mid;
else if(mid*mid>x) r=mid-1;
else f=mid+1;
}
return r;
}
};
| mit |
senthilnayagam/training-ruby | nithya/13sep/hello.rb | 1561 | require 'rubygems'
require 'bundler/setup'
require 'sinatra'
require 'mysql'
require '/home/nithya/training-ruby/nithya/13sep/dbclass'
get '/hi' do
"Hello World!"
end
get '/time' do
Time.now.to_s
end
get '/hello' do
name = params[:name]
"hello "+name.to_s
end
get '/your_result' do
#~ db_conn = Mysql.new('localh... | mit |
YaniLozanov/Software-University | C#/04. Database Module/02. Databases Advanced - Entity Framework/07. Best Practices and Architecture/Photo Share System/PhotoShare.Client/Core/Commands/LogoutCommand.cs | 1076 | using PhotoShare.Client.Core.Commands.Contracts;
using PhotoShare.Services.Contracts;
using System;
namespace PhotoShare.Client.Core.Commands
{
public class LogoutCommand : ICommand
{
private IUserSessionService userSessionService;
private IUserService userService;
public LogoutComman... | mit |
anothergbr/a-cat-named-nyan | src/test/java/com/gbr/nyan/appdirect/SubscriptionEventServiceChangeTest.java | 2330 | package com.gbr.nyan.appdirect;
import com.gbr.nyan.appdirect.entity.SubscriptionEvent;
import com.gbr.nyan.appdirect.entity.SubscriptionResponse;
import com.gbr.nyan.domain.Account;
import com.gbr.nyan.domain.AccountRepository;
import com.gbr.nyan.domain.UserRepository;
import org.junit.Before;
import org.junit.Test;... | mit |
kevinali1/Pdf-Scraper | pdfscraper/toolkit/management/commands/scrape.py | 4213 | from optparse import make_option
from django.core.management.base import BaseCommand, CommandError
from django.db.models import Avg, Max, Min, Count, Sum, StdDev
import subprocess
import os
import calendar as cal
import copy
from django.conf import settings
from django.template.defaultfilters import slugify
from django... | mit |
eemece2/angular-bpmn | karma.conf.js | 2184 | // Karma configuration
// Generated on Fri May 01 2015 21:34:16 GMT+0200 (CEST)
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/... | mit |
ptownsend1984/SampleApplications | GMailLabelCleanup/GMailLabelCleanup/App_Start/BundleConfig.cs | 1669 | using System.Web;
using System.Web.Optimization;
namespace GMailLabelCleanup
{
public class BundleConfig
{
// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
public static void RegisterBundles(BundleCollection bundles)
{
bundles.Add(new... | mit |
Rohitbels/KolheshwariIndustries | app/routes.js | 2979 | // These are the pages you can go to.
// They are all wrapped in the App component, which should contain the navbar etc
// See http://blog.mxstbr.com/2016/01/react-apps-with-pages for more information
// about the code splitting business
import { getAsyncInjectors } from './utils/asyncInjectors';
const errorLoading = ... | mit |
ctufo/angular2 | app/service/mock.jumbo.js | 343 | "use strict";
exports.JUMBODATA = [
{
id: 0,
item: 'home',
link: 'home',
red: false
}, {
id: 0,
item: 'Photo',
link: 'Photo',
red: false
}, {
id: 0,
item: 'Work',
link: 'Work',
red: false
}
];
//# sourceMappi... | mit |
iiED-csumb/hackmb-partyon | backend/html/createNotification.php | 758 | <?php
include_once 'db_connect.php';
include_once 'notification.php';
$FBID = '';
$inviteId = '';
$type = '';
$startDate = '';
$data = '';
if (array_key_exists ('FBID' , $_GET )) {
$FBID = $_GET['FBID'];
}
if (array_key_exists ('inviteId' , $_GET )) {
$inviteId = $_GET['inviteId'];
}
if (array_key_exists (... | mit |
BankOfGiving/Bog.net | Bog.Data.EntityFramework/Properties/AssemblyInfo.cs | 1378 | using System.Reflection;
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("Bog.Data.EntityFramework")]
[assembly: As... | mit |
brakmic/BiB | src/app/reducers/stats/index.ts | 71 | export {
statsReducer,
STATS_CHANGED
} from './stats.reducer';
| mit |
christianmemije/kolibri | kolibri/content/utils/paths.py | 3735 | import os
import re
from django.conf import settings
from django.core.urlresolvers import reverse
try:
from urlparse import urljoin
except ImportError:
from urllib.parse import urljoin
# valid storage filenames consist of 32-char hex plus a file extension
VALID_STORAGE_FILENAME = re.compile("[0-9a-f]{32}(-d... | mit |
concord-consortium/codap | apps/dg/controllers/app_controller.js | 42429 | // ==========================================================================
// DG.appController
//
// Copyright (c) 2014 by The Concord Consortium, Inc. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in complia... | mit |
WonbaeLee/cmoa | cmoa/src/main/java/com/itwill/cmoa/model/dao/TheBlogDao.java | 3863 | package com.itwill.cmoa.model.dao;
import java.util.List;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Repository;
import com.itwill.cmoa.model... | mit |
GreenfieldTech/irked | src/test/java/tech/greenfield/vertx/irked/TestFieldController.java | 3113 | package tech.greenfield.vertx.irked;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.nullValue;
import static tech.greenfield.vertx.irked.Matchers.*;
import org.junit.jupiter.api.BeforeEach;
i... | mit |
ginach/msgraph-sdk-dotnet | src/Microsoft.Graph/Requests/Generated/BaseItemRequest.cs | 8486 | // ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
/... | mit |
ifanjuang/themes | TLDR/sidebar.php | 1668 |
<?php
$PTs= get_post_types(array('_builtin'=>false));
foreach ($PTs as $post_type) {
if( is_post_type_hierarchical($post_type) ) $HPTs[]=$post_type;
else $IPTs[] = $post_type;
}
$output = '<nav id="nav-container" class="nav-container">';
$output .= '<div class="navDiv">';
$output.= '<ul class="navlist toP... | mit |
Julien35/dev-courses | 3wacademyCourses/DéveloppementJS/Movies (départ) full JS/data.js | 1020 | var movies = {
'movie-1': {
'title': 'X-Men: Days of Future Past',
'duration': 124,
'cover': 'xmen.jpg'
},
'movie-2': {
'title': 'Grace de Monaco',
'duration': 96,
'cover': 'grace.jpg'
},
'movie-3': {
'title': 'Captain America 2',
'dura... | mit |
Bedrock02/rainy_buckets | rainy_home/models.py | 2362 | from django.db import models
from django.contrib.auth.models import User
from datetime import datetime, timedelta
from django.core.exceptions import ObjectDoesNotExist
import uuid
class CollectorManager(models.Manager):
@staticmethod
def collector_from_user(user_id):
try:
return Collector.objects.get(u... | mit |
almadaocta/lordbike-production | app/code/core/Mage/AdminNotification/sql/adminnotification_setup/mysql4-install-1.0.0.php | 1850 | <?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
* If you did not re... | mit |
williamccondori/UPT.BOT | UPT.BOT.Presentacion.Web.Administracion/Angular/Factories/Configuracion/UsuarioFactory.js | 842 | (function (module) {
UsuarioFactory.$inject = ["$resource"];
function UsuarioFactory($resource) {
var GestionController = [];
GestionController.ObtenerUsuario = function () {
return $resource('/Configuracion/ObtenerUsuario', {}, {
Get: {
metho... | mit |
roseweixel/blogger | db/migrate/20150512172518_create_memberships.rb | 201 | class CreateMemberships < ActiveRecord::Migration
def change
create_table :memberships do |t|
t.integer :user_id
t.integer :cohort_id
t.timestamps null: false
end
end
end
| mit |
oleander/show-time | app/lib/languages.js | 536 | export default {
keys: function(){
var keys = [];
for(var language in this.content) {
keys.push(language);
}
return keys;
},
values: function(){
var values = [];
for(var language in this.content) {
values.push(this.content[language]);
}
return values;
},
content: ... | mit |
patatoid/notify | app/models/notify/notification.rb | 106 | module Notify
class Notification < ActiveRecord::Base
serialize :user
serialize :result
end
end
| mit |
kottenator/my-little-blog | src/project/core/apps.py | 124 | from django.apps.config import AppConfig
class CoreConfig(AppConfig):
name = 'project.core'
verbose_name = 'Core'
| mit |
rpeev/apivis | src/index.universal.js | 65 | import apivis from './universal/apivis';
export default apivis;
| mit |
fvcproductions/BITS | Python/RSAPublicKeyAlgorithm_Program4.py | 1452 | '''
FVCproductions
RSAPublicKeyAlgorithm_Program4.py
Discrete Structures
November 2014
Written in Python 2.7
'''
# simplified values for RSA Public Key Algorithm
# published in 5.4.2
p = 23
q = 31
n = 29
z = p*q
h = (p-1)*(q-1) # phi symbol
s = 569
# encryption method
def encrypt(aString):
chars = [... | mit |
mjmarianetti/computer-science | examples/algorithms/kmp.js | 172 | const KMP = require('../../index').KMP;
let str = "ABCABCABCABCABC",
pat = "ABC";
console.log("String: " + str);
console.log("Pattern: " + pat);
KMP.resolve(str, pat);
| mit |
nbwsc/leetcode | adventofcode/1206.js | 1977 | const fs = require('fs');
const input = fs
.readFileSync('input/1206')
.toString()
.trim();
// const input = `1, 1
// 1, 6
// 8, 3
// 3, 4
// 5, 5
// 8, 9`;
function getDist(x, y, point) {
return Math.abs(x - point[0]) + Math.abs(y - point[1]);
}
const points = input.split('\n').map(row => row.split(', ').map... | mit |
boggad/jdk9-sample | sample-catalog/spring-jdk9/src/spring.messaging/org/springframework/messaging/core/DestinationResolver.java | 1244 | /*
* Copyright 2002-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ap... | mit |
Granary/granary2 | granary/cfg/block.cc | 11332 | /* Copyright 2014 Peter Goodman, all rights reserved. */
#define GRANARY_INTERNAL
#include "granary/base/option.h"
#include "granary/cfg/block.h"
#include "granary/cfg/trace.h"
#include "granary/cfg/factory.h"
#include "granary/cfg/instruction.h"
#include "granary/app.h" // For `AppMetaData`.
#include "granary/cac... | mit |
ringcentral/ringcentral-js-widget | packages/babel-settings/lib/register.js | 137 | require('@babel/register')({
extensions: ['.js', '.jsx', '.ts', '.tsx', '.mjs'],
ignore: [/node_modules/],
rootMode: 'upward',
});
| mit |
sanborino/clinica | src/Asi/ClinicaBundle/Controller/ReporteController.php | 1032 | <?php
namespace Asi\ClinicaBundle\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Asi\ClinicaBundle\Entity\Cita;
use Symfony\Component\HttpFoundation\Response;
use Knp\SnappyBundle;
/**
* Reporte controller.
*
*/
class Repor... | mit |
xy2041/GmailNotifierClone | Classes/Settings.cs | 1502 | using System;
using System.Collections.Generic;
using System.Linq;
namespace GmailNotifierClone
{
public class Settings
{
public String Login { get; set; }
public String Password { get; set; }
public bool IsNeedToSaveAuth { get; set; }
private ... | mit |
krayush/angularjs-cdn | src/app/app.module.ts | 1267 | // Core Modules Section
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import 'rxjs/Rx';
// Routing Section
import { AppRou... | mit |
tehoko/lane | public_html/js/jquery.focuslost.js | 1029 | $(function()
{
// will store the last focus chain
var currentFocusChain = $();
// stores a reference to any DOM objects we want to watch focus for
var focusWatch = [];
function checkFocus()
{
var newFocusChain = $(':focus').parents().andSelf();
// elements in the old focus chain that aren't in the new focus ... | mit |
yogeshsaroya/new-cdnjs | ajax/libs/mediaelement/2.4.0/mediaelement-and-player.min.js | 130 | version https://git-lfs.github.com/spec/v1
oid sha256:05d6bd0c63b3b5b2e12375741bf9e0fdacc901d1df6a72fa50ac73db27fa8442
size 55080
| mit |
microlv/vscode | src/vs/workbench/parts/extensions/common/extensions.ts | 4247 | /*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*---------------------------------------------------------------... | mit |
kencookco/spring-sharpspring-api | src/test/java/com/kencook/sharpspring/SharpspringOperationsTest.java | 1427 | package com.kencook.sharpspring;
import com.kencook.sharpspring.responses.GetEventsResponse;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4... | mit |
tbetbetbe/reel | lib/reel/version.rb | 60 | module Reel
VERSION = "0.6.0"
CODENAME = "Garland"
end
| mit |
la-haute-societe/yii2-save-relations-behavior | tests/models/User.php | 1441 | <?php
namespace tests\models;
use lhs\Yii2SaveRelationsBehavior\SaveRelationsBehavior;
use lhs\Yii2SaveRelationsBehavior\SaveRelationsTrait;
class User extends \yii\db\ActiveRecord
{
use SaveRelationsTrait;
/**
* @inheritdoc
*/
public static function tableName()
{
return 'user';
... | mit |
lingtalfi/bee | bee/modules/BeeSandBox/Language/Parser/ParseTree/ParseTree.php | 1172 | <?php
/*
* This file is part of the Bee package.
*
* (c) Ling Talfi <lingtalfi@bee-framework.org>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace BeeSandBox\Language\Parser\ParseTree;
use BeeSandBox\Language\Parser\Exc... | mit |
ministryofjustice/defence-request-service-rota | spec/controllers/organisations_controller_spec.rb | 1646 | require "rails_helper"
RSpec.describe OrganisationsController do
before do
sign_in(create(:admin_user))
end
describe "POST create" do
it "saves the organisation and redirects to index" do
stub_organisation method: :save, return_value: true
post :create, organisation: organisation_params
... | mit |
caesarius1187/contasynfotech | app/Model/Conveniocolectivotrabajo.php | 1271 | <?php
App::uses('AppModel', 'Model');
/**
* Conveniocolectivotrabajo Model
*
* @property Impcli $Impcli
* @property Cctxconcepto $Cctxconcepto
*/
class Conveniocolectivotrabajo extends AppModel {
//The Associations below have been created with all possible keys, those that are not needed can be removed
public ... | mit |
tristan-reeves/SharpConfig | SharpConfig/Properties/AssemblyInfo.cs | 1295 | // The MIT License (MIT)
//
// Copyright (c) 2014 Tristan Reeves
//
// 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 us... | mit |
kodmunki/ku4js-webApp | src/factories/valiatorFactory.js | 271 | function validatorFactory(config) {
this._config = config;
}
validatorFactory.prototype = {
create: function(key) { return $.ku4webApp.validator(this._config[key]); }
};
$.ku4webApp.validatorFactory = function(config) {
return new validatorFactory(config);
}; | mit |
weew/validator | tests/Weew/Validator/Constraints/ForbiddenSubsetConstraintTest.php | 1283 | <?php
namespace Tests\Weew\Validator\Constraints;
use PHPUnit_Framework_TestCase;
use Weew\Validator\Constraints\ForbiddenSubsetConstraint;
class ForbiddenSubsetConstraintTest extends PHPUnit_Framework_TestCase {
public function test_check() {
$c = new ForbiddenSubsetConstraint([true, '1']);
$thi... | mit |
arrow-/phoenix | api/python2/src/botapi.py | 2732 | from json import loads, dumps
import sys
class game:
def __init__(self, name):
self.game_state = loads(raw_input())
self.name = name
self.move_obj = {}
for bot in self.game_state['bots']:
if bot['botname'] == self.name:
self.move_obj[bot['childno']] = {
... | mit |
ChillyFlashER/OpenInput | src/OpenInput/Mechanics/InputSystem.cs | 4465 | namespace OpenInput.Mechanics
{
using OpenInput.Trackers;
using System;
using System.Collections.Generic;
public struct InputAction
{
public readonly string Name;
public readonly InputKey Key;
/// <summary>
/// Initialize a new <see cref="InputAction"/> structure.
... | mit |
CCU-CSIE-SmartCafe/Backend | app/Http/Controllers/Auth/RegisterController.php | 3460 | <?php
namespace SmartCafe\Http\Controllers\Auth;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use SmartCafe\Exceptions\ValidateFail;
use SmartCafe\Http\Requests;
use SmartCafe\Http\Controllers\Controller;
use SmartCafe\User;
use Validator;
class RegisterController extends Controller
{
public fu... | mit |