text stringlengths 3 1.05M |
|---|
"use strict";
define(function(require) {
var ClassMap = function(def) {
this.defaultClass = def;
this.classMap = {};
};
ClassMap.prototype.registerSubclass = function(name, cls) {
this.classMap[name] = cls;
};
ClassMap.prototype.getSubclass = function(name) {
return... |
(function (factory) {
// CommonJS
if (typeof exports == "object") {
module.exports = factory(require("underscore"), require("backbone"));
}
// AMD
else if (typeof define == "function" && define.amd) {
define(["underscore", "backbone"], factory);
}
// Browser
else if (typeof _ !== "undefined" ... |
<div class="col-sm-9 col-md-10 col-sm-push-3 col-md-push-2" data-ng-init="initProvider()">
<ol class="breadcrumb">
<li><a href="#/realms/{{realm.realm}}/identity-provider-settings">{{:: 'identity-providers' | translate}}</a></li>
<li>{{identityProvider.alias}}</li>
</ol>
<kc-tabs-identity-p... |
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
DESCRIPTOR = _descriptor.FileDescriptor(
name='message.proto',
package='',
... |
<?php
namespace Core\Debug\WebGrind;
use Web\Template;
use Web\Page\Handler\PageBase;
class Handler extends PageBase {
protected $template;
protected $filename;
function __construct($template,$filename){
$this->template = $template;
$this->filename = $filename;
}
function GET(){
$template =... |
/* eslint no-empty: 1 */
/*!
* Module dependencies.
*/
var Stream = require('stream').Stream;
var utils = require('./utils');
var helpers = require('./queryhelpers');
var K = function(k) {
return k;
};
/**
* Provides a Node.js 0.8 style [ReadStream](http://nodejs.org/docs/v0.8.21/api/stream.html#stream_readable... |
"""
This module converts requested URLs to callback view functions.
RegexURLResolver is the main class here. Its resolve() method takes a URL (as
a string) and returns a ResolverMatch object which provides access to all
attributes of the resolved URL match.
"""
from __future__ import unicode_literals
import functools... |
namespace rx
{
enum D3DWorkaroundType
{
ANGLE_D3D_WORKAROUND_NONE,
ANGLE_D3D_WORKAROUND_SKIP_OPTIMIZATION,
ANGLE_D3D_WORKAROUND_MAX_OPTIMIZATION
};
struct Workarounds
{
Workarounds()
: mrtPerfWorkaround(false),
setDataFasterThanImageUpload(false)
{}
bool mrtPerfWorkaround;
... |
"""Non-blocking HTTP client"""
import functools
from types import ListType, DictType
from cyclone import escape
from cyclone.web import HTTPError
from twisted.internet import defer
from twisted.internet import reactor
from twisted.internet.protocol import Protocol
from twisted.internet.endpoints import TCP4ClientEnd... |
The first time, get all the dependencies loaded via
```
npm install
```
Then, run the server via
```
npm start
Open http://localhost:8080/flux/index.html
```
Anytime you change the contents, just refresh the page and it's going to be updated
# Publish the website
First setup your environment by having two folders... |
from docker_squash.version import version
__version__ = version
|
package com.booleanworks.ueshiba;
import android.annotation.TargetApi;
import android.content.Context;
import android.net.SSLCertificateSocketFactory;
import android.net.Uri;
import android.net.http.AndroidHttpClient;
import android.os.Build;
import android.util.Log;
import android.webkit.WebResourceRequest;
import a... |
namespace notify
{
class manager
{
public:
manager();
~manager();
void poll();
};
void register_notification_path(const std::string& path,
boost::function<void(const std::string&, const boost::asio::dir_monitor_event&)> fn);
}
|
CKEDITOR.plugins.setLang("print","hi",{toolbar:"प्रिन्ट"}); |
from django.contrib import admin
from treebeard.admin import TreeAdmin
from treebeard.forms import movenodeform_factory
from oscar.core.loading import get_model
AttributeOption = get_model('catalogue', 'AttributeOption')
AttributeOptionGroup = get_model('catalogue', 'AttributeOptionGroup')
Category = get_model('catal... |
#ifndef QCUPSPRINTERSUPPORT_H
#define QCUPSPRINTERSUPPORT_H
//
// W A R N I N G
// -------------
//
// This file is not part of the Qt API. It exists purely as an
// implementation detail. This header file may change from version to
// version without notice, or even be removed.
//
// We mean it.
//
#include <q... |
import uniqueRandom = require("unique-random");
const rand = uniqueRandom(1, 10);
const num: number = rand();
|
ACCEPTED
#### According to
International Plant Names Index
#### Published in
null
#### Original name
null
### Remarks
null |
export { DomHandler } from '../dom/domhandler';
export { TreeNode } from './treenode';
export { TreeDragDropService } from './treedragdropservice';
export { TreeNodeDragEvent } from './treenodedragevent';
export { BlockableUI } from './blockableui';
export { Confirmation } from './confirmation';
export { ConfirmationSe... |
package io.netty.channel.group;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufHolder;
import io.netty.buffer.Unpooled;
import io.netty.channel.Channel;
import io.netty.channel.ChannelHandlerAdapter;
import io.netty.channel.ChannelHandlerContext;
import io.net... |
package dhcp4
import (
"net"
"time"
)
// A DHCP packet
type Packet []byte
func (p Packet) OpCode() OpCode { return OpCode(p[0]) }
func (p Packet) HType() byte { return p[1] }
func (p Packet) HLen() byte { return p[2] }
func (p Packet) Hops() byte { return p[3] }
func (p Packet) XId() []byte { return ... |
The suggested and easiest way to install Homebrew is on the
[homepage](http://brew.sh).
The standard script installs Homebrew to `/usr/local` so that
[you don’t need sudo](FAQ.md#why-does-homebrew-say-sudo-is-bad-) when you
`brew install`. It is a careful script, it can be run even if you have stuff
installed to `/usr... |
package com.drew.metadata.mp4.media;
import com.drew.metadata.TagDescriptor;
public class Mp4MetaDescriptor extends TagDescriptor<Mp4MetaDirectory>
{
public Mp4MetaDescriptor(Mp4MetaDirectory directory)
{
super(directory);
}
}
|
/* Layout helpers
----------------------------------*/
.ui-helper-hidden {
display: none;
}
.ui-helper-hidden-accessible {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
.ui-helper-reset {
margin: 0;
padding: 0;
border: 0;
outlin... |
/**
* exposes an API for performing HTTP requests asynchronously
*
* @author jason
*
*/
package jj.http.client; |
package org.apache.hadoop.hbase;
import java.io.BufferedInputStream;
import java.io.IOException;
import java.net.URL;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hadoop.hbase.client.HTable;
/**
* Testing, info servers are disabled. This test enables then ... |
package storageclass
import (
"testing"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
genericapirequest "k8s.io/apiserver/pkg/endpoints/request"
api "k8s.io/kubernetes/pkg/apis/core"
"k8s.io/kubernetes/pkg/apis/storage"
)
func TestStorageClassStrategy(t *testing.T) {
ctx := genericapirequest.NewDefaultContex... |
function os::test::junit::declare_suite_start() {
local suite_name=$1
local num_suites=${NUM_OS_JUNIT_SUITES_IN_FLIGHT:-0}
echo "=== BEGIN TEST SUITE github.com/openshift/origin/test/${suite_name} ===" >> "${JUNIT_REPORT_OUTPUT:-/dev/null}"
NUM_OS_JUNIT_SUITES_IN_FLIGHT=$(( ${num_suites} + 1 ))
exp... |
namespace boost
{
namespace iterators
{
//
// Base machinery for all kinds of enable if
//
template<bool>
struct enabled
{
template<typename T>
struct base
{
typedef T type;
};
};
//
// For compilers that don't support "Substitution Failure I... |
ACCEPTED
#### According to
Index Fungorum
#### Published in
null
#### Original name
Monilia hyalina Fr.
### Remarks
null |
<?php
use \SpotifyWebAPI;
class SessionTest extends PHPUnit_Framework_TestCase
{
private $session;
public function setUp()
{
$this->session = new SpotifyWebAPI\Session(getenv('SPOTIFY_CLIENT_ID'), getenv('SPOTIFY_CLIENT_SECRET'), getenv('SPOTIFY_REDIRECT_URI'));
}
public function testGetA... |
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace iRoad.Experiments
{
public class PredictiveForestAccuracyExperiment : AccuracyExperiment
{
private List<int> rootCounts;
pub... |
import asyncio
from asyncio.queues import Queue, QueueEmpty
import json
import logging
from .connection import JsonConnection
logger = logging.getLogger()
class Client(object):
def __init__(self, *, loop=None):
if not loop:
loop = asyncio.get_event_loop()
self._loop = loop
sel... |
define("ace/snippets/curly",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="curly"}); (function() {
window.require(["ace/snippets/curly"], function(m) {
if (typeof module == "object" && typeof exports == "object" && ... |
<?php
require_once '../../../../jqSuitePHP_Sources_4_4_4_0/jq-config.php';
// include the jqGrid Class
require_once ABSPATH."php/jqGrid.php";
// include the driver class
require_once ABSPATH."php/jqGridPdo.php";
// Connection to the server
$conn = new PDO(DB_DSN,DB_USER,DB_PASSWORD);
// Tell the db that we use utf-8
$c... |
namespace Merchello.Web.Models.ContentEditing
{
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Security.Cryptography;
using Merchello.Core.Gateways.Taxation;
using Merchello.Core.Models;
/// <summary>
/// The ... |
package main
import (
"flag"
"os"
"runtime"
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/apiserver/pkg/util/logs"
"k8s.io/sample-apiserver/pkg/cmd/server"
)
func main() {
logs.InitLogs()
defer logs.FlushLogs()
if len(os.Getenv("GOMAXPROCS")) == 0 {
runtime.GOMAXPROCS(runtime.NumCPU())
}
cmd := server... |
<?php
namespace Symfony\Component\HttpFoundation\File\Exception;
/**
* Thrown when an error occurred during file upload
*
* @author Bernhard Schussek <bernhard.schussek@symfony.com>
*/
class UploadException extends FileException
{
}
|
function fn(): number {
throw new Error('NYI');
var t;
}
//// [functionWithThrowButNoReturn1.js]
function fn() {
throw new Error('NYI');
var t;
}
|
paths.dofile('../layers/Residual.lua')
local function hourglass(n, f, inp)
-- Upper branch
local up1 = Residual(f,f)(inp)
-- Lower branch
local pool = nn.SpatialMaxPooling(2,2,2,2)(inp)
local low1 = Residual(f,f)(pool)
local low2
if n > 1 then low2 = hourglass(n-1,f,low1)
else low2 = ... |
This is a skill built for Amazon's Alexa service that queries the Empire State Building's [Tower
Lights Calendar](https://www.esbnyc.com/explore/tower-lights/calendar). It allows you to ask Alexa
the following:
>Alexa, ask the Empire State Building what the colors are.
>Alexa, ask the Empire State Building what the c... |
<style>
.full button span {
background-color: limegreen;
border-radius: 32px;
color: black;
}
.partially button span {
background-color: orange;
border-radius: 32px;
color: black;
}
</style>
<div ng-controller="DatepickerDemoCtrl">
<pre>Selected date is: <em>{{dt | date:'fullDate' }}... |
package org.apache.cassandra.net;
import java.io.Serializable;
import java.util.Collection;
import com.google.common.base.Preconditions;
import org.apache.cassandra.locator.InetAddressAndPort;
/**
* Contains forward to information until it can be serialized as part of a message using a version
* specific serial... |
package hash.text.search.ordered.shortest;
import java.util.Arrays;
public class Solution1
{
/**
* Find the shortest digest in the text that
* sequentially covers all the keywords
*
* <p>The search is case-sensitive
*
* @param text the array of words
* @param keywords the set of keywords
* @ret... |
import { assert } from 'chai';
import { ValidationError } from 'class-validator';
import { ValidationErrorsFormatter } from '../../../src/options/ValidationErrorsFormatter';
describe('ValidationErrorsFormatter', () => {
describe('format', () => {
describe('Variant #1: one constraint group with one constr... |
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Threading.Tasks;
using Roslyn.Test.Utilities;
using Xunit;
namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.Diagnostics.PreferFramework... |
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-----------------------------------------------------------------------
// </copyright>
// <summary>Generic Interface for a property provider usable with the expander... |
package media
// Copyright (c) Microsoft and contributors. 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
//
// Unles... |
package GoSDK
import (
"encoding/json"
"errors"
"fmt"
"net/url"
)
type KeyFormat int
const (
_DEVICE_HEADER_KEY = "ClearBlade-DeviceToken"
_DEVICES_DEV_PREAMBLE = "/admin/devices/"
_DEVICES_USER_PREAMBLE = "/api/v/2/devices/"
_DEVICE_SESSION = "/admin/v/4/session"
_DEVICE_V3_USER_PREAMBL... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="robots" content="index, follow, all" />
<title>Thelia\Core\DependencyInjection | Thelia 2 API</title>
<link rel="stylesheet" type="text/css" href="../../css/bootstrap.min.css">
<link rel="stylesheet" type="text... |
YUI.add('io-nodejs', function (Y, NAME) {
/*global Y: false, Buffer: false, clearInterval: false, clearTimeout: false, console: false, exports: false, global: false, module: false, process: false, querystring: false, require: false, setInterval: false, setTimeout: false, __filename: false, __dirname: false */
/**
... |
<?xml version="1.0" encoding="utf-8"?>
<!--
-->
<TextView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/text1"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="?android:attr/textColorPrimaryDisableOnly"
android:layout_width="wrap_content"
... |
package io.fabric8.watcher;
import java.util.ArrayList;
import java.util.List;
import static org.junit.Assert.fail;
/**
* A little helper class to test for some condition to be true within some time period
*/
public class AsyncTests {
public static void assertTrue(long timeout, Iterable<Expectation> expectat... |
/**
* art_5_1.h
*
* @author : sanping.li@alipay.com
*
*/
#include <string.h>
#include <jni.h>
#include <stdio.h>
#include <fcntl.h>
#include <dlfcn.h>
#include <stdint.h> /* C99 */
namespace art {
namespace mirror {
class Object {
public:
// The number of vtable entries in java.lang.Object.
static conste... |
<?php
require_once 'PHPUnit/Framework/TestCase.php';
require_once 'PHPUnit/Util/Class.php';
/**
*
*
* @package PHPUnit
* @author Sebastian Bergmann <sebastian@phpunit.de>
* @author Ben Selby <benmatselby@gmail.com>
* @copyright 2001-2013 Sebastian Bergmann <sebastian@phpunit.de>
* @license htt... |
"""Bagging meta-estimator."""
# Author: Gilles Louppe <g.louppe@gmail.com>
# License: BSD 3 clause
from __future__ import division
import itertools
import numbers
import numpy as np
from warnings import warn
from abc import ABCMeta, abstractmethod
from ..utils.validation import has_fit_parameter
from ..base import ... |
module Sequel
module Postgres
# Methods enabling Database object integration with enum types.
module EnumDatabaseMethods
# Parse the available enum values when loading this extension into
# your database.
def self.extended(db)
db.send(:parse_enum_labels)
end
# Run the SQ... |
MINIFIER=$(shell which uglifyjs || which yuicompressor || which yuicompressor.sh )
all: jquery.autoexpandable.min.js
rebuild: clean all
%.min.js: %.js
$(MINIFIER) $< > $@
clean:
-rm -f *.min.js
|
<?php
/**
* This file is automatically @generated by {@link GeneratePhonePrefixData}.
* Please don't modify it directly.
*/
return array (
86313 => '河北省张家口市',
);
|
CKEDITOR.plugins.setLang("language","tt",{button:"Тел сайлау",remove:"Телне бетерү"}); |
Criando links do backend para o frontend
========================================
Frequentemente é necessário a criação de links da aplicação de backend para a aplicação de frontend. Uma vez que a
aplicação de frontend pode conter suas próprias regras do gerenciador de URL, você deve replicá-las para a aplicação
de ba... |
package task
import (
"bytes"
"fmt"
"math"
"regexp"
"testing"
"time"
"github.com/kubicorn/kubicorn/pkg/logger"
)
type tickerTickBounds struct {
lower int
upper int
}
const (
description = "Running a long-running worker task now:\n"
descriptionExp = "^" + description + `\.{%v,%v}$`
symbol = ".... |
// +build !cgo !linux
package oom
import (
"errors"
)
var unsupportedErr = errors.New("setting OOM scores is unsupported in this build")
func NewOOMAdjuster() *OOMAdjuster {
return &OOMAdjuster{
ApplyOOMScoreAdj: unsupportedApplyOOMScoreAdj,
ApplyOOMScoreAdjContainer: unsupportedApplyOOMScoreAdjCon... |
ACCEPTED
#### According to
NUB Generator [autonym]
#### Published in
null
#### Original name
null
### Remarks
null |
function location_spawns(pc) {
//
// Smuggling chasers and receivers
//
if (pc.buffs_has('dont_get_caught')){
if (this.smuggling_is_destination(pc)){
this.smuggling_spawn_receiver(pc);
} else {
if (!this.isInHell() && !this.isInstance()){
this.smuggling_spawn_deimaginator(pc);
}
}
} else if (pc.... |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html id="htmlId">
<head>
<title>Coverage Report :: BibLatexEntryTypes</title>
<style type="text/css">
@import "../../.css/coverage.css";
</style>
</head>
<body>
<div class="header">... |
import java.io.*;
public class c1 {
void f() {
FileInputStream fis = null;
try {
fis = new FileInputStream("");
DataInputStream dis = new DataInputStream(fis);
<caret>dis.readInt();
} catch (IOException e) {
e.printStackTrace();
}
... |
- **FortiSIEM Incident Last Seen**
- **FortiSIEM Incident First Seen**
- **FortiSIEM Event Type**
- **FortiSIEM Incident ID**
- **FortiSIEM Incident Reporter IP**
- **FortiSIEM Events**
- **FortiSIEM Incident Report Device Name**
- **FortiSIEM Events Count**
- **FortiSIEM Status**
- **FortiSIEM Destination User**
- **F... |
var helper = require('../test-helper');
var client = helper.client();
client.query('CREATE TEMP TABLE arrtest (n integer, s varchar)');
client.query("INSERT INTO arrtest VALUES (4, 'foo'), (5, 'bar'), (6, 'baz');");
var qText = "SELECT \
ARRAY[1, 2, 3] AS b,\
ARRAY['xx', 'yy', 'zz'] AS c,\
ARRAY(SELECT n FROM arrtest... |
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android" >
<View
android:id="@+id/divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="?android:attr/dividerHorizontal" />
<LinearLayout
... |
<?xml version="1.0" encoding="utf-8"?>
<reflection>
<assemblies>
<assembly name="mscorlib">
<assemblydata version="4.3.1.0" culture="" key="" hash="SHA1" />
<attributes>
<attribute>
<type api="T:System.Reflection.AssemblyTrademarkAttribute" ref="true" />
<argument>... |
<?xml version="1.0"?>
<doc>
<assembly>
<name>FluentMigrator</name>
</assembly>
<members>
<member name="T:FluentMigrator.MigrationStage">
<summary>
Represents a stage in the migration run.
</summary>
</member>
<member name="F:FluentMigrator.... |
namespace gfx {
class Size;
}
namespace ui {
class DriWrapper;
class MockSurfaceGenerator : public ScanoutSurfaceGenerator {
public:
MockSurfaceGenerator(DriWrapper* dri);
virtual ~MockSurfaceGenerator();
std::vector<MockDriSurface*> surfaces() const { return surfaces_; }
// ScanoutSurfaceGenerator:
vir... |
namespace std
{
using __gnu_test::NonDefaultConstructible;
typedef NonDefaultConstructible value_type;
typedef value_type* iterator_type;
typedef std::less<value_type> compare_type;
template pair<value_type, value_type> minmax(initializer_list<value_type>);
template pair<value_type, value_type> minmax... |
/**
* \file close_code.h
*
* This file reverses the effects of begin_code.h and should be included
* after you finish any function and structure declarations in your headers
*/
#ifndef _begin_code_h
#error close_code.h included without matching begin_code.h
#endif
#undef _begin_code_h
/* Reset structure pac... |
AutoForm.hooks({
completeUserForm: {
onError: function(operation, error) {
this.template.$('button[type=submit]').removeClass('loading');
Messages.flash(error.message.split('|')[0], 'error'); // workaround because error.details returns undefined
Messages.clearSeen();
}
}
});
Template.user... |
package org.apache.pulsar.broker.service;
import org.apache.pulsar.common.policies.data.Policies;
import org.apache.pulsar.common.policies.data.PublishRate;
public class PublishRateLimiterDisable implements PublishRateLimiter {
public static final PublishRateLimiterDisable DISABLED_RATE_LIMITER = new PublishRat... |
class EnumGeneric<T extends Enum<?>> {
}
class WithEnum<T extends Enum<?>> extends EnumGeneric<T> {
} |
Kubernetes Namespaces help different projects, teams, or customers to share a Kubernetes cluster.
It does this by providing the following:
1. A scope for [Names](identifiers.md).
2. A mechanism to attach authorization and policy to a subsection of the cluster.
Use of multiple namespaces is optional.
This example de... |
'use strict';
angular.module('mean.addbill').factory('Addbill', [
function() {
return {
name: 'addbill'
};
}
]); |
package org.apache.zookeeper.compatibility;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
import org.apache.cu... |
/**
* Library of arithmetic operators.
* <br>
* Most of the arithmetic operators come in three types based on their schema.
* The operators whose names ends with "Map" (eg SumMap, MaxMap, MinMap) take in Map on input ports and emit HashMap. These operators use
* round robin partitioning and would merge as per the... |
var $ = require('../internals/export');
var from = require('../internals/array-from');
var checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');
var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {
Array.from(iterable);
});
// `Array.from` method
// https://tc... |
/* $Id */
/*
** Copyright (C) 2014 Cisco and/or its affiliates. All rights reserved.
** Copyright (C) 2013-2013 Sourcefire, Inc.
**
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License Version 2 as
** published by the Free Software Fo... |
var env,
ENVIRONMENTS = [
"json-schema-draft-01",
"json-schema-draft-02"
],
curEnvId;
//calls ok(true) if no error is thrown
function okNoError(func, msg) {
try {
func();
ok(true, msg);
} catch (e) {
ok(false, msg + ': ' + e);
}
}
//calls ok(true) if an error is thrown
function okErr... |
'use strict';
module.exports = function(Chart) {
Chart.Line = function(context, config) {
config.type = 'line';
return new Chart(context, config);
};
};
|
package com.seeyoui.kensite.common.util;
import net.sf.ehcache.Cache;
import net.sf.ehcache.CacheManager;
import net.sf.ehcache.Element;
/**
* Cache工具类
* @author
* @version
*/
public class CacheUtils {
private static CacheManager cacheManager = ((CacheManager)SpringContextHolder.getBean("cacheManager"));
pri... |
package org.apache.hadoop.mapred;
import java.io.IOException;
/**
* Collects the <code><key, value></code> pairs output by {@link Mapper}s
* and {@link Reducer}s.
*
* <p><code>OutputCollector</code> is the generalization of the facility
* provided by the Map-Reduce framework to collect data output by ... |
package uk.gov.hscic.appointment.appointment;
import java.util.Date;
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Tr... |
namespace net {
ClientSocketHandle::ClientSocketHandle()
: is_initialized_(false),
pool_(NULL),
higher_pool_(NULL),
reuse_type_(ClientSocketHandle::UNUSED),
callback_(base::Bind(&ClientSocketHandle::OnIOComplete,
base::Unretained(this))),
is_ssl_error_(false... |
package org.jabe.neverland.io;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import jxl.Sheet;
import jxl.Workbook;
public class ExcelProcessor {
public static final String N = "\r\n";
public static void main(String[] args) {
try {
... |
#include <cstdio>
#include "tessvars.h"
FILE *debug_fp = stderr; // write debug stuff here
|
/**
* ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v7.0.2
* @link http://www.ag-grid.com/
* @license MIT
*/
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : ... |
#include <es.h>
#include <es/handle.h>
#include <es/naming/IContext.h>
#include "arp.h"
#include "conduit.h"
#include "datagram.h"
#include "dix.h"
#include "icmp4.h"
#include "igmp.h"
#include "inet.h"
#include "inet4.h"
#include "inet4address.h"
#include "inet6.h"
#include "inet6address.h"
#include "inetConfig.h"
#... |
package org.elasticsearch.client.searchable_snapshots;
import org.elasticsearch.client.Validatable;
import org.elasticsearch.client.ValidationException;
import java.util.Optional;
public class CachesStatsRequest implements Validatable {
private final String[] nodesIds;
public CachesStatsRequest(String...... |
<?php
namespace Zend\Form\View\Helper;
use Zend\Form\ElementInterface;
use Zend\Form\Element\Select as SelectElement;
use Zend\Form\Exception;
use Zend\Stdlib\ArrayUtils;
class FormSelect extends AbstractHelper
{
/**
* Attributes valid for the current tag
*
* Will vary based on whether a select, ... |
#ifndef SkEffectPriv_DEFINED
#define SkEffectPriv_DEFINED
#include "include/core/SkImageInfo.h"
#include "include/core/SkMatrix.h"
class SkArenaAlloc;
class SkColorSpace;
class SkMatrixProvider;
class SkPaint;
class SkRasterPipeline;
// Passed to effects that will add stages to rasterpipeline
struct SkStageRec {
... |
<?php
namespace Sylius\Component\Order\Modifier;
use Sylius\Component\Order\Model\OrderInterface;
use Sylius\Component\Order\Model\OrderItemInterface;
use Sylius\Component\Order\Processor\OrderProcessorInterface;
/**
* @author Łukasz Chrusciel <lukasz.chrusciel@lakion.com>
*/
final class OrderModifier implements... |
import jwt = require('jwt-simple');
var payload = { foo: 'bar' };
var secret:string = 'xxx';
// encode
var token = jwt.encode(payload, secret);
// decode
var decoded = jwt.decode(token, secret);
console.log(decoded); //=> { foo: 'bar' } |
colorbrewer
===========
Color specifications and designs developed by Cynthia Brewer (http://colorbrewer2.org/).
This is a shim module of colorbrewer2 by Cythina Brewer for browserify.
It is also a shim for the [files provided in d3.js lib](https://github.com/mbostock/d3/tree/master/lib/colorbrewer).
|