repo_name
stringlengths
4
116
path
stringlengths
4
379
size
stringlengths
1
7
content
stringlengths
3
1.05M
license
stringclasses
15 values
Jspsun/LEETCodePractice
Python/PowerOfTwo.py
325
class Solution(object): def isPowerOfTwo(self, n): """ :type n: int :rtype: bool """ if n == 1 or n == 2: return True number = 2 while (number <= n): number *= 2 if(number == n): return True return F...
mit
romainneutron/PHPExiftool
lib/PHPExiftool/Driver/Tag/Font/LicenseInfoURL.php
781
<?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\Font; use JMS\Serializer\Annotation\ExclusionPolicy; us...
mit
rainliu/sip
Response.go
3737
package sip import ( "bytes" "fmt" "io" "strings" ) type Response interface { Message SetStatusCode(statusCode int) error GetStatusCode() int SetReasonPhrase(reasonPhrase string) error GetReasonPhrase() string } const ( TRYING = 100 RINGING = 180 CA...
mit
mjmasn/meteor
packages/ddp-client/livedata_connection_tests.js
72139
import lolex from 'lolex'; var newConnection = function (stream, options) { // Some of these tests leave outstanding methods with no result yet // returned. This should not block us from re-running tests when sources // change. return new LivedataTest.Connection(stream, _.extend({ reloadWithOutstanding: tr...
mit
tphx/StreamChatSharp
StreamChatSharp/StreamChatSharp/OutgoingMessageQueue.cs
4955
using System; using System.Collections.Concurrent; using System.Timers; namespace Tphx.StreamChatSharp { /// <summary> /// Queues messages that are destined for the chat and provides flood control. /// </summary> class OutgoingMessageQueue : IDisposable { /// <summary> /// Triggere...
mit
lechimp-p/php-formlets
src/Internal/Form.php
5023
<?php /****************************************************************************** * An implementation of the "Formlets"-abstraction in PHP. * Copyright (c) 2014, 2015 Richard Klees <richard.klees@rwth-aachen.de> * * This software is licensed under The MIT License. You should have received * a copy of the alon...
mit
jaryway/api
Api.Lanxin/Logging/Null/NullLogger.cs
1316
using log4net; using System; namespace Api.Lanxin.Logging.Null { /// <summary> /// /// </summary> public class NullLogger : ILogger { //private ILog _logger; /// <summary> /// /// </summary> internal NullLogger() { //_logger = log; ...
mit
GluuFederation/oxAsimba
selector/src/main/java/org/gluu/authentication/remote/saml2/selector/ApplicationSelector.java
2470
package org.gluu.authentication.remote.saml2.selector; import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.w3c.dom.Element; import com...
mit
mcleanra/sp-rest-proxy
src/routers/restGet.ts
2323
import { ProxyUtils } from '../utils'; import { IProxyContext, IProxySettings } from '../interfaces'; import { ISPRequest } from 'sp-request'; import { Request, Response, NextFunction } from 'express'; export class RestGetRouter { private spr: ISPRequest; private ctx: IProxyContext; private settings: IProxySett...
mit
jeremythuff/WebGL-Planets-Client
src/engine/utils/assets/AjaxLoader.js
1664
import { Service } from "context/Service"; import { Deferred } from "engine/extensions/Deferred"; export class AjaxLoader { constructor(headers) { this.headers = typeof headers !== undefined ? headers: {}; } GET(url) { let deferred = new Deferred(); _makeXhrReq("GET", url, null, deferred); return defer...
mit
emiloberg/liferay-ddmtool
lib/saveStructures.js
4280
"use strict"; var fs = require('fs-extra'); var _ = require('underscore'); var utilities = require('./utilities.js'); var Constants = require('./Constants.js'); var LrClassNameConfig = require('./ClassNameConfig.js'); var Table = require('cli-table'); var sa...
mit
objorke/oxyplot
Source/Examples/DrawingLibrary/Examples/OpenStreetMapExamples/OpenStreetMapExamples.cs
4003
namespace DrawingLibrary.Examples { using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using DrawingDemo; using OsmLibrary; using OxyPlot; using OxyPlot.Drawing; public static class OpenStreetMapExamples { [Example("OSM Høvik"...
mit
thinkerbot/series_calc
benchmark/series_calc/core_bench.rb
338
#!/usr/bin/env ruby require File.expand_path("../../helper", __FILE__) Benchmark.bm(35) do |bm| n = 100 nk = n * 1000 tries = 3 m = 100 mk = m * 1000 array = Array.new(mk) tries.times do |try| bm.report("#{n} #{m}k-array#each (#{try})") do n.times do array.each(&:object_id) end ...
mit
pap/elixirscript
priv/javascript/lib/processes/processes/states.js
444
export default { NORMAL: Symbol.for("normal"), KILL: Symbol.for("kill"), SUSPEND: Symbol.for("suspend"), CONTINUE: Symbol.for("continue"), RECEIVE: Symbol.for("receive"), SEND: Symbol.for("send"), SLEEPING: Symbol.for("sleeping"), RUNNING: Symbol.for("running"), SUSPENDED: Symbol.for("suspended"), S...
mit
callemall/material-ui
packages/material-ui-icons/src/NineteenMpSharp.js
374
import * as React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <React.Fragment><path d="M13.5 6.5H15V8h-1.5zM15 14h1.5v1.5H15z" /><path d="M3 3v18h18V3H3zm9 7h3V9h-3V5.5h4.5v6H12V10zM7 5.5h3v6H8.5V7H7V5.5zm5.5 13H11V14h-1v3H8.5v-3h-1v4.5H6v-6h6.5v6zM18 17h-3v1.5h-1.5...
mit
softwarespartan/AGT
tests/ProcessingSessionValidate.py
5025
import Processing; import unittest class TestFunctions(unittest.TestCase): def setUp(self): # initialize a configuration object self.session = Processing.Session(); # init session object properly self.session.options['year'] = 2012; self.session.options['d...
mit
IonicaBizau/vowels
lib/index.js
50
module.exports = [ "a", "e", "i", "o", "u" ];
mit
codyaverett/CMNH-carshow
mean/modules/users/client/services/judges.client.service.js
1562
'use strict'; // Authentication service for user variables angular.module('users').factory('Judges', ['Classes', function(Classes) { var strings = { carstrucks:[ 'Paint - Overall Paint Job', 'Body & Exterior Modifications', 'Engine Modifications', ...
mit
xiao-T/vue-5253
src/js/game-list-detail.js
2667
/** * Create by xiaoT * at 2015-11-23 */ ;(function(){ var GameListDetail = function(){ var _this = this; _this.gameGroupId = common.getParam('gameGroupId') || 10; _this.pageIndex = 0; _this.gameListDetailWrap = $('#js-game-list-detail'); _this.gameListBase = $('#js-game...
mit
nationalfield/symfony
lib/plugins/sfDoctrinePlugin/test/functional/fixtures/lib/form/doctrine/ProfileForm.class.php
253
<?php /** * Profile form. * * @package form * @subpackage Profile * @version SVN: $Id: ProfileForm.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $ */ class ProfileForm extends BaseProfileForm { public function configure() { } }
mit
wangyanxing/Demi3D
src/tools/HonFxer/Editor/EditorManager.cpp
21635
/********************************************************************** This source file is a part of Demi3D __ ___ __ __ __ | \|_ |\/|| _)| \ |__/|__| || __)|__/ Copyright (c) 2013-2014 Demi team https://github.com/wangyanxing/Demi3D Released under the MIT License https://github.com/wangyanxing/De...
mit
s3db/s3db
read.php
2441
<?php #acecpts an S3QL query to download the queried file #Helena F Deus, March 18, 2009 ini_set('display_errors',0); if($_REQUEST['su3d']) { ini_set('display_errors',1); } if(file_exists('config.inc.php')) { include('config.inc.php'); } else { Header('Location: index.php'); exit; } incl...
mit
TGITS/programming-workouts
java/misc/camera/src/main/java/com/github/tgits/camera/Camera.java
1435
package com.github.tgits.camera; /** * Example taken from Functional Programming in Java from Venkat Subramaniam, * Chapter 4 "Designing with Lambda Expressions" */ import java.awt.*; import java.util.Arrays; import java.util.function.Consumer; import java.util.function.Function; @SuppressWarnings("unchecked") p...
mit
jakulov/bun
src/Core/Repository/AbstractRepository.php
3933
<?php namespace Bun\Core\Repository; use Bun\Core\Config\ConfigAwareInterface; use Bun\Core\Config\ConfigInterface; use Bun\Core\Model\ModelInterface; use Bun\Core\ObjectMapper\ObjectMapperInterface; /** * Class AbstractRepository * * @package Bun\Core\Repository */ abstract class AbstractRepository implements Re...
mit
Leo-g/Flask-Scaffold
app/templates/static/node_modules/karma-jasmine-html-reporter/src/index.js
839
var JASMINE_CORE_PATTERN = /([\\/]karma-jasmine[\\/])/i; var createPattern = function (path) { return { pattern: path, included: true, served: true, watched: false }; }; var initReporter = function (files, baseReporterDecorator) { var jasmineCoreIndex = 0; baseReporterDecorator(this); files.forEach(function ...
mit
Lloople/deployer
app/Factories/MessengerFactory.php
540
<?php namespace Deployer\Factories; use Deployer\Exceptions\MessengerNotFound; class MessengerFactory { public function create($class, $configuration) { $messengerClass = $this->getMessengerClass($class); if (! class_exists($messengerClass)) { throw new MessengerNotFound(); ...
mit
ARCANESOFT/Tracker
resources/views/admin/_composers/dashboard/referers-ratio-list.blade.php
2040
<div class="box"> <div class="box-header with-border"> <h2 class="box-title">{{ trans('tracker::referers.titles.referers') }}</h2> </div> <div class="box-body no-padding"> <div class="table-responsive"> <table class="table table-condensed table-hover no-margin"> <...
mit
ArijitK2015/love_-architect
application/controllers/Admin_email_template.php
3990
<?php class Admin_email_template extends MY_Controller { public function __construct() { parent::__construct(); } /** * Load the main view with all the current model model's data. * @return void */ public function index() { $data['info'] = $this->email_template_model->get_tempalte_info(); $data...
mit
e-budur/detective-criminal-name-search
Detective.Web/App_Start/BundleConfig.cs
1873
using System; using System.Collections.Generic; using System.Linq; using System.Web.Optimization; namespace Detective.Web { public class BundleConfig { // For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862 public static void RegisterBundles(BundleCo...
mit
azihsoyn/gocovercache
gocovercache_test.go
331
package main import ( "testing" "github.com/kr/pretty" ) func TestCalcCheckSum(t *testing.T) { checksum := calcCheckSum("./") pretty.Println("checksum : ", checksum) } func TestGetAbsolutePackageDir(t *testing.T) { pkgDir := getAbsolutePackageDir("github.com/azihsoyn/gocovercache") pretty.Println("pkgDir : ",...
mit
Tommmi/Reunion
source/Reunion.Common/Model/TimeRange.cs
2205
using System; using System.ComponentModel.DataAnnotations; namespace Reunion.Common.Model { /// <summary> /// Entity which represents a date range intervall, when the given player can come or not. /// TimeRange is associated with exactly one reunion and one player /// </summary> public class TimeRange { /// <...
mit
mayc2/PseudoKnot_research
HotKnots_v2.0/LE/commonPK_old.cpp
74461
/*************************************************************************** common.cpp - description ------------------- begin : Thu Apr 11 2002 copyright : (C) 2002 by Mirela Andronescu email : andrones@cs.ub...
mit
layabox/layaair
src/layaAir/laya/ui/View.ts
8283
import { Widget } from "./Widget"; import { Animation } from "../display/Animation" import { Scene } from "../display/Scene" import { Sprite } from "../display/Sprite" import { Text } from "../display/Text" import { Event } from "../events/Event" import { Box } from "./Box" import { Button } from "./Button" import { Ch...
mit
ampedandwired/bottle-swagger
test/test_bottle_swagger.py
10499
from unittest import TestCase from bottle import Bottle, redirect from bottle_swagger import SwaggerPlugin from webtest import TestApp class TestBottleSwagger(TestCase): VALID_JSON = {"id": "123", "name": "foo"} INVALID_JSON = {"not_id": "123", "name": "foo"} SWAGGER_DEF = { "swagger": "2.0", ...
mit
asiboro/asiboro.github.io
vsdoc/search--/s_3780.js
85
search_result['3780']=["topic_000000000000090D.html","UserDto.LastName Property",""];
mit
japaz/WasThreadStackProcessor
spec/threadStack_spec.rb
4084
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') require 'threadStack' describe ThreadStack do describe "After creation" do it "must contains the stack passed as an Array" do stack = ['at com/ibm/io/async/AsyncLibrary.aio_getioev3(Native Method)', 'at com/ibm/io/async/AsyncLibrary.getComple...
mit
wilkenstein/redis-mock-java
src/test/java/org/rarefiedredis/redis/adapter/jedis/JedisIRedisClientHashIT.java
30499
package org.rarefiedredis.redis.adapter.jedis; import org.junit.Test; import org.junit.Before; import org.junit.Ignore; import static org.junit.Assert.assertEquals; import java.util.Set; import java.util.HashSet; import java.util.List; import java.util.ArrayList; import redis.clients.jedis.JedisPool; import redis.cl...
mit
dvhassel/player
src/extensions/coreplayer-seadragon-extension/extension.ts
8973
/// <reference path="../../js/jquery.d.ts" /> /// <reference path="../../js/extensions.d.ts" /> import baseExtension = require("../../modules/coreplayer-shared-module/baseExtension"); import utils = require("../../utils"); import baseProvider = require("../../modules/coreplayer-shared-module/baseProvider"); import pro...
mit
tinylabproductions/tlplib
parts/0000-TLPLib/Assets/Vendor/TLPLib/unity/Utilities/ArrayUtils.cs
603
using System; using System.Collections.Generic; using tlplib.exts; namespace com.tinylabproductions.TLPLib.Utilities { public static class ArrayUtils { static readonly Dictionary<Type, object> emptyArrays = new Dictionary<Type, object>(); /** * When you have a serialized array in Unity if the as...
mit
edbiler/BazaarCorner
file/cache_for_deletion/block/file_94.php
325
<?php defined('PHPFOX') or exit('NO DICE!'); ?> <?php $aContent = array ( 'block_id' => '94', 'type_id' => '0', 'ordering' => '4', 'm_connection' => 'photo.index', 'component' => 'cloud', 'location' => '3', 'disallow_access' => NULL, 'can_move' => '0', 'module_id' => 'tag', 'source_parsed' => NULL, ...
mit
MaSys/m_cfdi
lib/m_cfdi/key.rb
495
module MCFDI require 'openssl' # openssl pkcs8 -inform DER -in file.key -passin pass:password >> file.pem class Key < OpenSSL::PKey::RSA def initialize(file, password=nil) if file.is_a? String file = File.read(file) end super file, password end def seal(invoice) ori...
mit
mathiasbynens/unicode-data
3.2.0/scripts/GOTHIC-code-points.js
338
// All code points in the `GOTHIC` script as per Unicode v3.2.0: [ 0x10330, 0x10331, 0x10332, 0x10333, 0x10334, 0x10335, 0x10336, 0x10337, 0x10338, 0x10339, 0x1033A, 0x1033B, 0x1033C, 0x1033D, 0x1033E, 0x1033F, 0x10340, 0x10341, 0x10342, 0x10343, 0x10344, 0x10345, 0x10346, 0x10347, 0x10348, 0x...
mit
mattiasliljenzin/webapi-cart
CrazyCart/CrazyCart.Tests/Properties/AssemblyInfo.cs
1365
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("web...
mit
cosminseceleanu/react-sb-admin-bootstrap4
src/components/pages/admin.js
468
import React from 'react'; import {Container} from 'reactstrap'; import Dashboard from './dashboard'; import NavigationContainer from '../../containers/navigation-container'; const Admin = () => { return ( <div> <NavigationContainer/> <div className="content-wrapper"> ...
mit
Promact/trappist
Trappist/src/Promact.Trappist.Web/wwwroot/app/profile/profile-edit/profile-edit.component.ts
1414
import { Component, OnInit, ViewChild } from '@angular/core'; import { MdSnackBar } from '@angular/material'; import { Router } from '@angular/router'; import { ApplicationUser } from '../profile.model'; import { ProfileService } from '../profile.service'; @Component({ moduleId: module.id, selector: 'profile-...
mit
gnuine/ubiquo_versions
lib/ubiquo_versions/extensions.rb
357
module UbiquoVersions module Extensions autoload :ActiveRecord, 'ubiquo_versions/extensions/active_record' autoload :Helpers, 'ubiquo_versions/extensions/helpers' end end ActiveRecord::Base.send(:include, UbiquoVersions::Extensions::ActiveRecord) Ubiquo::Extensions::Loader.append_helper(:UbiquoController, ...
mit
thewizardplusplus/wizard-budget
app/src/main/assets/web/scripts/main.js
39555
var LOADING_LOG_CLEAN_DELAY = 2000; var LOADING_LOG = { getTypeMark: function(type) { if (type == 'success') { return '<i class = "fa fa-check-circle"></i>'; } else if (type == 'error') { return '<i class = "fa fa-times-circle"></i>'; } else { return '<i class = "fa fa-info-circle"></i>'; } }, getTy...
mit
mastermike14/imdb
lib/imdb/movie_list.rb
961
module Imdb class MovieList def movies @movies ||= parse_movies end private def parse_movies document.search("a[@href^='/title/tt']").reject do |element| element.inner_html.imdb_strip_tags.empty? || element.inner_html.imdb_strip_tags == "X" || element.parent.inner...
mit
QuinntyneBrown/azure-search-getting-started
src/Chloe/Server/Dtos/ProductsViewContainerComponentAddOrUpdateResponseDto.cs
331
using Chloe.Server.Models; namespace Chloe.Server.Dtos { public class ProductsViewContainerComponentAddOrUpdateResponseDto: ProductsViewContainerComponentDto { public ProductsViewContainerComponentAddOrUpdateResponseDto(ProductsViewContainerComponent entity) :base(entity) { ...
mit
matis140/BeeKeeper
e2e-tests/scenarios.js
932
'use strict'; /* https://github.com/angular/protractor/blob/master/docs/toc.md */ describe('BeeKeeper app', function() { it('should automatically redirect to /home when location hash/fragment is empty', function() { browser.get('index.html'); expect(browser.getLocationAbsUrl()).toMatch("/home"); }); ...
mit
Quantisan/WholeCell
simulation/doc/doxygen/html/class_transcription.js
864
var class_transcription = [ [ "plotBound_Transcription_Factors", "class_transcription.html#a11f7566cf08407dad38696e22c8a2dcf", null ], [ "plotNMPs", "class_transcription.html#a3e0acc8ade4757b798dd9a00406b0e25", null ], [ "plotNTPs", "class_transcription.html#a80e75448c1cdfc7eeef9a010f862b36c", null ], [...
mit
thilehoffer/Student-Assessment-Web
KindAssessment/KindAssessment/Scripts/TypeScript/Assessments/ScoreCard.js
1066
var App; (function (App) { var Assessments; (function (Assessments) { var ScoreCard = (function () { function ScoreCard(total, $countElement, $totalElement) { this.total = total; this.$countElement = $countElement; this.$totalElement = $totalEl...
mit
wazsmwazsm/QinBlog
application/home/views/home/archive.php
687
<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?> <div class="uk-width-medium-1-1"> <div class="position"> <span>当前位置 : <?php echo anchor('Home/index','首页'); ?> -> <?php echo anchor('Home/archive','归档'); ?></span> </div> <div class="uk-panel uk-panel-box"> <h3 class="u...
mit
stivalet/PHP-Vulnerability-test-suite
Injection/CWE_91/safe/CWE_91__exec__func_FILTER-CLEANING-number_float_filter__ID_test-concatenation_simple_quote.php
1586
<?php /* Safe sample input : use exec to execute the script /tmp/tainted.php and store the output in $tainted Uses a number_float_filter via filter_var function construction : concatenation with simple quote */ /*Copyright 2015 Bertrand STIVALET Permission is hereby granted, without written agreement or royalty f...
mit
mibitzi/stwm
entities/workspace/workspace_test.go
1538
package workspace import ( "testing" "github.com/stretchr/testify/assert" "github.com/mibitzi/stwm/layout/tiling" "github.com/mibitzi/stwm/rect" "github.com/mibitzi/stwm/test/client" ) func TestAddClient(t *testing.T) { ws := New("ws", tiling.New(rect.New(0, 0, 100, 100))) ws.Show() client := client.New() ...
mit
Serulab/Py4Bio
code/ch14/scatter.py
618
from bokeh.charts import Scatter, output_file, show x = [1, 2, 3, 4, 5, 6, 7, 8] y = [2.1, 6.45, 3, 1.4, 4.55, 3.85, 5.2, 0.7] z = [.5, 1.1, 1.9, 2.5, 3.1, 3.9, 4.85, 5.2] species = ['cat', 'cat', 'cat', 'dog', 'dog', 'dog', 'mouse', 'mouse'] country = ['US', 'US', 'US', 'US', 'UK', 'UK', 'BR', 'BR'] df = {'time': x,...
mit
PaulSolt/GLUT-Object-Oriented-Framework
src/PerformanceTimer.cpp
2790
/* * The MIT License * * Copyright (c) 2010 Paul Solt, PaulSolt@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 right...
mit
victor-timoshin/WCFService_Customers
ave.DTO.Customers/ResponseServiceObject.cs
192
using System.Runtime.Serialization; namespace ave.DTO.Customers { [DataContract] public class ResponseServiceObject { [DataMember] public ResponseService response { get; set; } } }
mit
pelleanka/Opus
webroot/config.php
1531
<?php /** * Config-file for Opus. Change settings here to affect installation. * */ /** * Set the error reporting. * */ error_reporting(-1); // Report all type of errors ini_set('display_errors', 1); // Display all errors ini_set('output_buffering', 0); // Do not buffer outputs, write direct...
mit
pavel-pimenov/sandbox
mediainfo/MediaInfoLib/Source/MediaInfo/Audio/File_Pcm_M2ts.cpp
6573
/* Copyright (c) MediaArea.net SARL. All Rights Reserved. * * Use of this source code is governed by a BSD-style license that can * be found in the License.html file in the root of the source tree. */ //--------------------------------------------------------------------------- // Pre-compilation #include "Medi...
mit
victor-prado/broker-manager
broker-manager/Main.py
1905
import tkinter as tk import pandas as pd #from Data import Data from NewClient import NewClient from NewCorporation import NewCorporation from SearchClient import SearchClient from SearchDate import SearchDate from SearchCorporation import SearchCorporation from Dates import Reminder def addClient(): "Execute cla...
mit
mauretto78/in-memory-list
tests/Command/StatisticsCommandTest.php
3257
<?php use InMemoryList\Command\StatisticsCommand; use InMemoryList\Tests\BaseTestCase; use Symfony\Component\Console\Application; use Symfony\Component\Console\Tester\CommandTester; class StatisticsCommandTest extends BaseTestCase { /** * @var Application */ private $app; public function setUp(...
mit
wipu/iwant
essential/iwant-core/src/main/java/org/fluentjava/iwant/core/ScriptGeneratedContent.java
2779
package org.fluentjava.iwant.core; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.InputStream; import java.io.PrintStream; import java.util.SortedSet; import java.util.TreeSet; import org.apache.tools.ant.Project; import org.apache.tools.ant.taskdefs.Chmod; import org.apache.tools.ant.taskd...
mit
occiware/OCCInterface
src/components/buttons/EditButton.js
2635
import React from 'react'; import { connect } from 'react-redux'; import {callAPI} from '../../utils.js'; import * as actions from '../../actions/actionIndex.js'; class EditButton extends React.Component{ editButton = () => { //we delete the error message this.props.setErrorMessage('', ''); //we delete...
mit
christianlimanto95/ericwee
application/controllers/Home.php
644
<?php defined('BASEPATH') OR exit('No direct script access allowed'); //include general controller supaya bisa extends General_controller require_once("application/core/General_controller.php"); class Home extends General_controller { public function __construct() { parent::__construct(); $this->load->model("Hom...
mit
abdurrachman-habibi/gulp-lazy-minify
index.js
2081
var fs = require('fs'); var path = require('path'); var through = require('through2'); var gutil = require('gulp-util'); var gulpFile = require('gulp-file'); var uglify = require('gulp-uglify'); var minifyCss = require('gulp-minify-css'); var File = gutil.File; var PluginError = gutil.PluginError; var fn = function (f...
mit
arider/riderml
riderml/tests/util/test_preprocessing.py
6108
import numpy import unittest from unittest import TestCase from ...util.preprocessing import ( as_matrix, as_row, sparse_filtering_normalizer, bin_data, sparse_encoding, sparse_implicit_encoding, row_indicators) class SparseFilteringNormNormalizerTest(TestCase): def test_list_normalize...
mit
looking-promising/privfiles
client/test/spec/controllers/about.js
552
'use strict'; describe('Controller: AboutCtrl', function () { // load the controller's module beforeEach(module('privfilesApp')); var AboutCtrl, scope; // Initialize the controller and a mock scope beforeEach(inject(function ($controller, $rootScope) { scope = $rootScope.$new(); AboutCtrl = $c...
mit
1ed/gitlab-cookbook
recipes/database.rb
1095
# # Cookbook Name:: gitlab # Recipe:: database # # Copyright (C) 2013 Gábor Egyed # # For the full copyright and license information, please view the LICENSE # file that was distributed with this source code. # include_recipe "mysql::client" include_recipe "mysql::server" include_recipe "mysql::ruby" # include the sec...
mit
strava/go.serversets
watch_test.go
2224
package serversets import ( "sort" "testing" ) func TestWatchSortEndpoints(t *testing.T) { set := New(Test, "gotest", []string{TestServer}) watch, err := set.Watch() if err != nil { t.Fatal(err) } defer watch.Close() ep1, err := set.RegisterEndpoint("localhost", 1002, nil) if err != nil { t.Fatal(err) ...
mit
Azure/azure-sdk-for-go
services/containerinstance/mgmt/2021-09-01/containerinstance/models.go
67303
package containerinstance // 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 r...
mit
jirutka/gitlabhq
app/models/clusters/applications/ingress.rb
1435
# frozen_string_literal: true module Clusters module Applications class Ingress < ActiveRecord::Base VERSION = '0.23.0'.freeze self.table_name = 'clusters_applications_ingress' include ::Clusters::Concerns::ApplicationCore include ::Clusters::Concerns::ApplicationStatus include ::...
mit
CoralineAda/alice
spec/models/command_string_spec.rb
566
require 'spec_helper' describe Message::CommandString do let(:command) { Message::CommandString.new("!drop the object.") } describe "#components" do it "breaks its text ino an array of words" do expect(command.components).to eq(["drop", "the", "object"]) end end describe "#fragment" do ...
mit
joshbayley/spacetrader-unity
Assets/GUI/Screens/Missions/MissionsMenu.cs
2159
#pragma warning disable 0649 using UnityEngine; using UnityEngine.UI; using System.Collections; using UnityEngine.SceneManagement; public class MissionsMenu : MonoBehaviour { [SerializeField] private Transform missionsLayout; [SerializeField] private MissionMenuItem missionElementPrefab; [Seria...
mit
Ivoz/flask-uwsgi-websocket
examples/chat-gevent/chat.py
609
#!/usr/bin/env python from flask import Flask, render_template from flask.ext.uwsgi_websocket import GeventWSApp app = Flask(__name__) ws = GeventWebSocket(app) users = {} @app.route('/') def index(): return render_template('index.html') @ws.route('/websocket') def chat(ws): users[ws.id] = ws while Tru...
mit
avanov/solo
solo/server/sessions/__init__.py
85
from .session import Session, update_session __all__ = ('Session', 'update_session')
mit
danbickford007/ruby_chat
lib/commands.rb
3952
class Commands attr_accessor :used, :clients def initialize msg=nil, client=nil, categories=nil, category=nil, username=nil, clients=nil @msg = msg @client = client @categories = categories @category = category @username = username @clients = clients @used = false end def check ...
mit
Microsoft/WPF-Samples
Windows/Wizard/WizardReturnEventArgs.cs
455
// // Copyright (c) Microsoft. All rights reserved. // // Licensed under the MIT license. See LICENSE file in the project root for full license information. namespace Wizard { public class WizardReturnEventArgs { public WizardReturnEventArgs(WizardResult result, object data) { Resul...
mit
StephenClearyApps/DotNetApis
service/DotNetApis.Logic/GenerationScope.cs
791
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using DotNetApis.Common; using DotNetApis.Logic.Assemblies; using DotNetApis.Nuget; namespace DotNetApis.Logic { public sealed class GenerationScope : ScopeBase<GenerationScope> { privat...
mit
stivalet/PHP-Vulnerability-test-suite
XSS/CWE_79/unsafe/CWE_79__system__func_FILTER-CLEANING-special_chars_filter__Use_untrusted_data_script-window_SetInterval.php
1445
<!-- Unsafe sample input : execute a ls command using the function system, and put the last result in $tainted Uses a special_chars_filter via filter_var function File : unsafe, use of untrusted data in the function setInterval --> <!--Copyright 2015 Bertrand STIVALET Permission is hereby granted, without written a...
mit
vistarsoft/git-log-viewer
src/modules/detail/reducers/repository.js
336
import ActionType from 'constants/actiontype.js'; export default (state = {}, action) => { switch (action.type) { case ActionType.UPDATE_REPOSITORY: return state.merge(action.data); case ActionType.CHANGE_BRANCH: return state.set('currentBranch', action.data); default: return...
mit
hereforu/tizen-multimedia-apps
transcoder/src/popupprogress.cpp
2406
/* * popupprogress.cpp * * Created on: Jun 30, 2016 * Author: Jason */ #include "popupprogress.h" #include <stdexcept> PopupProgress::PopupProgress() :m_cancelbtn(NULL), m_pb(NULL), m_popup(NULL), m_parent(NULL) { } PopupProgress::~PopupProgress() { } void PopupProgress::Create(Evas_Object* parent, Porg...
mit
ryan-laurence/stic
js/validator.js
164973
<!DOCTYPE html> <html lang="en" class=" is-copy-enabled is-u2f-enabled"> <head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# object: http://ogp.me/ns/object# article: http://ogp.me/ns/article# profile: http://ogp.me/ns/profile#"> <meta charset='utf-8'> <link crossorigin="anonymous" href="https:/...
mit
hzouba/BestTrip2
app/cache/dev/twig/0/0/001c4b0e86622232bf82d2e007d2d8b9f8a32f898188508bf461c0ee975e4d9a.php
5150
<?php /* @WebProfiler/Profiler/toolbar_js.html.twig */ class __TwigTemplate_001c4b0e86622232bf82d2e007d2d8b9f8a32f898188508bf461c0ee975e4d9a extends Twig_Template { public function __construct(Twig_Environment $env) { parent::__construct($env); $this->parent = false; $this->blocks = a...
mit
sketch7/ssv-ng-dojo
src/app/app.const.ts
701
export class AppConst { moduleName = "app-heroes"; templateModuleName = "app-heroes.tmpls"; basePath = "/dist/app"; controllerAs = "vm"; name = "Heroes"; version = "1.0.0-alpha"; routeStates = new RouteStateConfig(); events = { myEvent: "example", uiRouter: { $stateChangeError: "$stateChangeError", ...
mit
sorahavok/java-games
src/tetris/factories/ColorFactory.java
881
package tetris.factories; import java.awt.Color; import java.util.ArrayList; import java.util.List; public class ColorFactory { private final static int ALPHA = 160; private final static List<Color> colors = new ArrayList<>(); private final static List<String> colorNames = new ArrayList<>(); public static Colo...
mit
Taerus/DTA-Services
src/main/java/com/dta/services/dao/ICategoryDao.java
351
package com.dta.services.dao; import java.util.List; import com.dta.services.model.Category; /** * * Interface of dao layout of category * * @author Hugo Dumont * */ public interface ICategoryDao { void create(Category category); Category getById(long id); List<Category> list(); void update(Category cate...
mit
alsatian-test/alsatian
packages/alsatian/test/unit-tests/running/test-runner/pre-test.spec.ts
6081
import { Test, Expect, Setup, SpyOn, Teardown, TestCase, Timeout } from "../../../../core/alsatian-core"; import { TestRunner } from "../../../../core/running/test-runner"; import { TestOutputStream } from "../../../../core/test-output-stream"; import { TestSet } from "../../../../core/test-set"; import { TestBu...
mit
matiasleidemer/live_soccer
spec/match_collection_spec.rb
1250
# encoding: UTF-8 require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe "MatchCollection" do let(:params) { [{ date: DateTime.parse("20May 18h30"), home: "Vasco", visitor: "Grêmio", score: "1 x 2", id: "40075" }, { date: DateTime.parse("20May 18h30"), home: "Cruzeiro", visitor: "At...
mit
akapps/rest-toolkit
src/main/java/org/akapps/rest/client/zip/DeflateWrapper.java
1879
package org.akapps.rest.client.zip; import java.io.ByteArrayOutputStream; import java.util.zip.DeflaterOutputStream; import java.util.zip.InflaterOutputStream; /** * A wrapper to apply the "deflate" algorithm to a source. * * @author Antoine Kapps */ public class DeflateWrapper { private final byte[] source;...
mit
smalot/github-webhook
src/Smalot/Github/Webhook/Model/PullRequestModel.php
671
<?php namespace Smalot\Github\Webhook\Model; /** * Class PullRequestModel * @package Smalot\Github\Webhook\Model * * Triggered when a pull request is assigned, unassigned, labeled, unlabeled, * opened, closed, reopened, or synchronized. */ class PullRequestModel extends ModelBase { /** * @return string...
mit
ISO-tech/sw-d8
web/2002-1/392/392_11_WEFProtests.php
4381
<html> <head> <title> Protest the global fat cats </title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <?php include "../../legacy-includes/Script.htmlf" ?> </head> <body bgcolor="#FFFFCC" text="000000" link="990000" vlink="660000" alink="003366" leftmargin="0" topmargin="0"> <table widt...
mit
Peppa-Peddler/users
users/models/user.js
1005
var knex = require('../db/connection'); var bcrypt = require('bcryptjs'); var mongoose = require('mongoose'); var messageSchema = mongoose.Schema({ mensaje : String, date: {type : Date, default: Date.now} },{_id : false}); var taskSchema = mongoose.Schema({ title : {type: String, required: true}, content : {type:...
mit
kazimanzurrashid/textuml-dotnet
source/TextUml/Scripts/application/uml/language/sequence/title.js
692
 define(function(require) { var Title, trim; trim = require('./helpers').trim; return Title = (function() { function Title() {} Title.prototype.handles = function(context) { var errorMessage, match; match = context.line.match(/^title\s+(\w.*)/i); if (!match) { return false; ...
mit
Department-for-Work-and-Pensions/ClaimReceived
cr/test/ingress/submission/SubmissionServiceIntegrationSpec.scala
5002
package ingress.submission import org.specs2.mock.Mockito import org.specs2.mutable.Specification import com.rabbitmq.client.{QueueingConsumer, Channel, Connection} import play.api.libs.ws.WS import play.api.test.{FakeApplication, FakeRequest} import play.api.test.Helpers._ import com.rabbitmq.client.AMQP.BasicProper...
mit
Azure/azure-sdk-for-go
sdk/resourcemanager/hdinsight/armhdinsight/zz_generated_extensions_client.go
34722
//go:build go1.16 // +build go1.16 // 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 cod...
mit
NoUseFreak/Interview
src/NoUseFreak/InterviewBundle/Form/QuestionType.php
1564
<?php namespace NoUseFreak\InterviewBundle\Form; use NoUseFreak\InterviewBundle\Entity\Question; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolverInterface; class QuestionType extends AbstractType { /** * @para...
mit
johan--/tahi
lib/generators/task/templates/ember/view.js
235
ETahi.<%= class_name %>OverlayView = ETahi.OverlayView.extend({ templateName: "<%= engine_file_name %>/overlays/<%= file_name %>_overlay", layoutName: "layouts/overlay_layout", setup: function() { }.on('didInsertElement') });
mit
AourpallyNikhil/qstore
QStore4S/src/main/java/edu/asu/qstore4s/db/neo4j/impl/StoreObjectsToDb.java
17648
package edu.asu.qstore4s.db.neo4j.impl; import java.net.URISyntaxException; import java.util.ArrayList; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; import java.util.UUID; import org.springframework.beans.factory.annotation.Autowired; import org.springfr...
mit
zzzprojects/Z.ExtensionMethods
tool/Z.ExtensionMethods.Tool.FixGeneratedVbNet/Program.cs
971
// Description: C# Extension Methods | Enhance the .NET Framework and .NET Core with over 1000 extension methods. // Website & Documentation: https://csharp-extension.com/ // Issues: https://github.com/zzzprojects/Z.ExtensionMethods/issues // License (MIT): https://github.com/zzzprojects/Z.ExtensionMethods/blob/master...
mit