repo_name stringlengths 4 116 | path stringlengths 4 379 | size stringlengths 1 7 | content stringlengths 3 1.05M | license stringclasses 15
values |
|---|---|---|---|---|
DJBuro/Telerik | JavaScriptFund/ArrayMethods/Problem3.UnderagePeople/js/script.js | 1303 | taskName = "Problem 3. Underage people";
function Main(bufferElement) {
var people,
result;
people = makePeople(10);
result = people.filter(function (item) {
return item.age >= 18;
});
result.forEach(function(item) {
item.print();
});
function makePerson(fname, l... | mit |
kubatyszko/gitea | models/migrations/v45.go | 834 | // Copyright 2017 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package migrations
import (
"code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/setting"
"github.com/go-xorm/xorm"
)
func removeIndexColumnF... | mit |
minibhati93/drawing-app-ionic | platforms/ios/www/plugins/nl.x-services.plugins.toast/test/tests.js | 1850 | cordova.define("nl.x-services.plugins.toast.tests", function(require, exports, module) { exports.defineAutoTests = function() {
var fail = function (done) {
expect(true).toBe(false);
done();
},
succeed = function (done) {
expect(true).toBe(true);
done();
};
describe('Plugin availability', fu... | mit |
maurer/tiamat | samples/Juliet/testcases/CWE78_OS_Command_Injection/s04/CWE78_OS_Command_Injection__char_listen_socket_execl_73a.cpp | 5815 | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE78_OS_Command_Injection__char_listen_socket_execl_73a.cpp
Label Definition File: CWE78_OS_Command_Injection.strings.label.xml
Template File: sources-sink-73a.tmpl.cpp
*/
/*
* @description
* CWE: 78 OS Command Injection
* BadSource: listen_socket Read data usin... | mit |
ldaptools/ldaptools | src/LdapTools/Ldif/LdifParser.php | 21069 | <?php
/**
* This file is part of the LdapTools package.
*
* (c) Chad Sikorra <Chad.Sikorra@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace LdapTools\Ldif;
use LdapTools\Connection\LdapControl;
use LdapTools\E... | mit |
whyleee/Raiden | GameStore/static/app.js | 87 | import 'bootstrap/dist/css/bootstrap.min.css';
import './app.css';
import 'bootstrap'
| mit |
influencetech/ivx-js | examples/basic-analytics-experience/config/multiple-tracker/states/input-scene-test/events/_settings.js | 211 | import onInputReady from "./_settings.on-input-ready.js";
import onEnter from "./_settings.on-enter.js";
import onExit from "./_settings.on-exit.js";
export default {
onInputReady,
onEnter,
onExit
} | mit |
chrishtanaka/architect | src/Creational/FactoryMethod/CreatorVariation.cs | 166 | using System;
namespace FactoryMethod
{
public abstract class CreatorVariation
{
public abstract IProduct FactoryMethod(string productId);
}
}
| mit |
zwhite/keyholer | keyholer/client.py | 1889 | #!/usr/bin/env python
from socket import socket, AF_UNIX, SOCK_STREAM
from keyholer import conf
class KeyholerException(Exception):
pass
class KeyholerClient(object):
"""
Class for interacting with the keyholer backend.
"""
def __init__(self, sock=conf['socket']):
self.s = None
... | mit |
janng0/Android-J0Util | src/main/java/ru/jango/j0util/PathUtil.java | 5045 | /*
* The MIT License Copyright (c) 2014 Krayushkin Konstantin (jangokvk@gmail.com)
*
* 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... | mit |
firepick1/firenodejs | www/js/app.js | 1537 | 'use strict';
// Declare app level module which depends on filters, and services
angular.module('firenodejs', [
'ui.bootstrap',
'ngRoute',
// 'firenodejs.filters',
'firenodejs.services',
// 'firenodejs.directives',
'firenodejs.controllers',
'd3',
'd3AngularApp',
]).
config(['$routePro... | mit |
activecollab/databasestructure | test/src/ScalarFields/RequiredJsonSerializationTest.php | 3624 | <?php
/*
* This file is part of the Active Collab DatabaseStructure project.
*
* (c) A51 doo <info@activecollab.com>. All rights reserved.
*/
namespace ActiveCollab\DatabaseStructure\Test\ScalarFields;
use ActiveCollab\DatabaseObject\Exception\ValidationException;
use ActiveCollab\DatabaseObject\Pool;
use Active... | mit |
noderaider/localsync | packages/localsync-core/src/utils/createLogger.ts | 1023 | import { Options, LogLevel, Logger } from "../types";
import { supportsLevelFactory } from "./supportsLevelFactory";
/**
* Creates a logger used in this instance of localsync.
*
* @param options The options object used to configure this instance of localsync.
*/
export const createLogger = (options: Options): Logg... | mit |
wbenmurimi/ash-SE-2015-group8 | ash-SE-2015-group8/pages/logout.php | 179 | <?php
session_start();
session_destroy();
echo "Logged out succesfully";
$message=$_SESSION['error']='Logged out succesfully';
header("location:login.php?error=$message")
?> | mit |
duivvv/generator-module-boilerplate | generators/app/templates/rollup.config.js | 666 | import babel from 'rollup-plugin-babel';
import nodeResolve from 'rollup-plugin-node-resolve';
import uglify from 'rollup-plugin-uglify';
import filesize from 'rollup-plugin-filesize';
import commonjs from 'rollup-plugin-commonjs';
const name = `<%= ccname %>`;
const plugins = [
babel(),
nodeResolve({
module:... | mit |
Screeder/SAssemblies | SStandalones/SDetectors/SRecallDetector/Program.cs | 7556 | using System;
using System.Collections.Generic;
using System.Drawing;
using System.Reflection;
using System.Threading;
using LeagueSharp.Common;
using LeagueSharp.SDK.Core.UI;
using SAssemblies.Detectors;
namespace SAssemblies
{
internal class MainMenu : Menu
{
public static MenuItemSettings Detector ... | mit |
Mobytes/landpage | src/Mobytes/Landpage/Controllers/LandPageController.php | 878 | <?php
/*
*
* * Copyright (C) 2015 eveR Vásquez.
* *
* * 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
* *
* * Unle... | mit |
maritaria/UnityReader | UnityReader/Types/Quaternion.cs | 257 | using System;
using System.Collections.Generic;
using System.Linq;
namespace UnityReader.Types
{
public class Quaternion
{
public float X { get; set; }
public float Y { get; set; }
public float Z { get; set; }
public float W { get; set; }
}
} | mit |
nicolasmsg/react-blog | src/actions/index.js | 1033 | import axios from 'axios';
export const FETCH_POSTS = 'fetch_posts';
export const CREATE_POST = 'create_post';
export const FETCH_POST = 'fetch_post';
export const DELETE_POST = 'delete_post';
const ROOT_URL = "http://reduxblog.herokuapp.com/api";
const API_KEY = "?key=PAAsdfsdfsRRREE";
export function fetchPosts()... | mit |
fweber1/Annies-Ancestors | add/php/testName.php | 6287 | <?php
error_reporting(E_ALL);
ini_set('display_errors', true);
date_default_timezone_set('EST5EDT'); // need to set time zone of server for date --> epoch time
$error = 'pending';
$response = array();
$returnStr = array();
include dirname(__FILE__) . "/../../php/database.php";
$link = mysqli_connect($host,$use... | mit |
TTtie/TTtie-Bot | commands/userinfo.js | 4432 | /**
* Copyright (C) 2020 tt.bot dev team
*
* This file is part of tt.bot.
*
* tt.bot is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any ... | mit |
ScottLogic/bitflux-openfin | webpack/webpack.config.shared.js | 970 | module.exports = {
entry: {
child: ['babel-polyfill', './src/child/index.js'],
parent: ['babel-polyfill', './src/parent/parent.js'],
analytics: ['./src/parent/analytics/analytics.js']
},
output: {
filename: './[name]_bundle.js'
},
module: {
rules: [
... | mit |
artsy/force-public | src/desktop/apps/partner2/test/routes.test.js | 2066 | /*
* decaffeinate suggestions:
* DS102: Remove unnecessary code created because of implicit returns
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
const { fabricate } = require("@artsy/antigravity")
const _ = require("underscore")
const sinon = require("sinon")
const Ba... | mit |
Tropicalista/axisJS | src/app/head/head.controller.js | 635 | /**
* @ngdoc function
* @name AxisJS.controller:HeadController
* @description
* # HeadController
* Adds stylesheets, fonts and other stuff in the `<head>` section.
*/
(function() {
'use strict';
angular
.module('axis')
.controller('HeadController', HeadController);
/** @ngInject */
function Hea... | mit |
redding/ns-options | test/unit/option_tests.rb | 16143 | require 'assert'
require 'ns-options/option'
require 'ns-options/boolean'
class NsOptions::Option
class BaseTests < Assert::Context
desc "NsOptions::Option"
setup do
@rules = { :default => "development" }
@option = NsOptions::Option.new(:stage, nil, @rules)
end
subject{ @option }
s... | mit |
redding/ns-options | test/system/user_tests.rb | 4187 | require 'assert'
require 'ns-options/assert_macros'
require 'test/support/user'
class User
class BaseTests < Assert::Context
include NsOptions::AssertMacros
desc "the User class"
setup do
@class = User
end
subject{ @class }
should have_reader :preferences
end
class ClassPrefer... | mit |
jeremybuis/bearded-octo-archer | src/main/webapp/resources/js/aloha-config.js | 747 | (function(window, undefined) {
var jQuery = window.jQuery;
if (window.Aloha === undefined || window.Aloha === null) {
window.Aloha = {};
}
window.Aloha.settings = {
bundles : {
common:"http://aloha-editor.org/aloha-0.20/plugins/common/"
},
logLevels: {'error': true, 'warn': true, 'info': true, 'debug': f... | mit |
rutgerkok/BlockLocker | src/main/java/nl/rutgerkok/blocklocker/impl/event/InteractListener.java | 20878 | package nl.rutgerkok.blocklocker.impl.event;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.Set;
import org.bukkit.Bukkit;
import org.bukkit.GameMode;
import org.bukkit.Material;
import org.bukkit.Tag;
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
im... | mit |
Invoiced/invoiced-go | errors.go | 398 | package invoiced
import (
"encoding/json"
)
type APIError struct {
Type string `json:"type"`
Message string `json:"message"`
Param string `json:"param"`
}
func NewAPIError(typeE, message, param string) *APIError {
err := &APIError{typeE, message, param}
return err
}
func (a *APIError) Error() string {
b... | mit |
CodePeasants/pyplan | tests/test_organizer.py | 3896 | import os
from functools import partial
import unittest
from plan.user import User
from plan.event import Event
from plan.organizer import Organizer
from plan.schedule import Schedule
from plan.time_range import TimeRange
from plan.member import Status
class TestOrganizer(unittest.TestCase):
def __init__(self, *... | mit |
sevmardi/University-of-Applied-Sciences-Leiden | IIAD/week5/queue/TestQueueDeque.java | 1390 | package week5.queue;
public class TestQueueDeque
{
public static void main(String args[])
{
ListQueue listqueue = new ListQueue();
listqueue.enqueue( "Een" );
listqueue.enqueue( "Twee" );
listqueue.enqueue( "Drie" );
System.out.println(listqueue.front().to... | mit |
matheuscarius/competitive-programming | codeforces/631-a.cpp | 642 | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
#define MAXN 1010
int f(int x[], int l, int r) {
int resp = 0;
for(int i = l; i <=r; i++)
resp |= x[i];
return resp;
}
int main () {
int n;
scanf("%d", &n);... | mit |
PieterD/crap | kafka/tools/kafka-producer/producer.go | 1318 | package main
import (
"bufio"
"bytes"
"flag"
"fmt"
"io"
"log"
"os"
"strings"
"github.com/PieterD/crap/kafka"
)
var (
fPeers = flag.String("peers", os.Getenv("ZOOKEEPER_PEERS"), "List of Zookeeper peer addresses (Defaults to ZOOKEEPER_PEERS env)")
fTopic = flag.String("topic", "", "Topic to send on")
... | mit |
createuniverses/praxis | luaCBLang.cpp | 2559 |
// Author: Greg "fugue" Santucci, 2011
// Email: thecodewitch@gmail.com
// Web: http://createuniverses.blogspot.com/
#include "luaCB.h"
int luaCBLisp(lua_State * L)
{
#ifdef __PRAXIS_WITH_LISP__
int n = lua_gettop(L);
if(n!=1) luaL_error(L, "1 argument expected.");
std::string sCode = luaL_checks... | mit |
cgvarela/passenger | build/cxx_tests.rb | 8007 | # Phusion Passenger - https://www.phusionpassenger.com/
# Copyright (c) 2010-2015 Phusion
#
# "Phusion Passenger" is a trademark of Hongli Lai & Ninh Bui.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal... | mit |
binofet/ice | Projects/Airhockey/Source/spinstate.cpp | 7088 | //////////////////////////////////////////////////////////////////////////////
// LOCAL INCLUDES
#include "spinstate.h"
#include "Core/IO/icInput.h"
#include "Math/icRand.h"
extern icVector2 bl;
extern icVector2 tl;
extern icVector2 tr;
extern icVector2 br;
SpinState::SpinState()
{
m_pTable = NULL;
m_pTa... | mit |
bsanchezdev/u_forms | U_.php | 7455 | <?php
/**
* Description of forms
*
* @author Benjamin Sanchez Cardenas
*/
include "u_encode.php";
class U_ extends u_encode{
public function load_jqueryCDN() {
$CI= &get_instance();
?>
<script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
<script src="//code.jquery.com... | mit |
abhilashreddyvemula/IOCL-Demo-v1 | app/pages/tabs/bayDetails/bay-details.js | 1023 | angular.module('myApp.dashboard')
.controller('BayDetailsController', ['$scope', '$uibModal', 'utility', 'BayService', 'LoaderService', function($scope, $uibModal, utility, bayService, loader) {
$scope.userRole = utility.getUserRole();
$scope.bayItems = [];
$scope.viewby = 10;
$scope.currentPage = 1;
... | mit |
tuxetuxe/pchud | src/main/java/com/nelsonjrodrigues/pchud/net/PcMessageParser.java | 6655 | package com.nelsonjrodrigues.pchud.net;
import static com.nelsonjrodrigues.pchud.net.PcMessage.Constants.PARTICIPANT_INFO_MAX;
import static com.nelsonjrodrigues.pchud.net.PcMessage.Constants.TYRE_MAX;
import static com.nelsonjrodrigues.pchud.net.PcMessage.Constants.VEC_MAX;
import java.net.DatagramPacket;
import co... | mit |
leanovate/microzon-auth-go | common/types.go | 116 | package common
import "time"
type RevocationsListener func(version uint64, sha256 RawSha256, expiresAt time.Time)
| mit |
annkupi/picard | src/main/java/picard/analysis/CollectWgsMetricsFromQuerySorted.java | 21986 | /*
* The MIT License
*
* Copyright (c) 2015 The Broad Institute
*
* 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... | mit |
frankandoak/silo | server/Inventory/Modifier/ModifierFactory.php | 164 | <?php
namespace Silo\Inventory\Modifier;
use Silo\Inventory\Model\Modifier;
class ModifierFactory
{
public function decode(Modifier $modifier)
{
}
}
| mit |
eriksk/kawaii | lib/kawaii/intro.rb | 1133 | module Kawaii
class Intro < Scene
def load
@logo = Gosu::Image.new(game(), File.dirname(__FILE__) + '/logo.png', false)
@rotation = 0
@position = Vector2.new(game().width / 2, game().height / 2)
@scale = 1
@transition_duration = 2000
@color = Gosu::Color::WHITE
@color.alpha = 0
end
def tr... | mit |
Kunal57/MIT_6.00.1x | pset1/problem3.py | 1471 | # Problem 3
# 15.0 points possible (graded)
# Assume s is a string of lower case characters.
# Write a program that prints the longest substring of s in which the letters occur in alphabetical order. For example, if s = 'azcbobobegghakl', then your program should print
# Longest substring in alphabetical order is: be... | mit |
PeterXu/livepusher | src/com/zenvv/live/VideoPusher.java | 8513 | package com.zenvv.live;
import java.util.Iterator;
import java.util.List;
import android.app.Activity;
import android.content.Context;
import android.graphics.ImageFormat;
import android.hardware.Camera;
import android.hardware.Camera.CameraInfo;
import android.hardware.Camera.PreviewCallback;
import android.hardware... | mit |
victorherraiz/xcatalog | tests/foo/bar/bar.js | 104 | "use strict";
module.exports = { value: 12 };
module.exports.$xcatalog = { id: "bar", type: "constant" } | mit |
Universal-Model-Converter/UMC3.0a | data/Python/x86/Lib/site-packages/OpenGL/raw/GL/VERSION/GL_4_2.py | 298 | '''OpenGL extension VERSION.GL_4_2
Automatically generated by the get_gl_extensions script, do not edit!
'''
from OpenGL import platform, constants, constant, arrays
from OpenGL import extensions
from OpenGL.GL import glget
import ctypes
EXTENSION_NAME = 'GL_VERSION_GL_4_2'
_DEPRECATED = False
| mit |
werdeil/pibooth | pibooth/plugins/hookspecs.py | 12591 | # -*- coding: utf-8 -*-
import pluggy
hookspec = pluggy.HookspecMarker('pibooth')
#--- Pibooth state-independent hooks ------------------------------------------
@hookspec
def pibooth_startup(app):
"""Actions performed at the startup of pibooth.
:param app: application instance
"""
@hookspec
def pib... | mit |
appium/node-jscs | lib/rules/require-space-after-binary-operators.js | 3446 | var assert = require('assert');
var tokenHelper = require('../token-helper');
var allOperators = require('../utils').binaryOperators;
module.exports = function() {};
module.exports.prototype = {
configure: function(operators) {
var isTrue = operators === true;
assert(
Array.isArray(o... | mit |
EPICZEUS/simple-discord.js | src/commands/info.js | 1750 | const Command = require("../command.js");
class Info extends Command {
constructor(client) {
super(client, {
name: "info",
type: "general",
description: "Displays info about the specified command.",
use: [
{
name: "command"... | mit |
coworkbuffalo/switchboard | config/initializers/session_store.rb | 150 | # Be sure to restart your server when you modify this file.
Switchboard::Application.config.session_store :cookie_store, key: '_switchboard_session'
| mit |
AHSR0x/my-exercises | app/app.js | 1322 | (function() {
'use strict';
// Include all requirement files
require('../bower_components/angular/angular.min.js');
require('../bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js');
require('../bower_components/angular-ui-router/release/angular-ui-router.min.js');
require('./modules/common.factori... | mit |
marcsans/cf-cold-start | src/weightedAverage.py | 508 |
# coding: utf-8
# In[1]:
import numpy as np
from similarity import similarity
# In[2]:
def weightedAverage(neighbors, similarities, R, user, product):
if neighbors==[]:
print('no neighbor provided')
sumWeights = 0
average = 0
for n in neighbors:
if R(n,product)!=0:
w = ... | mit |
6ixcoin/sixcoin | src/net.cpp | 62347 | // Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "irc.h"
#include "db.h"
#include "net.h"
#include "init.h"
#include "strl... | mit |
jcsena/pcc | tareas/6/numeros.cpp | 1276 | //
// Copyright (c) 2015 by Julio Seña. All Rights Reserved.
//
/**
1. Escriba el programa correspondiente. Debe funcionar correctamente.
Dado como datos de entrada tres números enteros, determine si los mismos
están en orden creciente y los imprima en pantalla.
Datos: A, B, C (variables de tipo entero. Los números d... | mit |
TomPallister/Ocelot | test/Ocelot.UnitTests/Requester/HttpClientBuilderTests.cs | 17166 | using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Moq;
using Ocelot.Configuration;
using Ocelot.Configuration.Builder;
usin... | mit |
levjj/esverify | examples/contradiction.js | 505 | // Proofs: Simple contradiction
function contradiction(p, p1, a3) {
// p1: { x: nat | p(x) <=> 0 <= x <= 3}
requires(spec(p1, (x) => Number.isInteger(x),
(x) => pure() && p(x) === (0 <= x && x <= 3)));
// a3: { x: nat | p(x) => p(x+1) }
requires(spec(a3, (x) => Number.isInteger(x) && p(x),
... | mit |
UKHomeOffice/platform-hub | platform-hub-web/src/app/shared/util/object-rollup.service.js | 1385 | export const objectRollupService = function (_) {
'ngInject';
const service = {};
service.rollup = rollup;
return service;
function rollup(obj, into) {
return _rollup(_.cloneDeep(obj), _.cloneDeep(into));
}
function _rollup(obj, into) {
return _.mergeWith(into, obj, (objValue, srcValue) => {
... | mit |
melnelen/CSharpPart2 | H01Arrays/P05MaximalIncreasingSequence/Properties/AssemblyInfo.cs | 1444 | 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("P0... | mit |
alannesta/tinto | lib/html/components/button.js | 436 | 'use strict';
var Component = require('../../component');
var text = require('../properties/text');
var inherits = require('../../utils/inherits');
/**
* @memberOf tinto.html.components
* @extends tinto.Component
* @constructor
* @inheritDoc
* @property {tinto.Attribute} label
*/
function Button() {
Component... | mit |
SUNYCortland/SystemsStatus | SystemsStatus.Data/Repositories/Nh/Mappings/MsSql/OnlineServiceStatusMapping.cs | 541 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SystemsStatus.Core.Data.Entities.Statuses;
using FluentNHibernate.Mapping;
namespace SystemsStatus.Data.Repositories.Nh.Mappings.MsSql
{
public class OnlineServiceStatusMapping : SubclassMap<OnlineServiceStatus>
{
... | mit |
raph-ael/foodsharing | packages/foodsharing/platform/src/app/team/team.model.php | 2138 | <?php
class TeamModel extends Model
{
public function getTeam($bezirkId = 1373)
{
$out = array();
if($orgas = $this->q('
SELECT
fs.id,
CONCAT(mb.name,"@'.DEFAULT_HOST.'") AS email,
fs.name,
fs.nachname,
fs.photo,
fs.about_me_public AS `desc`,
fs.rolle,
fs.geschlecht... | mit |
ccolleyh/AngularIgnition | app/controllers/grocery-list-ctrl.js | 1050 | 'use strict';
angular.module('myApp.GroceryList', ['ngRoute'])
.config(['$routeProvider', function($routeProvider) {
$routeProvider.when('/GroceryList', {
templateUrl: 'views/grocery-list.html',
controller: 'GroceryListCtrl'
});
}])
.controller('GroceryListCtrl', ['$scope', function($scope) {
$scope.s... | mit |
microcom/angular-strap | src/directives/select.js | 1430 | 'use strict';
angular.module('$strap.directives')
.directive('bsSelect', function($timeout, $strapConfig) {
var NG_OPTIONS_REGEXP = /^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w\d]*)|(?:\(\s*([\$\w][\$\w\d]*)\s*,\s*([\$\w][\$\w\d]*)\s*\)))\s+in\s+(.*)$/;
return {
restrict: 'A... | mit |
ensjo/jsmc1000 | MC1000.js | 117379 | function MC1000(mc1000HtmlDelegate) {
this.delegate = mc1000HtmlDelegate;
this.init();
}
MC1000.prototype.init = function() {
this.z80 = null;
this.vdg = null;
this.looper = null;
this.filter = null;
this.masterChannel = null;
this.psg = null;
this.keyboard = null;
this.ram = null;
this.vram =... | mit |
kkrolczyk/Schowek | app/src/main/java/org/kkrolczyk/schowek/modules/Notes/NoteDBAdapter.java | 3207 | package org.kkrolczyk.schowek.modules.Notes;
import android.content.Context;
import android.content.ContentValues;
import android.database.Cursor;
import android.database.SQLException;
import org.kkrolczyk.schowek._AbstractDBAdapter;
import org.kkrolczyk.schowek.Utils;
import java.util.ArrayList;
import java.util.Ar... | mit |
MBuffenoir/b4c | player/migrations/0003_remove_playerprofile_registration_ip.py | 367 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('player', '0002_auto_20151124_2241'),
]
operations = [
migrations.RemoveField(
model_name='playerprofile',
... | mit |
Picturelife/streamio-ffmpeg | lib/ffmpeg/movie.rb | 4308 | require 'time'
module FFMPEG
class Movie
attr_reader :path, :duration, :time, :bitrate, :rotation, :creation_time
attr_reader :video_stream, :video_codec, :video_bitrate, :colorspace, :resolution, :sar, :dar
attr_reader :audio_stream, :audio_codec, :audio_bitrate, :audio_sample_rate
attr_reader :cont... | mit |
CelineTo/new-repo | src/com/sudoku/data/model/User.java | 3188 | /*
* 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.sudoku.data.model;
import java.util.List;
public class User implements Ruleable {
private int id;
private String... | mit |
jxzsxsp/gallery-by-react | src/config/dist.js | 205 | 'use strict';
import baseConfig from './base';
let config = {
appEnv: 'dist' // feel free to remove the appEnv property here
};
export default Object.freeze(Object.assign({}, baseConfig, config));
| mit |
rothomp3/weatherDjinni | java/jni/dataPoint.cpp | 9279 | // AUTOGENERATED FILE - DO NOT MODIFY!
// This file generated by Djinni from weather.idl
#include "dataPoint.hpp" // my header
#include "Marshal.hpp"
namespace djinni_generated {
DataPoint::DataPoint() = default;
DataPoint::~DataPoint() = default;
auto DataPoint::fromCpp(JNIEnv* jniEnv, const CppType& c) -> ::dji... | mit |
WicopeeDot/addons | scoreboard/lua/scoreboard/scoreboard.lua | 12435 |
local tag = "ReDreamScoreboard"
if IsValid(Scoreboard) then Scoreboard:Remove() end
scoreboard = {}
local Debug = false
local hostnameFont = {
font = "Roboto Bold",
size = ScreenScale(8),
antialias = true,
}
surface.CreateFont(tag .. "HostnameSmaller", hostnameFont)
hostnameFont.size = ScreenScale(12)
surface.Cr... | mit |
feliposz/learning-stuff | java/tutorial/LearnJava/src/my/learnjava/DataOnly.java | 733 | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package my.learnjava;
/**
*
* @author Felipo
*/
public class DataOnly {
int i;
float f;
boolean b;
int storage(String s) {
return s.length() * 2;
}
public static void main(String[] a... | mit |
fluentribbon/Fluent.Ribbon | Fluent.Ribbon/Automation/Peers/RibbonControlDataAutomationPeer.cs | 2243 | namespace Fluent.Automation.Peers
{
using System.Windows;
using System.Windows.Automation.Peers;
using System.Windows.Controls;
/// <summary>
/// Automation peer for ribbon control items.
/// </summary>
public class RibbonControlDataAutomationPeer : ItemAutomationPeer
{
/// <su... | mit |
Bladrak/ecommerce | src/Sonata/ProductBundle/Controller/ProductController.php | 5288 | <?php
/*
* This file is part of the Sonata package.
*
* (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Sonata\ProductBundle\Controller;
use Symfony\Bundle\Framework... | mit |
oydang/CS4701-pokemon-AI | Tracer-VisualboyAdvance1.7.1/Tracer-VisualboyAdvance1.7.1/source/src/expr.cpp | 27160 |
* A Bison parser, made from expr.y
by GNU Bison version 1.28 */
#define YYBISON 1 /* Identify Bison output. */
#define TOKEN_IDENTIFIER 257
#define TOKEN_DOT 258
#define TOKEN_STAR 259
#define TOKEN_ARROW 260
#define TOKEN_ADDR 261
#define TOKEN_SIZEOF 262
#define TOKEN_NUMBER ... | mit |
vladvelici/game-of-skate | protected/views/site/index.php | 531 | <?php $this->pageTitle=Yii::app()->name; ?>
<div style="float:right;width:300px;">
<h2>1. Film your tricks</h2>
It's enough to film your tricks in just one stance.
<h2>2. Upload and validate</h2>
Upload the video with the trick and then you'll be able to do that trick in the game.
<h2>3. Play Game of Skate online with... | mit |
pipa/MultiBundleBrowserify | static/src/js/modules/global.js | 129 | // Test Class ===================================
export default class Global {
foo() {
console.log('bar');
}
}
| mit |
ReneFGJr/CentroIntegradoPesquisa | system/Database/MySQLi/Forge.php | 5534 | <?php
/**
* This file is part of the CodeIgniter 4 framework.
*
* (c) CodeIgniter Foundation <admin@codeigniter.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CodeIgniter\Database\MySQLi;
use CodeIgniter\Database... | mit |
flav-io/flavio | flavio/physics/common.py | 1464 | """Common functions for physics."""
from collections import Counter
def conjugate_par(par_dict):
"""Given a dictionary of parameter values, return the dictionary where
all CP-odd parameters have flipped sign.
This assumes that the only CP-odd parameters are `gamma` or `delta` (the
CKM phase in the Wo... | mit |
MrPIvanov/SoftUni | 02-Progr Fundamentals/04-C# Basic Syntax - Exercises/04-BasicSyntaxMore/07-trainHall/Properties/AssemblyInfo.cs | 1395 | 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("07-... | mit |
CCEM/nlp-heroku-app | reddex/setup.py | 1510 | """Setup for server/web page of reddex extension."""
import os
from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.txt')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.txt')) as f:
CHANGES = f.read()
requires = [
... | mit |
EdwGx/AeroplaneChess | config/routes.rb | 1651 | Rails.application.routes.draw do
root 'games#index'
get 'd' => 'games#destroy'
# 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 'welcome#index'
# Example... | mit |
mdomlad85/foirun | FOIRun/database/src/main/java/hr/foi/air/database/entities/Aktivnost.java | 4478 | package hr.foi.air.database.entities;
import com.raizlabs.android.dbflow.annotation.Column;
import com.raizlabs.android.dbflow.annotation.ForeignKey;
import com.raizlabs.android.dbflow.annotation.ForeignKeyReference;
import com.raizlabs.android.dbflow.annotation.PrimaryKey;
import com.raizlabs.android.dbflow.ann... | mit |
VENIEGAMES/LocalDataSaver-Unity | Assets/Scripts/LocalDataSaver.cs | 1190 | using System.IO;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using UnityEngine;
using System.Text;
public static class LocalDataSaver
{
private static string SavePath = Application.persistentDataPath + "/LocalData/";
public static void Save<T>(T serializableObject) ... | mit |
LegalizeAdulthood/cimple | src/providers/Upcall/module.cpp | 2319 | //==============================================================================
//
// PLEASE DO NOT EDIT; THIS FILE WAS AUTOMATICALLY GENERATED BY GENMOD 2.0.5
//
//==============================================================================
/* NOCHKSRC */
#include <cimple/cimple.h>
#include "Upcall_Provider.h"
us... | mit |
fushouhai/flask_11_28 | app/api_1_0/errors.py | 775 | from . import api
from flask import jsonify
from ..exceptions import ValidationError
def bad_request(message):
response = jsonify({'error':'Bad request', 'message':message})
response.status_code = 400
return response
@api.errorhandler(ValidationError)
def validation_error(e):
return bad_request(e.arg... | mit |
romainneutron/PHPExiftool | lib/PHPExiftool/Driver/Tag/XMPIptcExt/LocationCreated.php | 927 | <?php
/*
* This file is part of PHPExifTool.
*
* (c) 2012 Romain Neutron <imprec@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace PHPExiftool\Driver\Tag\XMPIptcExt;
use JMS\Serializer\Annotation\ExclusionPoli... | mit |
euroteamoutreach/euroteamoutreach.org | spec/features/doctrine_spec.rb | 192 | describe "Doctrine page", type: :feature do
before do
visit "/doctrine"
end
it "displays the correct heading" do
expect(page).to have_selector("h1", text: "Doctrine")
end
end
| mit |
dannyvankooten/laravel-vat | src/VatServiceProvider.php | 2000 | <?php
namespace DvK\Laravel\Vat;
use Illuminate\Contracts\Container\Container;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Validator as LaravelValidator;
use DvK\Laravel\Vat\Facades\Validator as VatValidator;
use DvK\Laravel\Vat\Rules;
use DvK\Vat\Countries;
use DvK\Vat\Rates\Rates;
use Dv... | mit |
KnpLabs/ConsoleServiceProvider | Knp/Provider/ConsoleServiceProvider.php | 3137 | <?php
namespace Knp\Provider;
use Knp\Command\Twig\DebugCommand;
use Knp\Command\Twig\LintCommand;
use Knp\Console\Application as ConsoleApplication;
use Knp\Console\ConsoleEvent;
use Knp\Console\ConsoleEvents;
use Pimple\Container;
use Pimple\ServiceProviderInterface;
use Symfony\Bridge\Twig\Command\DebugCommand as ... | mit |
wgcrouch/scrum-board | scripts/fos-mongo-migrate.js | 297 | db.users.find().forEach(function(user) {
user.username = user.usernameCanonical = user.email.match(/^(.*)@/)[1];
user.enabled = true;
user.expired = false;
user.locked = false;
user.emailCanonical = user.email;
user.roles = user.roles || {};
db.users.save(user);
});
| mit |
nodkz/react-relay-network-layer | src/__tests__/mutation.test.js | 1960 | /* @flow */
import fetchMock from 'fetch-mock';
import { RelayNetworkLayer } from '..';
import { mockReq } from '../__mocks__/mockReq';
describe('Mutation tests', () => {
const middlewares = [];
const rnl = new RelayNetworkLayer(middlewares);
beforeEach(() => {
fetchMock.restore();
});
it('should make... | mit |
pkorenev/cms | lib/cms/banners/activerecord_helpers.rb | 3010 | module Cms
module Banners
module ActiveRecordExtensions
module ClassMethods
def acts_as_banner options = {}
class_variable_set(:@@acts_as_banner_options, options)
if mod = options[:base_articles]
self.send(:extend, mod)
end
self.attr_accessible *... | mit |
freesamael/npu-moboapp-programming-fall-2015 | b2g-dist-win32-20151125/defaults/autoconfig/prefcalls.js | 5838 | /* -*- tab-width: 4; indent-tabs-mode: nil; js-indent-level: 4 -*-
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
const nsILDAPURL = Components.interfaces.nsILDA... | mit |
modularcode/modular-starter-react | src/server/router.js | 270 | const path = require('path');
const express = require('express');
const router = express.Router();
router.get("/*", function(req, res) {
return res.set('Content-Type', 'text/html')
.sendFile(path.resolve(PUBLIC_DIR, 'index.html'));
});
module.exports = router;
| mit |
cryogen/throneteki | server/game/cards/12-KotI/ReturnToTheFields.js | 1301 | const PlotCard = require('../../plotcard');
const TextHelper = require('../../TextHelper');
const GameActions = require('../../GameActions');
class ReturnToTheFields extends PlotCard {
setupCardAbilities() {
this.whenRevealed({
target: {
type: 'select',
mode: 'up... | mit |
ecbypi/guise | lib/guise/syntax.rb | 5854 | require 'active_support/concern'
require 'active_support/core_ext/hash/keys'
require 'active_support/core_ext/hash/indifferent_access'
require 'active_support/core_ext/string/inflections'
module Guise
module Syntax
# Setup the model's `guises` association. Given the following setup:
#
# ```ruby
# cla... | mit |
sygic-travel/js-sdk | src/Pdf/MapGenerator.test.ts | 6018 | import * as chai from 'chai';
import * as chaiAsPromised from 'chai-as-promised';
import { cloneDeep } from '../Util';
import { sandbox as sinonSandbox, SinonSandbox, SinonStub } from 'sinon';
import { Bounds } from '../Geo';
import { Place } from '../Places';
import { setEnvironment } from '../Settings/';
import { pl... | mit |
imbo/behat-api-extension | src/ArrayContainsComparator/Matcher/LessThan.php | 1063 | <?php declare(strict_types=1);
namespace Imbo\BehatApiExtension\ArrayContainsComparator\Matcher;
use InvalidArgumentException;
/**
* Check if a numeric value is less than another value
*/
class LessThan
{
/**
* Match a numeric value
*
* @param mixed $number A variable
* @param mixed $max The... | mit |