answer stringlengths 15 1.25M |
|---|
#include "ppapi/thunk/common.h"
#include "base/bind.h"
#include "base/message_loop.h"
#include "ppapi/c/pp_errors.h"
namespace ppapi {
namespace thunk {
int32_t MayForceCallback(<API key> callback, int32_t result) {
if (result == <API key>)
return result;
if (callback.func == NULL ||
(callback.flags & <AP... |
static const char
LIBPROJ_ID[] = "Id";
#define PROJ_LIB__
#include <lib_proj.h>
PROJ_HEAD(putp2, "Putnins P2") "\n\tPCyl., Sph.";
#define C_x 1.89490
#define C_y 1.71848
#define C_p 0.6141848493043784
#define EPS 1e-10
#define NITER 10
#define PI_DIV_3 1.0471975511965977
FORWARD(s_forward); /* spheroid */
doubl... |
# modification, are permitted provided that the following conditions are
# met:
# the distribution.
# * Neither the name of John Haddon nor the names of
# any other contributors to this software may be used to endorse or
# promote products derived from this software without specific prior
# ... |
package org.agmip.functions;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import static org.agmip.common.Functions.*;
import org.agmip.common.Functions.CompareMode;
import org.agmip.util.MapUtil;
import static org.agmip.util.MapUtil.*... |
package org.locationtech.geogig.geotools.cli.porcelain;
import java.io.IOException;
import org.geotools.data.DataStore;
import org.locationtech.geogig.api.ProgressListener;
import org.locationtech.geogig.cli.CLICommand;
import org.locationtech.geogig.cli.<API key>;
import org.locationtech.geogig.cli.GeogigCLI;
import o... |
<?php
/**
* Description of <API key>
*/
class <API key> extends \OmegaUp\Test\ControllerTestCase {
/**
* A PHPUnit data provider for libinteractive details.
* $emptyRequest, $missingParameters
* @return list<array{0: bool, 1: list<string>, 2: array<string, string>}>
*/
public function <API... |
CodeMirror.validate = (function() {
var GUTTER_ID = "<API key>";
var SEVERITIES = /^(?:error|warning)$/;
function showTooltip(e, content) {
var tt = document.createElement("div");
tt.className = "<API key>";
tt.appendChild(content.cloneNode(true));
document.body.appendChild(tt);
function posit... |
## Setup ##
Global Dependencies
Install
* [node.js](http://nodejs.org)
* [GitHub Client](http://mac.github.com/) (with Git Terminal option)
* [Safari](http:
Project Setup
$ git clone https://github.com/ForceDotComLabs/<API key>.git
$ cd <API key>
$ npm install
Run a local node server:
$ node proxy.js
Yo... |
package com.lightcrafts.media.jai.iterator;
import com.lightcrafts.media.jai.util.PropertyUtil;
class JaiI18N {
static String packageName = "com.lightcrafts.media.jai.iterator";
public static String getString(String key) {
return PropertyUtil.getString(packageName, key);
}
} |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: <API key>.c
Label Definition File: <API key>.free.label.xml
Template File: source-sinks-53c.tmpl.c
*/
/*
* @description
* CWE: 690 Unchecked Return Value To NULL Pointer
* BadSource: malloc Allocate data using malloc()
* Sinks:
* GoodSink: Check to see if the data a... |
<?php
namespace LaneWeChat\Core\Aes;
/**
* SHA1 class
*
* .
*/
class SHA1
{
/**
* SHA1
* @param string $token
* @param string $timestamp
* @param string $nonce
* @param string $encrypt
*/
public function getSHA1($token, $timestamp, $nonce, $encrypt_msg)
{
try {
... |
cr.define('options', function() {
/** @const */ var OptionsPage = options.OptionsPage;
/**
* Enumeration of possible states during pairing. The value associated with
* each state maps to a localized string in the global variable
* |loadTimeData|.
* @enum {string}
*/
var PAIRING = {
STARTUP: '<... |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: <API key>.cpp
Label Definition File: <API key>.label.xml
Template File: sources-sink-81_bad.tmpl.cpp
*/
/*
* @description
* CWE: 36 Absolute Path Traversal
* BadSource: listen_socket Read data using a listen socket (server side)
* GoodSource: Full path and file name
* ... |
<?template TSearch (q, results, appendName) ?>
<html>
<head>
<link rel="stylesheet" href="${Conf.static}/css/sing-browse.css" type="text/css" />
</head>
<body>
<table id="btable">
<thead>
<tr id="browseheader">
<td>
<div id="browseheadertop">
<div id="searchbox"><form method="post" action="/search/"><input type="text"... |
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http:
<html xmlns="http:
<head>
<title>Docs for page AntiFloodPlugin.php</title>
<link rel="stylesheet" href="../../media/stylesheet.css" />
<script src="../../media/lib/classTree.js"></script>... |
import pytest
import pandas.util.testing as tm
@pytest.fixture
def datetime_series():
"""
Fixture for Series of floats with DatetimeIndex
"""
s = tm.makeTimeSeries()
s.name = "ts"
return s
@pytest.fixture
def string_series():
"""
Fixture for Series of floats with Index of unique strings
... |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: <API key>.c
Label Definition File: <API key>.label.xml
Template File: sources-sink-08.tmpl.c
*/
/*
* @description
* CWE: 90 LDAP Injection
* BadSource: listen_socket Read data using a listen socket (server side)
* GoodSource: Use a fixed string
* Sink:
* BadSink : ... |
describe('Navigation links', () => {
it('should render the expected forum and news links.', () => {
cy.visit('/learn');
cy.get('.toggle-button-nav').should('be.visible');
cy.get('.toggle-button-nav').click();
cy.get('.nav-list')
.contains('Forum')
.should('have.attr', 'href', 'https://foru... |
/**
* @file maple_mini.cpp
* @author Marti Bolivar <mbolivar@leaflabs.com>
* @brief Maple Mini board file.
*/
#ifdef BOARD_maple_mini
#include "maple_mini.h"
#include "gpio.h"
#include "timer.h"
#include "wirish_debug.h"
#include "wirish_types.h"
/* Since we want the Serial Wire/JTAG pins as GPIOs, disable both ... |
using OrchardCore.ContentFields.Fields;
using OrchardCore.ContentManagement;
using OrchardCore.ContentManagement.Metadata.Models;
namespace OrchardCore.ContentFields.ViewModels
{
public class <API key>
{
public TextField Field { get; set; }
public ContentPart Part { get; set; }
public <A... |
// Tideland Go Library - Loop - Errors
package loop
// IMPORTS
import (
"github.com/tideland/golib/errors"
)
// CONSTANTS
// Error codes of the loop package.
const (
ErrLoopPanicked = iota + 1
ErrHandlingFailed
<API key>
ErrKilledBySentinel
)
var errorMessages = errors.Messages{
ErrLoopPanicked:... |
// modification, are permitted provided that the following conditions
// are met:
// and/or other materials provided with the distribution.
// * Neither the name of Jaroslaw Kowalski nor the names of its
// contributors may be used to endorse or promote products derived from this
// AND ANY EXPRESS OR IMPLIED WARRA... |
;(function($n2){
"use strict";
// If OpenLayers is not included, do not process further
if( typeof OpenLayers === 'undefined' ) return;
/**
* Class: OpenLayers.Format.Couch
* A parser to read/write CouchDb documents. Create a new instance with the
* <OpenLayers.Format.Couch> constructor.
*
* Inherits from:
*... |
#!/usr/bin/python3
import struct
import sys
if len(sys.argv) == 1:
print("python karel_mdo_convert.py mundo.mdo")
sys.exit(1)
f = open(sys.argv[1], "rb")
data = f.read()
f.close()
worldname = sys.argv[1]
if '/' in worldname:
worldname = worldname[worldname.rfind('/')+1:]
if '.' in worldname:
worldname =... |
<?php
/**
* CChainedLogFilter allows you to attach multiple log filters to a log route (See {@link CLogRoute::$filter} for details).
*
* @author Carsten Brandt <mail@cebe.cc>
* @package system.logging
* @since 1.1.13
*/
class CChainedLogFilter extends CComponent implements ILogFilter {
/**
*
* @var ... |
/*
* This file is auto-generated. DO NOT MODIFY.
* Original file: C:\\Users\\misoch\\<API key>\\CardboardKeyboard\\openCVLibrary310\\src\\main\\aidl\\org\\opencv\\engine\\<API key>.aidl
*/
package org.opencv.engine;
/**
* Class provides a Java interface for OpenCV Engine Service. It's synchronous with native OpenCV... |
#ifndef <API key>
#define <API key>
#include <stddef.h>
#include <limits>
#include <type_traits>
#include "base/numerics/clamped_math_impl.h"
namespace base {
namespace internal {
template <typename T>
class ClampedNumeric {
static_assert(std::is_arithmetic<T>::value,
"ClampedNumeric<T>: T must be a n... |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: <API key>.c
Label Definition File: <API key>.label.xml
Template File: point-flaw-05.tmpl.c
*/
/*
* @description
* CWE: 253 Incorrect Check of Return Value
* Sinks: sscanf
* GoodSink: Correctly check if sscanf() failed
* BadSink : Incorrectly check if sscanf() fai... |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: <API key>.c
Label Definition File: <API key>.label.xml
Template File: source-sinks-63a.tmpl.c
*/
/*
* @description
* CWE: 404 Improper Resource Shutdown or Release
* BadSource: fopen Open a file using fopen()
* Sinks: w32CloseHandle
* GoodSink: Close the file using ... |
#include "gm/gm.h"
#include "include/core/SkBitmap.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkColor.h"
#include "include/core/SkImageInfo.h"
#include "include/core/SkMatrix.h"
#include "include/core/SkPaint.h"
#include "include/core/SkRect.h"
#include "include/core/SkShader.h"
#include "include/core... |
from __future__ import absolute_import, unicode_literals
import warnings
from django.core.exceptions import <API key>
from django.template.loader import render_to_string
from django.utils.safestring import mark_safe
from wagtail.utils.deprecation import <API key>
from wagtail.wagtailadmin.edit_handlers import BaseChoos... |
#ifndef __PFMLIB_H__
#define __PFMLIB_H__
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/types.h>
#include <unistd.h>
#include <inttypes.h>
#include <stdio.h>
#define LIBPFM_VERSION (4 << 16 | 0)
#define PFM_MAJ_VERSION(v) ((v)>>16)
#define PFM_MIN_VERSION(v) ((v) & 0xffff)
/*
* ABI revision level
... |
#ifndef SkSVGValue_DEFINED
#define SkSVGValue_DEFINED
#include "experimental/svg/model/SkSVGTypes.h"
#include "include/core/SkColor.h"
#include "include/core/SkMatrix.h"
#include "include/core/SkPath.h"
#include "include/core/SkTypes.h"
#include "include/private/SkNoncopyable.h"
class SkSVGValue : public SkNoncopyable ... |
/* TEMPLATE GENERATED TESTCASE FILE
Filename: <API key>.cpp
Label Definition File: <API key>.label.xml
Template File: sources-sink-84a.tmpl.cpp
*/
/*
* @description
* CWE: 195 Signed to Unsigned Conversion Error
* BadSource: rand Set data to result of rand(), which may be zero
* GoodSource: Positive integer
* Sink... |
#ifndef LayoutSize_h
#define LayoutSize_h
#include "platform/LayoutUnit.h"
#include "platform/geometry/FloatSize.h"
#include "platform/geometry/IntSize.h"
namespace blink {
class LayoutPoint;
enum AspectRatioFit {
<API key>,
AspectRatioFitGrow
};
class LayoutSize {
public:
LayoutSize() { }
LayoutSize(co... |
#include "components/policy/core/common/cloud/<API key>.h"
#include <memory>
#include <string>
#include "base/callback.h"
#include "base/json/json_reader.h"
#include "base/json/json_writer.h"
#include "base/path_service.h"
#include "base/strings/string_util.h"
#include "base/values.h"
#include "components/policy/core/c... |
// SteppedScatterPlot.h
// Plot Gallery-Mac
#import "PlotItem.h"
@interface SteppedScatterPlot : PlotItem<<API key>,
CPTPlotDataSource,
<API key>>
{
NSArray *plotData;
}
@end |
<?php
class Pimcore_Helper_Mail
{
/**
* Returns the debug information that is appended to the debug emails
*
* @static
* @param $type 'html' or 'text'
* @param Pimcore_Mail $mail
* @return string
* @throws Exception
*/
public static function getDebugInformation($type, Pim... |
namespace NGM.Forum.Models {
public static class VotingConstants {
public const string ViewConstant = "ContentViews";
public const string RatingConstant = "VoteUpDown";
}
} |
#import <DatabaseKit/DBQuery.h>
#import <DatabaseKit/DBModel.h>
@class DBAs, DBJoin;
extern NSString *const DBInnerJoin;
extern NSString *const DBLeftJoin;
extern NSString *const DBUnion;
extern NSString *const DBUnionAll;
@interface DBSelectQuery : DBReadQuery <DBTableQuery, DBFilterableQuery, NSFastEnumeration>
@prop... |
// coding: utf-8
#ifndef XPCC_PT__THREAD_HPP
#define XPCC_PT__THREAD_HPP
#include <stdint.h>
#include "macros.hpp"
namespace xpcc
{
namespace pt
{
/**
* \brief A very lightweight, stackless thread
*
* Because protothreads do not save the stack context across a blocking
... |
#!/usr/bin/env python
from HTMLParser import HTMLParser, HTMLParseError
import optparse
from urllib2 import urlopen, URLError
from searchengine.logger import Logging
class TagSelector(HTMLParser):
"""
Strip all HTML tags from a string.
"""
def __init__(self, *args, **kwargs):
self.reset()
... |
# Install script for directory: C:/Users/dkvandyke/Source/Repos/<API key>/<API key>/SuiteSparse/AMD
# Set the install prefix
if(NOT DEFINED <API key>)
set(<API key> "C:/Users/dkvandyke/Source/Repos/<API key>/<API key>/build_cuda55_vs2013/install")
endif()
string(REGEX REPLACE "/$" "" <API key> "${<API key>}")
# Set t... |
(function ($) {
// When called on a container with a selector, fetches the href with
// ajax into the container or with the data-pjax attribute on the link
// itself.
// Tries to make sure the back button and ctrl+click work the way
// you'd expect.
// Exported as $.fn.pjax
// Accepts a jQuery ajax options object that ... |
@font-face {
font-family: 'FontAwesome';
src: url('../icons/<API key>.eot');
src: url('../icons/<API key>.eot') format('embedded-opentype'),
url('../icons/<API key>.woff') format('woff'),
url('../icons/<API key>.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
[class^="icon-"],
[cl... |
# bootstrap.py
from machine import State
from pydgin.utils import r_uint
#from pydgin.storage import Memory
EMULATE_GEM5 = False
EMULATE_SIMIT = True
# Currently these constants are set to match gem5
memory_size = 2**27
page_size = 8192
if EMULATE_SIMIT:
memory_size = 0xc0000000 + 1
MAX_ENVIRON = 1024 *... |
#include "range.h"
#include <ctype.h>
#include <errno.h>
#include <kdbassert.h>
#include <kdberrors.h>
#include <kdbhelper.h>
#include <limits.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
typedef enum
{
INT,
UINT,
FLOAT,
CHAR,
HEX,
NA,
} Ra... |
package gov.nih.nci.cadsr.persist.concept;
/**
* @author hveerla
*
*/
public class ConVO {
String conIDSEQ;
String concept_value;
public ConVO(){
}
/**
* @return the conIDSEQ
*/
public String getConIDSEQ() {
return conIDSEQ;
}
/**
* @param conIDSEQ the conIDSEQ ... |
#include "SbetCommon.hpp"
namespace pdal
{
Dimension::IdList fileDimensions()
{
Dimension::IdList ids;
// Data for each point is in the source file in the order these dimensions
// are listed, I would suppose. Would be really nice to have a reference
// to the file spec. I searched the Internet and fo... |
#include "ximajbg.h"
#if CXIMAGE_SUPPORT_JBG
#include "ximaiter.h"
#define JBIG_BUFSIZE 8192
#if <API key>
bool CxImageJBG::Decode(CxFile *hFile)
{
if (hFile == NULL) return false;
struct jbg_dec_state jbig_state;
uint32_t xmax = 4294967295UL, ymax = 4294967295UL;
uint32_t len, cnt;
uint8_t *buffer=... |
# Name: modulo1
# Purpose:
# Created: 14/02/2012
# Licence: <your licence>
#!/usr/bin/env python
def main():
pass
if __name__ == '__main__':
main()
import os
import math
import <API key> as chrono
import <API key> as chronoirr
# Create the simulation system.
# (Do not create parts and constrain... |
@ECHO OFF
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set BUILDDIR=_build
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
set I18NSPHINXOPTS=%SPHINXOPTS% .
if NOT "%PAPER%" == "" (
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
s... |
<?php
namespace SilverStripe\AssetAdmin\GraphQL;
use GraphQL\Type\Definition\Type;
use GraphQL\Type\Definition\ResolveInfo;
use SilverStripe\Assets\File;
use SilverStripe\Assets\Folder;
use SilverStripe\GraphQL\MutationCreator;
use SilverStripe\GraphQL\OperationResolver;
use SilverStripe\Versioned\Versioned;
use Silver... |
#ifndef <API key>
#define <API key>
#include "base/basictypes.h"
#include "base/callback.h"
#include "base/file_path.h"
#include "base/gtest_prod_util.h"
#include "base/location.h"
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "chrome/browser/cancelable_request.h"
#include "chrome/brow... |
<!DOCTYPE HTML PUBLIC "-
<!--NewPage
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_24) on Tue May 01 09:56:12 CEST 2012 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
Uses of Interface net.sourceforge.pmd.lang.TokenManager (PMD 5.0.0 API)
</TITLE>
<META NAME="date" CONTENT="2012-... |
var tape = require('tape'),
context = require('d3-path').path,
vega = require('../'),
Bounds = vega.Bounds,
pathParse = vega.pathParse,
pathRender = vega.pathRender;
function bound(path, bounds) {
pathRender(vega.boundContext(bounds), path, 0, 0);
return bounds;
}
const paths = [
'M 10,10 m 10... |
package node
import (
"bytes"
"strings"
"github.com/freeconf/yang/meta"
"github.com/freeconf/yang/val"
)
type Path struct {
meta meta.Definition
key []val.Value
parent *Path
}
func NewRootPath(m meta.Definition) *Path {
return &Path{meta: m}
}
func NewListItemPath(parent *Path, m *m... |
<?php
namespace app\components;
use Yii;
use app\models\Auth;
use app\models\User;
use yii\authclient\ClientInterface;
use yii\helpers\ArrayHelper;
/**
* AuthHandler handles successful authentication via Yii auth component
*/
class AuthHandler
{
/**
* @var ClientInterface
*/
private $client;
/*... |
#ifndef <API key>
#define <API key>
#include "base/basictypes.h"
#include "ppapi/c/pp_instance.h"
namespace content {
// This interface provides functions for querying instance state for resource
// host implementations. It allows us to mock out some of these interactions
// for testing, as well as limit the dependenci... |
<?php defined('SYSPATH') or die('No direct script access.');
class Kohana_HTML {
/**
* @var array preferred order of attributes
*/
public static $attribute_order = array
(
'action',
'method',
'type',
'id',
'name',
'value',
'href',
'... |
<?php
/**
* Adminhtml paypal settlement reports grid block
*
* @category Mage
* @package Mage_Paypal
* @author Magento Core Team <core@magentocommerce.com>
*/
class <API key> extends <API key>
{
/**
* Prepare grid container, add additional buttons
*/
public function __construct()
... |
#include <linux/err.h>
#include <linux/fs.h>
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/rtc.h>
#include <linux/spinlock.h>
#include <linux/types.h>
#include <linux/log2.h>
#include <asm/div64.h>
#include <as... |
class <API key> < ActiveRecord::Migration[5.1]
def up
execute "ALTER TABLE batch_uploads ALTER COLUMN created_at SET DEFAULT CURRENT_TIMESTAMP"
end
def down
execute "ALTER TABLE batch_uploads ALTER COLUMN created_at SET DEFAULT CURRENT_TIMESTAMP '2010-08-31 04:17:31.209032'"
end
end |
import pyqtgraph as pg
from pyqtgraph.Qt import QtGui, QtCore
from pyqtgraph.parametertree import Parameter, ParameterTree
from pyqtgraph.parametertree import types as pTypes
import pyqtgraph.configfile
import numpy as np
import user
import collections
import sys, os
class RelativityGUI(QtGui.QWidget):
def __init__... |
// by DotNetNuke Corporation
// documentation files (the "Software"), to deal in the Software without restriction, including without limitation
// to permit persons to whom the Software is furnished to do so, subject to the following conditions:
// of the Software.
// TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A... |
<link href="/App_Plugins/Merchello/Common/Css/merchello.css" rel="stylesheet">
<div data-ng-controller="Merchello.Plugins.Reports.ExportOrders">
<umb-panel>
<umb-header>
<div class="span4">
<div class="<API key>">
<h1 class="umb-headline">Reports - Export Orde... |
CFLAGS += -g -O0 -I../ttbin
LDFLAGS += -L../ttbin -lttbin -lcurl -lc -lgcc -lm
SRC = ttbincnv.c \
OUTPUT = ttbincnv
$(OUTPUT): $(SRC:.c=.o) ../ttbin/libttbin.a
@echo Linking $(OUTPUT)...
@$(CC) -o $(OUTPUT) $(SRC:.c=.o) $(LDFLAGS)
%.o: %.c
@echo Compiling $@...
@$(CC) -c $(CFLAGS) $< -o $*.o
@$(CC) ... |
#include "opae_osdep.h"
#include "opae_spi.h"
static int <API key>(struct altera_spi_device *dev, u32 reg,
u32 *val)
{
u64 ctrl = 0;
u64 stat = 0;
int loops = SPI_MAX_RETRY;
ctrl = NIOS_SPI_RD | ((u64)reg << 32);
opae_writeq(ctrl, dev->regs + NIOS_SPI_CTRL);
stat = opae_readq(dev->regs +... |
<!DOCTYPE HTML PUBLIC "-
<!--NewPage
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_35) on Tue Oct 16 22:49:44 ICT 2012 -->
<TITLE>
<API key>.<API key> (Apache FOP 1.1 API)
</TITLE>
<META NAME="date" CONTENT="2012-10-16">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
<SC... |
require "spec_helper"
describe Minidoc do
class ValidationsUser < User
validates :name, presence: true
end
describe "#model_name" do
it "returns the name of the class" do
expect(User.model_name.to_s).to eq "User"
end
end
describe "#to_model" do
it "returns itself" do
user = User.ne... |
/*CSS style sheet*/
@font-face {
font-family: 'Quicksand';
font-style: normal;
font-weight: 400;
src: local('Quicksand Regular'), local('Quicksand-Regular'), url(https://fonts.gstatic.com/s/quicksand/v6/<API key>.woff2) format('woff2');
unicode-range: U+0102-0103, U+1EA0-1EF9, U+20AB;
}
@font-face {
font-fa... |
import React from 'react'
import { shallow } from 'enzyme'
import TableCell from '.'
const wrap = (props = {}) => shallow(<TableCell {...props} />).dive()
it('renders children when passed in', () => {
const wrapper = wrap({ children: 'test' })
expect(wrapper.contains('test')).toBe(true)
})
it('renders props when pa... |
# example.js
This example illustrates how to specify chunk name in `require.ensure()` and `import()` to separated modules into separate chunks manually.
javascript
{{example.js}}
# templates/
* foo.js
* baz.js
* bar.js
All templates are of this pattern:
javascript
{{templates/foo.js}}
# js/output.js
javascript
{{js/out... |
# -*- coding: utf-8 -*-
from uamobile.base import UserAgent, Display
class EZwebUserAgent(UserAgent):
carrier = 'EZweb'
short_carrier = 'E'
def supports_cookie(self):
return True
def make_display(self):
"""
create a Display object.
"""
env = self.environ
t... |
{% extends "analisis/baseanalisis.html" %}
{%load staticfiles%}
{% load i18n %}
{% block extra_js%}
<script>
$( ".menu5" ).addClass( "active" );
$( ".menu5-3 a" ).append( " <i class='fa fa-check fa-lg'></i>" );
</script>
{% endblock extra_js%}
{% block contenido %}
{% include "analisis/filtros.html" %}
<h3>Organizacion... |
jQuery(function(t){t.datepicker.regional["en-GB"]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct",... |
<link href="<?php echo base_url('themes/' . $this->settings['theme'] . '/css/redactor.css'); ?>" rel="stylesheet">
<link href="<?php echo base_url('themes/' . $this->settings['theme'] . '/css/tags.css'); ?>" rel="stylesheet">
<?php
if(!$this->input->is_ajax_request()) echo '<br /><br />';
foreach ($post... |
import { expect } from 'chai';
import { renderComponent } from 'helpers/TestHelper';
import { About } from './index';
describe('<About />', () => {
const component = renderComponent(About);
it('Renders with correct style', () => {
const style = require('./style.css');
expect(component.find(style.About)).to.... |
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->
<!--[if !IE]><!--> <html lang="en"> <!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<meta charset="UTF-8" />
<title>BCORE Admin Dashboard Template | Timeline Page</title>
<meta con... |
package com.groupon.jenkins.dotci.notifiers;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.groupon.jenkins.dynamic.build.DynamicBuild;
import com.groupon.jenkins.notifications.PostBuildNotifier;
import hudson.Extension;
import hudson.model.BuildListener;
import org.apache.commons.httpclient.HttpClient;... |
# Facades
- [Introduction](#introduction)
- [Explanation](#explanation)
- [Practical Usage](#practical-usage)
- [Creating Facades](#creating-facades)
- [Mocking Facades](#mocking-facades)
- [Facade Class Reference](#<API key>)
<a name="introduction"></a>
## Introduction
Facades provide a "static" interface to classes t... |
<?php
namespace SocialiteProviders\Manager\Stubs;
use Laravel\Socialite\Two\AbstractProvider;
class OAuth2ProviderStub extends AbstractProvider
{
protected $test = 'test';
/**
* {@inheritdoc}
*/
protected function getAuthUrl($state)
{
return 'test';
}
/**
* {@inheritdoc}
... |
package org.spongepowered.api.data.manipulator.block;
import org.spongepowered.api.block.tileentity.Comparator;
import org.spongepowered.api.block.tileentity.DaylightDetector;
import org.spongepowered.api.block.tileentity.TileEntity;
import org.spongepowered.api.data.manipulator.IntData;
/**
* Represents a {@link Tile... |
/* body_sw.cpp */
/* This file is part of: */
/* GODOT ENGINE */
/* a copy of this software and associated documentation files (the */
/* "Software"), ... |
package cloudca
import (
"encoding/json"
"github.com/cloud-ca/go-cloudca/api"
"github.com/cloud-ca/go-cloudca/services"
)
type Service struct {
Name string `json:"name,omitempty"`
Capabilities map[string]interface{} `json:"capabilities,omitempty"`
}
type Network struct {
... |
> Resolve the path to the user's global .gitconfig.
## Install with [npm](npmjs.org)
bash
npm i git-config-path --save
## Usage
js
var gitConfigPath = require('git-config-path');
//=> '/Users/jonschlinkert/.gitconfig'
## Related projects
* [parse-git-config](https://github.com/jonschlinkert/parse-git-config): Parse `.g... |
var JobsList = React.createClass({displayName: "JobsList",
getInitialState: function() {
return {
data: JobStore.getState(),
}
}
, componentDidMount: function() {
amplify.subscribe( 'JobStore.change', this._handleChange )
}
, componentDidUnmound: function() {
... |
#!/bin/bash
# install system dependencies:
# - aspcud for opam (on OS X; installed via apt on Linux)
# - awscli (to talk to AWS)
# - modern node (for yarn and npm)
# - yarn
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
case "$TRAVIS_OS_NAME" in
osx)
printf "travis_fold:start:brew_install\nInstalling bre... |
var _reactJsxDevRuntime = require("react/jsx-dev-runtime");
var _jsxFileName = "<CWD>\\packages\\<API key>\\test\\fixtures\\windows\\<API key>\\input.js";
var x = /*#__PURE__*/_reactJsxDevRuntime.jsxDEV(React.Fragment, {}, 'foo', false, {
fileName: _jsxFileName,
lineNumber: 1,
columnNumber: 9
}, this); |
import unittest
from circular_buffer import (
CircularBuffer,
BufferFullException,
<API key>
)
class CircularBufferTest(unittest.TestCase):
def <API key>(self):
buf = CircularBuffer(1)
with self.assertRaises(<API key>):
buf.read()
def <API key>(self):
buf = Circul... |
package mn
import (
"encoding/json"
"errors"
"fmt"
"log"
)
type Switch struct {
Name string
Ports Links
Controller string
}
func (this Switch) String() string {
out, err := json.MarshalIndent(this, "", " ")
if err != nil {
panic(err)
}
return string(ou... |
#include "dcmtk/config/osconfig.h"
#include "dcmtk/dcmjpeg/djdecext.h"
#include "dcmtk/dcmjpeg/djcparam.h"
#include "dcmtk/dcmjpeg/djrploss.h"
#include "dcmtk/dcmjpeg/djdijg8.h"
#include "dcmtk/dcmjpeg/djdijg12.h"
DJDecoderExtended::DJDecoderExtended()
: DJCodecDecoder()
{
}
DJDecoderExtended::~DJDecoderExtended()
{
}
... |
var streams = require('./main')
, assert = require('assert')
, stream = require('stream')
;
var source = new stream.Stream()
, dest = new stream.Stream()
, buffered = new streams.BufferedStream()
;
source.readable = true
dest.writable = true
source.pause = function () {
throw new Error("Pause should not b... |
#include <sys/queue.h>
#include <stdio.h>
#include <errno.h>
#include <stdint.h>
#include <string.h>
#include <unistd.h>
#include <stdarg.h>
#include <inttypes.h>
#include <rte_byteorder.h>
#include <rte_common.h>
#include <rte_pci.h>
#include <rte_atomic.h>
#include <rte_eal.h>
#include <rte_ether.h>
#include <ethdev_... |
<?php namespace Anomaly\TagsFieldType\Validation;
use Anomaly\Streams\Platform\Ui\Form\FormBuilder;
class FilterValidator
{
/**
* Handle the validation.
*
* @param FormBuilder $builder
* @param $attribute
* @param $value
* @return bool
*/
public func... |
module Shoulda
module Matchers
module ActionController
# @private
class RouteParams
PARAMS_TO_SYMBOLIZE = %i{ format }
def initialize(args)
@args = args
end
def normalize
if <API key>?
<API key>
else
stringify_params... |
require 'spec_helper'
describe Gatherer::Expansion do
it "can be created with a title" do
expansion = Gatherer::Expansion.new(title: "Phelddagrif")
expansion.title.should == "Phelddagrif"
end
it "can be created with an abbreviation" do
expansion = Gatherer::Expansion.new(abbreviation: "DRP")
expan... |
if (Object.const_defined?("Formtastic") && Gem.loaded_specs["formtastic"].version.version[0,1].to_i > 1)
class RichInput < ::Formtastic::Inputs::TextInput
def to_html
scope_type = object_name
scope_id = object.id
editor_options = Rich.options(options[:config], scope_type, scope_id)
input_w... |
# Be sure to restart your server when you modify this file.
# Your secret key is used for verifying the integrity of signed cookies.
# If you change this key, all old signed cookies will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionar... |
# -*- coding: utf-8 -*-
from __future__ import print_function
# Form implementation generated from reading ui file './acq4/devices/MockClamp/devTemplate.ui'
# Created: Thu May 29 10:20:36 2014
# by: PyQt4 UI code generator 4.9.4
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.