text stringlengths 3 1.05M |
|---|
namespace test_helpers {
ptest::hiera::TestSuite
create_suite_three_dummy() {
auto test1 = create_dummy_test("test_dummy_1");
auto test2 = create_dummy_test("test_dummy_2");
auto test3 = create_dummy_test("test_dummy_3");
ptest::hiera::TestSuite suite("my_suite");
suite.add_test(test1);
suite.add_test(test... |
/**
* Created by michael on 17-7-25.
*/
import React, {Component} from 'react';
import {
AppRegistry,
Animated,
Button,
Dimensions,
View,
Text,
} from 'react-native';
export default class SimpleModule extends Component {
constructor(props) {
super(props);
var {height, width} = Dimensions.get(... |
export-csv
==========
This plugin allows the user to export the chart data to various formats and views.
The contents of the plugin is located in the JavaScript file "export-csv.js".
This plugin is published under the MIT license, and the license document is included in the repository.
### Demos
* [Categorized chart... |
{% extends "base.html" %}
{% block content %}
<div class="client-form">
<form action="{{ url_for('cadastro') }}" method="POST" id="client-register-form">
<div class="attribute-column">{{ lang_11 }}:</div><div class="input-column"><input class="cf-input-text" type="text" name="nome" placeholder="... |
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable : 4100) // ignore unreferenced parameter warning introduced in osg
#endif
#include <osg/Geode>
#include <osg/Group>
#include <osg/ShapeDrawable>
#include <osg/Shape>
#include <osgDB/Registry>
#include <osgDB/ReadFile>
#include <osg/GraphicsConte... |
//
// NSArray+ObjectiveSugar.h
// Objective Sugar
//
// Created by Marin Usalj on 5/7/12.
// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//
// For an overview see http://cocoadocs.org/docsets/ObjectiveSugar/
@interface NSArray (ObjectiveSugar)
/**
The first item in the array, or nil.
@return T... |
/* eslint no-console:0 */
var loopback = require('loopback');
var boot = require('loopback-boot');
var childProcess = require('child_process');
var async = require('async');
var path = require('path');
var debug = require('debug')('strong-nginx-controller:server');
var nginxConf = require('./nginx-conf');
function se... |
namespace media {
namespace {
class MockCdmServiceClient : public media::CdmService::Client {
public:
MockCdmServiceClient() = default;
~MockCdmServiceClient() override = default;
// media::CdmService::Client implementation.
MOCK_METHOD0(EnsureSandboxed, void());
std::unique_ptr<media::CdmFactory> CreateC... |
package com.netflix.astyanax.util;
import java.util.concurrent.PriorityBlockingQueue;
import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
public class BlockingConcurrentWindowCounter {
private final PriorityBlockingQueue<Integer> queue;
private volatile int tail = 0;
private volat... |
<?php
namespace Pataconcio\LojaBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="pedidos")
*
*/
class Pedido
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
protected $numero;
public function getNumero()
{
return $this->nume... |
package com.amazonaws.services.pinpoint.model.transform;
import javax.annotation.Generated;
import com.amazonaws.SdkClientException;
import com.amazonaws.Request;
import com.amazonaws.http.HttpMethodName;
import com.amazonaws.services.pinpoint.model.*;
import com.amazonaws.transform.Marshaller;
import com.amazonaw... |
// Package install installs the experimental API group, making it available as
// an option to all of the API encoding/decoding machinery.
package install
import (
"fmt"
"github.com/golang/glog"
"k8s.io/client-go/1.5/pkg/api"
"k8s.io/client-go/1.5/pkg/api/meta"
"k8s.io/client-go/1.5/pkg/api/unversioned"
"k8s... |
module Text.ParserCombinators.UU ( module Text.ParserCombinators.UU.Core
, module Text.ParserCombinators.UU.Derived
, module Text.ParserCombinators.UU.MergeAndPermute
) where
import Text.ParserCombinators.UU.Core
import T... |
package com.udacity.example.quizexample;
import android.content.ContentResolver;
import android.database.Cursor;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import com.... |
# grunt-ssh
[](https://travis-ci.org/andrewrjones/grunt-ssh)
[](http://badge.fury.io/js/grunt-ssh)

> SSH and SFTP tasks ... |
This is a Vanilla Rails app design for use with [microwave-rails](https://github.com/Microwave-MVC/microwave-rails). If you don't want or need a VM provisioned for you, you are welcome to clone this repo as a basic starter app.
This app uses:
* Ruby 2.2 & Rails 4.2
* Postgres
* Puma Webserver
* RSpec
* Optimized for d... |
package tundra.list;
// -----( IS Java Code Template v1.2
// -----( CREATED: 2017-12-14T14:14:52.183
// -----( ON-HOST: -
import com.wm.data.*;
import com.wm.util.Values;
import com.wm.app.b2b.server.Service;
import com.wm.app.b2b.server.ServiceException;
// --- <<IS-START-IMPORTS>> ---
import com.wm.app.b2b.server.S... |
define([
'jquery',
'underscore',
'backbone',
'models/comment',
'views/comment/item',
'views/comment/form',
'text!templates/comment/list.html',
'views/alert',
], function($, _, Backbone, CommentModel, CommentItemView, CommentFormView, listTemplate, AlertView) {
var CommentListView = Backbone.View.... |
namespace common
{
template < class _Action >
class CSetResult : public boost::static_visitor< void >
{
public:
CSetResult( _Action * const _action ):m_action( _action ){};
virtual void operator()( common::CConnectedNode & _param ) const
{
LogPrintf("set response \"connected node\" to action: %p \n", m_action );... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.WindowsAzure.Storage.Table;
namespace Zer0.Azure
{
public interface ITableStorageRepository<T>
{
Task InsertAsync(T entity);
Task<TableResult> Up... |
try:
import ConfigParser as configparser
except ImportError:
# python 3
import configparser
import os.path
from bash import bash
class bash_no_errors(bash):
def bash(self, cmd):
super(bash_no_errors, self).bash(cmd)
if self.stderr:
raise Exception(self.stderr)
re... |
package org.apache.flink.configuration;
import org.apache.flink.annotation.Internal;
import org.apache.flink.configuration.description.Description;
import static org.apache.flink.configuration.ConfigOptions.key;
import static org.apache.flink.configuration.description.TextElement.text;
/**
* Configuration paramet... |
'use strict';
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var crypto = require('crypto');
var authTypes = ['github', 'twitter', 'facebook', 'google'];
var UserSchema = new Schema({
name: String,
email: {
type: String,
lowercase: true
},
gravatar: String,
role: {
type: Strin... |
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("Ra... |
title: La Risurrezione Di Mosè
date: 18/12/2021
---
### Letture
Numeri 20:1-13; Deuteronomio 31:2; 34:1-12; Giuda 9; 1 Corinzi 15:13-22
> <p></p>
> «Invece, l’arcangelo Michele, quando contendeva con il diavolo disputando per il corpo di Mosè, non osò pronunciare contro di lui un giudizio ingiurioso, ma disse: “Ti ... |
from collections import OrderedDict
from typing import Dict, Type
from .base import NetworkEndpointGroupsTransport
from .rest import (
NetworkEndpointGroupsRestInterceptor,
NetworkEndpointGroupsRestTransport,
)
# Compile a registry of transports.
_transport_registry = (
OrderedDict()
) # type: Dict[str, ... |
package contractcourt
import (
"errors"
"io"
"sync"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/btcsuite/btcd/wire"
"github.com/btcsuite/btcutil"
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/input"
"github.com/lightningnetwork/lnd/sweep"
)
// anchorResolver is a... |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<tit... |
'use strict';
import * as fs from 'fs';
import * as path from 'path';
import { PathResolver } from './configuration/pathResolver';
import * as pdk from './configuration/pdkResolver';
import { ConnectionType, ISettings, ProtocolType, PuppetInstallType } from './settings';
/** Creates an Aggregate Configuration based o... |
package org.cytoscape.cyndex2.internal.rest.parameter;
import java.util.Map;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ApiModel(description = "Required parameters for saving network(s) to NDEx.")
public class NdexSaveParameters extends NdexBasicSaveParameter {
@ApiMode... |
package com.quollwriter.data;
import com.quollwriter.ui.*;
import com.quollwriter.ui.userobjects.*;
/**
* Models a text user configurable object field.
*/
public class ObjectDescriptionUserConfigurableObjectTypeField extends MultiTextUserConfigurableObjectTypeField
{
public ObjectDescriptionUserConfigurableObj... |
<?xml version="1.0" encoding="UTF-8"?>
<!--
The MIT License
Copyright (c) 2004-2018, Sun Microsystems, Inc., Kohsuke Kawaguchi, CloudBees, Inc.
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 wit... |
"""
Run
~~~
This is the entry point into the application.
To run the application, open your terminal and type:
$ python run.py
:author: Jeff Kereakoglow
:date: 2014-11-10
:copyright: (c) 2014 by Alexis Digital
:license: MIT, see LICENSE for more details
"""
from app import app
a... |
/*global jQuery, define*/
// Uses AMD or browser globals to create a jQuery plugin.
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], factory);
} else {
// Browser globals
factory... |
<?php
App::uses('AppController', 'Controller');
App::uses('Account','Vendor/twitter');
/**
* Static content controller
*
* Override this controller by placing a copy in controllers directory of an application
*
* @package app.Controller
* @link http://book.cakephp.org/2.0/en/controllers/pages-controller.... |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<meta name="collection" content="api">
<!-- Generated by javadoc (build 1.5.0-rc) on Wed Aug 11 07:23:09 PDT 2004 -->
<TITLE>
KeyManagementException (Java 2 Platform SE 5.0)
</TITLE>
<MET... |
package com.google.ads.googleads.v10.enums;
public interface PromotionExtensionDiscountModifierEnumOrBuilder extends
// @@protoc_insertion_point(interface_extends:google.ads.googleads.v10.enums.PromotionExtensionDiscountModifierEnum)
com.google.protobuf.MessageOrBuilder {
}
|
<?php
class Google_Service_DataLabeling_GoogleCloudDatalabelingV1beta1AnnotatedDataset extends Google_Collection
{
protected $collection_key = 'blockingResources';
public $annotationSource;
public $annotationType;
public $blockingResources;
public $completedExampleCount;
public $createTime;
public $desc... |
var lodash_1 = require('lodash');
var FlexLayout_1 = require("./FlexLayout");
var computeLayout = require('css-layout');
var IMAGES_PER_PAGE = 3;
var ImageGallery = (function () {
function ImageGallery(name, images, LayoutTemplate, PageOptions) {
this.name = name;
this.LayoutTemplate = LayoutTemplat... |
import numpy as np
# This is the version in the book:
def all_correlations_book_version(bait, target):
'''
corrs = all_correlations(bait, target)
corrs[i] is the correlation between bait and target[i]
'''
return np.array(
[np.corrcoef(bait, c)[0, 1]
for c in target])
# This is ... |
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
* xFrameworkPX_Model_Behavior_AllTests Class File
*
* PHP versions 5
*
* @category Tests
* @package xFrameworkPX_Model_Behavior
* @author Kazuhiro Kotsutsumi <kotsutsumi@xenophy.com>
* @copyright Copyright (c) 2006-2010 Xenophy... |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_30) on Wed Feb 12 00:57:51 PST 2014 -->
<TITLE>
W-Index
</TITLE>
<META NAME="date" CONTENT="2014-02-12">
<LINK REL ="stylesheet" TYPE="text/css" HR... |
sudo systemctl enable ssh
sudo systemctl start ssh
|
<!DOCTYPE html>
<html class="no-js">
<head>
<meta charset="utf-8"/>
<title>wilde snake</title>
<link rel="stylesheet" media="all" type="text/css" href="css/normalize.css"/>
<link rel="stylesheet" media="all" type="text/css" href="css/styles.css"/>
</head>
<body>
<div class="container">
<img src="images/logo.p... |
<?php
namespace Magento\Catalog\Model\Product;
/**
* Factory class for @see \Magento\Catalog\Model\Product\Option
*/
class OptionFactory
{
/**
* Object Manager instance
*
* @var \Magento\Framework\ObjectManagerInterface
*/
protected $_objectManager = null;
/**
* Instance name to... |
package com.jivesoftware.os.miru.sync.deployable.region;
import com.jivesoftware.os.miru.api.base.MiruTenantId;
/**
*
*/
public class MiruStatusRegionInput {
public final String syncspaceName;
public final MiruTenantId tenantId;
public MiruStatusRegionInput(String syncspaceName, MiruTenantId tenantId)... |
package com.dranawhite.pattern.complex.deduction;
/**
* 交易类
*
* @author dranawhite 2017/11/1
* @version 1.0
*/
public class Trade {
private String tradeNo;
/**
* 交易金额
*/
private int mount;
public String getTradeNo() {
return tradeNo;
}
public void setTradeNo(String tra... |
require "graphql"
class QueryType
def call
GraphQL::ObjectType.define do
name "Query"
description "The query root of this schema"
field :users do
type -> { types[Types::User[:graphql_type]] }
resolve -> (obj, args, ctx) {
Types::User[:repo].all
}
end
... |
export default {
/**
* Check if element in current viewport
* @param el
* @returns {boolean}
*/
elementInViewport(el) {
var top = el.offsetTop;
var left = el.offsetLeft;
var width = el.offsetWidth;
var height = el.offsetHeight;
while(el.offsetParent)... |
{
if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) {
vnode.elm = elm;
vnode.isAsyncPlaceholder = true;
return true;
}
if (process.env.NODE_ENV !== "production") {
if (!assertNodeMatch(elm, vnode)) {
return false;
}
}
vnode.elm = elm;
var tag = vnode.tag;
var data = vno... |
package org.anddev.andengine.engine.camera;
import org.anddev.andengine.engine.handler.*;
import org.anddev.andengine.engine.camera.hud.*;
import org.anddev.andengine.input.touch.*;
import org.anddev.andengine.util.*;
import javax.microedition.khronos.opengles.*;
import org.anddev.andengine.entity.shape.*;
import org.... |
import React, { PropTypes } from 'react';
import b from './block.css';
import s from './table.css';
import Tools from '../tools';
class Table extends React.Component {
constructor(props) {
super(props);
this.state = {};
}
render() {
const {style,table,modifiers,header,description,title,onModifier} =... |
ACCEPTED
#### According to
International Plant Names Index
#### Published in
null
#### Original name
null
### Remarks
null |
var keystone = require('keystone'),
_ = require('underscore'),
Good = keystone.list('Good');
exports = module.exports = function(req, res) {
var view = new keystone.View(req, res),
locals = res.locals;
locals.data = {
goods: []
}
locals.query = req.query;
locals.title = "Higiezina Irgarakiak, zure etxebiz... |
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License... |
<?php
namespace VitrineBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
/**
* This is the class that validates and merges configuration from your app/config files
*
* To learn more see {@link http://symfony.com... |
# Use this hook to configure devise mailer, warden hooks and so forth.
# Many of these configuration options can be set straight in your model.
Devise.setup do |config|
# The secret key used by Devise. Devise uses this key to generate
# random tokens. Changing this key will render invalid all existing
# confirmat... |
---
title: "聊聊ALAssetsLibrary 与 Photos"
date: 2017-10-25 10:24:23
categories: [iOS]
tags: [iOS]
comments: true
---
`ALAssetsLibrary`和`Photos`都是Apple提供访问系统相册资源的两个标准库,前者在iOS9之后已经被弃用,后者在iOS8上开始支持。可想而知,`Photos`库提供了更全面更友好的接口。
本文通过对比两者的用法来系统地学习一下“iOS访问系统相册资源”的知识点。重点会放在新的`Photos`库。
首先来看看旧的`ALAssetsLibrary`库。
### ALAs... |
DDCoachMarks
============
Quick and easy coach marks to use in any iOS app.

{
Console.WriteLine("Windows PowerShell");
Console.WriteLine("Copyright(C) 2016 Microsoft Corporation. All rights reserved.\n");
PShell pshell = new PShell();
while ... |
ACCEPTED
#### According to
International Plant Names Index
#### Published in
null
#### Original name
null
### Remarks
null |
<md-toolbar class="toolbar lay_row" layout="row" layout-align="center center">
<span class="mdl-cell--hide-tablet mdl-cell--hide-phone toolbar-brand">{{vm.brand}}</span>
<section flex layout="row" layout-align="left center" >
<div ng-repeat="path in vm.paths">
<md-button href="{{path.url}}" class="mdl-cel... |
<?php
$lang['Save_changes'] = '救う';
$lang['Automatically_render_interface_for_action_in_controller'] = '';
$lang['Automatically_creates_the_missing_PHP_language_file_when_loading_the_interface'] = '';
$lang['Automatic_creation_of_css_and_js_files_is_missing_when_loading_interface'] = '';
$lang['Production_settings'] = ... |
/*
* 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 applicable law or agreed to in writing, software
* distribut... |
import pytest
from cdrouter.cdrouter import CDRouterError
from .utils import my_cdrouter, my_c, import_all_from_file # pylint: disable=unused-import
class TestAlerts:
def test_list(self, c):
import_all_from_file(c, 'tests/testdata/example4.gz')
(alerts, links) = c.alerts.list(20220831203101)
... |
package ru.adelf.idea.dotenv.python;
import com.intellij.psi.util.QualifiedName;
import com.jetbrains.python.psi.PyCallExpression;
import com.jetbrains.python.psi.PyExpression;
import com.jetbrains.python.psi.PyReferenceExpression;
import com.jetbrains.python.psi.PySubscriptionExpression;
class PythonPsiHelper {
... |
package org.smartdeveloperhub.curator.connector;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import java.io.IOException;
import mockit.Expectations;
import mockit.Mocked;
import mockit.integration.junit4.JMockit;
import org.junit.Test;
import org.j... |
<?php
/**
* Created by PhpStorm.
* User: Ibrahima
* Date: 14/08/2017
* Time: 17:55
*/
namespace Vusalba\UserBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sy... |
<form action="_upload/" id="mix-upload-form" class="dropzone">
{% csrf_token %}
<input type="hidden" name="upload-hash">
<div class="fallback">
Your browser is too old for uploading file <br/>
Please come back with Chrome or Firefox
</div>
</form>
|
set -eu
shopt -s nullglob
# Locate the script file. Cross symlinks if necessary.
loc="$0"
while [ -h "$loc" ]; do
ls=`ls -ld "$loc"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
loc="$link" # Absolute link
else
loc="`dirname "$loc"`/$link" # Relative l... |
<?php
namespace Commonhelp\DI\Definition\Resolver;
use Commonhelp\DI\Definition\DefinitionInterface;
use Commonhelp\DI\Definition\ArrayDefinition;
use Commonhelp\DI\Definition\Helper\DefinitionHelperInterface;
class ArrayResolver implements DefinitionResolverInterface{
/**
*
* @var DefinitionResolverInterface... |
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#if defined(BYTE_ORDER)&&(BYTE_ORDER == BIG_ENDIAN)
#define _le32toh(x) __builtin_bswap32(x)
#define _htole32(x) __builtin_bswap32(x)
#e... |
extensions = ['sphinx.ext.autodoc']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['notemplates']
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'
# The master toctree do... |
ACCEPTED
#### According to
Index Fungorum
#### Published in
Can. J. Bot. 51(12): 2362 (1974)
#### Original name
Puccinia saxifragae var. heucherarum Savile
### Remarks
null |
title: Studiehjälp
date: 24/12/2021
---
”Mose och Aron hade varit arga när de ropade: ’Kan vi ur denna klippa skaffa fram vatten åt er?’ Därmed övertog de Guds roll som om kraften skulle ha funnits hos dem själva, trots att de var människor med mänskliga ofullkomligheter och begär.
Mose hade tröttats ut av folkets ... |
if [ ! -x configure ]; then
autoreconf -i
fi
CXXFLAGS=
if [ `uname` = 'Darwin' ] ; then
CXXFLAGS="-Wno-deprecated-declarations"
fi
if [ ! -f Makefile ]; then
if [ "$1" = "debug" ]; then
CXXFLAGS+=' -g -O0'
shift
elif [ "$1" = "coverage" ]; then
CXXFLAGS+=' -g -O0 -fprofile-arcs... |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:lay... |
export const name = 'winHeight';
export function f (win, doc) {
let getHeight = () => win.innerHeight;
return {
link (scope, ele, attrs) {
let alt = ele[0].offsetHeight;
let forOther = angular.element(angular.element(doc).find(attrs.winHeight));
scope.$watch(getHeight, value => {
let isPositive = ( val... |
local singletons = require "kong.singletons"
local BasePlugin = require "kong.plugins.base_plugin"
local responses = require "kong.tools.responses"
local constants = require "kong.constants"
local jwt_decoder = require "kong.plugins.jwt.jwt_parser"
local ipairs = ipairs
local string_format = string.format
loc... |
using System.Text.Json;
using Azure.Core;
namespace Azure.ResourceManager.Compute.Models
{
public partial class ApiErrorBase : IUtf8JsonSerializable
{
void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
{
writer.WriteStartObject();
if (Code != null)
{
... |
之前我们测试了 `headers` 的基础方法模块,接下来我们会从业务角度测试 `headers` 的相关业务逻辑。
## 测试代码编写
`test/headers.spec.ts`:
```typescript
import axios from '../src/index'
import { getAjaxRequest } from './helper'
function testHeaderValue(headers: any, key: string, val?: string): void {
let found = false
for (let k in headers) {
if (k.to... |
package com.aloeapps.neptune.job;
import org.apache.log4j.Logger;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.context.ApplicationContext;
import com.aloeapps.common.ApplicationContextHolder;
import com.aloeapps.common.helper.AloeHel... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Wintellect.PowerCollections;
class Event : IComparable
{
public DateTime date;
public String title;
public String location;
public Event(DateTime date, String title, String location)
{
this.date =... |
#ifndef LIBCORK_DS_BUFFER_H
#define LIBCORK_DS_BUFFER_H
#include <stdarg.h>
#include "libcork/core/api.h"
#include "libcork/core/attributes.h"
#include "libcork/core/types.h"
struct cork_buffer {
/* The current contents of the buffer. */
void *buf;
/* The current size of the buffer. */
size_t s... |
ACCEPTED
#### According to
Index Fungorum
#### Published in
null
#### Original name
Lichen exiguus Ach.
### Remarks
null |
import json
from pybbn.graph.dag import Bbn
from pybbn.graph.edge import EdgeType, Edge
from pybbn.graph.jointree import JoinTree
from pybbn.graph.node import BbnNode
from pybbn.graph.variable import Variable
from pybbn.pptc.inferencecontroller import InferenceController
a = BbnNode(Variable(0, 'a', ['t', 'f']), [0.2... |
using System;
using System.Collections;
namespace NUnit.Framework.Constraints
{
/// <summary>
/// ConstraintExpressionBase is the abstract base class for the
/// ConstraintExpression class, which represents a
/// compound constraint in the process of being constructed
/// from a serie... |
#include "cpu/testers/traffic_gen/dram_gen.hh"
#include <algorithm>
#include "base/random.hh"
#include "base/trace.hh"
#include "debug/TrafficGen.hh"
DramGen::DramGen(SimObject &obj,
MasterID master_id, Tick _duration,
Addr start_addr, Addr end_addr,
Addr _blocks... |
* [Introduction](README.md)
* [Usage](usage.md)
* [Creating Roles](usage/creating-roles.md)
* [Lonamic Roles](usage/lonamic-roles.md)
* [Can User X Do Action Y?](usage/can-user-x-do-action-y.md)
* [Editing Own Post](usage/editing-own-post.md)
* [Filtering Requests](usage/filtering-requests.md)
* [API](api.md)... |
module.exports = require('./components/server').TestRestServer; |
package org.apache.ibatis.plugin;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import org.junit.Test;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
public class PluginTest {
@Test
public void mapPluginShouldInterceptGet() {
... |
<?php
/**
* Represents a template test.
*
* @author Fabien Potencier <fabien@symfony.com>
*
* @see http://twig.sensiolabs.org/doc/templates.html#test-operator
*/
class Twig_Test
{
private $name;
private $callable;
private $options;
/**
* Creates a template test.
*
* @param strin... |
let Statment = require('../base').Statment;
module.exports = Statment.extend('ACTION', 'COPY', {
}, {
$init(expr, into){
this.expr = expr;
this.into = into;
},
async exec(eenv){
let expr = await this.expr.__update__(eenv, null);
if (!this.expr["#addressable"]){
expr = await expr.__solve__(eenv);
}
... |
import sys, io
def config_logging(on=False, file=sys.stderr):
global log_config
log_config = {
"on": on,
"file": file,
}
config_logging()
def log(*args, **kwargs):
if log_config["on"]:
print("DEBUG LOG:", *args, file=log_config["file"], **kwarg... |
import os
import time
import logging
import numpy as np
from optparse import OptionParser
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import rospy
from imu.msg import MagneticFieldBatch
logger = logging.getLogger(__name__)
# Adapted from: https://gist.github.com/lambdalisue/7201028
def fi... |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE36_Absolute_Path_Traversal__char_file_fopen_02.cpp
Label Definition File: CWE36_Absolute_Path_Traversal.label.xml
Template File: sources-sink-02.tmpl.cpp
*/
/*
* @description
* CWE: 36 Absolute Path Traversal
* BadSource: file Read input from a file
* GoodSo... |
layout: post
date: '2015-11-20'
title: "Weddington Way Dessy 2903 FINAL SALE Sleeveless Floor-Length Aline/Princess"
category: Weddington Way
tags: [Weddington Way,Aline/Princess ,Sweetheart,Floor-Length,Sleeveless]
---
### Weddington Way Dessy 2903 FINAL SALE
Just **$149.99**
### Sleeveless Floor-Length Aline/Prince... |
package untouchedwagons.minecraft.powerlines.network.grids;
import cpw.mods.fml.common.network.simpleimpl.IMessage;
import cpw.mods.fml.common.network.simpleimpl.MessageContext;
import net.minecraft.client.Minecraft;
import net.minecraft.world.World;
import untouchedwagons.minecraft.powerlines.grids.PowerGrid;
import ... |
package org.apache.camel.component.zookeeper.operations;
import org.apache.zookeeper.CreateMode;
import org.apache.zookeeper.KeeperException;
import org.apache.zookeeper.ZooDefs;
import org.apache.zookeeper.ZooKeeper;
import org.apache.zookeeper.common.PathUtils;
public final class ZooKeeperHelper {
private Zoo... |
using System;
using System.Linq;
using _ = Atata.Tests.RandomizationPage;
namespace Atata.Tests
{
[Url("randomization")]
public class RandomizationPage : Page<_>
{
[Flags]
public enum CheckBoxOptions
{
None = 0,
OptionA = 1 << 0,
OptionB = 1 << 1... |