code stringlengths 4 1.01M | language stringclasses 2
values |
|---|---|
/*
* 2007-2016 [PagSeguro Internet Ltda.]
*
* NOTICE OF LICENSE
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless requir... | Java |
# -*- coding: utf-8 -*-
# django-simple-help
# simple_help/admin.py
from __future__ import unicode_literals
from django.contrib import admin
try: # add modeltranslation
from modeltranslation.translator import translator
from modeltranslation.admin import TabbedDjangoJqueryTranslationAdmin
except ImportErro... | Java |
using UnityEngine;
using System.Collections;
public class MuteButton : MonoBehaviour {
public Sprite MuteSprite;
public Sprite PlaySprite;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
}
| Java |
using UnityEngine;
using System.Collections;
public class CameraShake : MonoBehaviour
{
// Transform of the camera to shake. Grabs the gameObject's transform
// if null.
public Transform camTransform;
// How long the object should shake for.
public float shakeDuration = 0f;
// Amplitude of the shake. A larg... | Java |
### 1.2.1
[Full Changelog](https://github.com/frdmn/alfred-imgur/compare/1.2.0...1.2.1)
* Bring back hotkey functionality
* Copy URL to uploaded file into clipboard
### 1.2.0
[Full Changelog](https://github.com/frdmn/alfred-imgur/compare/1ca0ed7...1.2.0)
* Complete rewrite in NodeJS and with [Alfy](https://github.co... | Java |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
namespace MyW... | Java |
# -*- coding: utf-8 -*-
import sys
from io import BytesIO
import argparse
from PIL import Image
from .api import crop_resize
parser = argparse.ArgumentParser(
description='crop and resize an image without aspect ratio distortion.')
parser.add_argument('image')
parser.add_argument('-w', '-W', '--width', metavar='<... | Java |
'use strict';
let sounds = new Map();
let playSound = path => {
let sound = sounds.get(path);
if (sound) {
sound.play();
} else {
sound = new Audio(path);
sound.play();
}
};
export default playSound;
| Java |
using System;
using System.Windows.Input;
namespace RFiDGear.ViewModel
{
/// <summary>
/// Description of RelayCommand.
/// </summary>
public class RelayCommand : ICommand
{
public event EventHandler CanExecuteChanged
{
add { CommandManager.RequerySuggested += value; }
remove { CommandManager.RequerySu... | Java |
html { background-image: url('../../img/embed/will_encode.jpeg'); }
body { background-image: url('../../img/embed/not_encode.jpeg'); }
div { background-image: url('../../img/not_encode.png'); } | Java |
{% extends 'layouts/default.html' %}
{% block content %}
That site was not found!
{% endblock %} | Java |
// Generated automatically from com.google.common.collect.SortedSetMultimap for testing purposes
package com.google.common.collect;
import com.google.common.collect.SetMultimap;
import java.util.Collection;
import java.util.Comparator;
import java.util.Map;
import java.util.SortedSet;
public interface SortedSetMulti... | Java |
package com.etop.service;
import com.etop.dao.UserDAO;
import com.etop.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* 用户服务,与dao进行对接
* <... | Java |
from __future__ import print_function
import os
import sys
import subprocess
import pkg_resources
try:
import pkg_resources
_has_pkg_resources = True
except:
_has_pkg_resources = False
try:
import svn.local
_has_svn_local = True
except:
_has_svn_local = False
def test_helper():
return... | Java |
// Copyright © 2015, Peter Atashian
// Licensed under the MIT License <LICENSE.md>
extern crate build;
fn main() {
build::link("urlmon", true)
}
| Java |
package states;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.util.ArrayList;
import database.DeleteGame;
import database.LoadGame;
import game.Game;
import graphics.ButtonAction;
import graphics.Text;
import graphics.UIButton;
import graphics.... | Java |
<?php
declare(strict_types = 1);
use PHPUnit\Framework\TestCase;
use Sop\JWX\JWA\JWA;
use Sop\JWX\JWS\Algorithm\NoneAlgorithm;
use Sop\JWX\JWT\Parameter\AlgorithmParameter;
use Sop\JWX\JWT\Parameter\JWTParameter;
/**
* @group jwt
* @group parameter
*
* @internal
*/
class JWTAlgorithmParameterTest extends TestCa... | Java |
# frozen_string_literal: true
module HelperFunctions
def log_in
email = 'test@sumofus.org'
password = 'password'
User.create! email: email, password: password
visit '/users/sign_in'
fill_in 'user_email', with: email
fill_in 'user_password', with: password
click_button 'Log in'
end
de... | Java |
import { Directive, Input, OnChanges, SimpleChanges } from '@angular/core';
import { AbstractControl, NG_VALIDATORS, Validator, ValidatorFn, Validators } from '@angular/forms';
export function forbiddenNameValidator(nameRe: RegExp): ValidatorFn {
return (control: AbstractControl): {[key: string]: any} => {
const... | Java |
namespace TransferCavityLock2012
{
partial class LockControlPanel
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
... | Java |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Http;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using BasicInfrastructureWeb.DependencyResolution;
using IoC = LiveScore.App_Start.IoC;
namespace LiveScore
{
public class WebA... | Java |
#include "..\stdafx.h"
#pragma once
class CMutex
{
private:
HANDLE m_mutex;
bool m_isLocked;
void Lock()
{
WaitForSingleObject(this->m_mutex, INFINITE);
}
void Unlock()
{
if (this->m_isLocked)
{
this->m_isLocked = false;
ReleaseMutex(this->m_mutex);
}
}
public:
CMutex()
{
this->m_mutex =... | Java |
/**
* Wheel, copyright (c) 2017 - present by Arno van der Vegt
* Distributed under an MIT license: https://arnovandervegt.github.io/wheel/license.txt
**/
const testLogs = require('../../utils').testLogs;
describe(
'Test repeat',
() => {
testLogs(
it,
'Should repeat ten times',... | Java |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>tlc: 2 m 40 s</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="styles... | Java |
from django.db import models
from .workflow import TestStateMachine
class TestModel(models.Model):
name = models.CharField(max_length=100)
state = models.CharField(max_length=20, null=True, blank=True)
state_num = models.IntegerField(null=True, blank=True)
other_state = models.CharField(max_length=20... | Java |
<?php namespace Fisharebest\Localization\Locale;
use Fisharebest\Localization\Territory\TerritoryNi;
/**
* Class LocaleEsNi
*
* @author Greg Roach <fisharebest@gmail.com>
* @copyright (c) 2015 Greg Roach
* @license GPLv3+
*/
class LocaleEsNi extends LocaleEs {
public function territory() {
retur... | Java |
use internal;
#[repr(C)]
#[derive(Debug, PartialEq, PartialOrd, Copy, Clone)]
#[cfg_attr(feature = "serde_support", derive(Serialize, Deserialize))]
pub struct Size {
pub width: f32,
pub height: f32,
}
impl From<Size> for internal::YGSize {
fn from(s: Size) -> internal::YGSize {
internal::YGSize {
width: s.wi... | Java |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>bignums: 1 m 56 s 🏆</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel=... | Java |
require 'builder'
module MWS
module API
class Fulfillment < Base
include Feeds
## Takes an array of hash AmazonOrderID,FulfillmentDate,CarrierName,ShipperTrackingNumber,sku,quantity
## Returns true if all the orders were updated successfully
## Otherwise raises an exception
def... | Java |
import { NgModule } from '@angular/core';
import { SharedModule } from '../shared/shared.module';
import { HelloRoutingModule } from './hello-routing.module';
import { HelloComponent } from './hello.component';
@NgModule({
imports: [
SharedModule,
HelloRoutingModule,
],
declarations: [
HelloCompone... | Java |
package de.espend.idea.shopware.util.dict;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiFile;
import com.intellij.psi.PsiManager;
import com.intellij.psi.PsiRecursiveElementWalkingVisitor;
import com.intellij.ps... | Java |
/********************************************************************************
* The MIT License (MIT) *
* *
* Copyright (C) 2016 Alex Nolasco ... | Java |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('geokey_sapelli', '0005_sapellifield_truefalse'),
]
operations = [
migrations.AddField(
model_name='sapelliprojec... | Java |
using UnityEngine;
using System.Collections;
public class HurtSusukeOnContact : MonoBehaviour {
public int damageToGive;
public float bounceOnEnemy;
private Rigidbody2D myRigidbody2D;
// Use this for initialization
void Start () {
myRigidbody2D = transform.parent.GetComponent<Rigidbody2D> ();
}
// Up... | Java |
# lsyncd
Docker image allowing you to use lsyncd as a docker command
## Usage
```
docker run -d -v /docker/lsyncd/src:/src -v /docker/lsyncd/target:/target -v /docker/lsyncd/lrsync.lua:/etc/lrsync/lrsync.lua zeroboh/lsyncd:2.1-alpine
```
| Java |
#include "Internal.hpp"
#include <LuminoEngine/Graphics/Texture.hpp>
#include <LuminoEngine/Rendering/Material.hpp>
#include <LuminoEngine/Mesh/Mesh.hpp>
#include <LuminoEngine/Visual/StaticMeshComponent.hpp>
namespace ln {
//=============================================================================
... | Java |
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<script src="../../lib/vue.js"></script>
<titl... | Java |
<!DOCTYPE html>
<html class="no-js" lang="es">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="p5.js a JS client-side library for creating graphic and interactive ... | Java |
---
layout: tagpage
tag: quartz
--- | Java |
#!/usr/bin/env bats
## tests with https://github.com/sstephenson/bats
die() {
echo "$@" >/dev/stderr
exit 1
}
export DOCKHACK_SKIP_UID_CHECK=1
################################################################################
## mocked docker command
#which docker &>/dev/null || die "ERROR: docker must be inst... | Java |
<?php namespace App\Controllers\Admin;
use BaseController;
use DB, View, Datatables, Input, Redirect, Str, Validator, Image, File;
use App\Models\Music;
class MusicController extends BaseController {
private $upload_path = "uploads/music/";
public function getList()
{
$music_count = Music::count();
$data = ar... | Java |
package org.jabref.logic.importer.fetcher;
import java.io.IOException;
import java.net.URL;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import org.jabref.logic.formatter.bibtexfields.ClearFormatter;
import org.jabref.logic.formatter.bibtexfields.NormalizePagesFormatter;
import org.... | Java |
from __future__ import division, print_function #, unicode_literals
"""
Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples
of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
Find the sum of all the multiples of 3 or 5 below 1000.
"""
import numpy as np
# Setup.
nu... | Java |
<#
Microsoft provides programming examples for illustration only, without warranty either expressed or
implied, including, but not limited to, the implied warranties of merchantability and/or fitness
for a particular purpose.
This sample assumes that you are familiar with the programming language being demonst... | Java |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>ordinal: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css... | Java |
RSpec.configure do |config|
config.before(:suite) do
DatabaseCleaner.clean_with(:deletion)
end
config.before(:each) do
DatabaseCleaner.strategy = :transaction
end
config.before(:each, :js => true) do
DatabaseCleaner.strategy = :deletion
end
config.before(:each) do
DatabaseCleaner.start
... | Java |
s="the quick brown fox jumped over the lazy dog"
t = s.split(" ")
for v in t:
print(v)
r = s.split("e")
for v in r:
print(v)
x = s.split()
for v in x:
print(v)
# 2-arg version of split not supported
# y = s.split(" ",7)
# for v in y:
# print v
| Java |
<!DOCTYPE html>
<html>
<head>
<title>Zefu Li</title>
<link rel="stylesheet" type="text/css" href="official.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<script src="official.js"></script>
</head>
<body>
<ul>
<li><a h... | Java |
module Xronor
class DSL
module Checker
class ValidationError < StandardError
end
def required(name, value)
invalid = false
if value
case value
when String
invalid = value.strip.empty?
when Array, Hash
invalid = value.empty?
... | Java |
var mongoose = require('mongoose');
var statuses = ['open', 'closed', 'as_expected'];
var priorities = ['major','regular','minor','enhancement'];
var Comment = new mongoose.Schema(
{
comment: String,
username: String,
name: String,
dca: {type: Date, default: Dat... | Java |
#include "EngineImplDefine.h"
void BlendColor::Init(D3DCOLOR defaultColor, D3DCOLOR disabledColor, D3DCOLOR hiddenColor)
{
for (decltype(States.size()) i = 0; i != States.size(); ++i)
{
States[i] = defaultColor;
}
States[STATE_DISABLED] = disabledColor;
States[STATE_HIDDEN] = hiddenColor;
Current = hiddenColo... | Java |
class AddColumnToRequestSchema < ActiveRecord::Migration
def change
add_column :request_schemata, :name, :string, null: false, default: ""
end
end
| Java |
ActionController::Routing::Routes.draw do |map|
map.resources :companies,
:member => {
:filter_available_members => :get, :delete_member => :post, :add_members => :post,
:filter_available_projects => :get, :delete_project => :post, :add_projects => :post
}
end
| Java |
//
// ViewController.h
// MKDevice
//
// Created by Michal Konturek on 18/11/2013.
// Copyright (c) 2013 Michal Konturek. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface ViewController : UIViewController
@property (nonatomic, strong) IBOutlet UIButton *button;
- (IBAction)onAction:(id)sender;
@end
| Java |
class AddVersionToComponents < ActiveRecord::Migration
def change
add_column :components, :version, :float
end
end
| Java |
package is.hail.expr.ir.functions
import is.hail.annotations.{Region, StagedRegionValueBuilder}
import is.hail.asm4s
import is.hail.asm4s._
import is.hail.expr.ir._
import is.hail.types.physical._
import is.hail.types.virtual._
import is.hail.utils._
import java.util.Locale
import java.time.{Instant, ZoneId}
import ja... | Java |
using GalaSoft.MvvmLight;
namespace Operation.WPF.ViewModels
{
public interface IViewModelFactory
{
T ResolveViewModel<T>() where T : ViewModelBase;
}
} | Java |
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MageTurret : Turret
{
[SerializeField]
float range;
[SerializeField]
float baseDamage = 0.00f;
float currentDamage = 0.00f;
[SerializeField]
float damageIncrease;
[SerializeFiel... | Java |
import torch
from hypergan.train_hooks.base_train_hook import BaseTrainHook
class NegativeMomentumTrainHook(BaseTrainHook):
def __init__(self, gan=None, config=None, trainer=None):
super().__init__(config=config, gan=gan, trainer=trainer)
self.d_grads = None
self.g_grads = None
def gradients(sel... | Java |
#include "Namespace_Base.h"
#include <co/Coral.h>
#include <co/IComponent.h>
#include <co/IPort.h>
#include <co/IInterface.h>
namespace co {
//------ co.Namespace has a facet named 'namespace', of type co.INamespace ------//
co::IInterface* Namespace_co_INamespace::getInterface()
{
return co::typeOf<co::INamespace>... | Java |
/*** AppView ***/
define(function(require, exports, module) {
var View = require('famous/core/View');
var Surface = require('famous/core/Surface');
var Transform = require('famous/core/Transform');
var StateModifier = require('famous/modifiers/StateModifier');
var SlideshowView = require('views/Sl... | Java |
# Development Guidelines
This document describes tools, tasks and workflow that one needs to be familiar with in order to effectively maintain
this project. If you use this package within your own software as is but don't plan on modifying it, this guide is
**not** for you.
## Tools
* [Phing](http://www.phing.info/... | Java |
<?php
/**
* Go! AOP framework
*
* @copyright Copyright 2013, Lisachenko Alexander <lisachenko.it@gmail.com>
*
* This source file is subject to the license that is bundled
* with this source code in the file LICENSE.
*/
namespace Demo\Example;
/**
* Human class example
*/
class HumanDemo
{
/**
* Eat... | Java |
using Microsoft.AspNet.Http;
using Microsoft.AspNet.Routing;
using Migrap.AspNet.Multitenant;
using System;
using System.Collections.Generic;
namespace Migrap.AspNet.Routing {
public class TenantRouteConstraint : IRouteConstraint {
public const string TenantKey = "tenant";
private readonly ISet<st... | Java |
import numpy as np
__author__ = 'David John Gagne <djgagne@ou.edu>'
def main():
# Contingency Table from Wilks (2011) Table 8.3
table = np.array([[50, 91, 71],
[47, 2364, 170],
[54, 205, 3288]])
mct = MulticlassContingencyTable(table, n_classes=table.shape[0],
... | Java |
.navbar-brand {
font-family: "Bungee", cursive;
font-size: 200%;
padding: 0; }
#image_billiard {
height: 70px;
padding: 15px;
width: auto;
float: left; }
.brand-text {
float: right;
padding-top: 25px;
padding-left: 10px; }
.navbar-default {
height: 70px; }
.navbar-default .navbar-nav > li > a ... | Java |
"use strict";
var ArrayCollection_1 = require('./ArrayCollection');
exports.ArrayCollection = ArrayCollection_1.ArrayCollection;
var ArrayList_1 = require('./ArrayList');
exports.ArrayList = ArrayList_1.ArrayList;
var SequenceBase_1 = require('./SequenceBase');
exports.SequenceBase = SequenceBase_1.SequenceBase;
var Bu... | Java |
<!-- dx-header -->
# IDR for ChIP-seq (DNAnexus Platform App)
Generate peaks that pass the IDR threshold
This is the source code for an app that runs on the DNAnexus Platform.
For more information about how to run or modify it, see
https://wiki.dnanexus.com/.
<!-- /dx-header -->
Take peaks. Generate pseudoreplicate... | Java |
<span class="S-prose">
{% for item in site.data.testimonials %}{% if forloop.last %}
{% assign testimonial = item[1] %}
<figure class="O-block C-testimonial-highlight">
<blockquote>“{{ testimonial.content }}”</blockquote>
<figcaption class="C-quote-person">
<img class="C-quote-person__avatar"... | Java |
<?php
/**
* Provides low-level debugging, error and exception functionality
*
* @copyright Copyright (c) 2007-2011 Will Bond, others
* @author Will Bond [wb] <will@flourishlib.com>
* @author Will Bond, iMarc LLC [wb-imarc] <will@imarc.net>
* @author Nick Trew [nt]
* @license http://flourishlib.c... | Java |
// Copyright (c) 2014 blinkbox Entertainment Limited. All rights reserved.
package com.blinkboxbooks.android.list;
import android.content.Context;
import android.database.ContentObserver;
import android.database.Cursor;
import android.database.MergeCursor;
import android.support.v4.content.AsyncTaskLoader;
import andr... | Java |
# React
Implement a basic reactive system.
Reactive programming is a programming paradigm that focuses on how values
are computed in terms of each other to allow a change to one value to
automatically propagate to other values, like in a spreadsheet.
Implement a basic reactive system with cells with settable values ... | Java |
<?php
return array (
'id' => 'samsung_d500_ver1_sub6226',
'fallback' => 'samsung_d500_ver1',
'capabilities' =>
array (
'max_data_rate' => '40',
),
);
| Java |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>mathcomp-multinomials: Not compatible 👼</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../boo... | Java |
using System;
using System.Net.Http;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using Castle.Core;
using DotJEM.Json.Storage.Adapter;
using DotJEM.Pipelines;
using DotJEM.Web.Host.Diagnostics.Performance;
using DotJEM.Web.Host.Providers.Concurrency;
using DotJEM.Web.Host.Providers.Services.Di... | Java |
package com.gdgand.rxjava.rxjavasample.hotandcold;
import android.app.Application;
import com.gdgand.rxjava.rxjavasample.hotandcold.di.component.ApplicationComponent;
import com.gdgand.rxjava.rxjavasample.hotandcold.di.component.DaggerApplicationComponent;
import com.gdgand.rxjava.rxjavasample.hotandcold.di.module.Ap... | Java |
'use strict'
var solc = require('solc/wrapper')
var compileJSON = function () { return '' }
var missingInputs = []
module.exports = function (self) {
self.addEventListener('message', function (e) {
var data = e.data
switch (data.cmd) {
case 'loadVersion':
delete self.Module
// NOTE: w... | Java |
/* tslint:disable:no-unused-variable */
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { DebugElement } from '@angular/core';
import { SettingsComponent } from './settings.component';
describe('HomeComponent', () => {
let component: S... | Java |
//Express, Mongo & Environment specific imports
var express = require('express');
var morgan = require('morgan');
var serveStatic = require('serve-static');
var bodyParser = require('body-parser');
var cookieParser = require('cookie-parser');
var compression = require('compression');
var errorHandler = require('errorha... | Java |
[instagram-private-api](../../README.md) / [index](../../modules/index.md) / DirectInboxFeedResponseInbox
# Interface: DirectInboxFeedResponseInbox
[index](../../modules/index.md).DirectInboxFeedResponseInbox
## Table of contents
### Properties
- [blended\_inbox\_enabled](DirectInboxFeedResponseInbox.md#blended_in... | Java |
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Refl... | Java |
const describe = require("mocha").describe;
const it = require("mocha").it;
const assert = require("chai").assert;
const HttpError = require("./HttpError");
describe("HttpError", function () {
it("should be instance of Error", function () {
const testSubject = new HttpError();
assert.isOk(testSubject instan... | Java |
import { inject, injectable } from 'inversify';
import TYPES from '../../di/types';
import * as i from '../../i';
import { RunOptions } from '../../models';
import { IInputConfig } from '../../user-extensibility';
import { BaseInputManager } from '../base-input-manager';
var NestedError = require('nested-error-stacks')... | Java |
<?php
if (!file_exists('./../include/config.php')){
header('Location:install.php');
}
include('./../include/config.php');
include('./../include/functions.php');
if (isset($_POST['step']))
$step = intval($_POST['step']);
else{
$step = 0;
}
?>
<!DOCTYPE html>
<html>
<head>
<title>SPC - DB Upgrade</title>
... | Java |
<html><body>
<h4>Windows 10 x64 (18362.329)</h4><br>
<h2>_PS_CLIENT_SECURITY_CONTEXT</h2>
<font face="arial"> +0x000 ImpersonationData : Uint8B<br>
+0x000 ImpersonationToken : Ptr64 Void<br>
+0x000 ImpersonationLevel : Pos 0, 2 Bits<br>
+0x000 EffectiveOnly : Pos 2, 1 Bit<br>
</font></body></html> | Java |
package io.blitz.curl.exception;
/**
* Exceptions thrown when a validation error occur during a test execution
* @author ghermeto
*/
public class ValidationException extends BlitzException {
/**
* Constructs an instance of <code>ValidationException</code> with the
* specified error and reason messag... | Java |
<html><body>
<h4>Windows 10 x64 (19041.508)</h4><br>
<h2>_RTL_FEATURE_CONFIGURATION_PRIORITY</h2>
<font face="arial"> FeatureConfigurationPriorityAll = 0n0<br>
FeatureConfigurationPriorityService = 0n4<br>
FeatureConfigurationPriorityUser = 0n8<br>
FeatureConfigurationPriorityTest = 0n12<br>
Featur... | Java |
/**
* jQuery object.
* @external jQuery
* @see {@link http://api.jquery.com/jQuery/}
*/
/**
* The jQuery plugin namespace.
* @external "jQuery.fn"
* @see {@link http://docs.jquery.com/Plugins/Authoring The jQuery Plugin Guide}
*/
/**
* The plugin global configuration object.
* @external "jQuery.vulcanup"
*... | Java |
const test = require('tape')
const nlp = require('../_lib')
test('match min-max', function(t) {
let doc = nlp('hello1 one hello2').match('#Value{7,9}')
t.equal(doc.out(), '', 'match was too short')
doc = nlp('hello1 one two three four five hello2').match('#Value{3}')
t.equal(doc.out(), 'one two three', 'exact... | Java |
# encoding: utf-8
require 'webmock/rspec'
require 'vcr'
require_relative '../lib/spotifiery'
VCR.configure do |config|
config.cassette_library_dir = 'spec/fixtures/vcr_cassettes'
config.hook_into :webmock
end
| Java |
class Tweet < ActiveRecord::Base
# Remember to create a migration!
belongs_to :user
end
| Java |
using System.IO;
using System.Runtime.InteropServices;
internal static class Example
{
[STAThread()]
public static void Main()
{
SolidEdgeFramework.Application objApplication = null;
SolidEdgeAssembly.AssemblyDocument objAssemblyDocument = null;
SolidEdgeAssembly.StructuralFrames o... | Java |
#!/usr/bin/env ruby
require 'json'
SRC_RANDOM = Random.new(1984)
MAX_VALUES = Hash.new(1).update "rcat" => 50, "vcat" => 50, "infq" => 5, "kws" => 10
MRG_VALUES = {
"dev" => ["oth","oth","oth","oth","oth","oth"],
"bwsm" => ["ff", "sf", "op", "ng", "kq", "an", "ms", "kk", "mo"],
"pos" => [2, 4, 5, 6, 7],
"mob... | Java |
#Upselling
2016-06-01
Upselling is a sales technique whereby a seller induces the customer to purchase more expensive items, upgrades or other add-ons in an attempt to make a more profitable sale. While it usually involves marketing more profitable services or products, it can be simply exposing the customer to other... | Java |
package com.lht.dot.ui.view;
import android.content.Context;
import android.support.annotation.Nullable;
import android.support.v7.widget.RecyclerView;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import com.bumptech.glide.Glide;
/**
* Created by lht-Mac on 2017/7/11.... | Java |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GPS.SimpleMVC.Views;
namespace GPS.SimpleMVC.Tests.ControllerImplementations
{
public interface ITestView : ISimpleView
{
Guid UID { get; set; }
string Name { g... | Java |
/**
* @license
* Copyright 2020 Google Inc. All Rights Reserved.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by a... | Java |
function ones(rows, columns) {
columns = columns || rows;
if (typeof rows === 'number' && typeof columns === 'number') {
const matrix = [];
for (let i = 0; i < rows; i++) {
matrix.push([]);
for (let j = 0; j < columns; j++) {
matrix[i].push(1);
... | Java |
<?php
namespace LolApi\Classes\TournamentProvider;
/**
* TournamentCodeParameters
*
* @author Javier
*/
class TournamentCodeParameters {
// ~ maptype ~
const MAPTYPE_SUMMONERS_RIFT='SUMMONERS_RIFT';
const MAPTYPE_TWISTED_TREELINE='TWISTED_TREELINE';
const MAPTYPE_HOWLING_ABYSS='HOWLING_ABYSS';
... | Java |
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.rawgit.com/konvajs/konva/1.4.0/konva.min.js"></script>
<meta charset="utf-8">
<title>Konva Animate Position Demo</title>
<style>
body {
margin: 0;
padding: 0;
overflow: hidden;
background-color... | Java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.