repo_name stringlengths 4 116 | path stringlengths 4 379 | size stringlengths 1 7 | content stringlengths 3 1.05M | license stringclasses 15
values |
|---|---|---|---|---|
DennisWandschura/vxEngine | source/vxEngine/ConditionPlayerMoving.cpp | 627 | #include "ConditionPlayerMoving.h"
#include "Entity.h"
ConditionPlayerMoving::ConditionPlayerMoving(EntityHuman* human)
:m_human(human)
{
}
ConditionPlayerMoving::~ConditionPlayerMoving()
{
}
u8 ConditionPlayerMoving::test() const
{
auto cmp = m_human->m_state & (1 << (u32)EntityHuman::State::Walking);
return ... | mit |
r3d83ard/assemblyline_daily_sample | api/vti_api.py | 11458 | import os
import requests
class VTI_API:
a_vti_api_key = ''
a_api_scan_file = 'https://www.virustotal.com/vtapi/v2/file/scan'
a_api_scan_large_file = 'https://www.virustotal.com/vtapi/v2/file/scan/upload_url'
a_api_md5_report = 'https://www.virustotal.com/vtapi/v2/file/report'
a_api_md5_behaviour ... | mit |
metacpp/LeetCpp | src/array/longest_substr_without_repeating_chars_unittest.cc | 581 | #include <string>
using std::string;
#include <gtest/gtest.h>
#include "longest_substr_without_repeating_chars.h"
namespace {
TEST(LongestSubstrWithoutRepeatingCharsTest, Case1) {
string s = "abcabcbb";
int expected_length = 3;
LongestSubstrWithoutRepeatingChars solution;
EXPECT_EQ(expected_lengt... | mit |
ingetat2014/www | src/Fdr/UserBundle/Controller/RegistrationController.php | 522 | <?php
namespace Fdr\UserBundle\Controller;
use Symfony\Component\HttpFoundation\RedirectResponse;
use FOS\UserBundle\Controller\RegistrationController as BaseController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
class RegistrationController extends BaseController {
... | mit |
barrabinfc/react-iching | docs/assets/wb-assets/workbox-v3.4.1/workbox-cacheable-response.dev.js | 8632 | this.workbox = this.workbox || {};
this.workbox.cacheableResponse = (function (exports,WorkboxError_mjs,assert_mjs,getFriendlyURL_mjs,logger_mjs) {
'use strict';
try {
self.workbox.v['workbox:cacheable-response:3.4.1'] = 1;
} catch (e) {} // eslint-disable-line
/*
Copyright 2017 Google Inc.
Licen... | mit |
jonDotsoy/MicroCSS | lib/scanTheCssSelectors.js | 1766 | var decomposeCSS = require('./decomposeCSS')
/**
* Retorna un conjunto con los selectores de la hoja de estilo indicado.
* @param {string} CSS Hoja de estilo CSS
* @return {object}
*/
var scanTheCssSelectors = function scanTheCssSelectors (strCSS) {
var cssComponent = new decomposeCSS(strCSS)
this.cssComponent... | mit |
berkeley-gif/vtm | build/src/common/filters/ThumbnailUrl.js | 222 | angular.module('filters.thumbnail', []).filter('thumbnailUrl', [function () {
return function (url) {
var thumbnailUrl = url.replace(/imgs\/(.*?)(\/)/, 'imgs/128x192/');
return thumbnailUrl;
};
}]);
; | mit |
github/codeql | csharp/ql/src/Security Features/CWE-020/ExternalAPISinkExample.cs | 281 | using System;
using System.Text;
using System.Web;
public class UntrustedData : IHttpHandler
{
public void ProcessRequest(HttpContext ctx)
{
var name = ctx.Request.QueryString["name"];
ctx.Response.Write(name);
}
public bool IsReusable => true;
}
| mit |
apoydence/pubsub | benchmarks_test.go | 5558 | package pubsub_test
import (
"fmt"
"math/rand"
"sync"
"testing"
"github.com/apoydence/pubsub"
)
func BenchmarkPublishing(b *testing.B) {
b.StopTimer()
p := pubsub.New()
for i := 0; i < 100; i++ {
_, f := newSpySubscrption()
p.Subscribe(f, pubsub.WithPath(randPath()))
}
b.StartTimer()
for i := 0; i < ... | mit |
hadalin/firefox-hidefedora | lib/main.js | 1817 | var self = require("sdk/self"),
data = self.data,
pageMod = require("sdk/page-mod"),
ss = require("sdk/simple-storage"),
simplePrefs = require("sdk/simple-prefs");
if (!ss.storage.bannedProfiles) {
ss.storage.bannedProfiles = [];
}
if (!ss.storage.lastJSONUpdate) {
var date = new Date();
date.setFullYear(date... | mit |
galbiati/video-representations | infer.py | 2929 | import os
import numpy as np
import tensorflow as tf
import tqdm
from training import *
from render import *
from download import get_filepaths, video_to_array
from models.AELSTM import *
from models.model import *
L = tf.layers
def infer(video_files, model_file, seqlen=64, batchsize=8):
"""
Takes a list of av... | mit |
Dziemborowicz/Hourglass | Hourglass/Parsing/TimeToken.cs | 6668 | // --------------------------------------------------------------------------------------------------------------------
// <copyright file="TimeToken.cs" company="Chris Dziemborowicz">
// Copyright (c) Chris Dziemborowicz. All rights reserved.
// </copyright>
// ------------------------------------------------------... | mit |
jackschmidt/rclone | yandex/yandex.go | 16080 | // Package yandex provides an interface to the Yandex Disk storage.
//
// dibu28 <dibu28@gmail.com> github.com/dibu28
package yandex
import (
"encoding/json"
"fmt"
"io"
"log"
"path"
"path/filepath"
"strings"
"time"
"github.com/ncw/rclone/fs"
"github.com/ncw/rclone/oauthutil"
yandex "github.com/ncw/rclone/y... | mit |
bonevbb/restraurant-uni-dev | app/Http/Controllers/Admin/AllergensController.php | 1669 | <?php
namespace App\Http\Controllers\Admin;
use App\Allergens;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
class AllergensController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
... | mit |
litongbupt/iframework | src/test/java/com/bupt/app/security/dao/UserMapperTest.java | 1570 | package com.bupt.app.security.dao;
import java.util.List;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;
import com.bupt.core.system.dao.UserMapper;
import com.bupt.core.system.model.User;
import com.bupt.core.... | mit |
ScreamingHawk/fate-sheets | app/src/main/java/link/standen/michael/fatesheets/fragment/CoreCharacterEditStressFragment.java | 4964 | package link.standen.michael.fatesheets.fragment;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import link.standen.michael.fatesheets.R;
import link.stan... | mit |
Ardakaniz/NzPacman | extlibs/Nazara/include/Nazara/Audio/Algorithm.hpp | 493 | // Copyright (C) 2017 Jérôme Leclercq
// This file is part of the "Nazara Engine - Audio module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#pragma once
#ifndef NAZARA_ALGORITHM_AUDIO_HPP
#define NAZARA_ALGORITHM_AUDIO_HPP
#include <Nazara/Prerequesites.hpp>
namespace Nz
{
templa... | mit |
CoralineAda/mongoid_session_store | lib/mongoid/session_store/session.rb | 1278 | module Mongoid
module SessionStore
class Session
include Mongoid::Document
include Mongoid::Timestamps
field :session_id
field :raw_data
field :expires_at, :type => DateTime
DEFAULT_SESSION_EXPIRY = 60
store_in :collection => :sessions, :database => 'mongoid_session... | mit |
TomHarte/CLK | Machines/Apple/ADB/Keyboard.hpp | 2854 | //
// Keyboard.hpp
// Clock Signal
//
// Created by Thomas Harte on 13/02/2021.
// Copyright © 2021 Thomas Harte. All rights reserved.
//
#ifndef Keyboard_hpp
#define Keyboard_hpp
#include "ReactiveDevice.hpp"
#include "../../../Inputs/Keyboard.hpp"
#include "../../KeyboardMachine.hpp"
#include <array>
#include ... | mit |
adatapost/java-web | DbApp/src/in/anita/test/TestMain.java | 496 | package in.anita.test;
import in.anita.Db;
public class TestMain {
public static void main(String[] args) {
String sql = "insert into emp values (?,?,?)";
Db x = null;
try {
x =new Db(sql);
x.getPs().setInt(1, 103);
x.getPs().setString(2,"Rakesh");
x.getPs().setDate(3,Db.toSqlDate("1-1... | mit |
Azure/azure-sdk-for-python | sdk/cosmos/azure-cosmos/test/test_partition_key.py | 10646 | # The MIT License (MIT)
# Copyright (c) 2014 Microsoft Corporation
# 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 |
MrSim17/LaserCutterTools | GearBuilder/PointGeneratorRack.cs | 6557 | using System;
using System.Collections.Generic;
using System.Linq;
using LaserCutterTools.Common;
namespace LaserCutterTools.GearBuilder
{
// TODO: add interface for rack generation
internal sealed class PointGeneratorRack : IPointGeneratorRack
{
// TODO: Account for tool width
/// <summa... | mit |
ganjitoka/podcoin | src/rpcdump.cpp | 2957 | // Copyright (c) 2009-2012 Bitcoin Developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include "init.h" // for pwalletMain
#include "bitcoinrpc.h"
#include "ui_interface.h"
#include "base58.h"
#include <boost/lexica... | mit |
storlihoel/tomteportalen | craft/app/services/SectionsService.php | 31166 | <?php
namespace Craft;
/**
* Class SectionsService
*
* @author Pixel & Tonic, Inc. <support@pixelandtonic.com>
* @copyright Copyright (c) 2014, Pixel & Tonic, Inc.
* @license http://buildwithcraft.com/license Craft License Agreement
* @see http://buildwithcraft.com
* @package craft.app.services
* ... | mit |
piouPiouM/livre-sass-compass-avance | ch06/ch06-002/config.rb | 146 | css_dir = "css"
sass_dir = "sass"
images_dir = "img"
javascripts_dir = "js"
relative_assets = true
output_style = :expanded
line_comments = false
| mit |
bbyars/mountebank | mbTest/api/tcp/tcpStubTest.js | 8586 | 'use strict';
const assert = require('assert'),
api = require('../../api').create(),
port = api.port + 1,
isWindows = require('os').platform().indexOf('win') === 0,
timeout = isWindows ? 10000 : parseInt(process.env.MB_SLOW_TEST_TIMEOUT || 2000),
tcp = require('./tcpClient'),
airplaneMode = pro... | mit |
phpManufaktur/kfConfirmationLog | Control/Backend/Report.php | 6778 | <?php
/**
* ConfirmationLog
*
* @author Team phpManufaktur <team@phpmanufaktur.de>
* @link https://kit2.phpmanufaktur.de/ConfirmationLog
* @copyright 2013 Ralf Hertsch <ralf.hertsch@phpmanufaktur.de>
* @license MIT License (MIT) http://www.opensource.org/licenses/MIT
*/
namespace phpManufaktur\ConfirmationLog\... | mit |
nverdhan/satticentre | scripts/pages/AddBookToLibrary.js | 6044 | import React, { Component, PropTypes } from 'react';
import { addons } from 'react/addons'
const ReactCSSTransitionGroup = addons.CSSTransitionGroup
import mui from 'material-ui';
// const ThemeManager = new mui.Styles.ThemeManager();
const ThemeManager = require('material-ui/lib/styles/theme-manager');
const { Float... | mit |
rahku/corefx | src/System.Net.ServicePoint/tests/ServicePointManagerTest.cs | 15462 | // 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.Net.Security;
using System.Security.Cryptography.X509Certificates;
using Xunit;
namespac... | mit |
jasnow/human_error | spec/lib/human_error/errors/request_errors/unpermitted_parameters_error_spec.rb | 2309 | require 'rspectacular'
require 'human_error'
require 'action_controller'
class HumanError
module Errors
describe UnpermittedParametersError do
it 'has a status' do
error = UnpermittedParametersError.new
expect(error.http_status).to eql 400
end
it 'has a code' do
error = UnpermittedParameter... | mit |
customerlobby/less_accounting | lib/less_accounting/api.rb | 513 | require File.expand_path('../request', __FILE__)
require File.expand_path('../response', __FILE__)
require File.expand_path('../connection', __FILE__)
module LessAccounting
class API
attr_accessor *Configuration::VALID_OPTIONS_KEYS
def initialize(options = {})
options = LessAccounting.options.merge(o... | mit |
ilios/common | tests/unit/models/mesh-concept-test.js | 314 | import { module, test } from 'qunit';
import { setupTest } from 'ember-qunit';
module('Unit | Model | MeshConcept', function (hooks) {
setupTest(hooks);
test('it exists', function (assert) {
const model = this.owner.lookup('service:store').createRecord('mesh-concept');
assert.ok(!!model);
});
});
| mit |
Secretmapper/react-transmission | src/components/menus/SortByContextMenu/index.js | 1941 | import React, { Component } from 'react';
import CSSModules from 'react-css-modules';
import { inject } from 'mobx-react';
import autobind from 'autobind-decorator';
import ContextMenu from 'components/menus/ContextMenu';
import styles from './styles/index.css';
@inject('prefs_store', 'view_store', 'torrents_store')... | mit |
CslaGenFork/CslaGenFork | trunk/Samples/DeepLoad/ParentLoad.Business/ERCLevel/B05_SubContinent_Child.Designer.cs | 9669 | using System;
using System.Data;
using System.Data.SqlClient;
using Csla;
using Csla.Data;
namespace ParentLoad.Business.ERCLevel
{
/// <summary>
/// B05_SubContinent_Child (editable child object).<br/>
/// This is a generated base class of <see cref="B05_SubContinent_Child"/> business object.
... | mit |
malnuxstarck/SiteDuSavoir | class/ManagerPost.class.php | 5159 |
<?php
/* se charge des operations sur la base de donnees pour la class Post */
class ManagerPost
{
const ERR_AUTH_EDIT = "Vous ne pouveez pas modifier ce Post ";
const ERR_AUTH_DELETE = "Vous ne pouvez pas supprimer ce message ";
protected $_db;
public $_iErros = 0 ;
protected $_errors = array();
public funct... | mit |
robdmoore/NQUnit | SampleWebApp/Scripts/my-javascript.js | 718 | /// <reference path="jquery-1.4.4-vsdoc.js" />
var MyNamespace = (function ($) {
var that = {};
var counter = 0;
var multiply = function (y) {
if (!isNaN(y)) {
counter *= y;
}
};
var add = function (y) {
if (!isNaN(y)) {
counter += y * 1;
}
};
var increment = function () {
... | mit |
madison-kerndt/avant-garde-synesthesia | lib/components/Note.js | 221 | import React from 'react';
export default ({ noteName }) => {
const note = noteName.slice(0,-1);
return(
<div className='direction'>
<div
className={note} > ø {note}
</div>
</div>
)
}
| mit |
GoodiesHQ/Daddy | daddy/__init__.py | 38 | from . import utils
from . import bot
| mit |
MyConnectedSite/TCC-.NET-Library | TCC2.API.CloudTracker/Types/SetCloudTrackerEPCEventsResult.cs | 605 | using System;
using Newtonsoft.Json;
namespace TCC2.API.CloudTracker
{
[JsonObject(MemberSerialization = MemberSerialization.OptIn)]
public class SetCloudTrackerEPCEventsResult : ApiCallResult
{
[JsonProperty(PropertyName = "events")]
public SetCloudTrackerEPCEventsResultEntry[] R... | mit |
rshell/oracle-enhanced | lib/active_record/connection_adapters/oracle_enhanced/procedures.rb | 6413 | # frozen_string_literal: true
require "active_support"
module ActiveRecord #:nodoc:
# Custom create, update, delete methods functionality.
#
# Example:
#
# class Employee < ActiveRecord::Base
# include ActiveRecord::OracleEnhancedProcedures
#
# set_create_method do
# plsql.employees_... | mit |
cdnjs/cdnjs | ajax/libs/primereact/5.0.2/components/tree/UITreeNode.js | 35749 | "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.UITreeNode = void 0;
var _react = _interopRequireWildcard(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _ClassNames = require("../utils/ClassNames");
var _DomHandler = _interopRequireDefa... | mit |
supranove/clockwork | codebase/include/scene/scene.hh | 3714 | /*
* The MIT License (MIT)
*
* Copyright (c) 2014 Jeremy Othieno.
*
* 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 u... | mit |
lenscas/webshop | application/models/general/Gusers_model.php | 3582 | <?php
Class Gusers_model extends CI_Model {
public function Register($data, $sort){
foreach ($data as $key => $value) {
if ($value == "") {
$error = "Niet alle velden zijn ingevuld!";
break;
}
}
if (!isset($error) && $data['Password'] != $data['PasswordCheck'] ) {
$error = "Wachtwoorden ko... | mit |
gintechsystems/GINcose-Android | app/src/main/java/com/gintechsystems/gincose/messages/TransmitterMessage.java | 238 | package com.gintechsystems.gincose.messages;
import java.nio.ByteBuffer;
/**
* Created by joeginley on 3/16/16.
*/
public abstract class TransmitterMessage {
public byte[] byteSequence = null;
public ByteBuffer data = null;
}
| mit |
adrienhobbs/redux-glow | src/components/case-study/single/templates/hbo/the-night-of.js | 3352 | import React, { PropTypes } from 'react';
import BaseTemplate from '../base-study-template';
import AboutSection from '../../../content-modules/about.js';
import LoopingVideo from '../../../../video/looping-video.js';
import styles from './night-of.css';
export class NightOf extends BaseTemplate {
static propTypes =... | mit |
alivesay/catbox-crypto | test/test.js | 4469 | var assert = require('assert');
var Catbox = require('catbox');
var CatboxCrypto = require('..');
var options = {
algorithm: 'aes-256-cbc',
keySize: 32,
ivSize: 16
};
describe('CatboxCrypto', function() {
it('errors if not created with new', function () {
assert.throws(CatboxCrypto, function (err) {
... | mit |
thatguyjordan/TCF-Community-Mod | MBase.cs | 4060 | using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using TAPI;
using Terraria;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace tcfcomm
{
public sealed class MBase : ModBase
{
internal static MBase BaseInstance;
public ov... | mit |
nico01f/z-pec | ZimbraServer/src/java/com/zimbra/cs/filter/FilterListener.java | 5734 | /*
* ***** BEGIN LICENSE BLOCK *****
* Zimbra Collaboration Suite Server
* Copyright (C) 2011 Zimbra, Inc.
*
* The contents of this file are subject to the Zimbra Public License
* Version 1.3 ("License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
... | mit |
nnaabbcc/exercise | windows/pw6e.official/CSharp/Chapter05/SliderSketch/SliderSketch/App.xaml.cs | 3617 | using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.P... | mit |
Ezeer/VegaStrike_win32FR | vegastrike/boost/1_35/boost/date_time/int_adapter.hpp | 13775 | #ifndef _DATE_TIME_INT_ADAPTER_HPP__
#define _DATE_TIME_INT_ADAPTER_HPP__
/* Copyright (c) 2002,2003 CrystalClear Software, Inc.
* Use, modification and distribution is subject to the
* Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
* Author:... | mit |
PaulTrampert/DocSite | DocSite.Test/SiteModel/DocEventTests.cs | 1046 | using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using DocSite.SiteModel;
using DocSite.Xml;
using Xunit;
using Xunit.Sdk;
namespace DocSite.Test.SiteModel
{
public class DocEventTests
{
[Theory]
[InlineData("M:Test.Method")]
[InlineData(... | mit |
cimocimocimo/staydrysystems.com | web/app/plugins/woocommerce-table-rate-shipping/woocommerce-table-rate-shipping.php | 7469 | <?php
/*
Plugin Name: WooCommerce Table Rate Shipping
Plugin URI: https://woocommerce.com/products/table-rate-shipping/
Description: Table rate shipping lets you define rates depending on location vs shipping class, price, weight, or item count.
Version: 3.0.2
Author: Automattic
Author URI: https://woocommerce.com/
Req... | mit |
ranea/ArxPy | arxpy/primitives/multi2.py | 9765 | """MULTI2 cipher.
Source: Cryptanalysis of the ISDB Scrambling Algorithm (MULTI2)
"""
from arxpy.bitvector.core import Constant
from arxpy.bitvector.operation import RotateLeft
from arxpy.primitives.primitives import KeySchedule, Encryption, Cipher
# for BvOR and XDOr
from arxpy.bitvector.operation import BvComp, Op... | mit |
brave/brightray | browser/browser_context.cc | 6830 | // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.
#include "browser/browser_context.h"
#include "browser/brightray_paths.h"
#include "browser/browser_client.h"
#include "browser/inspectable_... | mit |
tholum/PiBunny | system.d/library/BunnyTap/js/ajax.googleapis.com__ajax__libs__dojo__1.8.10__dojo__dojo.js | 116944 | /*
Copyright (c) 2004-2012, The Dojo Foundation All Rights Reserved.
Available via Academic Free License >= 2.1 OR the modified BSD license.
see: http://dojotoolkit.org/license for details
*/
/*
This is an optimized version of Dojo, built for deployment and not for
development. To get sources and documentation, p... | mit |
andreimaximov/algorithms | geeks-for-geeks/linked-lists/flatten-multi-level-list/flatten.py | 2785 | #!/usr/bin/env python
from collections import deque
class Node(object):
"""Represents a multi-level linked list node."""
def __init__(self, value):
self.value = value
self.next = None
self.child = None
def get(self, i):
"""Returns the ith node of the list."""
nod... | mit |
shakuu/Homework | DesignPatterns/Workshop/FastAndFurious-AuthorSolution/FastAndFurious.ConsoleApplication/Engine/Contracts/IStrategyProvider.cs | 166 | namespace FastAndFurious.ConsoleApplication.Engine.Contracts
{
public interface IStrategyProvider
{
IStrategy GetStrategy(string command);
}
}
| mit |
RobertTheNerd/sc2geeks | web-api/website/service/src/main/java/api/sc2geeks/entity/ReplayWithRelatedInfo.java | 1544 | package api.sc2geeks.entity;
import java.util.List;
/**
* Created with IntelliJ IDEA.
* User: robert
* Date: 5/3/12
* Time: 10:24 PM
* To change this template use File | Settings | File Templates.
*/
public class ReplayWithRelatedInfo
{
private Replay replay;
private List<Replay> replaysInSeries;
private Lis... | mit |
raskolnikova/infomaps | node_modules/devextreme/data/local_store.js | 3384 | /**
* DevExtreme (data/local_store.js)
* Version: 16.2.6
* Build date: Tue Mar 28 2017
*
* Copyright (c) 2012 - 2017 Developer Express Inc. ALL RIGHTS RESERVED
* EULA: https://www.devexpress.com/Support/EULAs/DevExtreme.xml
*/
"use strict";
var $ = require("jquery"),
Class = require("../core/class"... | mit |
monochromegane/dragon-imports | file_info.go | 606 | package dragon
import (
"io/ioutil"
"os"
"path/filepath"
)
type fileInfo struct {
path string
os.FileInfo
}
func (f fileInfo) isDir(follow bool) bool {
if follow && f.isSymlink() {
_, err := ioutil.ReadDir(filepath.Join(f.path, f.FileInfo.Name()))
return err == nil
}
return f.FileInfo.IsDir()
}
func (f ... | mit |
Prestaul/charting | dataset.js | 2687 | function Dataset(data, firstIndex, length) {
this.setData(data, firstIndex, length);
}
Dataset.prototype = {
setData: function(data, firstIndex, length) {
if(!(data instanceof Array && data.length >= 2))
throw new Error('Data provided to a Dataset must be of type Array and have a length of at least two.');
t... | mit |
fraguada/three.js | examples/js/shaders/NormalMapShader.js | 1293 | console.warn( "THREE.NormalMapShader: As part of the transition to ES6 Modules, the files in 'examples/js' were deprecated in May 2020 (r117) and will be deleted in December 2020 (r124). You can find more information about developing using ES6 Modules in https://threejs.org/docs/#manual/en/introduction/Installation." )... | mit |
rayneh/VS2017MG | thrift/ThriftExample/JavaClient.java | 2610 | /*
* This version of the Thrift Java Tutorial has been simplified by
* ronald.moore@h-da.de
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF... | mit |
LUI-3/website | app/smarty/sysplugins/smarty_internal_runtime_getincludepath.php | 5109 | <?php
/**
* Smarty read include path plugin
*
* @package Smarty
* @subpackage PluginsInternal
* @author Monte Ohrt
*/
/**
* Smarty Internal Read Include Path Class
*
* @package Smarty
* @subpackage PluginsInternal
*/
class Smarty_Internal_Runtime_GetIncludePath
{
/**
* i... | mit |
dusenberrymw/Pine | test/test_pine.py | 5816 | #! /usr/bin/env python3
'''
Created on Sept 9, 2014
@author: dusenberrymw
'''
import math
import os
import sys
import unittest
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..'))
# import pine.data
import pine.activation
import pine.network
import pine.trainer
import pine.util
# network... | mit |
benny568/ClubWebsiteAppA2 | app/components/findUs.component.ts | 210 | /**
* Created by odalybr on 08/04/2016.
*/
import { Component } from 'angular2/core';
@Component({
templateUrl: '/app/htmltemplates/findUs.component.html'
})
export class FindUsComponent {
} | mit |
elliotchance/c2go | ast/label_stmt_test.go | 368 | package ast
import (
"testing"
)
func TestLabelStmt(t *testing.T) {
nodes := map[string]Node{
`0x7fe3ba82edb8 <line:18906:1, line:18907:22> 'end_getDigits'`: &LabelStmt{
Addr: 0x7fe3ba82edb8,
Pos: NewPositionFromString("line:18906:1, line:18907:22"),
Name: "end_getDigits",
ChildNode... | mit |
Mulchman/DestinyRaidStatus | app/scripts/app.module.js | 245 | import angular from 'angular';
import { DrsAppModule } from './drsApp.module';
import { AppComponent } from './app.component';
export const AppModule = angular
.module('app', [
DrsAppModule
])
.component('app', AppComponent)
.name; | mit |
marko-js/marko | packages/translator-default/test/fixtures/attr-style/snapshots/html-expected.js | 1592 | import { t as _t } from "marko/src/runtime/html/index.js";
const _marko_componentType = "packages/translator-default/test/fixtures/attr-style/template.marko",
_marko_template = _t(_marko_componentType);
export default _marko_template;
import _marko_style_merge from "marko/src/runtime/helpers/style-value.js";
im... | mit |
rubygems/rubygems.org | app/controllers/notifiers_controller.rb | 1210 | class NotifiersController < ApplicationController
before_action :redirect_to_signin, unless: :signed_in?
def show
@ownerships = current_user.ownerships.by_indexed_gem_name
end
def update
to_enable_push, to_disable_push = notifier_options("push")
to_enable_owner, to_disable_owner = notifier_options... | mit |
picologic/project-dashboard | src/public/js/systemjs.config.js | 1751 | (function(global) {
var map = {
'app': 'app', // 'dist',
'@angular': 'node_modules/@angular',
'angular2-in-memory-web-api': 'node_modules/angular2-in-memory-web-api',
'rxjs': 'node_modules/rxjs',
'shared': ... | mit |
AgentME/braincrunch | test/format.js | 8323 | /* @flow */
import assert from 'assert';
import {parse} from '../src/parse';
import {serialize} from '../src/serialize';
const ADD = 0, RIGHT = 1,
OUT = 2, IN = 3,
OPEN = 4, CLOSE = 5,
CLEAR = 6, MUL = 7,
SCAN_LEFT = 8, SCAN_RIGHT = 9;
describe('parse', function() {
describe('normal', function() {
it(... | mit |
sskre/bookshelf | fuel/app/views/book/_form.php | 2401 | <?php echo Form::open(array("class"=>"form-horizontal")); ?>
<fieldset>
<div class="form-group">
<?php echo Form::label('Title', 'title', array('class'=>'control-label')); ?>
<?php echo Form::input('title', Input::post('title', isset($book) ? $book->title : ''), array('class' => 'col-md-4 form-control', 'pl... | mit |
robotex82/acts_as_time_versioned | spec/models/address_type_spec.rb | 130 | require 'spec_helper'
describe AddressType do
context 'validations' do
it { should validate_presence_of :name }
end
end
| mit |
alkammar/morkim | mfw/src/main/java/lib/morkim/mfw/repo/Filter.java | 412 | package lib.morkim.mfw.repo;
import java.util.HashMap;
import java.util.Set;
public abstract class Filter {
private HashMap<String, Object> map;
public Filter() {
map = new HashMap<String, Object>();
}
public void set(String key, Object value) {
map.put(key, value);
}
public Set<String> getKeys() {
... | mit |
KissKissBankBank/kitten | assets/javascripts/kitten/components/layout/grid/stories.js | 3792 | import React from 'react'
import { Grid, GridCol } from './index'
import { DocsPage } from 'storybook/docs-page'
export default {
title: 'Layout/Grid',
component: Grid,
decorators: [story => <div className="story-Container">{story()}</div>],
parameters: {
docs: {
page: () => (
<DocsPage filep... | mit |
mkzero/d3coder | js/menu_ui.js | 5523 | /**
* Localize the settings page
* curtesy of https://stackoverflow.com/a/25612056
*/
let localizeHtmlPage = function(){
let elems = document.getElementsByTagName('html');
for (let j = 0; j < elems.length; j++) {
let obj = elems[j];
let valStrH = obj.innerHTML.toString();
let valNewH = valStrH.repla... | mit |
leonjza/go-observe | cmd/submit.go | 1906 | package cmd
import (
"fmt"
"github.com/leonjza/go-observe/observatory"
"github.com/leonjza/go-observe/utils"
"github.com/spf13/cobra"
)
// variables for flags
var (
noHidden bool
forceRescan bool
)
// submitCmd represents the submit command
var submitCmd = &cobra.Command{
Use: "submit [url / hostname to... | mit |
nucleus-angular/form | equals-directive.js | 882 | /**
* Form validator for equals
*
* @module nag.form.validate.equals
* @ngdirective nagValidateEquals
*/
angular.module('nag.form.validate.equals', [])
.directive('nagValidateEquals', [
function() {
return {
restrict: 'A',
require: 'ngModel',
link: function(scope, element, attributes, contr... | mit |
sopanhavuth-aka-sam/cecs343-project | GUI/src/Card9.java | 1261 | import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
/**
* Card Description:
* Finding the Lab
* Play in Elevators (16)
* Success: Get 1 Integrity pts
* Fail: nothing
* @author sam
*
*/
public class Card9 extends Card{
//constructor
public Card9() {
name = "Finding the Lab";
... | mit |
srizzo/gm-google-map | src/js/directives/module.js | 12062 | angular.module('gm-google-map', [])
/**
* @description
*
* Shared map context. Publishes $scope.$setMap(map) and $scope.$getMap().
*
*/
.directive('gmMapContext', function() {
return {
scope: true,
restrict: 'EA',
controller: ["$scope", function ($scope) {
var _map;
$scope.$setMap = funct... | mit |
hyeonil/awesome-string | test/case/lower_case.js | 882 | import as from '../awesome-string';
import { expect } from 'chai';
describe('lowerCase', function() {
it('should return the lower case of a string', function() {
expect(as.lowerCase('Saturn')).to.be.equal('saturn');
expect(as.lowerCase('EARTH')).to.be.equal('earth');
expect(as.lowerCase('456')).to.be.eq... | mit |
orocrm/platform | src/Oro/Bundle/LocaleBundle/Tests/Unit/Form/Type/Stub/LocalizedFallbackValueCollectionTypeStub.php | 1305 | <?php
namespace Oro\Bundle\LocaleBundle\Tests\Unit\Form\Type\Stub;
use Oro\Bundle\LocaleBundle\Form\Type\LocalizedFallbackValueCollectionType;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\CollectionType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Co... | mit |
orocrm/platform | src/Oro/Bundle/UIBundle/Tests/Unit/Provider/ControllerClassProviderTest.php | 17122 | <?php
namespace Oro\Bundle\UIBundle\Tests\Unit\Provider;
use Oro\Bundle\UIBundle\Provider\ControllerClassProvider;
use Oro\Bundle\UIBundle\Tests\Unit\Fixture\Controller\SomeController;
use Oro\Bundle\UIBundle\Tests\Unit\Fixture\Controller\TestController;
use Oro\Bundle\UIBundle\Tests\Unit\Fixture\Controller\TestInvok... | mit |
seripap/vainglory | dist/models/resources/actors.js | 2099 | "use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = [{
"name": "Adagio",
"serverName": "*Adagio*"
}, {
"name": "Alpha",
"serverName": "*Alpha*"
}, {
"name": "Ardan",
"serverName": "*Ardan*"
}, {
"name": "Baptiste",
"serverName": "*Baptiste*"
}, {
"name": "... | mit |
swarajgiri/express-bootstrap | bootstrap/app.js | 2490 | 'use strict';
const express = require('express'),
config = require('../cfg'),
app = express(),
exphbs = require('express-handlebars'),
compress = require('compression'),
hpp = require('hpp'),
bodyParser = require('body-parser'),
log = require(... | mit |
bericp1/pop-culture | public/quiz/QuizResource.js | 372 | /*exported QuizQuizResource */
var QuizQuizResource = (function(){
'use strict';
return ['$resource', function($resource){
return $resource(
'/quiz/quiz/:_id',
{'_id':'@_id'},
{
'deleteAll': {
method: 'DELETE',
isArray: true,
params: {
'_id': '... | mit |
pib/hamsterdrop | demos/vector/bullet.js | 6664 |
/**
* The Render Engine
* Example Game: Spaceroids - an Asteroids clone
*
* The bullet object
*
* @author: Brett Fattori (brettf@renderengine.com)
*
* @author: $Author: bfattori $
* @version: $Revision: 1449 $
*
* Copyright (c) 2010 Brett Fattori (brettf@renderengine.com)
*
* Permission is h... | mit |
DazzyG/HolidayCards | app/src/main/java/uk/co/dazcorp/android/holidaycards/CardContainer.java | 18206 | package uk.co.dazcorp.android.holidaycards;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.animation.ValueAnimator;
import android.content.Context;
import android.content.res.Typ... | mit |
asiboro/asiboro.github.io | vsdoc/search--/s_2930.js | 81 | search_result['2930']=["topic_000000000000070A.html","CompanyVideoDto Class",""]; | mit |
townie/KeithWebber_LeadMailer | spec/models/identity_spec.rb | 265 | require 'spec_helper'
describe Identity do
it { should belong_to(:user) }
it { should validate_presence_of(:user_id) }
it { should validate_presence_of(:uid) }
it { should validate_presence_of(:provider) }
it { should validate_presence_of(:uid) }
end
| mit |
SimplyCpp/examples | random_util/program.cpp | 718 | //Sample provided by Fabio Galuppo
//October 2016
//http://www.simplycpp.com
//compile clang++: (Apple LLVM version 8.0.0 (clang-800.0.38))
//clang++ -Wall -O2 -std=c++14 -o program.exe program.cpp sample1.cpp sample2.cpp sample3.cpp
//compile g++: (g++ (GCC) 5.3.0)
//g++ -Wall -O2 -std=c++14 -o program.exe program... | mit |
hasadna/anyway | anyway/widgets/suburban_widgets/most_severe_accidents_widget.py | 2348 | import logging
from typing import Dict
from flask_babel import _
from anyway.request_params import RequestParams
from anyway.backend_constants import AccidentSeverity, AccidentType
from anyway.widgets.suburban_widgets.most_severe_accidents_table_widget import (
get_most_severe_accidents_with_entities,
)
... | mit |
mmalecki/node-authorized-keys | test/authorized-keys-test.js | 1005 | var assert = require('assert'),
vows = require('vows'),
AuthorizedKeys = require('../');
var testKey = { type: 'ssh-rsa', content: 'mykey', name: 'maciej' };
vows.describe('authorized-keys').addBatch({
'When using `authorized-keys`': {
'with a new `AuthorizedKeys` object': {
topic: new AuthorizedK... | mit |
gejiawen/test-async | collections/reduce/2.2.js | 1170 | /**
* @file: 2.2
* @author: gejiawen
* @date: 15/10/26 23:02
* @description: 2.2
*/
var async = require('async');
var t = require('../../t');
var log = t.log;
/**
* Reduce可以让我们给定一个初始值,用它与集合中的每一个元素做运算,最后得到一个值。
* reduce从左向右来遍历元素,如果想从右向左,可使用reduceRight。
*/
//reduce(arr, memo, iterator(memo,item,callback), callb... | mit |
kartikpalani/Smart-Energy-Hackathon | YARA-SmartOp/js/i18n/chart.locale-fa.js | 1525 | (function ($) {
/**
* jqChart Persian Translation
* http://www.jqchart.com/
*
* In order to use a particular language pack, you need to include the javascript language
* pack to the head of your page, after the jQuery library reference (since language
* packs depend on jQue... | mit |
Azure/azure-sdk-for-ruby | management/azure_mgmt_netapp/lib/2020-11-01/generated/azure_mgmt_netapp/models/hourly_schedule.rb | 1859 | # encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
module Azure::NetApp::Mgmt::V2020_11_01
module Models
#
# Hourly Schedule properties
#
class HourlySchedule
include MsRestAzure
... | mit |
cakemanager/cakeadmin-adminbar | src/Controller/AdminBarController.php | 1179 | <?php
/**
* CakeManager (http://cakemanager.org)
* Copyright (c) http://cakemanager.org
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright (c) http://cakemanag... | mit |
LambertPark/A_NScreen | NScreen/app/src/main/java/com/stvn/nscreen/vod/VodMainOtherTabFragment.java | 39320 | package com.stvn.nscreen.vod;
import android.app.Activity;
import android.app.Fragment;
import android.app.ProgressDialog;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android... | mit |
stivalet/PHP-Vulnerability-test-suite | Injection/CWE_78/safe/CWE_78__SESSION__func_preg_replace__cat-interpretation_simple_quote.php | 1199 | <?php
/*
Safe sample
input : get the UserData field of $_SESSION
SANITIZE : use of preg_replace
construction : interpretation with simple quote
*/
/*Copyright 2015 Bertrand STIVALET
Permission is hereby granted, without written agreement or royalty fee, to
use, copy, modify, and distribute this software and its ... | mit |