answer
stringlengths 15
1.25M
|
|---|
{% extends '__base__.html' %}
{% block title %}{% endblock %}
{% block beforehead %}
<script>
var
action = '{{ action }}';
function initVM(account) {
var vm = new Vue({
el: '
data: account,
methods: {
submit: function (event) {
this.$data.date = $('#date').val();
event.preventDefault();
var $form = $('#vm').find('form');
$form.postJSON(action, this.$data, function (err, r) {
if (err) {
$form.showFormError(err);
}
else {
return location.assign('/account/' + r.id);
}
});
}
}
});
$('#vm').show();
}
$(function () {
$('#loading').hide();
initVM({
name: '',
buy_strategy: '',
sell_strategy: '',
commission_rate: 0.0002,
initial_funding: 0,
<API key>: 0,
<API key>: 0,
date: getTodayString()
});
});
</script>
{% endblock %}
{% block content %}
<div id="error" class="uk-width-1-1">
</div>
<div id="loading" class="uk-width-1-1 uk-text-center">
<span><i class="uk-icon-spinner uk-icon-medium uk-icon-spin"></i> ...</span>
</div>
<div id="vm" class="uk-width-1-1">
<form v-on="submit: submit" class="uk-form uk-form-stacked">
<div class="uk-alert uk-alert-danger uk-hidden"></div>
<div class="uk-form-row">
<label class="uk-form-label">:</label>
<div class="uk-form-controls">
<input v-model="name" name="name" type="text" placeholder="" class="uk-width-1-1">
</div>
</div>
<div class="uk-form-row">
<label class="uk-form-label">:</label>
<div class="uk-form-controls">
<input v-model="buy_strategy" name="buy_strategy" type="text" placeholder="" class="uk-width-1-1">
</div>
</div>
<div class="uk-form-row">
<label class="uk-form-label">:</label>
<div class="uk-form-controls">
<input v-model="sell_strategy" name="sell_strategy" type="text" placeholder="" class="uk-width-1-1">
</div>
</div>
<div class="uk-form-row">
<label class="uk-form-label">:</label>
<div class="uk-form-controls">
<input v-model="commission_rate" name="commission_rate" type="text" placeholder="" class="uk-width-1-1">
</div>
</div>
<div class="uk-form-row">
<label class="uk-form-label">:</label>
<div class="uk-form-controls">
<input v-model="initial_funding" name="initial_funding" type="text" placeholder="" class="uk-width-1-1">
</div>
</div>
<div class="uk-form-row">
<label class="uk-form-label">:</label>
<div class="uk-form-controls">
<input v-model="<API key>" name="<API key>" type="text" placeholder="" class="uk-width-1-1">
</div>
</div>
<div class="uk-form-row">
<label class="uk-form-label">:</label>
<div class="uk-form-controls">
<input v-model="<API key>" name="<API key>" type="text" placeholder="" class="uk-width-1-1">
</div>
</div>
<div class="uk-form-row">
<label class="uk-form-label">:</label>
<div class="uk-form-controls">
<input id="date" v-model="date" name="date" type="text" data-uk-datepicker="{format:'YYYY-MM-DD'}" class="uk-width-1-1">
</div>
</div>
<div class="uk-form-row">
<button type="submit" class="uk-button uk-button-primary"><i class="uk-icon-save"></i> </button>
<a href="/account/create" class="uk-button"><i class="uk-icon-compress"></i> </a>
<a href="/" class="uk-button"><i class="uk-icon-times"></i> </a>
</div>
</form>
</div>
{% endblock %}
|
class <API key> < ActiveRecord::Migration
def change
remove_column :users, :od_token
end
end
|
(function() {
angular.module('starter.controllers').controller('DetailController', DetailController);
DetailController.$inject = ['CarService', '$stateParams'];
function DetailController (CarService, $stateParams) {
var vm = this;
CarService.getCar($stateParams.id).$promise.then(function(data) {
vm.car = data;
CarService.setCurrentCar(data);
}
);
}
})();
|
# Deploying Development Office 365 Sites to Microsoft Azure #
Summary
When developing any type a web application, most development is done locally using http://localhost. Some projects use local resources or a mix of local and remote resources. Taking these projects from local development environments involves a handful of tasks to perform like changing database connection strings, URLs, configurations, etc.
Web projects that leverage the Office 365 APIs are no different. These projects leverage Microsoft's Azure AD service to authenticate the applications and obtain OAuth 2.0 access tokens. These tokens are used by the web applications to authenticate with the Office 365 APIs.
This page explains the steps involved in taking an Office 365 API development project and launching it to a working sample hosted entirely in Microsoft Azure using [Office 365](http:
Deploying an Office 365 API web application to Microsoft Azure from a local development environment requires three high-level steps to be performed as outlined in this page:
- [Create and Configure an Azure Website](#<API key>)
- [Configure the Azure AD Application](#<API key>)
- [Configure the ASP.NET Project](#<API key>)
- [Deploy the Office 365 API ASP.NET Web Application](#<API key>)
> This page assumes that you have a local working ASP.NET application that uses the Office 365 APIs. For reference, it will use the **[<API key>](https:
# Create and Configure an Azure Website
In this step you will create an Azure website that will be used to host the web application.
1. Navigate to the [Azure Management Portal](https://manage.windowsazure.com) and login using your Organization ID account.
1. After logging in, using the navigation sidebar, select **WEBSITES**.
1. On the **websites** page, click the **NEW** link in the footer found in the lower-left corner of the page.
1. In the wizard that appears, select **Quick Create**, enter a name for the site in the **URL** field, select a **Web Hosting Plan** and **Subscription**.

> Make sure to keep a note of the name of the website you create as it will be needed later.
1. Finally click the **Create Website** link to create the site.
Give Azure a few moments to create the site. After creating the site you can specify *app settings* through the web interface. This allows you to override any `<appSettings>` within the project's `web.config` file through the web administration interface for the website without deploying your site codebase for simple `web.config` changes.
1. Click the website that you just created within the **Azure Management Portal**.
1. CLick the **CONFIGURE** link in the top navigation.
1. Scroll down to the **App Settings** section and add three new entries:
- **ida:ClientID**
- **ida:Password**
- **ida:TenantID**
1. Copy the corresponding values from the working project's `web.config` to these settings values in your Azure website as shown in the following figure:

1. In the footer, click the **SAVE** button to save your changes.
At this point the Azure website is setup and configured to host the Office 365 API web project that you will deploy in a later step.
[back to top](#<API key>)
# Configure the Azure AD Application
In this step you will modify the Azure AD application used in the development & testing of the Office 365 application.
1. Navigate to the [Azure Management Portal](https://manage.windowsazure.com) and login using your Organization ID account.
1. After logging in, using the navigation sidebar, select **ACTIVE DIRECTORY**.
1. On the **active directory** page, select the directory that is linked to your Office 365 tenant.
1. Next, click the **APPLICATIONS** item in the top navigation.
1. Within the **Properties** section, update the **SIGN-ON URL** to point to the default URL of the Azure Website you created. Take note to use the HTTPS endpoint that is provided with all Azure websites.

1. Within the **Single Sign-On** section, update the **App ID URI** to use the domain for the Azure website (shown in the following figure).
1. Next, update the **REPLY URL** so the only URL listed is the homepage of the Azure website:

1. In the footer, click the **SAVE** button to save your changes.
At this point, the Azure AD application used by the Office 365 API web project has been configured to work with the new Azure website.
[back to top](#<API key>)
# Configure the ASP.NET Project
In this step you will configure the ASP.NET project in your application to use the new Azure Website.
For the sample application used in the example for this guidance, no extra work is actually required. However the web application does contain the settings within the `web.config` file for the Azure AD application and Azure AD tenant used during development. Some developers may choose to use different Azure AD applications or even different Azure subscriptions for their development and production instances.
In a previous step outlined in this page, when you created the Azure website you set the add-in settings for the application that are typically found in the `web.config`. To ensure the web application receives these values from the Azure website configuration, it's recommended you replace the values within the `web.config` with placeholder values instead.
1. Open the project's `web.config` file.
1. Locate the add-in settings for the **ida:ClientID**, **ida:Password** and **ida:TenantId**.
1. Replace the values of these settings with a placeholder value:
`xml
<add key="ida:TenantId" value="<API key>" />
<add key="ida:ClientID" value="<API key>" />
<add key="ida:Password" value="<API key>" />
`
1. Save you changes.
At this point the web application, Azure website & application in Azure AD are all configured correctly and ready to be deployed.
[back to top](#<API key>)
# Deploy the Office 365 API ASP.NET Web Application
In this step you will publish the Office 365 API web application to the Azure website. Once the site has been deployed you will test it to ensure everything works as desired.
> This step assumes you have he Microsoft [Azure SDK](http://azure.microsoft.com/en-us/downloads/), version 2.0 or higher, installed.
## Deploy the ASP.NET Web Application
1. Open your Office 365 API web application in Visual Studio 2013.
1. Within the Solution Explorer tool window, right-click the project and select **Publish** start the **Publish Web** wizard.
1. On the **Profile** tab, select **Microsoft Azure Website**.
At this point you will be prompted to login to your Azure subscription using your Organization ID.
1. After logging in, select the website that you created in a previous step from this page and click **OK**.

1. On the **Connection** tab, click the **Validate Connection** button to ensure the connection profile was successfully downloaded and applied.

1. Click the **Publish** button to publish the web application to the Azure website.
## Test the ASP.NET Web Application
After publishing the web application to the Azure website, Visual Studio will open a browser and navigate to the site's homepage.
By default this is the HTTP endpoint. Recall from the previous step when you configured the Azure AD application that you set it to only accept sign ons from the HTTPS endpoint. Before you use the application update the url to point to the HTTPS endpoint.
1. In the browser, update the URL to go to the HTTPS homepage for the Azure website. In the example in this page, that is https://o365api-01.azurewebsites.net.
1. Click the **Sign In** link in the header at the top-right of the page. This will redirect you to the Azure AD sign on page.
> If you get an error at this point, it's likely an issue with the three add-in settings you created for the Azure website. Go back and make sure the values are the correct values from the Azure AD tenant & application. You should see a URL that looks
1. After successfully logging in, you will be redirected back to the homepage for the web application of the Azure website you created.
At this point you have successfully deployed your Office 365 API web application project to run in an Azure website.
[back to top](#<API key>)
Related links
- [<API key>](https://github.com/OfficeDev/<API key>)
Applies to
- Office 365 Multi Tenant (MT)
- Office 365 Dedicated (D)
Author
Andrew Connell - [@andrewconnell](https://twitter.com/andrewconnell)
Version history
Version | Date | Comments
0.1 | January 2, 2015 | First draft
|
# -*- coding: utf-8 -*-
import unittest
from hanspell import spell_checker
from hanspell.constants import CheckResult
from textwrap import dedent as trim
class SpellCheckerTests(unittest.TestCase):
def setUp(self):
pass
def test_basic_check(self):
result = spell_checker.check(u' . . .')
assert result.errors == 4
assert result.checked == u'. . .'
def test_words(self):
result = spell_checker.check(u' . ?')
assert result.errors == 4
items = result.words
assert items[u''] == CheckResult.WRONG_SPACING
assert items[u''] == CheckResult.WRONG_SPACING
assert items[u''] == CheckResult.<API key>
assert items[u''] == CheckResult.WRONG_SPACING
assert items[u''] == CheckResult.WRONG_SPACING
assert items[u'.'] == CheckResult.WRONG_SPACING
assert items[u''] == CheckResult.PASSED
assert items[u'?'] == CheckResult.WRONG_SPELLING
def test_list(self):
results = spell_checker.check([u' .', u' .'])
assert results[0].checked == u'.'
assert results[1].checked == u' .'
def test_long_paragraph(self):
result = spell_checker.check(paragraph)
if __name__ == '__main__':
unittest.main()
|
<?php declare(strict_types=1);
namespace Composer\DependencyResolver;
use Composer\Filter\<API key>\<API key>;
use Composer\Filter\<API key>\<API key>;
use Composer\Filter\<API key>\<API key>;
use Composer\Package\BasePackage;
use Composer\Package\AliasPackage;
/**
* @author Nils Adermann <naderman@naderman.de>
* @phpstan-import-type ReasonData from Rule
*/
class RuleSetGenerator
{
/** @var PolicyInterface */
protected $policy;
/** @var Pool */
protected $pool;
/** @var RuleSet */
protected $rules;
/** @var array<int, BasePackage> */
protected $addedMap = array();
/** @var array<string, BasePackage[]> */
protected $<API key> = array();
public function __construct(PolicyInterface $policy, Pool $pool)
{
$this->policy = $policy;
$this->pool = $pool;
$this->rules = new RuleSet;
}
/**
* Creates a new rule for the requirements of a package
*
* This rule is of the form (-A|B|C), where B and C are the providers of
* one requirement of the package A.
*
* @param BasePackage $package The package with a requirement
* @param BasePackage[] $providers The providers of the requirement
* @param Rule::RULE_* $reason A RULE_* constant describing the reason for generating this rule
* @param mixed $reasonData Any data, e.g. the requirement name, that goes with the reason
* @return Rule|null The generated rule or null if tautological
*
* @phpstan-param ReasonData $reasonData
*/
protected function createRequireRule(BasePackage $package, array $providers, $reason, $reasonData = null): ?Rule
{
$literals = array(-$package->id);
foreach ($providers as $provider) {
// self fulfilling rule?
if ($provider === $package) {
return null;
}
$literals[] = $provider->id;
}
return new GenericRule($literals, $reason, $reasonData);
}
/**
* Creates a rule to install at least one of a set of packages
*
* The rule is (A|B|C) with A, B and C different packages. If the given
* set of packages is empty an impossible rule is generated.
*
* @param BasePackage[] $packages The set of packages to choose from
* @param Rule::RULE_* $reason A RULE_* constant describing the reason for
* generating this rule
* @param mixed $reasonData Additional data like the root require or fix request info
* @return Rule The generated rule
*
* @phpstan-param ReasonData $reasonData
*/
protected function <API key>(array $packages, $reason, $reasonData): Rule
{
$literals = array();
foreach ($packages as $package) {
$literals[] = $package->id;
}
return new GenericRule($literals, $reason, $reasonData);
}
/**
* Creates a rule for two conflicting packages
*
* The rule for conflicting packages A and B is (-A|-B). A is called the issuer
* and B the provider.
*
* @param BasePackage $issuer The package declaring the conflict
* @param BasePackage $provider The package causing the conflict
* @param Rule::RULE_* $reason A RULE_* constant describing the reason for generating this rule
* @param mixed $reasonData Any data, e.g. the package name, that goes with the reason
* @return ?Rule The generated rule
*
* @phpstan-param ReasonData $reasonData
*/
protected function createRule2Literals(BasePackage $issuer, BasePackage $provider, $reason, $reasonData = null): ?Rule
{
// ignore self conflict
if ($issuer === $provider) {
return null;
}
return new Rule2Literals(-$issuer->id, -$provider->id, $reason, $reasonData);
}
/**
* @param BasePackage[] $packages
* @param Rule::RULE_* $reason A RULE_* constant
* @param mixed $reasonData
* @return Rule
*
* @phpstan-param ReasonData $reasonData
*/
protected function <API key>(array $packages, $reason, $reasonData): Rule
{
$literals = array();
foreach ($packages as $package) {
$literals[] = -$package->id;
}
if (\count($literals) == 2) {
return new Rule2Literals($literals[0], $literals[1], $reason, $reasonData);
}
return new MultiConflictRule($literals, $reason, $reasonData);
}
/**
* Adds a rule unless it duplicates an existing one of any type
*
* To be able to directly pass in the result of one of the rule creation
* methods null is allowed which will not insert a rule.
*
* @param RuleSet::TYPE_* $type A TYPE_* constant defining the rule type
* @param Rule $newRule The rule about to be added
*
* @return void
*/
private function addRule($type, Rule $newRule = null): void
{
if (!$newRule) {
return;
}
$this->rules->add($newRule, $type);
}
/**
* @return void
*/
protected function addRulesForPackage(BasePackage $package, <API key> $<API key>): void
{
/** @var \SplQueue<BasePackage> */
$workQueue = new \SplQueue;
$workQueue->enqueue($package);
while (!$workQueue->isEmpty()) {
$package = $workQueue->dequeue();
if (isset($this->addedMap[$package->id])) {
continue;
}
$this->addedMap[$package->id] = $package;
if (!$package instanceof AliasPackage) {
foreach ($package->getNames(false) as $name) {
$this-><API key>[$name][] = $package;
}
} else {
$workQueue->enqueue($package->getAliasOf());
$this->addRule(RuleSet::TYPE_PACKAGE, $this->createRequireRule($package, array($package->getAliasOf()), Rule::RULE_PACKAGE_ALIAS, $package));
// aliases must be installed with their main package, so create a rule the other way around as well
$this->addRule(RuleSet::TYPE_PACKAGE, $this->createRequireRule($package->getAliasOf(), array($package), Rule::<API key>, $package->getAliasOf()));
// if alias package has no self.version requires, its requirements do not
// need to be added as the aliased package processing will take care of it
if (!$package-><API key>()) {
continue;
}
}
foreach ($package->getRequires() as $link) {
$constraint = $link->getConstraint();
if ($<API key>->isIgnored($link->getTarget())) {
continue;
} elseif ($<API key> instanceof <API key>) {
$constraint = $<API key>->filterConstraint($link->getTarget(), $constraint);
}
$possibleRequires = $this->pool->whatProvides($link->getTarget(), $constraint);
$this->addRule(RuleSet::TYPE_PACKAGE, $this->createRequireRule($package, $possibleRequires, Rule::<API key>, $link));
foreach ($possibleRequires as $require) {
$workQueue->enqueue($require);
}
}
}
}
/**
* @return void
*/
protected function addConflictRules(<API key> $<API key>): void
{
/** @var BasePackage $package */
foreach ($this->addedMap as $package) {
foreach ($package->getConflicts() as $link) {
// even if conlict ends up being with an alias, there would be at least one actual package by this name
if (!isset($this-><API key>[$link->getTarget()])) {
continue;
}
$constraint = $link->getConstraint();
if ($<API key>->isIgnored($link->getTarget())) {
continue;
} elseif ($<API key> instanceof <API key>) {
$constraint = $<API key>->filterConstraint($link->getTarget(), $constraint);
}
$conflicts = $this->pool->whatProvides($link->getTarget(), $constraint);
foreach ($conflicts as $conflict) {
// define the conflict rule for regular packages, for alias packages it's only needed if the name
// matches the conflict exactly, otherwise the name match is by provide/replace which means the
// package which this is an alias of will conflict anyway, so no need to create additional rules
if (!$conflict instanceof AliasPackage || $conflict->getName() === $link->getTarget()) {
$this->addRule(RuleSet::TYPE_PACKAGE, $this->createRule2Literals($package, $conflict, Rule::<API key>, $link));
}
}
}
}
foreach ($this-><API key> as $name => $packages) {
if (\count($packages) > 1) {
$reason = Rule::<API key>;
$this->addRule(RuleSet::TYPE_PACKAGE, $this-><API key>($packages, $reason, $name));
}
}
}
/**
* @return void
*/
protected function addRulesForRequest(Request $request, <API key> $<API key>): void
{
foreach ($request->getFixedPackages() as $package) {
if ($package->id == -1) {
// fixed package was not added to the pool as it did not pass the stability requirements, this is fine
if ($this->pool-><API key>($package)) {
continue;
}
// otherwise, looks like a bug
throw new \LogicException("Fixed package ".$package->getPrettyString()." was not added to solver pool.");
}
$this->addRulesForPackage($package, $<API key>);
$rule = $this-><API key>(array($package), Rule::RULE_FIXED, array(
'package' => $package,
));
$this->addRule(RuleSet::TYPE_REQUEST, $rule);
}
foreach ($request->getRequires() as $packageName => $constraint) {
if ($<API key>->isIgnored($packageName)) {
continue;
} elseif ($<API key> instanceof <API key>) {
$constraint = $<API key>->filterConstraint($packageName, $constraint);
}
$packages = $this->pool->whatProvides($packageName, $constraint);
if ($packages) {
foreach ($packages as $package) {
$this->addRulesForPackage($package, $<API key>);
}
$rule = $this-><API key>($packages, Rule::RULE_ROOT_REQUIRE, array(
'packageName' => $packageName,
'constraint' => $constraint,
));
$this->addRule(RuleSet::TYPE_REQUEST, $rule);
}
}
}
/**
* @return void
*/
protected function <API key>(<API key> $<API key>): void
{
foreach ($this->pool->getPackages() as $package) {
// ensure that rules for root alias packages and aliases of packages which were loaded are also loaded
// even if the alias itself isn't required, otherwise a package could be installed without its alias which
// leads to unexpected behavior
if (!isset($this->addedMap[$package->id]) &&
$package instanceof AliasPackage &&
($package->isRootPackageAlias() || isset($this->addedMap[$package->getAliasOf()->id]))
) {
$this->addRulesForPackage($package, $<API key>);
}
}
}
/**
* @return RuleSet
*/
public function getRulesFor(Request $request, <API key> $<API key> = null): RuleSet
{
$<API key> = $<API key> ?: <API key>::ignoreNothing();
$this->addRulesForRequest($request, $<API key>);
$this-><API key>($<API key>);
$this->addConflictRules($<API key>);
// Remove references to packages
$this->addedMap = $this-><API key> = array();
$rules = $this->rules;
$this->rules = new RuleSet;
return $rules;
}
}
|
THREE.DepthPassPlugin = function () {
this.enabled = false;
this.renderTarget = null;
var _gl,
_renderer,
_lights, _webglObjects, <API key>,
_depthMaterial, _depthMaterialMorph, _depthMaterialSkin, <API key>,
_frustum = new THREE.Frustum(),
_projScreenMatrix = new THREE.Matrix4(),
_renderList = [];
this.init = function ( renderer, lights, webglObjects, <API key> ) {
_gl = renderer.context;
_renderer = renderer;
_lights = lights;
_webglObjects = webglObjects;
<API key> = <API key>;
var depthShader = THREE.ShaderLib[ "depthRGBA" ];
var depthUniforms = THREE.UniformsUtils.clone( depthShader.uniforms );
_depthMaterial = new THREE.ShaderMaterial( {
fragmentShader: depthShader.fragmentShader,
vertexShader: depthShader.vertexShader,
uniforms: depthUniforms
} );
_depthMaterialMorph = new THREE.ShaderMaterial( {
fragmentShader: depthShader.fragmentShader,
vertexShader: depthShader.vertexShader,
uniforms: depthUniforms,
morphTargets: true
} );
_depthMaterialSkin = new THREE.ShaderMaterial( {
fragmentShader: depthShader.fragmentShader,
vertexShader: depthShader.vertexShader,
uniforms: depthUniforms,
skinning: true
} );
<API key> = new THREE.ShaderMaterial( {
fragmentShader: depthShader.fragmentShader,
vertexShader: depthShader.vertexShader,
uniforms: depthUniforms,
morphTargets: true,
skinning: true
} );
_depthMaterial._shadowPass = true;
_depthMaterialMorph._shadowPass = true;
_depthMaterialSkin._shadowPass = true;
<API key>._shadowPass = true;
};
this.render = function ( scene, camera ) {
if ( ! this.enabled ) return;
this.update( scene, camera );
};
this.update = function ( scene, camera ) {
var i, il, j, jl, n,
program, buffer, material,
webglObject, object, light,
renderList,
fog = null;
// set GL state for depth map
_gl.clearColor( 1, 1, 1, 1 );
_gl.disable( _gl.BLEND );
_renderer.state.setDepthTest( true );
// update scene
if ( scene.autoUpdate === true ) scene.updateMatrixWorld();
// update camera matrices and frustum
camera.matrixWorldInverse.getInverse( camera.matrixWorld );
_projScreenMatrix.multiplyMatrices( camera.projectionMatrix, camera.matrixWorldInverse );
_frustum.setFromMatrix( _projScreenMatrix );
// render depth map
_renderer.setRenderTarget( this.renderTarget );
_renderer.clear();
// set object matrices & frustum culling
_renderList.length = 0;
projectObject(scene, scene, camera);
// render regular objects
var objectMaterial, useMorphing, useSkinning;
for ( j = 0, jl = _renderList.length; j < jl; j ++ ) {
webglObject = _renderList[ j ];
object = webglObject.object;
buffer = webglObject.buffer;
// todo: create proper depth material for particles
if ( object instanceof THREE.PointCloud && ! object.customDepthMaterial ) continue;
objectMaterial = getObjectMaterial( object );
if ( objectMaterial ) _renderer.setMaterialFaces( object.material );
useMorphing = object.geometry.morphTargets !== undefined && object.geometry.morphTargets.length > 0 && objectMaterial.morphTargets;
useSkinning = object instanceof THREE.SkinnedMesh && objectMaterial.skinning;
if ( object.customDepthMaterial ) {
material = object.customDepthMaterial;
} else if ( useSkinning ) {
material = useMorphing ? <API key> : _depthMaterialSkin;
} else if ( useMorphing ) {
material = _depthMaterialMorph;
} else {
material = _depthMaterial;
}
if ( buffer instanceof THREE.BufferGeometry ) {
_renderer.renderBufferDirect( camera, _lights, fog, material, buffer, object );
} else {
_renderer.renderBuffer( camera, _lights, fog, material, buffer, object );
}
}
// set matrices and render immediate objects
for ( j = 0, jl = <API key>.length; j < jl; j ++ ) {
webglObject = <API key>[ j ];
object = webglObject.object;
if ( object.visible ) {
object._modelViewMatrix.multiplyMatrices( camera.matrixWorldInverse, object.matrixWorld );
_renderer.<API key>( camera, _lights, fog, _depthMaterial, object );
}
}
// restore GL state
var clearColor = _renderer.getClearColor(),
clearAlpha = _renderer.getClearAlpha();
_gl.clearColor( clearColor.r, clearColor.g, clearColor.b, clearAlpha );
_gl.enable( _gl.BLEND );
};
function projectObject(scene, object,camera) {
if ( object.visible ) {
var webglObjects = _webglObjects[object.id];
if (webglObjects && (object.frustumCulled === false || _frustum.intersectsObject( object ) === true) ) {
for (var i = 0, l = webglObjects.length; i < l; i ++) {
var webglObject = webglObjects[i];
object._modelViewMatrix.multiplyMatrices( camera.matrixWorldInverse, object.matrixWorld );
_renderList.push(webglObject);
}
}
for (var i = 0, l = object.children.length; i < l; i ++) {
projectObject(scene, object.children[i], camera);
}
}
}
// For the moment just ignore objects that have multiple materials with different animation methods
// Only the first material will be taken into account for deciding which depth material to use
function getObjectMaterial( object ) {
return object.material instanceof THREE.MeshFaceMaterial
? object.material.materials[ 0 ]
: object.material;
}
};
|
import path from 'path'
let { context, file, mocha, options } = module.parent.context
let { it } = context
context.it = function (name, callback) {
if (callback) {
return it(...arguments);
} else {
callback = name
name = path.basename(file, '.js')
}
}
|
package net.docusign.sample;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Date;
import java.util.Enumeration;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.UUID;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import javax.xml.datatype.<API key>;
import javax.xml.datatype.DatatypeFactory;
import net.docusign.api_3_0.APIServiceSoap;
import net.docusign.api_3_0.ArrayOfString2;
import net.docusign.api_3_0.EnvelopePDF;
import net.docusign.api_3_0.<API key>;
import net.docusign.api_3_0.<API key>;
import net.docusign.api_3_0.RequestRecipient<API key>;
import net.docusign.api_3_0.RequestRecipient<API key>;
import net.docusign.api_3_0.<API key>;
/**
* Servlet implementation class GetStatusAndDocs
*/
public class GetStatusAndDocs extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public GetStatusAndDocs() {
super();
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
request.getSession().setAttribute(Utils.SESSION_EMBEDTOKEN, "");
HttpSession session = request.getSession();
// Make sure we're logged in
if (session.getAttribute(Utils.SESSION_LOGGEDIN) == null ||
session.getAttribute(Utils.SESSION_LOGGEDIN).equals(false)) {
response.sendRedirect(Utils.CONTROLLER_LOGIN);
}
else {
// Do we have envelope IDs in this session?
if (session.getAttribute(Utils.SESSION_ENVELOPEIDS) != null) {
APIServiceSoap api = Utils.getAPI(request);
// Grab all the envelope IDs in this session
ArrayOfString2 envIDs = new ArrayOfString2();
envIDs.getEnvelopeId().addAll((List<String>) session.getAttribute(Utils.SESSION_ENVELOPEIDS));
// Create a filter so we only retrieve these envelope statuses
<API key> filter = new <API key>();
filter.setAccountId(session.getAttribute(Utils.SESSION_ACCOUNT_ID).toString());
filter.setEnvelopeIds(envIDs);
try {
// Call requestStatusesEx on these envelopes
<API key> statuses = api.requestStatusesEx(filter);
session.setAttribute(Utils.SESSION_STATUSES,
statuses.getEnvelopeStatuses().getEnvelopeStatus());
} catch (Exception e) {
}
}
response.sendRedirect(Utils.PAGE_GETSTATUS);
}
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// Get the parameter names
Enumeration paramNames = request.getParameterNames();
// Loop through the parameter names
while (paramNames.hasMoreElements()) {
String paramName = (String)paramNames.nextElement();
if (paramName.startsWith(Utils.NAME_STARTSIGNING)) {
// We want to start this user signing
startSigning(paramName, request);
response.sendRedirect(Utils.PAGE_GETSTATUS);
} else if (paramName.startsWith(Utils.NAME_DOWNLOAD)) {
// We want to download the specified envelope
downloadEnvelope(paramName, request, response);
}
}
}
protected void downloadEnvelope(String param, HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String eid = param.split("\\+")[1];
// Request the PDF of the envelope
APIServiceSoap api = Utils.getAPI(request);
EnvelopePDF pdf = api.requestPDF(eid);
// Start download of the resulting PDF
byte[] documentBytes = pdf.getPDFBytes();
response.setHeader("Content-Disposition", "attachment;filename=Envelope.pdf");
response.setContentLength(documentBytes.length);
response.setContentType("application/pdf");
response.getOutputStream().write(documentBytes);
return;
}
protected void startSigning(String param, HttpServletRequest request) throws ServletException, IOException {
// Parse out envelope id, email, username, client user id
String[] params = param.split("\\&");
String eid = "", cid = "", uname = "", email = "";
for (int i = 0; i < params.length; i++) {
String[] pair = params[i].split("\\+");
if(pair[0].equals("SignDocEnvelope")) {
eid = pair[1];
} else if (pair[0].equals("Email")) {
email = pair[1];
} else if (pair[0].equals("UserName")) {
uname = pair[1];
} else if (pair[0].equals("CID")) {
cid = pair[1];
}
}
// Request the token
try {
getToken(request, eid, email, uname, cid);
} catch (<API key> e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
protected void getToken(HttpServletRequest request, String eid, String email, String username, String CID) throws <API key> {
String token = null;
// Create the assertion
RequestRecipient<API key> assertion = new RequestRecipient<API key>();
assertion.setAssertionID(UUID.randomUUID().toString());
// wsdl2java translates this to <API key>
GregorianCalendar gcal = new GregorianCalendar();
gcal.setTime(new Date());
assertion.set<API key>(DatatypeFactory.newInstance().<API key>(gcal));
assertion.set<API key>(RequestRecipient<API key>.PASSWORD);
assertion.setSecurityDomain("<API key>");
// Create the URLs that DocuSign will redirect the iframe to after different events
<API key> urls = new <API key>();
String urlbase = Utils.getCallbackURL(request, Utils.PAGE_POP);
urls.<API key>(urlbase + "?event=AccessCodeFailed&uname=" + username);
urls.setOnCancel(urlbase + "?event=Cancel&uname=" + username);
urls.setOnDecline(urlbase + "?event=Decline&uname=" + username);
urls.setOnException(urlbase + "?event=Exception&uname=" + username);
urls.setOnFaxPending(urlbase + "?event=FaxPending&uname=" + username);
urls.setOnIdCheckFailed(urlbase + "?event=IdCheckFailed&uname=" + username);
urls.setOnSessionTimeout(urlbase + "?event=SessionTimeout&uname=" + username);
urls.setOnTTLExpired(urlbase + "?event=TTLExpired&uname=" + username);
urls.<API key>(urlbase + "?event=ViewingComplete&uname=" + username);
urls.<API key>(urlbase + "?event=SigningComplete&uname=" + username);
// Get the API service and call <API key> for this recipient
APIServiceSoap api = Utils.getAPI(request);
token = api.<API key>(eid,
CID,
username,
email,
assertion,
urls);
// Set the iframe to the token
request.getSession().setAttribute(Utils.SESSION_EMBEDTOKEN, token);
}
}
|
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# copies or substantial portions of the Software.
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
module PPool
class <API key>
def initialize
@time_started = Time.now.to_i
end
def running?
return true
end
def num_processes
return 1
end
def process_started(pid, num_processes)
puts "> process started #{pid}; num_processes #{num_processes}"
end
def run_process
info "#{Process.pid} running"
exit 0
end
def process_ended(pid, status)
puts "> process ended - pid #{pid}, status #{status}"
end
def progress(stats)
puts "> active #{stats[:active_processes]} started #{stats[:processes_started]} ended #{stats[:processes_ended]} errors #{stats[:errors]}"
end
def delay
return 0.1
end
def info(m)
puts "+
end
def time_running
secs = time_running_secs
hours = (secs / (60 * 60)) % 24
mins = (secs / 60) % 60
secs = secs % 60
return "%.2d:%.2d:%.2d" % [hours, mins,secs]
end
def time_running_secs
Time.now.to_i - @time_started
end
end
end
|
<!DOCTYPE HTML PUBLIC "-
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_45) on Mon Aug 31 23:15:52 CEST 2015 -->
<title>Uses of Interface starkcoder.failfast.fails.objects.floats.<API key> (FailFast v.1.3)</title>
<meta name="date" content="2015-08-31">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Interface starkcoder.failfast.fails.objects.floats.<API key> (FailFast v.1.3)";
}
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="topNav"><a name="navbar_top">
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../starkcoder/failfast/fails/objects/floats/<API key>.html" title="interface in starkcoder.failfast.fails.objects.floats">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?starkcoder/failfast/fails/objects/floats/class-use/<API key>.html" target="_top">Frames</a></li>
<li><a href="<API key>.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<a name="skip-navbar_top">
</a></div>
<div class="header">
<h2 title="Uses of Interface starkcoder.failfast.fails.objects.floats.<API key>" class="title">Uses of Interface<br>starkcoder.failfast.fails.objects.floats.<API key></h2>
</div>
<div class="classUseContainer">
<ul class="blockList">
<li class="blockList">
<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation">
<caption><span>Packages that use <a href="../../../../../../starkcoder/failfast/fails/objects/floats/<API key>.html" title="interface in starkcoder.failfast.fails.objects.floats"><API key></a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Package</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="#starkcoder.failfast.fails">starkcoder.failfast.fails</a></td>
<td class="colLast"> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="#starkcoder.failfast.fails.objects">starkcoder.failfast.fails.objects</a></td>
<td class="colLast"> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="#starkcoder.failfast.fails.objects.floats">starkcoder.failfast.fails.objects.floats</a></td>
<td class="colLast"> </td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="starkcoder.failfast.fails">
</a>
<h3>Uses of <a href="../../../../../../starkcoder/failfast/fails/objects/floats/<API key>.html" title="interface in starkcoder.failfast.fails.objects.floats"><API key></a> in <a href="../../../../../../starkcoder/failfast/fails/package-summary.html">starkcoder.failfast.fails</a></h3>
<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing subinterfaces, and an explanation">
<caption><span>Subinterfaces of <a href="../../../../../../starkcoder/failfast/fails/objects/floats/<API key>.html" title="interface in starkcoder.failfast.fails.objects.floats"><API key></a> in <a href="../../../../../../starkcoder/failfast/fails/package-summary.html">starkcoder.failfast.fails</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Interface and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code>interface </code></td>
<td class="colLast"><code><strong><a href="../../../../../../starkcoder/failfast/fails/IFailer.html" title="interface in starkcoder.failfast.fails">IFailer</a></strong></code>
<div class="block">Failer specification.</div>
</td>
</tr>
</tbody>
</table>
<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation">
<caption><span>Classes in <a href="../../../../../../starkcoder/failfast/fails/package-summary.html">starkcoder.failfast.fails</a> that implement <a href="../../../../../../starkcoder/failfast/fails/objects/floats/<API key>.html" title="interface in starkcoder.failfast.fails.objects.floats"><API key></a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code>class </code></td>
<td class="colLast"><code><strong><a href="../../../../../../starkcoder/failfast/fails/AFailer.html" title="class in starkcoder.failfast.fails">AFailer</a></strong></code>
<div class="block">Abstract implementation of <a href="../../../../../../starkcoder/failfast/fails/IFailer.html" title="interface in starkcoder.failfast.fails"><code>IFailer</code></a>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>class </code></td>
<td class="colLast"><code><strong><a href="../../../../../../starkcoder/failfast/fails/Failer.html" title="class in starkcoder.failfast.fails">Failer</a></strong></code>
<div class="block">Default concrete implementation of <a href="../../../../../../starkcoder/failfast/fails/IFailer.html" title="interface in starkcoder.failfast.fails"><code>IFailer</code></a> using abstract implementation <a href="../../../../../../starkcoder/failfast/fails/AFailer.html" title="class in starkcoder.failfast.fails"><code>AFailer</code></a>.</div>
</td>
</tr>
</tbody>
</table>
</li>
<li class="blockList"><a name="starkcoder.failfast.fails.objects">
</a>
<h3>Uses of <a href="../../../../../../starkcoder/failfast/fails/objects/floats/<API key>.html" title="interface in starkcoder.failfast.fails.objects.floats"><API key></a> in <a href="../../../../../../starkcoder/failfast/fails/objects/package-summary.html">starkcoder.failfast.fails.objects</a></h3>
<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing subinterfaces, and an explanation">
<caption><span>Subinterfaces of <a href="../../../../../../starkcoder/failfast/fails/objects/floats/<API key>.html" title="interface in starkcoder.failfast.fails.objects.floats"><API key></a> in <a href="../../../../../../starkcoder/failfast/fails/objects/package-summary.html">starkcoder.failfast.fails.objects</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Interface and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code>interface </code></td>
<td class="colLast"><code><strong><a href="../../../../../../starkcoder/failfast/fails/objects/IObjectFailer.html" title="interface in starkcoder.failfast.fails.objects">IObjectFailer</a></strong></code>
<div class="block">Specification grouping all object fail specifications.</div>
</td>
</tr>
</tbody>
</table>
</li>
<li class="blockList"><a name="starkcoder.failfast.fails.objects.floats">
</a>
<h3>Uses of <a href="../../../../../../starkcoder/failfast/fails/objects/floats/<API key>.html" title="interface in starkcoder.failfast.fails.objects.floats"><API key></a> in <a href="../../../../../../starkcoder/failfast/fails/objects/floats/package-summary.html">starkcoder.failfast.fails.objects.floats</a></h3>
<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing subinterfaces, and an explanation">
<caption><span>Subinterfaces of <a href="../../../../../../starkcoder/failfast/fails/objects/floats/<API key>.html" title="interface in starkcoder.failfast.fails.objects.floats"><API key></a> in <a href="../../../../../../starkcoder/failfast/fails/objects/floats/package-summary.html">starkcoder.failfast.fails.objects.floats</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Interface and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code>interface </code></td>
<td class="colLast"><code><strong><a href="../../../../../../starkcoder/failfast/fails/objects/floats/IObjectFloatFailer.html" title="interface in starkcoder.failfast.fails.objects.floats">IObjectFloatFailer</a></strong></code>
<div class="block">Specification grouping all Float fail specifications.</div>
</td>
</tr>
</tbody>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="bottomNav"><a name="navbar_bottom">
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="<API key>">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../starkcoder/failfast/fails/objects/floats/<API key>.html" title="interface in starkcoder.failfast.fails.objects.floats">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?starkcoder/failfast/fails/objects/floats/class-use/<API key>.html" target="_top">Frames</a></li>
<li><a href="<API key>.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<a name="skip-navbar_bottom">
</a></div>
<p class="legalCopy"><small><i>The MIT License (MIT) - Copyright &
</body>
</html>
|
using System.Linq;
using EspaceClient.FrontOffice.Business.Depots;
using EspaceClient.FrontOffice.Domaine;
namespace EspaceClient.FrontOffice.Data.Depots
{
public partial class DepotTypeRenduBloc : Depot<TypeRenduBloc>, IDepotTypeRenduBloc
{
public TypeRenduBloc GetByCode(string code, string codeTypeBloc)
{
var query = from trb in DbContext.TypeRenduBlocs
where trb.Code == code
where trb.TypeBloc.Code == codeTypeBloc
select trb;
return query.FirstOrDefault();
}
}
}
|
# lnet update 2015-03-28
Now multi-httpserver supported! See 'httpserver.lua'.
# lnet update 2015-03-25
Now cosocket supported!
What is cosocket? 'cosocket' is a socket API wapper for http handlers in lnet httpserver. It provides tcp/udp block operations but actually non-block in lnet httpserver thread. Yes, the name 'cosocket' means 'coroutine socket'. We yield out of the running corouine while doing some block operation (like connect and etc.), and resume back when the socket is ready.
To use cosocket, you have to require 'lnet.cosocket' explicitly in your lua code, and it returns an object:
local Socket = require "lnet.cosocket"
- tcp = Socket:tcp(ip, port) -- create a tcp socket object
- udp = Socket:udp(ip, port) -- create a udp socket object
- ret, err = Socket:connect(ip, port)
- sndlen, err = Socket:send(data, ip, port)
- rcvlen, data, ip, port = Socket:recv(condition)
- Socket.settimeout(sec)
To learn more, see 'lnet/cosocket.lua' and 'lnet/model_http/handler/test_socket.lua'.
# lnet update 2015-03-18
Now webpage supported!
1. static web pages: custom root directory, default pages, mime types, and etc.
2. dynamic web pages: Lua code embedded in html (very similar to PHP), see 'lnet/model_http/root/index.lua' for example.
So far, the Lua APIs for webpage and handler:
- echo (output messages into html, like php)
- http.peer.ip
- http.peer.port
- http.req.headline
- http.req.protocol
- http.req.method
- http.req.uri
- http.req.uri_path
- http.req.uri_args[key] = value
- http.req.headers[header] = info
- http.req.content
- http.resp.statusline
- http.resp.protocol
- http.resp.code
- http.resp.desc
- http.resp.headers[header] = info
- http.resp.content
- http:exit(code, err)
# lnet
This new toy is for those people who believe in that Lua can do everything, including httpserver.
The name 'lnet' is short for 'Lua Net', and what I have done here are as below:
1. Lua socket API (C extension library)
2. Lua IO poll API with multi-thread support (C extension library)
3. An event-model TCP server framework (Lua code)
4. An httpserver with restful HTTP services framework (Lua code)
You can use 'lnet' to do:
1. Normal socket develop
2. Custom TCP server develop
3. Server(backend) REST API develop
How to make, configure, and use 'lnet' httpserver:
1. Make sure you have already installed 'lua' or 'luajit'.
2. Make C library 'lnet/core.dll' (if Linux, run 'make').
3. Modify 'lnet/model_http/config/default.lua' as you like. How to configue? See annotations in config file, and to learn it yourself.
4. Modify 'httpserver.lua', set server parameters.
5. Run 'httpserver.lua'.
'lnet' is designed for good at restful HTTP services developping. As 'lnet' and its restful HTTP services framework is not perfect so far, it is still under construction, so you have to read source code for more infomations.
Thank you!
|
'use strict'
const { EventEmitter } = require('events')
const { Multiaddr } = require('multiaddr')
/**
* @typedef {import('libp2p-interfaces/src/transport/types').Listener} Listener
*/
/**
* @param {import('../')} libp2p
* @returns {Listener} a transport listener
*/
module.exports = (libp2p) => {
const listeningAddrs = new Map()
/**
* Add swarm handler and listen for incoming connections
*
* @param {Multiaddr} addr
* @returns {Promise<void>}
*/
async function listen (addr) {
const addrString = String(addr).split('/p2p-circuit').find(a => a !== '')
const relayConn = await libp2p.dial(new Multiaddr(addrString))
const relayedAddr = relayConn.remoteAddr.encapsulate('/p2p-circuit')
listeningAddrs.set(relayConn.remotePeer.toB58String(), relayedAddr)
listener.emit('listening')
}
/**
* Get fixed up multiaddrs
*
* NOTE: This method will grab the peers multiaddrs and expand them such that:
*
* a) If it's an existing /p2p-circuit address for a specific relay i.e.
* `/ip4/0.0.0.0/tcp/0/ipfs/QmRelay/p2p-circuit` this method will expand the
* address to `/ip4/0.0.0.0/tcp/0/ipfs/QmRelay/p2p-circuit/ipfs/QmPeer` where
* `QmPeer` is this peers id
* b) If it's not a /p2p-circuit address, it will encapsulate the address as a /p2p-circuit
* addr, such when dialing over a relay with this address, it will create the circuit using
* the encapsulated transport address. This is useful when for example, a peer should only
* be dialed over TCP rather than any other transport
*
* @returns {Multiaddr[]}
*/
function getAddrs () {
const addrs = []
for (const addr of listeningAddrs.values()) {
addrs.push(addr)
}
return addrs
}
/** @type Listener */
const listener = Object.assign(new EventEmitter(), {
close: () => Promise.resolve(),
listen,
getAddrs
})
// Remove listeningAddrs when a peer disconnects
libp2p.connectionManager.on('peer:disconnect', (connection) => {
const deleted = listeningAddrs.delete(connection.remotePeer.toB58String())
if (deleted) {
// Announce listen addresses change
listener.emit('close')
}
})
return listener
}
|
using System.Collections.Generic;
namespace BlobTransfer
{
public class TransferResult
{
public List<string> Succeeded { get; set; } = new List<string>();
public List<string> Skipped { get; set; } = new List<string>();
public List<string> Failed { get; set; } = new List<string>();
}
}
|
<H1>CARDS LIST</h1>
<div ng-repeat="card in CardCtrl.cardlist" ng-bind="card.title"></div>
|
(function() {
$(function() {
$('.tooltip-examples a, .<API key> a').tooltip({
animation: false
});
$('.top-sign-in').on("click", function(e) {
$('.login-box').fadeIn("fast");
return false;
});
$('.login-box-close').on("click", function(e) {
$(this).closest(".login-box").fadeOut("fast");
return false;
});
prettyPrint();
$(".<API key>").animate({
bottom: $(".<API key>").data('position-bottom')
}, "fast", function() {
return $(".slider-browser-left").animate({
bottom: $(".slider-browser-left").data('position-bottom')
}, "fast", function() {
return $(".<API key>").animate({
bottom: $(".<API key>").data('position-bottom')
}, "fast");
});
});
$('.carousel').carousel({
interval: false
});
return $('a[data-toggle="testimonial"]').on("click", function(e) {
$(this).closest('.testimonials-users').find('a[data-toggle="testimonial"]').removeClass("active");
$(this).addClass("active");
$('.testimonials-speech').removeClass('active');
$('.testimonials-speech' + $(this).attr('href')).addClass('active');
return false;
});
});
$("body").on("touchstart.dropdown", ".dropdown-menu", function(e) {
return e.stopPropagation();
});
return $(document).on("click", ".dropdown-menu a", function() {
return document.location = $(this).attr("href");
});
}).call(this);
|
# Testing rufus-sixjo
# jmettraux at gmail.org
# Fri Aug 8 15:14:45 JST 2008
require 'test/unit'
require 'testmixins'
# the "test" app
module HeadApp
extend Rufus::Sixjo
get '/toto' do
"toto"
end
end
class HeadTest < Test::Unit::TestCase
include SixjoTestMixin
def setup
@app = HeadApp.new_sixjo_rack_app(nil, :environment => 'test')
end
def test_0
assert_equal 200, head('/toto').status
assert_equal '', @response.body
end
end
|
@font-face {
font-family: 'UbuntuRegular';
src: url('<API key>.eot');
src: url('<API key>.eot?iefix') format('eot'),
url('<API key>.woff') format('woff'),
url('<API key>.ttf') format('truetype'),
url('<API key>.svg#webfontHLBpjp3B') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'UbuntuItalic';
src: url('<API key>.eot');
src: url('<API key>.eot?iefix') format('eot'),
url('<API key>.woff') format('woff'),
url('<API key>.ttf') format('truetype'),
url('<API key>.svg#webfontthRLUYUD') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'UbuntuBold';
src: url('Ubuntu-Bold-webfont.eot');
src: url('Ubuntu-Bold-webfont.eot?iefix') format('eot'),
url('Ubuntu-Bold-webfont.woff') format('woff'),
url('Ubuntu-Bold-webfont.ttf') format('truetype'),
url('Ubuntu-Bold-webfont.svg#webfont1d3fIoP8') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'UbuntuBoldItalic';
src: url('<API key>.eot');
src: url('<API key>.eot?iefix') format('eot'),
url('<API key>.woff') format('woff'),
url('<API key>.ttf') format('truetype'),
url('<API key>.svg#webfontir7CsQCC') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'UbuntuLight';
src: url('<API key>.eot');
src: url('<API key>.eot?iefix') format('eot'),
url('<API key>.woff') format('woff'),
url('<API key>.ttf') format('truetype'),
url('<API key>.svg#webfontRPnMKj6g') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'UbuntuLightItalic';
src: url('<API key>.eot');
src: url('<API key>.eot?iefix') format('eot'),
url('<API key>.woff') format('woff'),
url('<API key>.ttf') format('truetype'),
url('<API key>.svg#webfontpehCzxnt') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'UbuntuMedium';
src: url('<API key>.eot');
src: url('<API key>.eot?iefix') format('eot'),
url('<API key>.woff') format('woff'),
url('<API key>.ttf') format('truetype'),
url('<API key>.svg#webfontcsgXxJIo') format('svg');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'UbuntuMediumItalic';
src: url('<API key>.eot');
src: url('<API key>.eot?iefix') format('eot'),
url('<API key>.woff') format('woff'),
url('<API key>.ttf') format('truetype'),
url('<API key>.svg#webfonteCMdxuKx') format('svg');
font-weight: normal;
font-style: normal;
}
|
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"></script>
<!-- [Dependencies[ -->
<script src="transform.js"></script>
<style type="text/css">
body {
background: #00406c;
padding: 60px 10px 20px 20px;
}
div {
padding: 10px;
margin: 10px;
background: #fff;
float: left;
}
</style>
</head>
<body>
<div id="test1">
Click to transform (rotate)
</div>
<div id="test2">
Click for transition (opacity)
</div>
<div id="test3">
Click for transform-transtion
</div>
</body>
</html>
|
using Owin;
using SimpleInjector;
using SimpleInjector.Extensions.<API key>;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Reporter.WebAPI.Infrastructure.Owin
{
public static class <API key>
{
public static void <API key>(this IAppBuilder app, Container container)
{
// Create an OWIN middleware to create an execution context scope
app.Use(async (context, next) =>
{
using (var scope = container.<API key>())
{
await next.Invoke();
}
});
}
}
}
|
# heppyplot
A package for plotting histogrammed data with special support for high energy physics applications.


## Installation
Currently we use a custom fork of the excellent [seaborn](http://stanford.edu/~mwaskom/software/seaborn/) package.
git clone https://github.com/ebothmann/heppyplot.git
cd heppyplot
git submodule update --init
cd seaborn
pip install -e .
cd ..
pip install -e .
|
# BSD Licenced. See LICENCE.rdoc for details.
# Taverna Player was developed in the BioVeL project, funded by the European
# Commission 7th Framework Programme (FP7), through grant agreement
# number 283359.
class TavernaPlayer::RunsController < <API key>
# Do not remove the next line.
include TavernaPlayer::Concerns::Controllers::RunsController
# Extend the RunsController here.
private
alias_method :old_find_run, :find_run
def update_params
params.require(:run).permit(:name, :policy_attributes => [:id, :public_permissions => []])
end
def run_params
params.require(:run).permit(
:create_time, :delayed_job, :embedded, :finish_time, :inputs_attributes,
:log, :name, :parent_id, :results, :run_id, :start_time,
:status_message_key, :user_id, :workflow_id,
:inputs_attributes => [:depth, :file, :metadata, :name, :value],
:policy_attributes => [:id, :public_permissions => []]
)
end
def find_runs
select = { :embedded => false }
select[:workflow_id] = params[:workflow_id] if params[:workflow_id]
@runs = TavernaPlayer::Run.where(select).order("created_at DESC").with_permissions(current_user, :view).page(params[:page])
end
def find_run
old_find_run
authorize(@run.can?(current_user, action_name))
end
end
|
package com.pablodomingos.classes.rps.servicos;
import java.io.IOException;
import org.apache.commons.io.IOUtils;
import org.junit.Assert;
import org.junit.Test;
import com.pablodomingos.classes.<API key>;
public class LoteRpsConsultaTest {
@Test
public void <API key>() throws IOException{
String xmlTest = IOUtils.toString(getClass().getClassLoader().getResourceAsStream("loteRPSConsulta.xml"));
LoteRpsConsulta consultaLote = new LoteRpsConsulta("<API key>", <API key>.getRpsPrestador());
String xml = consultaLote.converterParaXml();
Assert.assertEquals(xml, xmlTest);
}
}
|
var common = require('../common');
var connection = common.createConnection({port: common.fakeServerPort});
var assert = require('assert');
var server = common.createFakeServer();
var connectErr;
server.listen(common.fakeServerPort, function(err) {
if (err) throw err;
connection.connect(function(err) {
connectErr = err;
server.destroy();
});
});
server.on('connection', function(incomingConnection) {
var errno = 1130; // <API key>
incomingConnection.deny('You suck.', errno);
});
process.on('exit', function() {
assert.equal(connectErr.code, '<API key>');
assert.equal(connectErr.fatal, true);
});
|
/*!40101 SET @<API key>=@@<API key> */;
/*!40101 SET NAMES utf8mb4 */;
/*!40014 SET @<API key>=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='<API key>' */;
-- Export de la structure de la base pour chacal
CREATE DATABASE IF NOT EXISTS `chacal` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `chacal`;
-- Export de la structure de table chacal. items
CREATE TABLE IF NOT EXISTS `items` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`category` varchar(255) NOT NULL DEFAULT '""',
`desc` text NOT NULL DEFAULT '""',
`notation` time NOT NULL DEFAULT '00:00:00',
`positionlat` double DEFAULT NULL,
`postionlong` double DEFAULT NULL,
`date` datetime NOT NULL DEFAULT current_timestamp(),
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Export de la structure de table chacal. what
CREATE TABLE IF NOT EXISTS `what` (
`item_id` bigint(20) NOT NULL,
`what` varchar(255) NOT NULL,
`how` varchar(255) NOT NULL,
KEY `FK_what_items` (`item_id`),
CONSTRAINT `FK_what_items` FOREIGN KEY (`item_id`) REFERENCES `items` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@<API key> IS NULL, 1, @<API key>) */;
/*!40101 SET <API key>=@<API key> */;
|
import { Component, Input } from '@angular/core';
import * as _ from 'lodash';
@Component({
selector: '<API key>',
template: `
<div class="info-header">
<div class="info-header-buttons">
<span
class="vendor-logo-link"
[ngStyle]="getButtonStyle(<API key>(componentStatus))"
(mouseover)="hoverStatus(componentStatus)"
(mouseleave)="resetSwitchState()"
><img [src]="<API key>()" class="vendor-logo"></span>
<a
href="https:
target="_blank"
class="vendor-logo-link"
[ngStyle]="getButtonStyle('npm')"
(mouseover)="switchState.npm=true"
(mouseleave)="resetSwitchState()"
><img [src]="getVendorLogo('npm')" class="vendor-logo"></a>
<a
href="https://github.com/cloukit/{{componentName}}/tree/{{componentVersion}}"
target="_blank"
class="vendor-logo-link"
[ngStyle]="getButtonStyle('github')"
(mouseover)="switchState.github=true"
(mouseleave)="resetSwitchState()"
><img [src]="getVendorLogo('github')" class="vendor-logo"></a>
<a
href="https://unpkg.com/@cloukit/{{componentName}}@{{componentVersion}}/"
target="_blank"
class="vendor-logo-link"
[ngStyle]="getButtonStyle('unpkg')"
(mouseover)="switchState.unpkg=true"
(mouseleave)="resetSwitchState()"
><img [src]="getVendorLogo('unpkg')" class="vendor-logo"></a>
<a
href="https://cloukit.github.io/{{componentName}}/{{componentVersion}}/documentation/"
target="_blank"
class="vendor-logo-link"
[ngStyle]="getButtonStyle('compodoc')"
(mouseover)="switchState.compodoc=true"
(mouseleave)="resetSwitchState()"
><img [src]="getVendorLogo('compodoc')" class="vendor-logo"></a>
</div>
<div class="info-header-bar" [ngStyle]="getInfoHeaderStyle()">
<div class="<API key>">
<div *ngIf="isSwitchStateOn()">
{{switchState.statusExperimental ? 'API might change unexpectedly. Use at own risk. It is alive!' : ''}}
{{switchState.statusStable ? 'API should be stable.' : ''}}
{{switchState.npm ? 'Show package page on npmjs.com' : ''}}
{{switchState.github ? 'Show example project on github.com' : ''}}
{{switchState.unpkg ? 'Show dist contents on unpkg.com' : ''}}
{{switchState.compodoc ? 'Show detailed Component Documentation' : ''}}
</div>
</div>
</div>
</div>`,
styles: [
'.vendor-logo { width:120px; }',
'.info-header-bar { height:40px; width:100%; }',
'.<API key> { width:100%; padding: 10px; text-align:center; }',
'.info-header-buttons { display: flex; justify-content: space-between; }',
'.vendor-logo-link { display:flex; width: 120px; min-width:120px; max-width: 120px; padding:0; height:65px; }',
],
})
export class <API key> {
@Input()
componentName: string;
@Input()
componentVersion: string;
@Input()
componentStatus: string;
private initialSwitchState = {
npm: false,
unpkg: false,
github: false,
compodoc: false,
statusStable: false,
statusExperimental: false,
};
private colors = {
npm: {
bg: '#cb3837',
fg: '#fff',
},
unpkg: {
bg: '#000',
fg: '#fff',
},
github: {
bg: '#0366d6',
fg: '#fff',
},
compodoc: {
bg: '#2582d5',
fg: '#fff',
},
statusStable: {
bg: '#4ad57d',
fg: '#fff',
},
statusExperimental: {
bg: '#d55900',
fg: '#fff',
},
};
switchState = Object.assign({}, this.initialSwitchState);
getSwitchState(name: string) {
return this.switchState[name] ? 'on' : 'off';
}
isSwitchStateOn() {
for (let pair of _.toPairs(this.switchState)) {
if (pair[1]) {
return true;
}
}
return false;
}
getOnSwitchName() {
for (let pair of _.toPairs(this.switchState)) {
if (pair[1]) {
return pair[0];
}
}
return null;
}
getVendorLogo(name: string) {
return `/assets/images/vendor-logos/${name}-${this.getSwitchState(name)}.svg`;
}
resetSwitchState() {
this.switchState = Object.assign({}, this.initialSwitchState);
}
getButtonStyle(name: string) {
return this.switchState[name] ? {
border: `3px solid ${this.colors[name]['bg']}`,
transition: 'border-color 200ms linear'
} : {
border: `3px solid transparent`,
transition: 'border-color 200ms linear'
};
}
getInfoHeaderStyle() {
return this.isSwitchStateOn() ? {
backgroundColor: this.colors[this.getOnSwitchName()]['bg'],
color: this.colors[this.getOnSwitchName()]['fg'],
transition: 'background-color 200ms linear'
} : {
backgroundColor: 'transparent',
transition: 'background-color 200ms linear'
};
}
// STATUS
<API key>(status: string) {
if (status === 'STABLE') {
return 'statusStable';
}
if (status === 'EXPERIMENTAL') {
return 'statusExperimental';
}
return null;
}
hoverStatus(status: string) {
if (status === 'STABLE') {
this.switchState.statusStable = true;
}
if (status === 'EXPERIMENTAL') {
this.switchState.statusExperimental = true;
}
}
<API key>() {
if (this.componentStatus === 'STABLE') {
if (this.switchState.statusStable) {
return '/assets/images/status-icons/status-stable-on.svg';
}
return '/assets/images/status-icons/status-stable-off.svg';
}
if (this.componentStatus === 'EXPERIMENTAL') {
if (this.switchState.statusExperimental) {
return '/assets/images/status-icons/<API key>.svg';
}
return '/assets/images/status-icons/<API key>.svg';
}
}
}
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>elpi: Not compatible </title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / released</a></li>
<li class="active"><a href="">8.7.1+1 / elpi - 1.12.1</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
elpi
<small>
1.12.1
<span class="label label-info">Not compatible </span>
</small>
</h1>
<p> <em><script>document.write(moment("2022-02-11 17:12:35 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-02-11 17:12:35 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-threads base
base-unix base
camlp5 7.14 <API key> of OCaml
conf-findutils 1 Virtual package relying on findutils
conf-perl 2 Virtual package relying on perl
coq 8.7.1+1 Formal proof management system
num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.08.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.08.1 Official release 4.08.1
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.3 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "Enrico Tassi <enrico.tassi@inria.fr>"
authors: [ "Enrico Tassi" ]
license: "LGPL-2.1-or-later"
homepage: "https://github.com/LPCIC/coq-elpi"
bug-reports: "https://github.com/LPCIC/coq-elpi/issues"
dev-repo: "git+https://github.com/LPCIC/coq-elpi"
build: [ [ make "build" "COQBIN=%{bin}%/" "ELPIDIR=%{prefix}%/lib/elpi" "OCAMLWARN=" ]
[ make "test" "COQBIN=%{bin}%/" "ELPIDIR=%{prefix}%/lib/elpi" ] {with-test}
]
install: [ make "install" "COQBIN=%{bin}%/" "ELPIDIR=%{prefix}%/lib/elpi" ]
depends: [
"stdlib-shims"
"ocaml" {>= "4.07"}
"elpi" {>= "1.13.6" & < "1.14.0~"}
"coq" {>= "8.15" & < "8.16~" }
]
tags: [ "logpath:elpi" ]
synopsis: "Elpi extension language for Coq"
description: """
Coq-elpi provides a Coq plugin that embeds ELPI.
It also provides a way to embed Coq&
the Higher-Order Abstract Syntax approach
and a way to read terms back. In addition to that it exports to ELPI a
set of Coq's primitives, e.g. printing a message, accessing the
environment of theorems and data types, defining a new constant and so on.
For convenience it also provides a quotation and anti-quotation for Coq's
syntax in λProlog. E.g. `{{nat}}` is expanded to the type name of natural
numbers, or `{{A -> B}}` to the representation of a product by unfolding
the `->` notation. Finally it provides a way to define new vernacular commands
and
new tactics."""
url {
src: "https://github.com/LPCIC/coq-elpi/archive/v1.12.1.tar.gz"
checksum: "sha256=<SHA256-like>"
}
</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install </h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action coq-elpi.1.12.1 coq.8.7.1+1</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.7.1+1).
The following dependencies couldn't be met:
- coq-elpi -> coq >= 8.15
Your request can't be satisfied:
- No available version of coq satisfies the constraints
No solution found, exiting
</pre></dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-elpi.1.12.1</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Install </h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
</dl>
<h2>Installation size</h2>
<p>No files were installed.</p>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
Sources are on <a href="https:
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.AccessControl;
using System.Text;
using System.Threading.Tasks;
namespace DynamicSerializer.Test
{
public class IX
{
public int IP { get; set; }
}
[Serializable]
public class A
{
public A()
{
}
public A(string _name, C _c)
{
name = _name;
cref = _c;
}
public string name { get; set; }
public C cref { get; set; }
public override bool Equals(object obj)
{
return ((obj is A) && ((A) obj).name == this.name);
}
public override int GetHashCode()
{
return 1;
}
public static bool operator ==(A a, A b)
{
return a.Equals(b);
}
public static bool operator !=(A a, A b)
{
return !(a == b);
}
}
public class B : A
{
public B()
{
}
public int number { get { return Number; } set { Number = value; } }
[NonSerialized]
private int Number;
public B(string name, int num, C c)
: base(name, c)
{
number = num;
}
}
[Serializable]
public class C
{
public C()
{
}
public int adat { get; set; }
public C(int _b)
{
adat = _b;
}
}
public class CircularA
{
public List<CircularB> BArray { get; set; }
public List<CircularB> CArray { get; set; }
public CircularB BField { get; set; }
}
public class CircularB
{
public CircularA A { get; set; }
public int Id { get; set; }
public CircularB(int id)
{
Id = id;
}
}
public class NoCtor
{
public int i;
//public string s { get; set; }
public string s;
public NoCtor(int i, string s)
{
this.i = i;
this.s = s;
}
}
public class Basic
{
public int num;
}
}
|
#ifndef _HC_EXCEPTION_HPP_
#define _HC_EXCEPTION_HPP_
// Includes //
#include <exception>
#include <string>
// Code //
// To distinguish between different HCExceptions.
enum HCType {
// When the game cannot open the SDL window.
HC_WINDOW_EXCEPTION,
// When the game cannot load an asset, or it has been destroyed.
HC_ASSET_EXCEPTION
};
// A custom exception for this project.
class HCException : public std::exception {
private:
std::string msg;
HCType type;
public:
// Creating an HCException with a message and a type.
HCException(std::string, HCType);
// The message of this HCException.
const char* what() throw();
};
#endif
|
<?php
namespace Proxies\__CG__\Cabinet\PatientBundle\Entity;
/**
* THIS CLASS WAS GENERATED BY THE DOCTRINE ORM. DO NOT EDIT THIS FILE.
*/
class Patient extends \Cabinet\PatientBundle\Entity\Patient implements \Doctrine\ORM\Proxy\Proxy
{
private $_entityPersister;
private $_identifier;
public $__isInitialized__ = false;
public function __construct($entityPersister, $identifier)
{
$this->_entityPersister = $entityPersister;
$this->_identifier = $identifier;
}
/** @private */
public function __load()
{
if (!$this->__isInitialized__ && $this->_entityPersister) {
$this->__isInitialized__ = true;
if (method_exists($this, "__wakeup")) {
// call this after __isInitialized__to avoid infinite recursion
// but before loading to emulate what ClassMetadata::newInstance()
// provides.
$this->__wakeup();
}
if ($this->_entityPersister->load($this->_identifier, $this) === null) {
throw new \Doctrine\ORM\<API key>();
}
unset($this->_entityPersister, $this->_identifier);
}
}
/** @private */
public function __isInitialized()
{
return $this->__isInitialized__;
}
public function getId()
{
if ($this->__isInitialized__ === false) {
return (int) $this->_identifier["id"];
}
$this->__load();
return parent::getId();
}
public function setNom($nom)
{
$this->__load();
return parent::setNom($nom);
}
public function getNom()
{
$this->__load();
return parent::getNom();
}
public function setPrenom($prenom)
{
$this->__load();
return parent::setPrenom($prenom);
}
public function getPrenom()
{
$this->__load();
return parent::getPrenom();
}
public function setDateNaissance($dateNaissance)
{
$this->__load();
return parent::setDateNaissance($dateNaissance);
}
public function getDateNaissance()
{
$this->__load();
return parent::getDateNaissance();
}
public function setAdresse($adresse)
{
$this->__load();
return parent::setAdresse($adresse);
}
public function getAdresse()
{
$this->__load();
return parent::getAdresse();
}
public function setTel($tel)
{
$this->__load();
return parent::setTel($tel);
}
public function getTel()
{
$this->__load();
return parent::getTel();
}
public function setCin($cin)
{
$this->__load();
return parent::setCin($cin);
}
public function getCin()
{
$this->__load();
return parent::getCin();
}
public function setMedecin(\Cabinet\UserBundle\Entity\Medecin $medecin = NULL)
{
$this->__load();
return parent::setMedecin($medecin);
}
public function getMedecin()
{
$this->__load();
return parent::getMedecin();
}
public function setFiche(\Cabinet\PatientBundle\Entity\Fiche $fiche = NULL)
{
$this->__load();
return parent::setFiche($fiche);
}
public function getFiche()
{
$this->__load();
return parent::getFiche();
}
public function __toString()
{
$this->__load();
return parent::__toString();
}
public function __sleep()
{
return array('__isInitialized__', 'id', 'nom', 'prenom', 'dateNaissance', 'adresse', 'tel', 'cin', 'medecin', 'fiche');
}
public function __clone()
{
if (!$this->__isInitialized__ && $this->_entityPersister) {
$this->__isInitialized__ = true;
$class = $this->_entityPersister->getClassMetadata();
$original = $this->_entityPersister->load($this->_identifier);
if ($original === null) {
throw new \Doctrine\ORM\<API key>();
}
foreach ($class->reflFields as $field => $reflProperty) {
$reflProperty->setValue($this, $reflProperty->getValue($original));
}
unset($this->_entityPersister, $this->_identifier);
}
}
}
|
//package sgl.scene
//package ui
** SceneElement that is part of a layout
// * This is the root class providing logic for
// * how to render widgets in a hierarchical user
// * interface.
//abstract class Widget(_x: Float, _y: Float) extends SceneElement(_x, _y) {
// def minWidth: Float
// def minHeight: Float
// def preferredWidth: Float
// def preferredHeight: Float
// def maxWidth: Option[Float]
// def maxHeight: Option[Float]
|
ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
box-shadow: 0 6px 25px 0 rgba(0,0,0,.25);
}
li {
float: left;
}
li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
cursor:pointer;
}
li a:hover:not(.active) {
background-color: #464C5C;
}
.active {
background-color: #8C98B8;
}
.img-right{
float: right;
padding-left: 1000px;
}
|
export default {
cartCommodityCount: state => {
const totalCount = state.cartList.reduce((total, commodity) => {
return total + Number(commodity.count)
}, 0)
return totalCount
},
<API key>: state => {
const totalCount = state.removeCartList.reduce((total, commodity) => {
return total + Number(commodity.count)
}, 0)
return totalCount
}
}
|
<template name="odd-one-out">
<!-- Template for odd-one-out exercise -->
<section class="mainSection">
<form>
<input name=exercisesID type="hidden" value={{_id}}>
<input name=type type="hidden" value={{type}}>
{{#each options}}
<div class="checkbox">
<label>
<input name="option" type="radio" value={{this}}>
{{this}}
</label>
</div>
{{/each}}
<br>
<button type="submit" class="btn btn-default btn-primary js-verify">Submit your Answer</button>
</form>
</section>
</template>
|
require "uri"
require "net/http"
module JingdongFu
module Rest
class << self
def get(url, hashed_vars)
res = request(url, 'GET', hashed_vars)
process_result(res, url)
end
def post(url, hashed_vars)
res = request(url, 'POST', hashed_vars)
process_result(res, url)
end
def put(url, hashed_vars)
res = request(url, 'PUT', hashed_vars)
process_result(res, url)
end
def delete(url, hashed_vars)
res = request(url, 'DELETE', hashed_vars)
process_result(res, url)
end
protected
def request(url, method=nil, params = {})
if !url || url.length < 1
raise ArgumentError, 'Invalid url parameter'
end
if method && !['GET', 'POST', 'DELETE', 'PUT'].include?(method)
raise NotImplementedError, 'HTTP %s not implemented' % method
end
if method && method == 'GET'
url = build_get_uri(url, params)
end
uri = URI.parse(url)
http = Net::HTTP.new(uri.host, uri.port)
if method && method == 'GET'
req = Net::HTTP::Get.new(uri.request_uri)
elsif method && method == 'DELETE'
req = Net::HTTP::Delete.new(uri.request_uri)
elsif method && method == 'PUT'
req = Net::HTTP::Put.new(uri.request_uri)
req.set_form_data(params)
else
req = Net::HTTP::Post.new(uri.request_uri)
req.set_form_data(params)
end
http.request(req)
end
def build_get_uri(uri, params)
if params && params.length > 0
uri += '?' unless uri.include?('?')
uri += urlencode(params)
end
URI.escape(uri)
end
def urlencode(params)
params.to_a.collect! { |k, v| "#{k.to_s}=#{v.to_s}" }.join("&")
end
def process_result(res, raw_url)
if res.code =~ /\A2\d{2}\z/
res.body
elsif %w(301 302 303).include? res.code
url = res.header['Location']
if url !~ /^http/
uri = URI.parse(raw_url)
uri.path = "/#{url}".squeeze('/')
url = uri.to_s
end
raise RuntimeError, "Redirect #{url}"
elsif res.code == "304"
raise RuntimeError, "NotModified #{res}"
elsif res.code == "401"
raise RuntimeError, "Unauthorized #{res}"
elsif res.code == "404"
raise RuntimeError, "Resource not found #{res}"
else
raise RuntimeError, "Maybe request timed out #{res}. HTTP status code #{res.code}"
end
end
end
end
end
|
package source
import (
log "github.com/Sirupsen/logrus"
"github.com/howardplus/lirest/describe"
"github.com/howardplus/lirest/util"
"os"
"strconv"
"strings"
"time"
)
// Extractor returns a generic data based
// on the converter.
// An object that implements the Extractor interface needs
// to know where to get the data, which then feeds to the
// converter.
type Extractor interface {
Extract() (*ExtractOutput, error)
}
// ExtractOutput is the output of the extracted data
// with json tags
type ExtractOutput struct {
Name string `json:"name"`
Time time.Time `json:"time"`
Data interface{} `json:"data"`
}
// NewExtractor create a new extractor based on the description
func NewExtractor(s describe.DescriptionSource, rd describe.<API key>, c Converter, vars map[string]string) (Extractor, error) {
var extractor Extractor
refresh := time.Duration(0)
switch s.Refresh {
case "never":
// never say never, 10 day is long enough
refresh = 240 * time.Hour
default:
// something s/m/h
v, err := strconv.Atoi(s.Refresh[:len(s.Refresh)-1])
if err == nil {
if strings.HasSuffix(s.Refresh, "s") {
refresh = time.Duration(v) * time.Second
} else if strings.HasSuffix(s.Refresh, "m") {
refresh = time.Duration(v) * time.Minute
} else if strings.HasSuffix(s.Refresh, "h") {
refresh = time.Duration(v) * time.Hour
}
}
case "":
// Did not specify, which implies always refresh
}
switch s.Type {
case "procfs", "sysfs", "sysctl":
extractor = NewGenericExtractor(rd.Path, refresh, c, vars)
case "command":
extractor = NewCommandExtractor(rd.Command, c, vars)
}
// found an extractor, use it
if extractor != nil {
return extractor, nil
}
// return error on default
return nil, util.NewError("Internal error: unknown input type")
}
// GenericExtractor extract data from reading from a file
// use this until it's not enough
type GenericExtractor struct {
path string
conv Converter
refresh time.Duration
vars map[string]string
}
// NewGenericExtractor creates a GenericExtractor
func NewGenericExtractor(path string, refresh time.Duration, conv Converter, vars map[string]string) *GenericExtractor {
return &GenericExtractor{path: path, refresh: refresh, conv: conv, vars: vars}
}
func (e *GenericExtractor) Extract() (*ExtractOutput, error) {
log.WithFields(log.Fields{
"path": e.path,
"vars": e.vars,
}).Debug("Extract from file system")
// create path from variables
path, err := util.FillVars(e.path, e.vars)
if err != nil {
return nil, util.NewError("Failed to generate path")
}
// ask data from cache
var hash string
if e.refresh != time.Duration(0) {
hash = CacheHash("command" + path)
if data, time, err := Cache(hash); err == nil {
log.WithFields(log.Fields{
"hash": hash,
"path": e.path,
}).Debug("Serve from cache")
return &ExtractOutput{
Name: e.conv.Name(),
Time: time,
Data: data,
}, nil
}
}
// open file from path
f, err := os.Open(path)
if err != nil {
return nil, util.NewError("Failed to open system path")
}
defer f.Close()
// TODO: verify the rw format on this path
// give it to the converter
data, err := e.conv.ConvertStream(f)
if err != nil {
return nil, err
}
// send to cache
if e.refresh != time.Duration(0) {
if err := SendCache(hash, data, e.refresh); err != nil {
// cache error, non-fatal
log.WithFields(log.Fields{
"path": e.path,
}).Debug("Failed to send cache")
}
}
log.WithFields(log.Fields{
"path": e.path,
}).Debug("Convert successful")
return &ExtractOutput{
Name: e.conv.Name(),
Time: time.Now(),
Data: data,
}, nil
}
|
using System.Collections.Generic;
using System.Linq;
using System.Management.Automation;
using Cognifide.PowerShell.Core.Extensions;
using Sitecore.Data.Items;
using Sitecore.Layouts;
namespace Cognifide.PowerShell.Commandlets.Presentation
{
[Cmdlet(VerbsCommon.Get, "Rendering")]
[OutputType(typeof (RenderingDefinition))]
public class GetRenderingCommand : <API key>
{
protected override void ProcessRenderings(Item item, LayoutDefinition layout, DeviceDefinition device,
IEnumerable<RenderingDefinition> renderings)
{
renderings.ToList().ForEach(r => WriteObject(ItemShellExtensions.WrapInItemOwner(SessionState, item, r)));
}
}
}
|
package com.darksci.pardot.api.parser.user;
import com.darksci.pardot.api.parser.JacksonFactory;
import com.darksci.pardot.api.parser.ResponseParser;
import com.darksci.pardot.api.response.user.<API key>;
import java.io.IOException;
/**
* Handles parsing UserAbilities API responses into POJOs.
*/
public class UserAbilitiesParser implements ResponseParser<<API key>.Result> {
@Override
public <API key>.Result parseResponse(final String responseStr) throws IOException {
return JacksonFactory.newInstance().readValue(responseStr, <API key>.class).getResult();
}
}
|
<?php
namespace App\Controller;
use Core\http;
use Core\view;
use Core\db;
class main
{
protected $http;
protected $view;
protected $db;
public function __construct()
{
$this->http = new http();
$this->view = new view();
$this->db = new db();
}
}
|
<?php
namespace CodingMatters\EmployeeTest;
use PHPUnit\Framework\TestCase;
class ModuleConfigTest extends TestCase
{
public function testConfigProvider()
{
$this->markTestIncomplete("Not yet implemented");
}
}
|
#import <UIKit/UIKit.h>
FOUNDATION_EXPORT double <API key>;
FOUNDATION_EXPORT const unsigned char <API key>[];
|
//this controller simply tells the dialogs service to open a mediaPicker window
//with a specified callback, this callback will receive an object with a selection on it
angular.module('umbraco')
.controller("Umbraco.PropertyEditors.<API key>",
function ($rootScope, $routeParams, $scope, $log, mediaHelper, cropperHelper, $timeout, editorState, umbRequestHelper, fileManager) {
var config = angular.copy($scope.model.config);
//move previously saved value to the editor
if ($scope.model.value) {
//backwards compat with the old file upload (incase some-one swaps them..)
if (angular.isString($scope.model.value)) {
config.src = $scope.model.value;
$scope.model.value = config;
} else if ($scope.model.value.crops) {
//sync any config changes with the editor and drop outdated crops
_.each($scope.model.value.crops, function (saved) {
var configured = _.find(config.crops, function (item) { return item.alias === saved.alias });
if (configured && configured.height === saved.height && configured.width === saved.width) {
configured.coordinates = saved.coordinates;
}
});
$scope.model.value.crops = config.crops;
//restore focalpoint if missing
if (!$scope.model.value.focalPoint) {
$scope.model.value.focalPoint = { left: 0.5, top: 0.5 };
}
}
$scope.imageSrc = $scope.model.value.src;
}
//crop a specific crop
$scope.crop = function (crop) {
$scope.currentCrop = crop;
$scope.currentPoint = undefined;
};
//done cropping
$scope.done = function () {
$scope.currentCrop = undefined;
$scope.currentPoint = undefined;
};
//crop a specific crop
$scope.clear = function (crop) {
//clear current uploaded files
fileManager.setFiles($scope.model.alias, []);
//clear the ui
$scope.imageSrc = undefined;
if ($scope.model.value) {
delete $scope.model.value;
}
};
//show previews
$scope.togglePreviews = function () {
if ($scope.showPreviews) {
$scope.showPreviews = false;
$scope.tempShowPreviews = false;
} else {
$scope.showPreviews = true;
}
};
//on image selected, update the cropper
$scope.$on("filesSelected", function (ev, args) {
$scope.model.value = config;
if (args.files && args.files[0]) {
fileManager.setFiles($scope.model.alias, args.files);
var reader = new FileReader();
reader.onload = function (e) {
$scope.$apply(function () {
$scope.imageSrc = e.target.result;
});
};
reader.readAsDataURL(args.files[0]);
}
});
})
.run(function (mediaHelper, umbRequestHelper) {
if (mediaHelper && mediaHelper.<API key>) {
mediaHelper.<API key>("Umbraco.ImageCropper", function (property, entity, thumbnail) {
if (property.value.src) {
if (thumbnail === true) {
return property.value.src + "?width=600&mode=max";
}
else {
return property.value.src;
}
//this is a fallback in case the cropper has been asssigned a upload field
}
else if (angular.isString(property.value)) {
if (thumbnail) {
if (mediaHelper.<API key>(property.value)) {
var thumbnailUrl = umbRequestHelper.getApiUrl(
"imagesApiBaseUrl",
"GetBigThumbnail",
[{ originalImagePath: property.value }]);
return thumbnailUrl;
}
else {
return null;
}
}
else {
return property.value;
}
}
return null;
});
}
});
|
package data_struct.in_class.d10_02;
/**
* A class to test basic 'Object' methods
*
* @author Eddie Gurnee
* @version 10/02/13
* @see TestingSam
*
*/
public class Sam {
public int mikesplan = 8;
/**
* No argument constructor for the Sam class
*
*/
public Sam() {
}
/**
* Indicates if some other "Sam" object is equal to this one.
*
*/
public boolean equals(Sam otherObject) {
if (otherObject == null) {
System.out.println("check1");
return false;
}
else if (this.getClass() != otherObject.getClass()) {
System.out.println("check2");
return false;
}
else {
System.out.println("if this shows then fuck the police");
Sam otherSam = (Sam)otherObject;
return this.mikesplan == otherSam.mikesplan;
}
}
public int getMikesPlan() {
return mikesplan;
}
}
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>URI.js - URI-Template</title>
<meta name="description" content="URI.js is a Javascript library for working with URLs." />
<script src="jquery-3.6.0.min.js" type="text/javascript"></script>
<script src="prettify/prettify.js" type="text/javascript"></script>
<script src="screen.js" type="text/javascript"></script>
<link href="screen.css" rel="stylesheet" type="text/css" />
<link href="prettify/prettify.sunburst.css" rel="stylesheet" type="text/css" />
<script src="src/URI.min.js" type="text/javascript"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-8922143-3']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https:
var s = document.<API key>('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<style type="text/css">
.tpl-operator {
font-weight: bold;
color: #669933;
}
.tpl-variable {
font-weight: bold;
color: #336699;
}
.tpl-modifier {
font-weight: bold;
color: #663399;
}
pre {
padding: 10px;
background: #EEE;
}
table {
width: 100%;
border: 1px solid #AAA;
border-collapse: collapse;
}
td, th {
border: 1px solid #AAA;
text-align: left;
padding: 3px;
}
th {
background: #EEE;
}
</style>
</head>
<body>
<a id="github-forkme" href="https:
<div id="container">
<h1><a href="https://github.com/medialize/URI.js">URI.js</a></h1>
<ul class="menu">
<li><a href="/URI.js/">Intro</a></li>
<li><a href="about-uris.html">Understanding URIs</a></li>
<li><a href="docs.html">API-Documentation</a></li>
<li><a href="jquery-uri-plugin.html">jQuery Plugin</a></li>
<li class="active"><a href="uri-template.html">URI Template</a></li>
<li><a href="build.html">Build</a></li>
<li><a href="http://rodneyrehm.de/en/">Author</a></li>
</ul>
<h2>URI Template</h2>
<p>As of version 1.7.0 URI.js includes an implementation of URI Templates, as specified in <a href="http://tools.ietf.org/html/rfc6570">RFC 6570</a> (Level 4, March 2012).</p>
<h2>Using URI Templates</h2>
<pre class="prettyprint lang-js">
// creating a new URI Template
var template = new URITemplate("http://example.org/{file}");
var result = template.expand({file: "hello world.html"});
result === "http://example.org/hello%20world.html";
// of course you can call the constructor like a function and chain things:
result = URITemplate("http://example.org/{file}")
.expand({file: "hello world.html"});
result === "http://example.org/hello%20world.html";
// access via URI
result = URI.expand("http://example.org/{file}", {file: "hello world.html"});
// expand() accepts data-callbacks:
template.expand(function(key) {
var data = {file: "hello world.html"};
return data[key];
});
// expand() accepts key-callbacks:
template.expand({file : function(key) {
return "hello world.html";
}});
// Using strict mode
var template = new URITemplate("http://example.org/{file}");
var result = template.expand({filename: "hello world.html"}, { strict: true });
// Uncaught Error: Missing expansion value for variable "file"
</pre>
<h2>URI Template Syntax</h2>
<p><em>Expressions</em> are placeholders which are to be substituted by the values their variables reference.</p>
<ul>
<li><code>http://example.org/~<strong>{<em class="tpl-variable">username</em>}</strong>/</code></li>
<li><code>http://example.org/dictionary/<strong>{<em class="tpl-variable">term</em><span class="tpl-modifier">:1</span>}</strong>/<strong>{<em class="tpl-variable">term</em>}</strong></code></li>
<li><code>http://example.org/search<strong>{<span class="tpl-operator">?</span><em class="tpl-variable">q</em><span class="tpl-modifier">*</span>,<em class="tpl-variable">lang</em>}</strong></code></li>
</ul>
<p>
An expression consists of an <span class="tpl-operator">operator</span> and a (comma-separated) list of <em><API key></em>.
A <API key> consists of a <em class="tpl-variable">variable</em> and an optional <em class="tpl-modifier">modifier</em>.
</p>
<hr>
<p>Given the template</p>
<pre><code>http://example.org/~<strong>{<em class="tpl-variable">username</em>}</strong>/<strong>{<em class="tpl-variable">term</em><span class="tpl-modifier">:1</span>}</strong>/<strong>{<em class="tpl-variable">term</em>}</strong><strong>{<span class="tpl-operator">?</span><em class="tpl-variable">q</em><span class="tpl-modifier">*</span>,<em class="tpl-variable">lang</em>}</strong></code></pre>
<p>and the following data: </p>
<pre><code>{username: "rodneyrehm", term: "hello world", q: {a: "mars", b: "jupiter"}, lang: "en"}</code></pre>
<p>the expansion looks as follows:
<pre><code>"http://example.org/~rodneyrehm/h/hello%20world?a=mars&b=jupiter&lang=en"</code></pre>
<hr>
<p>List of supported <span class="tpl-operator">operators</span>:</p>
<table>
<tr><th>Operator</th><th>Description</th></tr>
<tr><td><code><em>None</em></code></td><td>Simple String Expansion;</td></tr>
<tr><td><code>+</code></td><td>Reserved character strings;</td></tr>
<tr><td><code>#</code></td><td>Fragment identifiers prefixed by "#";</td></tr>
<tr><td><code>.</code></td><td>Name labels or extensions prefixed by ".";</td></tr>
<tr><td><code>/</code></td><td>Path segments prefixed by "/";</td></tr>
<tr><td><code>;</code></td><td>Path parameter name or name=value pairs prefixed by ";";</td></tr>
<tr><td><code>?</code></td><td>Query component beginning with "?" and consisting of name=value pairs separated by "&"; and,</td></tr>
<tr><td><code>&</code></td><td>Continuation of query-style &name=value pairs within a literal query component.</td></tr>
</table>
<p>List of supported <span class="tpl-modifier">modifiers</span>:</p>
<table>
<tr><th>Modifier</th><th>Description</th></tr>
<tr><td><code><em>None</em></code></td><td>No modification, arrays and objects are joined with ","</td></tr>
<tr><td><code>*</code></td><td>Explode arrays and objects (see tables below)</td></tr>
<tr><td><code>:3</code></td><td>Substring of the first 3 characters of the variable's value</td></tr>
</table>
<h3>Strings and Numbers</h3>
<p>
Given <code>{"var": "hello[world]"}</code>, the expression <code>{var}</code> expands to <code>hello%5Bworld%5D</code>.
The following table shows an output matrix for every possible operator/modifier combination produced for <code>string</code> input.
</p>
<table>
<tr><th></th><th colspan="3">Modifier</th></tr>
<tr><th>Operator</th><th><em>None</em></th><th>*</th><th>:2</th></tr>
<tr><td><code><em>None</em></code></td><td><code>hello%5Bworld%5D</code></td><td><code>hello%5Bworld%5D</code></td><td><code>he</code></td></tr>
<tr><td><code><em>+</em></code></td><td><code>hello[world]</code></td><td><code>hello[world]</code></td><td><code>he</code></td></tr>
<tr><td><code>#</code></td><td><code>#hello[world]</code></td><td><code>#hello[world]</code></td><td><code>#he</code></td></tr>
<tr><td><code>.</code></td><td><code>.hello%5Bworld%5D</code></td><td><code>.hello%5Bworld%5D</code></td><td><code>.he</code></td></tr>
<tr><td><code>/</code></td><td><code>/hello%5Bworld%5D</code></td><td><code>/hello%5Bworld%5D</code></td><td><code>/he</code></td></tr>
<tr><td><code>;</code></td><td><code>;var=hello%5Bworld%5D</code></td><td><code>;var=hello%5Bworld%5D</code></td><td><code>;var=he</code></td></tr>
<tr><td><code>?</code></td><td><code>?var=hello%5Bworld%5D</code></td><td><code>?var=hello%5Bworld%5D</code></td><td><code>?var=he</code></td></tr>
<tr><td><code>&</code></td><td><code>&var=hello%5Bworld%5D</code></td><td><code>&var=hello%5Bworld%5D</code></td><td><code>&var=he</code></td></tr>
</table>
<h3>Arrays</h3>
<p>
Given <code>{"var": ["one", "two", "three"]}</code>, the expression <code>{var}</code> expands to <code>one,two,three</code>.
The following table shows an output matrix for every possible operator/modifier combination produced for <code>array</code> input.
</p>
<table>
<tr><th></th><th colspan="3">Modifier</th></tr>
<tr><th>Operator</th><th><em>None</em></th><th>*</th><th>:2</th></tr>
<tr><td><code><em>None</em></code></td><td><code>one,two,three</code></td><td><code>one,two,three</code></td><td><code>on,tw,th</code></td></tr>
<tr><td><code><em>+</em></code></td><td><code>one,two,three</code></td><td><code>one,two,three</code></td><td><code>on,tw,th</code></td></tr>
<tr><td><code>#</code></td><td><code>#one,two,three</code></td><td><code>#one,two,three</code></td><td><code>#on,tw,th</code></td></tr>
<tr><td><code>.</code></td><td><code>.one,two,three</code></td><td><code>.one.two.three</code></td><td><code>.on,tw,th</code></td></tr>
<tr><td><code>/</code></td><td><code>/one,two,three</code></td><td><code>/one/two/three</code></td><td><code>/on,tw,th</code></td></tr>
<tr><td><code>;</code></td><td><code>;var=one,two,three</code></td><td><code>;var=one;var=two;var=three</code></td><td><code>;var=on,tw,th</code></td></tr>
<tr><td><code>?</code></td><td><code>?var=one,two,three</code></td><td><code>?var=one&var=two&var=three</code></td><td><code>?var=on,tw,th</code></td></tr>
<tr><td><code>&</code></td><td><code>&var=one,two,three</code></td><td><code>&var=one&var=two&var=three</code></td><td><code>&var=on,tw,th</code></td></tr>
</table>
<h3>Objects ("plain objects" / "hash maps")</h3>
<p>
Given <code>{"var": {"one": "alpha", "two": "bravo"}}</code>, the expression <code>{var}</code> expands to <code>one,two,three</code>.
The following table shows an output matrix for every possible operator/modifier combination produced for <code>object</code> input.
</p>
<table>
<tr><th></th><th colspan="3">Modifier</th></tr>
<tr><th>Operator</th><th><em>None</em></th><th>*</th><th>:2</th></tr>
<tr><td><code><em>None</em></code></td><td><code>one,alpha,two,bravo</code></td><td><code>one=alpha,two=bravo</code></td><td><code>on,al,tw,br</code></td></tr>
<tr><td><code><em>+</em></code></td><td><code>one,alpha,two,bravo</code></td><td><code>one=alpha,two=bravo</code></td><td><code>on,al,tw,br</code></td></tr>
<tr><td><code>#</code></td><td><code>#one,alpha,two,bravo</code></td><td><code>#one=alpha,two=bravo</code></td><td><code>#on,al,tw,br</code></td></tr>
<tr><td><code>.</code></td><td><code>.one,alpha,two,bravo</code></td><td><code>.one=alpha.two=bravo</code></td><td><code>.on,al,tw,br</code></td></tr>
<tr><td><code>/</code></td><td><code>/one,alpha,two,bravo</code></td><td><code>/one=alpha/two=bravo</code></td><td><code>/on,al,tw,br</code></td></tr>
<tr><td><code>;</code></td><td><code>;var=one,alpha,two,bravo</code></td><td><code>;one=alpha;two=bravo</code></td><td><code>;var=on,al,tw,br</code></td></tr>
<tr><td><code>?</code></td><td><code>?var=one,alpha,two,bravo</code></td><td><code>?one=alpha&two=bravo</code></td><td><code>?var=on,al,tw,br</code></td></tr>
<tr><td><code>&</code></td><td><code>&var=one,alpha,two,bravo</code></td><td><code>&one=alpha&two=bravo</code></td><td><code>&var=on,al,tw,br</code></td></tr>
</table>
<h2>Limitations</h2>
<p>URI Template is a <em>Proposed Standard</em> and because of that I did not want to deviate from it. That said I'm not at all happy with how the specification turned out. Here are some of my thoughts:</p>
<ul>
<li>The <em>explode modifier</em> works the wrong way. <code>{?some_object}</code> should lead to <code>?foo=bar&hello=world</code>, as this is the common expansion</li>
<li>The <em>prefix modifier</em> (which I would've named <em>truncate modifier</em>) only has an end-offset.
The specification says it's »used to partition an identifier space hierarchically«. <code>abc</code> may become <code>a/bc</code> or <code>a/ab/abc</code>.
But there is no way of modifying output to <code>a/b/c</code> or <code>a/b/abc</code>. Whenever I had to partition identifier spaces, I used one of the latter patterns.</li>
<li>Operators like <code>.</code> automatically prefix the expansion. So <code>{"var": ["filename", "extension"]}</code> and <code>{.var*}</code> results in <code>.filename.extension</code> - obviously not what I wanted.</li>
<li>Variable names (<em>varname</em>) may only contain <code>ALPHA / DIGIT / "_" / pct-encoded</code> and may not be decoded for resolving the reference. This simply feels weird, especially the "may not be decoded" part.</li>
<li>Other possible modifiers could include some simple character-munging like <em>UPPERCASE</em>, <em>LOWERCASE</em>, <em>CAPITALCASE</em></li>
<li><code>{/var,empty,empty}</code> results in <code>/foobar//</code> - clearly not what one intended</li>
<li><code>{var}</code> and <code>{"var" : {"a": "1", "b": "2"}}</code> results in <code>a,1,b,2</code> - excusemewhat? I would've expected <code>a=1,b=2</code> or <code>a:1,b:2</code> (in a perverse parallel universe).</li>
<li>Spaces in the <em>query string</em> should be encoded to <code>+</code>, not <code>%20</code> according to <a href="http://www.w3.org/TR/html401/interact/forms.html#form-content-type">application/<API key></a></li>
</ul>
</div>
</body>
</html>
|
DVScrollBar
Usage:
Place this control in your panel. You will ideally have another panel or
control which is bigger than the original panel. This is the Canvas.
scrollbar:SetUp( _barsize_, _canvassize_ ) should be called whenever
the size of your 'canvas' changes.
scrollbar:GetOffset() can be called to get the offset of the canvas.
You should call this in your PerformLayout function and set the Y
pos of your canvas to this value.
Example:
function PANEL:PerformLayout()
local Wide = self:GetWide()
local YPos = 0
-- Place the scrollbar
self.VBar:SetPos( self:GetWide() - 16, 0 )
self.VBar:SetSize( 16, self:GetTall() )
-- Make sure the scrollbar knows how big our canvas is
self.VBar:SetUp( self:GetTall(), self.pnlCanvas:GetTall() )
-- Get data from the scrollbar
YPos = self.VBar:GetOffset()
-- If the scrollbar is enabled make the canvas thinner so it will fit in.
if ( self.VBar.Enabled ) then Wide = Wide - 16 end
-- Position the canvas according to the scrollbar's data
self.pnlCanvas:SetPos( self.Padding, YPos + self.Padding )
self.pnlCanvas:SetSize( Wide - self.Padding * 2, self.pnlCanvas:GetTall() )
end
local PANEL = {}
function PANEL:Init()
self.Offset = 0
self.Scroll = 0
self.CanvasSize = 1
self.BarSize = 1
self.btnUp = vgui.Create( "DButton", self )
self.btnUp:SetText( "" )
self.btnUp.DoClick = function( self ) self:GetParent():AddScroll( -1 ) end
self.btnUp.Paint = function( panel, w, h ) derma.SkinHook( "Paint", "ButtonUp", panel, w, h ) end
self.btnDown = vgui.Create( "DButton", self )
self.btnDown:SetText( "" )
self.btnDown.DoClick = function( self ) self:GetParent():AddScroll( 1 ) end
self.btnDown.Paint = function( panel, w, h ) derma.SkinHook( "Paint", "ButtonDown", panel, w, h ) end
self.btnGrip = vgui.Create( "DScrollBarGrip", self )
self:SetSize( 15, 15 )
end
function PANEL:SetEnabled( b )
if ( !b ) then
self.Offset = 0
self:SetScroll( 0 )
self.HasChanged = true
end
self:<API key>( b )
self:SetVisible( b )
-- We're probably changing the width of something in our parent
-- by appearing or hiding, so tell them to re-do their layout.
if ( self.Enabled != b ) then
self:GetParent():InvalidateLayout()
if ( self:GetParent().OnScrollbarAppear ) then
self:GetParent():OnScrollbarAppear()
end
end
self.Enabled = b
end
function PANEL:Value()
return self.Pos
end
function PANEL:BarScale()
if ( self.BarSize == 0 ) then return 1 end
return self.BarSize / ( self.CanvasSize + self.BarSize )
end
function PANEL:SetUp( _barsize_, _canvassize_ )
self.BarSize = _barsize_
self.CanvasSize = math.max( _canvassize_ - _barsize_, 1 )
self:SetEnabled( _canvassize_ > _barsize_ )
self:InvalidateLayout()
end
function PANEL:OnMouseWheeled( dlta )
if ( !self:IsVisible() ) then return false end
-- We return true if the scrollbar changed.
-- If it didn't, we feed the mousehweeling to the parent panel
return self:AddScroll( dlta * -2 )
end
function PANEL:AddScroll( dlta )
local OldScroll = self:GetScroll()
dlta = dlta * 25
self:SetScroll( self:GetScroll() + dlta )
return OldScroll != self:GetScroll()
end
function PANEL:SetScroll( scrll )
if ( !self.Enabled ) then self.Scroll = 0 return end
self.Scroll = math.Clamp( scrll, 0, self.CanvasSize )
self:InvalidateLayout()
-- If our parent has a OnVScroll function use that, if
-- not then invalidate layout (which can be pretty slow)
local func = self:GetParent().OnVScroll
if ( func ) then
func( self:GetParent(), self:GetOffset() )
else
self:GetParent():InvalidateLayout()
end
end
function PANEL:AnimateTo( scrll, length, delay, ease )
local anim = self:NewAnimation( length, delay, ease )
anim.StartPos = self.Scroll
anim.TargetPos = scrll
anim.Think = function( anim, pnl, fraction )
pnl:SetScroll( Lerp( fraction, anim.StartPos, anim.TargetPos ) )
end
end
function PANEL:GetScroll()
if ( !self.Enabled ) then self.Scroll = 0 end
return self.Scroll
end
function PANEL:GetOffset()
if ( !self.Enabled ) then return 0 end
return self.Scroll * -1
end
function PANEL:Think()
end
function PANEL:Paint( w, h )
derma.SkinHook( "Paint", "VScrollBar", self, w, h )
return true
end
function PANEL:OnMousePressed()
local x, y = self:CursorPos()
local PageSize = self.BarSize
if ( y > self.btnGrip.y ) then
self:SetScroll( self:GetScroll() + PageSize )
else
self:SetScroll( self:GetScroll() - PageSize )
end
end
function PANEL:OnMouseReleased()
self.Dragging = false
self.DraggingCanvas = nil
self:MouseCapture( false )
self.btnGrip.Depressed = false
end
function PANEL:OnCursorMoved( x, y )
if ( !self.Enabled ) then return end
if ( !self.Dragging ) then return end
local x, y = self:ScreenToLocal( 0, gui.MouseY() )
-- Uck.
y = y - self.btnUp:GetTall()
y = y - self.HoldPos
local TrackSize = self:GetTall() - self:GetWide() * 2 - self.btnGrip:GetTall()
y = y / TrackSize
self:SetScroll( y * self.CanvasSize )
end
function PANEL:Grip()
if ( !self.Enabled ) then return end
if ( self.BarSize == 0 ) then return end
self:MouseCapture( true )
self.Dragging = true
local x, y = self.btnGrip:ScreenToLocal( 0, gui.MouseY() )
self.HoldPos = y
self.btnGrip.Depressed = true
end
function PANEL:PerformLayout()
local Wide = self:GetWide()
local Scroll = self:GetScroll() / self.CanvasSize
local BarSize = math.max( self:BarScale() * ( self:GetTall() - ( Wide * 2 ) ), 10 )
local Track = self:GetTall() - ( Wide * 2 ) - BarSize
Track = Track + 1
Scroll = Scroll * Track
self.btnGrip:SetPos( 0, Wide + Scroll )
self.btnGrip:SetSize( Wide, BarSize )
self.btnUp:SetPos( 0, 0, Wide, Wide )
self.btnUp:SetSize( Wide, Wide )
self.btnDown:SetPos( 0, self:GetTall() - Wide, Wide, Wide )
self.btnDown:SetSize( Wide, Wide )
end
derma.DefineControl( "DVScrollBar", "A Scrollbar", PANEL, "Panel" )
|
__author__ = 'brianoneill'
from log_calls import log_calls
global_settings = dict(
log_call_numbers=True,
log_exit=False,
log_retval=True,
)
log_calls.set_defaults(global_settings, args_sep=' $ ')
|
angular.module('phonebook')
.config(['$urlRouterProvider','$stateProvider',function($urlRouterProvider,$stateProvider){
$stateProvider
// Greeting State
.state('user.main',{
url : '/',
templateUrl : 'user/view/welcome.html',
controller : 'welcomeCtrl'
})
// Phonebook Display State
.state('user.PB',{
url : '/contacts',
templateUrl : 'user/view/displayContacts.html',
controller : 'cntctCtrl'
})
}]);
|
<!DOCTYPE html>
<html ng-app="myapp">
<head>
<title>TODO supply a title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="<?php echo base_url() ?>css/bootstrap.min.css">
<style>
</style>
<script src="<?php echo base_url() ?>js/libs/jquery-2.2.1.min.js"></script>
<script src="<?php echo base_url() ?>js/libs/angular.min.js"></script>
<script src="<?php echo base_url() ?>js/libs/bootstrap.min.js"></script>
<script>
var app = angular.module('myapp', []);
app.controller('articlesCtrl', function ($scope, $http) {
var latestLastIndex = 0;
var popularLastIndex = 0;
$scope.hotArticles = [];
$scope.latestArticles = [];
$scope.loadPopular = function () {
$http({
method: 'GET',
url: '../index.php/article/getPopularPosts/' + popularLastIndex
}).then(function successCallback(response) {
popularLastIndex += 10;
$scope.hotArticles = $scope.hotArticles.concat(response.data);
}, function errorCallback(response) {
});
};
$scope.loadLatest = function () {
$http({
method: 'GET',
url: '../index.php/article/getLatestPosts/1'
}).then(function successCallback(response) {
latestLastIndex += 10;
$scope.latestArticles = response.data;
}, function errorCallback(response) {
});
};
$scope.loadPopular();
$scope.loadLatest();
});
</script>
</head>
<body>
<div class="container">
<div class="">
<div class="form-inline">
<input class="form-control" ><button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-search"></span> </button>
</div>
</div>
<div class="" ng-controller="articlesCtrl">
<h2> posts for you </h2>
<div class="pops-post row" >
<h4>popular articles</h4>
<div class="pops-block col-sm-3" ng-repeat="articlex in hotArticles">
<a ng-href="../index.php/article/{{articlex.post_id}}">
<h3>{{articlex.title}}</h3>
<img ng-src="http://lorempixel.com/300/200/transport/{{$index}}" alt="" class="img-responsive">
<div class="des">
discription of the post
</div>
</a>
</div>
</div>
<div class="">
<button class="btn btn-info" ng-click="loadPopular()">load more</button>
</div>
<h2> Latest posts</h2>
<div class="pops-post row">
<h4>popular articles</h4>
<div class="pops-block col-sm-3" ng-repeat="articlex in latestArticles">
<h3>{{articlex.title}}</h3>
<img ng-src="http://lorempixel.com/300/200/transport/{{$index}}" alt="" class="img-responsive">
<div class="des">
discription of the post
</div>
</div>
</div>
<div class="">
<button class="btn btn-info" ng-click="loadLatest()">load more</button>
</div>
</div>
</div>
</body>
</html>
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace PineTree.Language.Syntax
{
public abstract class ExpressionTerminal : Expression
{
}
}
|
<script>
var detail = $("#cb_post_title_url");
if (detail.text() !== ""){$("div#sideBar").hide();var mainArticleArea = $("div#mainContent");mainArticleArea.width("100%");mainArticleArea.css("margin-left","0");
$("div.forFlow #comment_form").css("margin-left","40px");
$("div.post h1.postTitle").after("<div id='mycpright'><strong></strong><br/><a href='http:
}
window.onload = function() {};
</script>
<ul id="my_admin"><li id="nav_newpost" class="inline_li"><a id="<API key>" class="menu" rel="nofollow" href="https:
|
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>KeyExportOptions | <API key> API</title>
<meta name="description" content="Documentation for <API key> API">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title"><API key> API</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="<API key>">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="<API key>" checked />
<label class="tsd-widget" for="<API key>">Inherited</label>
<input type="checkbox" id="<API key>" checked />
<label class="tsd-widget" for="<API key>">Externals</label>
<input type="checkbox" id="<API key>" />
<label class="tsd-widget" for="<API key>">Only exported</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../globals.html">Globals</a>
</li>
<li>
<a href="../modules/_crypto_.html">"crypto"</a>
</li>
<li>
<a href="_crypto_.keyexportoptions.html">KeyExportOptions</a>
</li>
</ul>
<h1>Interface KeyExportOptions<T></h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-type-parameters">
<h3>Type parameters</h3>
<ul class="tsd-type-parameters">
<li>
<h4>T<span class="<API key>">: </span><a href="../modules/_crypto_.html#keyformat" class="tsd-signature-type">KeyFormat</a></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<span class="target">KeyExportOptions</span>
</li>
</ul>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section tsd-is-external">
<h3>Properties</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-property <API key> tsd-is-external"><a href="_crypto_.keyexportoptions.html#cipher" class="tsd-kind-icon">cipher</a></li>
<li class="tsd-kind-property <API key> tsd-is-external"><a href="_crypto_.keyexportoptions.html#format" class="tsd-kind-icon">format</a></li>
<li class="tsd-kind-property <API key> tsd-is-external"><a href="_crypto_.keyexportoptions.html#passphrase" class="tsd-kind-icon">passphrase</a></li>
<li class="tsd-kind-property <API key> tsd-is-external"><a href="_crypto_.keyexportoptions.html#type" class="tsd-kind-icon">type</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group tsd-is-external">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-property <API key> tsd-is-external">
<a name="cipher" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagOptional">Optional</span> cipher</h3>
<div class="tsd-signature tsd-kind-icon">cipher<span class="<API key>">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in node_modules/@types/node/crypto.d.ts:150</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property <API key> tsd-is-external">
<a name="format" class="tsd-anchor"></a>
<h3>format</h3>
<div class="tsd-signature tsd-kind-icon">format<span class="<API key>">:</span> <span class="tsd-signature-type">T</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in node_modules/@types/node/crypto.d.ts:149</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property <API key> tsd-is-external">
<a name="passphrase" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagOptional">Optional</span> passphrase</h3>
<div class="tsd-signature tsd-kind-icon">passphrase<span class="<API key>">:</span> <span class="tsd-signature-type">string</span><span class="<API key>"> | </span><a href="../classes/buffer.html" class="tsd-signature-type">Buffer</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in node_modules/@types/node/crypto.d.ts:151</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property <API key> tsd-is-external">
<a name="type" class="tsd-anchor"></a>
<h3>type</h3>
<div class="tsd-signature tsd-kind-icon">type<span class="<API key>">:</span> <span class="tsd-signature-type">"pkcs1"</span><span class="<API key>"> | </span><span class="tsd-signature-type">"spki"</span><span class="<API key>"> | </span><span class="tsd-signature-type">"pkcs8"</span><span class="<API key>"> | </span><span class="tsd-signature-type">"sec1"</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in node_modules/@types/node/crypto.d.ts:148</li>
</ul>
</aside>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals ">
<a href="../globals.html"><em>Globals</em></a>
</li>
<li class="current tsd-kind-module tsd-is-external">
<a href="../modules/_crypto_.html">"crypto"</a>
<ul>
<li class=" tsd-kind-namespace <API key> tsd-is-external">
<a href="../modules/_crypto_.constants.html">constants</a>
</li>
<li class=" tsd-kind-namespace <API key> tsd-is-external">
<a href="../modules/_crypto_.generatekeypair.html">generate<wbr>Key<wbr>Pair</a>
</li>
</ul>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
</ul>
<ul class="current">
<li class="current tsd-kind-interface <API key> <API key> tsd-is-external">
<a href="_crypto_.keyexportoptions.html" class="tsd-kind-icon">Key<wbr>Export<wbr>Options</a>
<ul>
<li class=" tsd-kind-property <API key> tsd-is-external">
<a href="_crypto_.keyexportoptions.html#cipher" class="tsd-kind-icon">cipher</a>
</li>
<li class=" tsd-kind-property <API key> tsd-is-external">
<a href="_crypto_.keyexportoptions.html#format" class="tsd-kind-icon">format</a>
</li>
<li class=" tsd-kind-property <API key> tsd-is-external">
<a href="_crypto_.keyexportoptions.html#passphrase" class="tsd-kind-icon">passphrase</a>
</li>
<li class=" tsd-kind-property <API key> tsd-is-external">
<a href="_crypto_.keyexportoptions.html#type" class="tsd-kind-icon">type</a>
</li>
</ul>
</li>
</ul>
<ul class="after-current">
</ul>
</nav>
</div>
</div>
</div>
<footer class="with-border-bottom">
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li>
</ul>
</div>
</div>
</footer>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
</body>
</html>
|
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
namespace STextViewControl.Properties
{
[global::System.Runtime.CompilerServices.<API key>()]
[global::System.CodeDom.Compiler.<API key>("Microsoft.VisualStudio.Editors.SettingsDesigner.<API key>", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.<API key>
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.<API key>.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}
|
#include "Common.h"
#include "Script.h"
#include <atlimage.h>
#include <hidsdi.h>
#include <SetupAPI.h>
#define HID_SFIP 'SFIP'
#define HID_X52P 'X52P'
#define HID_UNKN 'UNKN'
// CHECKME : Do we still need all this code since we now have a GetSerialNumber() in the DO API?
DeviceManager *DevMan = DeviceManager::GetInstance();
SaitekDevice HID[HID_COUNT];
int HIDCount = HID_EMPTY;
int ToDeviceShortName(const char *type) {
if (strcmp(type, "SFIP") == 0)
return HID_SFIP;
if (strcmp(type, "X52P") == 0)
return HID_X52P;
return HID_UNKN;
}
int GetDeviceShortName(GUID type) {
if (type == DeviceType_Fip)
return HID_SFIP;
if (type == DeviceType_X52Pro)
return HID_X52P;
return HID_UNKN;
}
const char *GetDeviceStringName(GUID type) {
if (type == DeviceType_Fip)
return "SFIP";
if (type == DeviceType_X52Pro)
return "X52P";
return "UNKN";
}
int HIDLookupByType(const char *type, int index) {
int count = 1; // Index starts at 1 in Lua
int dev = ToDeviceShortName(type);
for (int i = 0; i < HIDCount; i++) {
if (GetDeviceShortName(HID[i].type) == dev/* && HID[i].isActive*/) {
if (count++ == index)
return i;
}
}
return HID_NOTFOUND;
}
int HIDLookupByIndex(int index) {
int count = 1; // Index starts at 1 in Lua
int dev = GetDeviceShortName(HID[index].type);
for (int i = 0; i < HIDCount; i++) {
if (GetDeviceShortName(HID[i].type) == dev/* && HID[i].isActive*/) {
if (index == i)
return count;
count++;
}
}
return HID_NOTFOUND;
}
static void CALLBACK DO_Enumerate(void* hDevice, void* pCtxt) {
DevMan->HandleDeviceChange(hDevice, true);
}
static void CALLBACK DO_DeviceChange(void* hDevice, bool bAdded, void* pCtxt) {
int index = DevMan->HandleDeviceChange(hDevice, bAdded);
LuaMan-><API key>(index, bAdded);
}
void DeviceManager::Initialize() {
_lockInit.Acquire();
if (_initializedCounter > 0) {
_initializedCounter++;
_lockInit.Release();
return;
}
// Initialize...
memset(HID, 0, sizeof(SaitekDevice) * HID_COUNT);
HIDCount = HID_EMPTY;
//Initialize DirectInput
HRESULT hdi = DirectInput8Create(GetModuleHandle(NULL), DIRECTINPUT_VERSION, IID_IDirectInput8, (LPVOID *)&this->_di, NULL);
if (!SUCCEEDED(hdi)) {
_lockInit.Release();
return;
}
//Initialize Saitek DirectOutput
_do = new CDirectOutput();
HRESULT hdo = _do->Initialize(L"" LUALIB_IDENT);
if (!SUCCEEDED(hdo)) {
_di->Release();
_lockInit.Release();
return;
}
// Register callbacks
HRESULT h1 = _do->Enumerate((<API key>)DO_Enumerate, NULL);
HRESULT h2 = _do-><API key>((<API key>)DO_DeviceChange, NULL);
// Everything OK
_initializedCounter = 1;
_lockInit.Release();
}
void DeviceManager::Release() {
_lockInit.Acquire();
if (_initializedCounter
_lockInit.Release();
return;
}
_do->Deinitialize();
_di->Release();
_initializedCounter = 0;
_lockInit.Release();
}
void DeviceManager::GetDeviceInfo(void *hDevice, DeviceData &dd) {
GUID gi;
HRESULT hr = DO()->GetDeviceInstance(hDevice, &gi);
GetDeviceInfo(gi, dd);
}
void DeviceManager::GetDeviceInfo(const GUID &iid, DeviceData &dd) {
SP_DEVINFO_DATA DeviceInfoData;
<API key> did;
struct { DWORD cbSize; TCHAR DevicePath[256]; } ciddd;
TCHAR s[64];
GUID HidGuid;
//Empty
dd.instanceID[0] = 0;
dd.name[0] = 0;
dd.serialNumber[0] = 0;
// Try to create a device
<API key> pDevice;
HRESULT hd = DevMan->DI()->CreateDevice(iid, &pDevice, NULL);
if (FAILED(hd)) {
return;
}
// Get the GUID and Path
DIPROPGUIDANDPATH h;
h.diph.dwSize = sizeof(DIPROPGUIDANDPATH);
h.diph.dwHeaderSize = sizeof(DIPROPHEADER);
h.diph.dwObj = 0;
h.diph.dwHow = DIPH_DEVICE;
HRESULT hp = pDevice->GetProperty(DIPROP_GUIDANDPATH, (LPDIPROPHEADER)&h);
if (FAILED(hd))
return;
// Change # to \ to match structure of instance ID
for (size_t i = 0; i < wcslen(h.wszPath); i++) {
if (h.wszPath[i] == L'
h.wszPath[i] = L'\\';
}
}
// Prepare enumeration
HidD_GetHidGuid(&HidGuid);
HDEVINFO hdi = SetupDiGetClassDevs(&HidGuid, NULL, NULL, DIGCF_PRESENT|<API key>);
DeviceInfoData.cbSize = sizeof(SP_DEVINFO_DATA);
did.cbSize = sizeof(<API key>);
ciddd.cbSize = sizeof(<API key>);
for (int i = 0; <API key>(hdi, 0, &HidGuid, i, &did); i++) {
if (!<API key>(hdi, &did, <API key>(&ciddd), sizeof(ciddd.DevicePath), 0, &DeviceInfoData))
continue;
if (!<API key>(hdi, &DeviceInfoData, s, sizeof(s), 0))
continue;
_wcslwr_s(s);
if(!wcsstr(h.wszPath, s))
continue;
strncpy_s(dd.instanceID, CT2A(s), sizeof(dd.instanceID) - 1);
HANDLE h = CreateFile(ciddd.DevicePath, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, NULL, NULL);
if (<API key>(h, s, sizeof(s)))
strncpy_s(dd.name, CT2A(s), sizeof(dd.name) - 1);
if (<API key>(h, s, sizeof(s)))
strncpy_s(dd.serialNumber, CT2A(s), sizeof(dd.serialNumber) - 1);
CloseHandle(h);
}
<API key>(hdi);
}
int DeviceManager::Prepare(void *hDevice) {
if (HIDCount == HID_COUNT)
return HID_NOTFOUND;
int index = HIDCount++;
HID[index].hDevice = hDevice;
return index;
}
void DeviceManager::Set(int index) {
void *hDevice = HID[index].hDevice;
GUID gt, gi;
DeviceData dd;
GetDeviceInfo(hDevice, dd);
DO()->GetDeviceType(hDevice, >);
DO()->GetDeviceInstance(hDevice, &gi);
HID[index].type = gt;
HID[index].instance = gi;
strcpy_s(HID[index].instanceID, dd.instanceID);
strcpy_s(HID[index].name, dd.name);
strcpy_s(HID[index].serialNumber, dd.serialNumber);
}
int DeviceManager::HandleDeviceChange(void *hDevice, bool bAdded) {
int index = LookupByHandle(hDevice);
_lockHID.Acquire();
if (bAdded) {
if (index == HID_NOTFOUND)
index = LookupByDeviceInfo(hDevice, false);
if (index == HID_NOTFOUND)
index = Prepare(hDevice);
}
if (index != HID_NOTFOUND) {
HID[index].isActive = bAdded;
if (bAdded) {
HID[index].hDevice = hDevice;
Set(index);
}
}
_lockHID.Release();
return index;
}
int DeviceManager::LookupByHandle(void* hDevice) {
_lockHID.Acquire();
for (int i = 0; i < HIDCount; i++) {
if (hDevice == HID[i].hDevice) {
_lockHID.Release();
return i;
}
}
_lockHID.Release();
return HID_NOTFOUND;
}
int DeviceManager::LookupByDeviceInfo(void *hDevice, bool isActive) {
GUID gt;
DeviceData dd;
DO()->GetDeviceType(hDevice, >);
GetDeviceInfo(hDevice, dd);
return LookupByDeviceInfo(gt, dd, isActive);
}
int DeviceManager::LookupByDeviceInfo(GUID &type, DeviceData &dd, bool isActive) {
for (int i = 0; i < HIDCount; i++) {
if (HID[i].isActive == isActive && HID[i].type == type &&
strcmp(dd.instanceID, HID[i].instanceID) == 0 &&
strcmp(dd.serialNumber, HID[i].serialNumber) == 0) {
return i;
}
}
return HID_NOTFOUND;
}
|
game.TitleScreen = me.ScreenObject.extend({
init: function(){
this.font = null;
},
onResetEvent: function() {
me.audio.stop("theme");
game.data.newHiScore = false;
me.game.world.addChild(new BackgroundLayer('bg', 1));
me.input.bindKey(me.input.KEY.ENTER, "enter", true);
me.input.bindKey(me.input.KEY.SPACE, "enter", true);
me.input.bindMouse(me.input.mouse.LEFT, me.input.KEY.ENTER);
this.handler = me.event.subscribe(me.event.KEYDOWN, function (action, keyCode, edge) {
if (action === "enter") {
me.state.change(me.state.PLAY);
}
});
//logo
var logoImg = me.loader.getImage('logo');
var logo = new me.SpriteObject (
me.game.viewport.width/2 - 170,
-logoImg,
logoImg
);
me.game.world.addChild(logo, 10);
var logoTween = new me.Tween(logo.pos).to({y: me.game.viewport.height/2 - 100},
1000).easing(me.Tween.Easing.Exponential.InOut).start();
this.ground = new TheGround();
me.game.world.addChild(this.ground, 11);
me.game.world.addChild(new (me.Renderable.extend ({
// constructor
init: function() {
// size does not matter, it's just to avoid having a zero size
// renderable
this.parent(new me.Vector2d(), 100, 100);
//this.font = new me.Font('Arial Black', 20, 'black', 'left');
this.text = me.device.touch ? 'Tap to start' : 'PRESS SPACE OR CLICK LEFT MOUSE BUTTON TO START';
this.font = new me.Font('gamefont', 20, '#000');
},
update: function () {
return true;
},
draw: function (context) {
var measure = this.font.measureText(context, this.text);
this.font.draw(context, this.text, me.game.viewport.width/2 - measure.width/2, me.game.viewport.height/2 + 50);
}
})), 12);
},
onDestroyEvent: function() {
// unregister the event
me.event.unsubscribe(this.handler);
me.input.unbindKey(me.input.KEY.ENTER);
me.input.unbindKey(me.input.KEY.SPACE);
me.input.unbindMouse(me.input.mouse.LEFT);
me.game.world.removeChild(this.ground);
}
});
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>First Steps Into PHP</title>
</head>
<body>
<form>
X: <input type="text" name="num1" />
Y: <input type="text" name="num2" />
Z: <input type="text" name="num3" />
<input type="submit" />
</form>
<?php
if (!isset($_GET['num1']) || !isset($_GET['num2']) || !isset($_GET['num3'])){
exit(1);
}
$numbers = [$_GET['num1'], $_GET['num2'], $_GET['num3']];
$numbers = array_map('intval',$numbers);
if (in_array(0, $numbers)){
echo "Positive";
exit(0);
}
$numbers = array_filter($numbers,function ($num){
return $num<0;
});
$<API key> = count($numbers);
$isPositive = $<API key>%2==0;
if ($isPositive){
echo "Positive";
}
else{
echo "Negative";
}
?>
</body>
</html>
|
'use strict';
var _ = require('underscore'),
Util = require('../../shared/util'),
Base = require('./base'),
Action = require('../../action'),
Types = require('./types');
var _parent = Base.prototype;
var RandomWalk = Util.extend(Base, {
properties: ['walkPropability'],
type: Types.RANDOM_WALK,
_walkPropability: 0.3,
create: function(config) {
var me = this;
me.getConfig(config, ['walkPropability']);
_parent.create.apply(me, arguments);
},
decide: function() {
var me = this;
if (Math.random() > me._walkPropability) {
return null;
}
switch (_.random(3)) {
case 0:
return new Action.Move({deltaX: 1});
case 1:
return new Action.Move({deltaX: -1});
case 2:
return new Action.Move({deltaY: 1});
case 3:
return new Action.Move({deltaY: -1});
}
return null;
}
});
module.exports = RandomWalk;
|
<?php
/* SRVDVServerBundle:ChangePassword:changePassword.html.twig */
class <API key> extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = false;
$this->blocks = array(
'fos_user_content' => array($this, '<API key>'),
);
}
protected function doDisplay(array $context, array $blocks = array())
{
$<API key> = $this->env->getExtension("Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension");
$<API key>->enter($<API key> = new <API key>($this->getTemplateName(), "template", "SRVDVServerBundle:ChangePassword:changePassword.html.twig"));
// line 1
echo "
";
// line 3
$this->displayBlock('fos_user_content', $context, $blocks);
$<API key>->leave($<API key>);
}
public function <API key>($context, array $blocks = array())
{
$<API key> = $this->env->getExtension("Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension");
$<API key>->enter($<API key> = new <API key>($this->getTemplateName(), "block", "fos_user_content"));
// line 4
echo " ";
$this->loadTemplate("SRVDVServerBundle:Change<API key>.html.twig", "SRVDVServerBundle:ChangePassword:changePassword.html.twig", 4)->display($context);
$<API key>->leave($<API key>);
}
public function getTemplateName()
{
return "SRVDVServerBundle:ChangePassword:changePassword.html.twig";
}
public function getDebugInfo()
{
return array ( 39 => 4, 27 => 3, 23 => 1,);
}
/** @deprecated since 1.27 (to be removed in 2.0). Use getSourceContext() instead */
public function getSource()
{
@trigger_error('The '.__METHOD__.' method is deprecated since version 1.27 and will be removed in 2.0. Use getSourceContext() instead.', E_USER_DEPRECATED);
return $this->getSourceContext()->getCode();
}
public function getSourceContext()
{
return new Twig_Source("
{% block fos_user_content %}
{% include \"SRVDVServerBundle:Change<API key>.html.twig\" %}
{% endblock fos_user_content %}
", "SRVDVServerBundle:ChangePassword:changePassword.html.twig", "C:\\wamp64\\www\\serveurDeVoeux\\src\\SRVDV\\ServerBundle/Resources/views/ChangePassword/changePassword.html.twig");
}
}
|
#ifndef <API key>
#define <API key>
#include <mysql++.h>
#include <vector>
#include "dbConfig.h"
namespace model {
namespace manager {
template<class ModelName>
class baseManager {
public:
baseManager() {
try {
_con.connect(db_name, db_ip, db_user, db_password);
}
catch (...) {
return;
}
}
baseManager(const std::string &table) : _tableName(table) {
try {
_con.connect(db_name, db_ip, db_user, db_password);
}
catch (...) {
return;
}
}
baseManager(const baseManager &rhs) : _con(rhs._con), _query(rhs._query),
_tableName(rhs._tableName) {}
virtual ~baseManager() {
_con.disconnect();
}
virtual void update(ModelName &model) = 0;
virtual void get(const std::string &filter) = 0;
virtual void get() = 0;
virtual void all() = 0;
virtual void filter(const std::string &filter) = 0;
virtual void execute() = 0;
virtual void execute(ModelName &result) = 0;
virtual void execute(std::vector<ModelName> &result) = 0;
protected:
mysqlpp::Connection _con;
std::string _query;
std::string _tableName;
};
}
}
#endif //<API key>
|
<?php
declare(strict_types=1);
namespace Eelly\SDK\Order\Api;
use Eelly\SDK\Order\Service\OfflineInterface;
/**
* @author shadonTools<localhost.shell@gmail.com>
*/
class Offline implements OfflineInterface
{
/**
* @return self
*/
public static function getInstance(): self
{
static $instance;
if (null === $instance) {
$instance = new self();
}
return $instance;
}
}
|
#!/bin/sh
set -e
echo "mkdir -p ${<API key>}/${<API key>}"
mkdir -p "${<API key>}/${<API key>}"
SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
install_framework()
{
if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
local source="${BUILT_PRODUCTS_DIR}/$1"
elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then
local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")"
elif [ -r "$1" ]; then
local source="$1"
fi
local destination="${<API key>}/${<API key>}"
if [ -L "${source}" ]; then
echo "Symlinked..."
source="$(readlink "${source}")"
fi
# use filter instead of exclude so missing patterns dont' throw errors
echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
local basename
basename="$(basename -s .framework "$1")"
binary="${destination}/${basename}.framework/${basename}"
if ! [ -r "$binary" ]; then
binary="${destination}/${basename}"
fi
# Strip invalid architectures so "fat" simulator / device frameworks work on device
if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then
strip_invalid_archs "$binary"
fi
# Resign the code if required by the build settings to avoid unstable apps
<API key> "${destination}/$(basename "$1")"
# Embed linked Swift runtime libraries. No longer necessary as of Xcode 7.
if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then
local swift_runtime_libs
swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]})
for lib in $swift_runtime_libs; do
echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\""
rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}"
<API key> "${destination}/${lib}"
done
fi
}
# Signs a framework with the provided identity
<API key>() {
if [ -n "${<API key>}" -a "${<API key>}" != "NO" -a "${<API key>}" != "NO" ]; then
# Use the current code_sign_identitiy
echo "Code Signing $1 with Identity ${<API key>}"
echo "/usr/bin/codesign --force --sign ${<API key>} --preserve-metadata=identifier,entitlements \"$1\""
/usr/bin/codesign --force --sign ${<API key>} --preserve-metadata=identifier,entitlements "$1"
fi
}
# Strip invalid architectures
strip_invalid_archs() {
binary="$1"
# Get architectures for current file
archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)"
stripped=""
for arch in $archs; do
if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then
# Strip non-valid architectures in-place
lipo -remove "$arch" -output "$binary" "$binary" || exit 1
stripped="$stripped $arch"
fi
done
if [[ "$stripped" ]]; then
echo "Stripped $binary of architectures:$stripped"
fi
}
if [[ "$CONFIGURATION" == "Debug" ]]; then
install_framework "$<API key>/<API key>/<API key>.framework"
fi
if [[ "$CONFIGURATION" == "Release" ]]; then
install_framework "$<API key>/<API key>/<API key>.framework"
fi
|
<!DOCTYPE html>
<html lang="en">
<head>
<title>Rice Diseases</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="static/bootstrap.min.css">
<script src="static/jquery.min.js"></script>
<script src="static/bootstrap.min.js"></script>
</head>
<body>
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="/">Forecast</a>
</div>
<ul class="nav navbar-nav">
<li class="active"><a href="/">Home</a></li>
<li class="dropdown">
<a class="dropdown-toggle" data-toggle="dropdown" href="#">Rice Diseases
<span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="/1">Brown Spot Disease</a></li>
<li><a href="/2">Blast Disease</a></li>
<li><a href="/3">Bacterial Leaf Streak Disease</a></li>
<li><a href="/4">Dirty Panicle Disease</a></li>
<li><a href="/5">Bacterial Leaf Blight Disease</a></li>
</ul>
</li>
<li><a href="/graph">Graph</a></li>
<li><a href="/read">Data</a></li>
<li><a href="/contact">Contact</a></li>
</ul>
</div>
</nav>
<div class="container">
<div class="jumbotron">
<h1>Bacterial Leaf Streak Disease</h1>
<h2>Symptoms</h2>
<p>
Symptoms are narrow, dark-greenish, water-soaked, interveinal streaks of various lengths, initially restricted to the leaf blades. The lesions enlarge, turn yellowish-orange to brown (depending on cultivar), and eventually coalesce. Tiny amber droplets of bacterial exudate are often present on the lesions.</p>
<p>Causal agent : <i>Xanthomonas oryzae pv. oryzicola</i>
<br>
Percentage of damage: Seedling 70%, Grains production period 30%
</p>
<div class="container">
<div style="float:left;"><img class="img-responsive" src="static/31.png" alt="Bacterial leaf streak disease" width="200"></div>
<div style="float:left;"><img class="img-responsive" src="static/32.png" alt="Bacterial leaf streak disease" width="200"></div>
<div style="float:left;"><img class="img-responsive" src="static/33.png" alt="Bacterial leaf streak disease" width="200"></div>
</div>
<h2>Managements</h2>
<p>
1. Phytosanitary measures to prevent the distribution of seed infected.
<br>
2. Healthy seed is used.
<br>
3. Suitable using nitrogenous fertilizer because the use of excess nitrogenous fertilizer has shown an increase in incidence.
<br>
4. Biological control such as Trichoderma spp., Bacillus subtilis, Pseudomonas fluorescens.
<br>
5. Other control measures are not likely to be necessary.
<p>
</div>
</div>
</div>
</body>
</html>
|
import_module('Athena.Math');
m1 = new Athena.Math.Matrix3(1, 2, 3,
4, 5, 6,
7, 8, 9);
for (var row = 0; row < 3; ++row)
{
for (var col = 0; col < 3; ++col)
CHECK_CLOSE(row * 3 + col + 1, m1.get(row, col));
}
|
<?php
/**
* The default template for displaying content
*
* Used for both single and index/archive/search.
*
* @package FoundationPress
* @since FoundationPress 1.0.0
*/
?>
<div id="post-<?php the_ID(); ?>" <?php post_class('blogpost-entry'); ?>>
<header>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php <API key>(); ?>
</header>
<div class="entry-content">
<?php the_content( __( 'Continue reading...', 'foundationpress' ) ); ?>
</div>
<footer>
<?php $tag = get_the_tags(); if ( $tag ) { ?><p><?php the_tags(); ?></p><?php } ?>
</footer>
<hr />
</div>
|
class <API key> < ActiveRecord::Migration
def up
change_column :users, :user_data, :text, :limit => nil
end
def down
end
end
|
<?php
?>
<?php
class PostNuke_User extends Abstract_User {
function loadByUid($uid) {
global $name; /* Gallery PN module name */
if (ereg("[^0-9]", $uid)) {
$newuser = new NobodyUser();
foreach ($newuser as $k => $v) {
$this->$k = $v;
}
return;
}
$this->username = pnUserGetVar('uname', $uid);
$this->fullname = pnUserGetVar('name', $uid);
$this->email = pnUserGetVar('email', $uid);
$this->canCreateAlbums = 0;
$this->uid = $uid;
/*
* XXX: this sets the admin-ness according to the user who's
* currently logged in -- NOT the $uid in question! This would
* be an issue, except that it just so happens that it doesn't
* affect anything we're doing in the app level code.
*/
$this->isAdmin = (pnSecAuthAction(0, "$name::", '::', ACCESS_ADMIN));
}
function loadByUserName($uname) {
list($dbconn) = pnDBGetConn();
$pntable = pnDBGetTables();
$userscolumn = &$pntable['users_column'];
$userstable = $pntable['users'];
/* Figure out the uid for this uname */
$query = "SELECT $userscolumn[uid] " .
"FROM $userstable " .
"WHERE $userscolumn[uname] = '" . pnVarPrepForStore($uname) ."'";
$result = $dbconn->Execute($query);
list($uid) = $result->fields;
$result->Close();
$this->loadByUid($uid);
}
}
?>
|
import Objective from '../objective';
export default class KillShipsObjective extends Objective {
constructor (game, ships) {
super(game);
if (!Array.isArray(ships)) {
ships = [ships];
}
this.bots = _.filter(ships, ship => { return ship.alive; });
this.ships = ships;
}
isComplete () {
var all_dead = true;
for (var i = 0; i < this.ships.length; i++) {
if (this.ships[i].alive) {
all_dead = false;
break;
}
}
return all_dead;
}
};
|
body {
background-color:#948664;
font-size:16px;
font-family:Georgia, "Times New Roman", Times, serif;
color:#F4ECD3;
text-shadow:-1px -1px 5px #000;
padding:0;
margin:0;
}
a {
color:#fbfcef;
}
a:visited {
color:#eed69b;
}
a:hover {
color:#d7bc7b;
}
a:active {
color:#eed69b;
}
h1 {
font-size:11px;
text-transform:uppercase;
background-color:#948664;
padding:5px 15px;
margin:0
}
h2 {
font-size:24px;
font-weight:normal;
padding:5px 10px;
margin:0;
color:#F4ECD3;
}
h3 {
font-size:16px;
font-weight:bold;
font-variant:small-caps;
padding:5px 10px;
margin:0;
}
h3 img {
border:1px solid #e3d9ac;
width:170px;
height:auto;
}
img.download {
vertical-align:middle;
}
#container {
width:900px;
margin-bottom:10px;
margin:0 auto;
background-color:#948664;
}
#banner {
background-color:#948664;
text-align:right;
padding:0px;
margin:0px;
}
#banner img {
padding:0px 0px;
}
#content {
background-color:#3a2514;
padding:0px;
margin:0 200px;
text-align:center;
}
#content_left {
float:left;
width:250px;
height:250px;
}
#content_left img{
padding-top:5px;
padding-bottom:5px;
}
#content_right {
float:right;
width:250px;
height:250px;
}
#content li {
text-align:left;
}
div#content {
min-height:1100px;
height:expression(this.scrollHeight > 1100 ?"auto":"1100px");
}
p, pre {
padding:5px 10px;
margin:0px;
}
#left {
float:left;
width:200px;
height:1100px;
background-image:url(../img/left.gif);
text-align:center;
}
#left_center {
margin-top:30px;
}
#right {
float:right;
width:200px;
height:1100px;
background-image:url(../img/right.gif);
text-align:center;
}
#right_center {
margin-top:55px;
margin-left:9px;
}
#footer {
clear:both;
margin:0;
padding:0;
text-align:right;
}
|
export * from './privacy.component';
|
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<!-- Place favicon.ico in the root directory -->
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
<script src="js/vendor/modernizr-2.8.3.min.js"></script>
<link href="css/bootstrap.min.css" rel="stylesheet" />
<!--<style>
* {
padding: 0;
margin: 0;
}
.fit { /* set relative picture size */
max-width: 100%;
max-height: 100%;
}
.center {
display: block;
margin: auto;
}
.content{
position: absolute;
top: 50%;
left: 50%;
}
</style>
</head>
<body>
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]
<!-- Add your site or application content here -->
<div class="container-fluid">
<div class="row">
<div class="col-lg-4 col-lg-offset-9">
<a href="#">Home</a>
<a href="#">How it works?</a>
<a href="#">About us</a>
</div>
</div>
<div class="row">
<div class="col-lg-12"> </div>
</div>
<div class="row">
<div class="col-lg-12">
<div style="background-color:lightblue; height:100px;">
<p class="text-center">Lorem Ipsum is simply dummy text of the printing and typesetting industry.</p>
</div>
</div>
</div>
<div class="row">
<div class="col-lg-12"> </div>
</div>
<div class="row">
<div class="col-lg-2 col-lg-offset-4">
<a class="btn btn-default" href="#" role="button">I'm a car park owner</a>
</div>
<div class="col-lg-2">
<a class="btn btn-default" href="Find.html" role="button">I'm looking for a car park</a>
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.11.3.min.js"><\/script>')</script>
<script src="js/plugins.js"></script>
<script src="js/main.js"></script>
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
<script>
(function(b,o,i,l,e,r){b.<API key>=l;b[l]||(b[l]=
function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
e=o.createElement(i);r=o.<API key>(i)[0];
e.src='https:
r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
ga('create','UA-XXXXX-X','auto');ga('send','pageview');
</script>
</body>
</html>
<script type="text/javascript" language="JavaScript">
function set_body_height() { // set body height = window height
$('body').height($(window).height());
}
$(document).ready(function () {
$(window).bind('resize', set_body_height);
set_body_height();
});
</script>
|
@charset "utf-8";
body {
color: #7d7d7d;
/*background: #f5f4f2;*/
font-size: .875rem;
line-height: 24px;
background: #eeede8;
}
h1, h2, h3, h4, h5, h6, ul, li, ol, p {
margin: 0;
padding: 0;
}
a {
color: #7d7d7d;
text-decoration: none;
cursor: pointer;
}
a:hover {
color: #54abd4;
}
h1, h2, h3, h4, h5, h6 {
color: #666;
/*font-weight: bold;*/
}
h4 {
margin: 0 0 10px 0;
}
li {
display: list-item;
text-align: -webkit-match-parent;
}
ul {
list-style-type: none;
margin: 0;
padding: 0;
}
p {
margin: 12px 0;
}
input[type="text"],
input[type="password"],
input[type="email"],
input[type="date"],
textarea {
height: 40px;
/*line-height: 40px;*/
padding: 6px 10px;
background: #f5f5f5;
border: 1px solid #f5f5f5;
border-radius: 2px;
box-shadow: none;
color: #777;
}
input:focus,
input:active,
input:hover,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
textarea:focus,
textarea:active,
textarea:hover {
background: #fff;
border: 1px solid #54abd4;
box-shadow: none;
transition: all .25s ease-in-out;
}
.tag-info {
display: inline-block;
margin: 0 4px 4px 0;
padding: 0 8px;
color: #fff;
background: #88C5E1;
border-radius: 4px;
}
.tag-info:hover {
color: #fff;
background: #54abd4;
text-decoration: none;
}
.tag-sm {
padding: 0 6px;
font-size: .75rem;
}
.f-12 {
font-size: .75rem;
}
.f-14 {
font-size: .875rem;
}
.f-16 {
font-size: 1rem;
}
.f-18 {
font-size: 1.125rem;
}
.f-weight{
font-weight: 600;
}
.f-hot{
color:#333;
}
.f-main {
color: #88C5E1;
}
.f-sub {
color: #f9ca5a;
}
.f-light {
color: #b5b5b5;
}
.f-orange{
color: #fbd16f;
}
.f-white {
color: #fff;
}
.f-user{
color: #54abd4;
}
.f-ln18{
line-height: 1.8em;
}
/*content*/
.content {
margin: 80px 0 0 0;
min-height: 720px;
}
/*section*/
.section {
margin: 0 0 20px 0;
padding: 40px 25px 30px 25px;
background-color: #FFFFFF;
-moz-border-radius: 1px 1px 1px 1px;
-<API key>: 1px 1px 1px 1px;
border-radius: 1px 1px 1px 1px;
box-shadow: 0 14px 10px -10px rgba(0,0,0,0.1);
}
.section h4 {
margin: 0 0 24px 0;
padding: 8px 16px;
border-left: 3px solid #88C5E1;
}
/*item*/
.item {
padding: 12px 0 20px 0;
}
.score img{
display: inline;
width: 12px;
}
.nav-hamburger {
height: 40px;
padding: 0 10px;
color: #fff;
border: 1px solid #fff;
border-radius: 2px;
font-size: 1.125rem;
line-height: 40px;
}
.nav-hamburger a {
display: block;
color: #fff;
}
.navbar{
padding: 12px 0;
background-color: #88c5e1;
border: none;
border-bottom: 5px solid #54abd4;
}
.navbar-nav > li > a {
font-size: 1rem;
color: #fff;
margin: 0 0 0 8px;
background: transparent;
padding: 10px;
}
.navbar-nav > .active > a{
background: none;
color: #fff;
border-bottom: 2px solid #fff;
}
.navbar-nav > li > a:hover{
color: #fff;
border-bottom: 2px solid #fff;
}
.navbar-brand-mc{
padding: 6px 0;
font-weight: 100;
}
.navbar-brand-mc img{
height: 40px;
display: inline-block;
margin-right: 3px;
}
.navbar-default .navbar-nav>.active>a,
.navbar-default .navbar-nav>.active>a:focus,
.navbar-default .navbar-nav>.active>a:hover{
background: transparent;
color: #fff;
}
.nav>li>a:focus, .nav>li>a:hover{
background: transparent;
}
.navbar-form-mc .input-group {
width: 100%;
}
#input-search {
border-radius: 2px;
}
.input-group-nav .input-group-btn:last-child > .btn,
.input-group-nav .input-group-btn:last-child > .btn-group {
z-index: 2;
margin-left: -42px;
}
.input-group-nav .input-group-btn .btn {
background: #f5f5f5;
border: 1px solid #f5f5f5;
border-radius: 2px;
color: #54abd4;
}
.navbar-toggle{
margin: 18px 10px 8px 10px;
}
.home .content{
margin: 60px 0 0 0;
}
.wrapper{
padding: 35px 0;
margin: 40px auto;
background: url(../images/homeImg.png);
background-size: cover;
}
.wrapper .form-control{
margin: 15px 0;
}
.wrapper .wrapper-intro{
text-align: center;
}
.wrapper .wrapper-intro img:first-child{
margin: -10px 0 20px 0;
}
.wrapper .wrapper-title{
margin: 7px 0;
font-size: 20px;
}
.wrapper .wrapper-slogan{
font-size: 16px;
}
.wrapper .log-or-sign{
padding-left: 20px;
}
.wrapper .log-or-sign a{
color: #fff;
}
.wrapper .checkbox{
color: #333;
}
.section h4 small {
margin-left: 8px;
}
.hot-course .item{
margin: 0 0 20px 0;
padding: 0 10px;
border: none;
}
.item-card{
background-color:#f5f5f5;
text-align: center;
padding: 52px 16px;
box-shadow: 0 1px 2px #ddd;
}
.card-icon {
display: inline-block;
width: 64px;
padding: 12px 0 4px 0;
}
.card-name {
display: block;
padding: 2px 0 16px 0;
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.score img{
width: 12px;
}
.nav-tabs {
border: none;
border-bottom: 2px solid transparent;
}
.nav-tabs>li.active>a,.log-or-sign .nav-tabs>li.active>a:focus,
.log-or-sign .nav-tabs>li.active>a:hover{
border: none;
border-bottom: 2px solid transparent;
}
.log-or-sign .nav-tabs>li>a,
.log-or-sign .nav-tabs>li>a:focus,
.log-or-sign .nav-tabs>li>a:hover{
border-bottom: 2px solid #fff;
}
.log-or-sign .nav-tabs>li.active>a:hover{
border-bottom: 2px solid #fff;
}
.log-or-sign .nav-tabs>li>a{
border: none;
border-bottom: 2px solid transparent;
}
.log-or-sign .nav-tabs{
/*border-bottom: 2px solid #eee;*/
}
.log-or-sign .nav-tabs li{
padding: 0 0 10px 0;
}
.log-or-sign .nav-tabs li a{
padding: 10px 0 3px 0;
margin-right: 15px;
font-size: 16px;
text-align: center;
}
.log-or-sign .nav-tabs li.active a{
color: #fff;
background-color: transparent;
border-bottom: 2px solid #fff;
}
.tab-info {
display: none;
padding: 12px 12px;
color: #fff;
background: #88c5e1;
border-radius: 2px;
}
.tag-section {
padding: 0 0 18px 0;
}
.tag-section h5 {
padding: 8px 0 12px 0;
}
.thumbnail {
padding: 0;
background-color: #f5f5f5;
border: none;
box-shadow: 1px 1px 2px #ddd;
}
.carousel-inner .thumbnail .caption{
margin: 8px 0 20px 0;
color: #999;
font-size: 1rem;
text-align: center;
}
.carousel-indicators{
bottom: -10px;
}
.carousel-indicators li{
width: 13px;
height: 13px;
}
.carousel-indicators .active{
width: 15px;
height: 15px;
}
.caption p{
margin-bottom: 20px;
}
.carousel-indicators li{
border: 1px solid #f8c038;
}
.carousel-indicators .active{
background-color: #f8c038;
}
@media screen and (max-width: 768px){
.wrapper .log-or-sign{
border-left: none;
margin-left: 0px;
padding-left: 15px;
padding-top: 20px;
}
.wrapper-intro img{
display:none;
}
}
@media (min-width: 992px){
.wrapper {
padding: 96px 0;
}
}
/*footer*/
footer {
padding: 28px 0 18px 0;
background: #eeece1;
}
.footer-icon {
width: 10%;
}
.footer-seg {
width: 88%;
padding: 0 0 12px 0;
}
.footer-seg h5 {
padding: 3px 0 7px 0;
font-size: .875rem;
}
.footer-seg p {
margin: 0;
padding: 0;
font-size: .75rem;
line-height: 1.125rem;
}
.footer-info {
font-size: .75rem;
text-align: center;
line-height: 1.125rem;
}
.footer-info p {
margin: 0;
padding: 0;
}
|
.highlight {
padding: 1px 3px;
font-weight: bold;
background-color: #fff34d;
-moz-border-radius: 6px;
-<API key>: 6px;
border-radius: 6px;
-moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
-webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}
|
package org.hibernate.test.annotations.cascade;
import java.util.HashSet;
import org.junit.Test;
import org.hibernate.HibernateException;
import org.hibernate.Session;
import org.hibernate.Transaction;
import org.hibernate.testing.junit4.<API key>;
import static org.junit.Assert.fail;
/**
* @author Jeff Schnitzer
* @author Gail Badner
*/
@SuppressWarnings("unchecked")
public class <API key> extends <API key> {
@Test
public void <API key>() throws Exception {
Session s = openSession();
Transaction tx = s.beginTransaction();
Parent p = new Parent();
p.setChildren( new HashSet<Child>() );
Child ch = new Child(p);
p.getChildren().add(ch);
p.setDefaultChild(ch);
try {
s.persist(p);
s.flush();
fail( "should have failed because of transient entities have non-nullable, circular dependency." );
}
catch ( HibernateException ex) {
// expected
}
tx.rollback();
s.close();
}
@Override
protected Class[] getAnnotatedClasses() {
return new Class[]{
Child.class,
Parent.class
};
}
}
|
System.config({
baseURL: ".",
defaultJSExtensions: true,
transpiler: "babel",
babelOptions: {
"optional": [
"runtime",
"optimisation.modules.system"
]
},
paths: {
|
// languages index
var localeIndex = {
"en" : 0,
"ja" : 1,
"es" : 2,
"hu" : 3,
"lt" : 4,
"ru" : 5,
"it" : 6,
"pt" : 7,
"sp_ch" : 8,
"fr" : 9,
"ge" : 10,
"ua" : 11,
"lv" : 12,
"no" : 13,
"pt_br" : 14
};
|
<?php
function includeIfExists($file)
{
return file_exists($file) ? include $file : false;
}
if ((!$loader = includeIfExists(__DIR__.'/../vendor/autoload.php')) && (!$loader = includeIfExists(__DIR__.'/../../../autoload.php'))) {
echo "Cannot find an autoload.php file, have you executed composer install command?" . PHP_EOL;
exit(1);
}
return $loader;
|
<html><body>
<h4>Windows 10 x64 (18363.836)</h4><br>
<h2>_LUID</h2>
<font face="arial"> +0x000 LowPart : Uint4B<br>
+0x004 HighPart : Int4B<br>
</font></body></html>
|
#ifndef _IRC_COMM_H_
#define _IRC_COMM_H_
#include "utility_sys.h" /* useful macros, definitions and libraries */
#define NO_FLAGS 0 /* used for functions where no flag argument is used. */
/* Server connectivity information */
#define _COM_SERV_ADDR "10.200.248.135"
#define _COM_SERV_LEN sizeof(_COM_SERV_ADDR)
#define _COM_SERV_PORT 50059 /* port listening on server */
#define _COM_NET_DOMAIN AF_INET /* network domain we are using. IPV4 */
#define _COM_SOCK_TYPE SOCK_STREAM /* tcp socket */
#define _COM_IP_PROTOCOL 0 /* Default for type in socket() */
#define _COM_IO_BUFF 512 /* max bytes that can be sent/recieved */
#define _NAME_SIZE_MAX 11 /* includes '\0' */
#define MSG_TYPE_SIZE 1
#define RC_FA 0x1
#define RC_FL 0x2
#define RC_JOIN 0x7
#define RC_EXIT 0x8
#define RC_LOGOUT 0xA
#define RC_RL 0xC
#define RC_FR 0x10
#define RC_LOGON 0x11
#define RC_LEAVE 0x15
#define RC_MSG 0x16
#define RC_RUL 0x17 /* list users in a room */
#define RESERVED_Z 0x0 /* was useful to reserve for error checking */
#define RESERVE_CR 0x13 /* reserved since we use \r in messages */
/* server to client reply success/failure */
#define _REPLY_SUCCESS 1
#define _REPLY_FAILURE 0
/* length of the reply to logon. */
#define _LOGON_REPLY_SIZE 3
typedef struct server_info {
in_addr_t addr; /* network binary of server address */
char *dot_addr; /* dotted representation of IP address */
in_port_t port; /* port used at IP address, network ordered */
int domain; /* AF_INET or AF_INET6 */
int sock_type; /* type of socket, socket() definition. */
int pcol; /* Protocol argument used in socket() */
int sockfd; /* socket file descriptior */
struct sockaddr_in *socket_info; /* socket API struct, IPV4 */
} struct_serv_info;
typedef struct parsed_cli_message {
char *cli_name;
int type;
char *msg;
} struct_cli_message;
typedef struct parsed_serv_message {
uint8_t type;
char *msg;
} struct_serv_message;
struct_serv_info* _com_init_serv_info(void);
void _com_free_serv_info(struct_serv_info *dest);
void <API key>(struct_cli_message *rem);
void <API key>(struct_serv_message *rem);
static inline ssize_t socket_transmit(int sockfd, uint8_t *tx,
size_t len, int flags)
{
ssize_t sent; /* number of bytes written to socket */
size_t remaining = len; /* number of bytes left to write */
sent = send(sockfd, tx, remaining, flags);
if (_usrUnlikely(sent == FAILURE)) {
err_msg("socket_transmit: send() failed");
return FAILURE;
}
/* in case there was something not written, try again */
remaining -= sent;
tx += sent;
return (len - remaining);
} /* end socket_transmit */
static inline ssize_t socket_receive(int sockfd, uint8_t *rx,
size_t len, int flags)
{
ssize_t received = 1; /* bytes read from a socket, non-EOF init */
size_t remaining = len; /* bytes still in buffer */
received = recv(sockfd, rx, remaining, flags);
if (received == FAILURE) {
err_msg("socket_recieve: recv() failed");
return FAILURE;
}
remaining -= received;
rx += received;
return (len - remaining);
} /* end socket_recieve */
#endif
|
# Scala Documentation
* [Command Line Input](command-line-input/command-line-input.md)
* [String](string/string.md)
* [Array](array/array.md)
* [List](list/list.md)
* [Vector](vector/vector.md)
* [Iterator](iterator/iterator.md)
* [HashMap](hashmap/hashmap.md)
* [Math](math/math.md)
|
define(['exports'], function (exports) {
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var globalExtraOptions = exports.globalExtraOptions = {
<API key>: {
class: 'class',
content: 'content',
disabled: 'disabled',
divider: 'divider',
groupLabel: 'group',
groupDisabled: 'disabled',
icon: 'icon',
maxOptions: 'maxOptions',
option: 'option',
subtext: 'subtext',
style: 'style',
title: 'title',
tokens: 'tokens'
}
};
var globalPickerOptions = exports.globalPickerOptions = {
dropupAuto: true,
showTick: true,
width: 'auto'
};
});
|
#ifndef <API key>
#define <API key>
/*!\brief Auxiliary class template for the data members of the Subvector class.
// \ingroup subvector
//
// The auxiliary SubvectorData class template represents an abstraction of the data members of
// the Subvector class template. The necessary set of data members is selected depending on the
// number of compile time subvector arguments.
*/
template< size_t... CSAs > // Compile time subvector arguments
class SubvectorData
{};
/*! \cond BLAZE_INTERNAL */
/*!\brief Specialization of the SubvectorData class template for zero compile time subvector
// arguments.
// \ingroup subvector
//
// This specialization of SubvectorData adapts the class template to the requirements of zero
// compile time subvector arguments.
*/
template<>
class SubvectorData<>
{
public:
static constexpr bool compileTimeArgs = false;
/*!\name Constructors */
/*!\name Destructor */
/*!\name Assignment operators */
/*!\name Utility functions */
/*!\name Member variables */
/*! \endcond */
/*! \cond BLAZE_INTERNAL */
/*!\brief The constructor for SubvectorData.
//
// \param index The offset of the subvector within the given vector.
// \param n The size of the subvector.
// \param args The optional subvector arguments.
*/
template< typename... RSAs > // Optional subvector arguments
inline SubvectorData<>::SubvectorData( size_t index, size_t n, RSAs... args )
: offset_( index ) // The offset of the subvector within the vector
, size_ ( n ) // The size of the subvector
{
MAYBE_UNUSED( args... );
}
/*! \endcond */
/*! \cond BLAZE_INTERNAL */
/*!\brief Returns the offset of the subvector within the underlying vector.
//
// \return The offset of the subvector.
*/
inline size_t SubvectorData<>::offset() const noexcept
{
return offset_;
}
/*! \endcond */
/*! \cond BLAZE_INTERNAL */
/*!\brief Returns the current size/dimension of the subvector.
//
// \return The size of the subvector.
*/
inline size_t SubvectorData<>::size() const noexcept
{
return size_;
}
/*! \endcond */
/*! \cond BLAZE_INTERNAL */
/*!\brief Specialization of the SubvectorData class template for two compile time subvector
// arguments.
// \ingroup subvector
//
// This specialization of SubvectorData adapts the class template to the requirements of two
// compile time arguments.
*/
template< size_t I // Index of the first element
, size_t N > // Number of elements
class SubvectorData<I,N>
{
public:
static constexpr bool compileTimeArgs = true;
/*!\name Constructors */
/*!\name Destructor */
/*!\name Assignment operators */
/*!\name Utility functions */
/*! \endcond */
/*! \cond BLAZE_INTERNAL */
/*!\brief The constructor for SubvectorData.
//
// \param args The optional subvector arguments.
*/
template< size_t I // Index of the first element
, size_t N > // Number of elements
template< typename... RSAs > // Optional subvector arguments
inline SubvectorData<I,N>::SubvectorData( RSAs... args )
{
MAYBE_UNUSED( args... );
}
/*! \endcond */
/*! \cond BLAZE_INTERNAL */
/*!\brief Returns the offset of the subvector within the underlying vector.
//
// \return The offset of the subvector.
*/
template< size_t I // Index of the first element
, size_t N > // Number of elements
constexpr size_t SubvectorData<I,N>::offset() noexcept
{
return I;
}
/*! \endcond */
/*! \cond BLAZE_INTERNAL */
/*!\brief Returns the current size/dimension of the subvector.
//
// \return The size of the subvector.
*/
template< size_t I // Index of the first element
, size_t N > // Number of elements
constexpr size_t SubvectorData<I,N>::size() noexcept
{
return N;
}
/*! \endcond */
|
# <API key>: true
require 'sunrise/config/base'
require 'sunrise/config/has_fields'
module Sunrise
module Config
class Form < Base
include Sunrise::Config::HasFields
include Sunrise::Config::HasGroups
# List of permissible attributes
<API key> :permited_attributes do
:all
end
end
end
end
|
"""
Given a string that contains only digits 0-9 and a target value, return all possibilities to add binary operators (not
unary) +, -, or * between the digits so they evaluate to the target value.
Examples:
"123", 6 -> ["1+2+3", "1*2*3"]
"232", 8 -> ["2*3+2", "2+3*2"]
"105", 5 -> ["1*0+5","10-5"]
"00", 0 -> ["0+0", "0-0", "0*0"]
"3456237490", 9191 -> []
"""
__author__ = 'Daniel'
class Solution(object):
def addOperators(self, num, target):
ret = []
self.dfs(num, target, 0, "", 0, 0, ret)
return ret
def dfs(self, num, target, pos, cur_str, cur_val, mul, ret):
if pos >= len(num):
if cur_val == target:
ret.append(cur_str)
else:
for i in xrange(pos, len(num)):
if i != pos and num[pos] == "0":
continue
nxt_val = int(num[pos:i+1])
if not cur_str:
self.dfs(num, target, i+1, "%d"%nxt_val, nxt_val, nxt_val, ret)
else:
self.dfs(num, target, i+1, cur_str+"+%d"%nxt_val, cur_val+nxt_val, nxt_val, ret)
self.dfs(num, target, i+1, cur_str+"-%d"%nxt_val, cur_val-nxt_val, -nxt_val, ret)
self.dfs(num, target, i+1, cur_str+"*%d"%nxt_val, cur_val-mul+mul*nxt_val, mul*nxt_val, ret)
if __name__ == "__main__":
assert Solution().addOperators("232", 8) == ["2+3*2", "2*3+2"]
|
package softuni.io;
import org.springframework.stereotype.Component;
import java.io.*;
@Component
public class FileParser {
public String readFile(String path) throws IOException {
StringBuilder stringBuilder = new StringBuilder();
try (InputStream is = this.getClass().getResourceAsStream(path);
BufferedReader bfr = new BufferedReader(new InputStreamReader(is))) {
String line = bfr.readLine();
while (line != null) {
stringBuilder.append(line);
line = bfr.readLine();
}
}
return stringBuilder.toString();
}
public void writeFile(String path, String content) throws IOException {
File file = new File(System.getProperty("user.dir") + File.separator + path);
if (!file.exists()) {
file.createNewFile();
}
try (OutputStream os = new FileOutputStream(System.getProperty("user.dir")+ File.separator + path);
BufferedWriter bfw = new BufferedWriter(new OutputStreamWriter(os))) {
bfw.write(content);
}
}
}
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>bignums: 2 m 35 s </title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.css" rel="stylesheet">
<link href="../../../../../bootstrap-custom.css" rel="stylesheet">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">
<script src="../../../../../moment.min.js"></script>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]
</head>
<body>
<div class="container">
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li><a href="../..">clean / released</a></li>
<li class="active"><a href="">8.14.0 / bignums - 8.14.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
bignums
<small>
8.14.0
<span class="label label-success">2 m 35 s </span>
</small>
</h1>
<p> <em><script>document.write(moment("2022-01-22 01:07:46 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-01-22 01:07:46 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-threads base
base-unix base
conf-findutils 1 Virtual package relying on findutils
conf-gmp 4 Virtual package relying on a GMP lib system installation
coq 8.14.0 Formal proof management system
dune 2.9.1 Fast, portable, and opinionated build system
ocaml 4.12.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.12.1 Official release 4.12.1
ocaml-config 2 OCaml Switch Configuration
<API key> 1 Ensure that OCaml is compiled with no special options enabled
ocamlfind 1.9.1 A library manager for OCaml
zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers
# opam file:
opam-version: "2.0"
maintainer: "Laurent.Thery@inria.fr"
homepage: "https://github.com/coq/bignums"
dev-repo: "git+https://github.com/coq/bignums.git"
bug-reports: "https://github.com/coq/bignums/issues"
license: "LGPL-2.1-only"
synopsis: "Bignums, the Coq library of arbitrary large numbers"
description: """
Provides BigN, BigZ, BigQ that used to be part of Coq standard library < 8.6
"""
build: [make "-j%{jobs}%" {ocaml:version >= "4.06"}]
install: [make "install"]
depends: [
"ocaml" {>= "4.05"}
"coq" {>= "8.14" & < "8.15~"}
]
tags: [
"category:Miscellaneous/Coq Extensions"
"category:Mathematics/Arithmetic and Number Theory/Number theory"
"category:Mathematics/Arithmetic and Number Theory/Rational numbers"
"keyword:integer numbers"
"keyword:rational numbers"
"keyword:arithmetic"
"keyword:arbitrary-precision"
"logpath:Bignums"
"date:2021-09-17"
]
authors: [
"Laurent Théry"
"Benjamin Grégoire"
"Arnaud Spiwack"
"Evgeny Makarov"
"Pierre Letouzey"
]
url {
src: "https://github.com/coq/bignums/archive/V8.14.0.tar.gz"
checksum: "sha512=72be63a6be2600026ee4f5f24ea3479ff4c5d3f2a67ab65ec96ede56fbc35380ef6c721ad467c1b6d39f1447c28fe594fa5570d4228f1a05c6386b2b9955f2bc"
}
</pre>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Dry install </h2>
<p>Dry install with the current Coq version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --show-action coq-bignums.8.14.0 coq.8.14.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>true</code></dd>
<dt>Return code</dt>
<dd>0</dd>
</dl>
<h2>Install dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam list; echo; ulimit -Sv 4000000; timeout 4h opam install -y --deps-only coq-bignums.8.14.0 coq.8.14.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>12 s</dd>
</dl>
<h2>Install </h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam list; echo; ulimit -Sv 16000000; timeout 4h opam install -y -v coq-bignums.8.14.0 coq.8.14.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>2 m 35 s</dd>
</dl>
<h2>Installation size</h2>
<p>Total: 8 M</p>
<ul>
<li>935 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/BigN/BigN.vo</code></li>
<li>562 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleDiv.glob</code></li>
<li>543 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/BigZ/BigZ.vo</code></li>
<li>493 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/BigN/NMake.vo</code></li>
<li>344 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleSqrt.glob</code></li>
<li>290 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleCyclic.vo</code></li>
<li>277 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/BigN/NMake.glob</code></li>
<li>264 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleDiv.vo</code></li>
<li>258 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/BigQ/QMake.vo</code></li>
<li>246 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/BigN/NMake_gen.vo</code></li>
<li>209 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/BigN/NMake_gen.glob</code></li>
<li>204 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleDivn1.glob</code></li>
<li>201 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleCyclic.glob</code></li>
<li>197 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleSqrt.vo</code></li>
<li>187 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleMul.glob</code></li>
<li>176 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/SpecViaZ/ZSigZAxioms.vo</code></li>
<li>168 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/SpecViaZ/NSigNAxioms.vo</code></li>
<li>167 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/BigQ/BigQ.vo</code></li>
<li>154 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleLift.glob</code></li>
<li>151 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/BigQ/QMake.glob</code></li>
<li>149 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/BigZ/ZMake.vo</code></li>
<li>127 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/SpecViaQ/QSig.vo</code></li>
<li>123 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleMul.vo</code></li>
<li>122 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/BigZ/ZMake.glob</code></li>
<li>108 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleDivn1.vo</code></li>
<li>98 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleLift.vo</code></li>
<li>89 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleSub.glob</code></li>
<li>79 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/BigN/Nbasic.vo</code></li>
<li>77 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleBase.glob</code></li>
<li>75 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/BigN/Nbasic.glob</code></li>
<li>74 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleAdd.glob</code></li>
<li>67 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/BigNumPrelude.vo</code></li>
<li>66 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleSub.vo</code></li>
<li>66 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/SpecViaZ/NSigNAxioms.glob</code></li>
<li>66 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/SpecViaZ/ZSigZAxioms.glob</code></li>
<li>64 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/BigNumPrelude.glob</code></li>
<li>64 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleBase.vo</code></li>
<li>58 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/plugin/<API key>.cmxs</code></li>
<li>57 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleAdd.vo</code></li>
<li>55 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleDiv.v</code></li>
<li>54 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/SpecViaZ/ZSig.vo</code></li>
<li>52 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/BigN/NMake.v</code></li>
<li>50 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/SpecViaZ/NSig.vo</code></li>
<li>44 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleSqrt.v</code></li>
<li>40 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/SpecViaQ/QSig.glob</code></li>
<li>37 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/SpecViaZ/ZSig.glob</code></li>
<li>35 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/BigQ/QMake.v</code></li>
<li>33 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/SpecViaZ/NSig.glob</code></li>
<li>33 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/BigN/NMake_gen.v</code></li>
<li>28 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleCyclic.v</code></li>
<li>24 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleMul.v</code></li>
<li>22 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/BigZ/ZMake.v</code></li>
<li>20 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleDivn1.v</code></li>
<li>19 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleLift.v</code></li>
<li>16 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/BigZ/BigZ.glob</code></li>
<li>16 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/BigN/Nbasic.v</code></li>
<li>14 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/BigN/BigN.glob</code></li>
<li>13 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleBase.v</code></li>
<li>13 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/BigQ/BigQ.glob</code></li>
<li>13 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleSub.v</code></li>
<li>12 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/SpecViaZ/ZSigZAxioms.v</code></li>
<li>11 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/SpecViaZ/NSigNAxioms.v</code></li>
<li>11 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/CyclicDouble/DoubleAdd.v</code></li>
<li>11 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/BigNumPrelude.v</code></li>
<li>10 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/plugin/<API key>.cmi</code></li>
<li>9 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/plugin/<API key>.cmx</code></li>
<li>7 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/SpecViaQ/QSig.v</code></li>
<li>6 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/BigZ/BigZ.v</code></li>
<li>6 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/BigN/BigN.v</code></li>
<li>5 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/BigQ/BigQ.v</code></li>
<li>5 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/SpecViaZ/ZSig.v</code></li>
<li>5 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/plugin/<API key>.cmxa</code></li>
<li>5 K <code>../ocaml-base-compiler.4.12.1/lib/coq/user-contrib/Bignums/SpecViaZ/NSig.v</code></li>
</ul>
<h2>Uninstall 🧹</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam remove -y coq-bignums.8.14.0</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Missing removes</dt>
<dd>
none
</dd>
<dt>Wrong removes</dt>
<dd>
none
</dd>
</dl>
</div>
</div>
</div>
<hr/>
<div class="footer">
<p class="text-center">
Sources are on <a href="https:
</p>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="../../../../../bootstrap.min.js"></script>
</body>
</html>
|
{
test.ok(
thrown instanceof axios.Cancel,
"Promise must be rejected with a Cancel obejct"
);
test.equal(thrown.message, "Operation has been canceled.");
test.done();
}
|
using System;
namespace EasyNetQ
{
public class EasyNetQException : Exception
{
public EasyNetQException() {}
public EasyNetQException(string message) : base(message) {}
public EasyNetQException(string format, params string[] args) : base(string.Format(format, args)) {}
public EasyNetQException(string message, Exception inner) : base(message, inner) {}
}
public class <API key> : EasyNetQException
{
public <API key>() { }
public <API key>(string message) : base(message) { }
public <API key>(string format, params string[] args) : base(format, args) { }
public <API key>(string message, Exception inner) : base(message, inner) { }
}
}
|
function closeObject(id) {
document.getElementById(id).style.display = 'none';
}
function openObject(id) {
document.getElementById(id).style.display = 'block';
}
function openClose(id){
if (document.getElementById(id).style.display == 'block'){
console.log('intenta cerrar');
closeObject(id);
}else{
console.log('intenta abrir');
openObject(id);
}
}
$(document).ready(function () {
$('#datetimepicker1').datetimepicker({
format: 'DD/MM/YYYY HH:mm'
});
$(".<API key>").on("click", function () {
$.ajax({
type: 'POST',
data: { id: $(this).attr("data-id") },
url: Routing.generate('<API key>',null,true),
context: document.body
})
.done(function (datos) {
if(datos.estado) {
$('#tituloPopUp').html('Rectificar Evento');
$("#contenidoPopUp").html(datos.vista);
$('.modal-dialog').removeClass('modal-lg');
$('#piePopUp').addClass('show');
$('#ventanaPopUp').modal('show');
}
});
});
$("#botonGuardarPopUp").on("click", function () {
var datosFormulario = $("#<API key>").serializeArray();
var urlFormulario = Routing.generate('<API key>',null,true);
$.ajax(
{
url : urlFormulario,
type: "POST",
data : datosFormulario,
success: function(datos)
{
if(datos.estado){
if(datos.rectificado){
$('#ventanaPopUp').modal('hide');
$( location ).attr("href", Routing.generate('eventos',null,true));
} else {
$("#contenidoPopUp").html(datos.html);
}
}
},
error: function() {
alert('error');
}
});
return false;
});
// Visualizar detalles
$('.<API key>').on('click',function(){
$.ajax({
type: 'GET',
url: Routing.generate('eventos_detalle',{ id: $(this).attr('data-id') },true),
context: document.body
})
.done(function (html) {
$('#tituloPopUp').html('Detalle eventos');
$("#contenidoPopUp").html(html);
$('.modal-dialog').addClass('modal-lg');
$('#piePopUp').addClass('hide');
$('#piePopUp').removeClass('show');
$('#ventanaPopUp').modal('show');
});
});
//Agregar nuevo detalle
$('#ventanaPopUp').on("click",'#botonAgregarDetalle',function(){
var datosFormulario = $("#<API key>").serializeArray();
var urlFormulario = Routing.generate('<API key>',null,true);
$.ajax(
{
url : urlFormulario,
type: "POST",
data : datosFormulario,
success: function(datos)
{
$("#contenidoPopUp").html(datos.html);
}
});
return false;
});
$('#ventanaPopUp').on('mouseover','#dp-detalle',function(){
$('#dp-detalle').datetimepicker({
format: 'DD/MM/YYYY HH:mm'
});
});
$('#ventanaPopUp').on('mouseover','#dp-rectificar',function(){
$('#dp-rectificar').datetimepicker({
format: 'DD/MM/YYYY HH:mm'
});
});
$(".estado-switch").bootstrapSwitch();
$('#<API key>').on('click',function(){
if(! $('#<API key>').hasClass('active')) {
$(':input','#formularioBusqueda')
.not(':button, :submit, :reset, :hidden')
.val('')
.removeAttr('checked')
.removeAttr('selected');
$('#formularioBusqueda').append('<input type="hidden" name="seccion" value="registro" />');
$('#formularioBusqueda').submit();
}
// $('#<API key>').removeClass('active');
// $(this).addClass('active');
// $('#<API key>').removeClass('hide');
// $('#<API key>').addClass('show');
// $('#<API key>').removeClass('show');
// $('#<API key>').addClass('hide');
});
$('#<API key>').on('click',function(){
$('#<API key>').removeClass('active');
$(this).addClass('active');
$('#<API key>').removeClass('hide');
$('#<API key>').addClass('show');
$('#<API key>').removeClass('show');
$('#<API key>').addClass('hide');
});
$('#dtp-fecha-desde').datetimepicker({
format: 'DD/MM/YYYY HH:mm'
});
$('#dtp-fecha-hasta').datetimepicker({
format: 'DD/MM/YYYY HH:mm'
});
});
|
import {Component, OnInit, ElementRef,} from '@angular/core';
import {FileSelect} from './file.select';
import {NgIf} from '@angular/common';
import {NgForm} from '@angular/common';
import {CostImport, CostImportService} from '../../../services/cost-import-service';
import {FourcastService} from '../../../services/fourcast-service';
import {FileUploader} from './file-uploader';
import {FileItem} from './file-uploader';
const TEMPLATE: string = require('./simple.import.setup.html');
const URL = 'http://127.0.0.1:8081/rest/$upload';
@Component({
selector: 'simple-demo',
template: TEMPLATE,
directives: [FileSelect],
styles: [`
.active {
background-color: red;
}
.disabled {
color: gray;
border: medium solid gray;
}
`],
providers: [FileUploader, CostImportService, FourcastService]
})
export class <API key> implements OnInit {
isOn = true;
isDisabled = false;
importId: string;
private _file: File;
public isUploaded: boolean = false;
constructor( uploader: FileUploader, public importService: CostImportService){}
public isFileSelected: boolean = false;
typeNames = CostImport.typeNames;
model: CostImport = new CostImport();
ngOnInit(){
this.model.division = ''
}
onFileSelected(event){
console.log('File selected', event);
this._file = event['file'];
this.isFileSelected = true
this.model.importFileName = this._file.name;
//console.log('File selected 2: ', this.model.importFileName)
}
updateCostImport(fileId:string){
console.log('FileId (update): ', fileId)
this.importService.updateCostImportHdr(this.model, fileId)
.subscribe((res) =>{
var temp = JSON.stringify(res);
console.log("Update cost import header result: ",res);
this.importId = res['id'];
this.isUploaded = true;
//console.log('File content: ', text);
});
}
processCostImport(importId:string){
}
onImportFileClicked(){
console.log("Button clicked");
let uploader = new FileUploader();
uploader.uploadFile(this._file);
uploader.emitter.subscribe((data) => {
console.log("Upload event: ", data);
let response = JSON.parse(data['response']);
let fileId = response['ID'];
console.log('FileId (clicked): ', fileId)
this.updateCostImport(fileId);
});
//this.uploadFile(this._file);
}
onImportTypeChange(event){
this.model.isSupplierInvoices = false;
this.model.isPayrollWeekly = false;
this.model.isPayrollMonthly = false;
switch (true){
case event.target[0].selected:
this.model.isSupplierInvoices = true;
break;
case event.target[1].selected:
this.model.isPayrollWeekly = true;
break;
case event.target[2].selected:
this.model.isPayrollMonthly = true;
break;
}
}
testUpdate(){
let url:string = "http://127.0.0.1:8081/processImport";
let xhr=new XMLHttpRequest();
let formdata=new FormData();
formdata.append('ID',this.importId);
xhr.addEventListener("load", function (evt) {
let responseStr = evt.currentTarget['response'];
let res = JSON.parse(responseStr);
let id = res['ID'];
console.log("Response: ", res['ID']);
nextStep(id);
})
xhr.open('POST', url, true);
xhr.send(formdata);
function nextStep(id: string){
let url:string = "http://127.0.0.1:8081/processData";
let xhr=new XMLHttpRequest();
let formdata=new FormData();
formdata.append('ID',id);
xhr.addEventListener("load", function (evt) {
console.log(evt);
})
xhr.open('POST', url, true);
xhr.send(formdata);
}
}
}
|
#include <iostream>
#include <string>
#include<iomanip>
using namespace std;
int main()
{
string a;
double h,m,x;
while(cin>>a)
{
if(a=="0:00")break;
if(a[1]==':')
{
h=a[0]-'0';
m=(a[2]-'0')*10+(a[3]-'0');
}
else if(a[2]==':')
{
h=(a[0]-'0')*10+(a[1]-'0');
m=(a[3]-'0')*10+(a[4]-'0');
}
x=30*h+m/2-6*m;
if(x<0)
{
x=-x;
}
if(x>180)
{
x=360-x;
}
cout<<fixed<<setprecision(3)<<x<<endl;
}
}
|
<?php
namespace HealthCareAbroad\LogBundle\Repository;
use Doctrine\ORM\EntityRepository;
/**
* ErrorLogRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class ErrorLogRepository extends EntityRepository
{
}
|
# SilkSlider
[:
sh
gem install SilkSlider
Also required is the [SignalP](http:
## Usage
To run the program:
sh
silk_slider my.fasta
The program outputs a FASTA file of all silk-like proteins.
To see the help:
sh
silk_slider -h
## Project home page
Information on the source tree, documentation, examples, issues and
how to contribute, see
http://github.com/wwood/SilkSlider
## Cite
Currently unpublished - a journal article is in preparation.
## Biogems.info
This Biogem is published at (http://biogems.info/index.html#SilkSlider)
Copyright (c) 2014 Carmel McDougall, Ben Woodcroft, and Bernard Degnan. See LICENSE.txt for further details.
|
<?php
namespace Mopa\Bundle\BootstrapBundle\Menu\Factory;
use Knp\Menu\Factory\ExtensionInterface;
use Knp\Menu\ItemInterface;
/**
* Extension for integrating Bootstrap Menus into KnpMenu.
*/
class MenuExtension implements ExtensionInterface
{
/**
* Builds a menu item based.
*
* @param ItemInterface $item
* @param array $options
*/
public function buildItem(ItemInterface $item, array $options)
{
if ($options['navbar']) {
$item-><API key>('class', 'nav navbar-nav');
}
if ($options['pills']) {
$item-><API key>('class', 'nav nav-pills');
}
if ($options['stacked']) {
$class = $item-><API key>('class');
$item-><API key>('class', $class . ' nav-stacked');
}
if ($options['dropdown-header']) {
$item
->setAttribute('role', 'presentation')
->setAttribute('class', 'dropdown-header')
->setUri(null);
}
if ($options['list-group']) {
$item-><API key>('class', 'list-group');
$item->setAttribute('class', 'list-group-item');
}
if ($options['list-group-item']) {
$item->setAttribute('class', 'list-group-item');
}
if ($options['dropdown']) {
$item
->setUri('
->setAttribute('class', 'dropdown')
->setLinkAttribute('class', 'dropdown-toggle')
->setLinkAttribute('data-toggle', 'dropdown')
-><API key>('class', 'dropdown-menu')
-><API key>('role', 'menu');
if ($options['caret']) {
$item->setExtra('caret', 'true');
}
}
if ($options['divider']) {
$item
->setLabel('')
->setUri(null)
->setAttribute('role', 'presentation')
->setAttribute('class', 'divider');
}
if ($options['pull-right']) {
$className = $options['navbar'] ? 'navbar-right' : 'pull-right';
$class = $item-><API key>('class', '');
$item-><API key>('class', $class . ' ' . $className);
}
if ($options['icon']) {
$item->setExtra('icon', $options['icon']);
}
}
/**
* Builds the options for extension.
*
* @param array $options
*
* @return array $options
*/
public function buildOptions(array $options)
{
return array_merge(array(
'navbar' => false,
'pills' => false,
'stacked' => false,
'dropdown-header' => false,
'dropdown' => false,
'list-group' => false,
'list-group-item' => false,
'caret' => false,
'pull-right' => false,
'icon' => false,
'divider' => false,
), $options);
}
}
|
<?php
require_once "class_db.php";
class qly_pages extends db{
public function LayTieuDeKD($idPa){
$sql="SELECT TieuDeKD FROM mk_pages WHERE idPa = '$idPa'";
$kq = mysql_query($sql,$this->conn);
$row_trang = mysql_fetch_assoc($kq);
return $row_trang['TieuDeKD'];
}
public function LayTieuDe($idPa){
$sql="SELECT TieuDe FROM mk_pages WHERE idPa = '$idPa'";
$kq = mysql_query($sql,$this->conn);
$row_trang = mysql_fetch_assoc($kq);
return $row_trang['TieuDe'];
}
public function LayID($TieuDeKD){
$sql="SELECT idPa FROM mk_pages WHERE TieuDeKD = '$TieuDeKD'
";
$kq = mysql_query($sql,$this->conn);
$row_trang = mysql_fetch_assoc($kq);
return $row_trang['idPa'];
}
public function LayIDGroup($idPa){
$sql="SELECT idGroup FROM mk_pages WHERE idPa = '$idPa'
";
$kq = mysql_query($sql,$this->conn);
$row_trang = mysql_fetch_assoc($kq);
return $row_trang['idGroup'];
}
public function LayParent($idPa){
$sql="SELECT Parent FROM mk_pages WHERE idPa = '$idPa'
";
$kq = mysql_query($sql,$this->conn);
$row_trang = mysql_fetch_assoc($kq);
return $row_trang['Parent'];
}
public function LayNoiDung($idPa){
$sql="SELECT NoiDung FROM mk_pages WHERE idPa = '$idPa'
";
$kq = mysql_query($sql,$this->conn);
$row_trang = mysql_fetch_assoc($kq);
return $row_trang['NoiDung'];
}
public function Pages($idPa){
$sql="SELECT *
FROM mk_pages
WHERE idPa = $idPa";
$kq = mysql_query($sql,$this->conn);
return $kq;
}
public function ListCauHoi(){
$sql="SELECT TomTat, NoiDung
FROM mk_pages
WHERE AnHien = 1 and idGroup = 2
ORDER BY idPa
";
$kq = mysql_query($sql,$this->conn) or die(mysql_error());
return $kq;
}
public function DanhChoKhachHang($parent){
$sql="SELECT *
FROM mk_pages
WHERE Parent = $parent and AnHien = 1
Order By ThuTu ASC, idLoai DESC
";
$kq = mysql_query($sql,$this->conn);
return $sql;
}
public function ListPagesParent($idGroup, &$totalRows, $pageNum=1, $pageSize = 10, $Parent){
$startRow = ($pageNum-1)*$pageSize;
$sql="SELECT TieuDe, TieuDeKD, TomTat, NoiDung, UrlHinh
FROM mk_pages
WHERE AnHien = 1 and idGroup = $idGroup and Parent = '$Parent'
ORDER BY idPa desc
LIMIT $startRow , $pageSize
";
$kq = mysql_query($sql,$this->conn) or die(mysql_error());
$sql="SELECT count(*) FROM mk_pages WHERE AnHien = 1 and idGroup = $idGroup and Parent = '$Parent'
";
$rs= mysql_query($sql) or die(mysql_error());;
$row_rs = mysql_fetch_row($rs);
$totalRows = $row_rs[0];
return $kq;
}
public function ListPages($idGroup, &$totalRows, $pageNum=1, $pageSize = 10, $lang = 'vi'){
$startRow = ($pageNum-1)*$pageSize;
$sql="SELECT TieuDe, TomTat, TieuDeKD, UrlHinh, NgayDang, NoiDung
FROM mk_pages
WHERE AnHien = 1 and idGroup = $idGroup and Lang = '$lang'
ORDER BY idPa desc
LIMIT $startRow , $pageSize
";
$kq = mysql_query($sql,$this->conn) or die(mysql_error());
$sql="SELECT count(*) FROM mk_pages WHERE AnHien = 1 and idGroup = $idGroup and Lang = '$lang'
";
$rs= mysql_query($sql) or die(mysql_error());;
$row_rs = mysql_fetch_row($rs);
$totalRows = $row_rs[0];
return $kq;
}
public function ListTinTuc($sotin, $idGroup){
if($idGroup == -1){
$sql="SELECT TieuDe, TomTat, TieuDeKD, UrlHinh, NgayDang
FROM mk_pages
WHERE AnHien = 1 and idGroup in (1, 2)
ORDER BY idPa desc
LIMIT 0 , $sotin
";
}else{
$sql="SELECT TieuDe, TomTat, TieuDeKD, UrlHinh, NgayDang
FROM mk_pages
WHERE AnHien = 1 and idGroup = $idGroup
ORDER BY idPa desc
LIMIT 0 , $sotin
";
}
$kq = mysql_query($sql,$this->conn) or die(mysql_error());
return $kq;
}
public function ListMenu($idGroup){
$sql="SELECT TieuDe, TieuDeKD, idPa
FROM mk_pages
WHERE AnHien = 1 and idGroup = $idGroup and idPa <> 2 and idPa <> 109
ORDER BY ThuTu ASC";
$kq = mysql_query($sql,$this->conn) or die(mysql_error());
return $kq;
}
public function LayTitle($idPa){
$sql="SELECT Title FROM mk_pages WHERE idPa = '$idPa'
";
$kq = mysql_query($sql,$this->conn);
$row_trang = mysql_fetch_assoc($kq);
return $row_trang['Title'];
}
public function LayDes($idPa){
$sql="SELECT Des FROM mk_pages WHERE idPa = '$idPa'
";
$kq = mysql_query($sql,$this->conn);
$row_trang = mysql_fetch_assoc($kq);
return $row_trang['Des'];
}
public function LayKeyword($idPa){
$sql="SELECT Keyword FROM mk_pages WHERE idPa = '$idPa'";
$kq = mysql_query($sql,$this->conn);
$row_trang = mysql_fetch_assoc($kq);
return $row_trang['Keyword'];
}
}
?>
|
/* eslint-env node*/
var gutil = require('gulp-util')
var paths = {
layouts: {
componentsDir: './app/components*.jade',
src: './app/views*.jade',
dest: './app/public/assets/html/'
},
styles: {
componentsDir: './app/lib/stylesheets*.styl',
src: './app/lib/stylesheets/styles.styl',
dest: './app/public/assets/css/'
},
scripts: {
entry: './app/lib/scripts/entry.jsx',
src: ['./app/lib/scripts*.jsx', './app/lib/scripts*.js'],
dest: './app/public/assets/js/'
}
}
var onError = function (error) {
gutil.log(gutil.colors.red(error))
this.emit('end')
}
module.exports = {
paths: paths,
onError: onError
}
|
#ifndef _DATA_H_
#define _DATA_H_
#include <xcb/xcb.h>
#include <xcb/damage.h>
#define XTOQ_DAMAGE 0
#define XTOQ_EXPOSE 1
#define XTOQ_CREATE 2
#define XTOQ_DESTROY 3
typedef struct xtoq_context_t {
xcb_connection_t *conn;
xcb_drawable_t window;
xcb_window_t parent;
xcb_damage_damage_t damage;
int x;
int y;
int width;
int height;
int damaged_x;
int damaged_y;
int damaged_width;
int damaged_height;
char *name; /* The name of the window */
int wm_delete_set; /* Flag for WM_DELETE_WINDOW, 1 if set */
void *local_data; // Area for data client cares about
} xtoq_context_t;
typedef struct xtoq_event_t {
xtoq_context_t *context;
int event_type;
} xtoq_event_t;
typedef struct image_data_t {
uint8_t *data;
int length;
} image_data_t;
typedef struct xtoq_image_t {
xcb_image_t *image;
int x;
int y;
int width;
int height;
} xtoq_image_t;
typedef void (*xtoq_event_cb_t) (xtoq_event_t const *event);
extern int _damage_event;
#endif
|
# Lecture 1: Mathematical background
This lecture aims at introducing the mathematical concepts we will be using throughout the course (linear algebra, calculus, statistics, numerical optimization).
Note that this does not serve as a mathematics course in itself.
The students interested in a more formal and academic approach can refer to the following links:
- [Pr. Strang's course on linear algebra](https:
- [Pr. Strang's course on calculus](https:
- [Pr. Boyd's course on convex optimization](https:
- [Leon Bottou's paper on SGD](https:
This folder contains the material related to the first lecture.
- [`build/slides.pdf`](build/slides.pdf) corresponds the slides
The rest is the (latex) source code used to generate the slides.
|
from django.contrib import admin
from .models import Question
# Register your models here.
admin.site.register(Question)
|
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="es"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="distribution" content="global"/>
<title>Wallery — Murales gratuitos, contenidos valiosos</title>
<meta name="description" content=""/>
<meta name="keywords" content=""/>
<meta name="author" content=""/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link type="text/plain" rel="author" href="humans.txt" />
<!-- Open Graphs Tag's -->
<meta property="og:title" content=""/>
<meta property="og:site_name" content=""/>
<meta property="og:image" content="" />
<meta property="og:image:secure_url" content="" />
<meta property="og:image:type" content="image/jpeg" />
<meta property="og:image:width" content="400" />
<meta property="og:image:height" content="300" />
<meta property="og:description" content=""/>
<meta property="og:url" content=""/>
<!--[if lte IE 8]><script src="css/ie/html5shiv.js"></script><![endif]-->
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<link rel="icon" type="image/x-icon" href="favicon.ico" />
<!-- Stylesheets -->
<link rel="stylesheet" href="css/normalize.css"/>
<link rel="stylesheet" href="css/bootstrap.css"/>
<link href="https://fonts.googleapis.com/css?family=Titillium+Web:300,400,700&subset=latin-ext" rel="stylesheet">
<link rel="stylesheet" href="css/croppic.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.1/css/bootstrap-select.min.css">
<link rel="stylesheet" type="text/less" href="css/main.less"/>
<script src="js/vendor/less.min.js"></script>
<!--[if lte IE 8]><link rel="stylesheet" href="css/ie/v8.css" /><![endif]-->
<!--[if lte IE 9]><link rel="stylesheet" href="css/ie/v9.css" /><![endif]-->
<!--[if lt IE 10]><script src="js/old/respond.min.js"></script><![endif]-->
<script src="js/vendor/modernizr-2.8.3.min.js"></script>
</head>
<body>
<!--[if lt IE 9]>
<p class="browsehappy">La version de su navegador es demasiado antigua. <a href="http://browsehappy.com/">Actualicelo</a> y disfrute el sitio al maximo.</p>
<![endif]
<div class="container-fluid alpha">
<div class="container">
Alpha v0.1 - 18/04/2017 - <a href="https://github.com/agustinl/Wallery"><strong>GITHUB</strong></a>
</div>
</div>
<header class="container-fluid">
<div class="container">
<div class="col-lg-2">
<img src="images/logo.png" alt="Wallery">
</div>
<div class="col-lg-8 text-center">
<h1>Murales gratuitos, <strong>contenidos valiosos</strong></h1>
</div>
<div class="col-lg-2">
<a class="btn btn-default" href="#" role="button">Busqueda avanzada</a>
</div>
</div>
</header>
<section class="container">
<div id="uploadform" class="col-lg-8 col-lg-offset-2 row">
<div class="row">
<div class="col-lg-5 row">
<div id="<API key>"></div>
<input type="text" name="tmp_img" id="cropOutput"/>
</div>
<div class="col-lg-7 white-form">
<div class="align-middle">
<div class="form-group row">
<div class="col-lg-6">
<input type="text" class="form-control" name="" placeholder="DNI / LC / LE" data-toggle="tooltip" data-placement="bottom" title="Solo para comprobar que no se haya cargado una solicitud previa.">
<span class="glyphicon <API key> <API key>" aria-hidden="true"></span>
</div>
<div class="col-lg-6">
<select class="selectpicker" data-width="100%" title="Tipo de sangre">
<option>O negativo</option>
<option>O positivo</option>
<option data-divider="true"></option>
<option>A negativo</option>
<option>A positivo</option>
<option data-divider="true"></option>
<option>B negativo</option>
<option>B positivo</option>
<option data-divider="true"></option>
<option>AB negativo</option>
<option>AB positivo</option>
</select>
</div>
</div>
<div class="form-group row">
<div class="col-lg-8">
<input type="text" class="form-control" name="" placeholder="Nombre y apellido">
</div>
<div class="col-lg-4">
<input type="text" class="form-control" name="" placeholder="Cantidad" data-toggle="tooltip" data-placement="bottom" title="Dejar en blanco si no hay un numero determinado.">
<span class="glyphicon glyphicon-user <API key>" aria-hidden="true"></span>
</div>
</div>
<div class="form-group">
<p class="text-muted-info">¿Donde donar?</p>
<hr>
<input id="searchTextField" type="text" class="form-control input-mg" name="" placeholder="Centro medico">
<input id="searchTextFieldTwo" type="text" class="form-control input-mg" name="" placeholder="Direccion">
<input type="text" class="form-control input-mg" name="" placeholder="Dias y horarios">
</div>
<div class="form-group">
<textarea class="form-control" placeholder="Informacion adicional..."></textarea>
</div>
<div class="form-group row">
<div class="col-lg-6">
<input type="text" class="form-control" name="" placeholder="Telefono
</div>
<div class="col-lg-6">
<input type="text" class="form-control" name="" placeholder="Referencia
</div>
</div>
<div class="form-group row">
<div class="col-lg-6">
<input type="text" class="form-control" name="" placeholder="Telefono
</div>
<div class="col-lg-6">
<input type="text" class="form-control" name="" placeholder="Referencia
</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-lg-2 uploadform-buttons">
<div>
<button class="btn btn-primary" type="submit">Listo</button>
<button class="btn btn-link">Cancelar</button>
</div>
</div>
</section>
<footer class="container-fluid">
<div class="container">
<h6>2017 — Buenos Aires, Argentina — <a href="#">hola@wallery.com.ar</a></h6>
</div>
</footer>
<script src="js/vendor/jquery-1.12.0.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.12.0.min.js"><\/script>')</script>
<script src="js/vendor/bootstrap.min.js"></script>
<script src="js/croppic.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.1/js/bootstrap-select.min.js"></script>
<script src="https://maps.googleapis.com/maps/api/js?libraries=places&key=<Google Api> "></script>
<script src="js/scripts.js"></script>
<script>
window.ga=function(){ga.q.push(arguments)};ga.q=[];ga.l=+new Date;
ga('create','UA-XXXXX-Y','auto');ga('send','pageview')
</script>
<script src="https:
<!--[if lt IE 10]><script src="js/old/rem.min.js"></script><![endif]-->
</body>
</html>
|
/**
*
* app.js
*
* This is the entry file for the application
*
*/
import <API key> from '../MovieSearchApp/Containers/FilmSearchContainer/FilmSearchComponent';
import AppComponent from '../CommonComponent/app.js';
import React from 'react';
import { Router, Route, IndexRoute, browserHistory } from 'react-router';
console.log("current href",window.location.href);
const getAppRouter = () => {
return (
<Route component={AppComponent}>
<Route component={<API key>} path='/searchmovies' />
</Route>
);
}
export {
getAppRouter
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.