answer
stringlengths
15
1.25M
#include <iostream> using std::cin; using std::cout; using std::endl; class Base{ private: int x; public: int y; void setXY(int n,int m){ x = n; y = m; } void showXY(){ cout<<x<<','<<y<<endl; } }; class Derived:protected Base{ private: int z; public: void setXYZ(int a,int b,int m){ setXY(a,b); z = m; } void show(){ showXY(); cout<<z<<endl; } }; int main() { Derived obj; //obj.y = 3; //error //obj.setXY(10,20); //error obj.setXYZ(10,20,30); // obj.showXY(); //error obj.show(); //okx return 0; }
import { Component } from '@angular/core'; import { Router } from '@angular/router'; import { AuthService } from '../services/auth.service'; import { CookieService } from '../services/cookie.service'; export class LoginData { constructor( public username: string, public password: string ) { } } @Component({ selector: 'login', templateUrl: './login.component.html', styleUrls: ['./login.component.scss'] }) export class LoginComponent { message: string; constructor(public authService: AuthService, public router: Router) { this.setMessage(); } setMessage() { this.message = 'Logged ' + (this.authService.loggedIn ? 'in' : 'out'); } model = new LoginData('', ''); login() { this.message = 'Trying to log in ...'; this.authService.loginBool(this.model).subscribe(() => { this.setMessage(); if (this.authService.loggedIn) { // Get the redirect URL from our auth service // If no redirect has been set, use the default let redirect = this.authService.redirectUrl ? this.authService.redirectUrl : '/'; // Redirect the user this.router.navigate([redirect]); } }); } logout() { this.authService.logout(); this.setMessage(); } }
package theme.support.demo.test; import android.os.Bundle; import android.support.annotation.Nullable; import theme.support.demo.BaseActivity; import theme.support.demo.R; public class TestActivity extends BaseActivity { @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_test); initToolbar(); } }
App.Tile = function(properties) { p = properties || {}; App.Glyph.call(this, p); this.isWalkable = (p.isWalkable===undefined) ? false : p.isWalkable; this.isDiggable = (p.isDiggable===undefined) ? false : p.isDiggable; this.blocksLight = (p.blocksLight===undefined) ? true : p.blocksLight; }; App.Tile.extend(App.Glyph);
using System.Collections.Generic; using NUnit.Framework; using Plivo.Http; using Plivo.Resource; using Plivo.Resource.Medis; using Plivo.Utilities; namespace Plivo.Test.Resources { [TestFixture] public class TestMedia : BaseTestCase { [Test] public void TestMediaList() { var data = new Dictionary<string, object>() { {"limit", 1} }; var request = new PlivoRequest( "GET", "Account/<API key>/Media/", "", data); var response = System.IO.File.ReadAllText( SOURCE_DIR + @"Mocks/mediaListResponse.json" ); Setup<ListResponse<Message>>( 200, response ); Assert.IsEmpty( ComparisonUtilities.Compare( response, Api.Message.List(limit: 1))); AssertRequest(request); } [Test] public void TestMediaGet() { var id = "abcabcabc"; var request = new PlivoRequest( "GET", "Account/<API key>/Media/" + id + "/", ""); var response = System.IO.File.ReadAllText( SOURCE_DIR + @"Mocks/mediaGetResponse.json" ); Setup<Message>( 200, response ); Assert.IsEmpty( ComparisonUtilities.Compare( response, Api.Message.Get(id))); AssertRequest(request); } } }
// <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 eratter.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; } } } }
define([ "lib/mini" ],function( mini ){ var User = function(){ mini.User.apply( this, arguments ); }; User.prototype = Object.create( mini.User.prototype ,{ compareScore: { value: function( a, b ){ return a >= b; } }, grantCollection: { value: function( name ){ if( !this._data.collections ) this._data.collections = {}; this._data.collections[name] = true; this._save(); } }, hasCollection: { value: function( name ){ if( !this._data.collections ) this._data.collections = {}; return !!this._data.collections[name]; } }, grantMedal: { value: function( name ){ if( !this._data.medals ) this._data.medals = {}; this._data.medals[name] = true; this._save(); } }, hasMedal: { value: function( name ){ if( !this._data.medals ) this._data.medals = {}; return !!this._data.medals[name]; } }, playCount: { get: function(){ return this._data.hasOwnProperty("playCount")? this._data.playCount: 0; }, set: function( value ){ this._data.playCount = value; this._save(); } }, activeCharaId: { get: function(){ return this._data.activeCharaId || "normal"; }, set: function( name ){ this._data.activeCharaId = name; this._save(); } } }); return User; });
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _templateObject = <API key>(['\n margin: 0;\n padding: 0;\n'], ['\n margin: 0;\n padding: 0;\n']); var _styledComponents = require('styled-components'); var _styledComponents2 = <API key>(_styledComponents); function <API key>(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function <API key>(strings, raw) { return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); } var List = _styledComponents2.default.ul(_templateObject); exports.default = List;
using System.Collections.Generic; namespace SoftwarePassion.LogBridge { <summary> Encapsulates an extended property whether assigned programmatically or in the configuration file. </summary> public class ExtendedProperty { <summary> Creates an ExtendedProperty with the given name and value. </summary> <param name="name">The name of the property.</param> <param name="value">The value of the property.</param> public ExtendedProperty(string name, string value) { Name = name; Value = value; } <summary> The Name of the property. </summary> public string Name { get; private set; } <summary> The Value of the property. </summary> public string Value { get; private set; } } internal class <API key> : IEqualityComparer<ExtendedProperty> { public bool Equals(ExtendedProperty x, ExtendedProperty y) { return y != null && (x != null && x.Name.Equals(y.Name)); } public int GetHashCode(ExtendedProperty obj) { return obj.Name.GetHashCode(); } } }
<?php namespace Application\Gillbus\EtravelsBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * Sduser * * @ORM\Table(name="sduser") * @ORM\Entity */ class Sduser { /** * @var integer * * @ORM\Column(name="order_id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="IDENTITY") */ private $order_id; /** * @var string * * @ORM\Column(name="sd_user", type="string") */ private $user; /** * Get order_id * * @return integer */ public function getOrder_Id() { return $this->order_id; } /** * Get user * * @return string */ public function getUser() { return $this->user; } /** * * @return string */ public function __toString() { return $this->user; } /** * @ORM\ManyToOne(targetEntity="Order", inversedBy="sdusers") */ private $order; /** * Get order * * @return \Application\Gillbus\EtravelsBundle\Entity\Order */ public function getOrder() { return $this->order; } }
# Generated by Django 3.1.2 on 2020-11-10 11:51 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('emailtemplates', '<API key>'), ] operations = [ migrations.AlterField( model_name='emailtemplate', name='created', field=models.DateTimeField(default=django.utils.timezone.now, verbose_name='created'), ), migrations.AlterField( model_name='emailtemplate', name='modified', field=models.DateTimeField(default=django.utils.timezone.now, verbose_name='modified'), ), ]
<?php declare(strict_types=1); namespace Sonata\OrderBundle\Entity; use Doctrine\Common\Collections\ArrayCollection; use Sonata\Component\Currency\CurrencyInterface; use Sonata\Component\Customer\CustomerInterface; use Sonata\Component\Delivery\BaseServiceDelivery; use Sonata\Component\Order\<API key>; use Sonata\Component\Order\OrderInterface; use Sonata\CustomerBundle\Entity\BaseAddress; use Sonata\PaymentBundle\Entity\BaseTransaction; abstract class BaseOrder implements OrderInterface { /** * @var string */ protected $reference; /** * @var string */ protected $paymentMethod; /** * @var string */ protected $deliveryMethod; /** * @var CurrencyInterface */ protected $currency; /** * @var int */ protected $status; /** * @var int */ protected $paymentStatus; /** * @var int */ protected $deliveryStatus; /** * @var datetime */ protected $validatedAt; /** * @var string */ protected $username; /** * @var float */ protected $totalInc; /** * @var float */ protected $totalExcl; /** * @var float */ protected $deliveryCost; /** * @var float */ protected $deliveryVat; /** * @var string */ protected $billingName; /** * @var string */ protected $billingPhone; /** * @var string */ protected $billingAddress1; /** * @var string */ protected $billingAddress2; /** * @var string */ protected $billingAddress3; /** * @var string */ protected $billingCity; /** * @var string */ protected $billingPostcode; /** * @var string */ protected $billingCountryCode; /** * @var string */ protected $billingFax; /** * @var string */ protected $billingEmail; /** * @var string */ protected $billingMobile; /** * @var string */ protected $shippingName; /** * @var string */ protected $shippingPhone; /** * @var string */ protected $shippingAddress1; /** * @var string */ protected $shippingAddress2; /** * @var string */ protected $shippingAddress3; /** * @var string */ protected $shippingCity; /** * @var string */ protected $shippingPostcode; /** * @var string */ protected $shippingCountryCode; /** * @var string */ protected $shippingFax; /** * @var string */ protected $shippingEmail; /** * @var string */ protected $shippingMobile; protected $orderElements; protected $createdAt; protected $updatedAt; protected $customer; protected $locale; public function __construct() { $this->orderElements = new ArrayCollection(); } public function __toString() { return $this->getReference() ?: 'n/a'; } public function prePersist(): void { $this->setCreatedAt(new \DateTime()); $this->setUpdatedAt(new \DateTime()); } public function preUpdate(): void { $this->setUpdatedAt(new \DateTime()); } /** * Returns formatted delivery address. * * @param string $sep * * @return string */ public function getFullDelivery($sep = ', ') { return BaseAddress::formatAddress($this->getDeliveryAsArray(), $sep); } /** * @return array */ public function getDeliveryAsArray() { return [ 'firstname' => $this->getShippingName(), 'lastname' => '', 'address1' => $this->getShippingAddress1(), 'postcode' => $this->getShippingPostcode(), 'city' => $this->getShippingCity(), 'country_code' => $this-><API key>(), ]; } /** * Returns formatted billing address. * * @param string $sep * * @return string */ public function getFullBilling($sep = ', ') { return BaseAddress::formatAddress($this->getBillingAsArray(), $sep); } public function getBillingAsArray() { return [ 'firstname' => $this->getBillingName(), 'lastname' => '', 'address1' => $this->getBillingAddress1(), 'postcode' => $this->getBillingPostcode(), 'city' => $this->getBillingCity(), 'country_code' => $this-><API key>(), ]; } public function setReference($reference): void { $this->reference = $reference; } public function getReference() { return $this->reference; } public function setPaymentMethod($paymentMethod): void { $this->paymentMethod = $paymentMethod; } public function getPaymentMethod() { return $this->paymentMethod; } public function setDeliveryMethod($deliveryMethod): void { $this->deliveryMethod = $deliveryMethod; } public function getDeliveryMethod() { return $this->deliveryMethod; } public function setCurrency(CurrencyInterface $currency): void { $this->currency = $currency; } public function getCurrency() { return $this->currency; } public function setStatus($status): void { $this->status = $status; } public function getStatus() { return $this->status; } public function setPaymentStatus($paymentStatus): void { $this->paymentStatus = $paymentStatus; } public function getPaymentStatus() { return $this->paymentStatus; } /** * @return string */ public function <API key>() { $statusList = BaseTransaction::getStatusList(); return $statusList[$this->getPaymentStatus()]; } public function setDeliveryStatus($deliveryStatus): void { $this->deliveryStatus = $deliveryStatus; } public function getDeliveryStatus() { return $this->deliveryStatus; } /** * @return string */ public function <API key>() { $statusList = BaseServiceDelivery::getStatusList(); return $statusList[$this->getDeliveryStatus()]; } public function setValidatedAt(?\DateTime $validatedAt = null): void { $this->validatedAt = $validatedAt; } public function getValidatedAt() { return $this->validatedAt; } public function setUsername($username): void { $this->username = $username; } public function getUsername() { return $this->username; } public function setTotalInc($totalInc): void { $this->totalInc = $totalInc; } public function getTotalInc() { return $this->totalInc; } public function setTotalExcl($totalExcl): void { $this->totalExcl = $totalExcl; } public function getTotalExcl() { return $this->totalExcl; } public function setDeliveryCost($deliveryCost): void { $this->deliveryCost = $deliveryCost; } public function getDeliveryCost() { return $this->deliveryCost; } /** * Set delivery VAT. * * @param float $deliveryVat */ public function setDeliveryVat($deliveryVat): void { $this->deliveryVat = $deliveryVat; } /** * Get delivery VAT. * * @return float $deliveryVat */ public function getDeliveryVat() { return $this->deliveryVat; } public function setBillingName($billingName): void { $this->billingName = $billingName; } public function getBillingName() { return $this->billingName; } public function setBillingPhone($billingPhone): void { $this->billingPhone = $billingPhone; } public function getBillingPhone() { return $this->billingPhone; } public function setBillingAddress1($billingAddress1): void { $this->billingAddress1 = $billingAddress1; } public function getBillingAddress1() { return $this->billingAddress1; } public function setBillingAddress2($billingAddress2): void { $this->billingAddress2 = $billingAddress2; } public function getBillingAddress2() { return $this->billingAddress2; } public function setBillingAddress3($billingAddress3): void { $this->billingAddress3 = $billingAddress3; } public function getBillingAddress3() { return $this->billingAddress3; } public function setBillingCity($billingCity): void { $this->billingCity = $billingCity; } public function getBillingCity() { return $this->billingCity; } public function setBillingPostcode($billingPostcode): void { $this->billingPostcode = $billingPostcode; } public function getBillingPostcode() { return $this->billingPostcode; } public function <API key>($billingCountryCode): void { $this->billingCountryCode = $billingCountryCode; } public function <API key>() { return $this->billingCountryCode; } public function setBillingFax($billingFax): void { $this->billingFax = $billingFax; } public function getBillingFax() { return $this->billingFax; } public function setBillingEmail($billingEmail): void { $this->billingEmail = $billingEmail; } public function getBillingEmail() { return $this->billingEmail; } public function setBillingMobile($billingMobile): void { $this->billingMobile = $billingMobile; } public function getBillingMobile() { return $this->billingMobile; } public function setShippingName($shippingName): void { $this->shippingName = $shippingName; } public function getShippingName() { return $this->shippingName; } public function setShippingPhone($shippingPhone): void { $this->shippingPhone = $shippingPhone; } public function getShippingPhone() { return $this->shippingPhone; } public function setShippingAddress1($shippingAddress1): void { $this->shippingAddress1 = $shippingAddress1; } public function getShippingAddress1() { return $this->shippingAddress1; } public function setShippingAddress2($shippingAddress2): void { $this->shippingAddress2 = $shippingAddress2; } public function getShippingAddress2() { return $this->shippingAddress2; } public function setShippingAddress3($shippingAddress3): void { $this->shippingAddress3 = $shippingAddress3; } public function getShippingAddress3() { return $this->shippingAddress3; } public function setShippingCity($shippingCity): void { $this->shippingCity = $shippingCity; } public function getShippingCity() { return $this->shippingCity; } public function setShippingPostcode($shippingPostcode): void { $this->shippingPostcode = $shippingPostcode; } public function getShippingPostcode() { return $this->shippingPostcode; } public function <API key>($shippingCountryCode): void { $this->shippingCountryCode = $shippingCountryCode; } public function <API key>() { return $this->shippingCountryCode; } public function setShippingFax($shippingFax): void { $this->shippingFax = $shippingFax; } public function getShippingFax() { return $this->shippingFax; } public function setShippingEmail($shippingEmail): void { $this->shippingEmail = $shippingEmail; } public function getShippingEmail() { return $this->shippingEmail; } public function setShippingMobile($shippingMobile): void { $this->shippingMobile = $shippingMobile; } public function getShippingMobile() { return $this->shippingMobile; } public function getOrderElements() { return $this->orderElements; } public function addOrderElement(<API key> $orderElement): void { $this->orderElements[] = $orderElement; $orderElement->setOrder($this); } public function isValidated() { return null !== $this->getValidatedAt() && OrderInterface::STATUS_VALIDATED === $this->getStatus(); } public function isCancelled() { return null !== $this->getValidatedAt() && OrderInterface::STATUS_CANCELLED === $this->getStatus(); } public function isPending() { return \in_array($this->getStatus(), [OrderInterface::STATUS_PENDING], true); } public function isOpen() { return \in_array($this->getStatus(), [OrderInterface::STATUS_OPEN], true); } public function isCancellable() { return $this->isOpen() || $this->isPending(); } public function isError() { return \in_array($this->getStatus(), [OrderInterface::STATUS_ERROR], true); } public function setCreatedAt(?\DateTime $createdAt = null): void { $this->createdAt = $createdAt; } public function getCreatedAt() { return $this->createdAt; } public function setUpdatedAt(?\DateTime $updatedAt = null): void { $this->updatedAt = $updatedAt; } public function getUpdatedAt() { return $this->updatedAt; } public function addOrderElements(<API key> $orderElements): void { $this->orderElements[] = $orderElements; } public function setOrderElements($orderElements): void { $this->orderElements = $orderElements; } public function setCustomer(CustomerInterface $customer): void { $this->customer = $customer; } public function getCustomer() { return $this->customer; } /** * @return string */ public function getStatusName() { $statusList = self::getStatusList(); return $statusList[$this->getStatus()]; } /** * @static * * @return array */ public static function getStatusList() { return [ self::STATUS_OPEN => 'status_open', self::STATUS_PENDING => 'status_pending', self::STATUS_VALIDATED => 'status_validated', self::STATUS_CANCELLED => 'status_cancelled', self::STATUS_ERROR => 'status_error', self::STATUS_STOPPED => 'status_stopped', ]; } /** * @return array */ public static function <API key>() { return array_keys(self::getStatusList()); } public function setLocale($locale): void { $this->locale = $locale; } public function getLocale() { return $this->locale; } public function getVat() { return bcsub($this->totalInc, $this->totalExcl); } /** * Returns all VAT amounts contained in elements. * * @return array */ public function getVatAmounts() { $amounts = []; foreach ($this->getOrderElements() as $orderElement) { $rate = $orderElement->getVatRate(); $amount = (string) $orderElement->getVatAmount(); if (isset($amounts[$rate])) { $amounts[$rate]['amount'] = bcadd($amounts[$rate]['amount'], $amount); } else { $amounts[$rate] = [ 'rate' => $rate, 'amount' => $amount, ]; } } return $amounts; } }
describe('<API key> Test Suite', function() { beforeEach(function() { this.xhr = jasmine.createSpyObj('xhr', ['done']); spyOn($, 'get').andReturn(this.xhr); }); beforeEach(function() { this.tmpl = new Backbone.<API key>(); }); it('should have a remote template manager defined', function() { expect(Backbone.<API key>).toBeDefined(); }); it('should build a remote template manager', function() { expect(this.tmpl.$cache).toEqual({}); expect(this.tmpl.prefix).toBe('/templates/'); expect(this.tmpl.suffix).toBe('.template.html'); }); it('should build a remote template manager with custom options', function() { var prefix = '/foo'; var suffix = '.foo.html'; var templateManager = new Backbone.<API key>({ prefix: prefix, suffix: suffix }); expect(templateManager.$cache).toEqual({}); expect(templateManager.prefix).toBe(prefix); expect(templateManager.suffix).toBe(suffix); }); it('should clear cache', function() { this.tmpl.$cache['foo'] = 'foo tmpl'; this.tmpl.$clear(); expect(this.tmpl.$cache).toEqual({}); }); it('should clear a cache entry', function() { var $foo = 'foo tmpl'; var $bar = 'bar tmpl'; this.tmpl.$cache['foo'] = $foo; this.tmpl.$cache['bar'] = $bar; this.tmpl.$clear('foo'); expect(this.tmpl.$cache).toEqual({ 'bar': $bar }); }); it('should build template url', function() { var template = 'foo'; var url = this.tmpl.$url(template); expect(url).toBe('/templates/' + template + '.template.html'); }); it('should get a template', function() { var template = 'foo'; var done = jasmine.createSpy('done'); this.tmpl.$get(template, done); var url = '/templates/' + template + '.template.html'; expect($.get).<API key>(url); expect(this.xhr.done).toHaveBeenCalled(); expect(done).not.toHaveBeenCalled(); var html = template + ' html'; this.xhr.done.mostRecentCall.args[0](html); expect(done).<API key>(html, template); }); it('should not get a template twice', function() { var template = 'foo'; var done = jasmine.createSpy('done'); this.tmpl.$get(template, done); this.tmpl.$get(template, done); var url = '/templates/' + template + '.template.html'; expect($.get).<API key>(url); expect($.get.callCount).toBe(1); }); it('should load a single template', function() { var template = 'foo'; var html = template + ' html'; var done = jasmine.createSpy('done'); var ctx = this; spyOn(this.tmpl, '$get').andCallThrough(); this.tmpl.$load(template, done); expect(this.tmpl.$get).<API key>(template, jasmine.any(Function)); expect(done).not.toHaveBeenCalled(); expect($.get).toHaveBeenCalled(); expect(this.xhr.done).toHaveBeenCalled(); this.xhr.done.mostRecentCall.args[0](html); expect(done).<API key>(html, template); }); it('should load an array template', function() { var templateFoo = 'foo'; var fooHtml = templateFoo + ' html'; var templateBar = 'bar'; var barHtml = templateBar + ' html'; var templates = [templateFoo, templateBar]; var results = {}; results[templateFoo] = fooHtml; results[templateBar] = barHtml; var done = jasmine.createSpy('done'); var ctx = this; spyOn(this.tmpl, '$get').andCallThrough(); this.tmpl.$loads(templates, done); expect(this.tmpl.$get).<API key>(templateFoo, jasmine.any(Function)); expect(this.tmpl.$get).<API key>(templateBar, jasmine.any(Function)); expect(this.tmpl.$get.callCount).toBe(2); expect(this.xhr.done).toHaveBeenCalled(); expect(this.xhr.done.callCount).toBe(2); this.xhr.done.calls[0].args[0](fooHtml); expect(done).not.toHaveBeenCalled(); this.xhr.done.calls[1].args[0](barHtml); expect(done).<API key>(results); }); it('should load a template', function() { var callback = jasmine.createSpy('callback'); var template = 'foo'; spyOn(this.tmpl, '$load'); spyOn(this.tmpl, '$loads'); this.tmpl.load(template, callback); expect(this.tmpl.$load).<API key>(template, callback, undefined); expect(this.tmpl.$loads).not.toHaveBeenCalled(); }); it('should load an array of templates', function() { var callback = jasmine.createSpy('callback'); var fooTemplate = 'foo'; var barTemplate = 'bar'; var templates = [fooTemplate, barTemplate]; spyOn(this.tmpl, '$load'); spyOn(this.tmpl, '$loads'); this.tmpl.load(templates, callback); expect(this.tmpl.$loads).<API key>(templates, callback, undefined); expect(this.tmpl.$load).not.toHaveBeenCalled(); }); });
var mongoose = require('mongoose'); var models = require('./schemas'); var fs = require('fs'), xml2js = require('xml2js'); var async = require('async'); var parser = new xml2js.Parser(); var ipnett = "10.0.2."; // Set your IP range nett. Same as found in nmap bash file. var iprange = "255"; // select the range you want scanned. mongoose.connect("localhost:27017/node_npm_viewer"); var arrhosts = []; var arrip = []; var arron = []; var fault = false; var createarray = function(callback) { for (var l = 1; l < iprange; l++) { arrip.push(ipnett + l); } console.log("Ip range array generated"); callback(); }; var createonarray = function(callback) { arron = arrip.filter( function( el ) { return arrhosts.indexOf( el ) < 0; } ); console.log("hosts to be set to OFF: " + arron); callback(); }; // // Make an array with all IP addresses found in the nmap xml file var readxml = function(callback) { fs.readFile(__dirname + '/output.xml', function(err, data) { parser.parseString(data, function(err, result) { if (!err && JSON.stringify(result) != "null") { arrhosts = []; for (k in result.nmaprun.host) { s = (result.nmaprun.host[k].address[0].$.addr); arrhosts.push(s); } //console.log("The following active hosts where found: " + arrhosts); } else { console.log("unable to read xml file"); fault = true; } }); callback(); }); // }; // // Checking to see if database is empty var checkip = function(callback) { var itemsProcessed = 0; models.Computers.find({}, {}, {}, function(err, result) { if (result[0] !== undefined && fault == false) { console.log("Found data, updating.."); var itemsProcessed = 0; arron.forEach(function(item) { models.Computers.update({ ip: item }, { state: "OFF", }, function(err, rawResponse) { itemsProcessed++; if (itemsProcessed === arron.length) { console.log("All statuses set to OFF"); callback(); } }); }); } else if (fault == false) { console.log("No data found, creating.... "); // //Storing new computers to the database arrip.forEach(function(item) { var newComputer = new models.Computers(); newComputer.ip = item; newComputer.description = "dummy description"; newComputer.state = "OFF"; newComputer.date = new Date().getTime(); newComputer.save(function(err) { if (err) { console.log(err); } else { console.log("New IP saved " + item); itemsProcessed++; if (itemsProcessed === arrip.length) { console.log("All new IP's saved"); callback(); } } }); }); } }); callback(); }; // // Update state on all active computers var updatecomputers = function(callback) { var itemsProcessed = 0; arrhosts.forEach(function(item) { models.Computers.update({ ip: item }, { state: "ON", date: new Date().getTime(), }, function(err, rawResponse) { itemsProcessed++; if (itemsProcessed === arrhosts.length) { console.log("Data updated"); callback(); } }); }); }; // setInterval(function() { async.series([ createarray, readxml, createonarray, checkip, updatecomputers, ], function(err) { arrip = []; arron = []; fault = false; console.log("Work done, closing program...."); //process.exit(1); }); }, 10000) // If the nmap command is runned as sudo you can get computer name. Use the string below to access computer name // result.nmaprun.host[k].hostnames[0].hostname[0].$.name // To get the computer state use the following string // result.nmaprun.host[k].status[0].$.state
// <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 DLaB.Xrm.Entities { [System.Runtime.Serialization.<API key>()] [System.CodeDom.Compiler.<API key>("CrmSvcUtil", "8.0.1.7297")] public enum <API key> { [System.Runtime.Serialization.EnumMemberAttribute()] Any = 1, [System.Runtime.Serialization.EnumMemberAttribute()] Email = 2, [System.Runtime.Serialization.EnumMemberAttribute()] Fax = 4, [System.Runtime.Serialization.EnumMemberAttribute()] Mail = 5, [System.Runtime.Serialization.EnumMemberAttribute()] Phone = 3, } }
<?php namespace Application\Migrations; use Doctrine\DBAL\Migrations\AbstractMigration; use Doctrine\DBAL\Schema\Schema; /** * Auto-generated Migration: Please modify to your needs! */ class <API key> extends AbstractMigration { public function up(Schema $schema) { // this up() migration is auto-generated, please modify it to your needs $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.'); $this->addSql('ALTER TABLE product ADD hideDescription TINYINT(1) NOT NULL'); $this->addSql('ALTER TABLE product_audit ADD hideDescription TINYINT(1) DEFAULT NULL'); } public function down(Schema $schema) { // this down() migration is auto-generated, please modify it to your needs $this->abortIf($this->connection->getDatabasePlatform()->getName() != 'mysql', 'Migration can only be executed safely on \'mysql\'.'); $this->addSql('ALTER TABLE product DROP hideDescription'); $this->addSql('ALTER TABLE product_audit DROP hideDescription'); } }
/** * built by Astrocoders * @flow */ // Modules import React from 'react' import styled from 'styled-components' import { Link } from 'react-router' import SvgDeleteIcon from 'material-ui/svg-icons/action/delete' import { grey100, grey200, grey400, grey500, grey700, grey800, } from 'material-ui/styles/colors' //Styled Components const RelatedArticleRow = styled.tr` &:hover { background-color: ${grey100}; } td { border-bottom: 1px solid ${grey200}; } ` const DeleteIcon = styled(SvgDeleteIcon)` color: ${grey400} !important; cursor: pointer; &:hover { color: ${grey700} !important; } ` export default class RelatedArticle extends React.PureComponent { propTypes: { article: React.PropTypes.object.isRequired, user: React.PropTypes.object.isRequired, } render() { const { article, user, removeRelated } = this.props return ( <RelatedArticleRow title={article.abstract} > <td> <Link to={`/article/${article.slug}`} style={{ padding: '7px 0', display: 'inline-block', textDecoration: 'none', }} > <div style={{ color: grey800, fontSize: 15, }} > {article.title} </div> <div style={{ color: grey500, fontSize: 12, }} > </div> </Link> </td> { article.addedById === user._id ? ( <td title="Remove related article" > <DeleteIcon onClick={removeRelated(article)} /> </td> ) : null } </RelatedArticleRow> ) } }
#pragma once #define CLIENT_DLL //framework for csgo/swarm engine #include "../../required.h" #include "../../ionbase.h" #include "../../mem/vmt.h" #include "sdk.h" #include "csgohook.h" #include "interfaces.h" #include "entity.h" #include "vector.h" namespace ion { interfaces* csgo; class ioncsgo : public ionbase { public: ioncsgo(const std::string& proj) { csgo = new interfaces(); instance = this; auto root = superInit(proj); if (root.isNull()) return; csgo->modClient = module("client.dll"); csgo->modEngine = module("engine.dll"); fnClient = captureFactory("client.dll"); fnEngine = captureFactory("engine.dll"); fnVstdlib = captureFactory("vstdlib.dll"); fnMatSurface = captureFactory("vguimatsurface.dll"); fnVgui2 = captureFactory("vgui2.dll"); appSystemFactory = **(CreateInterfaceFn**)sigs["AppSystemFactory"]; csgo->gGlobalVars = *(CGlobalVarsBase**)sigs["CGlobalVarsBase"]; csgo->weaponIDAsString = sigs["WeaponIDAsString"]; csgo->gEngine = reinterpret_cast<IVEngineClient*>(appSystemFactory(getInterface("VEngineClient0"), NULL)); csgo->gClient = reinterpret_cast<IBaseClientDLL*>(fnClient(getInterface("VClient0"), NULL)); csgo->gCvar = reinterpret_cast<ICvar*>(appSystemFactory(getInterface("VEngineCvar0"), NULL)); csgo->gPanel = reinterpret_cast<vgui::IPanel*>(appSystemFactory(getInterface("VGUI_Panel0"), NULL)); csgo->gEnt = reinterpret_cast<IClientEntityList*>(fnClient(getInterface("VClientEntityList0"), NULL)); csgo->gModelRender = reinterpret_cast<IVModelRender*>(appSystemFactory(getInterface("VEngineModel0"), NULL)); csgo->gTrace = reinterpret_cast<IEngineTrace*>(appSystemFactory(getInterface("EngineTraceClient0"), NULL)); csgo->gModelInfo = reinterpret_cast<IVModelInfoClient*>(appSystemFactory(getInterface("VModelInfoClient0"), NULL)); csgo->gSurface = reinterpret_cast<SurfaceV30::ISurface*>(appSystemFactory(getInterface("VGUI_Surface0"), NULL)); csgo->gMatSystem = reinterpret_cast<IMaterialSystem*>(appSystemFactory(getInterface("VMaterialSystem0"), NULL)); csgo->gDebugOverlay = reinterpret_cast<IVDebugOverlay*>(fnEngine(getInterface("VDebugOverlay0"), NULL)); DWORD* clientVmt = *(DWORD**)(csgo->gClient); csgo->gInput = (CInput*)**(DWORD**)(clientVmt[15] + 0x2); //InActivateMouse(); log.write(log.WARN, format("input = 0x%X\n") % csgo->gInput); //init fonts csgo->render = new csgorender(csgo->gSurface); lua.setDrawInstance(csgo->render); csgo->tahoma12 = (csgofont*)csgo->render->createFont("Tahoma", 12, render::Outline, 500); csgo->nvar = new netvar(csgo->gClient); csgo->clientHk = new vmt(csgo->gClient); csgo->clientHk->hookMethod(&csgohook::hkCreateMove, csgohook::CLIENT_CREATEMOVE); csgo->modelRenderHk = new vmt(csgo->gModelRender); csgo->modelRenderHk->hookMethod(&csgohook::hkDrawModelExecute, csgohook::<API key>); csgo->panelHk = new vmt(csgo->gPanel); csgo->panelHk->hookMethod(&csgohook::hkPaintTraverse, csgohook::PANEL_PAINTTRAVERSE); //bind entity lua.registerScope( luabind::class_<entity>("entity") .def(luabind::constructor<int>()) .def("isValid", &entity::isValid) .def("isAlive", &entity::isAlive) .def("getName", &entity::getName) .def("getType", &entity::getType) .def("getBonePos", &entity::getBonePos) .def("getClientClassName", &entity::getClientClassName) .def("getTeam", &entity::getTeam) .def("getHealth", &entity::getHealth) .def("isBot", &entity::isBot) .def("isDormant", &entity::isDormant) .def("getOrigin", &entity::getOrigin) .def("getFlags", &entity::getFlags) .def("isVisible", &entity::isVisible) .scope [ luabind::def("me", &entity::me), luabind::def("<API key>", &entity::<API key>) ] .def(luabind::const_self == luabind::other<entity>()) ); //bind vector lua.registerScope( luabind::class_<vector>("vector") .def(luabind::constructor<float, float, float>()) .def(luabind::constructor<vector&>()) .def(luabind::constructor<>()) .def("toScreen", &vector::toScreen) .def_readwrite("x", &vector::x) .def_readwrite("y", &vector::y) .def_readwrite("z", &vector::z) .def_readwrite("visible", &vector::visible) .def(luabind::const_self == luabind::other<vector>()) .def(luabind::const_self + luabind::other<vector>()) .def(luabind::const_self / float()) ); finishInit(root); } static bool bTextCompare( const BYTE *pData, const char *pCompare ) { for ( ; *pCompare; ++pData, ++pCompare ) if ( *pData != *pCompare ) return false; return true; } char *getInterface( char *pName) { for ( int i = 0; i < csgo->modClient.getLen(); i ++ ) if ( bTextCompare( reinterpret_cast<PBYTE>(csgo->modClient.getStart() + i), pName ) ) { log.write(log.VERB, format("%s\n")%std::string((char*)csgo->modClient.getStart() + i)); return reinterpret_cast<char*>(csgo->modClient.getStart() + i); } return NULL; } CreateInterfaceFn captureFactory(char* mod) { CreateInterfaceFn fn = NULL; while( fn == NULL ) { HMODULE hFactoryModule = GetModuleHandleA( mod ); if( hFactoryModule ) { fn = reinterpret_cast< CreateInterfaceFn >( GetProcAddress( hFactoryModule, "CreateInterface" ) ); } Sleep( (DWORD)10 ); } return fn; } CreateInterfaceFn fnEngine, fnClient, fnVstdlib, fnMatSurface, fnVgui2, appSystemFactory; static ioncsgo* instance; }; ioncsgo* ioncsgo::instance; }
module Oo module Command class SwingCommand def verbs ["SWING"] end def execute(verb, word, inventory, rooms) inventory.thing(word).swing(rooms) if inventory.carrying?(word) end end end end
<?php namespace Reurbano\UserBundle\Form\Backend; use Symfony\Component\Form\FormBuilder; use Symfony\Component\Form\AbstractType; class UserForm extends AbstractType { public function buildForm(FormBuilder $builder, array $options) { $builder ->add('id', 'hidden') ->add('name', 'text', array('max_length' => 100, 'label' => 'Nome', 'required' => false)) ->add('email', 'email', array('label' => 'Email')) ->add('cpf', 'text', array('label' => 'CPF', 'required' => false)) ->add('password', 'password', array( 'label' => 'Senha')) ->add('password2', 'password', array('property_path' => false, 'label' => 'Repita a senha')) ->add('roles', 'choice', array('choices' => array('ROLE_USER' => 'Usuário', 'ROLE_ADMIN' => 'Administrador'), 'required' => true, 'label' => 'Grupo')) ->add('status', 'choice', array( 'label' => 'Ativo', 'required' => true, 'choices' => array('1' => 'Sim', '2' => 'Não'))) ; } public function getDefaultOptions() { return array( 'data_class' => 'Reurbano\UserBundle\Document\User', 'csrf_protection' => true, 'csrf_field_name' => '_token', 'intention' => 'novo_usuario', ); } public function getName() { return 'Userform'; } }
using System; using System.Collections.Generic; using System.Data.Entity; using System.Linq; using System.Web; using DetailWorkflow.Models; using Microsoft.AspNet.Identity.EntityFramework; namespace DetailWorkflow.DataLayer { public class <API key> : IdentityDbContext<ApplicationUser> { public <API key>() : base("DefaultConnection", throwIfV1Schema: false) { } public DbSet<Category> Categories { get; set; } public DbSet<Customer> Customers { get; set; } public DbSet<InventoryItem> InventoryItems { get; set; } public DbSet<Labor> Labors { get; set; } public DbSet<Part> Parts { get; set; } public DbSet<ServiceItem> ServiceItems { get; set; } public DbSet<WorkOrder> WorkOrders { get; set; } protected override void OnModelCreating(DbModelBuilder modelBuilder) { modelBuilder.Configurations.Add(new <API key>()); modelBuilder.Configurations.Add(new <API key>()); modelBuilder.Configurations.Add(new <API key>()); modelBuilder.Configurations.Add(new LabourConfiguration()); modelBuilder.Configurations.Add(new PartConfiguration()); modelBuilder.Configurations.Add(new <API key>()); modelBuilder.Configurations.Add(new <API key>()); modelBuilder.Configurations.Add(new <API key>()); base.OnModelCreating(modelBuilder); } public static <API key> Create() { return new <API key>(); } } }
<?php namespace PaymentSuite\PaylandsBundle\DependencyInjection; use PaymentSuite\PaymentCoreBundle\DependencyInjection\Abstracts\<API key>; use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; /** * Class PaylandsExtension. * * @author Santi Garcia <sgarcia@wearemarketing.com>, <sangarbe@gmail.com> */ class PaylandsExtension extends <API key> { /** * {@inheritdoc} */ public function load(array $configs, ContainerBuilder $container) { $configuration = new Configuration(); $config = $this-><API key>($configuration, $configs); $this->addParameters($container, 'paylands', [ 'api_key' => $config['api_key'], 'signature' => $config['signature'], 'operative' => $config['operative'], 'sandbox' => $config['sandbox'], '<API key>' => $config['<API key>'], 'i18n_template_uuids' => $config['i18n_template_uuids'], 'api_url' => trim($config['sandbox'] ? $config['url_sandbox'] : $config['url'], " \t\n\r\0\x0B/"), 'view_template' => $config['templates']['view'], 'scripts_template' => $config['templates']['scripts'], 'validation_service' => $config['validation_service'], ] ); $this-><API key>($container, 'paylands', [ 'success' => $config['payment_success'], 'failure' => $config['payment_failure'], ] ); $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); $loader->load('services.yml'); $this->registerApiClient($container, $config); } /** * Registers the list of available currency dependant Paylands' services to use. * * @param ContainerBuilder $containerBuilder * @param array $config */ protected function <API key>(ContainerBuilder $containerBuilder, array $config) { $resolverDefinition = $containerBuilder->getDefinition('paymentsuite.paylands.<API key>'); foreach ($config as $option) { $resolverDefinition->addMethodCall('addService', [ $option['currency'], $option['service'], ]); } } /** * Resolves configuration of needed psr-7 interfaces. When null is provided, auto-discovery is used. When * a service key is provided, that service is injected into related services instead. * * @param ContainerBuilder $containerBuilder * @param array $config */ protected function <API key>(ContainerBuilder $containerBuilder, array $config) { $<API key> = $containerBuilder->getDefinition('paymentsuite.paylands.api.request_factory'); $<API key>->addMethodCall('setRequestFactory', [ $config['request_factory'] ? $containerBuilder->getDefinition($config['request_factory']) : null, ]); $<API key> = $containerBuilder->getDefinition('paymentsuite.paylands.api.client_factory'); $<API key>->addMethodCall('setHttpClient', [ $config['http_client'] ? $containerBuilder->getDefinition($config['http_client']) : null, ]); $<API key>->addMethodCall('setUriFactory', [ $config['uri_factory'] ? $containerBuilder->getDefinition($config['uri_factory']) : null, ]); } /** * Registers final API client to use, default or custom. * * @param ContainerBuilder $containerBuilder * @param array $config */ protected function registerApiClient(ContainerBuilder $containerBuilder, $config) { $containerBuilder->setAlias('paymentsuite.paylands.api.client', $config['api_client']); if (Configuration::API_CLIENT_DEFAULT == $config['api_client']) { $this-><API key>($containerBuilder, $config['interfaces']); $this-><API key>($containerBuilder, $config['services']); } } }
using Shouldly; namespace Tests.Caliburn.Actions { using System; using System.Linq; using System.Reflection; using global::Caliburn.Core.Invocation; using global::Caliburn.Core.InversionOfControl; using global::Caliburn.<API key>.Actions; using global::Caliburn.<API key>.Conventions; using global::Caliburn.<API key>.Filters; using global::Caliburn.<API key>.RoutedMessaging; using Xunit; using NSubstitute; public class <API key> : TestBase { <API key> locator; IMethodFactory methodFactory; IMessageBinder messageBinder; IServiceLocator serviceLocator; IConventionManager conventionManager; protected override void <API key>() { methodFactory = Mock<IMethodFactory>(); messageBinder = Mock<IMessageBinder>(); serviceLocator = Mock<IServiceLocator>(); conventionManager = Mock<IConventionManager>(); locator = new <API key>(serviceLocator, methodFactory, messageBinder, conventionManager); } <API key> CreateContext(Type type) { return new <API key>( serviceLocator, type, new FilterManager(type, type, serviceLocator) ); } void ExpectActionCreated<T>() { var method = Mock<IMethod>(); methodFactory.CreateFrom(Arg.Any<MethodInfo>()).Returns(method);//was Arg.NotNull method.Info.Returns(typeof(T).GetMethods().First()); } public class SimpleActionTarget { public void ProcOne() {} public static void ProcTwo() {} } public class <API key> { public void ProcOne() {} public void ProcOne(int i) {} public void ProcOne(int i, double j) {} } public class <API key> { [AsyncAction] public void ProcOne() {} } [Fact] public void <API key>() { ExpectActionCreated<SimpleActionTarget>(); ExpectActionCreated<SimpleActionTarget>(); var result = locator.Locate(CreateContext(typeof(SimpleActionTarget))) .ToList(); result.Count.ShouldBe(2); foreach(var action in result) { action.<API key><SynchronousAction>(); } } [Fact] public void bundles_overloads() { ExpectActionCreated<<API key>>(); ExpectActionCreated<<API key>>(); ExpectActionCreated<<API key>>(); var result = locator.Locate(CreateContext(typeof(<API key>))) .ToList(); result.Count.ShouldBe(1); var overloadAction = result[0] as OverloadedAction; overloadAction.ShouldNotBeNull(); foreach(var action in overloadAction) { action.<API key><SynchronousAction>(); } } [Fact] public void <API key>() { ExpectActionCreated<<API key>>(); var result = locator.Locate(CreateContext(typeof(<API key>))) .ToList(); result.Count.ShouldBe(1); result[0].ShouldBeOfType<AsynchronousAction>(); } [Fact] public void <API key>() { var actions = locator.Locate(CreateContext(typeof(object))) .ToList(); actions.Count.ShouldBe(0); } } }
namespace Vigilant.WebPoker { partial class Form1 { <summary> Required designer variable. </summary> private System.ComponentModel.IContainer components = null; <summary> Clean up any resources being used. </summary> <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code <summary> Required method for Designer support - do not modify the contents of this method with the code editor. </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.splitContainer2 = new System.Windows.Forms.SplitContainer(); this.httpRequestLabel = new System.Windows.Forms.Label(); this.httpRequestTextBox = new System.Windows.Forms.TextBox(); this.ipAddressesTextBox = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); this.pokeButton = new System.Windows.Forms.Button(); this.outputTextBox = new System.Windows.Forms.TextBox(); this.resultImageList = new System.Windows.Forms.ImageList(this.components); this.treeView1 = new System.Windows.Forms.TreeView(); this.splitContainer3 = new System.Windows.Forms.SplitContainer(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit(); this.splitContainer2.Panel1.SuspendLayout(); this.splitContainer2.Panel2.SuspendLayout(); this.splitContainer2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).BeginInit(); this.splitContainer3.Panel1.SuspendLayout(); this.splitContainer3.Panel2.SuspendLayout(); this.splitContainer3.SuspendLayout(); this.SuspendLayout(); // splitContainer1 this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; this.splitContainer1.Location = new System.Drawing.Point(0, 0); this.splitContainer1.Name = "splitContainer1"; this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; // splitContainer1.Panel1 this.splitContainer1.Panel1.Controls.Add(this.splitContainer2); // splitContainer1.Panel2 this.splitContainer1.Panel2.Controls.Add(this.splitContainer3); this.splitContainer1.Panel2.Paint += new System.Windows.Forms.PaintEventHandler(this.<API key>); this.splitContainer1.Size = new System.Drawing.Size(766, 619); this.splitContainer1.SplitterDistance = 221; this.splitContainer1.TabIndex = 0; // splitContainer2 this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; this.splitContainer2.Location = new System.Drawing.Point(0, 0); this.splitContainer2.Name = "splitContainer2"; // splitContainer2.Panel1 this.splitContainer2.Panel1.Controls.Add(this.httpRequestLabel); this.splitContainer2.Panel1.Controls.Add(this.httpRequestTextBox); // splitContainer2.Panel2 this.splitContainer2.Panel2.Controls.Add(this.ipAddressesTextBox); this.splitContainer2.Panel2.Controls.Add(this.pokeButton); this.splitContainer2.Panel2.Controls.Add(this.label1); this.splitContainer2.Size = new System.Drawing.Size(766, 221); this.splitContainer2.SplitterDistance = 615; this.splitContainer2.TabIndex = 0; // httpRequestLabel this.httpRequestLabel.AutoSize = true; this.httpRequestLabel.Location = new System.Drawing.Point(12, 9); this.httpRequestLabel.Name = "httpRequestLabel"; this.httpRequestLabel.Size = new System.Drawing.Size(79, 13); this.httpRequestLabel.TabIndex = 0; this.httpRequestLabel.Text = "HTTP Request"; // httpRequestTextBox this.httpRequestTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.httpRequestTextBox.Font = new System.Drawing.Font("Consolas", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.httpRequestTextBox.Location = new System.Drawing.Point(12, 25); this.httpRequestTextBox.Multiline = true; this.httpRequestTextBox.Name = "httpRequestTextBox"; this.httpRequestTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both; this.httpRequestTextBox.Size = new System.Drawing.Size(600, 193); this.httpRequestTextBox.TabIndex = 1; this.httpRequestTextBox.Text = "GET / HTTP/1.1\r\nHost: www.spotlight.com"; // ipAddressesTextBox this.ipAddressesTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.ipAddressesTextBox.Font = new System.Drawing.Font("Consolas", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.ipAddressesTextBox.Location = new System.Drawing.Point(3, 28); this.ipAddressesTextBox.Multiline = true; this.ipAddressesTextBox.Name = "ipAddressesTextBox"; this.ipAddressesTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; this.ipAddressesTextBox.Size = new System.Drawing.Size(132, 161); this.ipAddressesTextBox.TabIndex = 2; this.ipAddressesTextBox.Text = "10.0.0.192\r\n10.0.0.211\r\n10.0.0.57"; // label1 this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(3, 9); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(103, 13); this.label1.TabIndex = 2; this.label1.Text = "Server IP Addresses"; // pokeButton this.pokeButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.pokeButton.Location = new System.Drawing.Point(3, 195); this.pokeButton.Name = "pokeButton"; this.pokeButton.Size = new System.Drawing.Size(132, 23); this.pokeButton.TabIndex = 3; this.pokeButton.Text = "Poke!"; this.pokeButton.<API key> = true; this.pokeButton.Click += new System.EventHandler(this.pokeButton_Click); // outputTextBox this.outputTextBox.Dock = System.Windows.Forms.DockStyle.Fill; this.outputTextBox.Font = new System.Drawing.Font("Consolas", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.outputTextBox.Location = new System.Drawing.Point(0, 0); this.outputTextBox.Multiline = true; this.outputTextBox.Name = "outputTextBox"; this.outputTextBox.ScrollBars = System.Windows.Forms.ScrollBars.Both; this.outputTextBox.Size = new System.Drawing.Size(507, 394); this.outputTextBox.TabIndex = 2; // resultImageList this.resultImageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit; this.resultImageList.ImageSize = new System.Drawing.Size(16, 16); this.resultImageList.TransparentColor = System.Drawing.Color.Transparent; // treeView1 this.treeView1.Dock = System.Windows.Forms.DockStyle.Fill; this.treeView1.Font = new System.Drawing.Font("Consolas", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.treeView1.Location = new System.Drawing.Point(0, 0); this.treeView1.Name = "treeView1"; this.treeView1.Size = new System.Drawing.Size(255, 394); this.treeView1.TabIndex = 3; this.treeView1.AfterSelect += new System.Windows.Forms.<API key>(this.<API key>); // splitContainer3 this.splitContainer3.Dock = System.Windows.Forms.DockStyle.Fill; this.splitContainer3.Location = new System.Drawing.Point(0, 0); this.splitContainer3.Name = "splitContainer3"; // splitContainer3.Panel1 this.splitContainer3.Panel1.Controls.Add(this.treeView1); // splitContainer3.Panel2 this.splitContainer3.Panel2.Controls.Add(this.outputTextBox); this.splitContainer3.Size = new System.Drawing.Size(766, 394); this.splitContainer3.SplitterDistance = 255; this.splitContainer3.TabIndex = 4; // Form1 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(766, 619); this.Controls.Add(this.splitContainer1); this.Name = "Form1"; this.Text = "Form1"; this.splitContainer1.Panel1.ResumeLayout(false); this.splitContainer1.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit(); this.splitContainer1.ResumeLayout(false); this.splitContainer2.Panel1.ResumeLayout(false); this.splitContainer2.Panel1.PerformLayout(); this.splitContainer2.Panel2.ResumeLayout(false); this.splitContainer2.Panel2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit(); this.splitContainer2.ResumeLayout(false); this.splitContainer3.Panel1.ResumeLayout(false); this.splitContainer3.Panel2.ResumeLayout(false); this.splitContainer3.Panel2.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer3)).EndInit(); this.splitContainer3.ResumeLayout(false); this.ResumeLayout(false); } #endregion private System.Windows.Forms.SplitContainer splitContainer1; private System.Windows.Forms.SplitContainer splitContainer2; private System.Windows.Forms.Label httpRequestLabel; private System.Windows.Forms.TextBox httpRequestTextBox; private System.Windows.Forms.TextBox ipAddressesTextBox; private System.Windows.Forms.Label label1; private System.Windows.Forms.Button pokeButton; private System.Windows.Forms.TextBox outputTextBox; private System.Windows.Forms.ImageList resultImageList; private System.Windows.Forms.TreeView treeView1; private System.Windows.Forms.SplitContainer splitContainer3; } }
using System; using System.Linq; using System.Text; <summary> Write a program that finds the sequence of maximal sum in given array. Example: input | result 2, 3, -6, -1, 2, -1, 6, 4, -8, 8 | 2, -1, 6, 4 Can you do it with only one loop (with single scan through the elements of the array)? </summary> class MaximalSum { static void Main() { // Input Console.Write("Enter Lenght of Array: "); int arrayLength = int.Parse(Console.ReadLine()); // lenght array int[] array = new int[arrayLength]; Console.Write("Enter how many number to sum: "); int elementToSum = int.Parse(Console.ReadLine()); // how many number to sum Console.WriteLine(); if (elementToSum > arrayLength) // check input { Console.WriteLine("Error number to sum is bigger then lenght of array"); return; } Console.WriteLine("Write {0} integer number to Array", arrayLength); for (int index = 0; index < array.Length; index++) // input N number in array { Console.Write("Enter number: "); array[index] = int.Parse(Console.ReadLine()); } // Solution and Output Console.Write("The sum of the {0} largest numbers ( ", elementToSum); array = array.OrderByDescending(x => x).ToArray(); // order number for (int index = 0; index < elementToSum; index++) // print largest number { if (index == elementToSum - 1) // remove last coma { Console.Write("{0} ", array[index]); } else { Console.Write("{0}, ", array[index]); } } Console.WriteLine(") is {0}", array.Take(elementToSum).Sum()); // print sum } }
using System; using System.Collections.Generic; using System.Linq; using System.Reflection; using aaatest.framework; namespace aaatest.executor { public class TestClassCrawler { private readonly ITracer _tracer; private readonly Type _type; public TestClassCrawler(ITracer tracer, Type type) { _tracer = tracer; _type = type; } public IEnumerable<TestCase> EnumerateTests() { _tracer.Debug($"Enumerating tests in {_type.FullName}"); return _type.GetMethods(BindingFlags.Instance | BindingFlags.Public). Where(IsUnitTestMethod). Select(TraceMethodFound). Select(DiscoverTests). SelectMany(SetTestIdentifier). Select(SetTestName). // finally Select(tm => tm.TestCase); } private static IEnumerable<TestWithMethodInfo> SetTestIdentifier(IEnumerable<TestWithMethodInfo> tests) { return tests.Select((test, i) => new TestWithMethodInfo(test.Method, test.TestCase.SetTestIdentifier( $"{test.Method.DeclaringType.FullName}.{test.Method.Name}. )) ); } protected virtual IEnumerable<TestWithMethodInfo> DiscoverTests(MethodInfo method) { IEnumerable<TestCase> testCases; if (method.ReturnType == typeof(TestCase)) testCases = new[] { (TestCase)method.Invoke(Activator.CreateInstance(_type), null) }; else if (method.ReturnType == typeof(IEnumerable<TestCase>)) testCases = (IEnumerable<TestCase>)method.Invoke(Activator.CreateInstance(_type), null); else throw new <API key>(); return testCases. Where(testCase => !testCase.HarnessOnly). Select(testCase => new TestWithMethodInfo(method, testCase)); } private static bool IsUnitTestMethod(MethodInfo method) { return method.ReturnType == typeof(TestCase) || // single test method.ReturnType == typeof(IEnumerable<TestCase>); // multiple tests } private MethodInfo TraceMethodFound(MethodInfo method) { _tracer.Debug($"Discovering {method.Name}"); return method; } private static TestWithMethodInfo SetTestName(TestWithMethodInfo test) { return new TestWithMethodInfo(test.Method, test.TestCase.SetName(test.Method.Name)); } protected struct TestWithMethodInfo { public TestWithMethodInfo(MethodInfo method, TestCase testCase) { Method = method; TestCase = testCase; } public MethodInfo Method { get; } public TestCase TestCase { get; } } } public class TestClassCrawler<T> : TestClassCrawler where T : new() { public TestClassCrawler(ITracer tracer) : base(tracer, typeof(T)) { } } }
// OGVQueue.h // OGVKit #import "OGVKit.h" #import "OGVDecoderOggPacket.h" @interface OGVQueue : NSObject @property (readonly) BOOL empty; - (void)queue:(id)object; - (void)swap:(id)object; - (id)peek; - (id)dequeue; - (void)flush; @end
import React from 'react'; import { GainLoss } from '../../gainloss/GainLoss' export function PositionSymbol(props) { const style = { flexGrow: '1' } return ( <div style={style}> <h2>{ props.position.symbol }</h2> <div>{ props.position.quantity } shares</div> <div>Day:</div> <GainLoss gainLossDollar = { props.position.todayGainLossDollar } gainLossPercentage = { props.position.<API key> } /> </div> ) }
<code>FTELL</code> — Current stream position <h3>Description</h3> Retrieves the current position within an open file. <p>This intrinsic is provided in both subroutine and function forms; however, only one form can be used in any given program unit. <br></p> <h3>Syntax</h3> <p><table summary=""><tbody><tr align="left"><td valign="top" width="80%"><code>CALL FTELL(UNIT, OFFSET)</code> <br></td></tr><tr align="left"><td valign="top" width="80%"><code>OFFSET = FTELL(UNIT)</code> <br></td></tr></tbody></table> <br></p> <h3>Arguments</h3> <p><table summary=""><tbody><tr align="left"><td valign="top" width="15%"><var>OFFSET</var> </td><td valign="top" width="70%">Shall of type <code>INTEGER</code>. <br></td></tr><tr align="left"><td valign="top" width="15%"><var>UNIT</var> </td><td valign="top" width="70%">Shall of type <code>INTEGER</code>. <br></td></tr></tbody></table> <br></p> <h3>Return value</h3> In either syntax, <var>OFFSET</var> is set to the current offset of unit number <var>UNIT</var>, or to -1 if the unit is not currently open. <br> <h3>Example</h3> <code class="smallexample" syntax="Packages/Fortran/grammars/FortranModern.sublime-syntax"> <br>PROGRAM test_ftell <br>  INTEGER :: i <br>  OPEN(10, FILE="temp.dat") <br>  CALL ftell(10,i) <br>  WRITE(*,*) i <br>END PROGRAM</code> <br> <h3>Standard</h3> GNU extension <br> <h3>Class</h3> Subroutine, function <br> <h3>See also</h3> <a href="FSEEK.html#FSEEK">FSEEK</a>
#include "StdAfx.h" #include "LogFile.h" CLogFile::CLogFile(void) : m_hFile(0), m_dwError(0) { } CLogFile::~CLogFile(void) { if (m_hFile) { CloseHandle(m_hFile); m_dwError = GetLastError(); m_hFile = 0; } } int CLogFile::OpenLogFile (wchar_t *pFilePath) { DWORD dwDesiredAccess = 0; DWORD dwShareMode = 0; DWORD <API key> = 0; DWORD <API key> = 0; dwDesiredAccess |= GENERIC_WRITE; dwShareMode |= FILE_SHARE_READ|FILE_SHARE_WRITE; <API key> = CREATE_ALWAYS; <API key> = <API key> | <API key> | <API key>; if (m_hFile) { CloseHandle(m_hFile); m_dwError = GetLastError(); m_hFile = 0; } m_hFile = CreateFile (pFilePath, dwDesiredAccess, dwShareMode, NULL, <API key>, <API key>, 0 ); m_dwError = GetLastError(); return 0; } int CLogFile::OpenLogFileIfClosed (wchar_t *pFilePath) { if (m_hFile == 0) { OpenLogFile (pFilePath); } return 0; } int CLogFile::PrintLog (wchar_t *pLogLine) { DWORD dwBytes = wcslen (pLogLine) * sizeof(wchar_t); DWORD <API key> = 0; if (m_hFile) { WriteFile(m_hFile, pLogLine, dwBytes, &<API key>, NULL); } return 0; }
<!-- start: PAGE TITLE --> <section id="page-title"> <div class="row"> <div class="col-sm-8"> <h1 class="mainTitle" translate="sidebar.nav.forms.WIZARD">{{ mainTitle }}</h1> <span class="mainDescription">Using simple Angular.js guidelines you can turn a form into a multi-step form wizard</span> </div> <div ncy-breadcrumb></div> </div> </section> <!-- end: PAGE TITLE --> <!-- start: WIZARD DEMO --> <div class="container-fluid container-fullw bg-white"> <div class="row"> <div class="col-md-12"> <h5 class="over-title margin-bottom-15">Wizard <span class="text-bold">demo</span></h5> <p> Some textboxes in this example is required. </p> <!-- /// controller: 'WizardCtrl' - localtion: assets/js/controllers/wizardCtrl.js /// --> <div ng-controller="WizardCtrl"> <!-- start: WIZARD FORM --> <form name="Form" id="form" novalidate> <div id="wizard" class="swMain"> <!-- start: WIZARD SEPS --> <ul> <li ng-click="form.goTo(Form, 1)"> <a href ng-class="{'selected' : currentStep >= 1, 'done' : currentStep > 1}"> <div class="stepNumber"> 1 </div> <span class="stepDesc text-small"> Personal Information </span> </a> </li> <li ng-click="form.goTo(Form, 2)"> <a href ng-class="{'selected' : currentStep >= 2, 'done' : currentStep > 2}"> <div class="stepNumber"> 2 </div> <span class="stepDesc text-small"> Create an account </span> </a> </li> <li ng-click="form.goTo(Form, 3)"> <a href ng-class="{'selected' : currentStep >= 3, 'done' : currentStep > 3}"> <div class="stepNumber"> 3 </div> <span class="stepDesc text-small"> Billing details </span> </a> </li> <li ng-click="form.goTo(Form, 4)"> <a href ng-class="{'selected' : currentStep >= 4, 'done' : currentStep > 4}"> <div class="stepNumber"> 4 </div> <span class="stepDesc text-small"> Complete </span> </a> </li> </ul> <!-- end: WIZARD SEPS --> <!-- start: WIZARD STEP 1 --> <div id="step-1" ng-show="currentStep == 1"> <div class="row"> <div class="col-md-5"> <div class="padding-30"> <h2 class="StepTitle"><i class="ti-face-smile fa-2x text-primary block margin-bottom-10"></i> Enter your personal information</h2> <p> This is an added measure against fraud and to help with billing issues. </p> <p class="text-small"> Enter security questions in case you lose access to your account. </p> </div> </div> <div class="col-md-7"> <fieldset> <legend> Personal Information </legend> <div class="row"> <div class="col-md-6"> <div class="form-group" ng-class="{'has-error':Form.firstName.$dirty && Form.firstName.$invalid, 'has-success':Form.firstName.$valid}"> <label> First Name <span class="symbol required"></span> </label> <input type="text" placeholder="Enter your First Name" class="form-control" name="firstName" ng-model="myModel.firstName" ng-required="currentStep == 1"/> <span class="error text-small block" ng-if="Form.firstName.$dirty && Form.firstName.$invalid">First Name is required</span> <span class="success text-small" ng-if="Form.firstName.$valid">Thank You!</span> </div> </div> <div class="col-md-6"> <div class="form-group" ng-class="{'has-error':Form.lastName.$dirty && Form.lastName.$invalid, 'has-success':Form.lastName.$valid}"> <label class="control-label"> Last Name <span class="symbol required"></span> </label> <input type="text" placeholder="Enter your Last Name" class="form-control" name="lastName" ng-model="myModel.lastName" ng-required="currentStep == 1" /> <span class="error text-small block" ng-if="Form.lastName.$dirty && Form.lastName.$invalid">Last Name is required</span> <span class="success text-small" ng-if="Form.lastName.$valid">Wonderful!</span> </div> </div> </div> <div class="row"> <div class="col-md-6"> <div class="form-group"> <label class="block"> Gender </label> <div class="clip-radio radio-primary"> <input type="radio" id="wz-female" name="gender" value="female" ng-model="myModel.gender"> <label for="wz-female"> Female </label> <input type="radio" id="wz-male" name="gender" value="male" ng-model="myModel.gender"> <label for="wz-male"> Male </label> </div> </div> </div> <div class="col-md-6"> <div class="form-group"> <label> Choose your country or region </label> <select class="form-control" name="country" ng-model="myModel.country"> <option value="">&nbsp;</option> <option value="AL">Alabama</option> <option value="AK">Alaska</option> <option value="AZ">Arizona</option> <option value="AR">Arkansas</option> <option value="CA">California</option> <option value="CO">Colorado</option> <option value="CT">Connecticut</option> <option value="DE">Delaware</option> <option value="FL">Florida</option> <option value="GA">Georgia</option> <option value="HI">Hawaii</option> <option value="ID">Idaho</option> <option value="IL">Illinois</option> <option value="IN">Indiana</option> <option value="IA">Iowa</option> <option value="KS">Kansas</option> <option value="KY">Kentucky</option> <option value="LA">Louisiana</option> <option value="ME">Maine</option> <option value="MD">Maryland</option> <option value="MA">Massachusetts</option> <option value="MI">Michigan</option> <option value="MN">Minnesota</option> <option value="MS">Mississippi</option> <option value="MO">Missouri</option> <option value="MT">Montana</option> <option value="NE">Nebraska</option> <option value="NV">Nevada</option> <option value="NH">New Hampshire</option> <option value="NJ">New Jersey</option> <option value="NM">New Mexico</option> <option value="NY">New York</option> <option value="NC">North Carolina</option> <option value="ND">North Dakota</option> <option value="OH">Ohio</option> <option value="OK">Oklahoma</option> <option value="OR">Oregon</option> <option value="PA">Pennsylvania</option> <option value="RI">Rhode Island</option> <option value="SC">South Carolina</option> <option value="SD">South Dakota</option> <option value="TN">Tennessee</option> <option value="TX">Texas</option> <option value="UT">Utah</option> <option value="VT">Vermont</option> <option value="VA">Virginia</option> <option value="WA">Washington</option> <option value="WV">West Virginia</option> <option value="WI">Wisconsin</option> <option value="WY">Wyoming</option> </select> </div> </div> </div> <p> <a href popover="Your personal information is not required for unlawful purposes, but only in order to proceed in this tutorial" popover-placement="top" popover-title="Don't worry!"> Why do you need my personal information? </a> </p> </fieldset> <fieldset> <legend> Security question </legend> <p> Enter security questions in case you lose access to your account. <span class="text-small block">Be sure to pick questions that you will remember the answers to.</span> </p> <accordion close-others="oneAtATime" class="accordion"> <accordion-group is-open="question1.open"> <accordion-heading> What was the name of your first stuffed animal? <i class="pull-right" ng-class="{'ti-angle-down': question1.open, 'ti-angle-right': !question1.open}"></i> </accordion-heading> <div class="form-group"> <input type="text" class="form-control" name="stuffedAnimal" ng-model="myModel.stuffedAnimal" placeholder="Enter the the name of your first stuffed animal"> </div> </accordion-group> <accordion-group is-open="question2.open"> <accordion-heading> What is your grandfather's first name? <i class="pull-right" ng-class="{'ti-angle-down': question2.open, 'ti-angle-right': !question2.open}"></i> </accordion-heading> <div class="form-group"> <input type="text" class="form-control" name="grandfatherName" ng-model="myModel.grandfatherName" placeholder="Enter your grandfather's first name"> </div> </accordion-group> <accordion-group is-open="question3.open"> <accordion-heading> In what city your grandmother live? <i class="pull-right" ng-class="{'ti-angle-down': question3.open, 'ti-angle-right': !question3.open}"></i> </accordion-heading> <div class="form-group"> <input type="text" class="form-control" name="grandmotherCity" ng-model="myModel.grandmotherCity" placeholder="Enter your grandfather's first name"> </div> </accordion-group> </accordion> </fieldset> <div class="form-group"> <button class="btn btn-primary btn-o next-step btn-wide pull-right" ng-click="form.next(Form)"> Next <i class="fa <API key>"></i> </button> </div> </div> </div> </div> <!-- end: WIZARD STEP 1 --> <!-- start: WIZARD STEP 2 --> <div id="step-2" ng-show="currentStep == 2"> <div class="row"> <div class="col-md-5"> <div class="padding-30"> <h2 class="StepTitle">Create an account <span class="text-large block">to manage everything you do with ng-Clip</span></h2> <p> You’ll enjoy personal services and great benefits including: </p> <p class="text-small"> <ul class="no-margin"> <li> Access to exclusive releases and limited products. </li> <li> ng-Clip services, benefits and promotions. </li> </ul> </p> </div> </div> <div class="col-md-7"> <fieldset> <legend> Account Credential </legend> <div class="form-group" ng-class="{'has-error':Form.email.$dirty && Form.email.$invalid, 'has-success':Form.email.$valid}"> <label class="control-label"> Email <span class="symbol required"></span> </label> <input type="email" placeholder="Enter a valid E-mail" class="form-control" name="email" ng-model="myModel.email" ng-required="currentStep == 2"> <span class="error text-small block" ng-if="Form.email.$dirty && Form.email.$error.required">Email is required.</span> <span class="error text-small block" ng-if="Form.email.$error.email">Please, enter a valid email address.</span> <span class="success text-small" ng-if="Form.email.$valid">It's a valid e-mail!</span> </div> <div class="row"> <div class="col-md-6"> <div class="form-group" ng-class="{'has-error':Form.password.$dirty && Form.password.$invalid, 'has-success':Form.password.$valid}"> <label class="control-label"> Password <span class="symbol required"></span> </label> <input type="password" placeholder="Enter a Password" class="form-control" name="password" ng-model="myModel.password" ng-required="currentStep == 2"/> <span class="error text-small block" ng-if="Form.password.$dirty && Form.password.$error.required">Password is required.</span> <span class="success text-small block" ng-if="Form.password.$valid">Ok!</span> </div> </div> <div class="col-md-6"> <div class="form-group" ng-class="{'has-error':Form.password2.$dirty && Form.password2.$error.compareTo || Form.password2.$dirty && Form.password2.$invalid, 'has-success':Form.password2.$valid}"> <label class="control-label"> Repeat Password <span class="symbol required"></span> </label> <input type="password" placeholder="Repeat Password" class="form-control" name="password2" ng-model="myModel.password2" compare-to="myModel.password" ng-required="currentStep == 2"/> <span class="error text-small block" ng-if="Form.password2.$dirty && Form.password2.$error.required">Repeat password is required!</span> <span class="error text-small block" ng-if="Form.password2.$dirty && Form.password2.$error.compareTo">Passwords do not match!</span> <span class="success text-small block" ng-if="Form.password2.$valid">Passwords match!</span> </div> </div> </div> </fieldset> <div class="form-group"> <button class="btn btn-primary btn-o back-step btn-wide pull-left" ng-click="form.prev(Form)"> <i class="fa <API key>"></i> Back </button> <button class="btn btn-primary btn-o next-step btn-wide pull-right" ng-click="form.next(Form)"> Next <i class="fa <API key>"></i> </button> </div> </div> </div> </div> <!-- end: WIZARD STEP 2 --> <!-- start: WIZARD STEP 3 --> <div id="step-3" ng-show="currentStep == 3"> <div class="row"> <div class="col-md-5"> <div class="padding-30"> <h2 class="StepTitle">Enter billing details</h2> <p class="text-large"> You will need to enter your billing address and select your payment method. </p> <p class="text-small"> You can use most major credit card, as well as PayPal. </p> </div> </div> <div class="col-md-7"> <fieldset> <legend> Payment Method </legend> <label> Payment type </label> <div class="form-group"> <div class="btn-group"> <label class="btn btn-primary btn-sm" ng-model="myModel.paymentMethod" btn-radio="'creditcard'"> <i class="fa fa-cc-visa" ></i> <i class="fa fa-cc-mastercard" ></i> Credit Card </label> <label class="btn btn-primary btn-sm" ng-model="myModel.paymentMethod" btn-radio="'paypal'"> <i class="fa fa-cc-paypal" ></i> PayPal </label> </div> </div> <div class="form-group"> <label> Card Number </label> <input type="text" class="form-control" name="cardNumber" ng-model="myModel.cardNumber" placeholder="Enter Your Card Number"> </div> <label> Expires </label> <div class="row"> <div class="col-md-4 col-sm-6"> <div class="form-group"> <select class="cs-select cs-skin-slide" ng-model="myModel.expiresMonth"> <option value="" disabled>Month</option> <option value="January">January</option> <option value="February">February</option> <option value="March">March</option> <option value="April">April</option> <option value="May">May</option> <option value="June">June</option> <option value="July">July</option> <option value="August">August</option> <option value="September">September</option> <option value="October">October</option> <option value="November">November</option> <option value="December">December</option> </select> </div> </div> <div class="col-md-4 col-sm-6"> <div class="form-group"> <select class="cs-select cs-skin-slide" ng-model="myModel.expiresYear"> <option value="" disabled>Year</option> <option value="2015">2015</option> <option value="2016">2016</option> <option value="2017">2017</option> <option value="2018">2018</option> <option value="2019">2019</option> <option value="2020">2020</option> </select> </div> </div> </div> <div class="row"> <div class="col-xs-12"> <label> Security code </label> <div class="row"> <div class="col-xs-3"> <div class="form-group"> <input type="text" class="form-control" name="securityCode" placeholder="Security code" ng-model="myModel.securityCode"> </div> </div> <span class="help-inline col-xs-4"> <a href popover="The security code is a three-digit number on the back of your credit card, immediately following your main card number." popover-placement="top" popover-title="How to find the security code"><i class="ti-help-alt text-large text-primary"></i></a> </span> </div> </div> </div> </fieldset> <div class="form-group"> <button class="btn btn-primary btn-o back-step btn-wide pull-left" ng-click="form.prev(Form)"> <i class="fa <API key>"></i> Back </button> <button class="btn btn-primary btn-o next-step btn-wide pull-right" ng-click="form.next(Form)"> Next <i class="fa <API key>"></i> </button> </div> </div> </div> </div> <!-- end: WIZARD STEP 3 --> <!-- start: WIZARD STEP 4 --> <div id="step-4" ng-show="currentStep == 4"> <div class="row"> <div class="col-md-12"> <div class="text-center"> <h1 class=" ti-check block text-primary"></h1> <h2 class="StepTitle">Congratulations!</h2> <p class="text-large"> Your tutorial is complete. </p> <p class="text-small"> Thank you for your registration. Your transaction has been completed, and a receipt for your purchase has been emailed to you. You may log into your account to view details of this transaction. </p> <a class="btn btn-primary btn-o" href ng-click="form.goTo(Form, 1)"> Back to first step </a> </div> </div> </div> </div> <!-- end: WIZARD STEP 4 --> </div> <pre class="code margin-top-20">{{ myModel | json }}</pre> </form> <!-- end: WIZARD FORM --> </div> </div> </div> </div> <!-- start: WIZARD DEMO -->
module Lambdalib class Routes def self.add_hooks(router) router.instance_exec do mount Lambdalib::Engine => '/lambda' end end end end
module Middleman::Sitemap class Template attr_accessor :page, :options, :locals, :blocks, :request_path def initialize(page) @page = page @options = {} @locals = {} @blocks = [] end def path page.path end def source_file page.source_file end def store page.store end def app store.app end def ext page.ext end def touch app.cache.remove(:metadata, source_file) end def metadata metadata = app.cache.fetch(:metadata, source_file) do data = { :options => {}, :locals => {}, :page => {}, :blocks => [] } app.provides_metadata.each do |callback, matcher| next if !matcher.nil? && !source_file.match(matcher) result = app.instance_exec(source_file, &callback) data = data.deep_merge(result) end data end app.<API key>.each do |callback, matcher| if matcher.is_a? Regexp next if !self.request_path.match(matcher) elsif matcher.is_a? String next if "/#{self.request_path}" != matcher end result = app.instance_exec(self.request_path, &callback) if result.has_key?(:blocks) metadata[:blocks] << result[:blocks] result.delete(:blocks) end metadata = metadata.deep_merge(result) end metadata end def render(opts={}, locs={}, &block) puts "== Render Start: #{source_file}" if app.logging? md = metadata.dup opts = options.deep_merge(md[:options]).deep_merge(opts) locs = locals.deep_merge(md[:locals]).deep_merge(locs) # Forward remaining data to helpers if md.has_key?(:page) app.data.store("page", md[:page]) end blocks.compact.each do |block| app.instance_eval(&block) end md[:blocks].flatten.compact.each do |block| app.instance_eval(&block) end app.instance_eval(&block) if block_given? result = app.render_template(source_file, locs, opts) puts "== Render End: #{source_file}" if app.logging? result end end end
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>mathcomp-analysis: 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 / mathcomp-analysis - 0.3.1</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> mathcomp-analysis <small> 0.3.1 <span class="label label-info">Not compatible </span> </small> </h1> <p> <em><script>document.write(moment("2021-12-16 13:27:32 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-16 13:27:32 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 1 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.07.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.07.1 Official release 4.07.1 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;pierre-yves@strub.nu&quot; homepage: &quot;https://github.com/math-comp/analysis&quot; bug-reports: &quot;https://github.com/math-comp/analysis/issues&quot; dev-repo: &quot;git+https://github.com/math-comp/analysis.git&quot; license: &quot;CECILL-C&quot; authors: [ &quot;Reynald Affeldt&quot; &quot;Cyril Cohen&quot; &quot;Assia Mahboubi&quot; &quot;Damien Rouhling&quot; &quot;Pierre-Yves Strub&quot; ] build: [ [make &quot;INSTMODE=global&quot; &quot;config&quot;] [make &quot;-j%{jobs}%&quot;] ] install: [ [make &quot;install&quot;] ] depends: [ &quot;coq&quot; {(&gt;= &quot;8.10&quot; &amp; &lt; &quot;8.12~&quot;) | (= &quot;dev&quot;)} &quot;<API key>&quot; {(&gt;= &quot;1.0.0&quot;)} &quot;coq-mathcomp-field&quot; {(&gt;= &quot;1.11.0&quot; &amp; &lt; &quot;1.12~&quot;)} &quot;coq-mathcomp-finmap&quot; {(&gt;= &quot;1.5.0&quot; &amp; &lt; &quot;1.6~&quot;)} ] synopsis: &quot;An analysis library for mathematical components&quot; description: &quot;&quot;&quot; This repository contains an experimental library for real analysis for the Coq proof-assistant and using the Mathematical Components library. It is inspired by the Coquelicot library. &quot;&quot;&quot; tags: [ &quot;category:Mathematics/Real Calculus and Topology&quot; &quot;keyword: analysis&quot; &quot;keyword: topology&quot; &quot;keyword: real numbers&quot; &quot;logpath: mathcomp.analysis&quot; &quot;date:2020-06-11&quot; ] url { http: &quot;https://github.com/math-comp/analysis/archive/0.3.1.tar.gz&quot; checksum: &quot;sha512=f2844551078450858081ece35d213571b56a34351378e4f7d808f9f21028651c227bf9b629be536318e2b8bca66e56027b04a279ad23ea650461efafbb46c74c&quot; } </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 <API key>.0.3.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&#39;t be met: - <API key> -&gt; coq &gt;= dev no matching version Your request can&#39;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 <API key>.0.3.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>
import * as ko from 'knockout'; import {getMessage} from '../services/messageService'; import {IMessage} from 'messageInterface'; class BaseView { protected message: any = ko.observable(); protected type: any = ko.observable(); protected displayMessage: any = ko.observable(false); constructor () { this.showMessage(); } public showMessage() :void { let message: IMessage = getMessage(); if(message != null) { this.displayMessage(true); this.message(message.content); this.type(message.type); } } } export = BaseView;
using System.Collections.Generic; using MockingData.Model; namespace MockingData.LocationData.CountryData { public class Norway : Country { public Norway(int countryId) : base(countryId) { Name = "Norway"; CodeIsoAlpha2 = "NO"; Currency = "NOK"; GeoCoordinate = new GeoCoordinate(60.472024, 8.468946); HasCompleteData = false; TitlesLocalizedMale = new List<string> {}; <API key> = new List<string> {}; FirstNamesMale = new List<string> {}; FirstNamesFemale = new List<string> {}; LastNames = new List<string> {}; States = new List<State> { new State { Code = "", Name = "", <API key> = 0, Population = 0, Country = this, Cities = new List<City> { new City {Name = "", Population = 102000, IsStateCapital = true} } } }; } } }
from collections import defaultdict, OrderedDict from typing import Callable class HookRegistry: def __init__(self): self.hooks = defaultdict(OrderedDict) def register(self, name: str, func: Callable): self.hooks[name][func] = True def run_hook(self, name: str, *args, **kwargs): return_val = None for hook in self.hooks[name]: result = hook(*args, **kwargs) if result is not None: return_val = result return return_val registry = HookRegistry()
//! Rsure is a set of utilities for capturing information about files, and later verifying it is //! still true. //! The easiest way to use Rsure is to build the `rsure` executable contained in this crate. This //! program allows you to use most of the functionality of the crate. //! However, it is also possible to use the crate programmatically. At the top level of the crate //! as some utility functions for the most common operations. //! For example, to scan a directory or do an update use `update`. //! This example makes use of several of the building blocks necessary to use the store. First is //! the store itself. `parse_store` is able to decode options that are passed to the command line. //! it is also possible to build a `store::Plain` store directly. //! Next are the tags for the snapshot. Generally, this should hold some kind of information about //! the snapshot itself. For the `Plain` store, it can be just an empty map. Other store types //! may require certain tags to be present. #![warn(bare_trait_objects)] use std::{fs::File, path::Path}; pub use crate::{ errors::{Error, Result}, hashes::Estimate, node::{ compare_trees, fs, load_from, HashCombiner, HashUpdater, NodeWriter, ReadIterator, Source, SureNode, }, progress::{log_init, Progress}, show::show_tree, store::{parse_store, Store, StoreTags, StoreVersion, TempLoader, Version}, suretree::AttMap, }; mod errors; mod escape; mod hashes; pub mod node; mod progress; mod show; mod store; mod surefs; mod suretree; // Some common operations, abstracted here. Perform an update scan, using the given store. If 'update' is true, use the hashes from a previous run, otherwise perform a fresh scan. Depending on the [`Store`] type, the tags may be kept, or ignored. [`Store`]: trait.Store.html A simple example: ```rust # use std::error::Error; # fn try_main() -> Result<(), Box<Error>> { let mut tags = rsure::StoreTags::new(); tags.insert("name".into(), "sample".into()); let store = rsure::parse_store("2sure.dat.gz")?; rsure::update(".", &*store, false, &tags)?; # fn main() { # try_main().unwrap(); ``` pub fn update<P: AsRef<Path>>( dir: P, store: &dyn Store, is_update: bool, tags: &StoreTags, ) -> Result<()> { let dir = dir.as_ref(); let mut estimate = Estimate { files: 0, bytes: 0 }; let tmp = if is_update { // In update mode, first tmp file is just the scan. let scan_temp = { let mut tmp = store.make_temp()?; let src = fs::scan_fs(dir)?; node::save_to(&mut tmp, src)?; tmp } .into_loader()?; let latest = store.load_iter(Version::Latest)?; let tmp = { let mut tmp = store.make_temp()?; let loader = Loader(&*scan_temp); let combiner = HashCombiner::new(latest, loader.iter()?)?.inspect(|node| { if let Ok(n @ SureNode::File { .. }) = node { if n.needs_hash() { estimate.files += 1; estimate.bytes += n.size(); } } }); node::save_to(&mut tmp, combiner)?; tmp }; tmp } else { let mut tmp = store.make_temp()?; let src = fs::scan_fs(dir)?.inspect(|node| { if let Ok(n @ SureNode::File { .. }) = node { if n.needs_hash() { estimate.files += 1; estimate.bytes += n.size(); } } }); node::save_to(&mut tmp, src)?; tmp } .into_loader()?; // TODO: If this is an update, pull in hashes from the old version. // Update any missing hashes. let loader = Loader(&*tmp); let hu = HashUpdater::new(loader, store); // TODO: This will panic on non-unicode directories. let hm = hu.compute_parallel(dir.to_str().unwrap(), &estimate)?; let mut tmp2 = store.make_new(tags)?; hm.merge(&mut NodeWriter::new(&mut tmp2)?)?; tmp2.commit()?; Ok(()) } struct Loader<'a>(&'a dyn TempLoader); impl<'a> Source for Loader<'a> { fn iter(&self) -> Result<Box<dyn Iterator<Item = Result<SureNode>> + Send>> { let rd = File::open(self.0.path_ref())?; Ok(Box::new(load_from(rd)?)) } }
var R = require('../source/index.js'); var eq = require('./shared/eq.js'); var list = ['a', 'b', 'c', 'd', 'e', 'f']; describe('move', function() { it('moves an element from an index to another', function() { eq(R.move(0, 1, list), ['b', 'a', 'c', 'd', 'e', 'f']); eq(R.move(2, 1, list), ['a', 'c', 'b', 'd', 'e', 'f']); eq(R.move(-1, 0, list), ['f', 'a', 'b', 'c', 'd', 'e']); eq(R.move(0, -1, list), ['b', 'c', 'd', 'e', 'f', 'a']); }); it('does nothing when indexes are outside the list outbounds', function() { eq(R.move(-20, 2, list), list); eq(R.move(20, 2, list), list); eq(R.move(2, 20, list), list); eq(R.move(2, -20, list), list); eq(R.move(20, 20, list), list); eq(R.move(-20, -20, list), list); }); });
/* Circuit script by lem()ntea. Please do not copy my code. */ //Block definations //Warning: edting this could make error(s). var SWITCH_ENABLED = 22 //Lapis lazuli block var SWITCH_DISABLED = 20 //Glass var WIRE_ENABLED = 41; //Gold block var WIRE_DISABLED = 42; //Iron block function useItem(x, y, z, b, i, s){ if(b == SWITCH_ENABLED){ net.zhuoweizhang.mcpelauncher.ScriptManager.nativeSetTile(x, y, z, SWITCH_DISABLED, 0); } else if(b == SWITCH_DISABLED){ net.zhuoweizhang.mcpelauncher.ScriptManager.nativeSetTile(x, y, z, SWITCH_ENABLED, 0); } }
<?php $environments = array( 'local' => array('http://localhost*', '*.dev'), ); // The path to the application directory. $paths['app'] = './'; // The path to the Laravel directory. $paths['sys'] = '../laravel'; // The path to the bundles directory. $paths['bundle'] = './bundles'; // END OF USER CONFIGURATION. HERE BE DRAGONS!
using System.Collections.Immutable; namespace LanguageService.Formatting.Ruling { internal class RuleDescriptor { internal RuleDescriptor(ImmutableArray<SyntaxKind> tokenLeft, ImmutableArray<SyntaxKind> tokenRight) { this.TokenRangeLeft = tokenLeft; this.TokenRangeRight = tokenRight; } internal RuleDescriptor(ImmutableArray<SyntaxKind> tokenLeft, SyntaxKind tokenRight) : this(tokenLeft, ImmutableArray.Create(tokenRight)) { } internal RuleDescriptor(SyntaxKind tokenLeft, ImmutableArray<SyntaxKind> tokenRight) : this(ImmutableArray.Create(tokenLeft), tokenRight) { } internal RuleDescriptor(SyntaxKind tokenLeft, SyntaxKind tokenRight) : this(ImmutableArray.Create(tokenLeft), ImmutableArray.Create(tokenRight)) { } internal ImmutableArray<SyntaxKind> TokenRangeLeft { get; } internal ImmutableArray<SyntaxKind> TokenRangeRight { get; } } }
var mirror = { 'top left': 'top right', 'top right': 'top left', 'bottom left': 'bottom right', 'bottom right': 'bottom left', 'left': 'right', 'right': 'left', 'top': 'bottom', 'bottom': 'top' } function isWindow (element) { return obj != null && obj === obj.window } function outerWidth (el) { var width = el.offsetWidth var style = getComputedStyle(el) width += parseInt(style.marginLeft) + parseInt(style.marginRight) return width } function offsets (element) { if (!element) { return { top: -99999, left: -99999 } } var rect = element.<API key>() return { top: rect.top + document.body.scrollTop, left: rect.left + document.body.scrollLeft } } module.exports = function calculatePosition (element, options) { var position = options.position.toLowerCase() var target = document.querySelector(options.selector) var offset = offsets(target) var offsetX = options.offset ? options.offset.x : 5 var offsetY = options.offset ? options.offset.y : 10 var targetWidth = target ? outerWidth(target) : 0 var targetHeight = target ? target.offsetHeight : 0 var boundTop = window.pageXOffset var boundLeft = window.pageYOffset var boundRight = boundLeft + window.outerWidth var boundBottom = boundTop + window.outerHeight var elementWidth = element ? outerWidth(element) : 0 var elementHeight = element ? element.offsetHeight : 0 var positions = { 'top left': { x: offset.top - offsetY, y: offset.left - (elementWidth + offsetX) }, 'top right': { x: offset.top - offsetY, y: offset.left + targetWidth - offsetX }, 'top': { x: offset.top - offsetY, y: offset.left + (targetWidth / 2) - (offsetX / 2) }, 'bottom left': { x: offset.top + targetHeight - offsetY, y: offset.left - (elementWidth + offsetX) }, 'bottom right': { x: offset.top + targetHeight - offsetY, y: offset.left + targetWidth - offsetX }, 'bottom': { x: offset.top + targetHeight - offsetY, y: offset.left + (targetWidth / 2) - (offsetX / 2) }, 'left': { x: offset.top + (targetHeight / 2) - (offsetY / 2), y: offset.left - (elementWidth + offsetX) }, 'right': { x: offset.top + (targetHeight / 2) - (offsetY / 2), y: offset.left + targetWidth - offsetX } } return positions[position] }
namespace SampleApplication.ReadModel.Notes { using Ewancoder.DDD.Interfaces; using Domain.Notes.Events; internal sealed class NoteHandler //: IEventHandler<NoteCreated>, : IEventHandler<NoteCreatedV2>, IEventHandler<NoteArchived>, IEventHandler<NoteNameChanged>, IEventHandler<NoteBodyChanged> { private readonly NoteStore _store; public NoteHandler(NoteStore store) { _store = store; } /*public void Handle(NoteCreated @event) { _store.Notes.Add(@event.StreamId, new Note { Id = @event.StreamId, Name = @event.Name, Body = string.Empty }); }*/ public void Handle(NoteCreatedV2 @event) { _store.Notes.Add(@event.StreamId, new Note { Id = @event.StreamId, Name = @event.Name, Body = string.Empty }); } public void Handle(NoteArchived @event) { _store.Notes.Remove(@event.StreamId); } public void Handle(NoteNameChanged @event) { _store.Notes[@event.StreamId].Name = @event.Name; } public void Handle(NoteBodyChanged @event) { _store.Notes[@event.StreamId].Body = @event.Body; } } }
# <API key>: true module Mako class Errors attr_accessor :messages def initialize @messages = [] end # Add an error message to the messages array # @param [String] def add_error(msg) messages << msg end # Predicate method to see if there are any error messages # @return [Boolean] def any? messages.count.positive? end end end
# php8-composer Alpine image with php8 and composer installed. You can use it to install composer dependencies in your project: console $ docker run --rm --user $(id -u) -v $(pwd):/app -w /app iras/php8-composer composer install
// <auto-generated/> #nullable disable using System.Text.Json; using System.Threading; using System.Threading.Tasks; using Azure; using Azure.Core; using Azure.ResourceManager; namespace Azure.ResourceManager.AppService { internal class <API key> : IOperationSource<<API key>> { private readonly ArmClient _client; internal <API key>(ArmClient client) { _client = client; } <API key> IOperationSource<<API key>>.CreateResult(Response response, Cancellation<API key>) { using var document = JsonDocument.Parse(response.ContentStream); var data = MSDeployStatusData.<API key>(document.RootElement); return new <API key>(_client, data); } async ValueTask<<API key>> IOperationSource<<API key>>.CreateResultAsync(Response response, Cancellation<API key>) { using var document = await JsonDocument.ParseAsync(response.ContentStream, default, cancellationToken).ConfigureAwait(false); var data = MSDeployStatusData.<API key>(document.RootElement); return new <API key>(_client, data); } } }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>coqeal: 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.6 / coqeal - 1.1.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> coqeal <small> 1.1.0 <span class="label label-info">Not compatible </span> </small> </h1> <p> <em><script>document.write(moment("2022-01-01 06:30:20 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-01-01 06:30:20 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-num base Num library distributed with the OCaml compiler base-threads base base-unix base camlp5 7.14 <API key> of OCaml conf-findutils 1 Virtual package relying on findutils conf-perl 1 Virtual package relying on perl coq 8.6 Formal proof management system num 0 The Num library for arbitrary-precision integer and rational arithmetic ocaml 4.03.0 The OCaml compiler (virtual package) ocaml-base-compiler 4.03.0 Official 4.03.0 release ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;Cyril Cohen &lt;cyril.cohen@inria.fr&gt;&quot; homepage: &quot;https://github.com/coq-community/coqeal&quot; dev-repo: &quot;git+https://github.com/coq-community/coqeal.git&quot; bug-reports: &quot;https://github.com/coq-community/coqeal/issues&quot; license: &quot;MIT&quot; synopsis: &quot;CoqEAL - The Coq Effective Algebra Library&quot; description: &quot;&quot;&quot; This Coq library contains a subset of the work that was developed in the context of the ForMath EU FP7 project (2009-2013). It has two parts: - theory, which contains developments in algebra including normal forms of matrices, and optimized algorithms on MathComp data structures. - refinements, which is a framework to ease change of data representations during a proof.&quot;&quot;&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] depends: [ &quot;coq&quot; {&gt;= &quot;8.10&quot; &amp; &lt; &quot;8.15~&quot;} &quot;coq-bignums&quot; &quot;coq-paramcoq&quot; {&gt;= &quot;1.1.3&quot;} &quot;<API key>&quot; {((&gt;= &quot;1.5.1&quot; &amp; &lt; &quot;1.7~&quot;) | = &quot;dev&quot;)} &quot;<API key>&quot; {((&gt;= &quot;1.12.0&quot; &amp; &lt; &quot;1.14~&quot;) | = &quot;dev&quot;)} &quot;<API key>&quot; {(&gt;= &quot;1.1.2&quot; &amp; &lt; &quot;1.2~&quot;) | (= &quot;dev&quot;)} ] tags: [ &quot;category:Computer Science/Decision Procedures and Certified Algorithms/Correctness proofs of algorithms&quot; &quot;keyword:effective algebra&quot; &quot;keyword:elementary divisor rings&quot; &quot;keyword:Smith normal form&quot; &quot;keyword:mathematical components&quot; &quot;keyword:Bareiss&quot; &quot;keyword:Karatsuba multiplication&quot; &quot;keyword:refinements&quot; &quot;logpath:CoqEAL&quot; ] authors: [ &quot;Guillaume Cano&quot; &quot;Cyril Cohen&quot; &quot;Maxime Dénès&quot; &quot;Anders Mörtberg&quot; &quot;Damien Rouhling&quot; &quot;Pierre Roux&quot; &quot;Vincent Siles&quot; ] url { src: &quot;https://github.com/coq-community/coqeal/archive/refs/tags/1.1.0.tar.gz&quot; checksum: &quot;sha512=cc96712cb552802e31952513a05c943be4eeef2ca30e6bb0ffc808c1ce63b09b0648ec92d97a71c84cecbbe2b097d8050108df3688acd777fcf9c25fc7545b1f&quot; } </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-coqeal.1.1.0 coq.8.6</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.6). The following dependencies couldn&#39;t be met: - coq-coqeal -&gt; coq &gt;= 8.10 -&gt; ocaml &gt;= 4.05.0 base of this switch (use `--unlock-base&#39; to force) 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-coqeal.1.1.0</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>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>finger-tree: 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.15.0 / finger-tree - 8.10.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> finger-tree <small> 8.10.0 <span class="label label-info">Not compatible </span> </small> </h1> <p> <em><script>document.write(moment("2022-02-24 00:18:42 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-02-24 00:18:42 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.15.0 Formal proof management system dune 3.0.2 Fast, portable, and opinionated build system ocaml 4.11.2 The OCaml compiler (virtual package) ocaml-base-compiler 4.11.2 Official release 4.11.2 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.3 A library manager for OCaml zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;Hugo.Herbelin@inria.fr&quot; homepage: &quot;http://mattam.org/research/russell/fingertrees.en.html&quot; license: &quot;LGPL&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/FingerTree&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.10&quot; &amp; &lt; &quot;8.11~&quot;} ] tags: [ &quot;keyword: data structures&quot; &quot;keyword: dependent types&quot; &quot;keyword: Finger Trees&quot; &quot;category: Computer Science/Data Types and Data Structures&quot; &quot;date: 2009-02&quot; ] authors: [ &quot;Matthieu Sozeau &lt;mattam@mattam.org&gt; [http://mattam.org]&quot; ] bug-reports: &quot;https://github.com/coq-contribs/finger-tree/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/finger-tree.git&quot; synopsis: &quot;Dependent Finger Trees&quot; description: &quot;&quot;&quot; A verified generic implementation of Finger Trees&quot;&quot;&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/finger-tree/archive/v8.10.0.tar.gz&quot; checksum: &quot;md5=<API key>&quot; } </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-finger-tree.8.10.0 coq.8.15.0</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.15.0). The following dependencies couldn&#39;t be met: - coq-finger-tree -&gt; coq &lt; 8.11~ -&gt; ocaml &lt; 4.10 base of this switch (use `--unlock-base&#39; to force) 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-finger-tree.8.10.0</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>
class CreateResponses < ActiveRecord::Migration def change create_table :responses do |t| t.belongs_to :user t.belongs_to :question t.string :participant_choice t.timestamps end end end
get '/guesses/:guess_id' do |guess_id| @guess = Guess.find(guess_id) @user_attempt = params[:attempt] @card = @guess.card deck = Deck.find(@card.deck_id) @round = Round.find(session[:round_id]) available_cards = (deck.cards - @round.done_cards) if available_cards.empty? redirect "/rounds/#{@round.id}" else @next_card = available_cards.sample erb :'guess/show' end end post '/guesses' do @card = Card.find_by(id: params[:card_id]) @correct = @card.correct?(params[:guess]) round = Round.find(session[:round_id]) # round = Round.find_by(user_id: session[:user_id]) round.guesses.create(card_id: @card.id, round_id: round.id, is_correct: @correct) new_guess = round.guesses.last.id redirect "guesses/#{new_guess}?attempt=#{params[:guess]}" end
#include <stdio.h> #include <fcntl.h> // for open #include <unistd.h> // for close #include <sys/mman.h> #include <string.h> const char str[] = "Hello World"; int main(int argc, char const *argv[]) { char* memory; int file_len = strlen(str); int fd = open( "hello.txt" , O_RDWR | O_CREAT ); memory = mmap(NULL, file_len+1, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); printf("%p\n", memory); if (memory == (void*)-1) { printf("\n"); return -1; } strncpy( memory, str, file_len ); munmap( memory, file_len+1 ); close( fd ); return 0; }
const Button = FocusComponents.common.button.action.component; const ButtonSample = React.createClass({ /** * Render the component. * @return {object} React node */ render() { return ( <div className='button-example'> <Button label='Bouton primaire' type='button' handleOnClick={()=> alert('click bouton')}/> <br /><br /> <Button icon='alarm' color='colored' label='Bouton primaire' shape='fab' type='button' handleOnClick={()=> alert('click bouton')}/> <br /><br /> <Button icon='build' label='Bouton icone' type='button' handleOnClick={()=> alert('click bouton')}/> <br /><br /> <Button icon='build' color='accent' label='Bouton accent' type='button' handleOnClick={()=> alert('click bouton')}/> <br /><br /> <Button icon='mood' color='colored' label='iconbutton' shape='icon' type='button' handleOnClick={()=> alert('click bouton')}/> <br /><br /> <Button icon='mood' label='minifabbutton' color='announcement' shape='mini-fab' type='button' handleOnClick={()=> alert('click bouton')}/> </div> ); } }); return <ButtonSample/>;
layout: post title: "12/01 - Rose" description: Will's Socks for Friday, December 1st date: 2017-12-01 img: 2017-12-01_rose.jpg author: Scott Shepard
// <auto-generated> // This code was generated from a template. // Manual changes to this file may cause unexpected behavior in your application. // Manual changes to this file will be overwritten if the code is regenerated. // </auto-generated> namespace PizzaStoreData.DataAccess { using System; using System.Collections.Generic; public partial class PaymentType { [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:<API key>")] public PaymentType() { this.PizzaOrders = new HashSet<PizzaOrder>(); } public int PaymentTypeID { get; set; } public string PaymentTypeName { get; set; } public bool Active { get; set; } [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:<API key>")] public virtual ICollection<PizzaOrder> PizzaOrders { get; set; } } }
package routers import ( "code.google.com/p/go.crypto/bcrypt" "github.com/codegangsta/martini-contrib/render" "github.com/martini-contrib/sessions" "labix.org/v2/mgo" "labix.org/v2/mgo/bson" "net/http" ) func AdminPassword(r render.Render, s sessions.Session) { r.HTML(200, "admin/password", map[string]interface{}{ "IsPassword": true}, render.HTMLOptions{Layout: "admin/layout"}) } func AdminUpdatePassword(req *http.Request, r render.Render, db *mgo.Database) { pass := req.FormValue("password") verify := req.FormValue("verify") if pass == verify { hashedPass, _ := bcrypt.<API key>([]byte(pass), bcrypt.DefaultCost) info, err := db.C("id").Upsert(bson.M{"email": "admin@vim-tips.com"}, bson.M{"$set": bson.M{"password": hashedPass, "email": "admin@vim-tips.com"}}) if err == nil { if info.Updated >= 0 { r.HTML(200, "admin/password", map[string]interface{}{ "IsPost": true, "IsPassword": true, "IsSuccess": true}, render.HTMLOptions{Layout: "admin/layout"}) } } } else { r.HTML(200, "admin/password", map[string]interface{}{ "IsPost": true, "IsPassword": true, "IsSuccess": false}, render.HTMLOptions{Layout: "admin/layout"}) } }
layout: page title: "Polu Chen" comments: true description: "blanks" keywords: "Polu Chen,CU,Boulder" <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <script src="https://dl.dropboxusercontent.com/s/pc42nxpaw1ea4o9/highcharts.js?dl=0"></script> <!-- <script src="../assets/js/highcharts.js"></script> --> <style type="text/css">@font-face { font-family: "Bebas Neue"; src: url(https: } h1.Bebas { font-family: "Bebas Neue", Verdana, Tahoma; } </style> </head> # TEACHING INFORMATION **College**: College of Arts and Sciences **Classes taught**: ECON 1078 # ECON 1078: MATH TOOLS FOR ECON 1 **Terms taught**: Spring 2008, Fall 2008, Spring 2009 **Instructor rating**: 4.58 **Standard deviation in instructor rating**: 0.12 **Average grade** (4.0 scale): 2.87 **Standard deviation in grades** (4.0 scale): 0.06 **Average workload** (raw): 2.02 **Standard deviation in workload** (raw): 0.32
module API module Helpers module InternalHelpers # Project paths may be any of the following: # * /repository/storage/path/namespace/project # * /namespace/project # * namespace/project # In addition, they may have a '.git' extension and multiple namespaces # Transform all these cases to 'namespace/project' def clean_project_path(project_path, storages = Gitlab.config.repositories.storages.values) project_path = project_path.sub(/\.git\z/, '') storages.each do |storage| storage_path = File.expand_path(storage['path']) if project_path.start_with?(storage_path) project_path = project_path.sub(storage_path, '') break end end project_path.sub(/\A\ end def project_path @project_path ||= clean_project_path(params[:project]) end def wiki? @wiki ||= project_path.end_with?('.wiki') && !Project.find_by_full_path(project_path) end def project @project ||= begin # Check for *.wiki repositories. # Strip out the .wiki from the pathname before finding the # the wiki repository as well. project_path.chomp!('.wiki') if wiki? Project.find_by_full_path(project_path) end end def ssh_<API key> [ :read_project, :download_code, :push_code ] end def parse_env return {} if params[:env].blank? JSON.parse(params[:env]) rescue JSON::ParserError {} end def log_user_activity(actor) commands = Gitlab::GitAccess::DOWNLOAD_COMMANDS ::Users::ActivityService.new(actor, 'Git SSH').execute if commands.include?(params[:action]) end end end end
// addon/components/mixins/has_property.js import Ember from 'ember'; // A mixin that enriches a view that is attached to a model property. // The property name by default is taken from the parentView unless explictly // defined in the `property` variable. // This mixin also binds a property named `errors` to the model's `model.errors.@propertyName` array export default Ember.Mixin.create({ property: void 0, propertyName: (function() { if (this.get('property')) { return this.get('property'); } else if (this.get('parentView.property')) { return this.get('parentView.property'); } else { return Ember.assert(false, 'Property could not be found.'); } }).property('parentView.property'), init: function() { this._super(); return Ember.Binding.from('model.errors.' + this.get('propertyName')).to('errors').connect(this); } });
package main import ( "net/http" "strings" ) func isHTTPS(r *http.Request) bool { if r.URL.Scheme == "https" { return true } if strings.HasPrefix(r.Proto, "HTTPS") { return true } if r.Header.Get("X-Forwarded-Proto") == "https" { return true } return false } func ForceHTTPS(h http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { url := r.URL if !isHTTPS(r) { url.Scheme = "https" url.Host = r.Host http.Redirect(w, r, url.String(), http.<API key>) return } h.ServeHTTP(w, r) }) }
#pragma once #ifndef <API key> #define <API key> #include "core/globals.h" #include "rendersystem/irenderer.h" #include "inputsystem/mousehandler.h" #include "gui/guiskin.h" namespace clearsky { class CLEARSKY_API Mouse { public: Mouse(GUISkin *guiskin); ~Mouse(); void update(); void show(); void reloadSkin(); void getCurPos(int &x, int &y); double getDeltaX(); double getDeltaY(); bool isVisible(); void setVisible(bool visible); bool isButtonDown(int keyCode); private: bool m_visible; MouseHandler *m_mouseHandler; ITexture2D *m_mouseTexture; IRenderer *m_renderer; GUISkin *m_guiskin; int m_posX; int m_posY; int m_lastPosX; int m_lastPosY; int m_width; int m_height; }; } #endif
package technology.tabula; import org.junit.Before; import org.junit.Test; import java.awt.geom.Line2D; import java.awt.geom.Rectangle2D; import static org.junit.Assert.*; public class TestCohenSutherland { private Rectangle2D clipWindow; private <API key> algorithm; private static final double DELTA = 0.001; @Before public void set() { clipWindow = new Rectangle(10, 10, 50, 50); algorithm = new <API key>(clipWindow); } // TODO: How to parameterize the tests? @Test public void <API key>() { Line2D.Float line = new Line2D.Float(20, 20, 30, 30); assertTrue(algorithm.clip(line)); assertEquals(20, line.x1, DELTA); assertEquals(20, line.y1, DELTA); assertEquals(30, line.x2, DELTA); assertEquals(30, line.y2, DELTA); } @Test public void <API key>() { float x1 = 3, y1 = 13, x2 = 6, y2 = 16; Line2D.Float line = new Line2D.Float(x1, y1, x2, y2); assertFalse(algorithm.clip(line)); assertEquals(x1, line.x1, DELTA); assertEquals(y1, line.y1, DELTA); assertEquals(x2, line.x2, DELTA); assertEquals(y2, line.y2, DELTA); } @Test public void <API key>() { float x1 = 15, y1 = 5, x2 = 25, y2 = 2; Line2D.Float line = new Line2D.Float(x1, y1, x2, y2); assertFalse(algorithm.clip(line)); assertEquals(x1, line.x1, DELTA); assertEquals(y1, line.y1, DELTA); assertEquals(x2, line.x2, DELTA); assertEquals(y2, line.y2, DELTA); } @Test public void <API key>() { float x1 = 65, y1 = 15, x2 = 70, y2 = 20; Line2D.Float line = new Line2D.Float(x1, y1, x2, y2); assertFalse(algorithm.clip(line)); assertEquals(x1, line.x1, DELTA); assertEquals(y1, line.y1, DELTA); assertEquals(x2, line.x2, DELTA); assertEquals(y2, line.y2, DELTA); } @Test public void <API key>() { float x1 = 15, y1 = 65, x2 = 25, y2 = 70; Line2D.Float line = new Line2D.Float(x1, y1, x2, y2); assertFalse(algorithm.clip(line)); assertEquals(x1, line.x1, DELTA); assertEquals(y1, line.y1, DELTA); assertEquals(x2, line.x2, DELTA); assertEquals(y2, line.y2, DELTA); } @Test public void <API key>() { float x1 = 5, y1 = 25, x2 = 25, y2 = 5; Line2D.Float line = new Line2D.Float(x1, y1, x2, y2); assertTrue(algorithm.clip(line)); assertEquals(10, line.x1, DELTA); assertEquals(20, line.y1, DELTA); assertEquals(20, line.x2, DELTA); assertEquals(10, line.y2, DELTA); } @Test public void <API key>() { float x1 = 15, y1 = 15, x2 = 25, y2 = 5; Line2D.Float line = new Line2D.Float(x1, y1, x2, y2); assertTrue(algorithm.clip(line)); assertEquals(x1, line.x1, DELTA); assertEquals(y1, line.y1, DELTA); assertEquals(20, line.x2, DELTA); assertEquals(10, line.y2, DELTA); } }
#!/usr/bin/python import math import numpy as np class Gesture(object): def __init__(self,name): self.name=name def getName(self): return self.name def set_palm(self,hand_center,hand_radius): self.hand_center=hand_center self.hand_radius=hand_radius def set_finger_pos(self,finger_pos): self.finger_pos=finger_pos self.finger_count=len(finger_pos) def calc_angles(self): self.angle=np.zeros(self.finger_count,dtype=int) for i in range(self.finger_count): y = self.finger_pos[i][1] x = self.finger_pos[i][0] self.angle[i]=abs(math.atan2((self.hand_center[1]-y),(x-self.hand_center[0]))*180/math.pi) def DefineGestures(): dict={} V=Gesture("V") V.set_palm((475,225),45) V.set_finger_pos([(490,90),(415,105)]) V.calc_angles() dict[V.getName()]=V L_right=Gesture("L_right") L_right.set_palm((475,225),50) L_right.set_finger_pos([(450,62),(345,200)]) L_right.calc_angles() dict[L_right.getName()]=L_right Index_Pointing=Gesture("Index_Pointing") Index_Pointing.set_palm((480,230),43) Index_Pointing.set_finger_pos([(475,102)]) Index_Pointing.calc_angles() dict[Index_Pointing.getName()]=Index_Pointing return dict def CompareGestures(src1,src2): if(src1.finger_count==src2.finger_count): if(src1.finger_count==1): angle_diff=src1.angle[0]-src2.angle[0] if(angle_diff>20): result=0 else: len1 = np.sqrt((src1.finger_pos[0][0]- src1.hand_center[0])**2 + (src1.finger_pos[0][1] - src1.hand_center[1])**2) len2 = np.sqrt((src2.finger_pos[0][0]- src2.hand_center[0])**2 + (src2.finger_pos[0][1] - src2.hand_center[1])**2) length_diff=len1/len2 radius_diff=src1.hand_radius/src2.hand_radius length_score=abs(<API key>) if(length_score<0.09): result=src2.getName() else: result=0 else: angle_diff=[] for i in range(src1.finger_count): angle_diff.append(src1.angle[i]-src2.angle[i]) angle_score=max(angle_diff)-min(angle_diff) if(angle_score<15): length_diff=[] for i in range(src1.finger_count): len1 = np.sqrt((src1.finger_pos[i][0]- src1.hand_center[0])**2 + (src1.finger_pos[i][1] - src1.hand_center[1])**2) len2 = np.sqrt((src2.finger_pos[i][0]- src2.hand_center[0])**2 + (src2.finger_pos[i][1] - src2.hand_center[1])**2) length_diff.append(len1/len2) length_score=max(length_diff)-min(length_diff) if(length_score<0.06): result=src2.getName() else: result=0 else: result=0 else: result=0 return result def DecideGesture(src,GestureDictionary): result_list=[] for k in GestureDictionary.keys(): src2='"'+k+'"' result=CompareGestures(src,GestureDictionary[k]) if(result!=0): return result return "NONE"
<HTML><HEAD> <TITLE>Review for Train To Pakistan (1998)</TITLE> <LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css"> </HEAD> <BODY BGCOLOR="#FFFFFF" TEXT="#000000"> <H1 ALIGN="CENTER" CLASS="title"><A HREF="/Title?0170704">Train To Pakistan (1998)</A></H1><H3 ALIGN=CENTER>reviewed by<BR><A HREF="/ReviewsBy?Murali+Krishnan">Murali Krishnan</A></H3><HR WIDTH="40%" SIZE="4"> <PRE><HR></PRE> <PRE>Train to Pakistan</PRE> <P>[Screened at the Cinequest Film Festival 9, San Jose]</P> <P>[3.0/4.0] (dialog in Hindi, English subtitles)</P> <P>The Punjab in 1947 pre-partition India is a powder keg. As the British are about to pull out of their colonial holding, there are many people who would like to have a new, single country, but instead sectarian and ethnic prejudice is apparently going to create two new states -- the predominantly Muslim Pakistan and the predominantly Hindu and Sikh India. The unfortunate side effect of this is that many people living on their ancestral lands are going to find themselves on the wrong side of the new border, since the Punjab itself is being split in the middle. Mano Majra is a fairly typical village; peaceful and quiet. Although its classes are stratified into the unequal distribution of Sikh landlords and Muslim laborers, this economic division has not been a source of tension. Both communities coexist peacefully, but there are storm clouds on the horizon.</P> <P>The communist party has sent the earnest Iqbal to organize worker and discourage sectarian violence with the ultimate goal of keeping India united. The local moneylender has been robbed and murdered, so the police initially suspect the newcomer and detain him. There have also been many agitators travelling the countryside who are encouraging the Muslims to fight the Hindus and Sikhs, and vice versa. Because of this, the local magistrate thinks maybe he can pin the crime on insurgent Muslim bandits (although he knows it was really done by local Sikh bandits) and connect Iqbal to them as an agitator. In jail, Iqbal meets Jagga Singh, one of the local Sikh bandits who is following in the general profession of his ancestors. Jagga is in love with Nooran, the daughter of a Muslim peasant, but their union is doomed because of the difference of their ethnicity, although Jagga naively declares that he is neither Sikh nor Muslim, but only a bandit.</P> <P>The magistrate is the narrator of the story, but is a flawed protagonist. His main goal is to maintain peace and order in the district, but he is perfectly willing to sacrifice few innocents. But can this action be condemned? If he does not act, it appears a wholesale slaughter is possible, as a trainload of dead Hindus and Sikhs sent from Pakistan demonstrates. His cold-heartedness is apparently the result of the loss of his family. The death of his daughter (we are not told how she died, but violence is intimated) is a ghost that has swallowed his spirit. As a surrogate for both his daughter and his wife, he detains a young itinerant dancing girl. The girl herself symbolically represents the lost innocence of the subcontinent. Ultimately the magistrate realizes that he must send the girl with the other Muslims who are fleeing to Pakistan for their own safety.</P> <P>The story is based on the novel by Kurshwant Singh. Anyone familiar with the history of the events will recognize this as an accurate depiction of all the factors leading to the tragedy; from the ability of radicals to exploit longstanding ethnic differences to the way a small spark of unrest can quickly escalate into an inferno, and to the way those who wish to control the situation are rendered into helpless observers. The main problem with the film is that it is too ambitious. Since this is a novel adapted to a screenplay, it tries to fit as much of the narrative of the original work into the running length of a film.</P> <P>Recommended. The drama can be heavy-handed, but that is not unusual for Indian productions. It does accurately portray the many aspects of the issues it presents.</P> <PRE><HR></PRE> <PRE>(c) 1999 Murali Krishnan The Art House Squatter <A HREF="http: <P> <A HREF="http: <HR><P CLASS=flush><SMALL>The review above was posted to the <A HREF="news:rec.arts.movies.reviews">rec.arts.movies.reviews</A> newsgroup (<A HREF="news:de.rec.film.kritiken">de.rec.film.kritiken</A> for German reviews).<BR> The Internet Movie Database accepts no responsibility for the contents of the review and has no editorial control. Unless stated otherwise, the copyright belongs to the author.<BR> Please direct comments/criticisms of the review to relevant newsgroups.<BR> Broken URLs inthe reviews are the responsibility of the author.<BR> The formatting of the review is likely to differ from the original due to ASCII to HTML conversion. </SMALL></P> <P ALIGN=CENTER>Related links: <A HREF="/Reviews/">index of all rec.arts.movies.reviews reviews</A></P> </P></BODY></HTML>
using Newtonsoft.Json; using Newtonsoft.Json.Linq; namespace Wicture.DbRESTFul { public class CSIItem { public string name { get; set; } public string module { get; set; } public JToken code { get; set; } public string resultSet { get; set; } public bool queryOnly { get; set; } public bool requiredTransaction { get; set; } public JObject middleWares { get; set; } public static CSIItem Clone(CSIItem codeItem) { var result = new CSIItem { name = codeItem.name, requiredTransaction = codeItem.requiredTransaction, resultSet = codeItem.resultSet, queryOnly = codeItem.queryOnly, middleWares = codeItem.middleWares }; result.code = codeItem.code is JValue ? new string(codeItem.code.ToString().ToCharArray()) : JsonConvert.DeserializeObject<JToken>(codeItem.code.ToString()); return result; } public static CSIItem Build(string code, bool queryOnly = true, bool requiredTransaction = false) { var result = new CSIItem { name = "Dynamic", requiredTransaction = requiredTransaction, resultSet = "M", queryOnly = queryOnly, code = code }; return result; } } }
requirejs.config({ paths: { 'text': '../lib/require/text', 'durandal':'../lib/durandal/js', 'plugins' : '../lib/durandal/js/plugins', 'transitions' : '../lib/durandal/js/transitions', 'knockout': '../lib/knockout/knockout-3.1.0', 'bootstrap': '../lib/bootstrap/js/bootstrap', 'jquery': '../lib/jquery/jquery-1.9.1', 'bluebird': '../lib/bluebird/bluebird.min', 'pouchdb':'../lib/pouchdb/pouchdb-3.3.1.min', 'helpers': './helpers', 'domain':'./data/domain', 'services': './data/services', 'model': './data/model' }, shim: { 'bootstrap': { deps: ['jquery'], exports: 'jQuery' }, 'pouchdb':{ exports: 'PouchDB' } } }); define(['bluebird','helpers/kohelpers','durandal/system', 'durandal/app', 'durandal/viewLocator'], function (Promise,ko,system, app, viewLocator) { //>>excludeStart("build", true); system.debug(true); //>>excludeEnd("build"); app.title = 'InfoApp Application'; app.configurePlugins({ router:true, dialog: true }); app.start().then(function() { //Replace 'viewmodels' in the moduleId with 'views' to locate the view. //Look for partial views in a 'views' folder in the root. viewLocator.useConvention(); //Show the app by setting the root view model for our application with a transition. app.setRoot('viewmodels/shell', 'entrance'); }); });
package com.owera.xaps.web.app.page.staging; import java.util.Map; import com.owera.xaps.web.app.input.Input; import com.owera.xaps.web.app.input.InputData; /** * The Class <API key>. */ public class <API key> extends InputData { /** The model name. */ private Input modelName = Input.getStringInput("modelname"); /** The distributor name. */ private Input distributorName = Input.getStringInput("distributorname"); /** The version number. */ private Input versionNumber = Input.getStringInput("versionnumber"); /** The taiwan. */ private Input taiwan = Input.getFileInput("taiwan"); /** The new distributor name. */ private Input newDistributorName = Input.getStringInput("distributor"); /** The distributor. */ private Input distributor = Input.getStringInput("distributor"); /* (non-Javadoc) * @see com.owera.xaps.web.app.input.InputData#bindForm(java.util.Map) */ @Override public void bindForm(Map<String, Object> root) { // TODO Auto-generated method stub } /* (non-Javadoc) * @see com.owera.xaps.web.app.input.InputData#validateForm() */ @Override public boolean validateForm() { // TODO Auto-generated method stub return false; } /** * Gets the model name. * * @return the model name */ public Input getModelName() { return modelName; } /** * Sets the model name. * * @param modelName the new model name */ public void setModelName(Input modelName) { this.modelName = modelName; } /** * Gets the distributor name. * * @return the distributor name */ public Input getDistributorName() { return distributorName; } /** * Sets the distributor name. * * @param distributorName the new distributor name */ public void setDistributorName(Input distributorName) { this.distributorName = distributorName; } /** * Gets the version number. * * @return the version number */ public Input getVersionNumber() { return versionNumber; } /** * Sets the version number. * * @param versionNumber the new version number */ public void setVersionNumber(Input versionNumber) { this.versionNumber = versionNumber; } /** * Gets the taiwan. * * @return the taiwan */ public Input getTaiwan() { return taiwan; } /** * Sets the taiwan. * * @param taiwan the new taiwan */ public void setTaiwan(Input taiwan) { this.taiwan = taiwan; } /** * Gets the new distributor name. * * @return the new distributor name */ public Input <API key>() { return newDistributorName; } /** * Sets the new distributor name. * * @param newDistributorName the new new distributor name */ public void <API key>(Input newDistributorName) { this.newDistributorName = newDistributorName; } /** * Gets the distributor. * * @return the distributor */ public Input getDistributor() { return distributor; } /** * Sets the distributor. * * @param distributor the new distributor */ public void setDistributor(Input distributor) { this.distributor = distributor; } }
# <API key>: true require_relative '../../test_helper' # Test AutomationObject::BluePrint::HashAdapter class <API key> < Minitest::Test def setup AutomationObject::BluePrint.adapter = :hash AutomationObject::BluePrint::HashAdapter::Top.skip_validations = true @hash_adapter = AutomationObject::BluePrint::HashAdapter.build end def teardown AutomationObject::BluePrint.adapter = :hash AutomationObject::BluePrint::HashAdapter::Top.skip_validations = false end def test_new assert_instance_of AutomationObject::BluePrint::Composite::Top, @hash_adapter end end
<?php return array( 'advertisement' => 'إعلان', 'subcategory' => 'التصنيف الفرعي', 'heading_title' => 'اضافة الاعلان', 'post_free_ad' => 'اضافة اعلان مجانا', 'general' => 'العامة', 'hotselling' => 'الأكثر بيعا', 'title' => 'العنوان', 'currency_id' => 'العملة', 'mobile' => 'محمول', 'phone' => 'الهاتف', 'fax' => 'فاكس', 'email' => 'البريد الالكترونى', 'web' => 'الموقع الالكتروني', 'details' => 'التفاصيل', 'image' => 'صورة', 'submit' => 'تقديم', 'waiting_approval' => 'فى انتظار الموافقة', 'approved' => 'تم الموافقة', 'blocked' => 'محجوب', 'expired' => 'منتهية الصلاحية', 'rejected' => 'رفض', 'billing' => 'الدفع', 'points' => 'النقاط', 'points_expired' => 'النقاط منتهية الصلاحية!. <a target="_blank" href=":url">اضافة نقاط الان</a>', 'created_at' => 'تاريخ الإضافة', 'updated_at' => 'تاريخ االتعديل', 'category' => 'التصنيف', 'location' => 'الموقع', 'description' => 'وصف', 'view_details' => 'تفاصيل', 'Featured' => 'متميز', 'Share' => 'مشاركة', 'add' => 'إضافة إلى قائمة المشاهدة', 'Report' => 'تقارير', 'Condition' => 'الحالة', 'Used' => 'مستعملة', 'Brand' => 'ماركة', 'Model' => 'نموذج', 'productType' => 'نوع المنتج', 'Date' => 'التاريخ', 'Price' => 'السعر', 'Specifications' => 'مواصفات', 'alert' => 'إنشاء تنبيه', 'RelatedAds' => 'إعلانات ذات صلة', 'address' => 'العنوان', 'featuredAds' => 'إعلانات مميزة', 'recentAds' => 'الإعلانات الحديثة', 'tips' => 'نصائح السلامة للصفقة', 'AdId' => 'رقم الإعلان', 'categories' => 'التصنيفات', 'visits' => 'الزيارات', 'recent_ads' => 'الإعلانات الحالية', 'properties' => 'خصائص', 'features' => 'ميزات', 'map' => 'حدد موقعك علي الخريطة', '<API key>' => 'أين تود أن يكون إعلانك؟', '<API key>' => 'اختار تصنيف فرعي واحد', 'add_advertisement' => 'إضافة إعلان', 'balance' => 'الرصيد', 'current_balance' => 'الرصيد الحالي', 'new_balance' => 'الرصيد الجديد', '<API key>' => 'إضافة إلى التصنيف الرئيسي', 'add_to' => 'اضف إلي', '<API key>' => 'اكتمال اختيار التصنيف.', 'additional_info' => 'معلومات اضافية', 'price_to' => 'السعر إلى', 'mobile_no' => 'رقم المحمول.', 'phone_no' => 'رقم الهاتف', 'min_quantity' => 'حد أدنى من كمية', 'term_delivery_id' => 'أجل التسليم', 'company' => 'الشركة', 'company_name' => 'اسم الشركة', 'company_address' => 'عنوان الشركة', 'company_phone_no' => 'رقم هاتف الشركة', 'company_website' => 'موقع الشركة على شبكة الانترنت', 'company_size_id' => 'حجم الشركة', 'company_over_view' => 'نظرة عامة على الشركة', 'requirements' => 'الاحتياجات', 'contact_email' => 'البريد الالكترونى لجهة الاتصال', 'career_level_id' => 'المستوى الوظيفي', 'work_experience_id' => 'الخبرة المهنية', 'education_level_id' => 'مستوى التعليم', '<API key>' => 'الحالة الوظيفية', 'gender_id' => 'نوع الجنس', 'salary' => 'الراتب', 'salary_from' => 'الراتب من', 'salary_to' => 'الراتب إلى', 'degree_short' => 'شهادة علمية', 'doctor_name' => 'اسم الطبيب', 'practice_name' => 'اسم الممارسة', 'specialization' => 'التخصصات العامة', 'about_doctor' => 'عن الطبيب', 'clinics' => 'عيادة', 'clinic_name' => 'اسم العيادة', 'clinic_mobile_no' => 'رقم جوال العيادة', 'clinic_phone_no' => 'رقم هاتف العيادة', 'education' => 'التعليم', 'college_name' => 'اسم الكلية', 'start_date' => 'تاريخ البدء', 'end_date' => 'تاريخ الانتهاء', 'memberships' => 'العضوية فى الرابطات', 'interval' => 'الفاصل الزمنى', 'founded_date' => 'تاريخ التأسيس', 'exhibition_info' => 'معلومات المعرض', 'venue_country_id' => 'مكان البلاد', 'venue_name' => 'اسم المكان', 'from_time' => 'من الوقت', 'to_time' => 'الى وقت', 'from_price' => 'من السعر', 'to_price' => 'إلى السعر', 'space' => 'المساحة', 'hours' => 'ساعات', 'advertiser_name' => 'صاحب الإعلان', 'Services' => 'خدمات', 'my_services' => 'خدماتي', 'cost_of_services' => 'سعر الخدمة', 'service' => 'الخدمة', 'service_cost' => 'السعر', 'play_video' => 'تشغيل الفيديو', 'like_ad' => 'إعجاب', 'status' => 'الحالة', 'comments' => 'التعليقات', 'video_filename' => 'رابط يوتيوب', 'like_title' => 'إعجاب', 'un_like_title' => 'حذف الإعجاب', 'like_message' => 'تم بنجاح.', 'un_like_message' => 'تم حذف الإعجاب بنجاح.', 'video' => 'فيديو', 'work_experience' => 'الخبرة العملية', 'not_like_message' => 'مشكلة في الإعجاب', 'not_like_title' => 'مشكلة في الإعجاب', 'gender' => 'الجنس', 'education_level' => 'المستوى التعليمي', 'career_level' => 'المستوى الوظيفي', 'added_by' => 'تم إضافته بواسطة:', 'about' => 'حول', 'album' => 'الألبوم', 'membership' => 'العضوية', 'userimg' => 'صورة المستخدم', 'username'=>'اسم المستخدم', 'storeimg'=>'صورة المتجر', 'storetitle'=> 'عنوان المتجر' );
<!DOCTYPE HTML PUBLIC "- <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_112-google-v7) on Fri Oct 20 16:52:52 PDT 2017 --> <title>Qualifiers</title> <meta name="date" content="2017-10-20"> <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../script.js"></script> </head> <body> <script type="text/javascript"><! try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Qualifiers"; } } catch(err) { } var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":10,"i8":10,"i9":9,"i10":10}; var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; var activeTableTab = "activeTableTab"; </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <div class="topNav"><a name="navbar.top"> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <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 class="navBarCell1Rev">Class</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><a href="../../../org/robolectric/res/PluralRules.html" title="class in org.robolectric.res"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../../org/robolectric/res/RawResourceLoader.html" title="class in org.robolectric.res"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../index.html?org/robolectric/res/Qualifiers.html" target="_top">Frames</a></li> <li><a href="Qualifiers.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../allclasses-noframe.html">All&nbsp;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> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.top"> </a></div> <div class="header"> <div class="subTitle">org.robolectric.res</div> <h2 title="Class Qualifiers" class="title">Class Qualifiers</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li>org.robolectric.res.Qualifiers</li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <hr> <br> <pre>public class <span class="typeNameLabel">Qualifiers</span> extends java.lang.Object</pre> <div class="block"><p>Android qualifers as defined by <a href="https: </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="constructor.summary"> </a> <h3>Constructor Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colOne" scope="col">Constructor and Description</th> </tr> <tr class="altColor"> <td class="colOne"><code><span class="memberNameLink"><a href="../../../org/robolectric/res/Qualifiers.html#Qualifiers--">Qualifiers</a></span>()</code>&nbsp;</td> </tr> </table> </li> </ul> <ul class="blockList"> <li class="blockList"><a name="method.summary"> </a> <h3>Method Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr id="i0" class="altColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/robolectric/res/Qualifiers.html#<API key>.lang.String-int-">addPlatformVersion</a></span>(java.lang.String&nbsp;qualifiers, int&nbsp;apiLevel)</code>&nbsp;</td> </tr> <tr id="i1" class="rowColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/robolectric/res/Qualifiers.html#addScreenWidth-java.lang.String-int-">addScreenWidth</a></span>(java.lang.String&nbsp;qualifiers, int&nbsp;screenWidth)</code>&nbsp;</td> </tr> <tr id="i2" class="altColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/robolectric/res/Qualifiers.html#<API key>.lang.String-int-"><API key></a></span>(java.lang.String&nbsp;qualifiers, int&nbsp;smallestScreenWidth)</code>&nbsp;</td> </tr> <tr id="i3" class="rowColor"> <td class="colFirst"><code>static java.lang.String</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/robolectric/res/Qualifiers.html#getOrientation-java.lang.String-">getOrientation</a></span>(java.lang.String&nbsp;qualifiers)</code>&nbsp;</td> </tr> <tr id="i4" class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/robolectric/res/Qualifiers.html#<API key>.lang.String-">getPlatformVersion</a></span>(java.lang.String&nbsp;qualifiers)</code>&nbsp;</td> </tr> <tr id="i5" class="rowColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/robolectric/res/Qualifiers.html#getScreenWidth-java.lang.String-">getScreenWidth</a></span>(java.lang.String&nbsp;qualifiers)</code>&nbsp;</td> </tr> <tr id="i6" class="altColor"> <td class="colFirst"><code>static int</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/robolectric/res/Qualifiers.html#<API key>.lang.String-"><API key></a></span>(java.lang.String&nbsp;qualifiers)</code>&nbsp;</td> </tr> <tr id="i7" class="rowColor"> <td class="colFirst"><code>boolean</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/robolectric/res/Qualifiers.html#isBetterThan-org.robolectric.res.Qualifiers-org.robolectric.res.Qualifiers-">isBetterThan</a></span>(<a href="../../../org/robolectric/res/Qualifiers.html" title="class in org.robolectric.res">Qualifiers</a>&nbsp;other, <a href="../../../org/robolectric/res/Qualifiers.html" title="class in org.robolectric.res">Qualifiers</a>&nbsp;context)</code>&nbsp;</td> </tr> <tr id="i8" class="altColor"> <td class="colFirst"><code>boolean</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/robolectric/res/Qualifiers.html#matches-org.robolectric.res.Qualifiers-">matches</a></span>(<a href="../../../org/robolectric/res/Qualifiers.html" title="class in org.robolectric.res">Qualifiers</a>&nbsp;other)</code>&nbsp;</td> </tr> <tr id="i9" class="rowColor"> <td class="colFirst"><code>static <a href="../../../org/robolectric/res/Qualifiers.html" title="class in org.robolectric.res">Qualifiers</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/robolectric/res/Qualifiers.html#parse-java.lang.String-">parse</a></span>(java.lang.String&nbsp;qualifiersStr)</code>&nbsp;</td> </tr> <tr id="i10" class="altColor"> <td class="colFirst"><code>boolean</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/robolectric/res/Qualifiers.html#<API key>.robolectric.res.Qualifiers-">passesRequirements</a></span>(<a href="../../../org/robolectric/res/Qualifiers.html" title="class in org.robolectric.res">Qualifiers</a>&nbsp;other)</code>&nbsp;</td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> </a> <h3>Methods inherited from class&nbsp;java.lang.Object</h3> <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <ul class="blockList"> <li class="blockList"><a name="constructor.detail"> </a> <h3>Constructor Detail</h3> <a name="Qualifiers </a> <ul class="blockListLast"> <li class="blockList"> <h4>Qualifiers</h4> <pre>public&nbsp;Qualifiers()</pre> </li> </ul> </li> </ul> <ul class="blockList"> <li class="blockList"><a name="method.detail"> </a> <h3>Method Detail</h3> <a name="matches-org.robolectric.res.Qualifiers-"> </a> <ul class="blockList"> <li class="blockList"> <h4>matches</h4> <pre>public&nbsp;boolean&nbsp;matches(<a href="../../../org/robolectric/res/Qualifiers.html" title="class in org.robolectric.res">Qualifiers</a>&nbsp;other)</pre> </li> </ul> <a name="<API key>.robolectric.res.Qualifiers-"> </a> <ul class="blockList"> <li class="blockList"> <h4>passesRequirements</h4> <pre>public&nbsp;boolean&nbsp;passesRequirements(<a href="../../../org/robolectric/res/Qualifiers.html" title="class in org.robolectric.res">Qualifiers</a>&nbsp;other)</pre> </li> </ul> <a name="isBetterThan-org.robolectric.res.Qualifiers-org.robolectric.res.Qualifiers-"> </a> <ul class="blockList"> <li class="blockList"> <h4>isBetterThan</h4> <pre>public&nbsp;boolean&nbsp;isBetterThan(<a href="../../../org/robolectric/res/Qualifiers.html" title="class in org.robolectric.res">Qualifiers</a>&nbsp;other, <a href="../../../org/robolectric/res/Qualifiers.html" title="class in org.robolectric.res">Qualifiers</a>&nbsp;context)</pre> </li> </ul> <a name="parse-java.lang.String-"> </a> <ul class="blockList"> <li class="blockList"> <h4>parse</h4> <pre>public static&nbsp;<a href="../../../org/robolectric/res/Qualifiers.html" title="class in org.robolectric.res">Qualifiers</a>&nbsp;parse(java.lang.String&nbsp;qualifiersStr)</pre> </li> </ul> <a name="<API key>.lang.String-"> </a> <ul class="blockList"> <li class="blockList"> <h4>getPlatformVersion</h4> <pre>public static&nbsp;int&nbsp;getPlatformVersion(java.lang.String&nbsp;qualifiers)</pre> </li> </ul> <a name="<API key>.lang.String-"> </a> <ul class="blockList"> <li class="blockList"> <h4><API key></h4> <pre>public static&nbsp;int&nbsp;<API key>(java.lang.String&nbsp;qualifiers)</pre> </li> </ul> <a name="<API key>.lang.String-int-"> </a> <ul class="blockList"> <li class="blockList"> <h4>addPlatformVersion</h4> <pre>public static&nbsp;java.lang.String&nbsp;addPlatformVersion(java.lang.String&nbsp;qualifiers, int&nbsp;apiLevel)</pre> </li> </ul> <a name="<API key>.lang.String-int-"> </a> <ul class="blockList"> <li class="blockList"> <h4><API key></h4> <pre>public static&nbsp;java.lang.String&nbsp;<API key>(java.lang.String&nbsp;qualifiers, int&nbsp;smallestScreenWidth)</pre> </li> </ul> <a name="getScreenWidth-java.lang.String-"> </a> <ul class="blockList"> <li class="blockList"> <h4>getScreenWidth</h4> <pre>public static&nbsp;int&nbsp;getScreenWidth(java.lang.String&nbsp;qualifiers)</pre> </li> </ul> <a name="addScreenWidth-java.lang.String-int-"> </a> <ul class="blockList"> <li class="blockList"> <h4>addScreenWidth</h4> <pre>public static&nbsp;java.lang.String&nbsp;addScreenWidth(java.lang.String&nbsp;qualifiers, int&nbsp;screenWidth)</pre> </li> </ul> <a name="getOrientation-java.lang.String-"> </a> <ul class="blockListLast"> <li class="blockList"> <h4>getOrientation</h4> <pre>public static&nbsp;java.lang.String&nbsp;getOrientation(java.lang.String&nbsp;qualifiers)</pre> </li> </ul> </li> </ul> </li> </ul> </div> </div> <div class="bottomNav"><a name="navbar.bottom"> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.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 class="navBarCell1Rev">Class</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 class="aboutLanguage"><script type="text/javascript" src="../../../highlight.pack.js"></script> <script type="text/javascript"><! hljs.<API key>(); //--></script></div> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../org/robolectric/res/PluralRules.html" title="class in org.robolectric.res"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../../org/robolectric/res/RawResourceLoader.html" title="class in org.robolectric.res"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../index.html?org/robolectric/res/Qualifiers.html" target="_top">Frames</a></li> <li><a href="Qualifiers.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="<API key>"> <li><a href="../../../allclasses-noframe.html">All&nbsp;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> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.bottom"> </a></div> </body> </html>
'use strict'; //Setting up route angular.module('manage-events').config(['$stateProvider', function($stateProvider) { // Manage events state routing $stateProvider. state('admin.manage-events', { abstract: true, url: '/manage-events', template: '<ui-view/>' }). state('admin.manage-events.list', { url: '', templateUrl: 'modules/manage-events/client/views/list-manage-events.client.view.html' }). state('admin.manage-events.create', { url: '/create', templateUrl: 'modules/manage-events/client/views/create-manage-event.client.view.html' }). state('admin.manage-events.view', { url: '/:manageEventId', templateUrl: 'modules/manage-events/client/views/view-manage-event.client.view.html' }). state('admin.manage-events.edit', { url: '/:manageEventId/edit', templateUrl: 'modules/manage-events/client/views/edit-manage-event.client.view.html' }); } ]); // state('admin.feedbacklist', { // abstract : true; // url: '/feedbackfiltered', // templateUrl: 'modules/manage-events/client/views/list-feedback.client.view.html' // state('admin.manage-events.feedback.list', { // url: '/feedback', // templateUrl: 'modules/manage-events/client/views/list-feedback.client.view.html' // state('contact', { // abstract: true, // url: '/contact', // template: '<ui-view/>' // state('contact.list', { // url: '', // templateUrl: 'modules/calendars/client/views/contact.client.view.html'
<?php namespace AppBundle\DataFixtures\ORM; use Doctrine\Common\DataFixtures\FixtureInterface; use Doctrine\Common\DataFixtures\AbstractFixture; use Doctrine\Common\DataFixtures\<API key>; use Doctrine\Common\Persistence\ObjectManager; use Symfony\Component\DependencyInjection\<API key>; use Symfony\Component\DependencyInjection\ContainerInterface; use AppBundle\Entity\GameLink; use AppBundle\Entity\Game; use AppBundle\Entity\GameLinkType; class Load_GameLink extends AbstractFixture implements <API key>, <API key> { /** * @var ContainerInterface */ private $container; public function setContainer(ContainerInterface $container = null) { $this->container = $container; } public function getOrder() { // the order in which fixtures will be loaded // the lower the number, the sooner that this fixture is loaded return 9; } public function load(ObjectManager $manager) { $manager = $this->container->get('doctrine')->getEntityManager('default'); $manager->getConnection()->getConfiguration()->setSQLLogger(null); $import = $this->container->get('AppBundle.importcsv'); $fileContent = $import->CSV_to_array('gameLink.csv'); $batchSize = 20; $i = 1; foreach ($fileContent as $numRow => $row) { if ($numRow != 1) { $i = $i + 1; $entity = new GameLink(); $entity2 = $this->getReference("Game_" . $row[0]); $entity3 = $this->getReference("Game_" . $row[1]); $entity4 = $this->getReference("GameLinkType_" . $row[2]); $entity->setGameParent($entity2); $entity->setGameChild($entity3); $entity->setType($entity4); $manager->persist($entity); if (($i % $batchSize) === 0) { $manager->flush(); $manager->clear(); // Detaches all objects from Doctrine! } } } $manager->flush(); //Persist objects that did not make up an entire batch $manager->clear(); } }
// 7. Write a JavaScript program which iterates the integers from 1 to 100. But for multiples of three print "Fizz" instead of the number and for the multiples of five print "Buzz". For numbers which are multiples of both three and five print "FizzBuzz". for(var i = 1; i <= 100; i++) { var print = ""; if(i % 3 === 0) { print += "Fizz"; } if(i % 5 === 0) { print += "Buzz"; } console.log(print || i); }
namespace LSystemEditor { partial class LSystemEngineGUI { <summary> Required designer variable. </summary> private System.ComponentModel.IContainer components = null; <summary> Clean up any resources being used. </summary> <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Windows Form Designer generated code <summary> Required method for Designer support - do not modify the contents of this method with the code editor. </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); System.ComponentModel.<API key> resources = new System.ComponentModel.<API key>(typeof(LSystemEngineGUI)); this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); this.ProgressBar1 = new System.Windows.Forms.<API key>(); this.ProgressBar2 = new System.Windows.Forms.<API key>(); this.toolPanel = new System.Windows.Forms.Panel(); this.LoadedSystemsList = new System.Windows.Forms.ComboBox(); this.FilePopupMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.replaceBox = new System.Windows.Forms.TextBox(); this.wholeWordCheck = new System.Windows.Forms.CheckBox(); this.replaceBttn = new System.Windows.Forms.Button(); this.matchCaseCheck = new System.Windows.Forms.CheckBox(); this.findBttn = new System.Windows.Forms.Button(); this.findBox = new System.Windows.Forms.TextBox(); this.replaceAllBttn = new System.Windows.Forms.Button(); this.<API key> = new System.Windows.Forms.ContextMenuStrip(this.components); this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripSeparator(); this.statusStrip = new System.Windows.Forms.StatusStrip(); this.statusLineCount = new System.Windows.Forms.<API key>(); this.statusMessage = new System.Windows.Forms.<API key>(); this.<API key> = new System.Windows.Forms.SplitContainer(); this.textPanelContainer = new System.Windows.Forms.SplitContainer(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); this.definitionBox = new System.Windows.Forms.RichTextBox(); this.<API key> = new LSystemEditor.<API key>(); this.pictureBox2 = new System.Windows.Forms.PictureBox(); this.findReplaceCB = new System.Windows.Forms.CheckBox(); this.helpBttn = new System.Windows.Forms.Button(); this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.fileBttn = new System.Windows.Forms.Button(); this.parseBttn = new System.Windows.Forms.Button(); this.executeBttn = new System.Windows.Forms.Button(); this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); this.<API key> = new System.Windows.Forms.ToolStripMenuItem(); this.<API key> = new System.Windows.Forms.ToolStripMenuItem(); this.<API key> = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.<API key> = new System.Windows.Forms.ToolStripMenuItem(); this.<API key> = new System.Windows.Forms.ToolStripMenuItem(); this.<API key> = new System.Windows.Forms.ToolStripMenuItem(); this.<API key> = new System.Windows.Forms.ToolStripMenuItem(); this.<API key> = new System.Windows.Forms.ToolStripMenuItem(); this.<API key> = new System.Windows.Forms.ToolStripMenuItem(); this.toolPanel.SuspendLayout(); this.FilePopupMenuStrip.SuspendLayout(); this.<API key>.SuspendLayout(); this.statusStrip.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.<API key>)).BeginInit(); this.<API key>.Panel1.SuspendLayout(); this.<API key>.Panel2.SuspendLayout(); this.<API key>.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.textPanelContainer)).BeginInit(); this.textPanelContainer.Panel1.SuspendLayout(); this.textPanelContainer.Panel2.SuspendLayout(); this.textPanelContainer.SuspendLayout(); this.tableLayoutPanel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // openFileDialog1 this.openFileDialog1.FileName = "openFileDialog1"; // ProgressBar1 this.ProgressBar1.Name = "ProgressBar1"; this.ProgressBar1.Size = new System.Drawing.Size(100, 20); // ProgressBar2 this.ProgressBar2.Name = "ProgressBar2"; this.ProgressBar2.Size = new System.Drawing.Size(100, 20); // toolPanel this.toolPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.toolPanel.BackColor = System.Drawing.SystemColors.Control; this.toolPanel.Controls.Add(this.pictureBox2); this.toolPanel.Controls.Add(this.findReplaceCB); this.toolPanel.Controls.Add(this.helpBttn); this.toolPanel.Controls.Add(this.pictureBox1); this.toolPanel.Controls.Add(this.fileBttn); this.toolPanel.Controls.Add(this.parseBttn); this.toolPanel.Controls.Add(this.executeBttn); this.toolPanel.Controls.Add(this.LoadedSystemsList); this.toolPanel.Location = new System.Drawing.Point(0, 0); this.toolPanel.Name = "toolPanel"; this.toolPanel.Size = new System.Drawing.Size(634, 33); this.toolPanel.TabIndex = 9; // LoadedSystemsList this.LoadedSystemsList.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.LoadedSystemsList.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.LoadedSystemsList.FormattingEnabled = true; this.LoadedSystemsList.Location = new System.Drawing.Point(139, 4); this.LoadedSystemsList.MaxDropDownItems = 12; this.LoadedSystemsList.Name = "LoadedSystemsList"; this.LoadedSystemsList.Size = new System.Drawing.Size(208, 23); this.LoadedSystemsList.TabIndex = 0; this.toolTip1.SetToolTip(this.LoadedSystemsList, "Loaded LSystems - Select the LSystem to Execute"); // FilePopupMenuStrip this.FilePopupMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.toolStripMenuItem2, this.toolStripSeparator3, this.<API key>, this.<API key>, this.<API key>, this.toolStripSeparator2, this.toolStripMenuItem1, this.toolStripSeparator1, this.<API key>}); this.FilePopupMenuStrip.Name = "contextMenuStrip1"; this.FilePopupMenuStrip.Size = new System.Drawing.Size(149, 154); // toolStripSeparator3 this.toolStripSeparator3.Name = "toolStripSeparator3"; this.toolStripSeparator3.Size = new System.Drawing.Size(145, 6); // toolStripSeparator2 this.toolStripSeparator2.Name = "toolStripSeparator2"; this.toolStripSeparator2.Size = new System.Drawing.Size(145, 6); // toolStripSeparator1 this.toolStripSeparator1.Name = "toolStripSeparator1"; this.toolStripSeparator1.Size = new System.Drawing.Size(145, 6); // replaceBox this.replaceBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(157)))), ((int)(((byte)(163)))), ((int)(((byte)(170))))); this.replaceBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.replaceBox.Dock = System.Windows.Forms.DockStyle.Fill; this.replaceBox.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.replaceBox.Location = new System.Drawing.Point(163, 3); this.replaceBox.Name = "replaceBox"; this.replaceBox.Size = new System.Drawing.Size(74, 21); this.replaceBox.TabIndex = 2; this.toolTip1.SetToolTip(this.replaceBox, "Text used in Replace"); // wholeWordCheck this.wholeWordCheck.AutoSize = true; this.wholeWordCheck.BackColor = System.Drawing.SystemColors.Control; this.wholeWordCheck.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.wholeWordCheck.Location = new System.Drawing.Point(83, 30); this.wholeWordCheck.Name = "wholeWordCheck"; this.wholeWordCheck.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); this.wholeWordCheck.Size = new System.Drawing.Size(74, 17); this.wholeWordCheck.TabIndex = 5; this.wholeWordCheck.Text = "Whole Word"; this.toolTip1.SetToolTip(this.wholeWordCheck, "Match the whole word when searching"); this.wholeWordCheck.<API key> = false; // replaceBttn this.replaceBttn.Dock = System.Windows.Forms.DockStyle.Fill; this.replaceBttn.Location = new System.Drawing.Point(243, 3); this.replaceBttn.Name = "replaceBttn"; this.replaceBttn.Size = new System.Drawing.Size(75, 21); this.replaceBttn.TabIndex = 3; this.replaceBttn.Text = "Replace"; this.toolTip1.SetToolTip(this.replaceBttn, "Replaces the selected text and finds the next instance"); this.replaceBttn.<API key> = true; this.replaceBttn.Click += new System.EventHandler(this.replaceBttn_Click); // matchCaseCheck this.matchCaseCheck.AutoSize = true; this.matchCaseCheck.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.matchCaseCheck.Location = new System.Drawing.Point(3, 30); this.matchCaseCheck.Name = "matchCaseCheck"; this.matchCaseCheck.Padding = new System.Windows.Forms.Padding(10, 0, 0, 0); this.matchCaseCheck.Size = new System.Drawing.Size(74, 17); this.matchCaseCheck.TabIndex = 4; this.matchCaseCheck.Text = "Match Case"; this.toolTip1.SetToolTip(this.matchCaseCheck, "Match the case of the text when searching"); this.matchCaseCheck.<API key> = true; // findBttn this.findBttn.Dock = System.Windows.Forms.DockStyle.Fill; this.findBttn.Location = new System.Drawing.Point(83, 3); this.findBttn.Name = "findBttn"; this.findBttn.Size = new System.Drawing.Size(74, 21); this.findBttn.TabIndex = 0; this.findBttn.Text = "Find"; this.toolTip1.SetToolTip(this.findBttn, "Finds the specified text starting from the cursor position"); this.findBttn.<API key> = true; this.findBttn.Click += new System.EventHandler(this.findBttn_Click); // findBox this.findBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(157)))), ((int)(((byte)(163)))), ((int)(((byte)(170))))); this.findBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.findBox.Dock = System.Windows.Forms.DockStyle.Fill; this.findBox.Font = new System.Drawing.Font("Courier New", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.findBox.Location = new System.Drawing.Point(3, 3); this.findBox.Name = "findBox"; this.findBox.Size = new System.Drawing.Size(74, 21); this.findBox.TabIndex = 1; this.toolTip1.SetToolTip(this.findBox, "Text to Find"); this.findBox.TextChanged += new System.EventHandler(this.findBox_TextChanged); // replaceAllBttn this.replaceAllBttn.Dock = System.Windows.Forms.DockStyle.Fill; this.replaceAllBttn.Location = new System.Drawing.Point(243, 30); this.replaceAllBttn.Name = "replaceAllBttn"; this.replaceAllBttn.Size = new System.Drawing.Size(75, 21); this.replaceAllBttn.TabIndex = 6; this.replaceAllBttn.Text = "Replace All"; this.toolTip1.SetToolTip(this.replaceAllBttn, "Replaces all found text"); this.replaceAllBttn.<API key> = true; this.replaceAllBttn.Click += new System.EventHandler(this.<API key>); // <API key> this.<API key>.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.<API key>, this.toolStripMenuItem3, this.<API key>}); this.<API key>.Name = "<API key>"; this.<API key>.Size = new System.Drawing.Size(108, 54); // toolStripMenuItem3 this.toolStripMenuItem3.Name = "toolStripMenuItem3"; this.toolStripMenuItem3.Size = new System.Drawing.Size(104, 6); // statusStrip this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.statusLineCount, this.statusMessage}); this.statusStrip.Location = new System.Drawing.Point(0, 468); this.statusStrip.Name = "statusStrip"; this.statusStrip.Size = new System.Drawing.Size(634, 24); this.statusStrip.TabIndex = 11; this.statusStrip.Text = "statusStrip1"; // statusLineCount this.statusLineCount.BorderSides = System.Windows.Forms.<API key>.Right; this.statusLineCount.DisplayStyle = System.Windows.Forms.<API key>.Text; this.statusLineCount.Margin = new System.Windows.Forms.Padding(4, 3, 4, 2); this.statusLineCount.Name = "statusLineCount"; this.statusLineCount.Size = new System.Drawing.Size(80, 19); this.statusLineCount.Text = "<line count>"; // statusMessage this.statusMessage.DisplayStyle = System.Windows.Forms.<API key>.Text; this.statusMessage.Margin = new System.Windows.Forms.Padding(4, 3, 0, 2); this.statusMessage.Name = "statusMessage"; this.statusMessage.Size = new System.Drawing.Size(69, 19); this.statusMessage.Text = "<message>"; // <API key> this.<API key>.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.<API key>.BackColor = System.Drawing.SystemColors.Control; this.<API key>.Location = new System.Drawing.Point(4, 35); this.<API key>.Name = "<API key>"; // <API key>.Panel1 this.<API key>.Panel1.Controls.Add(this.textPanelContainer); // <API key>.Panel2 this.<API key>.Panel2.BackColor = System.Drawing.SystemColors.Control; this.<API key>.Panel2.Controls.Add(this.<API key>); this.<API key>.Size = new System.Drawing.Size(624, 430); this.<API key>.SplitterDistance = 321; this.<API key>.SplitterWidth = 6; this.<API key>.TabIndex = 13; // textPanelContainer this.textPanelContainer.Dock = System.Windows.Forms.DockStyle.Fill; this.textPanelContainer.FixedPanel = System.Windows.Forms.FixedPanel.Panel1; this.textPanelContainer.IsSplitterFixed = true; this.textPanelContainer.Location = new System.Drawing.Point(0, 0); this.textPanelContainer.Name = "textPanelContainer"; this.textPanelContainer.Orientation = System.Windows.Forms.Orientation.Horizontal; // textPanelContainer.Panel1 this.textPanelContainer.Panel1.Controls.Add(this.tableLayoutPanel1); // textPanelContainer.Panel2 this.textPanelContainer.Panel2.Controls.Add(this.definitionBox); this.textPanelContainer.Size = new System.Drawing.Size(321, 430); this.textPanelContainer.SplitterDistance = 54; this.textPanelContainer.SplitterWidth = 1; this.textPanelContainer.TabIndex = 1; // tableLayoutPanel1 this.tableLayoutPanel1.BackColor = System.Drawing.SystemColors.Control; this.tableLayoutPanel1.ColumnCount = 4; this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); this.tableLayoutPanel1.Controls.Add(this.replaceBox, 2, 0); this.tableLayoutPanel1.Controls.Add(this.replaceBttn, 3, 0); this.tableLayoutPanel1.Controls.Add(this.findBttn, 1, 0); this.tableLayoutPanel1.Controls.Add(this.findBox, 0, 0); this.tableLayoutPanel1.Controls.Add(this.matchCaseCheck, 0, 1); this.tableLayoutPanel1.Controls.Add(this.wholeWordCheck, 1, 1); this.tableLayoutPanel1.Controls.Add(this.replaceAllBttn, 3, 1); this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); this.tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(0); this.tableLayoutPanel1.Name = "tableLayoutPanel1"; this.tableLayoutPanel1.RowCount = 2; this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); this.tableLayoutPanel1.Size = new System.Drawing.Size(321, 54); this.tableLayoutPanel1.TabIndex = 6; // definitionBox this.definitionBox.AcceptsTab = true; this.definitionBox.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(157)))), ((int)(((byte)(163)))), ((int)(((byte)(170))))); this.definitionBox.DetectUrls = false; this.definitionBox.Dock = System.Windows.Forms.DockStyle.Fill; this.definitionBox.Font = new System.Drawing.Font("Courier New", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.definitionBox.ForeColor = System.Drawing.SystemColors.WindowText; this.definitionBox.Location = new System.Drawing.Point(0, 0); this.definitionBox.Name = "definitionBox"; this.definitionBox.Size = new System.Drawing.Size(321, 375); this.definitionBox.TabIndex = 0; this.definitionBox.TabStop = false; this.definitionBox.Text = resources.GetString("definitionBox.Text"); this.definitionBox.WordWrap = false; this.definitionBox.Click += new System.EventHandler(this.definitionBox_Click); this.definitionBox.MouseClick += new System.Windows.Forms.MouseEventHandler(this.<API key>); this.definitionBox.TextChanged += new System.EventHandler(this.<API key>); this.definitionBox.KeyPress += new System.Windows.Forms.<API key>(this.<API key>); this.definitionBox.KeyUp += new System.Windows.Forms.KeyEventHandler(this.definitionBox_KeyUp); // <API key> this.<API key>.Dock = System.Windows.Forms.DockStyle.Fill; this.<API key>.Location = new System.Drawing.Point(0, 0); this.<API key>.Name = "<API key>"; this.<API key>.Size = new System.Drawing.Size(297, 430); this.<API key>.TabIndex = 0; // pictureBox2 this.pictureBox2.Image = global::LSystemEditor.Properties.Resources.sep02; this.pictureBox2.Location = new System.Drawing.Point(355, 4); this.pictureBox2.Name = "pictureBox2"; this.pictureBox2.Size = new System.Drawing.Size(3, 24); this.pictureBox2.TabIndex = 15; this.pictureBox2.TabStop = false; // findReplaceCB this.findReplaceCB.Appearance = System.Windows.Forms.Appearance.Button; this.findReplaceCB.Image = global::LSystemEditor.Properties.Resources.find; this.findReplaceCB.Location = new System.Drawing.Point(34, 4); this.findReplaceCB.Name = "findReplaceCB"; this.findReplaceCB.Size = new System.Drawing.Size(24, 24); this.findReplaceCB.TabIndex = 14; this.toolTip1.SetToolTip(this.findReplaceCB, "Show/Hide: Find & Replace Text"); this.findReplaceCB.<API key> = true; this.findReplaceCB.CheckedChanged += new System.EventHandler(this.<API key>); // helpBttn this.helpBttn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.helpBttn.Image = global::LSystemEditor.Properties.Resources.help2; this.helpBttn.Location = new System.Drawing.Point(604, 4); this.helpBttn.Name = "helpBttn"; this.helpBttn.Size = new System.Drawing.Size(24, 24); this.helpBttn.TabIndex = 10; this.toolTip1.SetToolTip(this.helpBttn, "Help Menu - Click to display Help menu"); this.helpBttn.<API key> = true; this.helpBttn.Click += new System.EventHandler(this.helpBttn_Click); // pictureBox1 this.pictureBox1.Image = global::LSystemEditor.Properties.Resources.sep02; this.pictureBox1.Location = new System.Drawing.Point(66, 4); this.pictureBox1.Name = "pictureBox1"; this.pictureBox1.Size = new System.Drawing.Size(3, 24); this.pictureBox1.TabIndex = 8; this.pictureBox1.TabStop = false; // fileBttn this.fileBttn.Image = global::LSystemEditor.Properties.Resources.file; this.fileBttn.Location = new System.Drawing.Point(4, 4); this.fileBttn.Name = "fileBttn"; this.fileBttn.Size = new System.Drawing.Size(24, 24); this.fileBttn.TabIndex = 7; this.toolTip1.SetToolTip(this.fileBttn, "File Menu - Click to display File menu"); this.fileBttn.<API key> = true; this.fileBttn.Click += new System.EventHandler(this.fileBttn_Click); // parseBttn this.parseBttn.Image = global::LSystemEditor.Properties.Resources.parse; this.parseBttn.Location = new System.Drawing.Point(76, 4); this.parseBttn.Name = "parseBttn"; this.parseBttn.Size = new System.Drawing.Size(24, 24); this.parseBttn.TabIndex = 6; this.toolTip1.SetToolTip(this.parseBttn, "Load LSystems (Parse Editor contents)"); this.parseBttn.<API key> = true; this.parseBttn.Click += new System.EventHandler(this.parseBttn_Click); // executeBttn this.executeBttn.Image = global::LSystemEditor.Properties.Resources.execute1; this.executeBttn.Location = new System.Drawing.Point(106, 4); this.executeBttn.Name = "executeBttn"; this.executeBttn.Size = new System.Drawing.Size(24, 24); this.executeBttn.TabIndex = 5; this.toolTip1.SetToolTip(this.executeBttn, "Execute LSystem (Executes the selected LSystem)"); this.executeBttn.<API key> = true; this.executeBttn.Click += new System.EventHandler(this.executeBttn_Click); // toolStripMenuItem2 this.toolStripMenuItem2.Image = global::LSystemEditor.Properties.Resources.new_icon; this.toolStripMenuItem2.Name = "toolStripMenuItem2"; this.toolStripMenuItem2.Size = new System.Drawing.Size(148, 22); this.toolStripMenuItem2.Text = "New"; this.toolStripMenuItem2.Click += new System.EventHandler(this.<API key>); // <API key> this.<API key>.Image = global::LSystemEditor.Properties.Resources.open_icon; this.<API key>.Name = "<API key>"; this.<API key>.Size = new System.Drawing.Size(148, 22); this.<API key>.Text = "Open"; this.<API key>.Click += new System.EventHandler(this.<API key>); // <API key> this.<API key>.Image = global::LSystemEditor.Properties.Resources.save_icon; this.<API key>.Name = "<API key>"; this.<API key>.Size = new System.Drawing.Size(148, 22); this.<API key>.Text = "Save"; this.<API key>.Click += new System.EventHandler(this.<API key>); // <API key> this.<API key>.Image = global::LSystemEditor.Properties.Resources.saveas_icon; this.<API key>.Name = "<API key>"; this.<API key>.Size = new System.Drawing.Size(148, 22); this.<API key>.Text = "Save As"; this.<API key>.Click += new System.EventHandler(this.<API key>); // toolStripMenuItem1 this.toolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.<API key>, this.<API key>, this.<API key>}); this.toolStripMenuItem1.Image = global::LSystemEditor.Properties.Resources.colors_icon; this.toolStripMenuItem1.Name = "toolStripMenuItem1"; this.toolStripMenuItem1.Size = new System.Drawing.Size(148, 22); this.toolStripMenuItem1.Text = "Color Scheme"; // <API key> this.<API key>.Image = global::LSystemEditor.Properties.Resources.color_sys; this.<API key>.Name = "<API key>"; this.<API key>.Size = new System.Drawing.Size(112, 22); this.<API key>.Text = "System"; this.<API key>.Click += new System.EventHandler(this.<API key>); // <API key> this.<API key>.Image = global::LSystemEditor.Properties.Resources.color_light; this.<API key>.Name = "<API key>"; this.<API key>.Size = new System.Drawing.Size(112, 22); this.<API key>.Text = "Light"; this.<API key>.Click += new System.EventHandler(this.<API key>); // <API key> this.<API key>.Image = global::LSystemEditor.Properties.Resources.color_dark; this.<API key>.Name = "<API key>"; this.<API key>.Size = new System.Drawing.Size(112, 22); this.<API key>.Text = "Dark"; this.<API key>.Click += new System.EventHandler(this.<API key>); // <API key> this.<API key>.Image = global::LSystemEditor.Properties.Resources.close_icon3; this.<API key>.Name = "<API key>"; this.<API key>.Size = new System.Drawing.Size(148, 22); this.<API key>.Text = "Exit"; this.<API key>.Click += new System.EventHandler(this.<API key>); // <API key> this.<API key>.Image = global::LSystemEditor.Properties.Resources.help_icon; this.<API key>.Name = "<API key>"; this.<API key>.<API key> = ""; this.<API key>.Size = new System.Drawing.Size(107, 22); this.<API key>.Text = "Help"; this.<API key>.Click += new System.EventHandler(this.<API key>); // <API key> this.<API key>.Image = global::LSystemEditor.Properties.Resources.about_icon; this.<API key>.Name = "<API key>"; this.<API key>.<API key> = ""; this.<API key>.Size = new System.Drawing.Size(107, 22); this.<API key>.Text = "About"; this.<API key>.Click += new System.EventHandler(this.<API key>); // LSystemEngineGUI this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScroll = true; this.ClientSize = new System.Drawing.Size(634, 492); this.Controls.Add(this.<API key>); this.Controls.Add(this.statusStrip); this.Controls.Add(this.toolPanel); this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.KeyPreview = true; this.MinimumSize = new System.Drawing.Size(410, 200); this.Name = "LSystemEngineGUI"; this.Text = "LSystem Engine"; this.FormClosing += new System.Windows.Forms.<API key>(this.<API key>); this.Load += new System.EventHandler(this.LSysEngineGUI_Load); this.toolPanel.ResumeLayout(false); this.FilePopupMenuStrip.ResumeLayout(false); this.<API key>.ResumeLayout(false); this.statusStrip.ResumeLayout(false); this.statusStrip.PerformLayout(); this.<API key>.Panel1.ResumeLayout(false); this.<API key>.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.<API key>)).EndInit(); this.<API key>.ResumeLayout(false); this.textPanelContainer.Panel1.ResumeLayout(false); this.textPanelContainer.Panel2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.textPanelContainer)).EndInit(); this.textPanelContainer.ResumeLayout(false); this.tableLayoutPanel1.ResumeLayout(false); this.tableLayoutPanel1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); } #endregion private System.Windows.Forms.OpenFileDialog openFileDialog1; private System.Windows.Forms.<API key> ProgressBar1; //private System.Windows.Forms.<API key> statusLabel1; //private System.Windows.Forms.<API key> statusLabel2; private System.Windows.Forms.<API key> ProgressBar2; private System.Windows.Forms.Panel toolPanel; private System.Windows.Forms.ComboBox LoadedSystemsList; private System.Windows.Forms.ContextMenuStrip FilePopupMenuStrip; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2; private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; private System.Windows.Forms.ToolStripMenuItem <API key>; private System.Windows.Forms.ToolStripMenuItem <API key>; private System.Windows.Forms.ToolStripMenuItem <API key>; private System.Windows.Forms.Button parseBttn; private System.Windows.Forms.Button executeBttn; private System.Windows.Forms.Button fileBttn; private System.Windows.Forms.ToolTip toolTip1; private System.Windows.Forms.Button helpBttn; private System.Windows.Forms.ContextMenuStrip <API key>; private System.Windows.Forms.ToolStripMenuItem <API key>; private System.Windows.Forms.ToolStripSeparator toolStripMenuItem3; private System.Windows.Forms.ToolStripMenuItem <API key>; private System.Windows.Forms.StatusStrip statusStrip; private System.Windows.Forms.<API key> statusLineCount; private System.Windows.Forms.<API key> statusMessage; private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.SplitContainer <API key>; private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; private System.Windows.Forms.ToolStripMenuItem <API key>; private System.Windows.Forms.CheckBox findReplaceCB; private System.Windows.Forms.SplitContainer textPanelContainer; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; private System.Windows.Forms.TextBox replaceBox; private System.Windows.Forms.CheckBox wholeWordCheck; private System.Windows.Forms.Button replaceBttn; private System.Windows.Forms.CheckBox matchCaseCheck; private System.Windows.Forms.Button findBttn; private System.Windows.Forms.TextBox findBox; private System.Windows.Forms.RichTextBox definitionBox; private System.Windows.Forms.PictureBox pictureBox2; private System.Windows.Forms.Button replaceAllBttn; private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1; private System.Windows.Forms.ToolStripMenuItem <API key>; private System.Windows.Forms.ToolStripMenuItem <API key>; private System.Windows.Forms.ToolStripMenuItem <API key>; private <API key> <API key>; } }
# Install script for directory: D:/MyData/Code/PCL/<API key> # Set the install prefix if(NOT DEFINED <API key>) set(<API key> "C:/Program Files/<API key>") endif() string(REGEX REPLACE "/$" "" <API key> "${<API key>}") # Set the install configuration name. if(NOT DEFINED <API key>) if(BUILD_TYPE) string(REGEX REPLACE "^[^A-Za-z0-9_]+" "" <API key> "${BUILD_TYPE}") else() set(<API key> "Release") endif() message(STATUS "Install configuration: \"${<API key>}\"") endif() # Set the component getting installed. if(NOT <API key>) if(COMPONENT) message(STATUS "Install component: \"${COMPONENT}\"") set(<API key> "${COMPONENT}") else() set(<API key>) endif() endif() if(<API key>) set(<API key> "install_manifest_${<API key>}.txt") else() set(<API key> "install_manifest.txt") endif() string(REPLACE ";" "\n" <API key> "${<API key>}") file(WRITE "D:/MyData/Code/PCL/<API key>/build/${<API key>}" "${<API key>}")
<?php namespace Dotdigitalgroup\Email\Block; /** * Roi block * * @api */ class Roi extends \Magento\Framework\View\Element\Template { /** * @var \Dotdigitalgroup\Email\Helper\Data */ public $helper; /** * @var \Magento\Checkout\Model\Session */ public $session; /** * @var int */ private $websiteId; /** * Roi constructor. * * @param \Magento\Framework\View\Element\Template\Context $context * @param \Dotdigitalgroup\Email\Helper\Data $helper * @param \Magento\Checkout\Model\Session $session * @param array $data */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, \Dotdigitalgroup\Email\Helper\Data $helper, \Magento\Checkout\Model\Session $session, array $data = [] ) { $this->helper = $helper; $this->session = $session; parent::__construct($context, $data); $this->websiteId = $this->_storeManager->getWebsite()->getId(); } /** * @return bool */ public function <API key>() { return $this->helper->isEnabled($this->websiteId) && $this->helper-><API key>($this->websiteId); } /** * @return \Magento\Sales\Model\Order */ private function getOrder() { return $this->session->getLastRealOrder(); } /** * Get order total * @return string */ public function getTotal() { return number_format($this->getOrder()->getBaseGrandTotal(), 2, '.', ','); } /** * Get product names * @return string */ public function getProductNames() { $items = $this->getOrder()->getAllItems(); $productNames = []; foreach ($items as $item) { if ($item->getParentItemId() === null) { $productNames[] = str_replace('"', ' ', $item->getName()); } } return json_encode($productNames); } /** * @return string */ public function <API key>() { return $this->helper-><API key>(); } }
<?php namespace Intisana\Http; use Illuminate\Foundation\Http\Kernel as HttpKernel; class Kernel extends HttpKernel { /** * The application's global HTTP middleware stack. * @var array */ protected $middleware = [ \Illuminate\Foundation\Http\Middleware\<API key>::class, \Intisana\Http\Middleware\EncryptCookies::class, \Illuminate\Cookie\Middleware\<API key>::class, \Illuminate\Session\Middleware\StartSession::class, \Illuminate\View\Middleware\<API key>::class, \Intisana\Http\Middleware\VerifyCsrfToken::class, ]; /** * The application's route middleware. * @var array */ protected $routeMiddleware = [ 'auth' => \Intisana\Http\Middleware\Authenticate::class, 'auth.basic' => \Illuminate\Auth\Middleware\<API key>::class, 'guest' => \Intisana\Http\Middleware\<API key>::class, ]; }
// <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> using System; using System.ComponentModel; using System.Data.Linq; using System.Data.Linq.Mapping; namespace derpirc.Data.Models { [global::System.Data.Linq.Mapping.TableAttribute()] public partial class Message : IBaseModel, IMessage, <API key>, <API key> { [Column(IsVersion = true)] private Binary _Version; private static <API key> <API key> = new <API key>(String.Empty); private int _Id; private int _NetworkId; private string _Name; private EntitySet<MessageItem> _Messages; private EntityRef<Network> _Network; #region Extensibility Method Definitions partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); partial void OnCreated(); partial void OnIdChanging(int value); partial void OnIdChanged(); partial void OnNetworkIdChanging(int value); partial void OnNetworkIdChanged(); partial void OnNameChanging(string value); partial void OnNameChanged(); #endregion public Message() { this._Messages = new EntitySet<MessageItem>(new Action<MessageItem>(this.attach_MessageItems), new Action<MessageItem>(this.detach_MessageItems)); this._Network = default(EntityRef<Network>); OnCreated(); } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage = "_Id", AutoSync = AutoSync.OnInsert, DbType = "Int NOT NULL IDENTITY", IsPrimaryKey = true, IsDbGenerated = true)] public int Id { get { return this._Id; } set { if ((this._Id != value)) { this.OnIdChanging(value); this.<API key>(); this._Id = value; this.SendPropertyChanged("Id"); this.OnIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage = "_NetworkId", DbType = "Int NOT NULL")] public int NetworkId { get { return this._NetworkId; } set { if ((this._NetworkId != value)) { if (this._Network.<API key>) { throw new System.Data.Linq.<API key>(); } this.OnNetworkIdChanging(value); this.<API key>(); this._NetworkId = value; this.SendPropertyChanged("NetworkId"); this.OnNetworkIdChanged(); } } } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage = "_Name", DbType = "NVarChar(64) NOT NULL", CanBeNull = false)] public string Name { get { return this._Name; } set { if ((this._Name != value.ToLower())) { this.OnNameChanging(value.ToLower()); this.<API key>(); this._Name = value.ToLower(); this.SendPropertyChanged("Name"); this.OnNameChanged(); } } } [global::System.Data.Linq.Mapping.<API key>(Name = "<API key>", Storage = "_Messages", ThisKey = "Id", OtherKey = "SummaryId", DeleteRule = "CASCADE")] public EntitySet<MessageItem> Messages { get { return this._Messages; } set { this._Messages.Assign(value); } } [global::System.Data.Linq.Mapping.<API key>(Name = "FK_Network_Message", Storage = "_Network", ThisKey = "NetworkId", OtherKey = "Id", IsForeignKey = true)] public Network Network { get { return this._Network.Entity; } set { Network previousValue = this._Network.Entity; if (((previousValue != value) || (this._Network.<API key> == false))) { this.<API key>(); if ((previousValue != null)) { this._Network.Entity = null; previousValue.Messages.Remove(this); } this._Network.Entity = value; if ((value != null)) { value.Messages.Add(this); this._NetworkId = value.Id; } else { this._NetworkId = default(int); } this.SendPropertyChanged("Network"); } } } public event <API key> PropertyChanging; public event <API key> PropertyChanged; protected virtual void <API key>() { if ((this.PropertyChanging != null)) { this.PropertyChanging(this, <API key>); } } protected virtual void SendPropertyChanged(String propertyName) { if ((this.PropertyChanged != null)) { this.PropertyChanged(this, new <API key>(propertyName)); } } private void attach_MessageItems(MessageItem entity) { this.<API key>(); entity.Summary = this; } private void detach_MessageItems(MessageItem entity) { this.<API key>(); entity.Summary = null; } } }
'use strict'; var Mongoose = require('mongoose') , Schema = Mongoose.Schema , ObjectId = Mongoose.Types.ObjectId; var CaseSchema = new Schema({ clients: [ { type: ObjectId, ref: 'Client' } ] }); module.exports = Mongoose.model('Case', CaseSchema);
from django.contrib import admin from django import forms from . import models from nnmarkdown.form import MarkdownWidget from nnscr.admin import site class PageAdminForm(forms.ModelForm): class Meta: model = models.Page exclude = ("slug",) widgets = { "text": MarkdownWidget } class PageAdmin(admin.ModelAdmin): form = PageAdminForm site.register(models.Page, PageAdmin)
require 'sage_one/connection' require 'sage_one/request' module SageOne # This module helps with setting up the OAuth connection to SageOne. After the two # step process you will have an access_token that you can store and use # for making future API calls. # @see OAuth#authorize_url Step 1 - Authorisation request # @see #get_access_token Step 2 - Access Token Request module OAuth # Generates the OAuth URL for redirecting users to SageOne. You should ensure # the your SageOne.client_id is configured before calling this method. # @param [String] callback_url SageOne OAuth will pass an authorization code back to this URL. # @return [String] The URL for you to redirect the user to SageOne. # @example def authorize_url(callback_url) params = { client_id: client_id, redirect_uri: callback_url, response_type: 'code' } connection.build_url("/oauth2/auth", params).to_s end # Returns an access token for future authentication. # @param [String] code The authorisation code SageOne sent to your callback_url. # @param [String] callback_url The callback URL you used to get the authorization code. # @return [Hashie::Mash] Containing the access_token for you to store for making future API calls. # @example # # Assuming (Rails) your code is stored in params hash. def get_access_token(code, callback_url) params = { client_id: client_id, client_secret: client_secret, grant_type: 'authorization_code', code: code, redirect_uri: callback_url } post("/oauth2/token/", params) end end end
package fundamentals.list.twopointers.<API key>; import fundamentals.list.ListNode; /** * Given a linked list, determine if it has a cycle in it. * Follow up: Can you solve it without using extra space? */ public class Solution { // My 3AC. // My 2nd // Error: it's ok to put behind, since they will encounter anyway if cycle exists public boolean hasCycle(ListNode head) { if (head == null) return false; ListNode slow = head, fast = head; while (fast != null && fast.next != null) { // no need to check slow slow = slow.next; fast = fast.next.next; if (slow == fast) return true; // must put here! } return false; } // Reverse causing TLE... public boolean hasCycle2(ListNode head) { if (head == null) { return false; } ListNode last = head; ListNode cur = head.next; while (cur != null) { // Find cycle if (cur == head) { return true; } // Reverse ListNode next = cur.next; cur.next = last; // Move forward last = cur; cur = next; } return false; } }
package types // DO NOT EDIT. THIS FILE WAS AUTOMATICALLY GENERATED // <API key> - no documentation type <API key> struct { // EmpRecordId - no documentation EmpRecordId int `json:"empRecordId,omitempty"` // Id - no documentation Id int `json:"id,omitempty"` // ResourceTableId - no documentation ResourceTableId int `json:"resourceTableId,omitempty"` // TagId - no documentation TagId int `json:"tagId,omitempty"` // TagTypeId - no documentation TagTypeId int `json:"tagTypeId,omitempty"` // UsrRecordId - no documentation UsrRecordId int `json:"usrRecordId,omitempty"` // Customer - no documentation Customer *<API key> `json:"customer,omitempty"` // Employee - no documentation Employee *<API key> `json:"employee,omitempty"` // Resource - no documentation Resource *<API key> `json:"resource,omitempty"` // Tag - no documentation Tag *SoftLayer_Tag `json:"tag,omitempty"` // TagType - no documentation TagType *SoftLayer_Tag_Type `json:"tagType,omitempty"` } func (<API key> *<API key>) String() string { return "<API key>" }
//team list controller app.controller("eventDCtrl", // Implementation the todoCtrl function($scope, Auth, $firebaseArray, $firebaseObject, $stateParams, $filter, Helper, ngDialog, $state) { console.log("event detail"); //initialize $scope.isManaging = false; $scope.userdata = ""; $scope.selectTeam = false; $scope.eventID = $stateParams.eid; personToBeAdded=""; $scope.editingInfo=false; $scope.editButton="Edit"; $scope.isDeletingAnn = false; this.Object=Object; Auth.$onAuthStateChanged(function(authData) { // console.log($scope.obj); if (authData) { $scope.userData = authData; ref=firebase.database().ref("users"); $scope.users=$firebaseObject(ref); //get role of user ref = firebase.database().ref("users/" + $scope.userData.uid + "/writable"); $scope.myEvents = $firebaseObject(ref); ref = firebase.database().ref("users/" + $scope.userData.uid + "/writable/"+$scope.eventID); $scope.myEvent = $firebaseObject(ref); $scope.myEvent.$loaded().then(function(data){ console.log("Test"); console.log(data); }); // $scope.myEvents.$loaded().then(function(){ // //console.log($filter('teamId')($scope.myEvents[$scope.eventID])); // invref = firebase.database().ref('events/' + $scope.eventID + "/teams/" + $filter('teamId')($scope.myEvents[$scope.eventID]) + "/invitations"); // $scope.inv = $firebaseObject(invref); // $scope.obj.$loaded().then(function(data){ // $scope.role="visitor"; // else // $scope.role=$scope.obj[$scope.eventID].position; // $scope.teamID=$scope.obj[$scope.eventID].team; // console.log($scope.obj[$scope.eventID]); } else console.log("signed out"); }); // eventInfo // eventID = $stateParams.eid; eventRef = firebase.database().ref("events/" + $scope.eventID); $scope.eventObj = $firebaseObject(eventRef); // $scope.eventObj.$loaded().then(function(data){ // console.log(Object.keys(data.teams).length); //functions $scope.manage = function() { $scope.isManaging = !$scope.isManaging; $scope.selectTeam = false; }; // $scope.createEventList = Helper.debug.createEventList; $scope.deleteTeam = function(key){ Helper.deleteTeam($scope.eventID,key); }; $scope.addToTeam = function(id){ $scope.selectTeam=!$scope.selectTeam; personToBeAdded=id; } $scope.toTeam=function(key){ Helper.addPersonToTeam(personToBeAdded,$scope.eventID,key); $scope.selectTeam=false; console.log(key); } $scope.deleteAnn = function(key){ Helper.<API key>($scope.eventID,key) console.log(key + " been deleted"); } $scope.invite=function(uid){ Helper.sendInvitationTo(uid,$scope.eventID,$filter('teamId')($scope.myEvent)); } $scope.quit=function(){ Helper.quitEvent($scope.userData.uid,$scope.eventID); // $scope.role="visitor"; } $scope.joinEvent=function(){ Helper.joinEvent($scope.userData.uid,$scope.eventID); // $scope.role="tba"; } var dialogue; $scope.createTeamDialogue = function(){ dialogue = ngDialog.open({ template: 'templates/createTeam.html', className: '<API key>', scope: $scope }); }; $scope.<API key> = function(){ dialogue = ngDialog.open({ template: 'templates/postAnnouncement.html', className: '<API key>', scope: $scope }); }; $scope.newTeam={ max: 0, name: "", desc: "", members: {}, tags: {}, leader: "", currentSize: 0, tags: Helper.tags }; $scope.newAnn={ a: "" }; console.log($scope.newTeam); $scope.createTeam=function(){ $scope.newTeam.leader=$scope.userData.uid; $scope.newTeam.max=parseInt($scope.newTeam.max); console.log($scope.newTeam); Helper.createTeam($scope.userData.uid,$scope.eventID,$scope.newTeam); dialogue.close(); // $state.reload(); // $scope.role=$scope.obj[$scope.eventID].position; // $scope.teamID=$scope.obj[$scope.eventID].team; } $scope.postAnnouncement=function(){ console.log($scope.newAnn); Helper.<API key>($scope.eventID, $scope.newAnn.a); dialogue.close(); } $scope.<API key>=function(){ $scope.isDeletingAnn = !$scope.isDeletingAnn; } $scope.validInvite = function(uid){ // console.log($scope.inv, ' ' , uid); if ($filter('teamId')($scope.myEvent) != null) { for (key in $scope.eventObj.teams[$filter('teamId')($scope.myEvent)].invitations){ // console.log($scope.eventObj.teams[].key); if (key == uid && $scope.eventObj.teams[$filter('teamId')($scope.myEvent)].invitations[key] =='pending') return false; } return true; } return false; }; console.log({position:"tba",team:null}); $scope.editInfo=function(){ if($scope.editButton=="Edit") { $scope.editButton="Save"; $scope.editingInfo=true; } else{ $scope.editButton="Edit"; $scope.editingInfo=false; $scope.eventObj.$save(); } } } ); app.filter('numKeys', function() { return function(json) { if(json===undefined) return 0; var keys = Object.keys(json) return keys.length; } }); app.filter('role', function(){ return function(obj) { if (obj === undefined){ return 'visitor'; } else return obj.position; } }); app.filter('teamId', function(){ return function(obj) { if (obj == undefined){ return null; } else{ //console.log(obj.team); return obj.team; } } });
/* * dragtable * * @Version 1.0.3 * * default css * */ /* * gets wrapped around placeholder table */ .<API key>{ position: absolute; z-index: 1000; } /* * this gets applied to the table copy of the col that we are dragging */ .<API key> .dragtable-drag-col{ opacity: 0.7; filter: alpha(opacity=70); cursor:move; } /* placeholder is just a name for the real table col */ .<API key> { border-left: 1px dotted black; border-right: 1px dotted black; color:#EFEFEF; background: #EFEFEF !important; visibility: visible !important; } table .<API key>:first{ border-top:1px dotted black; } .<API key> * { opacity: 0.0; visibility: hidden; }
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <base data-ice="baseUrl" href="../../"> <title data-ice="title">buildDocs/memoizeAll.js | Lodash Decorators Documentation API Document</title> <link type="text/css" rel="stylesheet" href="css/style.css"> <link type="text/css" rel="stylesheet" href="css/prettify-tomorrow.css"> <script src="script/prettify/prettify.js"></script> <script src="script/manual.js"></script> </head> <body class="layout-container" data-ice="rootContainer"> <header> <a href="./">Home</a> <a href="identifiers.html">Reference</a> <a href="source.html">Source</a> <a href="test.html" data-ice="testLink">Test</a> <a data-ice="repoURL" href="http://github.com/steelsojka/lodash-decorators" class="repo-url-github">Repository</a> <div class="search-box"> <span> <img src="./image/search.png"> <span class="search-input-edge"></span><input class="search-input"><span class="search-input-edge"></span> </span> <ul class="search-result"></ul> </div> </header> <nav class="navigation" data-ice="nav"><div> <ul> <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#<API key>">BindAll</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-function">F</span><span data-ice="name"><span><a href="function/index.html#<API key>">Mixin</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">After</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">AfterAll</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-Ary">Ary</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">Attempt</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">Before</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">BeforeAll</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">Bind</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">Curry</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">CurryAll</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">CurryRight</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">CurryRightAll</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">Debounce</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">DebounceAll</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">Defer</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">Delay</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">Flip</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">Flow</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">FlowRight</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">Memoize</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">MemoizeAll</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">Negate</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">Once</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">OnceAll</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">OverArgs</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">Partial</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">PartialRight</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">Rearg</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">Rest</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">Spread</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#static-variable-Tap">Tap</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">Throttle</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">ThrottleGetter</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">ThrottleSetter</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">ThrottleAll</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">Unary</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">Wrap</a></span></span></li> <li data-ice="doc"><div data-ice="dirPath" class="nav-dir-path">applicators</div><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/buildDocs/applicators/Applicator.js~Applicator.html">Applicator</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/buildDocs/applicators/BindApplicator.js~BindApplicator.html">BindApplicator</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/buildDocs/applicators/ComposeApplicator.js~ComposeApplicator.html">ComposeApplicator</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/buildDocs/applicators/InvokeApplicator.js~InvokeApplicator.html">InvokeApplicator</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/buildDocs/applicators/MemoizeApplicator.js~MemoizeApplicator.html">MemoizeApplicator</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/buildDocs/applicators/PartialApplicator.js~PartialApplicator.html">PartialApplicator</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/buildDocs/applicators/PartialedApplicator.js~PartialedApplicator.html">PartialedApplicator</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/buildDocs/applicators/PostValueApplicator.js~PostValueApplicator.html">PostValueApplicator</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/buildDocs/applicators/PreValueApplicator.js~PreValueApplicator.html">PreValueApplicator</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/buildDocs/applicators/WrapApplicator.js~WrapApplicator.html">WrapApplicator</a></span></span></li> <li data-ice="doc"><div data-ice="dirPath" class="nav-dir-path">factory</div><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/buildDocs/factory/DecoratorConfig.js~DecoratorConfig.html">DecoratorConfig</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-class">C</span><span data-ice="name"><span><a href="class/buildDocs/factory/DecoratorFactory.js~<API key>.html"><API key></a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">DecoratorFactory</a></span></span></li> <li data-ice="doc"><span data-ice="kind" class="kind-variable">V</span><span data-ice="name"><span><a href="variable/index.html#<API key>">InstanceChainMap</a></span></span></li> </ul> </div> </nav> <div class="content" data-ice="content"><h1 data-ice="title">buildDocs/memoizeAll.js</h1> <pre class="source-code line-number raw-source-code"><code class="prettyprint linenums" data-ice="content">import { memoize } from &apos;lodash&apos;; import { DecoratorConfig, DecoratorFactory } from &apos;./factory&apos;; import { MemoizeApplicator } from &apos;./applicators&apos;; /** * Memoizes a function on the prototype instead of the instance. All instances of the class use the same memoize cache. * @param {Function} [resolver] Optional resolver */ export const MemoizeAll = DecoratorFactory.createDecorator(new DecoratorConfig(memoize, new MemoizeApplicator())); export { MemoizeAll as memoizeAll }; export default MemoizeAll; </code></pre> </div> <footer class="footer"> Generated by <a href="https://esdoc.org">ESDoc<span data-ice="esdocVersion">(0.5.2)</span><img src="./image/<API key>.png"></a> </footer> <script src="script/search_index.js"></script> <script src="script/search.js"></script> <script src="script/pretty-print.js"></script> <script src="script/inherited-summary.js"></script> <script src="script/test-summary.js"></script> <script src="script/inner-link.js"></script> <script src="script/patch-for-local.js"></script> </body> </html>
#ifndef <API key> #define <API key> #include "<API key>.h" #include "equality.h" #include "paul_hsieh_hash.h" #include "thomas_wang_hash.h" #include <google/sparse_hash_map> #include <google/dense_hash_map> using namespace std; using google::sparse_hash_map; using google::dense_hash_map; //typedef struct page_edge_t page_edge_t; typedef struct { char* title; unsigned char distance; }page_edge_t; typedef struct { char* title; bool ambiguous; page_edge_t* neighbors; unsigned char neighbors_size; } page_neighbors_t; typedef sparse_hash_map<char*,page_neighbors_t*,PaulHsiehHash,eqstr> TitleNeighborsHash; typedef dense_hash_map<int,page_neighbors_t*,ThomasWangHash,eqint> IntNeighborHash; class <API key> : public <API key> { public: void load(const char* filename); void neighbors(RelationshipList& results, const string& key); void distances(RelationshipList& results, const TupleList& tuples); void map(void(* fn_ptr)(const string& title,const bool ambiguous,const vector<relationship_t>& rels)); protected: TitleNeighborsHash neighbors_; page_neighbors_t* <API key>(const char* title); }; #endif
# Node Image Manipulator [![Dependency Status](https: <br /> A small node server which manipulates images it receives for use in a Docker demonstration. To set manipulation modes for the server, visit the [modes](MODES.md) page. ## Sending Images The server is made to intercept `.png` images. We have a simple bash script to send an image: bash ./send-image.sh [hostname] [image.png] [renamed-image.png] So, for example, if I used this command locally with an image `node.png`: bash ./send-image.sh http://localhost:9001 node.png node2.png ## Standalone Server Setup To start up the server, clone the repository and run the following command in the project's root directory: node server.js This will start up a server running on port `9001` on `localhost`. Usage This server accepts an image as binary data as part of a `POST` request. As an example, `node.png` is included in the root directory. To get and receive the same file, you can run the following command: curl --request POST --data-binary "@node.png" http://localhost:9001/ >> node2.png ## Docker Server Docker Hub The image can be found on [Docker Hub](https://hub.docker.com/r/devshawn/<API key>). Build From Source Clone the repository and run the following command in the project's root directory: docker build -t <API key> . This will build the image. You can now spin up a container: docker run -d -p 9001:9001 <API key> This will spin up a container running the web server on port `9001` on `localhost`.
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using System.Web.Routing; namespace ForumSystem.Web { public class RouteConfig { public static void RegisterRoutes(RouteCollection routes) { routes.IgnoreRoute("{resource}.axd/{*pathInfo}"); routes.MapRoute( name: "Get by Tag", url: "questions/tagged/{tag}", defaults: new { controller = "Questions", action = "GetByTag"} ); routes.MapRoute( name: "Display question", url: "questions/{id}/{url}", defaults: new { controller = "Questions", action = "Display" } ); routes.MapRoute( name: "Default", url: "{controller}/{action}/{id}", defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional } ); } } }
// Adaptive music composition engine implementation for interactive systems. using UnityEngine; using System.Collections; namespace BarelyAPI { public class <API key> : MacroGenerator { ContextFreeGrammar grammar; public <API key>(int length, bool looping = false) : base(length, looping) { grammar = new ContextFreeGrammar(); grammar.AddRule("Start", "Intro Body Outro"); grammar.AddRule("Intro", "I"); grammar.AddRule("Body", "Statement Repetition Cadence"); grammar.AddRule("Statement", "V V C | V P C | V C"); grammar.AddRule("Repetition", "V C C | V P C | V C B P C | V C B V P C | V C B V C | Repetition B Repetition"); grammar.AddRule("Cadence", "C | P C C | C C | P C"); grammar.AddRule("Outro", "O"); } protected override void generateSequence(int length) { sectionSequence = grammar.GenerateSequence("Start"); } } }
from weight.weight_vector import WeightVector from data.data_pool import DataPool import os from learner import logger __version__ = '1.0.0' class <API key>: name = "<API key>" def __init__(self, w_vector=None): self.w_vector = {} if w_vector is None: return if not isinstance(w_vector, WeightVector): raise ValueError( "LEARNER [ERROR]: w_vector is not an instance of WeightVector") for key in w_vector.keys(): self.w_vector[key] = w_vector[key] return def sequential_learn(self, f_argmax, data_pool, iterations=1, d_filename=None, dump_freq=1): # check values if not isinstance(data_pool, DataPool): raise ValueError("LEARNER [ERROR]: data_pool not of DataPool type") if not isinstance(iterations, int): raise ValueError("LEARNER [ERROR]: iterations not of int type") if iterations < 1: raise ValueError("LEARNER [ERROR]: iterations needs to be positive integer") if d_filename is not None and not isinstance(d_filename, str): raise ValueError("LEARNER [ERROR]: d_filename needs to be str or None") if not isinstance(dump_freq, int): raise ValueError("LEARNER [ERROR]: dump_freq needs to be int") logger.info("Starting sequential train") logger.info("Using Learner: " + self.name) self.w_vector = {} # for t = 1 ... T for t in range(iterations): logger.info("Starting Iteration %d" % t) logger.info("Initial Number of Keys: %d" % len(self.w_vector.keys())) vector_list = self._iteration_learn(data_pool=data_pool, init_w_vector=self.w_vector, f_argmax=f_argmax, log=True, info="Iteration %d, " % t) self.w_vector = self._iteration_proc(vector_list) logger.info("Iteration complete, total number of keys: %d" % len(self.w_vector.keys())) if d_filename is not None: if t % dump_freq == 0 or t == iterations - 1: tmp = self.export() tmp.dump(d_filename + "_Iter_%d.db" % (t + 1)) return self.export() def parallel_learn(self, f_argmax, data_pool, iterations=1, d_filename=None, dump_freq=1, sparkContext=None, hadoop=False): def create_dp(textString, fgen, data_format): dp = DataPool(fgen = fgen, data_format = data_format, textString = textString[1]) return dp def get_sent_num(dp): return dp.get_sent_num() # check values from pyspark import SparkContext sc = sparkContext if sparkContext is None: raise ValueError("LEARNER [ERROR]: sparkContext not specified") if not isinstance(sc, SparkContext): raise ValueError("LEARNER [ERROR]: sparkContext not of pyspark.context.SparkContext type") if not isinstance(data_pool, DataPool): raise ValueError("LEARNER [ERROR]: data_pool not of DataPool type") if not isinstance(iterations, int): raise ValueError("LEARNER [ERROR]: iterations not of int type") if iterations < 1: raise ValueError("LEARNER [ERROR]: iterations needs to be positive integer") if d_filename is not None and not isinstance(d_filename, str): raise ValueError("LEARNER [ERROR]: d_filename needs to be str or None") if not isinstance(dump_freq, int): raise ValueError("LEARNER [ERROR]: dump_freq needs to be int") logger.info("Starting parallel train") logger.info("Using Learner: " + self.name) dir_name = data_pool.loadedPath() data_format = data_pool.data_format fgen = data_pool.fgen # By default, when the hdfs is configured for spark, even in local mode it will # still try to load from hdfs. The following code is to resolve this confusion. if hadoop is True: train_files = sc.wholeTextFiles(dir_name, minPartitions=10).cache() else: dir_name = os.path.abspath(os.path.expanduser(dir_name)) train_files = sc.wholeTextFiles("file://" + dir_name, minPartitions=10).cache() dp = train_files.map(lambda t: create_dp(textString = t, fgen = fgen, data_format = data_format)).cache() self.w_vector = {} tmp = dp.map(get_sent_num).sum() logger.info("Totel number of sentences: %d" % tmp) for t in range(iterations): logger.info("Starting Iteration %d" % t) logger.info("Initial Number of Keys: %d" % len(self.w_vector.keys())) w_vector_list = dp.flatMap( lambda t: self._iteration_learn(data_pool=t, init_w_vector=self.w_vector, f_argmax=f_argmax)) w_vector_list = w_vector_list.combineByKey( lambda value: value, lambda x, value: tuple(map(sum, zip(x, value))), lambda x, y: tuple(map(sum, zip(x, y)))).collect() self.w_vector = self._iteration_proc(w_vector_list) logger.info("Iteration complete, total number of keys: %d" % len(self.w_vector.keys())) if d_filename is not None: if t % dump_freq == 0 or t == iterations - 1: tmp = self.export() tmp.dump(d_filename + "_Iter_%d.db" % (t + 1), sparkContext) return self.export()
class <%= class_name.underscore.camelize %> < ActiveRecord::Migration def self.up create_table '<%= tags_table %>', :force => true do |table| table.string 'name', :null => false end add_index '<%= tags_table %>', 'name', :unique => true create_table '<%= taggings_table %>', :force => true do |table| table.integer 'spraypaint_tag_id', :null => false table.integer 'target_id', :null => false table.string 'target_type', :null => false end add_index '<%= taggings_table %>', 'target_id' add_index '<%= taggings_table %>', 'target_type' add_index '<%= taggings_table %>', 'spraypaint_tag_id' add_index '<%= taggings_table %>', ['target_type', 'target_id', 'spraypaint_tag_id'], :unique => true, :name => '<API key>' end def self.down drop_table '<%= taggings_table %>' drop_table '<%= tags_table %>' end end
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title></title> <link rel="stylesheet" type="text/css" href="js/lib/jqueryeasyui/themes/default/easyui.css"> <link rel="stylesheet" type="text/css" href="js/lib/jqueryeasyui/themes/icon.css"> <link rel="stylesheet" type="text/css" href="js/lib/jqueryeasyui/themes/demo.css"> <script type="text/javascript" src="js/lib/jquery.min.js"></script> <script type="text/javascript" src="js/lib/jqueryeasyui/jquery.easyui.min.js"></script> </head> <body> <h2>Basic Tabs</h2> <p>Click tab strip to swap tab panel content.</p> <div style="margin:20px 0 10px 0;"></div> <div class="easyui-tabs" style="width:700px;height:250px"> <div title="About" style="padding:10px"> <p style="font-size:14px">jQuery EasyUI framework helps you build your web pages easily.</p> <ul> <li>easyui is a collection of user-interface plugin based on jQuery.</li> <li>easyui provides essential functionality for building modem, interactive, javascript applications.</li> <li>using easyui you don't need to write many javascript code, you usually defines user-interface by writing some HTML markup.</li> <li>complete framework for HTML5 web page.</li> <li>easyui save your time and scales while developing your products.</li> <li>easyui is very easy but powerful.</li> </ul> </div> <div title="My Documents" style="padding:10px"> <ul class="easyui-tree" data-options="url:'tree_data1.json',method:'get',animate:true"></ul> </div> <div title="Help" data-options="iconCls:'icon-help',closable:true" style="padding:10px"> This is the help content. </div> </div> </body> </html>
<input type="text" ng-model="search"/> <ul> <li ng-repeat="project in projects | filter:search | orderBy:'name'"> <a ng-href="{{project.site}}">{{project.name}}</a> <span>{{project.description}}</span> <a ng-href="#/edit/{{project.$id}}"><i class="icon-pencil"></i></a> <a ng-click="remove()"><i class="icon-trash"></i></a> </li> </ul>
# coding=utf-8 # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. from typing import TYPE_CHECKING import warnings from azure.core.exceptions import <API key>, HttpResponseError, ResourceExistsError, <API key>, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpRequest, HttpResponse from azure.mgmt.core.exceptions import ARMErrorFormat from .. import models as _models if TYPE_CHECKING: # pylint: disable=unused-import,ungrouped-imports from typing import Any, Callable, Dict, Generic, Iterable, Optional, TypeVar, Union T = TypeVar('T') ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]] class <API key>(object): """<API key> operations. You should not instantiate this class directly. Instead, you should create a Client instance that instantiates it for you and attaches it as an attribute. :ivar models: Alias to model classes used in this operation group. :type models: ~$(<API key>).v2015_04_01.models :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. """ models = _models def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer self._config = config def <API key>( self, resource_group_name, # type: str **kwargs # type: Any ): # type: (...) -> Iterable["_models.<API key>"] """Lists the autoscale settings for a resource group. :param resource_group_name: The name of the resource group. :type resource_group_name: str :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either <API key> or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~$(<API key>).v2015_04_01.models.<API key>] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.<API key>"] error_map = { 401: <API key>, 404: <API key>, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) api_version = "2015-04-01" accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL url = self.<API key>.metadata['url'] # type: ignore <API key> = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **<API key>) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') request = self._client.get(url, query_parameters, header_parameters) else: url = next_link query_parameters = {} # type: Dict[str, Any] request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): deserialized = self._deserialize('<API key>', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: error = self._deserialize.<API key>(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) <API key>.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings'} # type: ignore def create_or_update( self, resource_group_name, # type: str <API key>, # type: str parameters, # type: "_models.<API key>" **kwargs # type: Any ): # type: (...) -> "_models.<API key>" """Creates or updates an autoscale setting. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param <API key>: The autoscale setting name. :type <API key>: str :param parameters: Parameters supplied to the operation. :type parameters: ~$(<API key>).v2015_04_01.models.<API key> :keyword callable cls: A custom type or function that will be passed the direct response :return: <API key>, or the result of cls(response) :rtype: ~$(<API key>).v2015_04_01.models.<API key> :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.<API key>"] error_map = { 401: <API key>, 404: <API key>, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) api_version = "2015-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self.create_or_update.metadata['url'] # type: ignore <API key> = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), '<API key>': self._serialize.url("<API key>", <API key>, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **<API key>) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(parameters, '<API key>') body_content_kwargs['content'] = body_content request = self._client.put(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 201]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.<API key>(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if response.status_code == 200: deserialized = self._deserialize('<API key>', pipeline_response) if response.status_code == 201: deserialized = self._deserialize('<API key>', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{<API key>}'} # type: ignore def delete( self, resource_group_name, # type: str <API key>, # type: str **kwargs # type: Any ): # type: (...) -> None """Deletes and autoscale setting. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param <API key>: The autoscale setting name. :type <API key>: str :keyword callable cls: A custom type or function that will be passed the direct response :return: None, or the result of cls(response) :rtype: None :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType[None] error_map = { 401: <API key>, 404: <API key>, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) api_version = "2015-04-01" accept = "application/json" # Construct URL url = self.delete.metadata['url'] # type: ignore <API key> = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), '<API key>': self._serialize.url("<API key>", <API key>, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **<API key>) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.delete(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200, 204]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.<API key>(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) if cls: return cls(pipeline_response, None, {}) delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{<API key>}'} # type: ignore def get( self, resource_group_name, # type: str <API key>, # type: str **kwargs # type: Any ): # type: (...) -> "_models.<API key>" """Gets an autoscale setting. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param <API key>: The autoscale setting name. :type <API key>: str :keyword callable cls: A custom type or function that will be passed the direct response :return: <API key>, or the result of cls(response) :rtype: ~$(<API key>).v2015_04_01.models.<API key> :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.<API key>"] error_map = { 401: <API key>, 404: <API key>, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) api_version = "2015-04-01" accept = "application/json" # Construct URL url = self.get.metadata['url'] # type: ignore <API key> = { 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), '<API key>': self._serialize.url("<API key>", <API key>, 'str'), 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **<API key>) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') request = self._client.get(url, query_parameters, header_parameters) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.<API key>(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('<API key>', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized get.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{<API key>}'} # type: ignore def update( self, resource_group_name, # type: str <API key>, # type: str <API key>, # type: "_models.<API key>" **kwargs # type: Any ): # type: (...) -> "_models.<API key>" """Updates an existing <API key>. To update other fields use the CreateOrUpdate method. :param resource_group_name: The name of the resource group. :type resource_group_name: str :param <API key>: The autoscale setting name. :type <API key>: str :param <API key>: Parameters supplied to the operation. :type <API key>: ~$(<API key>).v2015_04_01.models.<API key> :keyword callable cls: A custom type or function that will be passed the direct response :return: <API key>, or the result of cls(response) :rtype: ~$(<API key>).v2015_04_01.models.<API key> :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.<API key>"] error_map = { 401: <API key>, 404: <API key>, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) api_version = "2015-04-01" content_type = kwargs.pop("content_type", "application/json") accept = "application/json" # Construct URL url = self.update.metadata['url'] # type: ignore <API key> = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), '<API key>': self._serialize.url("<API key>", <API key>, 'str'), } url = self._client.format_url(url, **<API key>) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str') header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') body_content_kwargs = {} # type: Dict[str, Any] body_content = self._serialize.body(<API key>, '<API key>') body_content_kwargs['content'] = body_content request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: map_error(status_code=response.status_code, response=response, error_map=error_map) error = self._deserialize.<API key>(_models.ErrorResponse, response) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) deserialized = self._deserialize('<API key>', pipeline_response) if cls: return cls(pipeline_response, deserialized, {}) return deserialized update.metadata = {'url': '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}/providers/Microsoft.Insights/autoscalesettings/{<API key>}'} # type: ignore def <API key>( self, **kwargs # type: Any ): # type: (...) -> Iterable["_models.<API key>"] """Lists the autoscale settings for a subscription. :keyword callable cls: A custom type or function that will be passed the direct response :return: An iterator like instance of either <API key> or the result of cls(response) :rtype: ~azure.core.paging.ItemPaged[~$(<API key>).v2015_04_01.models.<API key>] :raises: ~azure.core.exceptions.HttpResponseError """ cls = kwargs.pop('cls', None) # type: ClsType["_models.<API key>"] error_map = { 401: <API key>, 404: <API key>, 409: ResourceExistsError } error_map.update(kwargs.pop('error_map', {})) api_version = "2015-04-01" accept = "application/json" def prepare_request(next_link=None): # Construct headers header_parameters = {} # type: Dict[str, Any] header_parameters['Accept'] = self._serialize.header("accept", accept, 'str') if not next_link: # Construct URL url = self.<API key>.metadata['url'] # type: ignore <API key> = { 'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str', min_length=1), } url = self._client.format_url(url, **<API key>) # Construct parameters query_parameters = {} # type: Dict[str, Any] query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str') request = self._client.get(url, query_parameters, header_parameters) else: url = next_link query_parameters = {} # type: Dict[str, Any] request = self._client.get(url, query_parameters, header_parameters) return request def extract_data(pipeline_response): deserialized = self._deserialize('<API key>', pipeline_response) list_of_elem = deserialized.value if cls: list_of_elem = cls(list_of_elem) return deserialized.next_link or None, iter(list_of_elem) def get_next(next_link=None): request = prepare_request(next_link) pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs) response = pipeline_response.http_response if response.status_code not in [200]: error = self._deserialize.<API key>(_models.ErrorResponse, response) map_error(status_code=response.status_code, response=response, error_map=error_map) raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat) return pipeline_response return ItemPaged( get_next, extract_data ) <API key>.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Insights/autoscalesettings'} # type: ignore
require 'test_helper' class <API key> < ActionController::TestCase setup do @link_request = link_requests(:one) end test "should get index" do get :index assert_response :success assert_not_nil assigns(:link_requests) end test "should get new" do get :new assert_response :success end test "should create link_request" do assert_difference('LinkRequest.count') do post :create, link_request: { } end <API key> link_request_path(assigns(:link_request)) end test "should show link_request" do get :show, id: @link_request assert_response :success end test "should get edit" do get :edit, id: @link_request assert_response :success end test "should update link_request" do patch :update, id: @link_request, link_request: { } <API key> link_request_path(assigns(:link_request)) end test "should destroy link_request" do assert_difference('LinkRequest.count', -1) do delete :destroy, id: @link_request end <API key> link_requests_path end end
<?php namespace application\nutsNBolts\plugin\workflow { use nutshell\Nutshell; use nutshell\core\plugin\PluginExtension; class Action extends PluginExtension { private $db =null; private $model =null; public function init() { if ($connection=Nutshell::getInstance()->config->plugin->Mvc->connection) { $this->db =$this->plugin->Db->{$connection}; $this->model=$this->plugin->Mvc->model; } } public function saveRecord($nodeId,$params) { $record=array(); foreach ($this->request->getAll() AS $key=>$rec) { // checking to see if an array is passed, and converting it to a json object if($key != 'url' && is_array($rec)) { $record[$key]='application/json: '.json_encode($rec); } else { $record[$key]=$rec; } } if ($this->model->Node->handleRecord($record)) { $this->plugin->Notification->setSuccess('Content successfully edited.'); return true; } else { $this->plugin->Notification->setError('Oops! Something went wrong, and this is a terrible error message!'); } return false; } public function setNodeStatus($nodeId,$params) { if (isset($params['status']) && is_numeric($params['status'])) { $this->model->Node->update(array('status'=>$params['status']),array('id'=>$nodeId)); return true; } else { //TODO: throw exception. } return false; } public function <API key>($nodeId,$params) { return $this->plugin->Message->sendMessage ( $params['toId'], $params['subject'], str_replace('{$nodeId}',$nodeId,$params['message']) ); } public function <API key>($nodeId,$params) { $users=$this->model->User->getUsersByRole($params['role']); for ($i=0,$j=count($users); $i<$j; $i++) { $this->plugin->Message->sendMessage ( $users[$i]['id'], $params['subject'], str_replace('{$nodeId}',$nodeId,$params['message']) ); } return true; } } }
package jobs import ( "fmt" "github.com/nubleer/revel" "github.com/nubleer/revel/modules/jobs/app/jobs" "github.com/nubleer/revel/samples/booking/app/controllers" "github.com/nubleer/revel/samples/booking/app/models" ) // Periodically count the bookings in the database. type BookingCounter struct{} func (c BookingCounter) Run() { bookings, err := controllers.Dbm.Select(models.Booking{}, `select * from Booking`) if err != nil { panic(err) } fmt.Printf("There are %d bookings.\n", len(bookings)) } func init() { revel.OnAppStart(func() { jobs.Schedule("@every 1m", BookingCounter{}) }) }
// this software and associated documentation files (the "Software"), to deal in // the Software without restriction, including without limitation the rights to // 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 AUTHORS OR // 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. #include "llbc/common/Export.h" #include "llbc/common/BeforeIncl.h" #include "llbc/core/log/LogFormattingInfo.h" __LLBC_NS_BEGIN <API key>::<API key>(bool leftAlign, int minLen, int maxLen, int fillCharacter) : _leftAlign(leftAlign) , _minLen(minLen) , _maxLen(maxLen) , _fillCharacter(fillCharacter) { } <API key>::~<API key>() { } bool <API key>::GetLeftAlign() const { return _leftAlign; } void <API key>::SetLeftAligh(bool leftAlign) { _leftAlign = leftAlign; } int <API key>::GetMinLen() const { return _minLen; } void <API key>::SetMinLen(int minLen) { _minLen = MAX(0, minLen); } int <API key>::GetMaxLen() const { return _maxLen; } void <API key>::SetMaxLen(int maxLen) { _maxLen = MAX(0, maxLen); } char <API key>::GetFillCharacter() const { return _fillCharacter; } void <API key>::SetFillCharacter(char fillCharacter) { _fillCharacter = fillCharacter; } void <API key>::Format(LLBC_String &data, int fieldStart) const { fieldStart = MAX(0, fieldStart); fieldStart = MIN(fieldStart, static_cast<int>(data.length())); int rawLen = static_cast<int>(data.length()) - fieldStart; if (rawLen > _maxLen) data.erase(fieldStart + _maxLen, rawLen - _maxLen); if (rawLen < _minLen) { if (_leftAlign) data.append(_minLen - rawLen, _fillCharacter); else data.insert(fieldStart, _minLen - rawLen, _fillCharacter); } } __LLBC_NS_END #include "llbc/common/AfterIncl.h"
#include <algorithm> #include <cmath> #include <cctype> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> #define FOR(i,a,b) for (int i = a; i <= b; i++) #define FORN(i,N) for (int i = 0; i < N; i++) #define FORD(i,a,b) for (int i = a; i >= b; i using namespace std; typedef long long ll; typedef unsigned long long ull; typedef vector<int> vi; typedef pair<int,int> pii; typedef vector<pii> vpii; int main() { int T; long long int N; scanf("%d",&T); while(T scanf("%lld",&N); int count = 0; long long int X = N; while(N > 0) { int c = N%10; N = N/10; if(c!=0&&X%c==0) count++; } printf("%d\n",count); } return 0; }