code
stringlengths
3
1.05M
repo_name
stringlengths
4
116
path
stringlengths
3
942
language
stringclasses
30 values
license
stringclasses
15 values
size
int32
3
1.05M
<?php /** * Magento * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@magento.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade Magento to newer * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magento.com for more information. * * @category Mage * @package Mage_Paypal * @copyright Copyright (c) 2006-2019 Magento, Inc. (http://www.magento.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** * Fieldset renderer for PayPal solutions which have dependencies on other solutions * * @category Mage * @package Mage_Paypal * @author Magento Core Team <core@magentocommerce.com> */ class Mage_Paypal_Block_Adminhtml_System_Config_Fieldset_PathDependent extends Mage_Paypal_Block_Adminhtml_System_Config_Fieldset_Payment { /** * Check whether current payment method has active dependencies * * @param array $groupConfig * @return bool */ public function hasActivePathDependencies($groupConfig) { $activityPath = isset($groupConfig['hide_case_path']) ? $groupConfig['hide_case_path'] : ''; return !empty($activityPath) && (bool)(string)$this->_getConfigDataModel()->getConfigDataValue($activityPath); } /** * Do not render solution if disabled * * @param Varien_Data_Form_Element_Abstract $element * @return string */ public function render(Varien_Data_Form_Element_Abstract $element) { if (!$this->hasActivePathDependencies($this->getGroup($element)->asArray())) { return parent::render($element); } return ''; } }
portchris/NaturalRemedyCompany
src/app/code/core/Mage/Paypal/Block/Adminhtml/System/Config/Fieldset/PathDependent.php
PHP
mit
2,121
<?php namespace Domora\TvGuide\Data; use Doctrine\ORM\Mapping as ORM; use Doctrine\Common\Collections\ArrayCollection; use JMS\Serializer\Annotation as Serializer; /** * @ORM\Entity * @ORM\Table(name="service") */ class Service { /** * @ORM\Id * @ORM\Column(type="string") * @Serializer\Groups({"list", "service"}) */ private $id; /** * @ORM\Column(type="string") * @Serializer\Groups({"list", "service"}) */ private $name; /** * @ORM\Column(type="string") * @Serializer\Groups({"list", "service"}) */ private $country; /** * @ORM\OneToMany(targetEntity="ServiceChannelAssociation", mappedBy="service") * @Serializer\Type("array<Domora\TvGuide\Data\ServiceChannelAssociation>") * @Serializer\Groups({"service"}) */ private $channels; public function __construct() { $this->channels = new ArrayCollection(); } /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set id * * @param string id * @return Channel */ public function setId($id) { $this->id = $id; return $this; } /** * Set name * * @param string $name * @return Channel */ public function setName($name) { $this->name = $name; return $this; } /** * Get name * * @return string */ public function getName() { return $this->name; } /** * Set country * * @param string $country * @return Channel */ public function setCountry($country) { $this->country = $country; return $this; } /** * Get country * * @return string */ public function getCountry() { return $this->country; } /** * Add channels * * @param \Domora\TvGuide\Data\ServiceChannelAssociation $channels * * @return Service */ public function addChannel(\Domora\TvGuide\Data\ServiceChannelAssociation $channels) { $this->channels[] = $channels; return $this; } /** * Remove channels * * @param \Domora\TvGuide\Data\ServiceChannelAssociation $channels */ public function removeChannel(\Domora\TvGuide\Data\ServiceChannelAssociation $channels) { $this->channels->removeElement($channels); } /** * Get channels * * @return \Doctrine\Common\Collections\Collection */ public function getChannels() { return $this->channels; } }
domora/tvguide
src/Domora/TvGuide/Data/Service.php
PHP
mit
2,698
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("NotificationSenderUtility")] [assembly: AssemblyDescription("Class Library to communicate with the Push Notification Service")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Microsoft Corp.")] [assembly: AssemblyProduct("Using Push Notifications Hands-on Lab")] [assembly: AssemblyCopyright("Copyright © Microsoft 2010")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("4cb73b37-8cd0-456a-8c69-ea3e6622582b")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
DDReaper/XNAGameStudio
Samples/PushRecipe_WP7_SL/Source/WindowsPhone.Recipes.Push.Messasges/Properties/AssemblyInfo.cs
C#
mit
1,525
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = { reddit: { userAgent: 'USER_AGENT', clientId: 'CLIENT ID', clientSecret: 'CLIENT SECRET', username: 'BOT USERNAME', password: 'BOT PASSWORD' }, mods: ['MODERATOR_1', 'MODERATOR_2'] };
cmhoc/fuckmwbot
dist/config.js
JavaScript
mit
308
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); class Powder_Plastic_Coat_Model extends CI_Model { private $powder_plastic_coatTable = 'powder_plastic_coat'; private $powder_plastic_coatColumn = 'powder_plastic_coat_id'; public function __construct() { parent::__construct(); } public function form_input_attributes($data, $id) { if(isset($id) && !empty($id)) { $data_split = explode('_', $data); $this->db->where($this->powder_plastic_coatColumn, $id); $query = $this->db->get($this->powder_plastic_coatTable); foreach ($query->result() as $row) { $value = $row->$data; } if(count($data_split) > 2) { $attributes = array( 'name' => $data_split[3], 'id' => $data_split[3], 'type' => 'text', 'value' => $value, 'class' => 'form-control input-md', 'placeholder' => 'insert '.str_replace('_', ' ', $data).' here' ); } else { $attributes = array( 'name' => $data_split[3], 'id' => $data_split[3], 'type' => 'text', 'value' => $value, 'class' => 'form-control input-md', 'placeholder' => 'insert '.str_replace('_', ' ', $data).' here' ); } } else { $data_split = explode('_', $data); if(count($data_split) > 2) { $attributes = array( 'name' => $data_split[3], 'id' => $data_split[3], 'type' => 'text', 'class' => 'form-control input-md', 'placeholder' => 'insert '.str_replace('_', ' ', $data_split[3]).' here' ); } else { $attributes = array( 'name' => $data_split[3], 'id' => $data_split[3], 'type' => 'text', 'class' => 'form-control input-md', 'placeholder' => 'insert '.str_replace('_', ' ', $data_split[3]).' here' ); } } return $attributes; } public function form_textarea_attributes($data, $id) { if(isset($id) && !empty($id)) { $this->db->where($this->powder_plastic_coatColumn, $id); $query = $this->db->get($this->powder_plastic_coatTable); foreach ($query->result() as $row) { $value = $row->$data; } $attributes = array( 'name' => $data, 'id' => $data, 'rows' => '5', 'value' => $value, 'class' => 'auto-size form-control', 'placeholder' => 'insert '.str_replace('_', ' ', $data).' here' ); } else { $attributes = array( 'name' => $data, 'id' => $data, 'rows' => '5', 'class' => 'auto-size form-control', 'placeholder' => 'insert '.str_replace('_', ' ', $data).' here' ); } return $attributes; } public function form_input_numeric_attributes($data, $id) { if(isset($id) && !empty($id)) { $data_split = explode('_', $data); $this->db->where($this->powder_plastic_coatColumn, $id); $query = $this->db->get($this->powder_plastic_coatTable); foreach ($query->result() as $row) { $value = $row->$data; } if(count($data_split) > 2) { $attributes = array( 'name' => $data_split[3].'_'.$data_split[4], 'id' => $data_split[3].'_'.$data_split[4], 'type' => 'text', 'value' => $value, 'class' => 'form-control input-md numeric', 'placeholder' => 'insert '.str_replace('_', ' ', $data_split[3].' '.$data_split[4]).' here' ); } else { $attributes = array( 'name' => $data_split[3].'_'.$data_split[4], 'id' => $data_split[3].'_'.$data_split[4], 'type' => 'text', 'value' => $value, 'class' => 'form-control input-md numeric', 'placeholder' => 'insert '.str_replace('_', ' ', $data_split[3].' '.$data_split[4]).' here' ); } } else { $data_split = explode('_', $data); if(count($data_split) > 2) { $attributes = array( 'name' => $data_split[3].'_'.$data_split[4], 'id' => $data_split[3].'_'.$data_split[4], 'type' => 'text', 'class' => 'form-control input-md numeric', 'placeholder' => 'insert '.str_replace('_', ' ', $data_split[3].' '.$data_split[4]).' here' ); } else { $attributes = array( 'name' => $data_split[3].'_'.$data_split[4], 'id' => $data_split[3].'_'.$data_split[4], 'type' => 'text', 'class' => 'form-control input-md numeric', 'placeholder' => 'insert '.str_replace('_', ' ', $data_split[3].' '.$data_split[4]).' here' ); } } return $attributes; } public function find($id) { $this->db->select('*'); $this->db->from('powder_plastic_coat as dep'); $this->db->join('created as cre','dep.powder_plastic_coat_id = cre.created_table_id'); $this->db->where('cre.created_table','powder_plastic_coat'); $this->db->where('dep.powder_plastic_coat_id', $id); $query = $this->db->get(); foreach ($query->result() as $row) { $arr[] = array( 'powder_plastic_coat_id' => $row->powder_plastic_coat_id, 'powder_plastic_coat_code' => $row->powder_plastic_coat_code, 'derpartment_name' => $row->powder_plastic_coat_name, 'powder_plastic_coat_description' => $row->powder_plastic_coat_description ); } return $arr; } public function insert($data) { $this->db->insert($this->powder_plastic_coatTable, $data); return $this->db->insert_id(); } public function modify($data, $id) { $this->db->where($this->powder_plastic_coatColumn, $id); $this->db->update($this->powder_plastic_coatTable, $data); return true; } public function get_all_powder_plastic_coat($start_from=0, $limit=0) { $this->db->select('*'); $this->db->from($this->powder_plastic_coatTable.' as pow'); $this->db->join('status as stat','pow.powder_plastic_coat_id = stat.status_table_id'); $this->db->where('stat.status_table', $this->powder_plastic_coatTable); $this->db->where('stat.status_code', 1); $this->db->order_by('pow.'.$this->powder_plastic_coatColumn, 'DESC'); $query = $this->db->limit( $limit, $start_from )->get(); return $query; } public function get_alls_powder_plastic_coat() { $this->db->select('*'); $this->db->from($this->powder_plastic_coatTable.' as pow'); $this->db->join('status as stat','pow.powder_plastic_coat_id = stat.status_table_id'); $this->db->where('stat.status_table', $this->powder_plastic_coatTable); $this->db->where('stat.status_code', 1); $this->db->order_by('pow.'.$this->powder_plastic_coatColumn, 'DESC'); $query = $this->db->get(); return $query; } public function like_powder_plastic_coat($wildcard='', $start_from=0, $limit=0) { $this->db->select('*'); $this->db->from($this->powder_plastic_coatTable.' as pow'); $this->db->join('status as stat','pow.powder_plastic_coat_id = stat.status_table_id'); $this->db->join('unit_of_measurement as uom','pow.unit_of_measurement_id = uom.unit_of_measurement_id'); $this->db->where('stat.status_table', $this->powder_plastic_coatTable); $this->db->where('stat.status_code', 1); $this->db->group_start(); $this->db->or_where('pow.powder_plastic_coat_id LIKE', '%' . $wildcard . '%'); $this->db->or_where('pow.powder_plastic_coat_code LIKE', '%' . $wildcard . '%'); $this->db->or_where('pow.powder_plastic_coat_name LIKE', '%' . $wildcard . '%'); $this->db->or_where('pow.powder_plastic_coat_description LIKE', '%' . $wildcard . '%'); $this->db->or_where('pow.powder_plastic_coat_weighted_ave LIKE', '%' . $wildcard . '%'); $this->db->or_where('uom.unit_of_measurement_name LIKE', '%' . $wildcard . '%'); $this->db->group_end(); $this->db->order_by('pow.'.$this->powder_plastic_coatColumn, 'DESC'); $query = $this->db->limit( $limit, $start_from )->get(); return $query; } public function likes_powder_plastic_coat($wildcard='') { $this->db->select('*'); $this->db->from($this->powder_plastic_coatTable.' as pow'); $this->db->join('status as stat','pow.powder_plastic_coat_id = stat.status_table_id'); $this->db->join('unit_of_measurement as uom','pow.unit_of_measurement_id = uom.unit_of_measurement_id'); $this->db->where('stat.status_table', $this->powder_plastic_coatTable); $this->db->where('stat.status_code', 1); $this->db->group_start(); $this->db->or_where('pow.powder_plastic_coat_id LIKE', '%' . $wildcard . '%'); $this->db->or_where('pow.powder_plastic_coat_code LIKE', '%' . $wildcard . '%'); $this->db->or_where('pow.powder_plastic_coat_name LIKE', '%' . $wildcard . '%'); $this->db->or_where('pow.powder_plastic_coat_description LIKE', '%' . $wildcard . '%'); $this->db->or_where('pow.powder_plastic_coat_weighted_ave LIKE', '%' . $wildcard . '%'); $this->db->or_where('uom.unit_of_measurement_name LIKE', '%' . $wildcard . '%'); $this->db->group_end(); $this->db->order_by('pow.'.$this->powder_plastic_coatColumn, 'DESC'); $query = $this->db->get(); return $query; } public function get_all_archived_powder_plastic_coat($start_from=0, $limit=0) { $this->db->select('*'); $this->db->from($this->powder_plastic_coatTable.' as dep'); $this->db->join('status as stat','dep.powder_plastic_coat_id = stat.status_table_id'); $this->db->where('stat.status_table', $this->powder_plastic_coatTable); $this->db->where('stat.status_code', 0); $this->db->order_by('dep.'.$this->powder_plastic_coatColumn, 'DESC'); $query = $this->db->limit( $limit, $start_from )->get(); return $query; } public function get_alls_archived_powder_plastic_coat() { $this->db->select('*'); $this->db->from($this->powder_plastic_coatTable.' as dep'); $this->db->join('status as stat','dep.powder_plastic_coat_id = stat.status_table_id'); $this->db->where('stat.status_table', $this->powder_plastic_coatTable); $this->db->where('stat.status_code', 0); $this->db->order_by('dep.'.$this->powder_plastic_coatColumn, 'DESC'); $query = $this->db->get(); return $query; } public function like_archived_powder_plastic_coat($wildcard='', $start_from=0, $limit=0) { $this->db->select('*'); $this->db->from($this->powder_plastic_coatTable.' as pow'); $this->db->join('status as stat','pow.powder_plastic_coat_id = stat.status_table_id'); $this->db->join('unit_of_measurement as uom','pow.unit_of_measurement_id = uom.unit_of_measurement_id'); $this->db->where('stat.status_table', $this->powder_plastic_coatTable); $this->db->where('stat.status_code', 0); $this->db->group_start(); $this->db->or_where('pow.powder_plastic_coat_id LIKE', '%' . $wildcard . '%'); $this->db->or_where('pow.powder_plastic_coat_code LIKE', '%' . $wildcard . '%'); $this->db->or_where('pow.powder_plastic_coat_name LIKE', '%' . $wildcard . '%'); $this->db->or_where('pow.powder_plastic_coat_description LIKE', '%' . $wildcard . '%'); $this->db->or_where('pow.powder_plastic_coat_weighted_ave LIKE', '%' . $wildcard . '%'); $this->db->or_where('uom.unit_of_measurement_name LIKE', '%' . $wildcard . '%'); $this->db->group_end(); $this->db->order_by('pow.'.$this->powder_plastic_coatColumn, 'DESC'); $query = $this->db->limit( $limit, $start_from )->get(); return $query; } public function likes_archived_powder_plastic_coat($wildcard='') { $this->db->select('*'); $this->db->from($this->powder_plastic_coatTable.' as pow'); $this->db->join('status as stat','pow.powder_plastic_coat_id = stat.status_table_id'); $this->db->join('unit_of_measurement as uom','pow.unit_of_measurement_id = uom.unit_of_measurement_id'); $this->db->where('stat.status_table', $this->powder_plastic_coatTable); $this->db->where('stat.status_code', 0); $this->db->group_start(); $this->db->or_where('pow.powder_plastic_coat_id LIKE', '%' . $wildcard . '%'); $this->db->or_where('pow.powder_plastic_coat_code LIKE', '%' . $wildcard . '%'); $this->db->or_where('pow.powder_plastic_coat_name LIKE', '%' . $wildcard . '%'); $this->db->or_where('pow.powder_plastic_coat_description LIKE', '%' . $wildcard . '%'); $this->db->or_where('pow.powder_plastic_coat_weighted_ave LIKE', '%' . $wildcard . '%'); $this->db->or_where('uom.unit_of_measurement_name LIKE', '%' . $wildcard . '%'); $this->db->group_end(); $this->db->order_by('pow.'.$this->powder_plastic_coatColumn, 'DESC'); $query = $this->db->get(); return $query; } public function get_powder_plastic_coat_name_by_id($id) { $this->db->where($this->powder_plastic_coatColumn, $id); $query = $this->db->get($this->powder_plastic_coatTable); foreach($query->result() as $row) { $id = $row->powder_plastic_coat_name; } return $id; } public function form_select_attributes($data) { $attributes = array( 'name' => $data, 'id' => $data, 'class' => 'selectpicker', 'data-live-search' => 'true' ); return $attributes; } public function form_select_options($data) { $query = $this->db->get($this->powder_plastic_coatTable); $arr[] = array( '0' => 'select '.str_replace('_', ' ', $data).' here', ); foreach ($query->result() as $row) { $arr[] = array( $row->powder_plastic_coat_id => $row->powder_plastic_coat_name ); } $array = array(); foreach($arr as $arrs) foreach($arrs as $key => $val) $array[$key] = $val; return $array; } public function form_selected_options($id) { $this->db->select('*'); $this->db->from($this->powder_plastic_coatTable); $this->db->where($this->powder_plastic_coatColumn, $id); $query = $this->db->get(); if($query->num_rows() > 0) { foreach ($query->result() as $row) { $id = $row->powder_plastic_coat_id; } return $id; } else { return $id = '0'; } } }
aliudin-ftc/just-in-time-version-2
application/models/Powder_Plastic_Coat_Model.php
PHP
mit
16,688
# frozen_string_literal: true require 'spec_helper' describe Gitlab::Ci::Pipeline::Seed::Environment do let_it_be(:project) { create(:project) } let(:job) { build(:ci_build, project: project) } let(:seed) { described_class.new(job) } let(:attributes) { {} } before do job.assign_attributes(**attributes) end describe '#to_resource' do subject { seed.to_resource } context 'when job has environment attribute' do let(:attributes) do { environment: 'production', options: { environment: { name: 'production' } } } end it 'returns a persisted environment object' do expect(subject).to be_a(Environment) expect(subject).to be_persisted expect(subject.project).to eq(project) expect(subject.name).to eq('production') end context 'when environment has already existed' do let!(:environment) { create(:environment, project: project, name: 'production') } it 'returns the existing environment object' do expect(subject).to be_persisted expect(subject).to eq(environment) end end end end end
stoplightio/gitlabhq
spec/lib/gitlab/ci/pipeline/seed/environment_spec.rb
Ruby
mit
1,171
// // PTAuthenticWebViewController.h // Pentagon_iOS // // Created by vinci on 2017/6/27. // Copyright © 2017年 vinci. All rights reserved. // #import "PTBaseViewController.h" @interface PTAuthenticWebViewController : PTBaseViewController @end
liuyuewu/vinci
Pentagon_iOS/Pentagon_iOS/PTAuthenticWebViewController.h
C
mit
253
<?php namespace Phrest\API; use PHPUnit\Framework\TestCase; use Zend\Diactoros\ServerRequest; class RESTActionTraitTestClassBase { use RESTActionTrait; } class RESTActionTraitTestClass extends RESTActionTraitTestClassBase { public function get() { } public function delete() { } } class RESTActionTraitTest extends TestCase { public function testConstructor() { $class = new RESTActionTraitTestClass(); self::assertInstanceOf(RESTActionTraitTestClass::class, $class); } private function createClass(\Monolog\Handler\HandlerInterface $handler): RESTActionTraitTestClass { $class = new RESTActionTraitTestClass(); $class->setLogger( new \Monolog\Logger('test', [$handler]) ); return $class; } public function testProcessMethodNotExists() { self::expectException(\Phrest\Http\Exception::class); self::expectExceptionMessage('Method not allowed'); self::expectExceptionCode(405); $testHandler = new \Monolog\Handler\TestHandler(); $class = $this->createClass($testHandler); try { $class->process( new \Zend\Diactoros\ServerRequest( [], [], null, 'thisMethodDoesNotExists', 'php://memory' ), new \Zend\Expressive\Delegate\NotFoundDelegate( new \Zend\Diactoros\Response() ) ); } catch (\Phrest\Http\Exception $e) { self::assertArraySubset([ [ 'message' => 'Phrest\API\RESTActionTrait::process called', 'context' => [ 'method' => 'thismethoddoesnotexists' ], 'level' => 100, 'level_name' => 'DEBUG', 'channel' => 'test', ] ], $testHandler->getRecords()); self::assertEquals(0, $e->error()->code()); self::assertEquals('Method not allowed', $e->error()->message()); $errors = $e->error()->errors(); self::assertCount(1, $errors); self::assertEquals(0, $errors[0]->code()); self::assertEquals('Method "thismethoddoesnotexists" not allowed', $errors[0]->message()); throw $e; } } public function testProcessOptions() { $testHandler = new \Monolog\Handler\TestHandler(); $class = $this->createClass($testHandler); $response = $class->process( new \Zend\Diactoros\ServerRequest( [], [], null, 'options', 'php://memory' ), new \Zend\Expressive\Delegate\NotFoundDelegate( new \Zend\Diactoros\Response() ) ); self::assertArraySubset([ [ 'message' => 'Phrest\API\RESTActionTrait::process called', 'context' => [ 'method' => 'options' ], 'level' => 100, 'level_name' => 'DEBUG', 'channel' => 'test', ] ], $testHandler->getRecords()); self::assertEquals(204, $response->getStatusCode()); self::assertEquals('', $response->getBody()->getContents()); self::assertEquals([ 'Allow' => [ 'GET, DELETE' ] ], $response->getHeaders()); } public function testOnRESTRequest() { $testHandler = new \Monolog\Handler\TestHandler(); $class = $this->createClass($testHandler); $response = $class->process( new \Zend\Diactoros\ServerRequest( [], [], null, 'GET', 'php://memory' ), new \Zend\Expressive\Delegate\NotFoundDelegate( new \Zend\Diactoros\Response() ) ); self::assertArraySubset([ [ 'message' => 'Phrest\API\RESTActionTrait::process called', 'context' => [ 'method' => 'get' ], 'level' => 100, 'level_name' => 'DEBUG', 'channel' => 'test', ] ], $testHandler->getRecords()); self::assertEquals(204, $response->getStatusCode()); self::assertEquals('', $response->getBody()->getContents()); } }
DonUrks/phrest
tests/Phrest/API/RESTActionTraitTest.php
PHP
mit
4,648
#include <stdio.h> #include<sys/time.h> #include <sys/types.h> #include <sys/wait.h> #include <sys/stat.h> #include <fcntl.h> #include <errno.h> #include <sys/ipc.h> #include <sys/sem.h> #include <time.h> #include <sched.h> #include "../l2scheduler/fair_share_sched.h" #include "../l2scheduler/las_scheduler.h" #include <unistd.h> #include <fcntl.h> #include <wait.h> #include <string.h> #include "semaphore_ops.h" #include "../virtmem/cuda_vmem.h" #include "../l2scheduler/pager.h" int semid; int gpu_binding; int P(int semID) { struct sembuf buff ; buff.sem_num = 0 ; buff.sem_op = -1 ; buff.sem_flg = 0 ; printf("CFSCHED In P operation\n"); if(semop(semID, &buff, 1) == -1) { perror("CFSCHED semop P operation error") ; return 0 ; } return -1 ; } int V(int semID) { struct sembuf buff ; buff.sem_num = 0 ; buff.sem_op = 1 ; buff.sem_flg = 0 ; if(semop(semID, &buff, 1) == -1) { perror("CFSCHED semop V operation error") ; return 0 ; } return -1 ; } void mysignalhandler1(int n, siginfo_t* info, void* k) { sigset_t set; int signalid; union sigval data = info->si_value; struct timeval tp; //set = (sigset_t *)data.sival_ptr; signalid = data.sival_int; sigemptyset(&set); sigaddset(&set, signalid); gettimeofday(&tp, NULL); fprintf(stderr, "CFSCHED Signal to sleep to process id: %d with signal id:%d time:%d sec %d usec\n", (int)getpid(), signalid, tp.tv_sec, tp.tv_usec); signalid = sigwaitinfo(&set, NULL); gettimeofday(&tp, NULL); fprintf(stderr, "CFSCHED Signal to wake up process id: %d with signal id:%d time:%d sec %d usec\n", (int)getpid(), signalid, tp.tv_sec, tp.tv_usec); } void sigschedulehandler(int signo) { /* TODO : Should we block SIGSCHED when process is executing * and unblock it when waiting for sigwait only ? */ sigset_t set; struct timeval tp; int signalid; siginfo_t si; pid_t sched_pid; FILE *fp = fopen(SCHED_PID_FILE_PATH, "r"); fscanf(fp,"%ld",&sched_pid); fclose(fp); union sigval data; data.sival_int = gpu_binding; sigemptyset(&set); sigaddset(&set, SIGSCHED); sigaddset(&set, SIGPAGE); gettimeofday(&tp, NULL); fprintf(stderr, "CFSCHED Signal to sleep to process id: %d with signal id:%d time:%d sec %d usec\n", (int)getpid(), signalid, tp.tv_sec, tp.tv_usec); /* Send wakeup signal to l2sched */ sigqueue(sched_pid, SIGRTMAX, data); /* SIGALRM received. Should sleep till next occurence of SIGSCHED */ signalid = sigwaitinfo(&set, &si); if(signalid == SIGPAGE) { gvirt_page_out(vmap_table); /* Allow the process to run momentarily. We expect SIGALRM from pager. Do not allow this handler to continue. It might happen that SIGALRM comes after the interval timer is set below. This will cause misbehavior */ return; } /* SIGSCHED received. Now we set up the timer and let the process execute till timer expires. * On timer expiry, this handler will be called again */ gettimeofday(&tp, NULL); fprintf(stderr, "CFSCHED Signal to wake up process id: %d with signal id:%d time:%d sec %d usec\n", (int)getpid(), signalid, tp.tv_sec, tp.tv_usec); data = si.si_value; tp = *((struct timeval *) data.sival_ptr); struct itimerval ti; ti.it_interval.tv_sec = 0; ti.it_interval.tv_usec = 0; ti.it_value = tp; setitimer(ITIMER_REAL, &ti, NULL); } void sigvtalarm_handler(int signo) { /* TODO : Should we block SIGSCHED when process is executing * and unblock it when waiting for sigwait only ? */ sigset_t set; struct timeval tp; int signalid; siginfo_t si; pid_t sched_pid; FILE *fp = fopen(SCHED_PID_FILE_PATH, "r"); fscanf(fp,"%ld",&sched_pid); fclose(fp); union sigval data; data.sival_int = gpu_binding; sigemptyset(&set); sigaddset(&set, SIGSCHED); sigaddset(&set, SIGPAGE); gettimeofday(&tp, NULL); fprintf(stderr, "CFSCHED Signal to sleep to process id: %d with signal id:%d time:%d sec %d usec\n", (int)getpid(), signalid, tp.tv_sec, tp.tv_usec); /* XXX : Do everything same as sigschedulehandler except that, do not notify the scheduler as you were woken up by pager and not the scheduler. Scheduler don't want to know that */ /* SIGVTALRM received. Should sleep till next occurence of SIGSCHED */ signalid = sigwaitinfo(&set, &si); if(signalid == SIGPAGE) { gvirt_page_out(vmap_table); /* Allow the process to run momentarily. We expect SIGALRM from pager. Do not allow this handler to continue. It might happen that SIGALRM comes after the interval timer is set below. This will cause misbehavior */ return; } /* SIGSCHED received. Now we set up the timer and let the process execute till timer expires. * On timer expiry, this handler will be called again */ gettimeofday(&tp, NULL); fprintf(stderr, "CFSCHED Signal to wake up process id: %d with signal id:%d time:%d sec %d usec\n", (int)getpid(), signalid, tp.tv_sec, tp.tv_usec); data = si.si_value; tp = *((struct timeval *) data.sival_ptr); struct itimerval ti; ti.it_interval.tv_sec = 0; ti.it_interval.tv_usec = 0; ti.it_value = tp; setitimer(ITIMER_REAL, &ti, NULL); } void sigpage_handler(int signo) { /* Stop current running timer */ struct itimerval it; it.it_interval.tv_sec = 0; it.it_interval.tv_usec = 0; it.it_value.tv_sec = 0; it.it_value.tv_usec = 0; setitimer(ITIMER_REAL, &it, NULL); /* 2. Notify Scheduler about the end of timer intervali, and not to schedule it anymore */ pid_t sched_pid; FILE *fp = fopen(SCHED_PID_FILE_PATH, "r"); fscanf(fp,"%ld",&sched_pid); fclose(fp); union sigval data; data.sival_int = gpu_binding; sigqueue(sched_pid, SIGPAGE, data); /* 3. Pgeout everything */ gvirt_page_out(vmap_table); /* 4. Will recv SIGVTALRM from pager to sleep the process */ } int fs_register_handler(int signum) { sigset_t set; sigemptyset(&set); sigaddset(&set, SIGSCHED); sigaddset(&set, SIGALRM); sigaddset(&set, SIGPAGE); sigprocmask(SIG_UNBLOCK, &set, NULL); struct sigaction act; act.sa_handler = &sigschedulehandler; act.sa_flags = SA_RESTART; fprintf(stderr, "CFSCHED Registering handler for process id: %d, thread id: %d on signum: %d\n", getpid(), (int)pthread_self(), signum); if(sigaction(SIGALRM, &act, NULL) < 0) { fprintf(stderr, "CFSCHED handler registration failed\n"); return -1; } act.sa_handler = &sigpage_handler; sigaction(SIGPAGE, &act, NULL); act.sa_handler = &sigvtalarm_handler; sigaction(SIGVTALRM, &act, NULL); return 0; } void fs_notify_scheduler(struct timeval *before, struct timeval *after, int gpuid) { if(gpuid == -1) return; int server_fifo; int semid; process_credit_data pcd; pcd.pid = getpid(); pcd.share_unit = 0; /* deprecated : define app_type instead */ pcd.action = NOTIFY_SCHED; pcd.app_type = 0; timersub(after,before,&pcd.execution_time); if((semid = semget(ftok(SEMKEYPATH, SEMKEYID), 1, 0666)) == -1){ perror("semget failed"); return; } char sched_listen_path[100]; FILE *fp = fopen(SCHED_DEF_FILE_PATH,"r"); int gpu; char tid[25]; //fflush(stdout); strcpy(sched_listen_path,LISTEN_PATH); while(!feof(fp)) { fscanf(fp,"%d\t%s\n",&gpu,tid); if(gpu == gpuid) { strcat(sched_listen_path,tid); P(semid); server_fifo = open(sched_listen_path, O_WRONLY); write(server_fifo, &pcd, sizeof(process_credit_data)); close(server_fifo); V(semid); break; } } fclose(fp); return; } int fs_add_queue(pid_t process_id, unsigned int gpuid, unsigned long app_type, int share) { int server_fifo, client_read_fifo, client_write_fifo, signum, err; int semid; char write_target[100], read_target[100], src[50]; char sched_listen_path[100]; strcpy(sched_listen_path,LISTEN_PATH); FILE *fp = fopen(SCHED_DEF_FILE_PATH,"r"); unsigned int gpu; char tid[25]; while(!feof(fp)) { fscanf(fp,"%d\t%s\n",&gpu,tid); if(gpu == gpuid) { strcat(sched_listen_path,tid); break; } } fclose(fp); process_credit_data pcd; pcd.pid = process_id; pcd.share_unit = share; pcd.action = ADD_Q; pcd.app_type = app_type; /* deprecated : now share unit is set via call to getcwd() in application */ pcd.gpuid = gpuid; fprintf(stderr, "CFSCHED Inside add_queue pid : %d\n",getpid()); strcpy(write_target, CLIENT_WRITE_PATH); strcpy(read_target, CLIENT_READ_PATH); sprintf(src, "%ld", pcd.pid); strcat(write_target,src); strcat(read_target,src); mkfifo(write_target,0666); mkfifo(read_target,0666); if((semid = semget(ftok(SEMKEYPATH, SEMKEYID), 1, 0666)) == -1){ perror("semget failed"); return -1; } //fflush(stdout); P(semid); /*****Enter CS*******/ fprintf(stderr, "CFSCHED Enter CS\n"); server_fifo = open(sched_listen_path, O_WRONLY); write(server_fifo, &pcd, sizeof(process_credit_data)); close(server_fifo); client_read_fifo = open(read_target, O_RDONLY); read(client_read_fifo, &signum, sizeof(int)); fprintf(stderr, "CFSCHED signum: %d\n", signum); err = fs_register_handler(signum); client_write_fifo = open(write_target, O_WRONLY); write(client_write_fifo, &err, sizeof(int)); fprintf(stderr, "CFSCHED Exit CS\n"); close(client_read_fifo); close(client_write_fifo); /****Exit CS*****/ V(semid); return signum; } int fs_rem_queue(pid_t process_id, int gpuid) { if(gpuid == -1) return 0; process_credit_data pcd; int semid, fifo_d_0; char write_target[100], read_target[100], src[50]; pcd.pid = getpid(); pcd.action = REM_Q; if((semid = semget(ftok(SEMKEYPATH, SEMKEYID), 1, 0666)) == -1){ perror("semget failed"); return -1; } char sched_listen_path[100]; FILE *fp = fopen(SCHED_DEF_FILE_PATH,"r"); int gpu; char tid[25]; //fflush(stdout); strcpy(sched_listen_path,LISTEN_PATH); while(!feof(fp)) { fscanf(fp,"%d\t%s\n",&gpu,tid); if(gpu == gpuid) { strcat(sched_listen_path,tid); P(semid); fifo_d_0 = open(sched_listen_path, O_WRONLY); write(fifo_d_0, &pcd, sizeof(process_credit_data)); close(fifo_d_0); V(semid); break; } } fclose(fp); return 0; } int fs_get_RTsignal(pid_t process_id) { process_credit_data pcd; int semid, fifo_d_0, signum, client_read_fifo; char write_target[100], read_target[100], src[50]; pcd.pid = process_id; pcd.action = GET_SIGNUM; if((semid = semget(ftok(SEMKEYPATH, SEMKEYID), 1, 0666)) == -1){ perror("semget failed"); return -1; } char sched_listen_path[100]; FILE *fp = fopen(SCHED_DEF_FILE_PATH,"r"); int gpu; char tid[25]; strcpy(read_target, CLIENT_SIGGET_PATH); sprintf(src, "%ld", pcd.pid); strcat(read_target,src); mkfifo(read_target,0666); //fflush(stdout); signum = -1; while(!feof(fp)) { strcpy(sched_listen_path,LISTEN_PATH); fscanf(fp,"%d\t%s\n",&gpu,tid); fprintf(stderr,"CFSCHED %d\t%s\n",gpu,tid); strcat(sched_listen_path,tid); fprintf(stderr,"CFSCHED writing to %s, reading from %s\n",sched_listen_path,read_target); P(semid); fifo_d_0 = open(sched_listen_path, O_WRONLY); write(fifo_d_0, &pcd, sizeof(process_credit_data)); close(fifo_d_0); client_read_fifo = open(read_target, O_RDONLY); read(client_read_fifo, &signum, sizeof(int)); close(client_read_fifo); V(semid); if(signum != -1) break; } fclose(fp); return signum; } void signal_block_all() { int i; sigset_t set; union sigval data; sigemptyset(&set); for(i = SIGRTMIN; i <= SIGRTMAX; i++) sigaddset(&set, i); sigprocmask(SIG_BLOCK, &set, NULL); } //////////////////////////////////////////////////////////////////////////////// int las_add_queue(pid_t process_id, unsigned int gpuid, int app_type) { int server_fifo, client_read_fifo, client_write_fifo, signum, err; int semid; char write_target[100], read_target[100], src[50]; char sched_listen_path[100]; strcpy(sched_listen_path,LISTEN_PATH); FILE *fp = fopen(SCHED_DEF_FILE_PATH,"r"); int gpu; char tid[25]; while(!feof(fp)) { fscanf(fp,"%d\t%s\n",&gpu,tid); if(gpu == gpuid) { strcat(sched_listen_path,tid); break; } } fclose(fp); process_credit_data pcd; pcd.pid = process_id; pcd.action = ADD_Q; pcd.app_type = app_type; pcd.gpuid = gpuid; fprintf(stderr, "LASSCHED Inside add_queue pid : %d\n",getpid()); strcpy(read_target, CLIENT_READ_PATH); sprintf(src, "%ld", pcd.pid); strcat(read_target,src); mkfifo(read_target,0666); if((semid = semget(ftok(SEMKEYPATH, SEMKEYID), 1, 0666)) == -1){ perror("semget failed"); return -1; } //fflush(stdout); client_read_fifo = open(read_target, O_RDWR); server_fifo = open(sched_listen_path, O_WRONLY); fprintf(stderr, "LASSCHED Enter CS\n"); P(semid); /*****Enter CS*******/ write(server_fifo, &pcd, sizeof(process_credit_data)); V(semid); close(server_fifo); read(client_read_fifo, &signum, sizeof(int)); fprintf(stderr, "LASSCHED index: %d\n", signum); close(client_read_fifo); /****Exit CS*****/ return signum; } int las_rem_queue(pid_t process_id, int gpuid) { if(gpuid == -1) return 0; process_credit_data pcd; int semid, fifo_d_0; char write_target[100], read_target[100], src[50]; pcd.pid = getpid(); pcd.action = REM_Q; if((semid = semget(ftok(SEMKEYPATH, SEMKEYID), 1, 0666)) == -1){ perror("semget failed"); return -1; } char sched_listen_path[100]; FILE *fp = fopen(SCHED_DEF_FILE_PATH,"r"); int gpu; char tid[25]; //fflush(stdout); strcpy(sched_listen_path,LISTEN_PATH); while(!feof(fp)) { fscanf(fp,"%d\t%s\n",&gpu,tid); if(gpu == gpuid) { strcat(sched_listen_path,tid); fifo_d_0 = open(sched_listen_path, O_WRONLY); P(semid); write(fifo_d_0, &pcd, sizeof(process_credit_data)); V(semid); close(fifo_d_0); break; } } fclose(fp); return 0; } void las_notify_scheduler(struct timeval *before, struct timeval *after, int gpuid) { if(gpuid == -1) return; int server_fifo; int semid; process_credit_data pcd; pcd.pid = getpid(); pcd.share_unit = 0; /* deprecated : define app_type instead */ pcd.action = NOTIFY_SCHED; pcd.app_type = 0; timersub(after,before,&pcd.execution_time); if((semid = semget(ftok(SEMKEYPATH, SEMKEYID), 1, 0666)) == -1){ perror("semget failed"); return; } char sched_listen_path[100]; FILE *fp = fopen(SCHED_DEF_FILE_PATH,"r"); int gpu; char tid[25]; //fflush(stdout); strcpy(sched_listen_path,LISTEN_PATH); while(!feof(fp)) { fscanf(fp,"%d\t%s\n",&gpu,tid); if(gpu == gpuid) { strcat(sched_listen_path,tid); server_fifo = open(sched_listen_path, O_WRONLY); P(semid); write(server_fifo, &pcd, sizeof(process_credit_data)); V(semid); close(server_fifo); break; } } fclose(fp); return; } int las_get_priority(int index, int gpuid) { if(gpuid == -1) return -1; process_credit_data pcd; int semid, fifo_d_0, read_fifo; char write_target[100], read_target[100], src[50]; pcd.pid = getpid(); pcd.action = GET_PRIORITY; pcd.gpuid = index; // gpuid field used to send index if((semid = semget(ftok(SEMKEYPATH, SEMKEYID), 1, 0666)) == -1){ perror("semget failed"); return -1; } char sched_listen_path[100]; FILE *fp = fopen(SCHED_DEF_FILE_PATH,"r"); int gpu; char tid[25]; strcpy(read_target, CLIENT_READ_PATH); sprintf(src, "%ld", pcd.pid); strcat(read_target,src); mkfifo(read_target,0666); int priority; //fflush(stdout); strcpy(sched_listen_path,LISTEN_PATH); while(!feof(fp)) { fscanf(fp,"%d\t%s\n",&gpu,tid); if(gpu == gpuid) { strcat(sched_listen_path,tid); read_fifo = open(read_target, O_RDWR); P(semid); fifo_d_0 = open(sched_listen_path, O_WRONLY); write(fifo_d_0, &pcd, sizeof(process_credit_data)); close(fifo_d_0); read(read_fifo, &priority, sizeof(int)); close(read_fifo); V(semid); break; } } fclose(fp); return priority; } int las_get_l2_data(int gpuid, int index, int * application, struct timeval * total_ex_time) { if(gpuid == -1) return 0; process_credit_data pcd; int semid, fifo_d_0, read_fifo; char write_target[100], read_target[100], src[50]; pcd.pid = getpid(); pcd.action = GET_L2_DATA; pcd.gpuid = index; // gpuid field used to send index if((semid = semget(ftok(SEMKEYPATH, SEMKEYID), 1, 0666)) == -1){ perror("semget failed"); return -1; } char sched_listen_path[100]; FILE *fp = fopen(SCHED_DEF_FILE_PATH,"r"); int gpu; char tid[25]; strcpy(read_target, CLIENT_READ_PATH); sprintf(src, "%ld", pcd.pid); strcat(read_target,src); mkfifo(read_target,0666); int priority; //fflush(stdout); strcpy(sched_listen_path,LISTEN_PATH); while(!feof(fp)) { fscanf(fp,"%d\t%s\n",&gpu,tid); if(gpu == gpuid) { strcat(sched_listen_path,tid); printf("GETL2DATA writing pcd to %s, pid %ld\n",sched_listen_path,getpid()); read_fifo = open(read_target, O_RDWR); P(semid); fifo_d_0 = open(sched_listen_path, O_WRONLY); write(fifo_d_0, &pcd, sizeof(process_credit_data)); close(fifo_d_0); V(semid); printf("GETL2DATA written pcd to %s, pid %ld\n",sched_listen_path,getpid()); read(read_fifo, &pcd, sizeof(process_credit_data)); close(read_fifo); printf("GETL2DATA reading pcd from %s, pid %ld\n",read_target,getpid()); *application = pcd.app_type; *total_ex_time = pcd.execution_time; break; } } fclose(fp); if(pcd.action == 1) return 1; else return 0; }
rvbelapure/gpu-virtmem
backend/libl2scheduler.c
C
mit
17,516
<html lang="en"> <head> <title>Convenience Vars - Debugging with GDB</title> <meta http-equiv="Content-Type" content="text/html"> <meta name="description" content="Debugging with GDB"> <meta name="generator" content="makeinfo 4.8"> <link title="Top" rel="start" href="index.html#Top"> <link rel="up" href="Data.html#Data" title="Data"> <link rel="prev" href="Value-History.html#Value-History" title="Value History"> <link rel="next" href="Convenience-Funs.html#Convenience-Funs" title="Convenience Funs"> <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> <!-- Copyright (C) 1988-2017 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being ``Free Software'' and ``Free Software Needs Free Documentation'', with the Front-Cover Texts being ``A GNU Manual,'' and with the Back-Cover Texts as in (a) below. (a) The FSF's Back-Cover Text is: ``You are free to copy and modify this GNU Manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom.'' --> <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"><!-- pre.display { font-family:inherit } pre.format { font-family:inherit } pre.smalldisplay { font-family:inherit; font-size:smaller } pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } span.sc { font-variant:small-caps } span.roman { font-family:serif; font-weight:normal; } span.sansserif { font-family:sans-serif; font-weight:normal; } --></style> </head> <body> <div class="node"> <p> <a name="Convenience-Vars"></a> Next:&nbsp;<a rel="next" accesskey="n" href="Convenience-Funs.html#Convenience-Funs">Convenience Funs</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="Value-History.html#Value-History">Value History</a>, Up:&nbsp;<a rel="up" accesskey="u" href="Data.html#Data">Data</a> <hr> </div> <h3 class="section">10.11 Convenience Variables</h3> <p><a name="index-convenience-variables-690"></a><a name="index-user_002ddefined-variables-691"></a><span class="sc">gdb</span> provides <dfn>convenience variables</dfn> that you can use within <span class="sc">gdb</span> to hold on to a value and refer to it later. These variables exist entirely within <span class="sc">gdb</span>; they are not part of your program, and setting a convenience variable has no direct effect on further execution of your program. That is why you can use them freely. <p>Convenience variables are prefixed with `<samp><span class="samp">$</span></samp>'. Any name preceded by `<samp><span class="samp">$</span></samp>' can be used for a convenience variable, unless it is one of the predefined machine-specific register names (see <a href="Registers.html#Registers">Registers</a>). (Value history references, in contrast, are <em>numbers</em> preceded by `<samp><span class="samp">$</span></samp>'. See <a href="Value-History.html#Value-History">Value History</a>.) <p>You can save a value in a convenience variable with an assignment expression, just as you would set a variable in your program. For example: <pre class="smallexample"> set $foo = *object_ptr </pre> <p class="noindent">would save in <code>$foo</code> the value contained in the object pointed to by <code>object_ptr</code>. <p>Using a convenience variable for the first time creates it, but its value is <code>void</code> until you assign a new value. You can alter the value with another assignment at any time. <p>Convenience variables have no fixed types. You can assign a convenience variable any type of value, including structures and arrays, even if that variable already has a value of a different type. The convenience variable, when used as an expression, has the type of its current value. <a name="index-show-convenience-692"></a> <a name="index-show-all-user-variables-and-functions-693"></a> <dl><dt><code>show convenience</code><dd>Print a list of convenience variables used so far, and their values, as well as a list of the convenience functions. Abbreviated <code>show conv</code>. <p><a name="index-init_002dif_002dundefined-694"></a><a name="index-convenience-variables_002c-initializing-695"></a><br><dt><code>init-if-undefined $</code><var>variable</var><code> = </code><var>expression</var><dd>Set a convenience variable if it has not already been set. This is useful for user-defined commands that keep some state. It is similar, in concept, to using local static variables with initializers in C (except that convenience variables are global). It can also be used to allow users to override default values used in a command script. <p>If the variable is already defined then the expression is not evaluated so any side-effects do not occur. </dl> <p>One of the ways to use a convenience variable is as a counter to be incremented or a pointer to be advanced. For example, to print a field from successive elements of an array of structures: <pre class="smallexample"> set $i = 0 print bar[$i++]-&gt;contents </pre> <p class="noindent">Repeat that command by typing &lt;RET&gt;. <p>Some convenience variables are created automatically by <span class="sc">gdb</span> and given values likely to be useful. <a name="index-g_t_0024_005f_0040r_007b_002c-convenience-variable_007d-696"></a> <dl><dt><code>$_</code><dd>The variable <code>$_</code> is automatically set by the <code>x</code> command to the last address examined (see <a href="Memory.html#Memory">Examining Memory</a>). Other commands which provide a default address for <code>x</code> to examine also set <code>$_</code> to that address; these commands include <code>info line</code> and <code>info breakpoint</code>. The type of <code>$_</code> is <code>void *</code> except when set by the <code>x</code> command, in which case it is a pointer to the type of <code>$__</code>. <p><a name="index-g_t_0024_005f_005f_0040r_007b_002c-convenience-variable_007d-697"></a><br><dt><code>$__</code><dd>The variable <code>$__</code> is automatically set by the <code>x</code> command to the value found in the last address examined. Its type is chosen to match the format in which the data was printed. <br><dt><code>$_exitcode</code><dd><a name="index-g_t_0024_005fexitcode_0040r_007b_002c-convenience-variable_007d-698"></a>When the program being debugged terminates normally, <span class="sc">gdb</span> automatically sets this variable to the exit code of the program, and resets <code>$_exitsignal</code> to <code>void</code>. <br><dt><code>$_exitsignal</code><dd><a name="index-g_t_0024_005fexitsignal_0040r_007b_002c-convenience-variable_007d-699"></a>When the program being debugged dies due to an uncaught signal, <span class="sc">gdb</span> automatically sets this variable to that signal's number, and resets <code>$_exitcode</code> to <code>void</code>. <p>To distinguish between whether the program being debugged has exited (i.e., <code>$_exitcode</code> is not <code>void</code>) or signalled (i.e., <code>$_exitsignal</code> is not <code>void</code>), the convenience function <code>$_isvoid</code> can be used (see <a href="Convenience-Funs.html#Convenience-Funs">Convenience Functions</a>). For example, considering the following source code: <pre class="smallexample"> #include &lt;signal.h&gt; int main (int argc, char *argv[]) { raise (SIGALRM); return 0; } </pre> <p>A valid way of telling whether the program being debugged has exited or signalled would be: <pre class="smallexample"> (gdb) define has_exited_or_signalled Type commands for definition of ``has_exited_or_signalled''. End with a line saying just ``end''. &gt;if $_isvoid ($_exitsignal) &gt;echo The program has exited\n &gt;else &gt;echo The program has signalled\n &gt;end &gt;end (gdb) run Starting program: Program terminated with signal SIGALRM, Alarm clock. The program no longer exists. (gdb) has_exited_or_signalled The program has signalled </pre> <p>As can be seen, <span class="sc">gdb</span> correctly informs that the program being debugged has signalled, since it calls <code>raise</code> and raises a <code>SIGALRM</code> signal. If the program being debugged had not called <code>raise</code>, then <span class="sc">gdb</span> would report a normal exit: <pre class="smallexample"> (gdb) has_exited_or_signalled The program has exited </pre> <br><dt><code>$_exception</code><dd>The variable <code>$_exception</code> is set to the exception object being thrown at an exception-related catchpoint. See <a href="Set-Catchpoints.html#Set-Catchpoints">Set Catchpoints</a>. <br><dt><code>$_probe_argc</code><dt><code>$_probe_arg0...$_probe_arg11</code><dd>Arguments to a static probe. See <a href="Static-Probe-Points.html#Static-Probe-Points">Static Probe Points</a>. <br><dt><code>$_sdata</code><dd><a name="index-g_t_0024_005fsdata_0040r_007b_002c-inspect_002c-convenience-variable_007d-700"></a>The variable <code>$_sdata</code> contains extra collected static tracepoint data. See <a href="Tracepoint-Actions.html#Tracepoint-Actions">Tracepoint Action Lists</a>. Note that <code>$_sdata</code> could be empty, if not inspecting a trace buffer, or if extra static tracepoint data has not been collected. <br><dt><code>$_siginfo</code><dd><a name="index-g_t_0024_005fsiginfo_0040r_007b_002c-convenience-variable_007d-701"></a>The variable <code>$_siginfo</code> contains extra signal information (see <a href="extra-signal-information.html#extra-signal-information">extra signal information</a>). Note that <code>$_siginfo</code> could be empty, if the application has not yet received any signals. For example, it will be empty before you execute the <code>run</code> command. <br><dt><code>$_tlb</code><dd><a name="index-g_t_0024_005ftlb_0040r_007b_002c-convenience-variable_007d-702"></a>The variable <code>$_tlb</code> is automatically set when debugging applications running on MS-Windows in native mode or connected to gdbserver that supports the <code>qGetTIBAddr</code> request. See <a href="General-Query-Packets.html#General-Query-Packets">General Query Packets</a>. This variable contains the address of the thread information block. <br><dt><code>$_inferior</code><dd>The number of the current inferior. See <a href="Inferiors-and-Programs.html#Inferiors-and-Programs">Debugging Multiple Inferiors and Programs</a>. <br><dt><code>$_thread</code><dd>The thread number of the current thread. See <a href="thread-numbers.html#thread-numbers">thread numbers</a>. <br><dt><code>$_gthread</code><dd>The global number of the current thread. See <a href="global-thread-numbers.html#global-thread-numbers">global thread numbers</a>. </dl> </body></html>
ChangsoonKim/STM32F7DiscTutor
toolchain/osx/gcc-arm-none-eabi-6-2017-q1-update/share/doc/gcc-arm-none-eabi/html/gdb/Convenience-Vars.html
HTML
mit
11,335
using Naxis.Core.Components; namespace Naxis.Core.Security { public class AuthedUser { /// <summary> /// 授权服务 /// </summary> private static readonly IAuthenticationService Service = ObjectContainer.Resolve<IAuthenticationService>(); /// <summary> /// 获取当前用户信息 /// </summary> public static AuthUser Current { get { return Service.GetAuthenticatedUser(); } } } }
swpudp/Naxis
Naxis.Common/Security/AuthedUser.cs
C#
mit
494
<?php $pageTitle = "News Feed"; require('includes/header.php'); $my_friends=$mysqli->query("SELECT friendArray FROM profile WHERE userID=$userID"); $myfriends=mysqli_fetch_row($my_friends); $myfriends=implode("",$myfriends); $my_friends_array=explode(",",$myfriends); //echo $my_friends_array; ?> <link href="css/4Inst.css" rel="stylesheet"> <div class="container"> <h3>News Feed</h3> <div class="SetCenterImage"> <?php $query_image = $mysqli->query("SELECT * FROM PhotoUpload WHERE circleShared='' ORDER BY datestamp DESC"); while($query_image_row=mysqli_fetch_array($query_image)){ $photoUserID = $query_image_row['userID']; $photoTime=$query_image_row['datestamp']; if(in_array($photoUserID,$my_friends_array)){ $photoURL = $query_image_row['photo']; $photoID = $query_image_row['photoID']; //get photo uploader name $getuserNames = $mysqli->query("SELECT firstname, lastname FROM Profile WHERE userID=$photoUserID"); $getuserNamesrow = mysqli_fetch_array($getuserNames); $photoUserFname = $getuserNamesrow['firstname']; $photoUserLname = $getuserNamesrow['lastname']; echo '<div class="col-md-6 col-md-offset-3"> <div class="panel panel-default"> <div class="panel-body"> <a href="photoInfo.php?photoid='.$photoID.'"class="thumbnail"> <img src="'.$photoURL.'"> </a> </div> <div class="panel-footer"> <h4>'.$photoUserFname.' '.$photoUserLname.' <small>on '.$photoTime.'</small></h4> </div> </div> </div>'; } else { } } ?> </div> </div> <?php require('includes/footer.php');?>
mgander/4inst
home.php
PHP
mit
1,563
"use strict"; var inspirationArchitectFactory = require('../inspiration-architect.min'); var should = require('should'); var _get = require('lodash/get'); var _set = require('lodash/set'); var globalTests = require('./global-tests'); var factoryTests = require('./factory-tests'); var config_files = require('../test/fixtures/sample-app/config/*.js', {mode: 'hash', options: {dot: true}}); var empty_config_files = require('../test/fixtures/empty/*.js', {mode: 'hash'}); var provider_files = require('../test/fixtures/sample-app/providers/*.js', {mode: 'hash'}); var empty_provider_files = require('../test/fixtures/empty/*.js', {mode: 'hash'}); factoryTests(inspirationArchitectFactory); describe('browserify tests', function() { describe('different config files', function() { var factory_config = { config_files: config_files }; var Inspiration = inspirationArchitectFactory(factory_config); it('should run the basic tests', function() { globalTests(Inspiration); }); it('should honor the server config files', function(done) { var inspiration = new Inspiration(); inspiration.init(function(err) { if (err) { throw err; } should(inspiration.app.config('a_sample')).equal('one'); should(inspiration.app.config('b_sample')).equal('two'); should(inspiration.app.config('e_sample.f_sample.g_sample')).equal(5); should(inspiration.app.config('external.h_sample')).equal('hello'); done(); }); }); it('should be able to overwrite server config files', function(done) { var config = { a_sample: 'overwritten', b_sample: 'also overwritten', external: { h_sample: 'this is also overwritten' } }; var inspiration = new Inspiration({ config: config }); inspiration.init(function(err) { if (err) { throw err; } should(inspiration.app.config('a_sample')).equal(config.a_sample); should(inspiration.app.config('b_sample')).equal(config.b_sample); should(inspiration.app.config('external.h_sample')).equal(config.external.h_sample); should(inspiration.app.config('external.i_sample')).not.equal(undefined); done(); }); }); }); describe('no config files', function() { var factory_config = { config_files: empty_config_files }; var Inspiration = inspirationArchitectFactory(factory_config); it('should run the basic tests', function() { globalTests(Inspiration); }); it('should be able to overwrite empty server config files', function(done) { var config = { a_sample: 'overwritten', b_sample: 'also overwritten', external: { h_sample: 'this is also overwritten' } }; var inspiration = new Inspiration({ config: config }); inspiration.init(function(err) { if (err) { throw err; } should(inspiration.app.config('a_sample')).equal(config.a_sample); should(inspiration.app.config('b_sample')).equal(config.b_sample); should(inspiration.app.config('external.h_sample')).equal(config.external.h_sample); done(); }); }); }); describe('reference server providers', function() { var factory_config = { provider_files: provider_files }; var Inspiration = inspirationArchitectFactory(factory_config); it('should run the server providers based on the config', function(done) { var inspiration = new Inspiration({ config: { providers: [ 'addSomethingAsync', 'addSomething', function(app, done) { app.doSomethingElse = function() { return 3; }; done(); } ] } }); inspiration.init(function(err) { if (err) { throw err; } inspiration.app.doSomethingAsync().should.equal(1); inspiration.app.doSomething().should.equal(2); inspiration.app.doSomethingElse().should.equal(3); done(); }); }); }); describe('no provider files', function() { var factory_config = { provider_files: empty_provider_files }; var Inspiration = inspirationArchitectFactory(factory_config); it('should run the basic tests', function() { globalTests(Inspiration); }); it('should still run initial providers', function(done) { var inspiration = new Inspiration({ providers: [ function(app, done) { app.something_property = 1; done(); }, function(app, done) { app.something_other_property = 2; done(); } ], config: { providers: [ function(app, done) { app.something_third_property = 3; done(); } ] } }); inspiration.init(function(err) { if (err) { throw err; } inspiration.app.something_property.should.equal(1); inspiration.app.something_other_property.should.equal(2); inspiration.app.something_third_property.should.equal(3); done(); }); }); }); describe('different factory config values combined', function() { var config_env_filename = 'local'; var config_app_filename = 'application'; var config_providers_path = 'these.are.my.providers'; var app_config_path = 'locals.config'; var factory_config = { config_files: {}, config_env_filename: config_env_filename, config_app_filename: config_app_filename, config_providers_path: config_providers_path, app_config_path: app_config_path, provider_files: provider_files }; factory_config.config_files[config_env_filename] = { greeting: 'aloha' }; factory_config.config_files[config_app_filename] = { greeting: 'hello', parting: 'goodbye' }; _set(factory_config.config_files[config_app_filename], config_providers_path, [ 'addSomething' ]); var Inspiration = inspirationArchitectFactory(factory_config); it('should honor the factory config', function(done) { var inspiration = new Inspiration(); inspiration.test = true; inspiration.init(function(err) { if (err) { throw err; } var config = _get(inspiration.app, app_config_path); should(config('greeting')).equal('aloha'); should(config('parting')).equal('goodbye'); inspiration.app.doSomething().should.equal(2); done(); }); }); }); });
musejs/inspiration-architect
test-src/browserify.js
JavaScript
mit
8,096
using System; using System.IO; using System.Reflection.Metadata; using System.Reflection.PortableExecutable; using System.Security.Cryptography; namespace Radical.Windows.Bootstrap { //courtesy of NServiceBus https://github.com/Particular/NServiceBus/blob/4954af83fad81cc80769c8ed161ee4a37812d443/src/NServiceBus.Core/Hosting/Helpers/AssemblyValidator.cs class AssemblyValidator { public static void ValidateAssemblyFile(string assemblyPath, out bool shouldLoad, out string reason) { using (var stream = File.OpenRead(assemblyPath)) using (var file = new PEReader(stream)) { var hasMetadata = false; try { hasMetadata = file.HasMetadata; } catch (BadImageFormatException) { } if (!hasMetadata) { shouldLoad = false; reason = "File is not a .NET assembly."; return; } var reader = file.GetMetadataReader(); var assemblyDefinition = reader.GetAssemblyDefinition(); if (!assemblyDefinition.PublicKey.IsNil) { var publicKey = reader.GetBlobBytes(assemblyDefinition.PublicKey); var publicKeyToken = GetPublicKeyToken(publicKey); if (IsRuntimeAssembly(publicKeyToken)) { shouldLoad = false; reason = "File is a .NET runtime assembly."; return; } } shouldLoad = true; reason = "File is a .NET assembly."; } } static byte[] GetPublicKeyToken(byte[] publicKey) { using (var sha1 = SHA1.Create()) { var hash = sha1.ComputeHash(publicKey); var publicKeyToken = new byte[8]; for (var i = 0; i < 8; i++) { publicKeyToken[i] = hash[hash.Length - (i + 1)]; } return publicKeyToken; } } public static bool IsRuntimeAssembly(byte[] publicKeyToken) { var tokenString = BitConverter.ToString(publicKeyToken).Replace("-", string.Empty).ToLowerInvariant(); //Compare token to known Microsoft tokens switch (tokenString) { case "b77a5c561934e089": case "7cec85d7bea7798e": case "b03f5f7f11d50a3a": case "31bf3856ad364e35": case "cc7b13ffcd2ddd51": case "adb9793829ddae60": return true; default: return false; } } } }
RadicalFx/Radical.Windows
src/Radical.Windows/Bootstrap/AssemblyValidator.cs
C#
mit
2,902
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <style type="text/css"> span.lineno { color: white; background: #aaaaaa; border-right: solid white 12px } span.nottickedoff { background: yellow} span.istickedoff { background: white } span.tickonlyfalse { margin: -1px; border: 1px solid #f20913; background: #f20913 } span.tickonlytrue { margin: -1px; border: 1px solid #60de51; background: #60de51 } span.funcount { font-size: small; color: orange; z-index: 2; position: absolute; right: 20 } span.decl { font-weight: bold } span.spaces { background: white } </style> </head> <body><pre> <span class="decl"><span class="nottickedoff">never executed</span> <span class="tickonlytrue">always true</span> <span class="tickonlyfalse">always false</span></span> </pre> <pre> <span class="lineno"> 1 </span>module Tarefa3_2017li1g186 where <span class="lineno"> 2 </span> <span class="lineno"> 3 </span>import LI11718 <span class="lineno"> 4 </span> <span class="lineno"> 5 </span>testesT3 :: [(Tabuleiro,Tempo,Carro)] <span class="lineno"> 6 </span><span class="decl"><span class="istickedoff">testesT3 = []</span></span> <span class="lineno"> 7 </span> <span class="lineno"> 8 </span>movimenta :: Tabuleiro -&gt; Tempo -&gt; Carro -&gt; Maybe Carro <span class="lineno"> 9 </span><span class="decl"><span class="nottickedoff">movimenta m t c = undefined</span></span> </pre> </body> </html>
hpacheco/HAAP
examples/plab/site/grupos/186/hpcT3/RunT3/Tarefa3_2017li1g186.hs.html
HTML
mit
1,453
var amqp=require("amqplib"); amqp.connect('amqp://localhost').then(function(connection){ return connection.createChannel().then(function(ch){ var ex="logs"; ch.assertExchange(ex,'fanout',{durable:true}); var ok=ch.assertQueue('',{exclusive:true}) .then(function(q){ console.log("[x]Waiting for message in '%s' ",q.queue); return ch.bindQueue(q.queue,ex,''); }).then(function(q){ return ch.consume(q.queue,function(msg){ console.log("[x]Receiving message:'%s'",msg.content.toString()); },{noAck:true}); }); }) }).then(null,console.warn);
zhangmingkai4315/RabbitMQ-Nodejs
pub_sub/receive_logs.js
JavaScript
mit
569
{% include 'header.html' %} <div class="content" id="thankspage"> <div class="markdown"> Sorry, something seems to have gone wrong! </div> <script> window.pagejs = function() { // $(document.links).filter(function() { // return this.hostname != window.location.hostname; // }).attr('target', '_blank'); }; </script> </div> {% include 'footer.html' %}
berrigan/askgodcomau
views/error.html
HTML
mit
434
#include "guiutil.h" #include "bitcoinaddressvalidator.h" #include "walletmodel.h" #include "bitcoinunits.h" #include "util.h" #include "init.h" #include <QString> #include <QDateTime> #include <QDoubleValidator> #include <QFont> #include <QLineEdit> #include <QUrl> #include <QTextDocument> // For Qt::escape #include <QAbstractItemView> #include <QApplication> #include <QClipboard> #include <QFileDialog> #include <QDesktopServices> #include <QThread> #include <boost/filesystem.hpp> #include <boost/filesystem/fstream.hpp> #ifdef WIN32 #ifdef _WIN32_WINNT #undef _WIN32_WINNT #endif #define _WIN32_WINNT 0x0501 #ifdef _WIN32_IE #undef _WIN32_IE #endif #define _WIN32_IE 0x0501 #define WIN32_LEAN_AND_MEAN 1 #ifndef NOMINMAX #define NOMINMAX #endif #include "shlwapi.h" #include "shlobj.h" #include "shellapi.h" #endif namespace GUIUtil { QString dateTimeStr(const QDateTime &date) { return date.date().toString(Qt::SystemLocaleShortDate) + QString(" ") + date.toString("hh:mm"); } QString dateTimeStr(qint64 nTime) { return dateTimeStr(QDateTime::fromTime_t((qint32)nTime)); } QFont bitcoinAddressFont() { QFont font("Monospace"); font.setStyleHint(QFont::TypeWriter); return font; } void setupAddressWidget(QLineEdit *widget, QWidget *parent) { widget->setMaxLength(BitcoinAddressValidator::MaxAddressLength); widget->setValidator(new BitcoinAddressValidator(parent)); widget->setFont(bitcoinAddressFont()); } void setupAmountWidget(QLineEdit *widget, QWidget *parent) { QDoubleValidator *amountValidator = new QDoubleValidator(parent); amountValidator->setDecimals(8); amountValidator->setBottom(0.0); widget->setValidator(amountValidator); widget->setAlignment(Qt::AlignRight|Qt::AlignVCenter); } bool parseBitcoinURI(const QUrl &uri, SendCoinsRecipient *out) { // NovaCoin: check prefix if(uri.scheme() != QString("testfaucetcoin")) return false; SendCoinsRecipient rv; rv.address = uri.path(); rv.amount = 0; QList<QPair<QString, QString> > items = uri.queryItems(); for (QList<QPair<QString, QString> >::iterator i = items.begin(); i != items.end(); i++) { bool fShouldReturnFalse = false; if (i->first.startsWith("req-")) { i->first.remove(0, 4); fShouldReturnFalse = true; } if (i->first == "label") { rv.label = i->second; fShouldReturnFalse = false; } else if (i->first == "amount") { if(!i->second.isEmpty()) { if(!BitcoinUnits::parse(BitcoinUnits::BTC, i->second, &rv.amount)) { return false; } } fShouldReturnFalse = false; } if (fShouldReturnFalse) return false; } if(out) { *out = rv; } return true; } bool parseBitcoinURI(QString uri, SendCoinsRecipient *out) { // Convert testfaucetcoin:// to testfaucetcoin: // // Cannot handle this later, because bitcoin:// will cause Qt to see the part after // as host, // which will lower-case it (and thus invalidate the address). if(uri.startsWith("testfaucetcoin://")) { uri.replace(0, 12, "testfaucetcoin:"); } QUrl uriInstance(uri); return parseBitcoinURI(uriInstance, out); } QString HtmlEscape(const QString& str, bool fMultiLine) { QString escaped = Qt::escape(str); if(fMultiLine) { escaped = escaped.replace("\n", "<br>\n"); } return escaped; } QString HtmlEscape(const std::string& str, bool fMultiLine) { return HtmlEscape(QString::fromStdString(str), fMultiLine); } void copyEntryData(QAbstractItemView *view, int column, int role) { if(!view || !view->selectionModel()) return; QModelIndexList selection = view->selectionModel()->selectedRows(column); if(!selection.isEmpty()) { // Copy first item QApplication::clipboard()->setText(selection.at(0).data(role).toString()); } } QString getSaveFileName(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedSuffixOut) { QString selectedFilter; QString myDir; if(dir.isEmpty()) // Default to user documents location { myDir = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation); } else { myDir = dir; } QString result = QFileDialog::getSaveFileName(parent, caption, myDir, filter, &selectedFilter); /* Extract first suffix from filter pattern "Description (*.foo)" or "Description (*.foo *.bar ...) */ QRegExp filter_re(".* \\(\\*\\.(.*)[ \\)]"); QString selectedSuffix; if(filter_re.exactMatch(selectedFilter)) { selectedSuffix = filter_re.cap(1); } /* Add suffix if needed */ QFileInfo info(result); if(!result.isEmpty()) { if(info.suffix().isEmpty() && !selectedSuffix.isEmpty()) { /* No suffix specified, add selected suffix */ if(!result.endsWith(".")) result.append("."); result.append(selectedSuffix); } } /* Return selected suffix if asked to */ if(selectedSuffixOut) { *selectedSuffixOut = selectedSuffix; } return result; } Qt::ConnectionType blockingGUIThreadConnection() { if(QThread::currentThread() != QCoreApplication::instance()->thread()) { return Qt::BlockingQueuedConnection; } else { return Qt::DirectConnection; } } bool checkPoint(const QPoint &p, const QWidget *w) { QWidget *atW = qApp->widgetAt(w->mapToGlobal(p)); if (!atW) return false; return atW->topLevelWidget() == w; } bool isObscured(QWidget *w) { return !(checkPoint(QPoint(0, 0), w) && checkPoint(QPoint(w->width() - 1, 0), w) && checkPoint(QPoint(0, w->height() - 1), w) && checkPoint(QPoint(w->width() - 1, w->height() - 1), w) && checkPoint(QPoint(w->width() / 2, w->height() / 2), w)); } void openDebugLogfile() { boost::filesystem::path pathDebug = GetDataDir() / "debug.log"; /* Open debug.log with the associated application */ if (boost::filesystem::exists(pathDebug)) QDesktopServices::openUrl(QUrl::fromLocalFile(QString::fromStdString(pathDebug.string()))); } ToolTipToRichTextFilter::ToolTipToRichTextFilter(int size_threshold, QObject *parent) : QObject(parent), size_threshold(size_threshold) { } bool ToolTipToRichTextFilter::eventFilter(QObject *obj, QEvent *evt) { if(evt->type() == QEvent::ToolTipChange) { QWidget *widget = static_cast<QWidget*>(obj); QString tooltip = widget->toolTip(); if(tooltip.size() > size_threshold && !tooltip.startsWith("<qt>") && !Qt::mightBeRichText(tooltip)) { // Prefix <qt/> to make sure Qt detects this as rich text // Escape the current message as HTML and replace \n by <br> tooltip = "<qt>" + HtmlEscape(tooltip, true) + "<qt/>"; widget->setToolTip(tooltip); return true; } } return QObject::eventFilter(obj, evt); } #ifdef WIN32 boost::filesystem::path static StartupShortcutPath() { return GetSpecialFolderPath(CSIDL_STARTUP) / "testfaucetcoin.lnk"; } bool GetStartOnSystemStartup() { // check for Bitcoin.lnk return boost::filesystem::exists(StartupShortcutPath()); } bool SetStartOnSystemStartup(bool fAutoStart) { // If the shortcut exists already, remove it for updating boost::filesystem::remove(StartupShortcutPath()); if (fAutoStart) { CoInitialize(NULL); // Get a pointer to the IShellLink interface. IShellLink* psl = NULL; HRESULT hres = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLink, reinterpret_cast<void**>(&psl)); if (SUCCEEDED(hres)) { // Get the current executable path TCHAR pszExePath[MAX_PATH]; GetModuleFileName(NULL, pszExePath, sizeof(pszExePath)); TCHAR pszArgs[5] = TEXT("-min"); // Set the path to the shortcut target psl->SetPath(pszExePath); PathRemoveFileSpec(pszExePath); psl->SetWorkingDirectory(pszExePath); psl->SetShowCmd(SW_SHOWMINNOACTIVE); psl->SetArguments(pszArgs); // Query IShellLink for the IPersistFile interface for // saving the shortcut in persistent storage. IPersistFile* ppf = NULL; hres = psl->QueryInterface(IID_IPersistFile, reinterpret_cast<void**>(&ppf)); if (SUCCEEDED(hres)) { WCHAR pwsz[MAX_PATH]; // Ensure that the string is ANSI. MultiByteToWideChar(CP_ACP, 0, StartupShortcutPath().string().c_str(), -1, pwsz, MAX_PATH); // Save the link by calling IPersistFile::Save. hres = ppf->Save(pwsz, TRUE); ppf->Release(); psl->Release(); CoUninitialize(); return true; } psl->Release(); } CoUninitialize(); return false; } return true; } #elif defined(LINUX) // Follow the Desktop Application Autostart Spec: // http://standards.freedesktop.org/autostart-spec/autostart-spec-latest.html boost::filesystem::path static GetAutostartDir() { namespace fs = boost::filesystem; char* pszConfigHome = getenv("XDG_CONFIG_HOME"); if (pszConfigHome) return fs::path(pszConfigHome) / "autostart"; char* pszHome = getenv("HOME"); if (pszHome) return fs::path(pszHome) / ".config" / "autostart"; return fs::path(); } boost::filesystem::path static GetAutostartFilePath() { return GetAutostartDir() / "testfaucetcoin.desktop"; } bool GetStartOnSystemStartup() { boost::filesystem::ifstream optionFile(GetAutostartFilePath()); if (!optionFile.good()) return false; // Scan through file for "Hidden=true": std::string line; while (!optionFile.eof()) { getline(optionFile, line); if (line.find("Hidden") != std::string::npos && line.find("true") != std::string::npos) return false; } optionFile.close(); return true; } bool SetStartOnSystemStartup(bool fAutoStart) { if (!fAutoStart) boost::filesystem::remove(GetAutostartFilePath()); else { char pszExePath[MAX_PATH+1]; memset(pszExePath, 0, sizeof(pszExePath)); if (readlink("/proc/self/exe", pszExePath, sizeof(pszExePath)-1) == -1) return false; boost::filesystem::create_directories(GetAutostartDir()); boost::filesystem::ofstream optionFile(GetAutostartFilePath(), std::ios_base::out|std::ios_base::trunc); if (!optionFile.good()) return false; // Write a bitcoin.desktop file to the autostart directory: optionFile << "[Desktop Entry]\n"; optionFile << "Type=Application\n"; optionFile << "Name=testfaucetcoin\n"; optionFile << "Exec=" << pszExePath << " -min\n"; optionFile << "Terminal=false\n"; optionFile << "Hidden=false\n"; optionFile.close(); } return true; } #else // TODO: OSX startup stuff; see: // https://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPSystemStartup/Articles/CustomLogin.html bool GetStartOnSystemStartup() { return false; } bool SetStartOnSystemStartup(bool fAutoStart) { return false; } #endif HelpMessageBox::HelpMessageBox(QWidget *parent) : QMessageBox(parent) { header = tr("testfaucetcoin-Qt") + " " + tr("version") + " " + QString::fromStdString(FormatFullVersion()) + "\n\n" + tr("Usage:") + "\n" + " testfaucetcoin-qt [" + tr("command-line options") + "] " + "\n"; coreOptions = QString::fromStdString(HelpMessage()); uiOptions = tr("UI options") + ":\n" + " -lang=<lang> " + tr("Set language, for example \"de_DE\" (default: system locale)") + "\n" + " -min " + tr("Start minimized") + "\n" + " -splash " + tr("Show splash screen on startup (default: 1)") + "\n"; setWindowTitle(tr("testfaucetcoin-Qt")); setTextFormat(Qt::PlainText); // setMinimumWidth is ignored for QMessageBox so put in non-breaking spaces to make it wider. setText(header + QString(QChar(0x2003)).repeated(50)); setDetailedText(coreOptions + "\n" + uiOptions); } void HelpMessageBox::printToConsole() { // On other operating systems, the expected action is to print the message to the console. QString strUsage = header + "\n" + coreOptions + "\n" + uiOptions; fprintf(stdout, "%s", strUsage.toStdString().c_str()); } void HelpMessageBox::showOrPrint() { #if defined(WIN32) // On Windows, show a message box, as there is no stderr/stdout in windowed applications exec(); #else // On other operating systems, print help text to console printToConsole(); #endif } } // namespace GUIUtil
testfaucetcoin/testfaucetcoin
src/qt/guiutil.cpp
C++
mit
13,417
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // #import "WXPBGeneratedMessage.h" @class BaseRequest, LayOut, SKBuiltinBuffer_t; @interface CardSyncRequest : WXPBGeneratedMessage { } + (void)initialize; // Remaining properties @property(retain, nonatomic) BaseRequest *baseRequest; // @dynamic baseRequest; @property(retain, nonatomic) SKBuiltinBuffer_t *keyBuf; // @dynamic keyBuf; @property(retain, nonatomic) LayOut *layout; // @dynamic layout; @property(nonatomic) unsigned int layoutScene; // @dynamic layoutScene; @property(nonatomic) unsigned int selector; // @dynamic selector; @end
walkdianzi/DashengHook
WeChat-Headers/CardSyncRequest.h
C
mit
687
<?php namespace Tests\App; use App\VCS\Git; use App\VCS\Tagged; use Illuminate\Filesystem\Filesystem; use Mockery; use App\VCS\Repository; use Symfony\Component\Process\Exception\ProcessFailedException; use Symfony\Component\Process\Process; class GitTest extends \TestCase { /** @var Mockery\MockInterface */ protected $repository; /** @var Mockery\MockInterface */ protected $filesystem; /** @var Mockery\MockInterface */ protected $version; /** @var Git */ protected $git; public function setUp() { parent::setUp(); $this->repository = Mockery::mock(Repository::class); $this->filesystem = Mockery::mock(Filesystem::class); $this->version = Mockery::mock(Tagged::class)->shouldIgnoreMissing(); $this->git = new Git($this->filesystem); } /** * @test */ public function canCloneRepository() { $path = uniqid(); $this->git = Mockery::mock(Git::class.'[temporaryPath]', [$this->filesystem]); $this->git->shouldAllowMockingProtectedMethods(); $this->git->shouldReceive('temporaryPath')->andReturn($path); $this->repository->shouldReceive('path')->andReturn($path); $this->repository->shouldReceive('setPath')->with($path)->once(); $this->repository->shouldReceive('sshUrl')->andReturn(uniqid()); // passing an empty string in place of a "command" that's normally passed $process = Mockery::mock(Process::class.'[setWorkingDirectory,run,isSuccessful]', ['']); $process->shouldReceive('setWorkingDirectory')->with($path)->once(); $process->shouldReceive('run')->once(); $process->shouldReceive('isSuccessful')->andReturnTrue(); app()->instance(Process::class, $process); $this->assertEquals($this->repository, $this->git->clone($this->repository, $this->version)); } /** * @test */ public function cloneRepositoryComplainsWhenFails() { $this->expectException(ProcessFailedException::class); $this->filesystem->shouldReceive('makeDirectory')->once(); $this->repository->shouldIgnoreMissing(); // passing an empty string in place of a "command" that's normally passed $process = Mockery::mock(Process::class.'[isSuccessful]', ['']); $process->shouldReceive('isSuccessful')->andReturnFalse(); $process->shouldIgnoreMissing(); app()->instance(Process::class, $process); $this->assertEquals($this->repository, $this->git->clone($this->repository, $this->version)); } /** * @test */ public function canCheckoutTag() { $path = uniqid(); $this->repository->shouldReceive('path')->andReturn($path); // passing an empty string in place of a "command" that's normally passed $process = Mockery::mock(Process::class.'[setWorkingDirectory,run,isSuccessful]', ['']); $process->shouldReceive('setWorkingDirectory')->with($path)->once(); $process->shouldReceive('run')->once(); $process->shouldReceive('isSuccessful')->andReturnTrue(); app()->instance(Process::class, $process); $this->assertTrue($this->git->checkoutTag($this->repository, $this->version)); } /** * @test */ public function checkoutTagComplainsWhenFails() { $this->expectException(ProcessFailedException::class); $this->repository->shouldIgnoreMissing(); // passing an empty string in place of a "command" that's normally passed $process = Mockery::mock(Process::class.'[isSuccessful]', ['']); $process->shouldReceive('isSuccessful')->andReturnFalse(); $process->shouldIgnoreMissing(); app()->instance(Process::class, $process); $this->assertTrue($this->git->checkoutTag($this->repository, $this->version)); } }
realpage/asset-publisher
tests/unit/VCS/GitTest.php
PHP
mit
3,894
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>zfc: 24 s 🏆</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.9.1 / zfc - 8.9.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> zfc <small> 8.9.0 <span class="label label-success">24 s 🏆</span> </small> </h1> <p>📅 <em><script>document.write(moment("2021-12-30 00:15:10 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-30 00:15:10 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 Preprocessor-pretty-printer of OCaml conf-findutils 1 Virtual package relying on findutils conf-perl 1 Virtual package relying on perl coq 8.9.1 Formal proof management system num 0 The Num library for arbitrary-precision integer and rational arithmetic ocaml 4.05.0 The OCaml compiler (virtual package) ocaml-base-compiler 4.05.0 Official 4.05.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;Hugo.Herbelin@inria.fr&quot; homepage: &quot;https://github.com/coq-contribs/zfc&quot; license: &quot;LGPL 2.1&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/ZFC&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.9&quot; &amp; &lt; &quot;8.10~&quot;} ] tags: [ &quot;keyword: set theory&quot; &quot;keyword: Zermelo-Fraenkel&quot; &quot;keyword: Calculus of Inductive Constructions&quot; &quot;category: Mathematics/Logic/Set theory&quot; ] authors: [ &quot;Benjamin Werner&quot; ] bug-reports: &quot;https://github.com/coq-contribs/zfc/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/zfc.git&quot; synopsis: &quot;An encoding of Zermelo-Fraenkel Set Theory in Coq&quot; description: &quot;&quot;&quot; The encoding of Zermelo-Fraenkel Set Theory is largely inspired by Peter Aczel&#39;s work dating back to the eighties. A type Ens is defined, which represents sets. Two predicates IN and EQ stand for membership and extensional equality between sets. The axioms of ZFC are then proved and thus appear as theorems in the development. A main motivation for this work is the comparison of the respective expressive power of Coq and ZFC. A non-computational type-theoretical axiom of choice is necessary to prove the replacement schemata and the set-theoretical AC. The main difference between this work and Peter Aczel&#39;s is that propositions are defined on the impredicative level Prop. Since the definition of Ens is, however, still unchanged, I also added most of Peter Aczel&#39;s definition. The main advantage of Aczel&#39;s approach is a more constructive vision of the existential quantifier (which gives the set-theoretical axiom of choice for free).&quot;&quot;&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/zfc/archive/v8.9.0.tar.gz&quot; checksum: &quot;md5=3723e1731f3dc6eed21c116f1415b27a&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-zfc.8.9.0 coq.8.9.1</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam list; echo; ulimit -Sv 4000000; timeout 4h opam install -y --deps-only coq-zfc.8.9.0 coq.8.9.1</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>12 s</dd> </dl> <h2>Install 🚀</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam list; echo; ulimit -Sv 16000000; timeout 4h opam install -y -v coq-zfc.8.9.0 coq.8.9.1</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>24 s</dd> </dl> <h2>Installation size</h2> <p>Total: 661 K</p> <ul> <li>123 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/zfc.vo</code></li> <li>97 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/zfc.glob</code></li> <li>45 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/zfc.v</code></li> <li>40 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/Axioms.vo</code></li> <li>35 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/Constructive.vo</code></li> <li>28 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/Axioms.glob</code></li> <li>25 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/Ordinal_theory.glob</code></li> <li>21 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/Plump.vo</code></li> <li>21 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/Plump.glob</code></li> <li>20 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/Constructive.glob</code></li> <li>18 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/Sets.vo</code></li> <li>15 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/Cartesian.vo</code></li> <li>15 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/Cartesian.glob</code></li> <li>14 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/Hierarchy.vo</code></li> <li>14 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/Ordinal_theory.vo</code></li> <li>14 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/Axioms.v</code></li> <li>13 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/Replacement.glob</code></li> <li>11 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/Replacement.vo</code></li> <li>11 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/Plump.v</code></li> <li>11 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/Constructive.v</code></li> <li>8 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/Omega.vo</code></li> <li>7 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/Sets.glob</code></li> <li>7 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/Ordinal_theory.v</code></li> <li>7 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/Cartesian.v</code></li> <li>7 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/Omega.glob</code></li> <li>6 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/Hierarchy.glob</code></li> <li>6 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/Russell.glob</code></li> <li>5 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/Sets.v</code></li> <li>5 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/Replacement.v</code></li> <li>5 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/Omega.v</code></li> <li>4 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/Hierarchy.v</code></li> <li>2 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/Russell.vo</code></li> <li>2 K <code>../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/ZFC/Russell.v</code></li> </ul> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq-zfc.8.9.0</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </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>
coq-bench/coq-bench.github.io
clean/Linux-x86_64-4.05.0-2.0.1/released/8.9.1/zfc/8.9.0.html
HTML
mit
11,149
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Topics.Radical.Model { /// <summary> /// Applied to properties asks that models skip this property when notifying property changes. /// </summary> [AttributeUsage( AttributeTargets.Property )] public sealed class SkipPropertyValidationAttribute : Attribute { } }
micdenny/radical
src/net35/Radical/Model/SkipPropertyValidationAttribute.cs
C#
mit
392
/* * SonarLint for Visual Studio * Copyright (C) 2016-2021 SonarSource SA * mailto:info AT sonarsource DOT com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 3 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ using System; using System.Collections.Generic; using System.IO.Abstractions.TestingHelpers; using System.Linq; using FluentAssertions; using Microsoft.VisualStudio.CodeAnalysis.RuleSets; namespace SonarLint.VisualStudio.Integration.UnitTests { internal class ConfigurableRuleSetSerializer : IRuleSetSerializer { private readonly Dictionary<string, RuleSet> savedRuleSets = new Dictionary<string, RuleSet>(StringComparer.OrdinalIgnoreCase); private readonly MockFileSystem fileSystem; private readonly Dictionary<string, int> ruleSetLoaded = new Dictionary<string, int>(StringComparer.OrdinalIgnoreCase); public ConfigurableRuleSetSerializer(MockFileSystem fileSystem) { this.fileSystem = fileSystem; } #region IRuleSetFileSystem RuleSet IRuleSetSerializer.LoadRuleSet(string path) { this.savedRuleSets.TryGetValue(path, out RuleSet rs); this.ruleSetLoaded.TryGetValue(path, out int counter); this.ruleSetLoaded[path] = ++counter; rs?.Validate(); return rs; } void IRuleSetSerializer.WriteRuleSetFile(RuleSet ruleSet, string path) { if (!this.savedRuleSets.TryGetValue(path, out _)) { this.savedRuleSets[path] = ruleSet; } this.fileSystem.AddFile(path, new MockFileData("")); } #endregion IRuleSetFileSystem #region Test Helpers public IEnumerable<string> RegisteredRuleSets { get { return this.savedRuleSets.Keys; } } public void RegisterRuleSet(RuleSet ruleSet) { this.RegisterRuleSet(ruleSet, ruleSet.FilePath); } public void RegisterRuleSet(RuleSet ruleSet, string path) { this.savedRuleSets[path] = ruleSet; this.fileSystem.AddFile(path, new MockFileData("")); } public void ClearRuleSets() { foreach (var filePath in fileSystem.AllFiles) { fileSystem.RemoveFile(filePath); } savedRuleSets.Clear(); } public void AssertRuleSetExists(string path) { fileSystem.GetFile(path).Should().NotBe(null); } public void AssertRuleSetNotExists(string path) { fileSystem.GetFile(path).Should().Be(null); } public void AssertRuleSetsAreEqual(string ruleSetPath, RuleSet expectedRuleSet) { this.AssertRuleSetExists(ruleSetPath); RuleSet actualRuleSet = this.savedRuleSets[ruleSetPath]; actualRuleSet.Should().NotBeNull("Expected rule set to be written"); RuleSetAssert.AreEqual(expectedRuleSet, actualRuleSet); } public void AssertRuleSetsAreSame(string ruleSetPath, RuleSet expectedRuleSet) { this.AssertRuleSetExists(ruleSetPath); RuleSet actualRuleSet = this.savedRuleSets[ruleSetPath]; actualRuleSet.Should().Be(expectedRuleSet); } public void AssertRuleSetLoaded(string ruleSet, int expectedNumberOfTimes) { this.ruleSetLoaded.TryGetValue(ruleSet, out int actual); actual.Should().Be(expectedNumberOfTimes, "RuleSet {0} was loaded unexpected number of times", ruleSet); } #endregion Test Helpers } }
SonarSource-VisualStudio/sonarlint-visualstudio
src/TestInfrastructure/Framework/ConfigurableRuleSetSerializer.cs
C#
mit
4,356
Copyright (c) 2009-2013 Bitcoin Developers Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php. This product includes software developed by the OpenSSL Project for use in the [OpenSSL Toolkit](http://www.openssl.org/). This product includes cryptographic software written by Eric Young ([eay@cryptsoft.com](mailto:eay@cryptsoft.com)), and UPnP software written by Thomas Bernard. UNIX BUILD NOTES ==================== To Build --------------------- cd src/ make -f makefile.unix # Headless ccoin See readme-qt.rst for instructions on building Ccoin-Qt, the graphical user interface. Dependencies --------------------- Library Purpose Description ------- ------- ----------- libssl SSL Support Secure communications libdb4.8 Berkeley DB Blockchain & wallet storage libboost Boost C++ Library miniupnpc UPnP Support Optional firewall-jumping support [miniupnpc](http://miniupnp.free.fr/) may be used for UPnP port mapping. It can be downloaded from [here]( http://miniupnp.tuxfamily.org/files/). UPnP support is compiled in and turned off by default. Set USE_UPNP to a different value to control this: USE_UPNP= No UPnP support miniupnp not required USE_UPNP=0 (the default) UPnP support turned off by default at runtime USE_UPNP=1 UPnP support turned on by default at runtime IPv6 support may be disabled by setting: USE_IPV6=0 Disable IPv6 support Licenses of statically linked libraries: Berkeley DB New BSD license with additional requirement that linked software must be free open source Boost MIT-like license miniupnpc New (3-clause) BSD license - Versions used in this release: - GCC 4.3.3 - OpenSSL 1.0.1c - Berkeley DB 4.8.30.NC - Boost 1.37 - miniupnpc 1.6 Dependency Build Instructions: Ubuntu & Debian ---------------------------------------------- Build requirements: sudo apt-get install build-essential sudo apt-get install libssl-dev for Ubuntu 12.04: sudo apt-get install libboost-all-dev db4.8 packages are available [here](https://launchpad.net/~bitcoin/+archive/bitcoin). Ubuntu precise has packages for libdb5.1-dev and libdb5.1++-dev, but using these will break binary wallet compatibility, and is not recommended. for other Ubuntu & Debian: sudo apt-get install libdb-dev sudo apt-get install libdb++-dev sudo apt-get install libboost-dev sudo apt-get install libboost-system-dev sudo apt-get install libboost-filesystem-dev sudo apt-get install libboost-program-options-dev sudo apt-get install libboost-thread-dev sudo apt-get install libgmp-dev sudo apt-get install libmpfr-dev (If using Boost 1.37, append -mt to the boost libraries in the makefile) Optional: sudo apt-get install libminiupnpc-dev (see USE_UPNP compile flag) Notes ----- The release is built with GCC and then "strip bitcoind" to strip the debug symbols, which reduces the executable size by about 90%. miniupnpc --------- tar -xzvf miniupnpc-1.6.tar.gz cd miniupnpc-1.6 make sudo su make install Berkeley DB ----------- You need Berkeley DB 4.8. If you have to build Berkeley DB yourself: ../dist/configure --enable-cxx make Boost ----- If you need to build Boost yourself: sudo su ./bootstrap.sh ./bjam install Security -------- To help make your ccoin installation more secure by making certain attacks impossible to exploit even if a vulnerability is found, you can take the following measures: * Position Independent Executable Build position independent code to take advantage of Address Space Layout Randomization offered by some kernels. An attacker who is able to cause execution of code at an arbitrary memory location is thwarted if he doesn't know where anything useful is located. The stack and heap are randomly located by default but this allows the code section to be randomly located as well. On an Amd64 processor where a library was not compiled with -fPIC, this will cause an error such as: "relocation R_X86_64_32 against `......' can not be used when making a shared object;" To build with PIE, use: make -f makefile.unix ... -e PIE=1 To test that you have built PIE executable, install scanelf, part of paxutils, and use: scanelf -e ./ccoin The output should contain: TYPE ET_DYN * Non-executable Stack If the stack is executable then trivial stack based buffer overflow exploits are possible if vulnerable buffers are found. By default, bitcoin should be built with a non-executable stack but if one of the libraries it uses asks for an executable stack or someone makes a mistake and uses a compiler extension which requires an executable stack, it will silently build an executable without the non-executable stack protection. To verify that the stack is non-executable after compiling use: `scanelf -e ./ccoin` the output should contain: STK/REL/PTL RW- R-- RW- The STK RW- means that the stack is readable and writeable but not executable.
thecoinproject/ccointestbed
doc/build-unix.md
Markdown
mit
5,172
package com.mdsol.mauth.proxy; import com.typesafe.config.Config; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.UUID; public class ProxyConfig { private static final Logger logger = LoggerFactory.getLogger(ProxyConfig.class); public static final String V2_ONLY_SIGN_REQUESTS = "mauth.v2_only_sign_requests"; public static final String V2_ONLY_AUTHTICATE = "mauth.v2_only_authenticate"; private final int proxyPort; private final int bufferSizeInByes; private String privateKey; private final UUID appUuid; private boolean v2OnlySignRequests = false; private boolean v2OnlyAuthenticate = false; public ProxyConfig(Config config) { this( config.getInt("proxy.port"), config.getInt("proxy.buffer_size_in_bytes"), UUID.fromString(config.getString("app.uuid")), config.getString("app.private_key"), config.getBoolean(V2_ONLY_SIGN_REQUESTS), config.getBoolean(V2_ONLY_AUTHTICATE) ); } public ProxyConfig(int proxyPort, int bufferSizeInByes, UUID appUuid, String privateKey, boolean v2OnlySignRequests, boolean v2OnlyAuthenticate) { this.proxyPort = proxyPort; this.bufferSizeInByes = bufferSizeInByes; this.appUuid = appUuid; this.privateKey = privateKey; this.v2OnlySignRequests = v2OnlySignRequests; this.v2OnlyAuthenticate = v2OnlyAuthenticate; } public int getProxyPort() { return proxyPort; } public int getBufferSizeInByes() { return bufferSizeInByes; } public String getPrivateKey() { return privateKey; } public UUID getAppUuid() { return appUuid; } public boolean isV2OnlySignRequests() { return v2OnlySignRequests; } public boolean isV2OnlySignAuthenticate() { return v2OnlyAuthenticate; } }
mdsol/mauth-java-client
modules/mauth-proxy/src/main/java/com/mdsol/mauth/proxy/ProxyConfig.java
Java
mit
1,784
<?php class updatePitchDeck_m extends CI_Model{ function __construct(){ parent::__construct(); } function updateIdeaGen($data){ $sql = "update idea_genboard set problem = ? , people = ? , behavior = ? , solution = ? where idea_id = ?"; $query = $this->db->query($sql,array($data['problem'],$data['people'],$data['behavior'],$data['solution'],$data['idea_id'])); if($query){ $sql1 = "select * from ungen_pitchdeck where idea_id = ? "; $query1 = $this->db->query($sql1,array($data['idea_id'])); if($query1->num_rows()>0){ $row = $query1->row(); $session = array( 'ungen_id'=>$row->ungen_id ); $this->session->set_userdata($session); return true; } } } function updateBMC($data){ $sql = "update bmc set cust_segment = ? , cust_relationship = ? , channels = ? , value_proposition = ? , key_activities = ? , key_sources = ? , key_partners = ? , cost_structures = ? , revenue_streams = ? where bmc_id = ? "; $query = $this->db->query($sql,array($data['segment'],$data['relationship'],$data['channels'],$data['proposition'],$data['activities'],$data['resources'],$data['partners'],$data['structure'],$data['streams'],$data['bmc_id'])); if($query){ $session = array( 'bmcid'=>$data['bmc_id'] ); $this->session->set_tempdata($session); return true; } } function updateValueProp($data){ $sql = "update value_prop set wants = ? , needs = ? , fears = ? , benefits = ? , experience = ? , features = ? , company = ? , product = ? , ideal_cust = ? , substitutes = ? where valueprop_id = ? "; $query = $this->db->query($sql,array($data['wants'],$data['needs'],$data['fears'],$data['benefits'],$data['experience'],$data['features'],$data['company'],$data['product'],$data['ideal_cust'],$data['substitutes'],$data['valueprop_id'])); if($query){ $sql1 = "select * from ungen_pitchdeck where valueprop_id = ? "; $query1 = $this->db->query($sql1,array($data['valueprop_id'])); if($query1->num_rows()>0){ $row = $query1->row(); $session = array( 'ungen_id'=>$row->ungen_id ); $this->session->set_userdata($session); return true; } } } function updateValidationBoard($data){ $sql = "update validation_board set stage= ? , customer = ? , problem = ? , solution = ? , risk_assumpt = ? , solution_criteria = ? , results = ? , learnings = ? , customer2 = ? , problem2 = ? , solution2 = ? , risk_assumpt2 = ? , solution_criteria2 = ? , results2 = ? , learnings2 = ? , customer3 = ? , problem3 = ? , solution3 = ? , risk_assumpt3 = ? , solution_criteria3 = ? , results3 = ? , learnings3 = ? where valid_id = ?"; $query = $this->db->query($sql,array($data['stage'],$data['customer'],$data['problem'],$data['solution'],$data['risk_assumpt'],$data['solution_criteria'],$data['results'],$data['learnings'],$data['customer2'],$data['problem2'],$data['solution2'],$data['risk_assumpt2'],$data['solution_criteria2'],$data['results2'],$data['learnings2'],$data['customer3'],$data['problem3'],$data['solution3'],$data['risk_assumpt3'],$data['solution_criteria3'],$data['results3'],$data['learnings3'],$data['valid_id'])); if($query){ $sql1 = "select * from ungen_pitchdeck where valid_id = ? "; $query1 = $this->db->query($sql1,array($data['valid_id'])); if($query1->num_rows()>0){ $row = $query1->row(); $session = array( 'ungen_id'=>$row->ungen_id ); $this->session->set_userdata($session); return true; } } } } ?>
jLKisni/PitchItUp
application/modules/Web/models/updatePitchDeck_m.php
PHP
mit
3,710
// // XMNetworking.h // XMNetworking // // Created by Zubin Kang on 16/12/2016. // Copyright © 2016 XMNetworking. All rights reserved. // #import <UIKit/UIKit.h> //! Project version number for XMNetworking. FOUNDATION_EXPORT double XMNetworkingVersionNumber; //! Project version string for XMNetworking. FOUNDATION_EXPORT const unsigned char XMNetworkingVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import <XMNetworking/PublicHeader.h> #import <XMNetworking/XMConst.h> #import <XMNetworking/XMRequest.h> #import <XMNetworking/XMCenter.h> #import <XMNetworking/XMEngine.h>
kangzubin/XMNetworking
Framework/XMNetworking/XMNetworking.h
C
mit
655
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>File: schema.rb</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <link rel="stylesheet" href="../../../../../../../../../.././rdoc-style.css" type="text/css" media="screen" /> <script type="text/javascript"> // <![CDATA[ function popupCode( url ) { window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400") } function toggleCode( id ) { if ( document.getElementById ) elem = document.getElementById( id ); else if ( document.all ) elem = eval( "document.all." + id ); else return false; elemStyle = elem.style; if ( elemStyle.display != "block" ) { elemStyle.display = "block" } else { elemStyle.display = "none" } return true; } // Make codeblocks hidden by default document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" ) // ]]> </script> </head> <body> <div id="fileHeader"> <h1>schema.rb</h1> <table class="header-table"> <tr class="top-aligned-row"> <td><strong>Path:</strong></td> <td>/usr/lib/ruby/gems/1.8/gems/activerecord-3.0.0.beta4/lib/active_record/schema.rb </td> </tr> <tr class="top-aligned-row"> <td><strong>Last Update:</strong></td> <td>Sun Jun 20 17:19:15 -0600 2010</td> </tr> </table> </div> <!-- banner header --> <div id="bodyContent"> <div id="contextContent"> <div id="requires-list"> <h3 class="section-bar">Required files</h3> <div class="name-list"> active_support/core_ext/object/blank&nbsp;&nbsp; </div> </div> </div> </div> <!-- if includes --> <div id="section"> <!-- if method_list --> </div> <div id="validator-badges"> <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> </div> </body> </html>
ecoulthard/summitsearch
doc/api/files/usr/lib/ruby/gems/1_8/gems/activerecord-3_0_0_beta4/lib/active_record/schema_rb.html
HTML
mit
2,270
#ifndef M3D_RANDOM_UTILS_H #define M3D_RANDOM_UTILS_H #include <stdlib.h> #include <math.h> namespace m3D { namespace utils { float ranf() { return ((float) rand()) / ((float) RAND_MAX); } float box_muller(float m, float s) { float x1, x2, w, y1; static float y2; static int use_last = 0; static int initialized_rand = 0; if (!initialized_rand) { #if BSD srandomdev(); #endif initialized_rand = 1; } if (use_last) /* use value from previous call */ { y1 = y2; use_last = 0; } else { do { x1 = 2.0 * ranf() - 1.0; x2 = 2.0 * ranf() - 1.0; w = x1 * x1 + x2 * x2; } while (w >= 1.0); w = sqrt((-2.0 * log(w)) / w); y1 = x1 * w; y2 = x2 * w; use_last = 1; } return ( m + y1 * s); } } } #endif
meteo-ubonn/meanie3D
src/utils/rand_utils.cpp
C++
mit
1,159
package co.navdeep.popmovies.tmdb.model; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class Genre { @SerializedName("id") @Expose private Integer id; @SerializedName("name") @Expose private String name; /** * * @return * The id */ public Integer getId() { return id; } /** * * @param id * The id */ public void setId(Integer id) { this.id = id; } /** * * @return * The name */ public String getName() { return name; } /** * * @param name * The name */ public void setName(String name) { this.name = name; } }
navdeepsekhon/PopMovies
app/src/main/java/co/navdeep/popmovies/tmdb/model/Genre.java
Java
mit
778
#include <cstring> #include <occa/types/bits.hpp> #include <occa/types/primitive.hpp> #include <occa/internal/io.hpp> #include <occa/internal/utils/lex.hpp> #include <occa/internal/utils/string.hpp> namespace occa { primitive::primitive(const char *c) { *this = load(c); } primitive::primitive(const std::string &s) { const char *c = s.c_str(); *this = load(c); } primitive primitive::load(const char *&c, const bool includeSign) { bool loadedFormattedValue = false; bool unsigned_ = false; bool negative = false; bool decimal = false; bool float_ = false; int longs = 0; int digits = 0; const char *c0 = c; primitive p; const int cLength = strlen(c); if(cLength >= 4){ if (strncmp(c, "true", 4) == 0) { p = true; p.source = "true"; c += 4; return p; } } if(cLength >= 5){ if (strncmp(c, "false", 5) == 0) { p = false; p.source = "false"; c += 5; return p; } } if ((*c == '+') || (*c == '-')) { if (!includeSign) { return primitive(); } negative = (*c == '-'); ++c; lex::skipWhitespace(c); } if (*c == '0') { ++digits; ++c; const char C = uppercase(*c); if ((C == 'B') || (C == 'X')) { loadedFormattedValue = true; if (C == 'B') { p = primitive::loadBinary(++c, negative); } else if (C == 'X') { p = primitive::loadHex(++c, negative); } if (p.type & primitiveType::none) { c = c0; return primitive(); } } else { --c; } } if (!loadedFormattedValue) { while (true) { if (('0' <= *c) && (*c <= '9')) { ++digits; } else if (*c == '.') { decimal = true; } else { break; } ++c; } } if (!loadedFormattedValue && !digits) { c = c0; p.source = std::string(c0, c - c0); return p; } while(*c != '\0') { const char C = uppercase(*c); if (C == 'L') { ++longs; ++c; } else if (C == 'U') { unsigned_ = true; ++c; } else if (!loadedFormattedValue) { if (C == 'E') { primitive exp = primitive::load(++c); // Check if there was an 'F' in exp decimal = true; float_ = (exp.type & primitiveType::isFloat); break; } else if (C == 'F') { float_ = true; ++c; } else { break; } } else { break; } } if (loadedFormattedValue) { // Hex and binary only handle U, L, and LL if (longs == 0) { if (unsigned_) { p = p.to<uint32_t>(); } else { p = p.to<int32_t>(); } } else if (longs >= 1) { if (unsigned_) { p = p.to<uint64_t>(); } else { p = p.to<int64_t>(); } } } else { // Handle the multiple other formats with normal digits if (decimal || float_) { if (float_) { p = (float) occa::parseFloat(std::string(c0, c - c0)); } else { p = (double) occa::parseDouble(std::string(c0, c - c0)); } } else { uint64_t value_ = parseInt(std::string(c0, c - c0)); if (longs == 0) { if (unsigned_) { p = (uint32_t) value_; } else { p = (int32_t) value_; } } else if (longs >= 1) { if (unsigned_) { p = (uint64_t) value_; } else { p = (int64_t) value_; } } } } p.source = std::string(c0, c - c0); return p; } primitive primitive::load(const std::string &s, const bool includeSign) { const char *c = s.c_str(); return load(c, includeSign); } primitive primitive::loadBinary(const char *&c, const bool isNegative) { const char *c0 = c; uint64_t value_ = 0; while (*c == '0' || *c == '1') { value_ = (value_ << 1) | (*c - '0'); ++c; } if (c == c0) { return primitive(); } const int bits = c - c0 + isNegative; if (bits < 8) { return isNegative ? primitive((int8_t) -value_) : primitive((uint8_t) value_); } else if (bits < 16) { return isNegative ? primitive((int16_t) -value_) : primitive((uint16_t) value_); } else if (bits < 32) { return isNegative ? primitive((int32_t) -value_) : primitive((uint32_t) value_); } else { return isNegative ? primitive((int64_t) -value_) : primitive((uint64_t) value_); } } primitive primitive::loadHex(const char *&c, const bool isNegative) { const char *c0 = c; uint64_t value_ = 0; while (true) { const char C = uppercase(*c); if (('0' <= C) && (C <= '9')) { value_ = (value_ << 4) | (C - '0'); } else if (('A' <= C) && (C <= 'F')) { value_ = (value_ << 4) | (10 + C - 'A'); } else { break; } ++c; } if (c == c0) { return primitive(); } const int bits = 4*(c - c0) + isNegative; if (bits < 8) { return isNegative ? primitive((int8_t) -value_) : primitive((uint8_t) value_); } else if (bits < 16) { return isNegative ? primitive((int16_t) -value_) : primitive((uint16_t) value_); } else if (bits < 32) { return isNegative ? primitive((int32_t) -value_) : primitive((uint32_t) value_); } else { return isNegative ? primitive((int64_t) -value_) : primitive((uint64_t) value_); } } std::string primitive::toString() const { if (source.size()) { return source; } std::string str; switch (type) { case primitiveType::bool_ : str = (value.bool_ ? "true" : "false"); break; case primitiveType::uint8_ : str = occa::toString((uint64_t) value.uint8_); break; case primitiveType::uint16_ : str = occa::toString((uint64_t) value.uint16_); break; case primitiveType::uint32_ : str = occa::toString((uint64_t) value.uint32_); break; case primitiveType::uint64_ : str = occa::toString((uint64_t) value.uint64_); break; case primitiveType::int8_ : str = occa::toString((int64_t) value.int8_); break; case primitiveType::int16_ : str = occa::toString((int64_t) value.int16_); break; case primitiveType::int32_ : str = occa::toString((int64_t) value.int32_); break; case primitiveType::int64_ : str = occa::toString((int64_t) value.int64_); break; case primitiveType::float_ : str = occa::toString(value.float_); break; case primitiveType::double_ : str = occa::toString(value.double_); break; case primitiveType::none : default: return ""; break; } if (type & (primitiveType::uint64_ | primitiveType::int64_)) { str += 'L'; } return str; } //---[ Misc Methods ]----------------- uint64_t primitive::sizeof_() const { switch(type) { case primitiveType::bool_ : return sizeof(bool); case primitiveType::uint8_ : return sizeof(uint8_t); case primitiveType::uint16_ : return sizeof(uint16_t); case primitiveType::uint32_ : return sizeof(uint32_t); case primitiveType::uint64_ : return sizeof(uint64_t); case primitiveType::int8_ : return sizeof(int8_t); case primitiveType::int16_ : return sizeof(int16_t); case primitiveType::int32_ : return sizeof(int32_t); case primitiveType::int64_ : return sizeof(int64_t); case primitiveType::float_ : return sizeof(float); case primitiveType::double_ : return sizeof(double); case primitiveType::ptr : return sizeof(void*); default: return 0; } } //==================================== //---[ Unary Operators ]-------------- primitive primitive::not_(const primitive &p) { switch(p.type) { case primitiveType::bool_ : return primitive(!p.value.bool_); case primitiveType::int8_ : return primitive(!p.value.int8_); case primitiveType::uint8_ : return primitive(!p.value.uint8_); case primitiveType::int16_ : return primitive(!p.value.int16_); case primitiveType::uint16_ : return primitive(!p.value.uint16_); case primitiveType::int32_ : return primitive(!p.value.int32_); case primitiveType::uint32_ : return primitive(!p.value.uint32_); case primitiveType::int64_ : return primitive(!p.value.int64_); case primitiveType::uint64_ : return primitive(!p.value.uint64_); case primitiveType::float_ : OCCA_FORCE_ERROR("Cannot apply operator ! to float type"); break; case primitiveType::double_ : OCCA_FORCE_ERROR("Cannot apply operator ! to double type"); break; default: ; } return primitive(); } primitive primitive::positive(const primitive &p) { switch(p.type) { case primitiveType::bool_ : return primitive(+p.value.bool_); case primitiveType::int8_ : return primitive(+p.value.int8_); case primitiveType::uint8_ : return primitive(+p.value.uint8_); case primitiveType::int16_ : return primitive(+p.value.int16_); case primitiveType::uint16_ : return primitive(+p.value.uint16_); case primitiveType::int32_ : return primitive(+p.value.int32_); case primitiveType::uint32_ : return primitive(+p.value.uint32_); case primitiveType::int64_ : return primitive(+p.value.int64_); case primitiveType::uint64_ : return primitive(+p.value.uint64_); case primitiveType::float_ : return primitive(+p.value.float_); case primitiveType::double_ : return primitive(+p.value.double_); default: ; } return primitive(); } primitive primitive::negative(const primitive &p) { switch(p.type) { case primitiveType::bool_ : return primitive(-p.value.bool_); case primitiveType::int8_ : return primitive(-p.value.int8_); case primitiveType::uint8_ : return primitive(-p.value.uint8_); case primitiveType::int16_ : return primitive(-p.value.int16_); case primitiveType::uint16_ : return primitive(-p.value.uint16_); case primitiveType::int32_ : return primitive(-p.value.int32_); case primitiveType::uint32_ : return primitive(-p.value.uint32_); case primitiveType::int64_ : return primitive(-p.value.int64_); case primitiveType::uint64_ : return primitive(-p.value.uint64_); case primitiveType::float_ : return primitive(-p.value.float_); case primitiveType::double_ : return primitive(-p.value.double_); default: ; } return primitive(); } primitive primitive::tilde(const primitive &p) { switch(p.type) { case primitiveType::bool_ : return primitive(!p.value.bool_); case primitiveType::int8_ : return primitive(~p.value.int8_); case primitiveType::uint8_ : return primitive(~p.value.uint8_); case primitiveType::int16_ : return primitive(~p.value.int16_); case primitiveType::uint16_ : return primitive(~p.value.uint16_); case primitiveType::int32_ : return primitive(~p.value.int32_); case primitiveType::uint32_ : return primitive(~p.value.uint32_); case primitiveType::int64_ : return primitive(~p.value.int64_); case primitiveType::uint64_ : return primitive(~p.value.uint64_); case primitiveType::float_ : OCCA_FORCE_ERROR("Cannot apply operator ~ to float type"); break; case primitiveType::double_ : OCCA_FORCE_ERROR("Cannot apply operator ~ to double type"); break; default: ; } return primitive(); } primitive& primitive::leftIncrement(primitive &p) { switch(p.type) { case primitiveType::bool_ : OCCA_FORCE_ERROR("Cannot apply operator ++ to bool type"); break; case primitiveType::int8_ : ++p.value.int8_; return p; case primitiveType::uint8_ : ++p.value.uint8_; return p; case primitiveType::int16_ : ++p.value.int16_; return p; case primitiveType::uint16_ : ++p.value.uint16_; return p; case primitiveType::int32_ : ++p.value.int32_; return p; case primitiveType::uint32_ : ++p.value.uint32_; return p; case primitiveType::int64_ : ++p.value.int64_; return p; case primitiveType::uint64_ : ++p.value.uint64_; return p; case primitiveType::float_ : ++p.value.float_; return p; case primitiveType::double_ : ++p.value.double_; return p; default: ; } return p; } primitive& primitive::leftDecrement(primitive &p) { switch(p.type) { case primitiveType::bool_ : OCCA_FORCE_ERROR("Cannot apply operator -- to bool type"); break; case primitiveType::int8_ : --p.value.int8_; return p; case primitiveType::uint8_ : --p.value.uint8_; return p; case primitiveType::int16_ : --p.value.int16_; return p; case primitiveType::uint16_ : --p.value.uint16_; return p; case primitiveType::int32_ : --p.value.int32_; return p; case primitiveType::uint32_ : --p.value.uint32_; return p; case primitiveType::int64_ : --p.value.int64_; return p; case primitiveType::uint64_ : --p.value.uint64_; return p; case primitiveType::float_ : --p.value.float_; return p; case primitiveType::double_ : --p.value.double_; return p; default: ; } return p; } primitive primitive::rightIncrement(primitive &p) { primitive oldP = p; switch(p.type) { case primitiveType::bool_ : OCCA_FORCE_ERROR("Cannot apply operator ++ to bool type"); break; case primitiveType::int8_ : p.value.int8_++; return oldP; case primitiveType::uint8_ : p.value.uint8_++; return oldP; case primitiveType::int16_ : p.value.int16_++; return oldP; case primitiveType::uint16_ : p.value.uint16_++; return oldP; case primitiveType::int32_ : p.value.int32_++; return oldP; case primitiveType::uint32_ : p.value.uint32_++; return oldP; case primitiveType::int64_ : p.value.int64_++; return oldP; case primitiveType::uint64_ : p.value.uint64_++; return oldP; case primitiveType::float_ : p.value.float_++; return oldP; case primitiveType::double_ : p.value.double_++; return oldP; default: ; } return oldP; } primitive primitive::rightDecrement(primitive &p) { primitive oldP = p; switch(p.type) { case primitiveType::bool_ : OCCA_FORCE_ERROR("Cannot apply operator -- to bool type"); break; case primitiveType::int8_ : p.value.int8_--; return oldP; case primitiveType::uint8_ : p.value.uint8_--; return oldP; case primitiveType::int16_ : p.value.int16_--; return oldP; case primitiveType::uint16_ : p.value.uint16_--; return oldP; case primitiveType::int32_ : p.value.int32_--; return oldP; case primitiveType::uint32_ : p.value.uint32_--; return oldP; case primitiveType::int64_ : p.value.int64_--; return oldP; case primitiveType::uint64_ : p.value.uint64_--; return oldP; case primitiveType::float_ : p.value.float_--; return oldP; case primitiveType::double_ : p.value.double_--; return oldP; default: ; } return oldP; } //==================================== //---[ Boolean Operators ]------------ primitive primitive::lessThan(const primitive &a, const primitive &b) { const int retType = (a.type > b.type) ? a.type : b.type; switch(retType) { case primitiveType::bool_ : return primitive(a.to<bool>() < b.to<bool>()); case primitiveType::int8_ : return primitive(a.to<int8_t>() < b.to<int8_t>()); case primitiveType::uint8_ : return primitive(a.to<uint8_t>() < b.to<uint8_t>()); case primitiveType::int16_ : return primitive(a.to<int16_t>() < b.to<int16_t>()); case primitiveType::uint16_ : return primitive(a.to<uint16_t>() < b.to<uint16_t>()); case primitiveType::int32_ : return primitive(a.to<int32_t>() < b.to<int32_t>()); case primitiveType::uint32_ : return primitive(a.to<uint32_t>() < b.to<uint32_t>()); case primitiveType::int64_ : return primitive(a.to<int64_t>() < b.to<int64_t>()); case primitiveType::uint64_ : return primitive(a.to<uint64_t>() < b.to<uint64_t>()); case primitiveType::float_ : return primitive(a.to<float>() < b.to<float>()); case primitiveType::double_ : return primitive(a.to<double>() < b.to<double>()); default: ; } return primitive(); } primitive primitive::lessThanEq(const primitive &a, const primitive &b) { const int retType = (a.type > b.type) ? a.type : b.type; switch(retType) { case primitiveType::bool_ : return primitive(a.to<bool>() <= b.to<bool>()); case primitiveType::int8_ : return primitive(a.to<int8_t>() <= b.to<int8_t>()); case primitiveType::uint8_ : return primitive(a.to<uint8_t>() <= b.to<uint8_t>()); case primitiveType::int16_ : return primitive(a.to<int16_t>() <= b.to<int16_t>()); case primitiveType::uint16_ : return primitive(a.to<uint16_t>() <= b.to<uint16_t>()); case primitiveType::int32_ : return primitive(a.to<int32_t>() <= b.to<int32_t>()); case primitiveType::uint32_ : return primitive(a.to<uint32_t>() <= b.to<uint32_t>()); case primitiveType::int64_ : return primitive(a.to<int64_t>() <= b.to<int64_t>()); case primitiveType::uint64_ : return primitive(a.to<uint64_t>() <= b.to<uint64_t>()); case primitiveType::float_ : return primitive(a.to<float>() <= b.to<float>()); case primitiveType::double_ : return primitive(a.to<double>() <= b.to<double>()); default: ; } return primitive(); } primitive primitive::equal(const primitive &a, const primitive &b) { const int retType = (a.type > b.type) ? a.type : b.type; switch(retType) { case primitiveType::bool_ : return primitive(a.to<bool>() == b.to<bool>()); case primitiveType::int8_ : return primitive(a.to<int8_t>() == b.to<int8_t>()); case primitiveType::uint8_ : return primitive(a.to<uint8_t>() == b.to<uint8_t>()); case primitiveType::int16_ : return primitive(a.to<int16_t>() == b.to<int16_t>()); case primitiveType::uint16_ : return primitive(a.to<uint16_t>() == b.to<uint16_t>()); case primitiveType::int32_ : return primitive(a.to<int32_t>() == b.to<int32_t>()); case primitiveType::uint32_ : return primitive(a.to<uint32_t>() == b.to<uint32_t>()); case primitiveType::int64_ : return primitive(a.to<int64_t>() == b.to<int64_t>()); case primitiveType::uint64_ : return primitive(a.to<uint64_t>() == b.to<uint64_t>()); case primitiveType::float_ : return primitive(areBitwiseEqual(a.value.float_, b.value.float_)); case primitiveType::double_ : return primitive(areBitwiseEqual(a.value.double_, b.value.double_)); default: ; } return primitive(); } primitive primitive::compare(const primitive &a, const primitive &b) { if (lessThan(a, b)) { return -1; } return greaterThan(a, b) ? 1 : 0; } primitive primitive::notEqual(const primitive &a, const primitive &b) { const int retType = (a.type > b.type) ? a.type : b.type; switch(retType) { case primitiveType::bool_ : return primitive(a.to<bool>() != b.to<bool>()); case primitiveType::int8_ : return primitive(a.to<int8_t>() != b.to<int8_t>()); case primitiveType::uint8_ : return primitive(a.to<uint8_t>() != b.to<uint8_t>()); case primitiveType::int16_ : return primitive(a.to<int16_t>() != b.to<int16_t>()); case primitiveType::uint16_ : return primitive(a.to<uint16_t>() != b.to<uint16_t>()); case primitiveType::int32_ : return primitive(a.to<int32_t>() != b.to<int32_t>()); case primitiveType::uint32_ : return primitive(a.to<uint32_t>() != b.to<uint32_t>()); case primitiveType::int64_ : return primitive(a.to<int64_t>() != b.to<int64_t>()); case primitiveType::uint64_ : return primitive(a.to<uint64_t>() != b.to<uint64_t>()); case primitiveType::float_ : return primitive(!areBitwiseEqual(a.value.float_, b.value.float_)); case primitiveType::double_ : return primitive(!areBitwiseEqual(a.value.double_, b.value.double_)); default: ; } return primitive(); } primitive primitive::greaterThanEq(const primitive &a, const primitive &b) { const int retType = (a.type > b.type) ? a.type : b.type; switch(retType) { case primitiveType::bool_ : return primitive(a.to<bool>() >= b.to<bool>()); case primitiveType::int8_ : return primitive(a.to<int8_t>() >= b.to<int8_t>()); case primitiveType::uint8_ : return primitive(a.to<uint8_t>() >= b.to<uint8_t>()); case primitiveType::int16_ : return primitive(a.to<int16_t>() >= b.to<int16_t>()); case primitiveType::uint16_ : return primitive(a.to<uint16_t>() >= b.to<uint16_t>()); case primitiveType::int32_ : return primitive(a.to<int32_t>() >= b.to<int32_t>()); case primitiveType::uint32_ : return primitive(a.to<uint32_t>() >= b.to<uint32_t>()); case primitiveType::int64_ : return primitive(a.to<int64_t>() >= b.to<int64_t>()); case primitiveType::uint64_ : return primitive(a.to<uint64_t>() >= b.to<uint64_t>()); case primitiveType::float_ : return primitive(a.to<float>() >= b.to<float>()); case primitiveType::double_ : return primitive(a.to<double>() >= b.to<double>()); default: ; } return primitive(); } primitive primitive::greaterThan(const primitive &a, const primitive &b) { const int retType = (a.type > b.type) ? a.type : b.type; switch(retType) { case primitiveType::bool_ : return primitive(a.to<bool>() > b.to<bool>()); case primitiveType::int8_ : return primitive(a.to<int8_t>() > b.to<int8_t>()); case primitiveType::uint8_ : return primitive(a.to<uint8_t>() > b.to<uint8_t>()); case primitiveType::int16_ : return primitive(a.to<int16_t>() > b.to<int16_t>()); case primitiveType::uint16_ : return primitive(a.to<uint16_t>() > b.to<uint16_t>()); case primitiveType::int32_ : return primitive(a.to<int32_t>() > b.to<int32_t>()); case primitiveType::uint32_ : return primitive(a.to<uint32_t>() > b.to<uint32_t>()); case primitiveType::int64_ : return primitive(a.to<int64_t>() > b.to<int64_t>()); case primitiveType::uint64_ : return primitive(a.to<uint64_t>() > b.to<uint64_t>()); case primitiveType::float_ : return primitive(a.to<float>() > b.to<float>()); case primitiveType::double_ : return primitive(a.to<double>() > b.to<double>()); default: ; } return primitive(); } primitive primitive::and_(const primitive &a, const primitive &b) { const int retType = (a.type > b.type) ? a.type : b.type; switch(retType) { case primitiveType::bool_ : return primitive(a.to<bool>() && b.to<bool>()); case primitiveType::int8_ : return primitive(a.to<int8_t>() && b.to<int8_t>()); case primitiveType::uint8_ : return primitive(a.to<uint8_t>() && b.to<uint8_t>()); case primitiveType::int16_ : return primitive(a.to<int16_t>() && b.to<int16_t>()); case primitiveType::uint16_ : return primitive(a.to<uint16_t>() && b.to<uint16_t>()); case primitiveType::int32_ : return primitive(a.to<int32_t>() && b.to<int32_t>()); case primitiveType::uint32_ : return primitive(a.to<uint32_t>() && b.to<uint32_t>()); case primitiveType::int64_ : return primitive(a.to<int64_t>() && b.to<int64_t>()); case primitiveType::uint64_ : return primitive(a.to<uint64_t>() && b.to<uint64_t>()); case primitiveType::float_ : OCCA_FORCE_ERROR("Cannot apply operator && to float type"); break; case primitiveType::double_ : OCCA_FORCE_ERROR("Cannot apply operator && to double type"); break; default: ; } return primitive(); } primitive primitive::or_(const primitive &a, const primitive &b) { const int retType = (a.type > b.type) ? a.type : b.type; switch(retType) { case primitiveType::bool_ : return primitive(a.to<bool>() || b.to<bool>()); case primitiveType::int8_ : return primitive(a.to<int8_t>() || b.to<int8_t>()); case primitiveType::uint8_ : return primitive(a.to<uint8_t>() || b.to<uint8_t>()); case primitiveType::int16_ : return primitive(a.to<int16_t>() || b.to<int16_t>()); case primitiveType::uint16_ : return primitive(a.to<uint16_t>() || b.to<uint16_t>()); case primitiveType::int32_ : return primitive(a.to<int32_t>() || b.to<int32_t>()); case primitiveType::uint32_ : return primitive(a.to<uint32_t>() || b.to<uint32_t>()); case primitiveType::int64_ : return primitive(a.to<int64_t>() || b.to<int64_t>()); case primitiveType::uint64_ : return primitive(a.to<uint64_t>() || b.to<uint64_t>()); case primitiveType::float_ : OCCA_FORCE_ERROR("Cannot apply operator || to float type"); break; case primitiveType::double_ : OCCA_FORCE_ERROR("Cannot apply operator || to double type"); break; default: ; } return primitive(); } //==================================== //---[ Binary Operators ]------------- primitive primitive::mult(const primitive &a, const primitive &b) { const int retType = (a.type > b.type) ? a.type : b.type; switch(retType) { case primitiveType::bool_ : return primitive(a.to<bool>() * b.to<bool>()); case primitiveType::int8_ : return primitive(a.to<int8_t>() * b.to<int8_t>()); case primitiveType::uint8_ : return primitive(a.to<uint8_t>() * b.to<uint8_t>()); case primitiveType::int16_ : return primitive(a.to<int16_t>() * b.to<int16_t>()); case primitiveType::uint16_ : return primitive(a.to<uint16_t>() * b.to<uint16_t>()); case primitiveType::int32_ : return primitive(a.to<int32_t>() * b.to<int32_t>()); case primitiveType::uint32_ : return primitive(a.to<uint32_t>() * b.to<uint32_t>()); case primitiveType::int64_ : return primitive(a.to<int64_t>() * b.to<int64_t>()); case primitiveType::uint64_ : return primitive(a.to<uint64_t>() * b.to<uint64_t>()); case primitiveType::float_ : return primitive(a.to<float>() * b.to<float>()); case primitiveType::double_ : return primitive(a.to<double>() * b.to<double>()); default: ; } return primitive(); } primitive primitive::add(const primitive &a, const primitive &b) { const int retType = (a.type > b.type) ? a.type : b.type; switch(retType) { case primitiveType::bool_ : return primitive(a.to<bool>() + b.to<bool>()); case primitiveType::int8_ : return primitive(a.to<int8_t>() + b.to<int8_t>()); case primitiveType::uint8_ : return primitive(a.to<uint8_t>() + b.to<uint8_t>()); case primitiveType::int16_ : return primitive(a.to<int16_t>() + b.to<int16_t>()); case primitiveType::uint16_ : return primitive(a.to<uint16_t>() + b.to<uint16_t>()); case primitiveType::int32_ : return primitive(a.to<int32_t>() + b.to<int32_t>()); case primitiveType::uint32_ : return primitive(a.to<uint32_t>() + b.to<uint32_t>()); case primitiveType::int64_ : return primitive(a.to<int64_t>() + b.to<int64_t>()); case primitiveType::uint64_ : return primitive(a.to<uint64_t>() + b.to<uint64_t>()); case primitiveType::float_ : return primitive(a.to<float>() + b.to<float>()); case primitiveType::double_ : return primitive(a.to<double>() + b.to<double>()); default: ; } return primitive(); } primitive primitive::sub(const primitive &a, const primitive &b) { const int retType = (a.type > b.type) ? a.type : b.type; switch(retType) { case primitiveType::bool_ : return primitive(a.to<bool>() - b.to<bool>()); case primitiveType::int8_ : return primitive(a.to<int8_t>() - b.to<int8_t>()); case primitiveType::uint8_ : return primitive(a.to<uint8_t>() - b.to<uint8_t>()); case primitiveType::int16_ : return primitive(a.to<int16_t>() - b.to<int16_t>()); case primitiveType::uint16_ : return primitive(a.to<uint16_t>() - b.to<uint16_t>()); case primitiveType::int32_ : return primitive(a.to<int32_t>() - b.to<int32_t>()); case primitiveType::uint32_ : return primitive(a.to<uint32_t>() - b.to<uint32_t>()); case primitiveType::int64_ : return primitive(a.to<int64_t>() - b.to<int64_t>()); case primitiveType::uint64_ : return primitive(a.to<uint64_t>() - b.to<uint64_t>()); case primitiveType::float_ : return primitive(a.to<float>() - b.to<float>()); case primitiveType::double_ : return primitive(a.to<double>() - b.to<double>()); default: ; } return primitive(); } primitive primitive::div(const primitive &a, const primitive &b) { const int retType = (a.type > b.type) ? a.type : b.type; switch(retType) { case primitiveType::bool_ : return primitive(a.to<bool>() / b.to<bool>()); case primitiveType::int8_ : return primitive(a.to<int8_t>() / b.to<int8_t>()); case primitiveType::uint8_ : return primitive(a.to<uint8_t>() / b.to<uint8_t>()); case primitiveType::int16_ : return primitive(a.to<int16_t>() / b.to<int16_t>()); case primitiveType::uint16_ : return primitive(a.to<uint16_t>() / b.to<uint16_t>()); case primitiveType::int32_ : return primitive(a.to<int32_t>() / b.to<int32_t>()); case primitiveType::uint32_ : return primitive(a.to<uint32_t>() / b.to<uint32_t>()); case primitiveType::int64_ : return primitive(a.to<int64_t>() / b.to<int64_t>()); case primitiveType::uint64_ : return primitive(a.to<uint64_t>() / b.to<uint64_t>()); case primitiveType::float_ : return primitive(a.to<float>() / b.to<float>()); case primitiveType::double_ : return primitive(a.to<double>() / b.to<double>()); default: ; } return primitive(); } primitive primitive::mod(const primitive &a, const primitive &b) { const int retType = (a.type > b.type) ? a.type : b.type; switch(retType) { case primitiveType::bool_ : return primitive(a.to<bool>() % b.to<bool>()); case primitiveType::int8_ : return primitive(a.to<int8_t>() % b.to<int8_t>()); case primitiveType::uint8_ : return primitive(a.to<uint8_t>() % b.to<uint8_t>()); case primitiveType::int16_ : return primitive(a.to<int16_t>() % b.to<int16_t>()); case primitiveType::uint16_ : return primitive(a.to<uint16_t>() % b.to<uint16_t>()); case primitiveType::int32_ : return primitive(a.to<int32_t>() % b.to<int32_t>()); case primitiveType::uint32_ : return primitive(a.to<uint32_t>() % b.to<uint32_t>()); case primitiveType::int64_ : return primitive(a.to<int64_t>() % b.to<int64_t>()); case primitiveType::uint64_ : return primitive(a.to<uint64_t>() % b.to<uint64_t>()); case primitiveType::float_ : OCCA_FORCE_ERROR("Cannot apply operator % to float type"); break; case primitiveType::double_ : OCCA_FORCE_ERROR("Cannot apply operator % to double type"); break; default: ; } return primitive(); } primitive primitive::bitAnd(const primitive &a, const primitive &b) { const int retType = (a.type > b.type) ? a.type : b.type; switch(retType) { case primitiveType::bool_ : return primitive(a.to<bool>() & b.to<bool>()); case primitiveType::int8_ : return primitive(a.to<int8_t>() & b.to<int8_t>()); case primitiveType::uint8_ : return primitive(a.to<uint8_t>() & b.to<uint8_t>()); case primitiveType::int16_ : return primitive(a.to<int16_t>() & b.to<int16_t>()); case primitiveType::uint16_ : return primitive(a.to<uint16_t>() & b.to<uint16_t>()); case primitiveType::int32_ : return primitive(a.to<int32_t>() & b.to<int32_t>()); case primitiveType::uint32_ : return primitive(a.to<uint32_t>() & b.to<uint32_t>()); case primitiveType::int64_ : return primitive(a.to<int64_t>() & b.to<int64_t>()); case primitiveType::uint64_ : return primitive(a.to<uint64_t>() & b.to<uint64_t>()); case primitiveType::float_ : OCCA_FORCE_ERROR("Cannot apply operator & to float type"); break; case primitiveType::double_ : OCCA_FORCE_ERROR("Cannot apply operator & to double type"); break; default: ; } return primitive(); } primitive primitive::bitOr(const primitive &a, const primitive &b) { const int retType = (a.type > b.type) ? a.type : b.type; switch(retType) { case primitiveType::bool_ : return primitive(a.to<bool>() | b.to<bool>()); case primitiveType::int8_ : return primitive(a.to<int8_t>() | b.to<int8_t>()); case primitiveType::uint8_ : return primitive(a.to<uint8_t>() | b.to<uint8_t>()); case primitiveType::int16_ : return primitive(a.to<int16_t>() | b.to<int16_t>()); case primitiveType::uint16_ : return primitive(a.to<uint16_t>() | b.to<uint16_t>()); case primitiveType::int32_ : return primitive(a.to<int32_t>() | b.to<int32_t>()); case primitiveType::uint32_ : return primitive(a.to<uint32_t>() | b.to<uint32_t>()); case primitiveType::int64_ : return primitive(a.to<int64_t>() | b.to<int64_t>()); case primitiveType::uint64_ : return primitive(a.to<uint64_t>() | b.to<uint64_t>()); case primitiveType::float_ : OCCA_FORCE_ERROR("Cannot apply operator | to float type"); break; case primitiveType::double_ : OCCA_FORCE_ERROR("Cannot apply operator | to double type"); break; default: ; } return primitive(); } primitive primitive::xor_(const primitive &a, const primitive &b) { const int retType = (a.type > b.type) ? a.type : b.type; switch(retType) { case primitiveType::bool_ : return primitive(a.to<bool>() ^ b.to<bool>()); case primitiveType::int8_ : return primitive(a.to<int8_t>() ^ b.to<int8_t>()); case primitiveType::uint8_ : return primitive(a.to<uint8_t>() ^ b.to<uint8_t>()); case primitiveType::int16_ : return primitive(a.to<int16_t>() ^ b.to<int16_t>()); case primitiveType::uint16_ : return primitive(a.to<uint16_t>() ^ b.to<uint16_t>()); case primitiveType::int32_ : return primitive(a.to<int32_t>() ^ b.to<int32_t>()); case primitiveType::uint32_ : return primitive(a.to<uint32_t>() ^ b.to<uint32_t>()); case primitiveType::int64_ : return primitive(a.to<int64_t>() ^ b.to<int64_t>()); case primitiveType::uint64_ : return primitive(a.to<uint64_t>() ^ b.to<uint64_t>()); case primitiveType::float_ : OCCA_FORCE_ERROR("Cannot apply operator ^ to float type"); break; case primitiveType::double_ : OCCA_FORCE_ERROR("Cannot apply operator ^ to double type"); break; default: ; } return primitive(); } primitive primitive::rightShift(const primitive &a, const primitive &b) { const int retType = (a.type > b.type) ? a.type : b.type; switch(retType) { case primitiveType::bool_ : return primitive(a.to<bool>() >> b.to<bool>()); case primitiveType::int8_ : return primitive(a.to<int8_t>() >> b.to<int8_t>()); case primitiveType::uint8_ : return primitive(a.to<uint8_t>() >> b.to<uint8_t>()); case primitiveType::int16_ : return primitive(a.to<int16_t>() >> b.to<int16_t>()); case primitiveType::uint16_ : return primitive(a.to<uint16_t>() >> b.to<uint16_t>()); case primitiveType::int32_ : return primitive(a.to<int32_t>() >> b.to<int32_t>()); case primitiveType::uint32_ : return primitive(a.to<uint32_t>() >> b.to<uint32_t>()); case primitiveType::int64_ : return primitive(a.to<int64_t>() >> b.to<int64_t>()); case primitiveType::uint64_ : return primitive(a.to<uint64_t>() >> b.to<uint64_t>()); case primitiveType::float_ : OCCA_FORCE_ERROR("Cannot apply operator >> to float type"); break; case primitiveType::double_ : OCCA_FORCE_ERROR("Cannot apply operator >> to double type"); break; default: ; } return primitive(); } primitive primitive::leftShift(const primitive &a, const primitive &b) { const int retType = (a.type > b.type) ? a.type : b.type; switch(retType) { case primitiveType::bool_ : return primitive(a.to<bool>() << b.to<bool>()); case primitiveType::int8_ : return primitive(a.to<int8_t>() << b.to<int8_t>()); case primitiveType::uint8_ : return primitive(a.to<uint8_t>() << b.to<uint8_t>()); case primitiveType::int16_ : return primitive(a.to<int16_t>() << b.to<int16_t>()); case primitiveType::uint16_ : return primitive(a.to<uint16_t>() << b.to<uint16_t>()); case primitiveType::int32_ : return primitive(a.to<int32_t>() << b.to<int32_t>()); case primitiveType::uint32_ : return primitive(a.to<uint32_t>() << b.to<uint32_t>()); case primitiveType::int64_ : return primitive(a.to<int64_t>() << b.to<int64_t>()); case primitiveType::uint64_ : return primitive(a.to<uint64_t>() << b.to<uint64_t>()); case primitiveType::float_ : OCCA_FORCE_ERROR("Cannot apply operator << to float type"); break; case primitiveType::double_ : OCCA_FORCE_ERROR("Cannot apply operator << to double type"); break; default: ; } return primitive(); } //==================================== //---[ Assignment Operators ]--------- primitive& primitive::assign(primitive &a, const primitive &b) { a = b; return a; } primitive& primitive::multEq(primitive &a, const primitive &b) { const int retType = (a.type > b.type) ? a.type : b.type; switch(retType) { case primitiveType::bool_ : a = (a.to<bool>() * b.to<bool>()); break; case primitiveType::int8_ : a = (a.to<int8_t>() * b.to<int8_t>()); break; case primitiveType::uint8_ : a = (a.to<uint8_t>() * b.to<uint8_t>()); break; case primitiveType::int16_ : a = (a.to<int16_t>() * b.to<int16_t>()); break; case primitiveType::uint16_ : a = (a.to<uint16_t>() * b.to<uint16_t>()); break; case primitiveType::int32_ : a = (a.to<int32_t>() * b.to<int32_t>()); break; case primitiveType::uint32_ : a = (a.to<uint32_t>() * b.to<uint32_t>()); break; case primitiveType::int64_ : a = (a.to<int64_t>() * b.to<int64_t>()); break; case primitiveType::uint64_ : a = (a.to<uint64_t>() * b.to<uint64_t>()); break; case primitiveType::float_ : a = (a.to<float>() * b.to<float>()); break; case primitiveType::double_ : a = (a.to<double>() * b.to<double>()); break; default: ; } return a; } primitive& primitive::addEq(primitive &a, const primitive &b) { const int retType = (a.type > b.type) ? a.type : b.type; switch(retType) { case primitiveType::bool_ : a = (a.to<bool>() + b.to<bool>()); break; case primitiveType::int8_ : a = (a.to<int8_t>() + b.to<int8_t>()); break; case primitiveType::uint8_ : a = (a.to<uint8_t>() + b.to<uint8_t>()); break; case primitiveType::int16_ : a = (a.to<int16_t>() + b.to<int16_t>()); break; case primitiveType::uint16_ : a = (a.to<uint16_t>() + b.to<uint16_t>()); break; case primitiveType::int32_ : a = (a.to<int32_t>() + b.to<int32_t>()); break; case primitiveType::uint32_ : a = (a.to<uint32_t>() + b.to<uint32_t>()); break; case primitiveType::int64_ : a = (a.to<int64_t>() + b.to<int64_t>()); break; case primitiveType::uint64_ : a = (a.to<uint64_t>() + b.to<uint64_t>()); break; case primitiveType::float_ : a = (a.to<float>() + b.to<float>()); break; case primitiveType::double_ : a = (a.to<double>() + b.to<double>()); break; default: ; } return a; } primitive& primitive::subEq(primitive &a, const primitive &b) { const int retType = (a.type > b.type) ? a.type : b.type; switch(retType) { case primitiveType::bool_ : a = (a.to<bool>() - b.to<bool>()); break; case primitiveType::int8_ : a = (a.to<int8_t>() - b.to<int8_t>()); break; case primitiveType::uint8_ : a = (a.to<uint8_t>() - b.to<uint8_t>()); break; case primitiveType::int16_ : a = (a.to<int16_t>() - b.to<int16_t>()); break; case primitiveType::uint16_ : a = (a.to<uint16_t>() - b.to<uint16_t>()); break; case primitiveType::int32_ : a = (a.to<int32_t>() - b.to<int32_t>()); break; case primitiveType::uint32_ : a = (a.to<uint32_t>() - b.to<uint32_t>()); break; case primitiveType::int64_ : a = (a.to<int64_t>() - b.to<int64_t>()); break; case primitiveType::uint64_ : a = (a.to<uint64_t>() - b.to<uint64_t>()); break; case primitiveType::float_ : a = (a.to<float>() - b.to<float>()); break; case primitiveType::double_ : a = (a.to<double>() - b.to<double>()); break; default: ; } return a; } primitive& primitive::divEq(primitive &a, const primitive &b) { const int retType = (a.type > b.type) ? a.type : b.type; switch(retType) { case primitiveType::bool_ : a = (a.to<bool>() / b.to<bool>()); break; case primitiveType::int8_ : a = (a.to<int8_t>() / b.to<int8_t>()); break; case primitiveType::uint8_ : a = (a.to<uint8_t>() / b.to<uint8_t>()); break; case primitiveType::int16_ : a = (a.to<int16_t>() / b.to<int16_t>()); break; case primitiveType::uint16_ : a = (a.to<uint16_t>() / b.to<uint16_t>()); break; case primitiveType::int32_ : a = (a.to<int32_t>() / b.to<int32_t>()); break; case primitiveType::uint32_ : a = (a.to<uint32_t>() / b.to<uint32_t>()); break; case primitiveType::int64_ : a = (a.to<int64_t>() / b.to<int64_t>()); break; case primitiveType::uint64_ : a = (a.to<uint64_t>() / b.to<uint64_t>()); break; case primitiveType::float_ : a = (a.to<float>() / b.to<float>()); break; case primitiveType::double_ : a = (a.to<double>() / b.to<double>()); break; default: ; } return a; } primitive& primitive::modEq(primitive &a, const primitive &b) { const int retType = (a.type > b.type) ? a.type : b.type; switch(retType) { case primitiveType::bool_ : a = (a.to<bool>() % b.to<bool>()); break; case primitiveType::int8_ : a = (a.to<int8_t>() % b.to<int8_t>()); break; case primitiveType::uint8_ : a = (a.to<uint8_t>() % b.to<uint8_t>()); break; case primitiveType::int16_ : a = (a.to<int16_t>() % b.to<int16_t>()); break; case primitiveType::uint16_ : a = (a.to<uint16_t>() % b.to<uint16_t>()); break; case primitiveType::int32_ : a = (a.to<int32_t>() % b.to<int32_t>()); break; case primitiveType::uint32_ : a = (a.to<uint32_t>() % b.to<uint32_t>()); break; case primitiveType::int64_ : a = (a.to<int64_t>() % b.to<int64_t>()); break; case primitiveType::uint64_ : a = (a.to<uint64_t>() % b.to<uint64_t>()); break; case primitiveType::float_ : OCCA_FORCE_ERROR("Cannot apply operator % to float type"); break; case primitiveType::double_ : OCCA_FORCE_ERROR("Cannot apply operator % to double type"); break; default: ; } return a; } primitive& primitive::bitAndEq(primitive &a, const primitive &b) { const int retType = (a.type > b.type) ? a.type : b.type; switch(retType) { case primitiveType::bool_ : a = (a.to<bool>() & b.to<bool>()); break; case primitiveType::int8_ : a = (a.to<int8_t>() & b.to<int8_t>()); break; case primitiveType::uint8_ : a = (a.to<uint8_t>() & b.to<uint8_t>()); break; case primitiveType::int16_ : a = (a.to<int16_t>() & b.to<int16_t>()); break; case primitiveType::uint16_ : a = (a.to<uint16_t>() & b.to<uint16_t>()); break; case primitiveType::int32_ : a = (a.to<int32_t>() & b.to<int32_t>()); break; case primitiveType::uint32_ : a = (a.to<uint32_t>() & b.to<uint32_t>()); break; case primitiveType::int64_ : a = (a.to<int64_t>() & b.to<int64_t>()); break; case primitiveType::uint64_ : a = (a.to<uint64_t>() & b.to<uint64_t>()); break; case primitiveType::float_ : OCCA_FORCE_ERROR("Cannot apply operator & to float type"); break; case primitiveType::double_ : OCCA_FORCE_ERROR("Cannot apply operator & to double type"); break; default: ; } return a; } primitive& primitive::bitOrEq(primitive &a, const primitive &b) { const int retType = (a.type > b.type) ? a.type : b.type; switch(retType) { case primitiveType::bool_ : a = (a.to<bool>() | b.to<bool>()); break; case primitiveType::int8_ : a = (a.to<int8_t>() | b.to<int8_t>()); break; case primitiveType::uint8_ : a = (a.to<uint8_t>() | b.to<uint8_t>()); break; case primitiveType::int16_ : a = (a.to<int16_t>() | b.to<int16_t>()); break; case primitiveType::uint16_ : a = (a.to<uint16_t>() | b.to<uint16_t>()); break; case primitiveType::int32_ : a = (a.to<int32_t>() | b.to<int32_t>()); break; case primitiveType::uint32_ : a = (a.to<uint32_t>() | b.to<uint32_t>()); break; case primitiveType::int64_ : a = (a.to<int64_t>() | b.to<int64_t>()); break; case primitiveType::uint64_ : a = (a.to<uint64_t>() | b.to<uint64_t>()); break; case primitiveType::float_ : OCCA_FORCE_ERROR("Cannot apply operator | to float type"); break; case primitiveType::double_ : OCCA_FORCE_ERROR("Cannot apply operator | to double type"); break; default: ; } return a; } primitive& primitive::xorEq(primitive &a, const primitive &b) { const int retType = (a.type > b.type) ? a.type : b.type; switch(retType) { case primitiveType::bool_ : a = (a.to<bool>() ^ b.to<bool>()); break; case primitiveType::int8_ : a = (a.to<int8_t>() ^ b.to<int8_t>()); break; case primitiveType::uint8_ : a = (a.to<uint8_t>() ^ b.to<uint8_t>()); break; case primitiveType::int16_ : a = (a.to<int16_t>() ^ b.to<int16_t>()); break; case primitiveType::uint16_ : a = (a.to<uint16_t>() ^ b.to<uint16_t>()); break; case primitiveType::int32_ : a = (a.to<int32_t>() ^ b.to<int32_t>()); break; case primitiveType::uint32_ : a = (a.to<uint32_t>() ^ b.to<uint32_t>()); break; case primitiveType::int64_ : a = (a.to<int64_t>() ^ b.to<int64_t>()); break; case primitiveType::uint64_ : a = (a.to<uint64_t>() ^ b.to<uint64_t>()); break; case primitiveType::float_ : OCCA_FORCE_ERROR("Cannot apply operator ^ to float type"); break; case primitiveType::double_ : OCCA_FORCE_ERROR("Cannot apply operator ^ to double type"); break; default: ; } return a; } primitive& primitive::rightShiftEq(primitive &a, const primitive &b) { const int retType = (a.type > b.type) ? a.type : b.type; switch(retType) { case primitiveType::bool_ : a = (a.to<bool>() >> b.to<bool>()); break; case primitiveType::int8_ : a = (a.to<int8_t>() >> b.to<int8_t>()); break; case primitiveType::uint8_ : a = (a.to<uint8_t>() >> b.to<uint8_t>()); break; case primitiveType::int16_ : a = (a.to<int16_t>() >> b.to<int16_t>()); break; case primitiveType::uint16_ : a = (a.to<uint16_t>() >> b.to<uint16_t>()); break; case primitiveType::int32_ : a = (a.to<int32_t>() >> b.to<int32_t>()); break; case primitiveType::uint32_ : a = (a.to<uint32_t>() >> b.to<uint32_t>()); break; case primitiveType::int64_ : a = (a.to<int64_t>() >> b.to<int64_t>()); break; case primitiveType::uint64_ : a = (a.to<uint64_t>() >> b.to<uint64_t>()); break; case primitiveType::float_ : OCCA_FORCE_ERROR("Cannot apply operator >> to float type"); break; case primitiveType::double_ : OCCA_FORCE_ERROR("Cannot apply operator >> to double type"); break; default: ; } return a; } primitive& primitive::leftShiftEq(primitive &a, const primitive &b) { const int retType = (a.type > b.type) ? a.type : b.type; switch(retType) { case primitiveType::bool_ : a = (a.to<bool>() << b.to<bool>()); break; case primitiveType::int8_ : a = (a.to<int8_t>() << b.to<int8_t>()); break; case primitiveType::uint8_ : a = (a.to<uint8_t>() << b.to<uint8_t>()); break; case primitiveType::int16_ : a = (a.to<int16_t>() << b.to<int16_t>()); break; case primitiveType::uint16_ : a = (a.to<uint16_t>() << b.to<uint16_t>()); break; case primitiveType::int32_ : a = (a.to<int32_t>() << b.to<int32_t>()); break; case primitiveType::uint32_ : a = (a.to<uint32_t>() << b.to<uint32_t>()); break; case primitiveType::int64_ : a = (a.to<int64_t>() << b.to<int64_t>()); break; case primitiveType::uint64_ : a = (a.to<uint64_t>() << b.to<uint64_t>()); break; case primitiveType::float_ : OCCA_FORCE_ERROR("Cannot apply operator << to float type"); break; case primitiveType::double_ : OCCA_FORCE_ERROR("Cannot apply operator << to double type"); break; default: ; } return a; } //==================================== io::output& operator << (io::output &out, const primitive &p) { out << p.toString(); return out; } }
libocca/occa
src/types/primitive.cpp
C++
mit
49,514
/** * pax * https://github.com/reekoheek/pax * * Copyright (c) 2013 PT Sagara Xinix Solusitama * Licensed under the MIT license. * https://github.com/reekoheek/pax/blob/master/LICENSE * * Composer command * */ var spawn = require('child_process').spawn, d = require('simply-deferred'); module.exports = function(pax, args, opts) { var deferred = d.Deferred(), packageFile = 'package.json'; var found = require('matchdep').filterDev('grunt-' + args[0], process.cwd() + '/' + packageFile); if (found.length <= 0) { var insDep = spawn('npm', ['install', 'grunt-' + args[0], '--save-dev'], {stdio: 'inherit'}); insDep.on('close', function(code) { if (code > 0) { deferred.reject(new Error('NPM error occured.')); } else { deferred.resolve(); } }); } else { pax.log.info(args[0], 'already exists.'); deferred.resolve(); } return deferred.promise(); };
krisanalfa/pax
lib/commands/grunt/add.js
JavaScript
mit
1,004
/* globals require module */ const modelRegistrator = require("./utils/model-registrator"); module.exports = modelRegistrator.register("Superhero", { name: { type: String, required: true }, secretIdentity: { type: String, required: true }, alignment: { type: String, required: true }, story: { type: String, required: true }, imageUrl: { type: String, required: true }, fractions: [{}], powers: [{}], city: {}, country: {}, planet: {}, user: {} });
Minkov/Superheroes-Universe
models/superhero-model.js
JavaScript
mit
594
var engine = require('../data.js'); var collection = engine.getCollection('posts'); var requiredKeys = ['title', 'markdown', 'body', 'slug', 'createdAt']; var requiredMessage = 'You must provide at least these keys: ' + requiredKeys.join(', '); function _dummyIndex(err, indexName) { if (err) { throw new Error(err); } console.log('Created', indexName); } collection.ensureIndex('slug', {unique: true}, _dummyIndex); collection.ensureIndex({createdAt: -1}, {w: 1}, _dummyIndex); collection.ensureIndex({tags: 1}, {_tiarr: true}, _dummyIndex); module.exports.list = listPosts; module.exports.listByDate = listPostsByDate; module.exports.listByTag = listPostsByTag; module.exports.get = getPost; module.exports.upsert = upsertPost; module.exports.create = createPost; module.exports.update = updatePost; module.exports.remove = removePost; module.exports.addComment = addComment; function dateLimit(year, month) { var MIN_MONTH = 1; var MAX_MONTH = 12; var currDate = new Date(); var hasMonth = Number.isFinite(month); var upper, lower; year = year || currDate.getFullYear(); month = month || currDate.getMonth(); if (hasMonth) { lower = year + '-' + month + '-1'; if (month + 1 > MAX_MONTH) { upper = (year + 1) + '-1-1'; } else { upper = year + '-' + (month + 1) + '-1'; } } else { lower = year + '-1-1'; upper = (year + 1) + '-1-1'; } return [new Date(Date.parse(lower)), new Date(Date.parse(upper))]; } function clone(original, edited) { var properties = ['title', 'body', 'markdown', 'tags']; properties.forEach(function (key) { original[key] = edited[key]; }); return original; } function validate(data) { var dataKeys = Object.keys(data); var hasKeys = requiredKeys.map(function (key) { return dataKeys.indexOf(key) > -1; }).reduce(function (accum, value) { return accum && value; }); return hasKeys; } function listPosts(options) { var page = options.page || 0; // posts per page var limit = options.limit || 5; // skip how many posts var skip = limit * page; collection.find( {}, { limit: limit, skip: skip, sort: {createdAt: -1} }, options.callback ); } function listPostsByTag(options) { collection.find( {tags: options.tag}, options.callback ); } function listPostsByDate(options) { var limits = dateLimit(options.year, options.month); collection.find( {publishAt: {$gt: limits[0], $lt: limits[1]}}, options.callback ); } function getPost(options) { collection.findOne({slug: options.slug}, options.callback); } function upsertPost(options) { collection.update( {slug: options.slug}, options.data, {upsert: true}, options.callback ); } function createPost(options) { if (!validate(options.data)) { return options.callback(new Error(requiredMessage)); } collection.insert(options.data, options.callback); } function updatePost(options) { getPost({ slug: options.slug, callback: function retrieved(err, item) { collection.update( {slug: options.slug}, clone(item, options.data), options.callback ); } }); } function removePost(options) { collection.remove({slug: options.slug}, options.callback); } function addComment(options) { getPost({ slug: options.slug, callback: function retrieved(err, item) { if (!item.comments) { item.comments = []; } item.comments.push(options.comment); item.comments = item.comments.sort(function sortByDate(a, b) { return b.createdAt.valueOf() - a.createdAt.valueOf(); }); collection.update( {slug: options.slug}, item, options.callback ); } }); }
joaodubas/blog
lib/data-post/index.js
JavaScript
mit
3,760
package edu.psu.sweng500.emrms.service; import edu.psu.sweng500.emrms.application.ApplicationSessionHelper; import edu.psu.sweng500.emrms.mappers.ChartingMapper; import edu.psu.sweng500.emrms.model.HAuditRecord; import edu.psu.sweng500.emrms.model.HProblem; import edu.psu.sweng500.emrms.util.PersonPatientUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; @Service("manageProblemService") public class ManageProblemServiceImpl implements ManageProblemService{ @Autowired private ChartingMapper chartingMapper; @Autowired private AuditEventService auditEventService; @Autowired private PersonPatientUtils patientUtils; @Autowired private ApplicationSessionHelper sessionHelper; public void setChartingMapper(ChartingMapper chartingMapper) { this.chartingMapper = chartingMapper; } @Override public int AddProblem(HProblem problem) { chartingMapper.addProblem(problem); HAuditRecord auditRecord = new HAuditRecord(); auditRecord.setEventName("Add Problem"); auditRecord.setUserId(sessionHelper.getPhysicianName()); auditRecord.setPolicyId(17); auditRecord.setPatient_ObjectID(problem.getPatientID()); auditRecord.setPatientName(patientUtils.getPatientName(problem.getPatientID())); auditRecord.setEncounter_ObjectID(problem.getEncObjectId()); auditEventService.auditEvent(auditRecord); return 0; } @Override public int ReviseProblem(HProblem problem) { chartingMapper.reviseProblem(problem); HAuditRecord auditRecord = new HAuditRecord(); auditRecord.setEventName("Revise Problem"); auditRecord.setUserId(sessionHelper.getPhysicianName()); auditRecord.setPolicyId(18); auditRecord.setPatient_ObjectID(problem.getPatientID()); auditRecord.setPatientName(patientUtils.getPatientName(problem.getPatientID())); auditRecord.setEncounter_ObjectID(problem.getEncObjectId()); auditEventService.auditEvent(auditRecord); return 0; } @Override public int DeleteProblem(HProblem problem) { chartingMapper.deleteProblem(problem); HAuditRecord auditRecord = new HAuditRecord(); auditRecord.setEventName("Delete Problem"); auditRecord.setUserId(sessionHelper.getPhysicianName()); auditRecord.setPolicyId(22); auditRecord.setPatient_ObjectID(problem.getPatientID()); auditRecord.setPatientName(patientUtils.getPatientName(problem.getPatientID())); auditRecord.setEncounter_ObjectID(problem.getEncObjectId()); auditEventService.auditEvent(auditRecord); return 0; } @Override public List<HProblem> GetProblemsList(int patientObjId, int encObjId) { return chartingMapper.getPatientProblemList(patientObjId,encObjId); } }
Nilbog21/EMRMS
src/main/java/edu/psu/sweng500/emrms/service/ManageProblemServiceImpl.java
Java
mit
2,947
#include "world/Obstacle.h" #include <math.h> using namespace manip_core; using namespace matrices; using namespace Eigen; Obstacle::Obstacle(const Vector3& p1, const Vector3& p2, const Vector3& p3, bool donttouch) : p1_(p1) , p2_(p2) , p3_(p3) , p4_(p1+ (p3 - p2)) , u_(p3-p1) , v_(p2-p1) , n_(u_.cross(v_)) , donttouch_(donttouch) ,onlyThreePoints_(true) { InitObstacle(); } Obstacle::Obstacle(const Vector3& p1, const Vector3& p2, const Vector3& p3, const Vector3& p4, bool donttouch) : p1_(p1) , p2_(p2) , p3_(p3) , p4_(p4) , u_(p3-p4) , v_(p1-p4) , n_(u_.cross(v_)) , donttouch_(donttouch) , onlyThreePoints_(false) { InitObstacle(); } void Obstacle::InitObstacle() { Vector3 normal = n_; a_ = (float)(normal.x()); b_ = (float)(normal.y()); c_ = (float)(normal.z()); //if (c_ < 0) c_ = -c_; norm_ = (float)(normal.norm()); normsquare_ = norm_ * norm_; d_ = (float)(-(a_ * p1_.x() + b_ * p1_.y() + c_ * p1_.z())); center_ = p1_ + ((p4_ - p1_) + (p2_ - p1_)) / 2 ; basis_ = Matrix4::Zero(); Vector3 x = (p3_ - p4_); x.normalize(); Vector3 y = (p1_ - p4_); y.normalize(); normal.normalize(); basis_.block(0,0,3,1) = x; basis_.block(0,1,3,1) = y; basis_.block(0,2,3,1) = normal; basis_.block(0,3,3,1) = p4_; basis_(3,3) = 1; basisInverse_ = basis_.inverse(); w_ = (float)((p3_ - p4_).norm()); h_ = (float)((p1_ - p4_).norm()); /*triangle1_ = tree::MakeTriangle(p1, p2, p3); triangle2_ = tree::MakeTriangle(p1, p4, p3);*/ } Obstacle::~Obstacle() { // NOTHING } numeric Obstacle::Distance(const Vector3& point, Vector3& getCoordinates) const { // http://fr.wikipedia.org/wiki/Distance_d%27un_point_%C3%A0_un_plan numeric lambda = - ((a_ * point.x() + b_ * point.y() + c_ * point.z() + d_) / normsquare_); getCoordinates(0) = lambda * a_ + point.x(); getCoordinates(1) = lambda * b_ + point.y(); getCoordinates(2) = lambda * c_ + point.z(); return (abs(lambda) * norm_); } bool Obstacle::IsAbove(const matrices::Vector3& point) const { Vector3 nNormal = n_; nNormal.normalize(); Vector3 projection; numeric distance = Distance(point, projection); return (point - ( projection + distance * nNormal )).norm() < 0.000000001; } const matrices::Vector3 Obstacle::ProjectUp(const matrices::Vector3& point) const// projects a points onto obstacle plan and rises it up a little { matrices::Vector3 res = matrices::matrix4TimesVect3(basisInverse_, point); matrices::Vector3 nNormal = n_; nNormal.normalize(); res(2) = nNormal(2) * 0.1; return matrices::matrix4TimesVect3(basis_, res); } //bool Obstacle::ContainsPlanar(const Vector3& point) const //{ // double xc, yc, zc; // xc = point(0); yc = point(1); // return ((xc > 0 && xc < w_) && // (yc > 0 && yc < h_) ; //}
stonneau/manipulabilityreduced
src/world/Obstacle.cpp
C++
mit
2,741
{% extends "base.html" %} {% block title %}{{ article.title }} - {{ SITENAME }}{% endblock %} {% block extra_meta %} <meta name="description" content="{{ article.summary|striptags }}"> {% if PELICAN_SOBER_TWITTER_CARD_CREATOR or PELICAN_SOBER_TWITTER_CARD_SITE %} <meta name="twitter:card" content="summary"> {% if PELICAN_SOBER_TWITTER_CARD_SITE %} <meta name="twitter:site" content="@{{ PELICAN_SOBER_TWITTER_CARD_SITE }}"> {% endif %} {% if PELICAN_SOBER_TWITTER_CARD_CREATOR %} <meta name="twitter:creator" content="@{{ PELICAN_SOBER_TWITTER_CARD_CREATOR }}"> {% endif %} <meta name="twitter:title" content="{{ article.title }}"> <meta name="twitter:description" content="{{ article.summary|striptags }}"> <meta name="twitter:url" content="{{ SITEURL }}/{{ article.url }}"> {% endif %} {% endblock %} {% block content %} <article class="full"> <h1>{{ article.title }}</h1> {% include 'metadata.inc.html' %} {{ article.content }} </article> {% if TWITTER_USERNAME %} <p> <a href="https://twitter.com/share" class="twitter-share-button" data-via="{{ TWITTER_USERNAME }}" data-lang="en" data-size="large" data-related="{{ TWITTER_USERNAME }}">Tweet</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> </p> {% endif %} {% if DISQUS_SITENAME and article.status != 'draft' %} <div class="comments"> <h2>Comments !</h2> <div id="disqus_thread"></div> <script type="text/javascript"> var disqus_identifier = "{{ article.url }}"; (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = '//{{ DISQUS_SITENAME }}.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })(); </script> </div> {% endif %} {% endblock %}
GenPage/pagefortress.com
theme/pelican-sober/templates/article.html
HTML
mit
2,071
--- layout: post title: "The Cruiser: The Scene and a First Image Rendered by Maxwell" date: 2014-08-14 11:48:08 categories: jekyll rendering maxwell --- This model was created by __Saba Rofchaei__ and __Greg Ward__ under contract from the U.S. Navy. It is an H-shaped deck space with three lighting configurations (see __README__ file and credits in the [repository][repo]). Here is a floor plan for the geometry visible in various camera perspectives: <img src="/assets/07_cruiser_plan.png" alt="Floor plan for the cruiser scene" width="650" class="img-thumbnail"/> <img src="/assets/07_cruiser_bow_in_elev.png" alt="Orthograhpic view for bow side (inwards)" width="650" class="img-thumbnail"/> <img src="/assets/07_cruiser_bow_out_elev.png" alt="Orthograhpic view for bow side (outwards)" width="650" class="img-thumbnail"/> <img src="/assets/07_cruiser_stern_in_elev.png" alt="Orthograhpic view for stern side (inwards)" width="650" class="img-thumbnail"/> <img src="/assets/07_cruiser_stern_out_elev.png" alt="Orthograhpic view for stern side (outwards)" width="650" class="img-thumbnail"/> The images above were rendered with the interactive [Radiance][radiance] viewer __rvu__ (see [man page][man_page]) and there is a __Makefile__ with a rule __view_all__ which can be used to render even more camera perspectives of the same scene. This assumes that you have Radiance installed on your computer. {% highlight tcsh %} % cd 07_cruiser/rad % make view_all {% endhighlight %} The import into [Blender][blender] was not fully automated, but I step by step imported geometry into Blender, cleaned up (e.g. by combining several meshes into a single mesh), and slowly assembled the full scene by mirroring geometry from one side of the ship to the other. There are still __textures missing__ and the text used on signs etc. has to be either modelled or replaced by textures. Anyway, here is a rendering done with [Maxwell][maxwell] using [depth of field][wikipedia]: <img src="/assets/07_cruiser_maxwell_port_bow_stairs.png" alt="First image rendered by Maxwell" width="650" class="img-thumbnail"/> [repo]: https://github.com/wahn/export_multi/tree/master/07_cruiser [radiance]: https://en.wikipedia.org/wiki/Radiance_%28software%29 [man_page]: http://radsite.lbl.gov/radiance/man_html/rvu.1.html [blender]: http://www.blender.org [maxwell]: http://www.maxwellrender.com [wikipedia]: https://en.wikipedia.org/wiki/Depth_of_field
wahn/jan_walter_org
_posts/2014-08-15-cruiser-maxwell.markdown
Markdown
mit
2,455
#include <stdlib.h> #include <stdio.h> #include <ctype.h> #include <string.h> #include <time.h> #include <stdarg.h> #include "debugmalloc.h" /* ervenytelenitjuk ezeket a makrokat, mert nekunk az igazi malloc/free kell */ #ifdef malloc #undef malloc #endif #ifdef free #undef free #endif #ifdef calloc #undef calloc #endif #ifdef realloc #undef realloc #endif /* a kanari merete, bajtokban */ static size_t const kanari_meret=128; /* a kanari karakter */ static unsigned char const kanari='K'; /* csak egy kis veletlenszam-generator. * direkt van egy sajat, hogy a szabvany rand() belso allapotat * ne zavarja meg a sajat malloc. * * klasszikus. :D */ static unsigned char debugmalloc_random() { static unsigned int seed_1=0x00, seed_2=0x1e; unsigned int temp_1, temp_2; unsigned int carry, result; temp_1=(seed_1&0x0001) << 7; temp_2=(seed_2 >> 1)&0x007F; result=(seed_2)+((seed_2&0x0001) << 7); carry=(result >> 8); result=result&0x00FF; result=result+carry+0x13; carry=(result >> 8); seed_2=result&0x00FF; result=seed_1+carry+temp_1; carry=(result >> 8); result=result&0x00FF; result=result+carry+temp_2; seed_1=result&0x00FF; return seed_1; } /* a lefoglalt teruleteket nyilvantarto lista. */ typedef struct Lefoglalt { void *valodi; /* ezt mallocoltuk mi */ void *usernek; /* ezt mutatjuk a juzernek */ size_t meret; /* ekkora teruletet kert a juzer. */ char fv[16]; /* foglalo fuggveny */ char cel[128]; /* a mallocnak ezt a kifejezest adta */ char file[64]; /* ebben a fajlban tortent a foglalas */ unsigned line; /* a fajlnak ebben a soraban */ struct Lefoglalt *prev, *next; /* duplan lancolt listahoz */ } Lefoglalt; static Lefoglalt eleje, vege; /* strazsak. statikusan, hogy ne kelljen freezni :) */ static Lefoglalt *lista=NULL; /* maga a lista; a pointer az eleje strazsara fog mutatni */ static char logfile[256]=""; /* ide logol */ /* a naplozofajl nevet allitja be. ha ures, stderr-re fog naplozni. */ void debugmalloc_naplofajl(char const *nev) { strncpy(logfile, nev, sizeof(logfile)); logfile[sizeof(logfile)-1]=0; } /* elodeklaracio az init() fv. szamara */ static void debugmalloc_programvegi_dump(); /* letrehozza a listat. a sajat malloc hivja egyszer, az elso meghivasakor. * a lista pointer (lista) inditaskori erteke NULL, de lesznek strazsak. * innen lehet tudni, hogy mar hivodott-e. * a strazsakat statikusan hoztam letre; vagyis ha inicializalva van mar a * lista, de a juzer meg nem foglalt memoriat, akkor nincs mallocolva * semmi! emiatt biztosan nem memleakel ez a program pluszban, ha a juzer * programja nem memleakelt. */ static void debugmalloc_init() { eleje.prev=NULL; eleje.next=&vege; vege.prev=&eleje; vege.next=NULL; lista=&eleje; eleje.valodi=eleje.usernek=NULL; vege.valodi=vege.usernek=NULL; atexit(debugmalloc_programvegi_dump); } /* printfel a megadott fajlba, vagy stderr-re. */ static int debugmalloc_printf(char const *format, ...) { va_list ap; int chars; FILE *f=stderr; if (strcmp(logfile, "")!=0) { f=fopen(logfile, "at"); if (f==NULL) { f=stderr; fprintf(stderr, "debugmalloc: nem tudom megnyitni a %s fajlt irasra!\n", logfile); } } va_start(ap, format); chars=vfprintf(f, format, ap); va_end(ap); if (f!=stderr) fclose(f); return chars; } /* inicializalja a lefoglalt memoriat. * az elejere es a vegere kanari_meret meretben kanari kerul; * a kozepere, a juzernek valo reszbe pedig debugmalloc_random szamok. */ static void kanari_letrehoz(Lefoglalt *mem) { unsigned char *teljes=(unsigned char *) mem->valodi; unsigned char *kanari1=teljes; unsigned char *kanari2=teljes+kanari_meret+mem->meret; size_t i; for (i=0; i<kanari_meret; ++i) { kanari1[i]=kanari; kanari2[i]=kanari; } } /* ellenorzi a kanarit. * igaz ertekkel ter vissza, ha rendben van. */ static int kanari_rendben(Lefoglalt const *mem) { unsigned char *teljes=(unsigned char *) mem->valodi; unsigned char *kanari1=teljes; unsigned char *kanari2=teljes+kanari_meret+mem->meret; size_t i; for (i=0; i<kanari_meret; ++i) { if (kanari1[i]!=kanari) return 0; if (kanari2[i]!=kanari) return 0; } return 1; } /* memoriateruletet dumpol, a megadott meretben. */ static void debugmalloc_dump_memory(void const *memoria, size_t meret) { unsigned char const *mem=(unsigned char const *) memoria; unsigned y, x; /* soronkent 16; meret/16-nyi sor lesz, persze felfele kerekitve */ for (y=0; y<(meret+15)/16; y++) { debugmalloc_printf(" %04x ", y*16); for (x=0; x<16; x++) if (y*16+x<meret) debugmalloc_printf("%02x ", mem[y*16+x]); else debugmalloc_printf(" "); debugmalloc_printf(" "); for (x=0; x<16; x++) if (y*16+x<meret) { unsigned char c=mem[y*16+x]; debugmalloc_printf("%c", isprint(c)?c:'.'); } else debugmalloc_printf(" "); /* uj sor */ debugmalloc_printf("\n"); } } /* egy adott lefoglalt tetelhez * tartozo adatokat irja ki. foglalas helye, modja; * meret, pointer. ad az elejerol dumpot is; * illetve a teljes elotte es utana kanarit kiirja, * ha kiderul, hogy az serult. */ static void debugmalloc_dump_elem(Lefoglalt const *iter) { int kanari_ok=kanari_rendben(iter); debugmalloc_printf(" MEMORIATERULET: %p, kanari: %s\n" " foglalva itt: %s:%u\n" " foglalas modja: %s(%s) (%u bajt)\n", iter->usernek, kanari_ok?"ok":"**SERULT**", iter->file, iter->line, iter->fv, iter->cel, (unsigned) iter->meret); if (!kanari_ok) { debugmalloc_printf(" ELOTTE KANARI: \n"); debugmalloc_dump_memory(iter->valodi, kanari_meret); } /* elso 64 byte dumpolasa */ debugmalloc_printf(" memoria eleje: \n"); debugmalloc_dump_memory(iter->usernek, iter->meret>64 ? 64:iter->meret); if (!kanari_ok) { /* erre a vs miatt van szukseg, mert az nem szereti a void *+size_t * kifejezest... trollok */ unsigned char const *valodi_char=(unsigned char const *) iter->valodi; debugmalloc_printf(" UTANA KANARI: \n"); debugmalloc_dump_memory(valodi_char+kanari_meret+iter->meret, kanari_meret); } debugmalloc_printf("\n"); } /* kiirja a lefoglalt memoriateruletek listajat. */ void debugmalloc_dump() { Lefoglalt *iter; debugmalloc_printf("** DEBUGMALLOC DUMP ************************************\n\n"); if (lista) for (iter=lista->next; iter!=&vege; iter=iter->next) debugmalloc_dump_elem(iter); debugmalloc_printf("** DEBUGMALLOC DUMP VEGE *******************************\n"); } /* ez lefoglal egy megadott meretu memoriat; * pontosabban annal nagyobbat. elotte-utana kanarit inicializal, * a juzernek jaro reszt pedig random szamokkal tolti fel. * visszaterni a juzernek jaro terulet cimevel ter vissza. */ void *debugmalloc_malloc_full(size_t meret, char const *fv, char const *cel, char const *file, unsigned line, int zero) { Lefoglalt *uj; void *valodi; unsigned char *usernek; /* lefoglalunk egy adag memoriat; elotte-utana tobblet hellyel. */ valodi=malloc(meret+2*kanari_meret); if (valodi==NULL) { debugmalloc_printf("debugmalloc: %s @ %s:%u: nem sikerult %u meretu memoriat foglalni!\n", fv, file, line, (unsigned) meret); /* mint az igazi malloc, nullpointert adunk */ return NULL; } uj=(Lefoglalt *) malloc(sizeof(Lefoglalt)); if (uj==NULL) { debugmalloc_printf("debugmalloc: %s @ %s:%u: le tudtam foglalni %u memoriat, de utana a sajatnak nem, sry\n", fv, file, line, (unsigned) meret); abort(); } uj->valodi=valodi; usernek=(unsigned char *) valodi+kanari_meret; uj->usernek=usernek; uj->meret=meret; strcpy(uj->fv, fv); strncpy(uj->cel, cel, sizeof(uj->cel)); uj->cel[sizeof(uj->cel)-1]=0; strncpy(uj->file, file, sizeof(uj->file)); uj->file[sizeof(uj->file)-1]=0; uj->line=line; kanari_letrehoz(uj); if (zero) memset(usernek, 0, meret); else { size_t i; for (i=0; i<meret; ++i) usernek[i]=debugmalloc_random(); } /* lista elejere beszurja */ if (lista==NULL) debugmalloc_init(); uj->prev=lista; /* elotte a strasza */ uj->next=lista->next; /* utana az eddigi elso */ lista->next->prev=uj; /* az eddigi elso elott az uj */ lista->next=uj; /* a strazsa utan az uj */ return uj->usernek; } /* ez felszabaditja a memoriateruletet, amit a debugmalloc * foglalt. mivel a listaban megvannak az epp lefoglalt * teruletek, ezert ellenorizni tudja, helyes-e a free hivas. * ellenorzi a kanarit is, es kiirja az adatokat, ha helytelen. */ void debugmalloc_free_full(void *mem, char const *fv, char const *file, unsigned line) { Lefoglalt *iter; unsigned char *usernek; size_t i; /* NULL pointerre nem csinalunk semmit */ if (mem==NULL) return; /* ha meg sose mallocolt, a lista nincs inicializalva. a free-je se lehet helyes */ if (lista==NULL) { debugmalloc_printf("debugmalloc: %s @ %s:%u: meg egyszer se hivtal mallocot!\n", fv, file, line); abort(); } /* megkeressuk */ for (iter=lista->next; iter!=&vege; iter=iter->next) if (iter->usernek==mem) break; /* ezt nyilvan ne engedjuk, mert akkor olyan pointer van, amit nem kene * free()-ni; ezt a rendes free() se birna */ if (iter->usernek==NULL) { debugmalloc_printf("debugmalloc: %s @ %s:%u: olyan teruletet akarsz felszabaditani, ami nincs lefoglalva!\n", fv, file, line); abort(); } /* szoval megtalaltuk. iter mutat a torlendo teruletre. */ if (!kanari_rendben(iter)) { debugmalloc_printf("debugmalloc: %s @ %s:%u: a %p memoriateruletet tulindexelted!\n", fv, file, line, mem); debugmalloc_dump_elem(iter); } /* torles elott kitoltjuk randommal, ha esetleg dereferalna, akkor tuti fajjon */ usernek=(unsigned char *) iter->usernek; for (i=0; i<iter->meret; ++i) usernek[i]=debugmalloc_random(); /* memoria torlese; juzer memoriaja, es listabol */ free(iter->valodi); iter->next->prev=iter->prev; iter->prev->next=iter->next; free(iter); } /* a megadott memoriat meretezi at. * a sajat free/malloc paros segitsegevel valositom meg. */ void *debugmalloc_realloc_full(void *oldmem, size_t newsize, char const *fv, char const *cel, char const *file, unsigned line) { Lefoglalt *iter; void *ujmem; int masolni; /* ha null az oldmem, akkor ez ekvivalens egy malloc hivassal */ if (oldmem==NULL) return debugmalloc_malloc_full(newsize, fv, cel, file, line, 0); /* ha az uj meret 0, akkor pedig egy free hivassal */ if (newsize==0) { debugmalloc_free_full(oldmem, fv ,file, line); return NULL; } /* megkeressuk a regi memoriat, mert kell a meret */ for (iter=lista->next; iter!=&vege; iter=iter->next) if (iter->usernek==oldmem) break; if (iter->usernek==NULL) { debugmalloc_printf("debugmalloc: %s @ %s:%u: olyan teruletet akarsz atmeretezni, ami nincs lefoglalva!\n", fv, file, line); abort(); } ujmem=debugmalloc_malloc_full(newsize, fv, cel, file, line, 0); if (ujmem==NULL) { debugmalloc_printf("debugmalloc: %s @ %s:%u: nem sikerult uj memoriat foglalni az atmeretezeshez!\n", fv, file, line); /* ilyenkor nullal ter vissza, es a regit meghagyja */ return NULL; } /* melyik kisebb? annyi bajtot kell masolni. */ masolni=iter->meret < newsize? iter->meret : newsize; memcpy(ujmem, oldmem, masolni); debugmalloc_free_full(oldmem, fv, file, line); return ujmem; } /* ez hivodik meg a program vegen, az atexit() altal. */ static void debugmalloc_programvegi_dump() { /* just in case */ if (lista==NULL) return; /* ha nem ures a lista */ if (lista->next->next!=NULL) { debugmalloc_printf("********************************************************\n" "*\n" "* MEMORIASZIVARGAS VAN A PROGRAMBAN!!!\n" "*\n" "********************************************************\n"); debugmalloc_dump(); } } /* ha szukseg lenne egy, az eredeti fuggvennyel prototipusban * kompatibilis valtozatra, ezek hasznalhatoak. */ void *debugmalloc_malloc(size_t meret) { return debugmalloc_malloc_full(meret, "malloc", "ismeretlen", "(ismeretlen)", 0, 0); } void *debugmalloc_calloc(size_t nmemb, size_t meret) { return debugmalloc_malloc_full(meret, "calloc", "ismeretlen", "(ismeretlen)", 0, 1); } void debugmalloc_free(void *mem) { debugmalloc_free_full(mem, "free", "(ismeretlen)", 0); } void *debugmalloc_realloc(void *oldmem, size_t meret) { return debugmalloc_realloc_full(oldmem, meret, "realloc", "ismeretlen", "(ismeretlen)", 0); }
moriss/gameoflife
GameOfLife_SDL2/debugmalloc.c
C
mit
13,623
package com.hps.wizard.sample.states; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.RadioButton; import android.widget.RadioGroup; import android.widget.RadioGroup.OnCheckedChangeListener; import android.widget.TextView; import com.hps.wizard.StateFragment; import com.hps.wizard.AbstractWizardActivity; import com.hps.wizard.sample.R; /** * This fragment is a state fragment which accepts two possible next states and a label. It then moves forward to the appropriate state based on user selection. */ public class AreYouSure extends StateFragment { public static final String ARE_YOU_SURE_TEXT = "text"; public static final String YES_STATE = "yesState"; public static final String NO_STATE = "noState"; private static final String CHECKED_BUTTON_ID = "checkedId"; private RadioButton yes, no; private RadioGroup choiceGroup; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment View v = inflater.inflate(R.layout.fragment_state_are_your_sure, container, false); Bundle args = getArguments(); String message = args.getString(ARE_YOU_SURE_TEXT); TextView tv = (TextView) v.findViewById(R.id.textView); tv.setText(message); yes = (RadioButton) v.findViewById(R.id.yes); no = (RadioButton) v.findViewById(R.id.no); choiceGroup = (RadioGroup) v.findViewById(R.id.choiceGroup); /** * Set up a listener to enable or disable the next button. */ OnCheckedChangeListener thingListener = new OnCheckedChangeListener() { @Override public void onCheckedChanged(RadioGroup group, int checkedId) { if (getWizardActivity() != null) { getWizardActivity().enableButton(AbstractWizardActivity.NEXT_BUTTON, group.getCheckedRadioButtonId() != -1, AreYouSure.this); } } }; choiceGroup.setOnCheckedChangeListener(thingListener); /** * Check the correct radio button if we're rebuilding the screen after orientation change. */ if (getArguments() != null) { int checkedId = getArguments().getInt(CHECKED_BUTTON_ID, -1); if (checkedId != -1) { choiceGroup.check(checkedId); } } return v; } @Override public String getTitle() { return "Are You Sure?"; } @Override public String getPreviousButtonLabel() { return getWizardActivity().getString(R.string.wizard_previous); } @Override public boolean canGoForward() { /** * We can go forward only if the fragment has been created and the user has selected yes or no. */ return yes != null && (yes.isChecked() || no.isChecked()); } @SuppressWarnings("unchecked") @Override public StateDefinition getNextState() { Bundle args = getArguments(); Class<? extends StateFragment> nextState; /** * Select the correct state based on which radio button is checked. */ if (yes.isChecked()) { nextState = (Class<? extends StateFragment>) args.getSerializable(YES_STATE); } else { nextState = (Class<? extends StateFragment>) args.getSerializable(NO_STATE); } return new StateDefinition(nextState, null); } @Override public Bundle getSavedInstanceState() { Bundle bundle = getBundleToSave(); /** * Store off which radio button was checked (if any). */ if (choiceGroup != null) { bundle.putInt(CHECKED_BUTTON_ID, choiceGroup.getCheckedRadioButtonId()); } return bundle; } }
HeartlandPaymentSystems/Android-Wizard-Framework
WizardSample/src/com/hps/wizard/sample/states/AreYouSure.java
Java
mit
3,465
--- title: "Logics and integer-programming representations" category: inside subcategory: 1 permalink: "/tutorial/logicprogramming" tags: [Logic programming, Big-M, Integer programming] excerpt: "Logic programming in YALMIP means programming with operators such as alldifferent, number of non-zeros, implications and similiar combinatorial objects." --- YALMIP does a lot of modelling for you behind the scenes, but sometimes it is important to know how models are created and what the standard building blocks and tricks are. Creating integer programming representable models seem like magic to some, but there are really only a few standard tricks used leading to a family of models. 1. [Logical models involving binary variables](#logics) 1. [Logical models involving implications with binary variables and constraints](#constraints) 1. [Multiplications of variables and functions](#products) 1. [Representations of functions](#functions) Some simple rules and strategies when deriving models for complex logic and combinatorials models: 1. Try to represent things with disjoint events of the kind "exactly one of these things occur" with a binary variable associated to each event. 2. Try to arrive at "binary variable implies set of constraints" 3. Introduce intermediate auxilliary variables to keep things clean 4. Decompose the logic using intermediate variables to connect parts In other words, a large sparse simple model is much better than a compact complex model. What we try to emphasize in the examples is that **most models can be derived using exactly the same strategy and a few very basic building blocks**. Many of the models can be simplified and reduced, but those steps are typically done just as efficiently inside the solver during pre-solve. Throughout the examples here, **a** and **b** represent scalar binary variables, **z** represents a vector of binary variables, and **x** is just some generic variable (could be anything). In the models, we make use of [big-M models](/tutorial/bigmandconvexhulls) with associated constant \\(M\\). We use a notation with the same value everywhere, but in practice you would spend effort on deriving as small constants as possible for every single constraint. In the models here, we explicitly derive detailed models for implications, but in practice, we would of course implement the low-level implications using [implies](/command/implies). ## Logical models involving binary variables {: #logics } ### s = NOT a With binary \\(a = 1\\) representing true and \\(a = 0\\) representing false, logical negation turns into $$ s = 1-a $$ ### s = a AND b \\(s\\) has to be \\(1\\) if both \\(a\\) and \\(b\\) are 1. \\(s\\) has to be \\(0\\) if either of \\(a\\) and \\(b\\) are 0. $$ s \geq a + b -1,~s \leq a,~s\leq b $$ The idea generalizes to an arbitrary number of binary variables \\(s = z_1 ~\&~ z_2~ \&~ \ldots ~\&~ z_n\\) with $$ s \geq \sum_{i=1}^n z_i - (n-1), ~s\leq z $$ ### s = a OR b \\(s\\) has to be \\(1\\) if either of \\(a\\) and \\(b\\) are 1, and \\(0\\) if none of them are 1. $$ s \geq a,~s\geq b, ~ s \leq a + b $$ Also this generalizes trivially to arbitrary length $$ s \geq z, ~s\leq \sum_{i = 1}^n z_j $$ ### s = a XOR b \\(s\\) has to be \\(1\\) if exactly one of \\(a\\) and \\(b\\) are 1, and \\(0\\) otherwise $$ s \geq a - b, ~s \geq b-a, ~ s \leq a + b, ~ a + b\leq 2-s $$ The idea generalizes to an arbitrary number of binary variables with $$ s \geq z_i - \sum_{j\ne i} z_j,~ s\leq \sum_{i = 1}^n z_j \leq n + (1-n)s $$ ### If a then b Logical implication of binary variables $$ b \geq a $$ ## Logical models involving binary variables and constraints {: #constraints } ### If a then \\(f(x)\leq 0\\) To ensure a constraint holds when a binary is true, we model implication using a [big-M strategy](/tutorial/bigmandconvexhulls). $$ f(x) \leq M(1-a) $$ This is the model construct which is used for almost all cases below. Make sure you understand why this works. In YALMIP, this is the core of the [implies](/command/implies) operator. ### If logical(z) then \\(f(x)= 0\\) Introduce a new binary variable \\(s\\) to represent the logical condition using the methods above, and then use the standard implication. $$ f(x) \leq M(1-s) $$ Note that you do not have to model the logical condition exactly (both directions), all you need is \\(\mathop{logical}(z) \rightarrow s\\). This is a general strategy throughout. If you enter complex expressions, introduce new variables for simple sub-parts and build the complete model by combining simple standard models. ### If a then \\(f(x) < 0\\) Strict inequalities are impossible in practice (unless \\(f(x)\\) is quantized such as only involving integer variables). Hence, you have to use a margin and hope that this in combination with solver tolerances leads to a solution which actually satisfies the constraints (solutions claimed feasible and optimal can easily be infeasible and are only guaranteed to satisfy solver tolerance and termination critera) $$ f(x) \leq -\epsilon + M(1-a) $$ ### If a then \\(f(x)\leq 0\\) else \\(f(x)\geq 0\\) The standard implication is simply repeated for the two cases. $$ f(x) \leq M(1-a),-f(x)\leq Ma $$ To create more easily generalizable models and learn a common core strategy, it is adviced to think of this as two disjoint cases each associated with a set of constraints. $$ \begin{align} z_1 &\rightarrow \{f(x)\leq 0, ~ a=1\}\\ z_2 &\rightarrow \{-f(x)\leq 0, ~ a=0\}\\ z_1 + z_2 &= 1 \end{align} $$ Once again ending up as standard models for implications $$ \begin{align} f(x)&\leq M(1-z_1), -(1-z_1)\leq a-1 \leq (1-z_1)\\ -f(x) &\leq M(1-z_2), -(1-z_2) \leq a \leq (1-z_2)\\ z_1 + z_2 &= 1 \end{align} $$ ### If a then \\(f(x)\leq 0\\) else \\(g(x)\leq 0\\) We could of course create a model using \\(a\\) only, but using the same strategy the whole time trains us to realize that all model look the same in principle $$ \begin{align} z_1 &\rightarrow \{f(x)\leq 0, ~ a=1\}\\ z_2 &\rightarrow \{g(x)\leq 0, ~ a=0\}\\ z_1 + z_2 &= 1 \end{align} $$ Standard models for implications $$ \begin{align} f(x) &\leq M(1-z_1), -(1-z_1)\leq a-1 \leq (1-z_1)\\ g(x) &\leq M(1-z_2), -(1-z_2) \leq a \leq (1-z_2)\\ z_1 + z_2 &= 1 \end{align} $$ ### If a then \\(f(x)= 0\\) This is nothing but two inequalities in the implication, hence $$ \begin{align} f(x)&\leq M(1-a)\\ -f(x) &\leq M(1-a)\\ \end{align} $$ ### If \\( f(x) \leq 0\\) then a When \\(f(x)\\) becomes negative, the binary variable should be forced to be activated. $$ f(x)\geq -Ma $$ Note that we use a non-strict inequality. If behaviour around 0 is important, a margin will have to be used as discussed before, ant is up to you and your goal to decide if the margin is positive or negative,i.e. towards whih side you prefer incorrect activations to happen. ### If \\( f(x) = 0\\) then a First, this is extremely ill-posed in practice as solvers work with floating-point numbers so it might consider, e.g., \\(10^{-7}\\) to be 0. It is also often ill-posed from a practical point of view. If your model says **if waterlevel is 1** is it really absolutely crucial that it behaves differently compared to the case when the waterlevel is \\(1+10^{-11}\\), i.e. the thickness of one atom? If yes, how do you plan to use that solution in practice? The disjoint logical model is $$ \begin{align} f(x)&<0 \rightarrow a = 0\\ f(x)&=0 \rightarrow a = 1\\ f(x)& >0 \rightarrow a = 0 \end{align} $$ This is interpreted as $$ \begin{align} z_1 &\rightarrow \{f(x)<0, a=0\} \\ z_2 &\rightarrow \{f(x)=0, a=1\} \\ z_3 &\rightarrow \{f(x)>0,a=0\} \\ z_1+z_2+z_3 &= 1 \end{align} $$ A big-M representation of the implications, using a margin \\(\epsilon\\) around 0 if wanted leads to $$ \begin{align} -(1-z_1) &\leq a \leq (1-z_1), f(x) \leq -\epsilon + M(1-z_1)\\ -(1-z_2) &\leq a-1 \leq (1-z_2), -M(1-z_2)-\epsilon \leq f(x) \leq \epsilon + M(1-z_2)\\ -(1-z_3) &\leq a \leq (1-z_3), f(x) \geq \epsilon -M(1-z_3)\\ z_1+z_2+z_3 &= 1 \end{align} $$ ### If \\( f(x) \leq 0\\) then a else not a Now it starts paying of thinking in terms of auxilliary variables and disjoint cases. This is $$ \begin{align} z_1 &\rightarrow \{f(x)\leq 0, ~ a=1\}\\ z_2 &\rightarrow \{f(x)\geq 0, ~ a=0\}\\ z_1 + z_2 &= 1 \end{align} $$ A big-M model is thus $$ \begin{align} f(x) &\leq M(1-z_1), -(1-z_1)\leq a-1 \leq (1-z_1)\\ f(x) &\geq M(1-z_2), -(1-z_2) \leq a \leq (1-z_2)\\ z_1 + z_2 &= 1 \end{align} $$ ### If \\( f(x) \leq 0\\) then \\( g(x) \leq 0\\) Glue the two conditions using an intermediate binary variable $$ \begin{align} f(x) & \leq 0 \rightarrow z_1\\ z_1 & \rightarrow g(x) \leq 0 \end{align} $$ These are standard models and we thus have $$ \begin{align} f(x)&\geq -Mz_1\\ g(x)&\leq M(1-z_1) \end{align} $$ ### If (\\( f(x) \leq 0\\) and \\( h(x) \leq 0\\) ) then \\( g(x) \leq 0\\) Not much variation and the pattern should be clear. Glue conditions using intermediate binary variables $$ \begin{align} f(x) & \leq 0 \rightarrow z_1\\ h(x) & \leq 0 \rightarrow z_2\\ z_1 & \& z_2 \rightarrow z_3\\ z_3 & \rightarrow g(x) \leq 0 \end{align} $$ These are standard models and we thus have $$ \begin{align} f(x) & \geq -Mz_1\\ h(x) & \geq -Mz_2\\ g(x) & \leq M(1-z_3)\\ z_3 & \geq z_1+z_2 - 1 \end{align} $$ ## Multiplications of variables and functions {: #products } ### y = ab, a and b binary Binary multiplication is nothing but logical and, hence $$ y \leq a,~ y\leq b,~ y\geq a+b-1 $$ Generalization to more terms follows the same generalization as logical and. ### y = ax, a binary x, x non-binary Multiplication of binary and non-binary should be seen as a logical operation $$ \begin{align} a &\rightarrow y = x\\ 1-a &\rightarrow y = 0\\ \end{align} $$ This is implemented using our standard model for implications $$ \begin{align} -M(1-a) &\leq y-x \leq M(1-a)\\ -Ma &\leq y \leq Ma \end{align} $$ ### y = abx, a and b binary, x non-binary When there are repeated binary variables, the procedure cab simply be repeated with intermediate variables. Start by introducing a new variable and model for **c = ab** and then use model for **y = cx**. The idea and model generalizes to arbitrary polynomials of binary variables, simply introduce intermediate variables to keep it simple. ### y = ax, a binary, x integer An alternative for multiplying a binary with an integer variable is to make a binary expansion of the integer \\(x = z_1 + 2 z_2+ 4z_3 + \ldots +2^{n+1}z_n\\) with binary variables \\(z\\), model products with new variables \\(y_i = az_i\\) using standard model for binary times binary, and then use \\(y = y_1 + 2y_2 + 4y_3 \ldots\\). ### y = wx, w integer, x continuous Make binary expansion of **w** and then create models for binary times continuous. ### y = wx, w integer, x integer Make binary expansions of both **w** and **x** and then create models for binary products. ## Representations of functions {: #functions } ### y = abs(x) A logical representation of absolute value is $$ \begin{align} x &\geq 0 \rightarrow y = x\\ x &\leq 0 \rightarrow y = -x \end{align} $$ A disjoint representation of this using binary variables $$ \begin{align} z_1 &\rightarrow \{x\geq 0,~y = x\}\\ z_2 &\rightarrow \{x\leq 0,~y = -x\}\\ z_1 + z_2 &= 1 \end{align} $$ Once again standard implications so the result is a standard big-M model $$ \begin{align} -M(1-z_1) &\leq y - x\leq M(1-z_1), x\geq -M(1-z_1)\\ -M(1-z_2) &\leq y + x\leq M(1-z_2), x\leq M(1-z_2)\\ z_1 + z_2 &= 1 \end{align} $$ Remember that absolute value is convex, so you only use a MILP representation if absoutely needed. ### y = max(x) The maximum of a vector can also be thought of as a logical model $$ \begin{align} x_1 &\geq x \rightarrow y = x_1\\ \vdots&\\ x_n &\geq x \rightarrow y = x_n \end{align} $$ Introduce a binary variable for every case and derive disjoint representation $$ \begin{align} z_1 &\rightarrow y = x_1, x_1 \geq x\\ \vdots\\ z_n &\rightarrow y = x_n, x_n \geq x\\ \sum_{i=1}^n z_i &= 1 \end{align} $$ This is finalized with standard implication models $$ \begin{align} -M(1-z_1) &\leq y - x_1\leq M(1-z_1), ~x-x_1 \leq M(1-z_1)\\ \vdots\\ -M(1-z_n) &\leq y - x_1\leq M(1-z_n), ~x-x_n \leq M(1-z_n)\\ \sum_{i=1}^n z_1 &= 1 \end{align} $$ Remember that max is convex, so you only use a MILP representation if absolutely needed. ### y = min(x) Use \\( \min(x) = -\max(-x)\\). ### y = sort(x) Let \\(P\\) be a binary permutation matrix (rows and columns sum to 1), and write \\(y\\) as permutation of \\(x\\), \\(y = Px\\). For \\(y\\) to be sorted (increasing), we must have \\(y_i \leq y_{i+1}\\). Multiplications \\(y = Px\\) are implemented using the models above or more directly as, e.g., \\(-M(1-P_{ij}) \leq y_i - x_j \leq M(1-P_{ij})\\). ### y = floor(x) In theory introduce integer \\(y\\) and \\(x-1 < y \leq x\\). In practice strict inequality has to be approximated leading to \\(x-1+\epsilon \leq y \leq x\\) ### y = ceil(x) In theory introduce integer \\(y\\) and \\(x \leq y < x+1\\). In practice strict inequality has to be approximated leading to \\(x \leq y \leq x+1-\epsilon\\) ### y = fix(x) Round towards zero means we we want floor for positive arguements and ceil for negative arguments. We can write this as $$ \begin{align} x & \leq 0 \rightarrow y = \mathop{ceil}(x)\\ x & \geq 0 \rightarrow s = \mathop{floor}(x)\\ \end{align} $$ Logical model $$ \begin{align} z_1 &\rightarrow \{x\leq 0,y = \mathop{ceil}(x)\} \\ z_2 &\rightarrow \{x\geq 0,y = \mathop{floor}(x)\}\\ z_1+z_2 &= 1 \end{align} $$ Implement the implications with integer \\(y\\) and a combined model for ceil and floor $$ \begin{align} x &\leq M(1-z_1)\\ x &\geq -M(1-z_2)\\ x - z_2 + z_2\epsilon &\leq y \leq x + z_1-z_1\epsilon\\ z_1+z_2 & = 1 \end{align} $$ ### y = rem(x,m) \\( y = \mathop{rem}(x,m)\\) means \\( y = x - nm, n = \mathop{fix}(x/m)\\), meaning we have to implement \\(\mathop{fix}(x/m)\\) using the model above (we assume \\(m\\) is constant). ### y = mod(x,m) \\( y = \mathop{mod}(x,m)\\) means \\( y = x - nm, n = \mathop{floor}(x/m)\\), meaning we have to implement \\(\mathop{floor}(x/m)\\) using the model above (we assume \\(m\\) is constant). ### y = sgn(x) A logical model of \\(s = \mathop{sgn}(x)\\) is $$ \begin{align} x & < 0 \rightarrow s = -1\\ x & = 0 \rightarrow s = 0\\ x & > 0 \rightarrow s = 1\\ \end{align} $$ This is interpreted as $$ \begin{align} z_1 &\rightarrow \{x<0, s=-1\} \\ z_2 &\rightarrow \{x=0, s=0\} \\ z_3 &\rightarrow \{x>0,s=1\} \\ z_1+z_2+z_3 &= 1 \end{align} $$ A big-M representation of the implications, using a margin \\(\epsilon\\) around 0 if wanted leads to $$ \begin{align} -M(1-z_1) &\leq s+1 \leq M(1-z_1), ~ x \leq -\epsilon + M(1-z_1)\\ -M(1-z_2) &\leq s \leq M(1-z_2), ~ -M(1-z_2)-\epsilon \leq x \leq \epsilon + M(1-z_2)\\ -M(1-z_3) &\leq s-1 \leq M(1-z_3), ~x \geq \epsilon -M(1-z_3)\\ z_1+z_2+z_3 &= 1 \end{align} $$ ### y = nnz(x) Introduce additional binary vectors \\(v,u,z\\) and let \\(y = \sum_{i=1}^n v_i+u_i\\) and the logical model $$ \begin{align} v_i = 1 & \rightarrow x_i \leq -\epsilon\\ z_i = 1 & \rightarrow \epsilon \geq x_i \geq -\epsilon\\ u_i = 1 & \rightarrow x_i \geq \epsilon\\ u_i + z_i + v_i & = 1 \end{align} $$ Once again standard implications $$ \begin{align} \epsilon +x & \leq M(1-v_1)\\ -\epsilon +x & \leq M(1-z_1),~-\epsilon -x & \leq M(1-z_1)\\ \epsilon -x & \leq M(1-u_1)\\ u_i + z_i + v_i & = 1 \end{align} $$ ### y = f(x), x scalar integer For an arbitrary function defined over a bounded integer set (here for simple notation assumed to be \\(1\\leq x \leq M\\), we simply see it as as the disjoint logic model $$ \begin{align} z_i = 1 & \rightarrow \{x = i, y = f(i)\}\\ \sum_{i=1}^M z_i &= 1 \end{align} $$ This is compactly written as $$ y = \sum_{i=1}^{M} z_if(i),~x = \sum_{i=1}^{M} i z_i, ~\sum_{i=1}^M z_i = 1 $$ ### y = piecewise affine function A typical piecewise affine model is represented as **if** \\(A_ix\leq b_i\\) then \\(y = c_i^Tx+d_i\\) where \\(i = 1,\ldots,N\\). From above, this is $$ \begin{align} z_i = 1 & \rightarrow \{A_i x \leq b_i, y = c^T_ix + d_i\}\\ \sum_{i=1}^N z_i &= 1 \end{align} $$ Standard implication again. $$ \begin{align} A_ix - b_i &\leq M(1-z_i)\\ -M(1-z_i) &\leq y-c_i^Tx-d_i \leq M(1-z_i)\\ \sum_{i=1}^n z_i &= 1 \end{align} $$ Note that [sos2](/command/sos2) constructions are more efficient though. ### y = piecewise quadratic function Following the picewise affine model, it is trivial to extend to the quadratic case **if** \\(A_ix\leq b_i\\) then \\(y = \frac{1}{2}x^TQ_ix + c_i^Tx+d_i\\). However, one should be slightly more clever, as the standard approach would introduce equalities involving quadratic expressions, which is nonconvex. Define \\(N\\) vectors \\(p_i\\) with length equal to \\(x\\), and define \\(y\\) as \\( \sum_{i = 1}^N \frac{1}{2}p_i^TQ_ip_i + c_i^Tp_i+d_i z_i\\) where $$ \begin{align} z_i = 1 & \rightarrow \{x = p_i, A_i x \leq b_i\}\\ \sum_{i=1}^n z_i &= 1 \end{align} $$ Standard implication. $$ \begin{align} A_ix - b_i &\leq M(1-z_i)\\ -M(1-z_i) &\leq x-p_i \leq M(1-z_i)\\ \sum_{i=1}^n z_i &= 1 \end{align} $$
yalmip/yalmip.github.io
_posts/tutorials/2016-09-17-logicprogramming.md
Markdown
mit
17,289
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.aspose.imaging.examples; /** * * @author mfazi */ public final class Assert { public static void areEqual(Object left, Object right) { if (!left.equals(right)) throw new AssertionError(left + " != " + right); } public static void areEqual(Object left, Object right, String msg) { if (!left.equals(right)) throw new AssertionError(msg); } public static void areEqual(long left, long right, String msg) { if (left != right) throw new AssertionError(left + " != " + right); } public static void areEqual(float left, float right, float epsilon) { assert Math.abs(left - right) < epsilon; } public static void areNotEqual(Object left, Object right) { assert !left.equals(right); } public static void assertTrue(boolean value) { if (!value) throw new AssertionError("value is false"); } public static void assertTrue(boolean value, String msg) { assert value : msg; } }
aspose-imaging/Aspose.Imaging-for-Java
Examples/src/main/java/com/aspose/imaging/examples/Assert.java
Java
mit
1,281
using System; using System.IO; using NUnit.Framework; namespace EventStreams.Persistence.FileSystem { using Resources; using Serialization.Events; using Streams; [TestFixture] public class FileSystemPersistenceStrategyTests { private readonly RepositoryHierarchy _repositoryPath = new RepositoryHierarchy(AppDomain.CurrentDomain.BaseDirectory); [Test] public void Given_first_set_when_written_to_disk_and_when_read_back_in_then_content_is_as_expected() { var identity = new Guid("E34900D6-6C63-4066-988F-DCEC25B482FA"); var filename = _repositoryPath.For(identity); File.Delete(filename); var fspe = new FileSystemPersistenceStrategy(_repositoryPath, EventReaderWriterPair.Null); fspe.Store(identity, MockEventStreams.First); Assert.AreEqual(File.ReadAllText(filename), ResourceProvider.Get("First.e")); } [Test] public void Given_first_set_and_second_set_when_written_to_disk_individually_and_when_read_back_in_then_content_is_as_expected() { var identity = new Guid("E34900D6-6C63-4066-988F-DCEC25B482FA"); var filename = _repositoryPath.For(identity); File.Delete(filename); var fspe = new FileSystemPersistenceStrategy(_repositoryPath, EventReaderWriterPair.Null); fspe.Store(identity, MockEventStreams.First); fspe.Store(identity, MockEventStreams.Second); Assert.AreEqual(File.ReadAllText(filename), ResourceProvider.Get("First_and_second.e")); } } }
nbevans/EventStreams
EventStreams.Tests/Persistence/FileSystem/FileSystemPersistenceStrategyTests.cs
C#
mit
1,664
/* 620. Not Boring Movies DescriptionHintsSubmissionsDiscussSolution SQL Schema Create table If Not Exists cinema (id int, movie varchar(255), description varchar(255), rating float(2, 1)) Truncate table cinema insert into cinema (id, movie, description, rating) values ('1', 'War', 'great 3D', '8.9') insert into cinema (id, movie, description, rating) values ('2', 'Science', 'fiction', '8.5') insert into cinema (id, movie, description, rating) values ('3', 'irish', 'boring', '6.2') insert into cinema (id, movie, description, rating) values ('4', 'Ice song', 'Fantacy', '8.6') insert into cinema (id, movie, description, rating) values ('5', 'House card', 'Interesting', '9.1') X city opened a new cinema, many people would like to go to this cinema. The cinema also gives out a poster indicating the movies’ ratings and descriptions. Please write a SQL query to output movies with an odd numbered ID and a description that is not 'boring'. Order the result by rating. For example, table cinema: +---------+-----------+--------------+-----------+ | id | movie | description | rating | +---------+-----------+--------------+-----------+ | 1 | War | great 3D | 8.9 | | 2 | Science | fiction | 8.5 | | 3 | irish | boring | 6.2 | | 4 | Ice song | Fantacy | 8.6 | | 5 | House card| Interesting| 9.1 | +---------+-----------+--------------+-----------+ For the example above, the output should be: +---------+-----------+--------------+-----------+ | id | movie | description | rating | +---------+-----------+--------------+-----------+ | 5 | House card| Interesting| 9.1 | | 1 | War | great 3D | 8.9 | +---------+-----------+--------------+-----------+ */ SELECT * FROM cinema WHERE id%2 = 1 AND description != 'boring' ORDER BY rating DESC;
shaotao/Leetcode
database/620_not_boring_movies/620_not_boring_movies.sql
SQL
mit
1,908
<?php $navbar = [ "config" => [ "navbar-class" => "navbar" ], "items" => [ "start" => [ "text" => "Start", "route" => "", ], "about" => [ "text" => "About", "route" => "about", ], "report" => [ "text" => "Report", "route" => "report", ], ] ]; $navHtml = ""; $navClass = $navbar["config"]["navbar-class"]; // Create url using $app->url->create(); foreach ($navbar["items"] as $items => $item) { $nav = $item["route"]; $url = $app->url->create("$nav"); $navHtml .= '<li><a href="' . $url . '">' . $item["text"] . '</a></li>'; } ?> <nav class="<?= $navClass ?>"> <ul> <?= $navHtml ?> </ul> </nav>
Marv2/anax-lite
view/navbar1/navbar.php
PHP
mit
772
<!DOCTYPE html> <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Embed &mdash; skedm 0.1 documentation</title> <link rel="stylesheet" href="_static/css/theme.css" type="text/css" /> <link rel="index" title="Index" href="genindex.html"/> <link rel="search" title="Search" href="search.html"/> <link rel="top" title="skedm 0.1 documentation" href="index.html"/> <link rel="next" title="Predict" href="predict.html"/> <link rel="prev" title="Generate Data" href="generate-data.html"/> <script src="_static/js/modernizr.min.js"></script> </head> <body class="wy-body-for-nav" role="document"> <div class="wy-grid-for-nav"> <nav data-toggle="wy-nav-shift" class="wy-nav-side"> <div class="wy-side-scroll"> <div class="wy-side-nav-search"> <a href="index.html" class="icon icon-home"> skedm </a> <div class="version"> 0.1 </div> <div role="search"> <form id="rtd-search-form" class="wy-form" action="search.html" method="get"> <input type="text" name="q" placeholder="Search docs" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div> <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> <p class="caption"><span class="caption-text">Contents:</span></p> <ul class="current"> <li class="toctree-l1"><a class="reference internal" href="install.html">Install</a></li> <li class="toctree-l1"><a class="reference internal" href="quick-example.html">Quick Example</a></li> <li class="toctree-l1"><a class="reference internal" href="generate-data.html">Generate Data</a></li> <li class="toctree-l1 current"><a class="current reference internal" href="#">Embed</a><ul> <li class="toctree-l2"><a class="reference internal" href="#d-embedding">1D Embedding</a></li> <li class="toctree-l2"><a class="reference internal" href="#id2">2D Embedding</a></li> </ul> </li> <li class="toctree-l1"><a class="reference internal" href="predict.html">Predict</a></li> <li class="toctree-l1"><a class="reference internal" href="score.html">Score</a></li> <li class="toctree-l1"><a class="reference internal" href="module-reference.html">Module Reference</a></li> <li class="toctree-l1"><a class="reference internal" href="performance.html">Performance</a></li> <li class="toctree-l1"><a class="reference internal" href="acknowledgements.html">Acknowledgements</a></li> </ul> </div> </div> </nav> <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> <nav class="wy-nav-top" role="navigation" aria-label="top navigation"> <i data-toggle="wy-nav-top" class="fa fa-bars"></i> <a href="index.html">skedm</a> </nav> <div class="wy-nav-content"> <div class="rst-content"> <div role="navigation" aria-label="breadcrumbs navigation"> <ul class="wy-breadcrumbs"> <li><a href="index.html">Docs</a> &raquo;</li> <li>Embed</li> <li class="wy-breadcrumbs-aside"> <a href="_sources/embed.rst.txt" rel="nofollow"> View page source</a> </li> </ul> <hr/> </div> <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> <div itemprop="articleBody"> <div class="section" id="embed"> <span id="id1"></span><h1>Embed<a class="headerlink" href="#embed" title="Permalink to this headline">¶</a></h1> <p>Embedding the time series, spatio-temporal series, or a spatial pattern is required before attempting to forecast or understand the dynamics of the system.</p> <p>As a quick recap, the lag is picked as the first minimum in the mutual information and the embedding dimension is picked using a false near neighbors test. In practice, however, it is acceptable to use the embedding that gives the highest forecast skill.</p> <div class="section" id="d-embedding"> <h2>1D Embedding<a class="headerlink" href="#d-embedding" title="Permalink to this headline">¶</a></h2> <p>An example of a 1D embedding is shown in the gif below. It shows a lag of 2, an embedding dimension of 3 and a forecast distance of 2. Setting the problem up this way allows us to use powerful near neighbor libraries such as the one implemented in scikit-learn.</p> <img alt="_images/1d_embedding.gif" class="align-center" src="_images/1d_embedding.gif" /> <p>This is the same thing as rebuilding the attractor and seeing where the point traveled to next.</p> <p>Using the skedm package, this would be represented as:</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">E</span> <span class="o">=</span> <span class="n">edm</span><span class="o">.</span><span class="n">Embed</span><span class="p">(</span><span class="n">X</span><span class="p">)</span> <span class="n">lag</span> <span class="o">=</span> <span class="mi">2</span> <span class="n">embed</span> <span class="o">=</span> <span class="mi">3</span> <span class="n">predict</span> <span class="o">=</span> <span class="mi">2</span> <span class="n">X</span><span class="p">,</span> <span class="n">y</span> <span class="o">=</span> <span class="n">E</span><span class="o">.</span><span class="n">embed_vectors_1d</span><span class="p">(</span><span class="n">lag</span><span class="p">,</span> <span class="n">emb</span><span class="p">,</span> <span class="n">predict</span><span class="p">)</span> </pre></div> </div> <p>Here <code class="docutils literal"><span class="pre">X</span></code> is the red matrix (features) and <code class="docutils literal"><span class="pre">y</span></code> is the green matrix above (targets). More examples of 1d embeddings are shown below. E is the embedding dimension, L is the lag, and F is the prediction distance.</p> <img alt="_images/1d_embedding_examples.png" class="align-center" src="_images/1d_embedding_examples.png" /> </div> <div class="section" id="id2"> <h2>2D Embedding<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h2> <p>An example of a 2D embedding is shown in the gif below where there is a lag of 2 in both the rows and columns, an embedding dimension of two down the rows, and an embedding dimension of three across the columns.</p> <img alt="_images/2d_embedding.gif" class="align-center" src="_images/2d_embedding.gif" /> <p>This would be implemented in code as:</p> <div class="highlight-default"><div class="highlight"><pre><span></span><span class="n">E</span> <span class="o">=</span> <span class="n">edm</span><span class="o">.</span><span class="n">Embed</span><span class="p">(</span><span class="n">X</span><span class="p">)</span> <span class="n">lag</span> <span class="o">=</span> <span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="mi">2</span><span class="p">)</span> <span class="n">emb</span> <span class="o">=</span> <span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="mi">3</span><span class="p">)</span> <span class="n">predict</span> <span class="o">=</span> <span class="mi">2</span> <span class="n">X</span><span class="p">,</span><span class="n">y</span> <span class="o">=</span> <span class="n">E</span><span class="o">.</span><span class="n">embed_vectors_2d</span><span class="p">(</span><span class="n">lag</span><span class="p">,</span> <span class="n">emb</span><span class="p">,</span> <span class="n">predict</span><span class="p">)</span> </pre></div> </div> <p>Here <code class="docutils literal"><span class="pre">X</span></code> is the red matrix (features) and <code class="docutils literal"><span class="pre">y</span></code> is the green matrix above (targets). More examples of 2d embeddings are shown below. L is the lag, E is the embedding dimension, and F is the prediction distance.</p> <img alt="_images/2d_embedding_examples.png" class="align-center" src="_images/2d_embedding_examples.png" /> </div> </div> </div> </div> <footer> <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> <a href="predict.html" class="btn btn-neutral float-right" title="Predict" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a> <a href="generate-data.html" class="btn btn-neutral" title="Generate Data" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a> </div> <hr/> <div role="contentinfo"> <p> &copy; Copyright 2017, Nick Cortale. </p> </div> Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. </footer> </div> </div> </section> </div> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT:'./', VERSION:'0.1', COLLAPSE_INDEX:false, FILE_SUFFIX:'.html', HAS_SOURCE: true, SOURCELINK_SUFFIX: '.txt' }; </script> <script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> <script type="text/javascript" src="_static/js/theme.js"></script> <script type="text/javascript"> jQuery(function () { SphinxRtdTheme.StickyNav.enable(); }); </script> </body> </html>
NickC1/skedm
docs/_build/html/embed.html
HTML
mit
10,344
'use strict'; angular.module('nav', ['playlist']) .controller('NavController', function ($scope, $mdDialog, $location, webRTC, socket) { $scope.showPlaylist = function(ev) { $mdDialog.show({ controller: 'PlaylistController', templateUrl: 'app/components/playlist/playlist.html', parent: angular.element(document.body), targetEvent: ev, clickOutsideToClose:true }) .then(function(answer) { $scope.status = 'You said the information was "' + answer + '".'; }, function() { $scope.status = 'You cancelled the dialog.'; }); }; $scope.joinRoom = function() { //assumes that we are in #/room/:id var ioRoom = $location.path().split('/')[2] webRTC.joinRoom(ioRoom); // Room.getRoom($location.path()) // .then(function (data) { // socket.init(data.id) // }) // .catch(function(err) { // console.error(err); // }) }; //join on nav init $scope.joinRoom(); });
nickfujita/WhiteBoard
public/app/components/nav/nav.js
JavaScript
mit
978
<!DOCTYPE html> <html lang="zh-CN"> <head> <title>时间轴</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <!-- 最新版本的 Bootstrap 核心 CSS 文件 --> <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> <!-- 可选的 Bootstrap 主题文件(一般不用引入) --> <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous"> <script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script> <!-- 最新的 Bootstrap 核心 JavaScript 文件 --> <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> <link rel="stylesheet" href="css/times-axis.css"> </head> <body> <div class="container"> <div class="row"> <div id="calendar" class="calendar"> <div class="times-axis"> <div class="times-base"> <div class="circle"></div> <div class="hollow"></div> </div> <div class="events"> <div class="year">2017</div> <div class="desc"> <p>发布视讯混合云</p> <p>为山西省教育大数据平台提供云视频会议解决方案</p> </div> </div> </div> <div class="times-axis"> <div class="times-base"> <div class="circle"></div> <div class="hollow"></div> </div> <div class="events"> <div class="year">2016</div> <div class="desc"> <p>在上海证券交易所挂牌上市 </p> <p>摩云视讯推出新一代视频会议终端</p> </div> </div> </div> <div class="times-axis"> <div class="times-base"> <div class="circle"></div> <div class="hollow"></div> </div> <div class="events"> <div class="year">2015</div> <div class="desc"> <p>摩云视讯在线终端点数突破60000点 </p> <p>推出基于感知、云、大数据的下一代视频监控系统 </p> <p>摩云视讯推出集成化视频会议系列产品—摩云网</p> </div> </div> </div> <div class="times-axis"> <div class="times-base"> <div class="circle"></div> <div class="hollow"></div> </div> <div class="events"> <div class="year">2014</div> <div class="desc"> <p>为青奥会提供视频会议安全会务保障 </p> <p>中国电信与摩云视讯推出共有品牌,运营商全面 </p> <p>推动云视频会议</p> </div> </div> </div> <div class="times-axis"> <div class="times-base"> <div class="circle"></div> <div class="hollow"></div> </div> <div class="events"> <div class="year">2013</div> <div class="desc"> <p>推出全触控式高清桌面可视通讯终端 </p> <p>部署了国内首个视频综合应用管理平台</p> <p>网络视频监控市场份额进入前三</p> </div> </div> </div> <div class="times-axis"> <div class="times-base"> <div class="circle"></div> <div class="hollow"></div> </div> <div class="events"> <div class="year">2012</div> <div class="desc"> <p>云视讯升级为摩云视讯品牌 </p> <p>摩云视讯在视频会议运营服务领域市场占有率第一</p> </div> </div> </div> <div class="times-axis"> <div class="times-base"> <div class="circle"></div> <div class="hollow"></div> </div> <div class="events"> <div class="year">2011</div> <div class="desc"> <p>推出云视讯,提供公有云、私有云视频会议解决方案 </p> </div> </div> </div> <div class="times-axis"> <div class="times-base"> <div class="circle"></div> <div class="hollow"></div> </div> <div class="events"> <div class="year">2010</div> <div class="desc"> <p>推出全触控式高清桌面可视通信终端</p> <p>部署了国内首个视频综合应用管理平台</p> </div> </div> </div> <div class="times-axis"> <div class="times-base"> <div class="circle"></div> <div class="hollow"></div> </div> <div class="events"> <div class="year">2009</div> <div class="desc"> <p>推出720P/1080P高清视频监控系统</p> <p>部署了国内最大的视频应急指挥调度系统</p> <p>视频会议市场份额在国内品牌中排名第一</p> </div> </div> </div> <div class="times-axis"> <div class="times-base"> <div class="circle"></div> <div class="hollow"></div> </div> <div class="events"> <div class="year">2008</div> <div class="desc"> <p>推出业内首款NVR </p> <p>为北京奥运会提供奥运安保应急指挥保障</p> </div> </div> </div> <div class="times-axis"> <div class="times-base"> <div class="circle"></div> <div class="hollow"></div> </div> <div class="events"> <div class="year">2007</div> <div class="desc"> <p>推出专业为企业设计的TRUESENS视频会议系统 </p> <p>为全国两会提供可视应急指挥保障</p> </div> </div> </div> <div class="times-axis"> <div class="times-base"> <div class="circle"></div> <div class="hollow"></div> </div> <div class="events"> <div class="year">2006</div> <div class="desc"> <p>推出运营级监控平台,占国内1/3的市场份额部署了 </p> <p>全球规模最大的专网视频会议项目 </p> <p>平安吴江项目入选中国安防十大经典工程</p> </div> </div> </div> <div class="times-axis"> <div class="times-base"> <div class="circle"></div> <div class="hollow"></div> </div> <div class="events"> <div class="year">1995-2005</div> <div class="desc"> <p>推出视频会议系统,进入视频领域 </p> <p>推出网络视频监控系统,成为网络安防倡导者 </p> </div> </div> </div> </div> <!-- calendar end--> </div> </div> </body> </html>
minchao920917/minchao920917.github.io
Demo/timesAxis/index.html
HTML
mit
8,798
--- published: true title: Jenis Eyeliners Dan Cara Menggunakannya layout: post --- Cair, gel, shadow, pensil ... ketika Anda memilih eyeliner, ada banyak jenis eyeliner untuk dipertimbangkan! Dengan begitu banyak jenis eyeliner yang berbeda untuk dipilih, kita tahu itu berarti dapat banyak pilihan, tapi ini bukan keputusan yang bisa dianggap enteng. Penting untuk mengetahui apa yang Anda dapatkan pada hasil akhirnya. Jadi, kami di sini untuk memecah pro dan kontra dari masing-masing jenis maskara dan baca terus untuk menentukan jenis eyeliner adalah pas untuk Anda! Eyeliner Cair Anda menyukai mata Anda terlihat lebih dramatis? Eyeliner cair mungkin menjadi pilihan terbaik Anda! Biasanya, eyeliner cair datang dalam sebuah tabung dengan sikat yang sangat tipis atau halus berujung lancip untuk menggunakan produk. Eyeliner cair menawarkan warna yang berani, tampil apik dan berguna untuk menciptakan garis yang tepat dan sempurna. Hal ini dianggap sebagai yang paling sulit diterapkan karena ujung kecil dapat menjadi sedikit menantang untuk dikontrol. Namun, jika Anda punya tangan yang stabil dan sedikit kesabaran, cobalah eyeliner cair! Mulai di tengah mata, kemudian tarik garis dari tengah ke sudut luar mata Anda. Selanjutnya, pergi ke sudut dalam mata Anda dan hubungkan liner dari sudut bagian dalam ke tengah mata Anda (di mana Anda pertama kali mulai). Jika Anda seorang pemula, kami sarankan mulai dengan eyeliner pensil dan terus berlatih dengan cara Anda sampai mahir menggunakan eyeliner cair. Eyeliner pensil Baru di dalam dunia eyeliner? Eyeliner Pensil adalah eyeliner yang tepat untuk Anda! Pensil eyeliner yang paling umum digunakan karena mereka yang paling mudah untuk dikontrol. Mereka tidak bekerja sama seperti pensil lainnya, kecuali mereka lebih aman dan jauh lebih lembut pada mata. Untuk pengaplikasiannya, cukup menarik di sepanjang garis bulu mata Anda. Pertajam pensil Anda sesuai kebutuhan. Maklum, meskipun, terlepas dari seberapa tajam Anda mendapatkan pensil Anda, Anda tidak akan dapat mencapai tingkat yang sama presisi seperti yang Anda lakukan dengan eyeliner cair. Hasilnya akan menjadi sedikit kurang tajam, tapi itu konsekuensi untuk aplikasi yang mudah. Tips: Jika Anda ingin menambah warna permukaan kelopak mata Anda, kami sarankan menggunakan eyeliner pensil. Mereka datang dalam berbagai warna dan mudah untuk ditemukan di toko obat dan kosmetik lokal Anda.
lisalohan/lisalohan.github.io
_posts/2016-06-06-jenis-eyeliners-dan-cara-menggunakannya.markdown
Markdown
mit
2,464
var gulp = require('gulp'); var less = require('gulp-less'); var browserSync = require('browser-sync').create(); var header = require('gulp-header'); var cleanCSS = require('gulp-clean-css'); var rename = require("gulp-rename"); var uglify = require('gulp-uglify'); var filter = require('gulp-filter'); var pkg = require('./package.json'); // Set the banner content var banner = ['/*!\n', ' * Max Rohrer - <%= pkg.title %> v<%= pkg.version %> (<%= pkg.homepage %>)\n', ' * Copyright 2017-' + (new Date()).getFullYear(), ' <%= pkg.author %>\n', ' */\n', '' ].join(''); // Compile LESS files from /less into /css gulp.task('less', function() { var f = filter(['*', '!mixins.less', '!variables.less']); return gulp.src('less/*.less') .pipe(f) .pipe(less()) .pipe(header(banner, { pkg: pkg })) .pipe(gulp.dest('css')) .pipe(browserSync.reload({ stream: true })) }); // Minify compiled CSS gulp.task('minify-css', ['less'], function() { return gulp.src('css/freelancer.css') .pipe(cleanCSS({ compatibility: 'ie8' })) .pipe(rename({ suffix: '.min' })) .pipe(gulp.dest('css')) .pipe(browserSync.reload({ stream: true })) }); // Minify JS gulp.task('minify-js', function() { return gulp.src('js/freelancer.js') .pipe(uglify()) .pipe(header(banner, { pkg: pkg })) .pipe(rename({ suffix: '.min' })) .pipe(gulp.dest('js')) .pipe(browserSync.reload({ stream: true })) }); // Copy vendor libraries from /node_modules into /vendor gulp.task('copy', function() { gulp.src(['node_modules/bootstrap/dist/**/*', '!**/npm.js', '!**/bootstrap-theme.*', '!**/*.map']) .pipe(gulp.dest('vendor/bootstrap')) gulp.src(['node_modules/jquery/dist/jquery.js', 'node_modules/jquery/dist/jquery.min.js']) .pipe(gulp.dest('vendor/jquery')) gulp.src([ 'node_modules/font-awesome/**', '!node_modules/font-awesome/**/*.map', '!node_modules/font-awesome/.npmignore', '!node_modules/font-awesome/*.txt', '!node_modules/font-awesome/*.md', '!node_modules/font-awesome/*.json' ]) .pipe(gulp.dest('vendor/font-awesome')) }) // Run everything gulp.task('default', ['less', 'minify-css', 'minify-js', 'copy']); // Configure the browserSync task gulp.task('browserSync', function() { browserSync.init({ server: { baseDir: '' }, }) }) // Dev task with browserSync gulp.task('dev', ['browserSync', 'less', 'minify-css', 'minify-js'], function() { gulp.watch('less/*.less', ['less']); gulp.watch('css/*.css', ['minify-css']); gulp.watch('js/*.js', ['minify-js']); // Reloads the browser whenever HTML or JS files change gulp.watch('*.html', browserSync.reload); gulp.watch('js/**/*.js', browserSync.reload); });
maxroar/maxroar.github.io
gulpfile.js
JavaScript
mit
2,957
import React from 'react'; import PropTypes from 'prop-types'; import DatePicker from './DatePicker'; import Cell from './Cell'; import { View } from 'react-native'; class CellDatePicker extends React.Component { static defaultProps = { mode: 'datetime', date: new Date() } static proptTypes = { ...Cell.propTypes, onShow: PropTypes.func, onDateSelected: PropTypes.func.isRequired, mode: PropTypes.string.isRequired, date: PropTypes.object, cancelText: PropTypes.string } handleOnDateSelected = (date) => { this.props.onDateSelected(date); } handleDateOnPress = () => { if (this.props.onPress) this.props.onPress(); this._datePicker.open(); } render() { return ( <View> <DatePicker ref={component => this._datePicker = component} date={this.props.date} mode={this.props.mode} onDateSelected={this.handleOnDateSelected} cancelText={this.props.cancelText} /> <Cell onPress={this.handleDateOnPress} {...this.props} /> </View> ); } } export default CellDatePicker;
lodev09/react-native-cell-components
components/CellDatePicker.js
JavaScript
mit
1,159
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>lc: 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.13.2 / lc - 8.9.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> lc <small> 8.9.0 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2021-11-25 05:11:20 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-11-25 05:11: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 conf-findutils 1 Virtual package relying on findutils conf-gmp 3 Virtual package relying on a GMP lib system installation coq 8.13.2 Formal proof management system num 0 The Num library for arbitrary-precision integer and rational arithmetic ocaml 4.05.0 The OCaml compiler (virtual package) ocaml-base-compiler 4.05.0 Official 4.05.0 release ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;Hugo.Herbelin@inria.fr&quot; homepage: &quot;http://www.math.unifi.it/~/maggesi/mechanized/&quot; license: &quot;LGPL 2.1&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/lc&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.9&quot; &amp; &lt; &quot;8.10~&quot;} ] tags: [ &quot;keyword: modules&quot; &quot;keyword: monads&quot; &quot;keyword: category&quot; &quot;keyword: lambda calculus&quot; &quot;keyword: higher-order syntax&quot; &quot;category: Computer Science/Lambda Calculi&quot; &quot;date: 2006-01-12&quot; &quot;date: 2008-09-9&quot; ] authors: [ &quot;André Hirschowitz &lt;ah@math.unice.fr&gt; [http://math.unice.fr/~ah/]&quot; &quot;Marco Maggesi &lt;maggesi@math.unifi.it&gt; [http://www.math.unifi.it/~maggesi/]&quot; ] bug-reports: &quot;https://github.com/coq-contribs/lc/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/lc.git&quot; synopsis: &quot;Modules over monads and lambda-calculi&quot; description: &quot;&quot;&quot; We define a notion of module over a monad and use it to propose a new definition (or semantics) for abstract syntax (with binding constructions). Using our notion of module, we build a category of `exponential&#39; monads, which can be understood as the category of lambda-calculi, and prove that it has an initial object (the pure untyped lambda-calculus).&quot;&quot;&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/lc/archive/v8.9.0.tar.gz&quot; checksum: &quot;md5=d05f97445fa90878ab589e9e116e559d&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-lc.8.9.0 coq.8.13.2</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.13.2). The following dependencies couldn&#39;t be met: - coq-lc -&gt; coq &lt; 8.10~ -&gt; ocaml &lt; 4.03.0 base of this switch (use `--unlock-base&#39; to force) 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 coq-lc.8.9.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://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </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>
coq-bench/coq-bench.github.io
clean/Linux-x86_64-4.05.0-2.0.1/released/8.13.2/lc/8.9.0.html
HTML
mit
7,586
using Newtonsoft.Json; using Newtonsoft.Json.Converters; namespace ChromeRuntimeDownloader.Models { public class NugetInfo { public NugetInfo(PackageType packageType, string name, string version, CopyPath[] copyPaths) { PackageType = packageType; Name = name; Version = version; CopyPaths = copyPaths; } [JsonConverter(typeof(StringEnumConverter))] public PackageType PackageType { get; } public string Name { get; set; } public string Version { get; set; } public CopyPath[] CopyPaths { get; } } }
pkudrel/ChromeRuntimeDownloader
src/ChromeRuntimeDownloader/Models/NugetInfo.cs
C#
mit
626
using UnityEngine; namespace Atlas.Examples { public sealed class Example_Range { // generic character class public class Character { public void ApplyDamage( float damage ) { /* ... */ } } public void OnCharacterHit( Character hitCharacter ) { // get randomized damage amount float damageAmount = m_damageRange.GetRandomValue(); // apply damage hitCharacter.ApplyDamage( damageAmount ); } // range declaration [SerializeField] private Range m_damageRange = new Range( 6f, 20f ); } }
david-knopp/Atlas
Assets/Examples/Scripts/Runtime/Math/Example_Range.cs
C#
mit
635
{% load i18n %} {% if messages %} <ul class="messages"> {% for message in messages %} <li{% if message.tags %} class="{{ message.tags }}"{% endif %}>{{ message }}</li> {% endfor %} </ul> {% endif %} <form action="{% url "contact" %}?success={{ request.path }}" method="post" {%if form.errors %}class="errors"{% endif %}>{% csrf_token %} <p class="instructions">{% trans "Fields marked with a * are required" %}</p> {{ form.as_p }} <input type="submit" value="{% trans "Submit" %}" /> </form>
denverfoundation/storybase
apps/cmsplugin_storybase/templates/sitecontactmessage_form_plugin.html
HTML
mit
509
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>User agent detail - Mozilla/5.0 (Linux; U; Android 2.3.5; en-us; ICE 401e Build/FSV05) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.min.css"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link href="../circle.css" rel="stylesheet"> </head> <body> <div class="container"> <div class="section"> <h1 class="header center orange-text">User agent detail</h1> <div class="row center"> <h5 class="header light"> Mozilla/5.0 (Linux; U; Android 2.3.5; en-us; ICE 401e Build/FSV05) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 </h5> </div> </div> <div class="section"> <table class="striped"><tr><th></th><th colspan="3">General</th><th colspan="5">Device</th><th colspan="3">Bot</th><th colspan="2"></th></tr><tr><th>Provider</th><th>Browser</th><th>Engine</th><th>OS</th><th>Brand</th><th>Model</th><th>Type</th><th>Is mobile</th><th>Is touch</th><th>Is bot</th><th>Name</th><th>Type</th><th>Parse time</th><th>Actions</th></tr><tr><th colspan="14" class="green lighten-3">Test suite</th></tr><tr><td>UAParser<br /><small>v0.5.0.2</small><br /><small>vendor/thadafinser/uap-core/tests/test_device.yaml</small></td><td> </td><td><i class="material-icons">close</i></td><td> </td><td style="border-left: 1px solid #555">Cloudfone</td><td>Cloudfone ICE 401e</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-cfed3005-df48-4fa8-bf03-4f6ef8988f59">Detail</a> <!-- Modal Structure --> <div id="modal-cfed3005-df48-4fa8-bf03-4f6ef8988f59" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>UAParser result detail</h4> <p><pre><code class="php">Array ( [user_agent_string] => Mozilla/5.0 (Linux; U; Android 2.3.5; en-us; ICE 401e Build/FSV05) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 [family] => Cloudfone ICE 401e [brand] => Cloudfone [model] => Cloudfone ICE 401e ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><th colspan="14" class="green lighten-3">Providers</th></tr><tr><td>BrowscapFull<br /><small>6014</small><br /></td><td>Android 4.0</td><td>WebKit </td><td>Android 2.3</td><td style="border-left: 1px solid #555"></td><td></td><td>Mobile Phone</td><td>yes</td><td>yes</td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.089</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-47a9cd06-e213-4882-bc34-db6aed664223">Detail</a> <!-- Modal Structure --> <div id="modal-47a9cd06-e213-4882-bc34-db6aed664223" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>BrowscapFull result detail</h4> <p><pre><code class="php">stdClass Object ( [browser_name_regex] => /^mozilla\/5\.0 \(.*linux.*android.2\.3.* build\/.*\).*applewebkit\/.*\(.*khtml,.*like gecko.*\).*version\/4\.0.*safari.*$/ [browser_name_pattern] => mozilla/5.0 (*linux*android?2.3* build/*)*applewebkit/*(*khtml,*like gecko*)*version/4.0*safari* [parent] => Android Browser 4.0 [comment] => Android Browser 4.0 [browser] => Android [browser_type] => Browser [browser_bits] => 32 [browser_maker] => Google Inc [browser_modus] => unknown [version] => 4.0 [majorver] => 4 [minorver] => 0 [platform] => Android [platform_version] => 2.3 [platform_description] => Android OS [platform_bits] => 32 [platform_maker] => Google Inc [alpha] => [beta] => [win16] => [win32] => [win64] => [frames] => 1 [iframes] => 1 [tables] => 1 [cookies] => 1 [backgroundsounds] => [javascript] => 1 [vbscript] => [javaapplets] => 1 [activexcontrols] => [ismobiledevice] => 1 [istablet] => [issyndicationreader] => [crawler] => [isfake] => [isanonymized] => [ismodified] => [cssversion] => 3 [aolversion] => 0 [device_name] => general Mobile Phone [device_maker] => unknown [device_type] => Mobile Phone [device_pointing_method] => touchscreen [device_code_name] => general Mobile Phone [device_brand_name] => unknown [renderingengine_name] => WebKit [renderingengine_version] => unknown [renderingengine_description] => For Google Chrome, iOS (including both mobile Safari, WebViews within third-party apps, and web clips), Safari, Arora, Midori, OmniWeb, Shiira, iCab since version 4, Web, SRWare Iron, Rekonq, and in Maxthon 3. [renderingengine_maker] => Apple Inc ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>BrowscapLite<br /><small>6014</small><br /></td><td>Android 4.0</td><td><i class="material-icons">close</i></td><td>Android </td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>Mobile Phone</td><td>yes</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.006</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-42bb56ba-b834-47c5-bea0-c0270e9ab371">Detail</a> <!-- Modal Structure --> <div id="modal-42bb56ba-b834-47c5-bea0-c0270e9ab371" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>BrowscapLite result detail</h4> <p><pre><code class="php">stdClass Object ( [browser_name_regex] => /^mozilla\/5\.0 \(.*linux.*android.* build\/.*\).*applewebkit\/.*\(.*khtml,.*like gecko.*\).*version\/4\.0.*safari.*$/ [browser_name_pattern] => mozilla/5.0 (*linux*android* build/*)*applewebkit/*(*khtml,*like gecko*)*version/4.0*safari* [parent] => Android Browser 4.0 [comment] => Android Browser 4.0 [browser] => Android [browser_type] => unknown [browser_bits] => 0 [browser_maker] => unknown [browser_modus] => unknown [version] => 4.0 [majorver] => 0 [minorver] => 0 [platform] => Android [platform_version] => unknown [platform_description] => unknown [platform_bits] => 0 [platform_maker] => unknown [alpha] => false [beta] => false [win16] => false [win32] => false [win64] => false [frames] => false [iframes] => false [tables] => false [cookies] => false [backgroundsounds] => false [javascript] => false [vbscript] => false [javaapplets] => false [activexcontrols] => false [ismobiledevice] => 1 [istablet] => [issyndicationreader] => false [crawler] => false [isfake] => false [isanonymized] => false [ismodified] => false [cssversion] => 0 [aolversion] => 0 [device_name] => unknown [device_maker] => unknown [device_type] => Mobile Phone [device_pointing_method] => unknown [device_code_name] => unknown [device_brand_name] => unknown [renderingengine_name] => unknown [renderingengine_version] => unknown [renderingengine_description] => unknown [renderingengine_maker] => unknown ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>BrowscapPhp<br /><small>6014</small><br /></td><td>Android 4.0</td><td><i class="material-icons">close</i></td><td>Android </td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>Mobile Phone</td><td>yes</td><td>yes</td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.038</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-ad0041a2-b0f4-43f6-a70d-cad1443caa68">Detail</a> <!-- Modal Structure --> <div id="modal-ad0041a2-b0f4-43f6-a70d-cad1443caa68" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>BrowscapPhp result detail</h4> <p><pre><code class="php">stdClass Object ( [browser_name_regex] => /^mozilla\/5\.0 \(.*linux.*android.* build\/.*\).*applewebkit\/.*\(.*khtml,.*like gecko.*\).*version\/4\.0.*safari.*$/ [browser_name_pattern] => mozilla/5.0 (*linux*android* build/*)*applewebkit/*(*khtml,*like gecko*)*version/4.0*safari* [parent] => Android Browser 4.0 [comment] => Android Browser 4.0 [browser] => Android [browser_type] => unknown [browser_bits] => 0 [browser_maker] => Google Inc [browser_modus] => unknown [version] => 4.0 [majorver] => 4 [minorver] => 0 [platform] => Android [platform_version] => unknown [platform_description] => unknown [platform_bits] => 0 [platform_maker] => unknown [alpha] => false [beta] => false [win16] => false [win32] => false [win64] => false [frames] => false [iframes] => false [tables] => false [cookies] => false [backgroundsounds] => false [javascript] => false [vbscript] => false [javaapplets] => false [activexcontrols] => false [ismobiledevice] => 1 [istablet] => [issyndicationreader] => false [crawler] => [isfake] => false [isanonymized] => false [ismodified] => false [cssversion] => 0 [aolversion] => 0 [device_name] => unknown [device_maker] => unknown [device_type] => Mobile Phone [device_pointing_method] => touchscreen [device_code_name] => unknown [device_brand_name] => unknown [renderingengine_name] => unknown [renderingengine_version] => unknown [renderingengine_description] => unknown [renderingengine_maker] => unknown ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>DonatjUAParser<br /><small>v0.5.1</small><br /></td><td>Android Browser 4.0</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-15fbc1f0-2615-4d42-b5d9-a30dd647b050">Detail</a> <!-- Modal Structure --> <div id="modal-15fbc1f0-2615-4d42-b5d9-a30dd647b050" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>DonatjUAParser result detail</h4> <p><pre><code class="php">Array ( [platform] => Android [browser] => Android Browser [version] => 4.0 ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>JenssegersAgent<br /><small>v2.3.3</small><br /></td><td>Safari 4.0</td><td><i class="material-icons">close</i></td><td>AndroidOS 2.3.5</td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>yes</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.001</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-b85a2b91-6a55-4436-a82c-1ea0d46e2e51">Detail</a> <!-- Modal Structure --> <div id="modal-b85a2b91-6a55-4436-a82c-1ea0d46e2e51" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>JenssegersAgent result detail</h4> <p><pre><code class="php">Array ( [browserName] => Safari [browserVersion] => 4.0 [osName] => AndroidOS [osVersion] => 2.3.5 [deviceModel] => WebKit [isMobile] => 1 [isRobot] => [botName] => ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>NeutrinoApiCom<br /><small></small><br /></td><td>Android Webkit 4.0</td><td><i class="material-icons">close</i></td><td>Android 2.3.5</td><td style="border-left: 1px solid #555"></td><td>ICE 401e</td><td>mobile-browser</td><td>yes</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.29402</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-8c2a7a4e-3fbf-4df2-8d61-5e730422f67b">Detail</a> <!-- Modal Structure --> <div id="modal-8c2a7a4e-3fbf-4df2-8d61-5e730422f67b" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>NeutrinoApiCom result detail</h4> <p><pre><code class="php">stdClass Object ( [mobile_screen_height] => 480 [is_mobile] => 1 [type] => mobile-browser [mobile_brand] => Generic [mobile_model] => ICE 401e [version] => 4.0 [is_android] => 1 [browser_name] => Android Webkit [operating_system_family] => Android [operating_system_version] => 2.3.5 [is_ios] => [producer] => Google Inc. [operating_system] => Android 2.3.x Gingerbread [mobile_screen_width] => 320 [mobile_browser] => Android Webkit ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>PiwikDeviceDetector<br /><small>3.6.1</small><br /></td><td>Android Browser </td><td>WebKit </td><td>Android 2.3</td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>yes</td><td></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.007</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-4a941d34-a8d3-4914-9724-346f60ad7046">Detail</a> <!-- Modal Structure --> <div id="modal-4a941d34-a8d3-4914-9724-346f60ad7046" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>PiwikDeviceDetector result detail</h4> <p><pre><code class="php">Array ( [client] => Array ( [type] => browser [name] => Android Browser [short_name] => AN [version] => [engine] => WebKit ) [operatingSystem] => Array ( [name] => Android [short_name] => AND [version] => 2.3 [platform] => ) [device] => Array ( [brand] => [brandName] => [model] => [device] => [deviceName] => ) [bot] => [extra] => Array ( [isBot] => [isBrowser] => 1 [isFeedReader] => [isMobileApp] => [isPIM] => [isLibrary] => [isMediaPlayer] => [isCamera] => [isCarBrowser] => [isConsole] => [isFeaturePhone] => [isPhablet] => [isPortableMediaPlayer] => [isSmartDisplay] => [isSmartphone] => [isTablet] => [isTV] => [isDesktop] => [isMobile] => 1 [isTouchEnabled] => ) ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>SinergiBrowserDetector<br /><small>6.0.1</small><br /></td><td>Navigator 4.0</td><td><i class="material-icons">close</i></td><td>Android 2.3.5</td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td></td><td><i class="material-icons">close</i></td><td>yes</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.001</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-ec1cd248-02b0-457e-8a9d-35bb99af008c">Detail</a> <!-- Modal Structure --> <div id="modal-ec1cd248-02b0-457e-8a9d-35bb99af008c" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>SinergiBrowserDetector result detail</h4> <p><pre><code class="php">Array ( [browser] => Sinergi\BrowserDetector\Browser Object ( [userAgent:Sinergi\BrowserDetector\Browser:private] => Sinergi\BrowserDetector\UserAgent Object ( [userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/5.0 (Linux; U; Android 2.3.5; en-us; ICE 401e Build/FSV05) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 ) [name:Sinergi\BrowserDetector\Browser:private] => Navigator [version:Sinergi\BrowserDetector\Browser:private] => 4.0 [isRobot:Sinergi\BrowserDetector\Browser:private] => [isChromeFrame:Sinergi\BrowserDetector\Browser:private] => [isFacebookWebView:Sinergi\BrowserDetector\Browser:private] => [isCompatibilityMode:Sinergi\BrowserDetector\Browser:private] => ) [operatingSystem] => Sinergi\BrowserDetector\Os Object ( [name:Sinergi\BrowserDetector\Os:private] => Android [version:Sinergi\BrowserDetector\Os:private] => 2.3.5 [isMobile:Sinergi\BrowserDetector\Os:private] => 1 [userAgent:Sinergi\BrowserDetector\Os:private] => Sinergi\BrowserDetector\UserAgent Object ( [userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/5.0 (Linux; U; Android 2.3.5; en-us; ICE 401e Build/FSV05) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 ) ) [device] => Sinergi\BrowserDetector\Device Object ( [name:Sinergi\BrowserDetector\Device:private] => unknown [userAgent:Sinergi\BrowserDetector\Device:private] => Sinergi\BrowserDetector\UserAgent Object ( [userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/5.0 (Linux; U; Android 2.3.5; en-us; ICE 401e Build/FSV05) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 ) ) ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>UAParser<br /><small>v3.4.5</small><br /></td><td>Android 2.3.5</td><td><i class="material-icons">close</i></td><td>Android 2.3.5</td><td style="border-left: 1px solid #555">Cloudfone</td><td>Cloudfone ICE 401e</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.001</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-3160e405-8a8f-46dd-8f47-5115f06462d2">Detail</a> <!-- Modal Structure --> <div id="modal-3160e405-8a8f-46dd-8f47-5115f06462d2" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>UAParser result detail</h4> <p><pre><code class="php">UAParser\Result\Client Object ( [ua] => UAParser\Result\UserAgent Object ( [major] => 2 [minor] => 3 [patch] => 5 [family] => Android ) [os] => UAParser\Result\OperatingSystem Object ( [major] => 2 [minor] => 3 [patch] => 5 [patchMinor] => [family] => Android ) [device] => UAParser\Result\Device Object ( [brand] => Cloudfone [model] => Cloudfone ICE 401e [family] => Cloudfone ICE 401e ) [originalUserAgent] => Mozilla/5.0 (Linux; U; Android 2.3.5; en-us; ICE 401e Build/FSV05) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>UserAgentApiCom<br /><small></small><br /></td><td>Safari 533.1</td><td>WebKit 533.1</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>Mobile</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.15201</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-afeb05fb-26b9-4509-b8ac-0c604a9e97d6">Detail</a> <!-- Modal Structure --> <div id="modal-afeb05fb-26b9-4509-b8ac-0c604a9e97d6" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>UserAgentApiCom result detail</h4> <p><pre><code class="php">stdClass Object ( [platform_name] => Android [platform_version] => 2.3.5 [platform_type] => Mobile [browser_name] => Safari [browser_version] => 533.1 [engine_name] => WebKit [engine_version] => 533.1 ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>UserAgentStringCom<br /><small></small><br /></td><td>Android Webkit Browser </td><td><i class="material-icons">close</i></td><td>Android 2.3.5</td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.10801</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-08a9ddfb-838f-48d7-9ede-1d132306b2ee">Detail</a> <!-- Modal Structure --> <div id="modal-08a9ddfb-838f-48d7-9ede-1d132306b2ee" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>UserAgentStringCom result detail</h4> <p><pre><code class="php">stdClass Object ( [agent_type] => Browser [agent_name] => Android Webkit Browser [agent_version] => -- [os_type] => Android [os_name] => Android [os_versionName] => [os_versionNumber] => 2.3.5 [os_producer] => [os_producerURL] => [linux_distibution] => Null [agent_language] => English - United States [agent_languageTag] => en-us ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>WhatIsMyBrowserCom<br /><small></small><br /></td><td>Android Browser 4.0</td><td>WebKit 533.1</td><td>Android 2.3.5</td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.23701</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-5fc1ff22-a74d-481b-9ad1-fcfde73ded9c">Detail</a> <!-- Modal Structure --> <div id="modal-5fc1ff22-a74d-481b-9ad1-fcfde73ded9c" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>WhatIsMyBrowserCom result detail</h4> <p><pre><code class="php">stdClass Object ( [operating_system_name] => Android [simple_sub_description_string] => [simple_browser_string] => Android Browser 4 on Android (Gingerbread) [browser_version] => 4 [extra_info] => Array ( ) [operating_platform] => [extra_info_table] => stdClass Object ( [System Build] => FSV05 ) [layout_engine_name] => WebKit [detected_addons] => Array ( ) [operating_system_flavour_code] => [hardware_architecture] => [operating_system_flavour] => [operating_system_frameworks] => Array ( ) [browser_name_code] => android-browser [operating_system_version] => Gingerbread [simple_operating_platform_string] => [is_abusive] => [layout_engine_version] => 533.1 [browser_capabilities] => Array ( ) [operating_platform_vendor_name] => [operating_system] => Android (Gingerbread) [operating_system_version_full] => 2.3.5 [operating_platform_code] => [browser_name] => Android Browser [operating_system_name_code] => android [user_agent] => Mozilla/5.0 (Linux; U; Android 2.3.5; en-us; ICE 401e Build/FSV05) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1 [browser_version_full] => 4.0 [browser] => Android Browser 4 ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>WhichBrowser<br /><small>v2.0.18</small><br /></td><td>Android Browser </td><td>Webkit 533.1</td><td>Android 2.3.5</td><td style="border-left: 1px solid #555"></td><td>ICE 401e</td><td>mobile:smart</td><td>yes</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.001</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-083a336f-5d73-4505-84f3-c5fc9bb78652">Detail</a> <!-- Modal Structure --> <div id="modal-083a336f-5d73-4505-84f3-c5fc9bb78652" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>WhichBrowser result detail</h4> <p><pre><code class="php">Array ( [browser] => Array ( [name] => Android Browser ) [engine] => Array ( [name] => Webkit [version] => 533.1 ) [os] => Array ( [name] => Android [version] => 2.3.5 ) [device] => Array ( [type] => mobile [subtype] => smart [model] => ICE 401e ) ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>Woothee<br /><small>v1.2.0</small><br /></td><td>Safari 4.0</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>smartphone</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-f00e7198-0e22-49fe-bad0-dbb3a9cde9b9">Detail</a> <!-- Modal Structure --> <div id="modal-f00e7198-0e22-49fe-bad0-dbb3a9cde9b9" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>Woothee result detail</h4> <p><pre><code class="php">Array ( [name] => Safari [vendor] => Apple [version] => 4.0 [category] => smartphone [os] => Android [os_version] => 2.3.5 ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>Wurfl<br /><small>1.7.1.0</small><br /></td><td>Android Webkit 2.3.5</td><td><i class="material-icons">close</i></td><td>Android 2.3.5</td><td style="border-left: 1px solid #555"></td><td></td><td>Smartphone</td><td>yes</td><td>yes</td><td style="border-left: 1px solid #555"></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.017</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-a2bedf8c-4a95-42a7-96c5-aaf233b2ac50">Detail</a> <!-- Modal Structure --> <div id="modal-a2bedf8c-4a95-42a7-96c5-aaf233b2ac50" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>Wurfl result detail</h4> <p><pre><code class="php">Array ( [virtual] => Array ( [is_android] => true [is_ios] => false [is_windows_phone] => false [is_app] => false [is_full_desktop] => false [is_largescreen] => false [is_mobile] => true [is_robot] => false [is_smartphone] => true [is_touchscreen] => true [is_wml_preferred] => false [is_xhtmlmp_preferred] => false [is_html_preferred] => true [advertised_device_os] => Android [advertised_device_os_version] => 2.3.5 [advertised_browser] => Android Webkit [advertised_browser_version] => 2.3.5 [complete_device_name] => Generic Android 2.3 [device_name] => Generic Android 2.3 [form_factor] => Smartphone [is_phone] => true [is_app_webview] => false ) [all] => Array ( [brand_name] => Generic [model_name] => Android 2.3 [unique] => true [ununiqueness_handler] => [is_wireless_device] => true [device_claims_web_support] => true [has_qwerty_keyboard] => true [can_skip_aligned_link_row] => true [uaprof] => [uaprof2] => [uaprof3] => [nokia_series] => 0 [nokia_edition] => 0 [device_os] => Android [mobile_browser] => Android Webkit [mobile_browser_version] => [device_os_version] => 2.3 [pointing_method] => touchscreen [release_date] => 2010_november [marketing_name] => [model_extra_info] => [nokia_feature_pack] => 0 [can_assign_phone_number] => true [is_tablet] => false [manufacturer_name] => [is_bot] => false [is_google_glass] => false [proportional_font] => false [built_in_back_button_support] => false [card_title_support] => true [softkey_support] => false [table_support] => true [numbered_menus] => false [menu_with_select_element_recommended] => false [menu_with_list_of_links_recommended] => true [icons_on_menu_items_support] => false [break_list_of_links_with_br_element_recommended] => true [access_key_support] => false [wrap_mode_support] => false [times_square_mode_support] => false [deck_prefetch_support] => false [elective_forms_recommended] => true [wizards_recommended] => false [image_as_link_support] => false [insert_br_element_after_widget_recommended] => false [wml_can_display_images_and_text_on_same_line] => false [wml_displays_image_in_center] => false [opwv_wml_extensions_support] => false [wml_make_phone_call_string] => wtai://wp/mc; [chtml_display_accesskey] => false [emoji] => false [chtml_can_display_images_and_text_on_same_line] => false [chtml_displays_image_in_center] => false [imode_region] => none [chtml_make_phone_call_string] => tel: [chtml_table_support] => false [xhtml_honors_bgcolor] => true [xhtml_supports_forms_in_table] => true [xhtml_support_wml2_namespace] => false [xhtml_autoexpand_select] => false [xhtml_select_as_dropdown] => false [xhtml_select_as_radiobutton] => false [xhtml_select_as_popup] => false [xhtml_display_accesskey] => false [xhtml_supports_invisible_text] => false [xhtml_supports_inline_input] => false [xhtml_supports_monospace_font] => false [xhtml_supports_table_for_layout] => true [xhtml_supports_css_cell_table_coloring] => true [xhtml_format_as_css_property] => false [xhtml_format_as_attribute] => false [xhtml_nowrap_mode] => false [xhtml_marquee_as_css_property] => false [xhtml_readable_background_color1] => #FFFFFF [xhtml_readable_background_color2] => #FFFFFF [xhtml_allows_disabled_form_elements] => true [xhtml_document_title_support] => true [xhtml_preferred_charset] => iso-8859-1 [opwv_xhtml_extensions_support] => false [xhtml_make_phone_call_string] => tel: [xhtmlmp_preferred_mime_type] => text/html [xhtml_table_support] => true [xhtml_send_sms_string] => sms: [xhtml_send_mms_string] => mms: [xhtml_file_upload] => supported [cookie_support] => true [accept_third_party_cookie] => true [xhtml_supports_iframe] => full [xhtml_avoid_accesskeys] => true [xhtml_can_embed_video] => none [ajax_support_javascript] => true [ajax_manipulate_css] => true [ajax_support_getelementbyid] => true [ajax_support_inner_html] => true [ajax_xhr_type] => standard [ajax_manipulate_dom] => true [ajax_support_events] => true [ajax_support_event_listener] => true [ajax_preferred_geoloc_api] => w3c_api [xhtml_support_level] => 4 [preferred_markup] => html_web_4_0 [wml_1_1] => false [wml_1_2] => false [wml_1_3] => false [html_wi_w3_xhtmlbasic] => true [html_wi_oma_xhtmlmp_1_0] => true [html_wi_imode_html_1] => false [html_wi_imode_html_2] => false [html_wi_imode_html_3] => false [html_wi_imode_html_4] => false [html_wi_imode_html_5] => false [html_wi_imode_htmlx_1] => false [html_wi_imode_htmlx_1_1] => false [html_wi_imode_compact_generic] => false [html_web_3_2] => true [html_web_4_0] => true [voicexml] => false [multipart_support] => false [total_cache_disable_support] => false [time_to_live_support] => false [resolution_width] => 320 [resolution_height] => 480 [columns] => 60 [max_image_width] => 320 [max_image_height] => 400 [rows] => 40 [physical_screen_width] => 34 [physical_screen_height] => 50 [dual_orientation] => true [density_class] => 1.0 [wbmp] => true [bmp] => false [epoc_bmp] => false [gif_animated] => false [jpg] => true [png] => true [tiff] => false [transparent_png_alpha] => true [transparent_png_index] => true [svgt_1_1] => false [svgt_1_1_plus] => false [greyscale] => false [gif] => true [colors] => 65536 [webp_lossy_support] => false [webp_lossless_support] => false [post_method_support] => true [basic_authentication_support] => true [empty_option_value_support] => true [emptyok] => false [nokia_voice_call] => false [wta_voice_call] => false [wta_phonebook] => false [wta_misc] => false [wta_pdc] => false [https_support] => true [phone_id_provided] => false [max_data_rate] => 384 [wifi] => true [sdio] => false [vpn] => false [has_cellular_radio] => true [max_deck_size] => 2000000 [max_url_length_in_requests] => 256 [max_url_length_homepage] => 0 [max_url_length_bookmark] => 0 [max_url_length_cached_page] => 0 [max_no_of_connection_settings] => 0 [max_no_of_bookmarks] => 0 [max_length_of_username] => 0 [max_length_of_password] => 0 [max_object_size] => 0 [downloadfun_support] => false [directdownload_support] => true [inline_support] => false [oma_support] => true [ringtone] => false [ringtone_3gpp] => false [ringtone_midi_monophonic] => false [ringtone_midi_polyphonic] => false [ringtone_imelody] => false [ringtone_digiplug] => false [ringtone_compactmidi] => false [ringtone_mmf] => false [ringtone_rmf] => false [ringtone_xmf] => false [ringtone_amr] => false [ringtone_awb] => false [ringtone_aac] => false [ringtone_wav] => false [ringtone_mp3] => false [ringtone_spmidi] => false [ringtone_qcelp] => false [ringtone_voices] => 1 [ringtone_df_size_limit] => 0 [ringtone_directdownload_size_limit] => 0 [ringtone_inline_size_limit] => 0 [ringtone_oma_size_limit] => 0 [wallpaper] => false [wallpaper_max_width] => 0 [wallpaper_max_height] => 0 [wallpaper_preferred_width] => 0 [wallpaper_preferred_height] => 0 [wallpaper_resize] => none [wallpaper_wbmp] => false [wallpaper_bmp] => false [wallpaper_gif] => false [wallpaper_jpg] => false [wallpaper_png] => false [wallpaper_tiff] => false [wallpaper_greyscale] => false [wallpaper_colors] => 2 [wallpaper_df_size_limit] => 0 [wallpaper_directdownload_size_limit] => 0 [wallpaper_inline_size_limit] => 0 [wallpaper_oma_size_limit] => 0 [screensaver] => false [screensaver_max_width] => 0 [screensaver_max_height] => 0 [screensaver_preferred_width] => 0 [screensaver_preferred_height] => 0 [screensaver_resize] => none [screensaver_wbmp] => false [screensaver_bmp] => false [screensaver_gif] => false [screensaver_jpg] => false [screensaver_png] => false [screensaver_greyscale] => false [screensaver_colors] => 2 [screensaver_df_size_limit] => 0 [screensaver_directdownload_size_limit] => 0 [screensaver_inline_size_limit] => 0 [screensaver_oma_size_limit] => 0 [picture] => false [picture_max_width] => 0 [picture_max_height] => 0 [picture_preferred_width] => 0 [picture_preferred_height] => 0 [picture_resize] => none [picture_wbmp] => false [picture_bmp] => false [picture_gif] => false [picture_jpg] => false [picture_png] => false [picture_greyscale] => false [picture_colors] => 2 [picture_df_size_limit] => 0 [picture_directdownload_size_limit] => 0 [picture_inline_size_limit] => 0 [picture_oma_size_limit] => 0 [video] => false [oma_v_1_0_forwardlock] => false [oma_v_1_0_combined_delivery] => false [oma_v_1_0_separate_delivery] => false [streaming_video] => true [streaming_3gpp] => true [streaming_mp4] => true [streaming_mov] => false [streaming_video_size_limit] => 0 [streaming_real_media] => none [streaming_flv] => false [streaming_3g2] => false [streaming_vcodec_h263_0] => 10 [streaming_vcodec_h263_3] => -1 [streaming_vcodec_mpeg4_sp] => 2 [streaming_vcodec_mpeg4_asp] => -1 [streaming_vcodec_h264_bp] => 3.0 [streaming_acodec_amr] => nb [streaming_acodec_aac] => lc [streaming_wmv] => none [streaming_preferred_protocol] => rtsp [streaming_preferred_http_protocol] => progressive_download [wap_push_support] => false [connectionless_service_indication] => false [connectionless_service_load] => false [connectionless_cache_operation] => false [connectionoriented_unconfirmed_service_indication] => false [connectionoriented_unconfirmed_service_load] => false [connectionoriented_unconfirmed_cache_operation] => false [connectionoriented_confirmed_service_indication] => false [connectionoriented_confirmed_service_load] => false [connectionoriented_confirmed_cache_operation] => false [utf8_support] => true [ascii_support] => false [iso8859_support] => false [expiration_date] => false [j2me_cldc_1_0] => false [j2me_cldc_1_1] => false [j2me_midp_1_0] => false [j2me_midp_2_0] => false [doja_1_0] => false [doja_1_5] => false [doja_2_0] => false [doja_2_1] => false [doja_2_2] => false [doja_3_0] => false [doja_3_5] => false [doja_4_0] => false [j2me_jtwi] => false [j2me_mmapi_1_0] => false [j2me_mmapi_1_1] => false [j2me_wmapi_1_0] => false [j2me_wmapi_1_1] => false [j2me_wmapi_2_0] => false [j2me_btapi] => false [j2me_3dapi] => false [j2me_locapi] => false [j2me_nokia_ui] => false [j2me_motorola_lwt] => false [j2me_siemens_color_game] => false [j2me_siemens_extension] => false [j2me_heap_size] => 0 [j2me_max_jar_size] => 0 [j2me_storage_size] => 0 [j2me_max_record_store_size] => 0 [j2me_screen_width] => 0 [j2me_screen_height] => 0 [j2me_canvas_width] => 0 [j2me_canvas_height] => 0 [j2me_bits_per_pixel] => 0 [j2me_audio_capture_enabled] => false [j2me_video_capture_enabled] => false [j2me_photo_capture_enabled] => false [j2me_capture_image_formats] => none [j2me_http] => false [j2me_https] => false [j2me_socket] => false [j2me_udp] => false [j2me_serial] => false [j2me_gif] => false [j2me_gif89a] => false [j2me_jpg] => false [j2me_png] => false [j2me_bmp] => false [j2me_bmp3] => false [j2me_wbmp] => false [j2me_midi] => false [j2me_wav] => false [j2me_amr] => false [j2me_mp3] => false [j2me_mp4] => false [j2me_imelody] => false [j2me_rmf] => false [j2me_au] => false [j2me_aac] => false [j2me_realaudio] => false [j2me_xmf] => false [j2me_wma] => false [j2me_3gpp] => false [j2me_h263] => false [j2me_svgt] => false [j2me_mpeg4] => false [j2me_realvideo] => false [j2me_real8] => false [j2me_realmedia] => false [j2me_left_softkey_code] => 0 [j2me_right_softkey_code] => 0 [j2me_middle_softkey_code] => 0 [j2me_select_key_code] => 0 [j2me_return_key_code] => 0 [j2me_clear_key_code] => 0 [j2me_datefield_no_accepts_null_date] => false [j2me_datefield_broken] => false [receiver] => false [sender] => false [mms_max_size] => 0 [mms_max_height] => 0 [mms_max_width] => 0 [built_in_recorder] => false [built_in_camera] => true [mms_jpeg_baseline] => false [mms_jpeg_progressive] => false [mms_gif_static] => false [mms_gif_animated] => false [mms_png] => false [mms_bmp] => false [mms_wbmp] => false [mms_amr] => false [mms_wav] => false [mms_midi_monophonic] => false [mms_midi_polyphonic] => false [mms_midi_polyphonic_voices] => 0 [mms_spmidi] => false [mms_mmf] => false [mms_mp3] => false [mms_evrc] => false [mms_qcelp] => false [mms_ota_bitmap] => false [mms_nokia_wallpaper] => false [mms_nokia_operatorlogo] => false [mms_nokia_3dscreensaver] => false [mms_nokia_ringingtone] => false [mms_rmf] => false [mms_xmf] => false [mms_symbian_install] => false [mms_jar] => false [mms_jad] => false [mms_vcard] => false [mms_vcalendar] => false [mms_wml] => false [mms_wbxml] => false [mms_wmlc] => false [mms_video] => false [mms_mp4] => false [mms_3gpp] => false [mms_3gpp2] => false [mms_max_frame_rate] => 0 [nokiaring] => false [picturemessage] => false [operatorlogo] => false [largeoperatorlogo] => false [callericon] => false [nokiavcard] => false [nokiavcal] => false [sckl_ringtone] => false [sckl_operatorlogo] => false [sckl_groupgraphic] => false [sckl_vcard] => false [sckl_vcalendar] => false [text_imelody] => false [ems] => false [ems_variablesizedpictures] => false [ems_imelody] => false [ems_odi] => false [ems_upi] => false [ems_version] => 0 [siemens_ota] => false [siemens_logo_width] => 101 [siemens_logo_height] => 29 [siemens_screensaver_width] => 101 [siemens_screensaver_height] => 50 [gprtf] => false [sagem_v1] => false [sagem_v2] => false [panasonic] => false [sms_enabled] => true [wav] => false [mmf] => false [smf] => false [mld] => false [midi_monophonic] => false [midi_polyphonic] => false [sp_midi] => false [rmf] => false [xmf] => false [compactmidi] => false [digiplug] => false [nokia_ringtone] => false [imelody] => false [au] => false [amr] => false [awb] => false [aac] => true [mp3] => true [voices] => 1 [qcelp] => false [evrc] => false [flash_lite_version] => [fl_wallpaper] => false [fl_screensaver] => false [fl_standalone] => false [fl_browser] => false [fl_sub_lcd] => false [full_flash_support] => true [css_supports_width_as_percentage] => true [css_border_image] => webkit [css_rounded_corners] => webkit [css_gradient] => none [css_spriting] => true [css_gradient_linear] => none [is_transcoder] => false [transcoder_ua_header] => user-agent [rss_support] => false [pdf_support] => true [progressive_download] => true [playback_vcodec_h263_0] => 10 [playback_vcodec_h263_3] => -1 [playback_vcodec_mpeg4_sp] => 0 [playback_vcodec_mpeg4_asp] => -1 [playback_vcodec_h264_bp] => 3.0 [playback_real_media] => none [playback_3gpp] => true [playback_3g2] => false [playback_mp4] => true [playback_mov] => false [playback_acodec_amr] => nb [playback_acodec_aac] => none [playback_df_size_limit] => 0 [playback_directdownload_size_limit] => 0 [playback_inline_size_limit] => 0 [playback_oma_size_limit] => 0 [playback_acodec_qcelp] => false [playback_wmv] => none [hinted_progressive_download] => true [html_preferred_dtd] => html4 [viewport_supported] => true [viewport_width] => device_width_token [viewport_userscalable] => no [viewport_initial_scale] => [viewport_maximum_scale] => [viewport_minimum_scale] => [mobileoptimized] => false [handheldfriendly] => false [canvas_support] => full [image_inlining] => true [is_smarttv] => false [is_console] => false [nfc_support] => false [ux_full_desktop] => false [jqm_grade] => A [is_sencha_touch_ok] => false ) ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>Zsxsoft<br /><small>1.3</small><br /></td><td>Android Webkit 4.0</td><td><i class="material-icons">close</i></td><td>Android 2.3.5</td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-5d43e024-b46c-44f6-8914-529b05569bc2">Detail</a> <!-- Modal Structure --> <div id="modal-5d43e024-b46c-44f6-8914-529b05569bc2" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>Zsxsoft result detail</h4> <p><pre><code class="php">Array ( [browser] => Array ( [link] => http://developer.android.com/reference/android/webkit/package-summary.html [title] => Android Webkit 4.0 [name] => Android Webkit [version] => 4.0 [code] => android-webkit [image] => img/16/browser/android-webkit.png ) [os] => Array ( [link] => http://www.android.com/ [name] => Android [version] => 2.3.5 [code] => android [x64] => [title] => Android 2.3.5 [type] => os [dir] => os [image] => img/16/os/android.png ) [device] => Array ( [link] => [title] => [model] => [brand] => [code] => null [dir] => device [type] => device [image] => img/16/device/null.png ) [platform] => Array ( [link] => http://www.android.com/ [name] => Android [version] => 2.3.5 [code] => android [x64] => [title] => Android 2.3.5 [type] => os [dir] => os [image] => img/16/os/android.png ) ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr></table> </div> <div class="section"> <h1 class="header center orange-text">About this comparison</h1> <div class="row center"> <h5 class="header light"> The primary goal of this project is simple<br /> I wanted to know which user agent parser is the most accurate in each part - device detection, bot detection and so on...<br /> <br /> The secondary goal is to provide a source for all user agent parsers to improve their detection based on this results.<br /> <br /> You can also improve this further, by suggesting ideas at <a href="https://github.com/ThaDafinser/UserAgentParserComparison">ThaDafinser/UserAgentParserComparison</a><br /> <br /> The comparison is based on the abstraction by <a href="https://github.com/ThaDafinser/UserAgentParser">ThaDafinser/UserAgentParser</a> </h5> </div> </div> <div class="card"> <div class="card-content"> Comparison created <i>2016-05-10 07:58:12</i> | by <a href="https://github.com/ThaDafinser">ThaDafinser</a> </div> </div> </div> <script src="https://code.jquery.com/jquery-2.1.4.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/js/materialize.min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/list.js/1.2.0/list.min.js"></script> <script> $(document).ready(function(){ // the "href" attribute of .modal-trigger must specify the modal ID that wants to be triggered $('.modal-trigger').leanModal(); }); </script> </body> </html>
ThaDafinser/UserAgentParserComparison
v5/user-agent-detail/5e/3a/5e3a0806-8bf4-48cb-b456-5fce9128e6e4.html
HTML
mit
56,471
/* * Copyright (C) 2009 University of Washington * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package org.mamasdelrio.android.views; import org.mamasdelrio.android.logic.HierarchyElement; import org.mamasdelrio.android.utilities.TextUtils; import android.content.Context; import android.graphics.drawable.Drawable; import android.view.Gravity; import android.widget.ImageView; import android.widget.RelativeLayout; import android.widget.TextView; import org.mamasdelrio.android.widgets.QuestionWidget; public class HierarchyElementView extends RelativeLayout { private TextView mPrimaryTextView; private TextView mSecondaryTextView; private ImageView mIcon; public HierarchyElementView(Context context, HierarchyElement it) { super(context); setColor(it.getColor()); mIcon = new ImageView(context); mIcon.setImageDrawable(it.getIcon()); mIcon.setId(QuestionWidget.newUniqueId()); mIcon.setPadding(0, 0, dipToPx(4), 0); addView(mIcon, new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT)); mPrimaryTextView = new TextView(context); mPrimaryTextView.setTextAppearance(context, android.R.style.TextAppearance_Large); setPrimaryText(it.getPrimaryText()); mPrimaryTextView.setId(QuestionWidget.newUniqueId()); mPrimaryTextView.setGravity(Gravity.CENTER_VERTICAL); LayoutParams l = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); l.addRule(RelativeLayout.RIGHT_OF, mIcon.getId()); addView(mPrimaryTextView, l); mSecondaryTextView = new TextView(context); mSecondaryTextView.setText(it.getSecondaryText()); mSecondaryTextView.setTextAppearance(context, android.R.style.TextAppearance_Small); mSecondaryTextView.setGravity(Gravity.CENTER_VERTICAL); LayoutParams lp = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT); lp.addRule(RelativeLayout.BELOW, mPrimaryTextView.getId()); lp.addRule(RelativeLayout.RIGHT_OF, mIcon.getId()); addView(mSecondaryTextView, lp); setPadding(dipToPx(8), dipToPx(4), dipToPx(8), dipToPx(8)); } public void setPrimaryText(String text) { mPrimaryTextView.setText(TextUtils.textToHtml(text)); } public void setSecondaryText(String text) { mSecondaryTextView.setText(TextUtils.textToHtml(text)); } public void setIcon(Drawable icon) { mIcon.setImageDrawable(icon); } public void setColor(int color) { setBackgroundColor(color); } public void showSecondary(boolean bool) { if (bool) { mSecondaryTextView.setVisibility(VISIBLE); setMinimumHeight(dipToPx(64)); } else { mSecondaryTextView.setVisibility(GONE); setMinimumHeight(dipToPx(32)); } } public int dipToPx(int dip) { return (int) (dip * getResources().getDisplayMetrics().density + 0.5f); } }
srsudar/MamasDelRioAndroid
app/src/main/java/org/mamasdelrio/android/views/HierarchyElementView.java
Java
mit
3,631
package render import ( "image" "image/draw" //import png _ "image/png" "os" ) type LevelSheet struct { width int height int filePath string PixelArray []byte encoding string } //Constructor for LevelSheet func NewLevelSheet(filePath string) (LevelSheet, int, int) { reader, err := os.Open(filePath) if err != nil { panic(err) } defer reader.Close() img, str, err := image.Decode(reader) rect := img.Bounds() rgba := image.NewRGBA(rect) draw.Draw(rgba, rect, img, rect.Min, draw.Src) width := rect.Max.X - rect.Min.X height := rect.Max.Y - rect.Min.Y return LevelSheet{ width: width, height: height, filePath: filePath, PixelArray: rgba.Pix, encoding: str, }, width, height }
LokiTheMango/jatdg
game/render/levelsheet.go
GO
mit
740
import java.util.Scanner; /* * @author https://github.com/Hoenn * Happy St. Patrick's Day! Write a program that accepts a year as input and outputs what day St. Patrick's Day falls on. */ public class Challenge_27 { public static final int spMonth=3; public static final int spDay=17; public static final String[] daysOfWeek = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" }; public static final int[] monthsTable = { 0, 3, 3, 6, 1, 4, 6, 2, 5, 0, 3, 5 }; public static void main(String args[]) { Scanner input = new Scanner(System.in); System.out.println("Enter year: "); int year = input.nextInt(); int day = findDayOfWeek(year); System.out.println("St. Patrick's Day is on a "+daysOfWeek[day]); } public static int findDayOfWeek(int year) { int tempYear=year; int secondHalf = 0; if(tempYear>1000) { tempYear/=100; secondHalf= year%1000; } else { tempYear/=10; secondHalf=year%100; } int c = tempYear%4; return ((spDay+monthsTable[spMonth-1]+secondHalf+(secondHalf/4)+c)-1)%7; }
FreddieV4/DailyProgrammerChallenges
Intermediate Challenges/Challenge 0027 Intermediate/solutions/solution.java
Java
mit
1,136
/* * Generated by class-dump 3.3.4 (64 bit). * * class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2011 by Steve Nygard. */ #import <CorePDF/CPPage.h> @interface CPPage (CPPageSelections) - (struct CGPDFLayout *)layout; - (_Bool)populatePDFLayout:(struct CGPDFLayout *)arg1; - (id)hitTest; - (struct CPPDFClipBuffer *)clipBuffer; @end
matthewsot/CocoaSharp
Headers/PrivateFrameworks/CorePDF/CPPage-CPPageSelections.h
C
mit
355
// qflags.h // #pragma once #include <cstddef> #include <cstdint> #include <cstring> #include <memory> #include <string> #include <vector> #include <set> #include <map> //! Macro used to eliminate compiler warnings generated when formal parameters //! are declared but unreferenced; particularly for parameters which are used //! in one configuration but not another (e.g. Debug vs Release). MSVC's C1/C2 //! compiler generates unreferenced variable warnings for variables which are //! only referenced in an assert expression however Clang/C2 does not. #define QFLAGS_UNREFERENCED_PARAMETER(x) ((void)x) namespace qflags { //////////////////////////////////////////////////////////////////////////////// /** * @class command_line * * @brief Utility class encapsulating a command line * * Normalizes command line arguments into a UTF-8 encoded array of argument * strings. It accepts a single wide-character string, an array of wide- * character strings, or an array of multi-byte character strings. It is * *highly* recommended for developers on Windows platforms to use the wide- * character versions in order to avoid non-reversible character conversions. */ class command_line { public: /** * Functor for specifying the default locale on different platforms. */ struct default_locale { #if defined(__MINGW32__) // Only C and POSIX locales are supported on MinGW so suppress conversion. operator const char*() const { return nullptr; }; #else //!defined(__MINGW32__) operator const char*() const { return ""; }; #endif //!defined(__MINGW32__) }; /** * Initialize from a native encoded wide-character command line string. * e.g. the return value of GetCommandLineW() on Windows. * * @param args * a native encoded wide-character string. */ command_line(wchar_t const* args); /** * Initialize from an array of native encoded wide-character command line * argument strings. * e.g. the return value of CommandLineToArgvW() on Windows. * * @param argc * number of elements in `argv` * @param argv * an array of native encoded wide-character argument strings */ command_line(int argc, wchar_t const* const* argv); /** * Initialize from an array of native encoded wide-character command line * argument strings. Automatically deduces argc from static array size. * * @param argv * an array of native encoded wide-character argument strings */ template<size_t _Size> command_line(wchar_t const* const (&argv)[_Size]) : command_line(static_cast<int>(_Size), argv) {} /** * Initialize from a single command line argument string encoded using the * specified locale. Defaults to the 'user-preferred' local set by the * operating system. * * @param args * an argument string * @param locale * a locale name used to interpret the string `args` * a value of `nullptr` will suppress encoding conversion. */ command_line(char const* args, char const* locale = default_locale()); /** * Initialize from an array of command line argument strings encoded * using the specified locale. Defaults to the 'user-preferred' locale set * by the operating system. * * @param argc * number of elements in `argv` * @param argv * an array of argument strings * @param locale * a locale name used to interpret the strings in `argv` * a value of `nullptr` will suppress encoding conversion. */ command_line(int argc, char const* const* argv, char const* locale = default_locale()); /** * Initialize from an array of command line argument strings encoded * using the specified locale. Defaults to the 'user-preferred' locale set * by the operating system. Automatically deduces argc from static array size. * * @param argv * an array of argument strings * @param locale * a locale name used to interpret the strings in `argv` * a value of `nullptr` will suppress encoding conversion. */ template<size_t _Size> command_line(char const* const (&argv)[_Size], char const* locale = default_locale()) : command_line(static_cast<int>(_Size), argv, locale) {} /** * Construct a copy from another command_line instance. */ command_line(command_line const& other); /** * Copy from another command_line instance. */ command_line& operator=(command_line const& other); //! @return //! number of argument strings. int argc() const { return static_cast<int>(_argv.size() - 1); } //! @return //! array of UTF-8 encoded argument strings. char const* const* argv() const { return _argv.data(); } //! @return //! specified argument by index as a UTF-8 encoded string. char const* argv(int argn) const { return _argv[argn]; } private: std::vector<char> _args; //!< Argument string buffer std::vector<char*> _argv; //!< Argument string pointers private: //! Initialize from native encoded wide-character string. void _init(wchar_t const* args); //! Initialize from UTF-8 encoded character string. void _init(char const* args); //! Initialize from array of native encoded wide-character strings. void _init(int argc, wchar_t const* const* argv); //! Initialize from array of UTF-8 encoded character strings. void _init(int argc, char const* const* argv); }; //////////////////////////////////////////////////////////////////////////////// /** * @class argument * * @brief Abstract base class for all argument types */ class argument { public: //! @return //! name of the argument std::string const& name() const { return _name; } //! @return //! short name of the argument, may be empty std::string const& short_name() const { return _short_name; } //! @return //! true if the argument was explicitly set by the command line bool is_set() const { return _is_set; } //! @return //! true if the argument is a flag virtual bool is_flag() const { return false; } //! @return //! true if the argument is a command virtual bool is_command() const { return false; } //! @return //! true if the argument contains an array of values virtual bool is_array() const { return false; } //! @return //! true if the argument is implicitly convertible to a boolean virtual bool is_boolean() const { return false; } //! @return //! true if the argument is implicitly convertible to an integer virtual bool is_integer() const { return false; } //! @return //! true if the argument is implicitly convertible to a string virtual bool is_string() const { return false; } //! @return //! the length of the argument array if `is_array` is true virtual size_t array_size() const { return 0; } //! @return //! the argument value as a boolean if `is_boolean` is true virtual bool value_boolean() const; //! @return //! the argument value as an integer if `is_integer` is true virtual int64_t value_integer() const; //! @return //! the argument value as a string if `is_string` is true virtual std::string const& value_string() const; //! @return //! the argument array value at `index` if `is_array` is true virtual argument const& value_array(size_t const index) const; //! User-defined conversions to a boolean value operator bool() const { return value_boolean(); } //! User-defined conversions to an integer value operator int64_t() const { return value_integer(); } //! User-defined conversions to an integer value. This extra method is //! necessary because a cast to int otherwise chooses the bool overload. operator int() const { return static_cast<int>(value_integer()); } //! User-defined conversions to a string value operator std::string const&() const { return value_string(); } //! @param[in] index //! index of the argument array value to return //! @return //! the argument array value at the given index argument const& operator[](size_t const index) const { return value_array(index); } //! @return //! a brief description of the arugment for help screens std::string const& description() const { return _description; } protected: friend class parser; std::string _name; //!< name of this argument std::string _short_name; //!< single-character name of the argument std::string _description; //!< brief description of the argument bool _is_set; //!< true if the argument was set by the command line protected: //! @param[in] name //! name of the argument //! @param[in] short_name //! short name of the argument argument(char const* name, char const* short_name, char const* description); //! Process the command line arguments for this argument. //! @param[in] argc //! the number of arguments in the argv array //! @param[in] argv //! an array of arguments starting at this argument's name //! @param[out] errors //! a string describing any errors that occurred during parsing //! @return //! the number of command line arguments consumed by this argument, //! 0 if the argument is unmatched, or //! -1 if the argument is invalid. virtual int parse(int argc, char const* const* argv, std::string* errors) = 0; //! @return //! a string describing the format of any following bound arguments or //! an empty string if the argument has no bound arguments. virtual std::string usage() const { return ""; } }; //////////////////////////////////////////////////////////////////////////////// /** * @class parser * * @brief Populates argument values from a command line * * Arguments are added to the parser prior to parsing a command line. The parser * holds a reference to the arguments. When a command line is parsed the * arguments are then populated with values from the command line. Arguments * can be accessed from the parser by name or by the original argument object * passed to the parser. */ class parser { public: //! Constructs a default instance of parser. parser(); //! Add an argument to the parser. //! @param[in] arg //! an argument, a reference is held by the parser //! @return //! true if the argument was added to the parser bool add_argument(argument* arg); //! Parse the command line using the arguments added to the parser. //! @param[in] command_line //! command line to be parsed //! @param[out] errors //! a string describing any errors that occurred during parsing //! @return //! true if the command line was parsed successfully bool parse(command_line const& command_line, std::string* errors); //! @param[in] name //! name of the argument to return //! @return //! the argument with the given name argument const& operator[](std::string const& name) const; //! @param[in] name //! name of the argument to return //! @return //! the argument with the given name argument const& operator[](char const* name) const; //! @return //! number of argument strings. int argc() const { return _command_line.argc(); } //! @return //! array of UTF-8 encoded argument strings. char const* const* argv() const { return _command_line.argv(); } //! @return //! specified argument by index as a UTF-8 encoded string. char const* argv(int argn) const { return _command_line.argv(argn); } //! @return //! number of argument strings remaining after parsing. int remaining_argc() const { return _remaining.argc(); } //! @return //! array of UTF-8 encoded argument strings remaining after parsing. char const* const* remaining_argv() const { return _remaining.argv(); } //! @return //! specified argument by index as a UTF-8 encoded string. char const* remaining_argv(int argn) const { return _remaining.argv(argn); } //! @return //! a string describing usage of the arguments in the parser. std::string usage_string() const; //! @return //! a multi-line string describing the arguments. std::string help_string() const; private: //! A copy of the original command line provided to `parse`. command_line _command_line; //! The command line after removing parsed arguments. command_line _remaining; //! All arguments added to the parser keyed by their names. std::map<std::string, argument*> _arguments; //! All arguments with short names keyed by their short names. std::map<std::string, argument*> _short_arguments; //! A list of all command arguments added to the parser. std::vector<argument*> _commands; //! A list of all flag arguments added to the parser. std::vector<argument*> _flags; private: //! Attempt to parse the given arguments as a command argument. //! @param[in] argc //! the number of arguments in the argv array //! @param[in] argv //! an array of arguments starting at this argument's name //! @param[out] errors //! a string describing any errors that occurred during parsing //! @return //! the number of command line arguments consumed by this argument, //! 0 if the argument is unmatched, or //! -1 if the argument is invalid. int parse_command(int argc, char const* const* argv, std::string* errors); //! Attempt to parse the given argument as a short flag argument or a group //! of short flag arguments. //! @param[in] arg //! a short flag argument or a group of short flag arguments //! @param[out] errors //! a string describing any errors that occurred during parsing //! @return //! false if the argument was invalid, otherwise true bool parse_flags(char const* arg, std::string* errors); }; //////////////////////////////////////////////////////////////////////////////// /** * @class command * * @brief Sub-command argument for hierarchical command line parsing * * Arguments can be added to the command argument as a separate parser. If a * parser encounters a command argument then the remainder of the command line * arguments are parsed by the subcommand. */ class command : public argument , public parser { public: using argument::operator[]; using parser::operator[]; //! Construct a command argument with the given name. //! @param[in] name //! name of the command argument //! @param[in] description //! brief description of the command argument command(char const* name, char const* description = ""); //! @return true virtual bool is_command() const final { return true; } //! Allow commands to be implicitly converted to a boolean. //! @return true virtual bool is_boolean() const final { return true; } //! @return //! true if the command was invoked by the command line virtual bool value_boolean() const final { return _is_set; } protected: virtual int parse(int argc, char const* const* argv, std::string* errors) override; virtual std::string usage() const override { return usage_string(); } }; //////////////////////////////////////////////////////////////////////////////// /** * @class flag * * @brief Simple argument which evaluates to true if found on the command line. * * Flags can be specified by using their name as a long option (e.g. "--foo") or * by an optional short name (e.g. "-f"). Flags can also be set in a group using * their short names (e.g. "-fgh"). * * It is an error for a flag group to contain a character that does not * correspond to any argument's short name and the parser will fail to parse a * command line in that case. */ class flag : public argument { public: //! Construct a flag argument with the given name. //! @param[in] name //! name of the flag argument flag(char const* name); //! Construct a flag argument with the given name and short name. //! @param[in] name //! name of the flag argument //! @param[in] short_name //! short name of the flag argument for use in a flag group //! @param[in] description //! brief description of the flag argument flag(char const* name, char const* short_name, char const* description = ""); //! @return true virtual bool is_flag() const final { return true; } //! @return true virtual bool is_boolean() const final { return true; } //! @return //! true if the flag was explicitly set by the command line virtual bool value_boolean() const final { return _is_set; } protected: virtual int parse(int argc, char const* const* argv, std::string* errors) override; }; //////////////////////////////////////////////////////////////////////////////// /** * @class option * * @brief Base class for arguments with command-line specified values * * All option arguments take the form "--<name> <value>" or "--<name>=<value>". */ class option : public argument { public: //! All options are implicitly convertible to a string. //! @return true virtual bool is_string() const final { return true; } //! @return //! argument value as a string virtual std::string const& value_string() const override { return _value_string; } protected: std::string _value_string; //!< Argument value as a string. protected: //! Construct an option with the given name and default value. //! @param[in] name //! name of the option argument //! @param[in] short_name //! short name of the option argument //! @param[in] default_value //! default value of the option argument as a string //! @param[in] description //! brief description of the option argument option(char const* name, char const* short_name, char const* default_value, char const* description) : argument(name, short_name, description), _value_string(default_value) {} //! Process the command line arguments for this argument as a string. If the //! argument is unmatched or invalid then value_string is not modified. //! @param[in] argc //! the number of arguments in the argv array //! @param[in] argv //! an array of arguments starting at this argument's name //! @param[out] value_string //! the argument value as a string //! @param[out] errors //! a string describing any errors that occurred during parsing //! @return //! the number of command line arguments consumed by this argument, //! 0 if the argument is unmatched, or //! -1 if the argument is invalid. int _parse_string(int argc, char const* const* argv, std::string* value_string, std::string* errors) const; }; //////////////////////////////////////////////////////////////////////////////// /** * @class string_option * * @brief Simple option which takes a value as a string */ class string_option : public option { public: //! Construct a string option with the given name and default value. //! @param[in] name //! name of the string option //! @param[in] default_value //! default value of the string option as a string string_option(char const* name, char const* default_value = ""); //! Construct a string option with the given name and default value. //! @param[in] name //! name of the string option //! @param[in] short_name //! short name of the string option //! @param[in] default_value //! default value of the string option as a string //! @param[in] description //! brief description of the string option string_option(char const* name, char const* short_name, char const* default_value, char const* description = ""); protected: std::string _default_value; //!< Default value as a string. protected: virtual int parse(int argc, char const* const* argv, std::string* errors) override; virtual std::string usage() const override { return "<string>"; } }; //////////////////////////////////////////////////////////////////////////////// /** * @class boolean_option * * @brief Simple option which takes a value as a boolean * * The following strings evaluate to `true`: * - "true" * - "True" * - "TRUE" * - "1" * * The following strings evaluate to `false`: * - "false" * - "False" * - "FALSE" * - "0" * * All other strings are invalid and will result in a parsing error. */ class boolean_option : public option { public: //! Construct a boolean option with the given name and default value. //! @param[in] name //! name of the boolean option //! @param[in] default_value //! default value of the boolean option as a boolean boolean_option(char const* name, bool default_value = false); //! Construct a boolean option with the given name and default value. //! @param[in] name //! name of the boolean option //! @param[in] short_name //! short name of the boolean option //! @param[in] default_value //! default value of the boolean option as a boolean //! @param[in] description //! brief description of the boolean option boolean_option(char const* name, char const* short_name, bool default_value = false, char const* description = ""); //! @return true virtual bool is_boolean() const final { return true; } //! @return //! argument value as a boolean bool value_boolean() const override { return _value_boolean; } protected: bool _value_boolean; //!< Argument value as a boolean. bool _default_value; //!< Default value as a boolean. protected: virtual int parse(int argc, char const* const* argv, std::string* errors) override; virtual std::string usage() const override { return "(true|false)"; } //! Process the command line arguments for this argument as a boolean. //! If the argument is invalid then the value stored in value_string //! is undefined. If the argument is unmatched then value_string and //! value_boolean are unmodified. //! @param[in] argc //! the number of arguments in the argv array //! @param[in] argv //! an array of arguments starting at this argument's name //! @param[out] value_string //! the argument value as a string //! @param[out] value_boolean //! the argument value as a boolean //! @param[out] errors //! a string describing any errors that occurred during parsing //! @return //! the number of command line arguments consumed by this argument, //! 0 if the argument is unmatched, or //! -1 if the argument is invalid. int _parse_boolean(int argc, char const* const* argv, std::string* value_string, bool* value_boolean, std::string* errors) const; }; //////////////////////////////////////////////////////////////////////////////// /** * @class integer_option * * @brief Simple option which takes a value as an integer */ class integer_option : public option { public: //! Construct an integer option with the given name and default value. //! @param[in] name //! name of the integer option //! @param[in] default_value //! default value of the integer option as an integer integer_option(char const* name, int64_t default_value = 0); //! Construct an integer option with the given name and default value. //! @param[in] name //! name of the integer option //! @param[in] short_name //! short name of the integer option //! @param[in] default_value //! default value of the integer option as an integer //! @param[in] description //! brief description of the integer option integer_option(char const* name, char const* short_name, int64_t default_value = 0, char const* description = ""); //! @return true virtual bool is_integer() const final { return true; } //! @return //! the argument value as an integer virtual int64_t value_integer() const override { return _value_integer; } protected: int64_t _value_integer; //!< Argument value as an integer. int64_t _default_value; //!< Default value as an integer. protected: virtual int parse(int argc, char const* const* argv, std::string* errors) override; virtual std::string usage() const override { return "<int>"; } //! Process the command line arguments for this argument as an integer. //! If the argument is invalid then the value stored in value_string //! is undefined. If the argument is unmatched then value_string and //! value_integer are unmodified. //! @param[in] argc //! the number of arguments in the argv array //! @param[in] argv //! an array of arguments starting at this argument's name //! @param[out] value_string //! the argument value as a string //! @param[out] value_integer //! the argument value as an integer //! @param[out] errors //! a string describing any errors that occurred during parsing //! @return //! the number of command line arguments consumed by this argument, //! 0 if the argument is unmatched, or //! -1 if the argument is invalid. int _parse_integer(int argc, char const* const* argv, std::string* value_string, int64_t* value_integer, std::string* errors) const; }; //////////////////////////////////////////////////////////////////////////////// /** * @class choice_option * * @brief String-valued option which only accepts a specific set of values */ class choice_option : public string_option { public: //! Construct a choice option with the given name and permissible values. //! @param[in] name //! name of the choice option //! @param[in] choices //! a set of permissible values of the choice option //! @param[in] default_value //! default value of the choice option choice_option(char const* name, std::initializer_list<char const*>&& choices, char const* default_value); //! Construct a choice option with the given name and permissible values. //! @param[in] name //! name of the choice option //! @param[in] choices //! a set of permissible values of the choice option //! @param[in] default_value //! default value of the choice option choice_option(char const* name, std::set<std::string> const& choices, char const* default_value); //! Construct a choice option with the given name and permissible values. //! @param[in] name //! name of the choice option //! @param[in] short_name //! short name of the choice option //! @param[in] choices //! a set of permissible values of the choice option //! @param[in] default_value //! default value of the choice option //! @param[in] description //! brief description of the choice option choice_option(char const* name, char const* short_name, std::initializer_list<char const*>&& choices, char const* default_value, char const* description = ""); //! Construct a choice option with the given name and permissible values. //! @param[in] name //! name of the choice option //! @param[in] short_name //! short name of the choice option //! @param[in] choices //! a set of permissible values of the choice option //! @param[in] default_value //! default value of the choice option //! @param[in] description //! brief description of the choice option choice_option(char const* name, char const* short_name, std::set<std::string> const& choices, char const* default_value, char const* description = ""); protected: //! A set of permissible values for this argument. std::set<std::string> _choices; protected: virtual int parse(int argc, char const* const* argv, std::string* errors) override; }; //////////////////////////////////////////////////////////////////////////////// /** * @class range_option * * @brief Integer-valued option which only accepts a specific range of values */ class range_option : public integer_option { public: //! Construct a range option with the given name and permissible values. //! @param[in] name //! name of the range option //! @param[in] choices //! a set of permissible values of the range option //! @param[in] default_value //! default value of the range option as an integer range_option(char const* name, std::initializer_list<int64_t>&& choices, int64_t default_value); //! Construct a range option with the given name and permissible values. //! @param[in] name //! name of the range option //! @param[in] minimum_value //! the minimum permissible value of the range option //! @param[in] maximum_value //! the maximum permissible value of the range option //! @param[in] default_value //! default value of the range option as an integer range_option(char const* name, int64_t minimum_value, int64_t maximum_value, int64_t default_value); //! Construct a range option with the given name and permissible values. //! @param[in] name //! name of the range option //! @param[in] short_name //! short name of the range option //! @param[in] choices //! a set of permissible values of the range option //! @param[in] default_value //! default value of the range option as an integer //! @param[in] description //! brief description of the range option range_option(char const* name, char const* short_name, std::initializer_list<int64_t>&& choices, int64_t default_value, char const* description = ""); //! Construct a range option with the given name and permissible values. //! @param[in] name //! name of the range option //! @param[in] short_name //! short name of the range option //! @param[in] minimum_value //! the minimum permissible value of the range option //! @param[in] maximum_value //! the maximum permissible value of the range option //! @param[in] default_value //! default value of the range option as an integer //! @param[in] description //! brief description of the range option range_option(char const* name, char const* short_name, int64_t minimum_value, int64_t maximum_value, int64_t default_value, char const* description = ""); protected: int64_t _minimum_value; //!< Minimum permissible value for this argument. int64_t _maximum_value; //!< Maximum permissible value for this argument. //! A set of permissible values for this argument. std::set<int64_t> _choices; protected: virtual int parse(int argc, char const* const* argv, std::string* errors) override; }; //////////////////////////////////////////////////////////////////////////////// /** * @class repeated_option * * @brief Option which can be specified multiple times on the command line. * * Each time the option is invoked a value is stored in the value array which * can be accessed using the `value_array` function or with bracket operator * syntax. Values are stored in the order they are encountered on the command * line. * * `base_option` determines the parsing behavior. Each time the option is * invoked it will attempt to parse the value according to the rules of the base * option. `base_option` must be an option type, e.g. it cannot be a `flag` or * `command` argument. */ template<typename base_option> class repeated_option : public base_option { public: static_assert(std::is_base_of<option, base_option>::value, "Base option must derive from option type!"); //! Construct a repeated option with the given name. //! @param[in] name //! name of the repeated option //! @param[in] args //! arguments for the base option's constructor template<typename... Args> repeated_option(char const* name, Args&&... args) : base_option(name, std::forward<Args>(args)...) {} //! Construct a repeated option with the given name and short name. //! @param[in] name //! name of the repeated option //! @param[in] short_name //! short name of the repeated option //! @param[in] args //! arguments for the base option's constructor template<typename... Args> repeated_option(char const* name, char const* short_name, Args&&... args) : base_option(name, short_name, std::forward<Args>(args)...) {} //! @return true virtual bool is_array() const final { return true; } //! @return //! the length of the argument array virtual size_t array_size() const override { return _values.size(); } //! @return //! the argument array value at `index` virtual argument const& value_array(size_t const index) const override { return _values[index]; } protected: //! Array of argument values specified for this argument. std::vector<base_option> _values; protected: virtual int parse(int argc, char const* const* argv, std::string* errors) override; }; //------------------------------------------------------------------------------ template<typename base_option> inline int repeated_option<base_option>::parse(int argc, char const* const* argv, std::string* errors) { // Temporary option for parsing. base_option swap_option = *this; base_option::_is_set = false; // Parse the argument using the base option type. int argn = base_option::parse(argc, argv, errors); std::swap(swap_option, static_cast<base_option&>(*this)); // If parsing succeeded then add it to values. if (argn > 0) { _values.push_back(std::move(swap_option)); base_option::_is_set = true; } return argn; } } // namespace qflags #if defined(QFLAGS_STATIC) # define QFLAGS_INLINE #else //!defined(QFLAGS_STATIC) // Include implementation for use as a header-only library. # define QFLAGS_INLINE inline # include <qflags/command_line.hpp> # include <qflags/argument.hpp> # include <qflags/flag.hpp> # include <qflags/string_option.hpp> # include <qflags/boolean_option.hpp> # include <qflags/integer_option.hpp> # include <qflags/choice_option.hpp> # include <qflags/range_option.hpp> # include <qflags/parser.hpp> # include <qflags/command.hpp> #endif //!defined(QFLAGS_STATIC)
Qartar/qflags
include/qflags/qflags.h
C
mit
36,118
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title>Simple Materialize Pagination With React JS</title> <link href="http://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> <link type="text/css" rel="stylesheet" href="./assets/css/materialize.min.css" media="screen,projection"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> </head> <body> <div id="app"></div> <script type="text/javascript" src="./assets/js/jquery.min.js"></script> <script type="text/javascript" src="./assets/js/materialize.min.js"></script> <script type="text/javascript" src="./assets/js/browser.min.js"></script> <script type="text/javascript" src="./assets/js/react.min.js"></script> <script type="text/javascript" src="./assets/js/react-dom.min.js"></script> <script type="text/babel" src="./src/js/react-pagination.js"></script> </body> </html>
artgoce/materialize-pagination-reactjs
index.html
HTML
mit
942
//----------------------------------------------- // // This file is part of the Siv3D Engine. // // Copyright (c) 2008-2019 Ryo Suzuki // Copyright (c) 2016-2019 OpenSiv3D Project // // Licensed under the MIT License. // //----------------------------------------------- # include <Siv3D/EngineLog.hpp> # include <Siv3D/Windows.hpp> # include <Siv3D/DLL.hpp> # include <ShellScalingApi.h> # include "HighDPI.hpp" namespace s3d { // 高 DPI ディスプレイで、フルスクリーン使用時に High DPI Aware を有効にしないと、 // Windows の互換性マネージャーによって // HKEY_CURRENT_USER/Software/Microsoft/Windows NT/CurrentVersion/AppCompatFlags/Layers // に高 DPI が既定の設定として登録されてしまう。 void SetHighDPIAwareness(const bool aware) { LOG_TRACE(U"SetHighDPIAwareness(aware = {})"_fmt(aware)); if (HMODULE user32 = DLL::LoadSystemLibrary(L"user32.dll")) { decltype(SetThreadDpiAwarenessContext)* p_SetThreadDpiAwarenessContext = DLL::GetFunctionNoThrow(user32, "SetThreadDpiAwarenessContext"); if (p_SetThreadDpiAwarenessContext) { p_SetThreadDpiAwarenessContext(aware ? DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2 : DPI_AWARENESS_CONTEXT_UNAWARE); ::FreeLibrary(user32); return; } ::FreeLibrary(user32); } if (HINSTANCE shcore = DLL::LoadSystemLibrary(L"shcore.dll")) { decltype(SetProcessDpiAwareness)* p_SetProcessDpiAwareness = DLL::GetFunctionNoThrow(shcore, "SetProcessDpiAwareness"); if (p_SetProcessDpiAwareness) { p_SetProcessDpiAwareness(aware ? PROCESS_PER_MONITOR_DPI_AWARE : PROCESS_DPI_UNAWARE); ::FreeLibrary(shcore); return; } ::FreeLibrary(shcore); } if (aware) { ::SetProcessDPIAware(); } } }
wynd2608/OpenSiv3D
Siv3D/src/Siv3D-Platform/WindowsDesktop/Window/HighDPI.cpp
C++
mit
1,768
var outputType = 'ARRAY'; var input = null; var output = null; var fs = require('fs'); var scriptName = process.argv[1].split('/'); scriptName = scriptName[ scriptName.length - 1 ]; function get_usage() { var usage = "\n"; usage += "Usage: " + scriptName + ' <options> <input markdown file>\n'; usage += "options:\n"; usage += get_options('\t') + '\n'; return usage; } function get_options(prefix) { var options = ""; options += prefix + '--array (to output as an array : DEFAULT)\n'; options += prefix + '--string (to output as a flat string)\n'; options += prefix + '--help (to display this output and exit)\n'; return options } function print_usage(exit, code) { console.log(get_usage()); if (exit) { process.exit(code); } } function toString(text) { return '"'+text.replace(/\n/g, '\\n').replace(/"/g, "\\\"") + '"'; } function toArray(text) { var arrayText = ""; arrayText += "[\n"; text = text.replace(/"/g, "\\\""); text.split('\n').map(function(line) { arrayText += '"' + line + '",\n'; }); arrayText += "]"; return arrayText; } // now the main code if (process.argv.length == 4) { if (process.argv[2] == '--array') { outputType = 'ARRAY'; } else if (process.argv[2] == '--string') { outputType = 'STRING'; } else { print_usage(true, -1); } input = process.argv[3]; output = input + '.converted.json'; } else if (process.argv.length == 3) { if (process.argv[2] == '--help') { print_usage(true, 0); } else { input = process.argv[2]; output = input + '.converted.json'; } } else { console.error('Incorrect arguments!'); print_usage(true, -1); } // load the file fs.readFile(input, function(err, data) { if (err) { throw err; } // make it a string data = new String(data); // now convert var outputData = ''; if (outputType == 'ARRAY') { outputData = toArray(data); } else if (outputType == 'STRING') { outputData = toString(data); } // write output fs.writeFile(output, outputData, 'utf8', (err) => { if (err) { throw err; } process.exit(0); }); });
finger563/webgme-codeeditor
tools/docStringConverter.js
JavaScript
mit
2,300
# L7-mongo cookbook [![Build Status](https://travis-ci.org/szelcsanyi/chef-mongo.svg?branch=master)](https://travis-ci.org/szelcsanyi/chef-mongo) [![security](https://hakiri.io/github/szelcsanyi/chef-mongo/master.svg)](https://hakiri.io/github/szelcsanyi/chef-mongo/master) [![Cookbook Version](https://img.shields.io/cookbook/v/L7-mongo.svg?style=flat)](https://supermarket.chef.io/cookbooks/L7-mongo) ## Description Configures [Mongodb](http://mongodb.org) via Opscode Chef It can handle multiple instances with different configuratioins and different versions on the same machine. Please note that this cookbook does not use the 10gen apt repository, and instead downloads the required binaries from a given server. ## Supported Platforms * Ubuntu 12.04+ * Debian 7.0+ ## Recipes * `L7-mongo`- The default no-op recipe. ## Providers * `L7_mongo_db` - Configures a mongodb instance * `L7_mongo_s` - Configures a mongos instance ## Usage ### Parameters for the `L7_mongo_db` provider: * `url`: url for mongodb binary tgz (default: https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.6.1.tgz) * `home`: directory for mongodb instance (default "/opt") * `bind_ip`: listen address (default "127.0.0.1") * `port`: listen port (default 27017) * `default_instance`: creates symlink (default false) * `replSet`: replica set name (default not set) * shardsvr : run as a shard server (default false) * configsvr : run as a config server (default false) * `smallfiles`: use smallfile allocation (default false) * `journal`: use durable journaling (default true) * `notablescan`: disables queries using fts (default true) * `rest`: enable rest interface for monitoring (default true) * `httpinterface`: enable http interface (default true) * `auth`: enable authentication (default false) * `user`: run mongodb as this user (default mongodb) * `group`: run mongodb as this group (default mongodb) * `backup`: do backup * `backup_host`: where the backup goes over ssh * `backup_port`: ssh port * `backup_user`: user name for ssh * `backup_path`: path to backup directory * `backup_hour`: at what hour should the backup be started (default 2am) * `backup_minute: at what minute should the backup be started (default 0) * `backup_pubkey`: ssh pulic key for backup user * `backup_privkey`: ssh private key for backup user #### A mongodb instance with custom parameters: ```ruby L7_mongo_db 'example' do port '27017' bind_ip '0.0.0.0' default_instance true end ``` ### Parameters for the `L7_mongo_s` provider * `bind_ip`: listen address (default "127.0.0.1") * `port`: listen port (default 27017) * `configdb` : Connection string for communicating with config servers * `localTreshold` : ping time (in ms) for a node to be considered local * `auth`: enable authentication (default false) * `user`: run mongos as this user (default mongos) * `group`: run mongos as this group (default mongos) #### An example mongos instance declaration ```ruby L7_mongo_s 'example' do port '27017' bind_ip '0.0.0.0' configdb 'cfg/configdb.mongodbcluster0.example.com:27019' end ``` ## TODO ## Contributing 1. Fork it 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Added some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create new Pull Request ## License * Freely distributable and licensed under the [MIT license](http://szelcsanyi.mit-license.org/2015/license.html). * Copyright (c) 2015 Gabor Szelcsanyi [![image](https://ga-beacon.appspot.com/UA-56493884-1/chef-mongo/README.md)](https://github.com/szelcsanyi/chef-mongo)
szelcsanyi/chef-mongo
README.md
Markdown
mit
3,636
<form [formGroup]="editForm" novalidate (ngSubmit)="submitEdit()" [hidden]="isHidden"> <div> <label for="a"></label> <input formControlName="title" type="text" id="a"> <p [hidden]="editForm.controls['title'].valid"> Insert a title</p> </div> <div> <label for="b"></label> <input formControlName="author" type="text" id="b"> <p [hidden]="editForm.controls['author'].valid"> Insert an author</p> </div> <button (click)="closeEdit()">close</button> <button type="submit">Edit book</button> </form>
DeadManPoe/AngularRedux
src/app/edit-book/edit-book.component.html
HTML
mit
592
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using BizHawk.Emulation.Cores.Nintendo.NES; using BizHawk.Common; using BizHawk.Client.Common; using BizHawk.Emulation.Common; namespace BizHawk.Client.EmuHawk { public partial class BarcodeEntry : Form, IToolForm { [RequiredService] private DatachBarcode reader { get; set; } public BarcodeEntry() { InitializeComponent(); } #region IToolForm public void NewUpdate(ToolFormUpdateType type) { } public void UpdateValues() { } public void FastUpdate() { } public void Restart() { textBox1_TextChanged(null, null); } public bool AskSaveChanges() { return true; } public bool UpdateBefore { get { return false; } } #endregion private void textBox1_TextChanged(object sender, EventArgs e) { string why; if (!DatachBarcode.ValidString(textBox1.Text, out why)) { label3.Text = $"Invalid: {why}"; label3.Visible = true; button1.Enabled = false; } else { label3.Visible = false; button1.Enabled = true; } } private void button1_Click(object sender, EventArgs e) { reader.Transfer(textBox1.Text); } } }
ircluzar/RTC3
Real-Time Corruptor/BizHawk_RTC/BizHawk.Client.EmuHawk/tools/NES/BarcodeEntry.cs
C#
mit
1,310
/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ "use strict"; // Include the required modules var {assert, expect} = require("../../../../lib/assertions"); var prefs = require("../../../../lib/prefs"); var tabs = require("../../../lib/tabs"); var utils = require("../../../../lib/utils"); var prefWindow = require("../../../lib/ui/pref-window"); const BASE_URL = collector.addHttpResource("../../../../data/"); const TEST_DATA = BASE_URL + "layout/mozilla.html"; const PREF_BROWSER_IN_CONTENT = "browser.preferences.inContent"; const PREF_BROWSER_INSTANT_APPLY = "browser.preferences.instantApply"; var setupModule = function(aModule) { aModule.controller = mozmill.getBrowserController(); prefs.setPref(PREF_BROWSER_IN_CONTENT, false); if (mozmill.isWindows) { prefs.setPref(PREF_BROWSER_INSTANT_APPLY, false); } tabs.closeAllTabs(aModule.controller); } var teardownModule = function(aModule) { prefs.clearUserPref(PREF_BROWSER_IN_CONTENT); prefs.clearUserPref(PREF_BROWSER_INSTANT_APPLY); prefs.clearUserPref("browser.startup.homepage"); } /** * Restore home page to default */ var testRestoreHomeToDefault = function() { // Open a web page for the temporary home page controller.open(TEST_DATA); controller.waitForPageLoad(); var link = new elementslib.Link(controller.tabs.activeTab, "Organization"); assert.ok(link.exists(), "'Organization' link has been found"); // Call Preferences dialog and set home page prefWindow.openPreferencesDialog(controller, prefDialogHomePageCallback); // Go to the saved home page and verify it's the correct page controller.click(new elementslib.ID(controller.window.document, "home-button")); controller.waitForPageLoad(); link = new elementslib.Link(controller.tabs.activeTab, "Organization"); assert.ok(link.exists(), "'Organization' link has been found"); // Open Preferences dialog and reset home page to default prefWindow.openPreferencesDialog(controller, prefDialogDefHomePageCallback); // Check that the current homepage is set to the default homepage - about:home var currentHomepage = prefs.getPref("browser.startup.homepage", ""); var defaultHomepage = utils.getDefaultHomepage(); assert.equal(currentHomepage, defaultHomepage, "Default homepage restored"); } /** * Set the current page as home page via the preferences dialog * * @param {MozMillController} aController * MozMillController of the window to operate on */ var prefDialogHomePageCallback = function(aController) { var prefDialog = new prefWindow.preferencesDialog(aController); prefDialog.paneId = 'paneMain'; // Set home page to the current page var useCurrent = new elementslib.ID(aController.window.document, "useCurrent"); aController.waitThenClick(useCurrent); aController.sleep(100); prefDialog.close(true); } var prefDialogDefHomePageCallback = function(aController) { var prefDialog = new prefWindow.preferencesDialog(aController); // Reset home page to the default page var useDefault = new elementslib.ID(aController.window.document, "restoreDefaultHomePage"); aController.waitForElement(useDefault); aController.click(useDefault); // Check that the homepage field has the default placeholder text var dtds = ["chrome://browser/locale/aboutHome.dtd"]; var defaultHomepageTitle = utils.getEntity(dtds, "abouthome.pageTitle"); var browserHomepageField = new elementslib.ID(aController.window.document, "browserHomePage"); var browserHomepagePlaceholderText = browserHomepageField.getNode().placeholder; expect.equal(browserHomepagePlaceholderText, defaultHomepageTitle, "Default homepage title"); prefDialog.close(true); }
lucashmorais/x-Bench
mozmill-env/msys/firefox/tests/functional/testPreferences/testRestoreHomepageToDefault.js
JavaScript
mit
3,833
#!/bin/sh # CYBERWATCH SAS - 2017 # # Security fix for DLA-387-1 # # Security announcement date: 2016-01-14 00:00:00 UTC # Script generation date: 2017-01-01 21:09:06 UTC # # Operating System: Debian 6 (Squeeze) # Architecture: x86_64 # # Vulnerable packages fix on version: # - openssh:1:5.5p1-6+squeeze8 # # Last versions recommanded by security team: # - openssh:1:5.5p1-6+squeeze8 # # CVE List: # - CVE-2016-0777 # - CVE-2016-0778 # # More details: # - https://www.cyberwatch.fr/vulnerabilites # # Licence: Released under The MIT License (MIT), See LICENSE FILE sudo apt-get install --only-upgrade openssh=1:5.5p1-6+squeeze8 -y
Cyberwatch/cbw-security-fixes
Debian_6_(Squeeze)/x86_64/2016/DLA-387-1.sh
Shell
mit
646
--- layout: page subheadline: "Tech" title: "Webcampak et Free.fr" date: 2010-03-08 06:40:19+00:00 teaser: "Lors de nos essais avec Webcampak, le serveur d'images, nous avions activé le ftp d'un ancien compte Free pour envoyer les images provenant de 4 sources différentes toutes les 5 minutes." header: image_fullwidth: "header_typewriter.jpg" caption: Image by Florian Klauer caption_url: "http://florianklauer.de/" image: thumb: typewriter_thumb.jpg homepage: homepage_typewriter.jpg categories: - tech comments: false show_meta: true --- Globalement, il fallait compter sur un envoi de 500 ko environ toutes les cinq minutes, pas de quoi donc surcharger les serveurs ftp de Free, à priori du moins car le compte a été bloqué. En voici la raison : **Votre page personnelle a été suspendue pour la/les raisons suivantes:** <table width="90%" style="text-align: justify;" > <tbody > <tr > <td >Stockage. Invité a utiliser http://dl.free.fr </td> </tr> </tbody> </table> ** Ce bloquage consitue un avertissement. Afin de retrouver l'accès à votre page personnelle, vous devez vous engager à corriger les points cités ci-dessus au plus vite. Si tel est le cas, cliquez ici.** Ni une, ni deux, cliquons donc "ici", et observons le résultat : **"La raison du blocage ne vous permets pas de le débloquer via cette interface."** Là, j'avoue avoir envie de dire, "il a free, il n'a R I E N compris"... Je retrouve avec dégoût et horreur la langue de bois habituelle rencontrée voici quelques années avec le "sévisse clients" de ce fournisseur d'accès : impossible de savoir comment faire, impossible de savoir comment débloquer sans forcément devoir appeler un numéro surtaxé qui ne vous apportera rien de plus, sauf quelques Euros de moins :-( Ceci n'est pas de la diffamation, ceci se base sur une expérience passée pour obtenir une intervention technique sur un dysfonctionnement ADSL, sans succès après de nombreuses tentatives et pas mal d'EUR dépensés en vain, d'où un départ très rapide pour basculer chez Orange, avec bonheur depuis. En conclusion, si vous aviez l'intention d'héberger un site chez Free et d'y insérer une capture régulière prise par Webcampak, OUBLIEZ, faites appel à un hébergeur dédié, tel [OVH](http://www.ovh.com) par exemple, ou tout autre professionnel du secteur : "il n'a pas Free, il a tout compris !!" :-) _Cet article a été automatique importé de notre ancien blog, merci de nous excuser pour tout problème d'affichage ou image manquante._
Webcampak/website-webcampak-fr
_posts/old-blog/2010-03-08-webcampak-et-free-fr.markdown
Markdown
mit
2,574
lymon ===== Lymon - everything you need to make a sprite
esjay/lymon
README.md
Markdown
mit
58
namespace ArgentPonyWarcraftClient; /// <summary> /// A character associated with a World of Warcraft account. /// </summary> public record AccountCharacter { /// <summary> /// Gets a link to the character. /// </summary> [JsonPropertyName("character")] public Self Character { get; init; } /// <summary> /// Gets a link to the protected character information. /// </summary> [JsonPropertyName("protected_character")] public Self ProtectedCharacter { get; init; } /// <summary> /// Gets the name of the character. /// </summary> [JsonPropertyName("name")] public string Name { get; init; } /// <summary> /// Gets the ID of the character. /// </summary> [JsonPropertyName("id")] public int Id { get; init; } /// <summary> /// Gets a reference to the character's realm. /// </summary> [JsonPropertyName("realm")] public RealmReference Realm { get; init; } /// <summary> /// Gets a reference to the character's class. /// </summary> [JsonPropertyName("playable_class")] public PlayableClassReference PlayableClass { get; init; } /// <summary> /// Gets a reference to the character's race. /// </summary> [JsonPropertyName("playable_race")] public PlayableClassReference PlayableRace { get; init; } /// <summary> /// Gets the gender of the character. /// </summary> [JsonPropertyName("gender")] public EnumType Gender { get; init; } /// <summary> /// Gets the faction of the character (Alliance or Horde). /// </summary> [JsonPropertyName("faction")] public EnumType Faction { get; init; } /// <summary> /// Gets the level of the character. /// </summary> [JsonPropertyName("level")] public int Level { get; init; } }
danjagnow/ArgentPonyWarcraftClient
src/ArgentPonyWarcraftClient/Models/ProfileApi/AccountProfile/AccountCharacter.cs
C#
mit
1,827
# Eloquent UUID Model If you want your eloquent models to have the primary key as an UUID instead of the default incremental integer, you must use this abstract model on top of your models to convert them to an *Eloquent UUID Model*. ## Install Just require this package within your composer: composer require danielcosta/eloquent-uuid:^1.0 ## Sample usage Using *Eloquent UUID Model* is as simple as just extending the abstract `UUIDEloquentModel`. ```php use DCST\Database\Eloquent\Models\UUIDEloquentModel; class Product extends UUIDEloquentModel { // your class model } $product = new Product; $product->name = 'My Awesome Product'; $product->save(); var_dump($product->id); // 55d53549-e772-4765-9467-5a75d33cbf6a ```
danielcosta/eloquent-uuid
README.md
Markdown
mit
741
<div class="commune_descr limited"> <p> Borne est un village situé dans le département de Haute-Loire en Auvergne. Elle comptait 399 habitants en 2008.</p> <p>La ville propose quelques équipements, elle dispose, entre autres, de un terrain de tennis et une boucle de randonnée.</p> <p>Si vous envisagez de emmenager à Borne, vous pourrez aisément trouver une maison à acheter. </p> <p>À coté de Borne sont positionnées géographiquement les communes de <a href="{{VLROOT}}/immobilier/sanssac-leglise_43233/">Sanssac-l'Église</a> localisée à 5&nbsp;km, 990 habitants, <a href="{{VLROOT}}/immobilier/saint-vidal_43229/">Saint-Vidal</a> localisée à 2&nbsp;km, 434 habitants, <a href="{{VLROOT}}/immobilier/fontannes_43096/">Fontannes</a> à 4&nbsp;km, 1&nbsp;094 habitants, <a href="{{VLROOT}}/immobilier/chaspuzac_43062/">Chaspuzac</a> à 5&nbsp;km, 616 habitants, <a href="{{VLROOT}}/immobilier/ceyssac_43045/">Ceyssac</a> à 7&nbsp;km, 394 habitants, <a href="{{VLROOT}}/immobilier/saint-paulien_43216/">Saint-Paulien</a> située à 4&nbsp;km, 2&nbsp;182 habitants, entre autres. De plus, Borne est située à seulement neuf&nbsp;km de <a href="{{VLROOT}}/immobilier/puy-en-velay_43157/">Le&nbsp;Puy-en-Velay</a>.</p> <p>Le nombre de logements, à Borne, se décomposait en 2011 en cinq appartements et 210 maisons soit un marché relativement équilibré.</p> </div>
donaldinou/frontend
src/Viteloge/CoreBundle/Resources/descriptions/43036.html
HTML
mit
1,402
/* NormalBatteryProfileTestCase.java Copyright (c) 2014 NTT DOCOMO,INC. Released under the MIT license http://opensource.org/licenses/mit-license.php */ package org.deviceconnect.android.profile.intent.test; import android.content.Intent; import android.os.Bundle; import android.support.test.runner.AndroidJUnit4; import org.deviceconnect.android.test.plugin.profile.TestBatteryProfileConstants; import org.deviceconnect.message.DConnectMessage; import org.deviceconnect.message.intent.message.IntentDConnectMessage; import org.deviceconnect.profile.BatteryProfileConstants; import org.junit.Test; import org.junit.runner.RunWith; /** * Batteryプロファイルの正常系テスト. * @author NTT DOCOMO, INC. */ @RunWith(AndroidJUnit4.class) public class NormalBatteryProfileTestCase extends IntentDConnectTestCase { /** * バッテリー全属性取得テストを行う. * <pre> * 【Intent通信】 * Action: GET * Profile: battery * Interface: なし * Attribute: なし * </pre> * <pre> * 【期待する動作】 * ・resultに0が返ってくること。 * ・chargingがfalseで返ってくること。 * ・chargingtimeが50000.0で返ってくること。 * ・dischargingtimeが10000.0で返ってくること。 * ・levelが0.5で返ってくること。 * </pre> */ @Test public void testBattery() { Intent request = new Intent(IntentDConnectMessage.ACTION_GET); String serviceId = getServiceId(); request.putExtra(DConnectMessage.EXTRA_SERVICE_ID, serviceId); request.putExtra(DConnectMessage.EXTRA_SESSION_KEY, TEST_SESSION_KEY); request.putExtra(DConnectMessage.EXTRA_PROFILE, BatteryProfileConstants.PROFILE_NAME); Intent response = sendRequest(request); assertResultOK(response); assertTrue(response.hasExtra(BatteryProfileConstants.PARAM_CHARGING)); assertEquals(TestBatteryProfileConstants.CHARGING, response.getBooleanExtra(BatteryProfileConstants.PARAM_CHARGING, false)); assertTrue(response.hasExtra(BatteryProfileConstants.PARAM_CHARGING_TIME)); assertEquals(TestBatteryProfileConstants.CHARGING_TIME, response.getDoubleExtra(BatteryProfileConstants.PARAM_CHARGING_TIME, 0)); assertTrue(response.hasExtra(BatteryProfileConstants.PARAM_DISCHARGING_TIME)); assertEquals(TestBatteryProfileConstants.DISCHARGING_TIME, response.getDoubleExtra(BatteryProfileConstants.PARAM_DISCHARGING_TIME, 0)); assertTrue(response.hasExtra(BatteryProfileConstants.PARAM_LEVEL)); assertEquals(TestBatteryProfileConstants.LEVEL, response.getDoubleExtra(BatteryProfileConstants.PARAM_LEVEL, 0.0d)); } /** * charging属性取得テストを行う. * <pre> * 【Intent通信】 * Action: GET * Profile: battery * Interface: なし * Attribute: charging * </pre> * <pre> * 【期待する動作】 * ・resultに0が返ってくること。 * ・chargingがfalseで返ってくること。 * </pre> */ @Test public void testBatteryCharging() { Intent request = new Intent(IntentDConnectMessage.ACTION_GET); request.putExtra(DConnectMessage.EXTRA_SERVICE_ID, getServiceId()); request.putExtra(DConnectMessage.EXTRA_SESSION_KEY, TEST_SESSION_KEY); request.putExtra(DConnectMessage.EXTRA_PROFILE, BatteryProfileConstants.PROFILE_NAME); request.putExtra(DConnectMessage.EXTRA_ATTRIBUTE, BatteryProfileConstants.ATTRIBUTE_CHARGING); Intent response = sendRequest(request); assertResultOK(response); assertTrue(response.hasExtra(BatteryProfileConstants.PARAM_CHARGING)); assertEquals(TestBatteryProfileConstants.CHARGING, response.getBooleanExtra(BatteryProfileConstants.PARAM_CHARGING, false)); } /** * chargingTime属性取得テストを行う. * <pre> * 【Intent通信】 * Action: GET * Profile: battery * Interface: なし * Attribute: なし * </pre> * <pre> * 【期待する動作】 * ・resultに0が返ってくること。 * ・chargingTimeが50000.0で返ってくること。 * </pre> */ @Test public void testBatteryChargingTime() { Intent request = new Intent(IntentDConnectMessage.ACTION_GET); request.putExtra(DConnectMessage.EXTRA_SERVICE_ID, getServiceId()); request.putExtra(DConnectMessage.EXTRA_SESSION_KEY, TEST_SESSION_KEY); request.putExtra(DConnectMessage.EXTRA_PROFILE, BatteryProfileConstants.PROFILE_NAME); request.putExtra(DConnectMessage.EXTRA_ATTRIBUTE, BatteryProfileConstants.ATTRIBUTE_CHARGING_TIME); Intent response = sendRequest(request); assertResultOK(response); assertTrue(response.hasExtra(BatteryProfileConstants.PARAM_CHARGING_TIME)); assertEquals(TestBatteryProfileConstants.CHARGING_TIME, response.getDoubleExtra(BatteryProfileConstants.PARAM_CHARGING_TIME, 0)); } /** * dischargingTime属性取得テストを行う. * <pre> * 【Intent通信】 * Action: GET * Profile: battery * Interface: なし * Attribute: dischargingTime * </pre> * <pre> * 【期待する動作】 * ・resultに0が返ってくること。 * ・dischargingTimeが10000.0で返ってくること。 * </pre> */ @Test public void testBatteryDischargingTime() { Intent request = new Intent(IntentDConnectMessage.ACTION_GET); request.putExtra(DConnectMessage.EXTRA_SERVICE_ID, getServiceId()); request.putExtra(DConnectMessage.EXTRA_SESSION_KEY, TEST_SESSION_KEY); request.putExtra(DConnectMessage.EXTRA_PROFILE, BatteryProfileConstants.PROFILE_NAME); request.putExtra(DConnectMessage.EXTRA_ATTRIBUTE, BatteryProfileConstants.ATTRIBUTE_DISCHARGING_TIME); Intent response = sendRequest(request); assertResultOK(response); assertTrue(response.hasExtra(BatteryProfileConstants.PARAM_DISCHARGING_TIME)); assertEquals(TestBatteryProfileConstants.DISCHARGING_TIME, response.getDoubleExtra(BatteryProfileConstants.PARAM_DISCHARGING_TIME, 0)); } /** * level属性取得テストを行う. * <pre> * 【Intent通信】 * Action: GET * Profile: battery * Interface: なし * Attribute: なし * </pre> * <pre> * 【期待する動作】 * ・resultに0が返ってくること。 * ・levelが0.5で返ってくること。 * </pre> */ @Test public void testBatteryLevel() { Intent request = new Intent(IntentDConnectMessage.ACTION_GET); request.putExtra(DConnectMessage.EXTRA_SERVICE_ID, getServiceId()); request.putExtra(DConnectMessage.EXTRA_SESSION_KEY, TEST_SESSION_KEY); request.putExtra(DConnectMessage.EXTRA_PROFILE, BatteryProfileConstants.PROFILE_NAME); request.putExtra(DConnectMessage.EXTRA_ATTRIBUTE, BatteryProfileConstants.ATTRIBUTE_LEVEL); Intent response = sendRequest(request); assertResultOK(response); assertTrue(response.hasExtra(BatteryProfileConstants.PARAM_LEVEL)); assertEquals(TestBatteryProfileConstants.LEVEL, response.getDoubleExtra(BatteryProfileConstants.PARAM_LEVEL, 0.0d)); } /** * onchargingchange属性のコールバック登録テストを行う. * <pre> * 【Intent通信】 * Action: PUT * Profile: battery * Interface: なし * Attribute: onchargingchange * </pre> * <pre> * 【期待する動作】 * ・resultに0が返ってくること。 * ・コールバック登録後にイベントを受信すること。 * </pre> */ @Test public void testBatteryOnChargingChange01() { Intent request = new Intent(IntentDConnectMessage.ACTION_PUT); request.putExtra(DConnectMessage.EXTRA_SERVICE_ID, getServiceId()); request.putExtra(DConnectMessage.EXTRA_SESSION_KEY, TEST_SESSION_KEY); request.putExtra(DConnectMessage.EXTRA_PROFILE, BatteryProfileConstants.PROFILE_NAME); request.putExtra(DConnectMessage.EXTRA_ATTRIBUTE, BatteryProfileConstants.ATTRIBUTE_ON_CHARGING_CHANGE); Intent response = sendRequest(request); assertResultOK(response); Intent event = waitForEvent(); assertNotNull(event); assertEquals(BatteryProfileConstants.PROFILE_NAME, event.getStringExtra(DConnectMessage.EXTRA_PROFILE)); assertEquals(BatteryProfileConstants.ATTRIBUTE_ON_CHARGING_CHANGE, event.getStringExtra(DConnectMessage.EXTRA_ATTRIBUTE)); Bundle battery = event.getBundleExtra(BatteryProfileConstants.PROFILE_NAME); assertEquals(false, battery.getBoolean(BatteryProfileConstants.PARAM_CHARGING)); } /** * onchargingchange属性のコールバック解除テストを行う. * <pre> * 【Intent通信】 * Action: DELETE * Profile: battery * Interface: なし * Attribute: onchargingchange * </pre> * <pre> * 【期待する動作】 * ・resultに0が返ってくること。 * </pre> */ @Test public void testBatteryOnChargingChange02() { Intent request = new Intent(IntentDConnectMessage.ACTION_DELETE); request.putExtra(DConnectMessage.EXTRA_SERVICE_ID, getServiceId()); request.putExtra(DConnectMessage.EXTRA_SESSION_KEY, TEST_SESSION_KEY); request.putExtra(DConnectMessage.EXTRA_PROFILE, BatteryProfileConstants.PROFILE_NAME); request.putExtra(DConnectMessage.EXTRA_ATTRIBUTE, BatteryProfileConstants.ATTRIBUTE_ON_CHARGING_CHANGE); Intent response = sendRequest(request); assertResultOK(response); } /** * onbatterychange属性のコールバック登録テストを行う. * <pre> * 【Intent通信】 * Action: PUT * Profile: battery * Interface: なし * Attribute: onbatterychange * </pre> * <pre> * 【期待する動作】 * ・resultに0が返ってくること。 * ・コールバック登録後にイベントを受信すること。 * </pre> */ @Test public void testBatteryOnBatteryChange01() { Intent request = new Intent(IntentDConnectMessage.ACTION_PUT); request.putExtra(DConnectMessage.EXTRA_SERVICE_ID, getServiceId()); request.putExtra(DConnectMessage.EXTRA_SESSION_KEY, TEST_SESSION_KEY); request.putExtra(DConnectMessage.EXTRA_PROFILE, BatteryProfileConstants.PROFILE_NAME); request.putExtra(DConnectMessage.EXTRA_ATTRIBUTE, BatteryProfileConstants.ATTRIBUTE_ON_BATTERY_CHANGE); Intent response = sendRequest(request); assertResultOK(response); Intent event = waitForEvent(); assertNotNull(event); assertEquals(BatteryProfileConstants.PROFILE_NAME, event.getStringExtra(DConnectMessage.EXTRA_PROFILE)); assertEquals(BatteryProfileConstants.ATTRIBUTE_ON_BATTERY_CHANGE, event.getStringExtra(DConnectMessage.EXTRA_ATTRIBUTE)); Bundle battery = event.getBundleExtra(BatteryProfileConstants.PARAM_BATTERY); assertEquals(TestBatteryProfileConstants.CHARGING_TIME, battery.getDouble(BatteryProfileConstants.PARAM_CHARGING_TIME)); assertEquals(TestBatteryProfileConstants.DISCHARGING_TIME, battery.getDouble(BatteryProfileConstants.PARAM_DISCHARGING_TIME)); assertEquals(TestBatteryProfileConstants.LEVEL, battery.getDouble(BatteryProfileConstants.PARAM_LEVEL)); } /** * onbatterychange属性のコールバック解除テストを行う. * <pre> * 【Intent通信】 * Action: DELETE * Profile: battery * Interface: なし * Attribute: onbatterychange * </pre> * <pre> * 【期待する動作】 * ・resultに0が返ってくること。 * </pre> */ @Test public void testBatteryOnBatteryChange02() { Intent request = new Intent(IntentDConnectMessage.ACTION_DELETE); request.putExtra(DConnectMessage.EXTRA_SERVICE_ID, getServiceId()); request.putExtra(DConnectMessage.EXTRA_SESSION_KEY, TEST_SESSION_KEY); request.putExtra(DConnectMessage.EXTRA_PROFILE, BatteryProfileConstants.PROFILE_NAME); request.putExtra(DConnectMessage.EXTRA_ATTRIBUTE, BatteryProfileConstants.ATTRIBUTE_ON_BATTERY_CHANGE); Intent response = sendRequest(request); assertResultOK(response); } }
Onuzimoyr/dAndroid
dConnectManager/dConnectManager/app/src/androidTest/java/org/deviceconnect/android/profile/intent/test/NormalBatteryProfileTestCase.java
Java
mit
12,808
package net.bingyan.campass.greendao; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. Enable "keep" sections if you want to edit. /** * Entity mapped to table ELECTRIC_RECORD. */ public class ElectricRecord { private Long id; private String area; private Integer building; private Integer dorm; private Float remain; private java.util.Date date; public ElectricRecord() { } public ElectricRecord(Long id) { this.id = id; } public ElectricRecord(Long id, String area, Integer building, Integer dorm, Float remain, java.util.Date date) { this.id = id; this.area = area; this.building = building; this.dorm = dorm; this.remain = remain; this.date = date; } public ElectricRecord(String area, Integer building, Integer dorm, Float remain, java.util.Date date) { this.area = area; this.building = building; this.dorm = dorm; this.remain = remain; this.date = date; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getArea() { return area; } public void setArea(String area) { this.area = area; } public Integer getBuilding() { return building; } public void setBuilding(Integer building) { this.building = building; } public Integer getDorm() { return dorm; } public void setDorm(Integer dorm) { this.dorm = dorm; } public Float getRemain() { return remain; } public void setRemain(Float remain) { this.remain = remain; } public java.util.Date getDate() { return date; } public void setDate(java.util.Date date) { this.date = date; } }
BingyanStudio/CamPass-Android
app/src-gen/net/bingyan/campass/greendao/ElectricRecord.java
Java
mit
1,848
# Changelog for Theft Theft is online cheatbook for GTA(Grand Theft Auto) titles.Changelog contains major fixes,improvement and new games(when added) under version and date [**yyyy-mm-dd**] of modification. ## Version 1.0 (2016-10-17) - New looks ## Version 0.2.1 (2016-10-14) - Dark Theme ## Version 0.2.0 (2016-09-13) - Game Added: **Gta II** ## Version 0.1.1 (2016-09-12) - Addition: About paragraph - Addition: Extended information on all game pages ## Version 0.1.0 (2016-09-09) - Games placed in chronological(release date) order ## Version 0.0.3 (2016-09-09) - Game Added: **GTA V** - Game Added: **GTA III** - Game Added: **GTA IV** ## Version 0.0.2 (2016-09-08) - Game Added: **Gta Vice City** ## Version 0.0.1 (2016-09-02) - Game Added: **Gta San Andreas**
siddacool/theft
CHANGELOG.md
Markdown
mit
788
/** * Unittest file for led. In this example the timer module is faked also * */ #include "catch.hpp" #include "Arduino.h" #include "led.h" // include the unit under test #include "mock_stimer.h" // include the faked module (so we can set the return values) void run_loop( StatusToLed* led ) { for ( int loop = 0; loop < 100; loop ++ ) { led->loop(); } } TEST_CASE( "Led blinking works", "[led]" ) { StatusToLed led; ARDUINO_TEST.hookup(); led.setup( 10 ); STimer__check_fake.return_val = false; SECTION("It runs") { run_loop(&led); REQUIRE( digitalWrite_fake.call_count == 1); digitalWrite_fake.call_count = 0; STimer__check_fake.return_val = true; // after this it will appear to module as the time would be changing always run_loop(&led); REQUIRE( digitalWrite_fake.call_count == 100); } }
susundberg/arduino-simple-unittest
examples/example_blink_led/tests/test_led.cpp
C++
mit
894
meteor-codr =========== Basic online ide based on meteorjs-ace-bootstrap 3-less stack
denkhaus/meteor-codr
README.md
Markdown
mit
87
--- layout: page title: "Serge Campeau" comments: true description: "blanks" keywords: "Serge Campeau,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://www.filehosting.org/file/details/544349/BebasNeue Regular.otf) format("opentype"); } h1.Bebas { font-family: "Bebas Neue", Verdana, Tahoma; } </style> </head> #### TEACHING INFORMATION **College**: College of Arts and Sciences **Classes taught**: NRSC 2100, NRSC 6100, PSYC 2012, PSYC 5262 #### NRSC 2100: Introduction to Neuroscience **Terms taught**: Fall 2012, Spring 2013, Fall 2013, Spring 2014, Fall 2014, Fall 2015, Fall 2016 **Instructor rating**: 4.82 **Standard deviation in instructor rating**: 0.75 **Average grade** (4.0 scale): 3.03 **Standard deviation in grades** (4.0 scale): 0.15 **Average workload** (raw): 3.11 **Standard deviation in workload** (raw): 0.13 #### NRSC 6100: Advances in Neuroscience Seminar **Terms taught**: Fall 2009, Fall 2016 **Instructor rating**: 5.49 **Standard deviation in instructor rating**: 0.37 **Average grade** (4.0 scale): 4.0 **Standard deviation in grades** (4.0 scale): 0.0 **Average workload** (raw): 1.16 **Standard deviation in workload** (raw): 0.01 #### PSYC 2012: Biological Psychology 1 **Terms taught**: Spring 2007, Spring 2009, Fall 2009, Spring 2010, Fall 2010, Spring 2011, Fall 2011, Spring 2012 **Instructor rating**: 4.4 **Standard deviation in instructor rating**: 0.38 **Average grade** (4.0 scale): 2.81 **Standard deviation in grades** (4.0 scale): 0.23 **Average workload** (raw): 2.72 **Standard deviation in workload** (raw): 0.11 #### PSYC 5262: Mammalian Neuroanatomy **Terms taught**: Spring 2011 **Instructor rating**: 5.14 **Standard deviation in instructor rating**: 0.0 **Average grade** (4.0 scale): 3.98 **Standard deviation in grades** (4.0 scale): 0.0 **Average workload** (raw): 2.38 **Standard deviation in workload** (raw): 0.0
nikhilrajaram/nikhilrajaram.github.io
instructors/Serge_Campeau.md
Markdown
mit
2,217
# ApmIssues TODO: Write README
TheProgrammingKitchen/apm
elixir/apps/apm_issues/README-APM-ISSUES.md
Markdown
mit
33
# -*- coding: utf-8 -*- # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, # MA 02110-1301, USA. # # Author: Mauro Soria class Path(object): def __init__(self, path=None, status=None, response=None): self.path = path self.status = status self.response = response def __str__(self): return self.path
Yukinoshita47/Yuki-Chan-The-Auto-Pentest
Module/dirsearch/lib/core/Path.py
Python
mit
987
<?php namespace eBussola\Feedback\Components; use Cms\Classes\ComponentBase; use Cms\Classes\Page; use eBussola\Feedback\Models\Channel; use Lang; use October\Rain\Exception\AjaxException; class Feedback extends ComponentBase { /** * @var Channel */ public $channel; public function componentDetails() { return [ 'name' => Lang::get('ebussola.feedback::lang.component.feedback.name'), 'description' => Lang::get('ebussola.feedback::lang.component.feedback.description') ]; } public function defineProperties() { return [ 'channelCode' => [ 'title' => Lang::get('ebussola.feedback::lang.channel.one'), 'description' => Lang::get('ebussola.feedback::lang.component.feedback.channelCode.description'), 'type' => 'dropdown', 'required' => true ], 'successMessage' => [ 'title' => Lang::get('ebussola.feedback::lang.component.feedback.successMessage.title'), 'description' => Lang::get('ebussola.feedback::lang.component.feedback.successMessage.description') ], 'redirectTo' => [ 'title' => Lang::get('ebussola.feedback::lang.component.feedback.redirectTo.title'), 'description' => Lang::get('ebussola.feedback::lang.component.feedback.redirectTo.description'), 'type' => 'dropdown', 'default' => 0 ] ]; } /** * @throws \October\Rain\Database\ModelException */ public function onSend() { try { $data = post('feedback'); $channel = Channel::getByCode($this->property('channelCode')); if ($channel) { $channel->send($data); } else { $this->sendAdminEmail('Error on Feedback plugin', 'This message was generated by OctoberCMS\'s plugin Feedback. This message is send when you forget to configure your component. Please, check all your pages to find any Feedback component misconfigured.'); } $message = $this->property('successMessage', Lang::get('ebussola.feedback::lang.component.onSend.success')); \Flash::success($message); if ($this->property('redirectTo', false)) { return redirect(url($this->property('redirectTo'))); } else { return $message; } } catch (\Exception $e) { \Flash::error($e->getMessage()); throw new AjaxException($e->getMessage()); } } public function onRun() { $this->channel = Channel::getByCode($this->property('channelCode')); } public function getRedirectToOptions() { return array_merge([0 => '- none -'], Page::sortBy('baseFileName')->lists('fileName', 'url')); } public function getChannelCodeOptions() { return Channel::all()->lists('name', 'code'); } private function sendAdminEmail($subject, $message) { $channel = new Channel([ 'method' => 'email', 'method_data' => [ 'email_destination' => null, 'subject' => $subject, 'template' => $message ], 'prevent_save_database' => true ]); $channel->send([ 'email' => 'foo@bar.com', 'message' => 'loremipsum' ]); } }
ebussola/octobercms-feedback
components/Feedback.php
PHP
mit
3,549
# WriTeX > Create beautiful LaTeX documents with Markdown WriTeX gives you a workflow for creating print documents (PDF) super-easily; the power of LaTeX with the simplicity of Markdown. ## Setup Install the WriTeX CLI globally using npm: ``` npm install -g writex ``` WriTeX makes use of [Pandoc](http://johnmacfarlane.net/pandoc/) and LaTeX. [Download and install Pandoc from here.](http://johnmacfarlane.net/pandoc/installing.html). LaTeX comes in different distributions; I recommend [TeX Live](http://www.tug.org/texlive/) for Linux, [MacTeX](https://tug.org/mactex/) for Mac OS X, and [MiKTeX](http://miktex.org/) for Windows. ## Scaffolding a new project Besides the WriTeX CLI, you will also need a WriTeX template for your document. Templates are installed via npm and you can [find a list of available templates here](https://www.npmjs.com/browse/keyword/writex-template). > At the time being, project scaffolding is not yet implemented. However, you can manually install the template and copy the config file into the project directory as follows (using the writex-article template as an example): > 1. Install the template `npm install --save-dev writex-template` > 2. Copy config file `cp node_modules/writex-template/writex.yaml ./` ## Writing and Configuring If your project is set up, you can start writing. All your content belongs in Markdown files with the `.md` suffix. The filenames should be prefixed by a number, so that they are ordered properly (otherwise, WriTeX will not compile them into the `\begin{document} ... \end{document}` area of your LaTeX document): ``` my-project/ - 0-introduction.md - 1-research.md - 2-design.md - 3-implementation.md - 4-evaluation.md - 5-conclusion.md - references.bib - writex.yaml ``` ### Configuration You can configure some basic parameters of your project in the `writex.yaml` file. Some parameters are necessary for every WriTeX project, some are specific to a certain template. The values under `document` are used by the template to fill certain fields. They depend very much on the used template; an article needs different metadata than, for example, a letter. An exemplary WriTeX config file: ```yaml template: article abstract: false bibtex: false engine: xelatex document: author: Arthur Authory date: \today title: A splendid article subtitle: How to write a headline that means absolutely nothing ``` In this example, both `document` and `abstract` are specific to the template ([writex-article](https://github.com/tvooo/writex-article)). All other parameters are universal WriTeX parameters. ### Bibliographies For the time being, WriTeX supports BibLaTeX bibliographies via `biber`. You can enable them in the config file, setting `bibtex` to `true`. The BibLaTeX file **must** be named `references.bib`. WriTeX will automatically take care of the proper compilation: `latex->biber->latex->latex`. This is intented to become more flexible in the future, with support for `bibtex` and configurable filenames as well. ### Special content There are some occasions where your template provides space for special content that does not belong into the regular flow of your document. One such example is an *abstract*, as implemented by the [writex-article](https://github.com/tvooo/writex-article) template. Special content must not be prefixed by a number, so that it is not included in the `\begin{document} ... \end{document}` area of your LaTeX document. > **Example:** To enable the use of an *abstract* in the [writex-article](https://github.com/tvooo/writex-article) template, you have to create a file `abstract.md`, fill it with your abstract, and set the `abstract` field in the `writex.yaml` config file to `true`. For information on the special content that is supported by your template, refer to your template's README. ## Compiling So you are all set, a first draft is written and you want to see how your PDF looks? Simply run WriTeX in your project folder: ``` writex ``` It will run through all the steps necessary and spit out your PDF in the end. ### Watch and compile WriTeX can watch for changes to your Markdown files and compile the new version of your PDF document automatically, which is quite convenient: ``` writex watch ``` ## Future plans I've got quite a bit planned for WriTeX, mostly for my own convenience: * `writex-acm`, a template for creating ACM research papers * `writex-book`, a template based on KOMA-Script's `scrbook` document type * `writex-tvooo-book`, a variation of `writex-book` with custom fonts and a custom title page, glossaries etc. * `writex-tvooo-article`, a variation of `writex-article` with custom fonts * Scaffolding of your own WriTeX templates * Scaffolding of a project using an existing template * A little website with a nice, illustratory explanation * Maybe offer the whole process online; on-the-fly PDF generation from pasted Markdown, with your chosen template
tvooo/writex
README.md
Markdown
mit
4,947
require 'spec_helper' describe Cardiac::ResourceAdapter do let(:base_url) { 'http://localhost/prefix/segment?q=foobar' } let(:base_uri) { URI(base_url) } let(:resource) { Cardiac::Resource.new(base_uri) } let(:adapter) { Cardiac::ResourceAdapter.new(nil, resource) } include_context 'Client responses' subject { adapter } describe '#http_verb' do subject { super().http_verb } it { is_expected.to be_nil } end describe '#payload' do subject { super().payload } it { is_expected.to be_nil } end describe '#response' do subject { super().response } it { is_expected.to be_nil } end describe '#result' do subject { super().result } it { is_expected.to be_nil } end describe '#resource' do subject { super().resource } it { is_expected.to eq(resource) } end it { is_expected.to be_resolved } describe '#call!()' do describe 'successful responses' do include_context 'Client execution', :get, :success before :example do resource.http_method(:get) expect { @retval = adapter.call! }.not_to raise_error end describe '#response' do subject { adapter.response } it { is_expected.to be_present } end describe '#result' do subject { adapter.result } it { is_expected.to be_present } end it('returns true') { expect(@retval).to be_a(TrueClass) } end describe 'failed responses' do include_context 'Client execution', :get, :failure before :example do resource.http_method(:get) expect { @retval = adapter.call! }.to raise_error end describe '#response' do subject { adapter.response } it { is_expected.not_to be_present } end describe '#result' do subject { adapter.result } it { is_expected.not_to be_present } end end end end
joekhoobyar/cardiac
spec/shared/cardiac/resource/adapter_spec.rb
Ruby
mit
1,981
using System; class CheckPointInCircle { static void Main() { /* Problem 7. Point in a Circle Write an expression that checks if given point (x, y) is inside a circle K({0, 0}, 2). */ Console.WriteLine("Check if given point (x,y) is within K((0,0),2)"); Console.Write("Insert x: "); decimal x = Convert.ToDecimal(Console.ReadLine()); Console.Write("Insert y: "); decimal y = Convert.ToDecimal(Console.ReadLine()); bool checkPoint = (x * x) + (y * y) <= (2 * 2); Console.WriteLine("Is the point ({0},{1}) within a circle K(0,2)?\nIt's {2}.", x, y, checkPoint); } }
TeeeeeC/TelerikAcademy2015-2016
01. C# part 1/03. Operators and Statements/CheckPointInCircle/CheckPointInCircle.cs
C#
mit
676
/* * ImageChangedEvent.java * -- documented * * After a change, such an object is created and passed to the listener * */ package oj.processor.events; public class ImageChangedEventOJ { public static final int IMAGE_ADDED = 1; public static final int IMAGE_EDITED = 2; public static final int IMAGE_DELETED = 3; public static final int IMAGES_SWAP = 4; public static final int IMAGES_SORT = 5; private String firstImageName; private String secondImageName; private int operation; /** Creates a new instance of ImageChangedEvent */ public ImageChangedEventOJ(String firstImageName, String secondImageName, int operation) { this.operation = operation; this.firstImageName = firstImageName; this.secondImageName = secondImageName; } public ImageChangedEventOJ(String name, int operation) { this.firstImageName = name; this.secondImageName = name; this.operation = operation; } public ImageChangedEventOJ(int operation) { this.operation = operation; } public String getName() { return firstImageName; } public String getFirstImageName() { return firstImageName; } public String getSecondImageName() { return secondImageName; } public String getNewImageName() { return firstImageName; } public String getOldImageName() { return secondImageName; } public int getOperation() { return operation; } }
steliann/objectj
src/oj/processor/events/ImageChangedEventOJ.java
Java
mit
1,584
<?php require('HeadAndHeader.php'); ?> <hr id="header-horizontal-line"/> <div id="content"> <div id="current-path"> <p id="current-path-paragraph">Startsait > Settings</p> </div> <fieldset> <legend id="fieldset-title">Settings</legend> <div class="settingsDivs" id="firstSettingsDiv"> <div class="box"> <?php echo form_open('settings/change_password'); ?> <?php echo form_label('Old Password:', 'old_password'); ?> <?php echo form_input(array( 'name' => 'old_password', 'id' => 'old_password', 'placeholder' => 'Enter your current password', )); ?> <?php echo form_label('New Password:', 'password'); ?> <?php echo form_input(array( 'name' => 'password', 'id' => 'password', 'placeholder' => 'New password', )); ?> <?php echo form_label('Repeat Password:', 'password_again'); ?> <?php echo form_input(array( 'name' => 'password_again', 'id' => 'password_again', 'placeholder' => 'New password again', )); ?> <?php echo form_hidden('user_id', $user->id);?> <?php echo form_submit('submit', 'Change password'); ?> <?php echo form_close(); ?> </div> <div class="box"> <?php echo form_open('settings/change_email'); ?> <?php echo form_label('Current Email:', 'current_email'); ?> <?php echo form_input(array( 'name' => 'current_email', 'id' => 'current_email', 'value' => $user->email, 'disabled' => '' )); ?> <?php echo form_label('New Email:', 'email'); ?> <?php echo form_input(array( 'name' => 'email', 'id' => 'email', 'placeholder' => 'Enter the new email', )); ?> <?php echo form_hidden('user_id', $user->id);?> <?php echo form_submit('submit', 'Change Email'); ?> <?php echo form_close(); ?> </div> </div> <div class="settingsDivs" id="secondSettingsDiv" > <div class="box"> <?php echo form_open('settings/add_address'); echo form_label('Full name:', 'full_name'); echo form_input(array( 'name' => 'full_name', 'id' => 'full_name', 'placeholder' => ' Enter your full name' )); echo form_label('Address:', 'address'); echo form_input(array( 'name' => 'address', 'id' => 'address_settings', 'placeholder' => 'Enter your address' )); echo form_label('City:', 'city'); echo form_input(array( 'name' => 'city', 'id' => 'city', 'placeholder' => 'Enter your City' )); echo form_label('State/Province/Region', 'state'); echo form_input(array( 'name' => 'state', 'id' => 'state', 'placeholder' => ' Enter your state/province/region' )); echo form_label('ZIP/Postal code', 'zip_code'); echo form_input(array( 'name' => 'zip_code', 'id' => 'zip_code', 'placeholder' => ' Enter your ZIP/Postal code' )); echo form_label('Country:', 'country'); echo country_dropdown('country', 'cont', 'dropdown', 'BG', array('US', 'CA', 'GB'), ''); echo form_label('Phone', 'phone'); echo form_input(array( 'name' => 'phone', 'id' => 'phone', 'placeholder' => ' Enter your phone number' )); echo form_hidden('user_id', $user->id); echo form_submit('submit' ,'Add address'); echo form_close(); ?> </div> </div> <div class="settingsDivs" id="thirdSettingsDiv" > <?php if ($addresses): ?> <p>Added shipping addresses:</p> <table class="addresses"> <thead> <tr> <th>Full name</th> <th>Address</th> <th>City</th> <th>Country</th> <th>State</th> <th>Zip code</th> <th>Phone</th> </tr> </thead> <tbody> <?php foreach ($addresses as $address): ?> <tr> <td><?php echo $address->full_name; ?></td> <td><?php echo $address->address; ?></td> <td><?php echo $address->city; ?></td> <td><?php echo $address->country; ?></td> <td><?php echo $address->state; ?></td> <td><?php echo $address->zip_code; ?></td> <td><?php echo $address->phone; ?></td> </tr> <?php endforeach; ?> </tbody> </table> <?php else: ?> <p>No addresses added!</p> <?php endif; ?> </div> </div> </fieldset> </div> <?php require('Footer.php'); ?>
kbuglow/intshop
application/views/shop/settings.php
PHP
mit
6,625
<?php return [ /* |-------------------------------------------------------------------------- | Authentication Defaults |-------------------------------------------------------------------------- | | This option controls the default authentication "guard" and password | reset options for your application. You may change these defaults | as required, but they're a perfect start for most applications. | */ 'defaults' => [ 'guard' => 'web', 'passwords' => 'users', ], /* |-------------------------------------------------------------------------- | Authentication Guards |-------------------------------------------------------------------------- | | Next, you may define every authentication guard for your application. | Of course, a great default configuration has been defined for you | here which uses session storage and the Eloquent user provider. | | All authentication drivers have a user provider. This defines how the | users are actually retrieved out of your database or other storage | mechanisms used by this application to persist your user's data. | | Supported: "session", "token" | */ 'guards' => [ 'web' => [ 'driver' => 'session', 'provider' => 'users', ], 'api' => [ 'driver' => 'token', 'provider' => 'users', 'hash' => false, ], ], /* |-------------------------------------------------------------------------- | User Providers |-------------------------------------------------------------------------- | | All authentication drivers have a user provider. This defines how the | users are actually retrieved out of your database or other storage | mechanisms used by this application to persist your user's data. | | If you have multiple user tables or models you may configure multiple | sources which represent each model / table. These sources may then | be assigned to any extra authentication guards you have defined. | | Supported: "database", "eloquent" | */ 'providers' => [ 'users' => [ 'driver' => 'eloquent', 'model' => ALttP\User::class, ], // 'users' => [ // 'driver' => 'database', // 'table' => 'users', // ], ], /* |-------------------------------------------------------------------------- | Resetting Passwords |-------------------------------------------------------------------------- | | You may specify multiple password reset configurations if you have more | than one user table or model in the application and you want to have | separate password reset settings based on the specific user types. | | The expire time is the number of minutes that the reset token should be | considered valid. This security feature keeps tokens short-lived so | they have less time to be guessed. You may change this as needed. | */ 'passwords' => [ 'users' => [ 'provider' => 'users', 'table' => 'password_resets', 'expire' => 60, ], ], ];
sporchia/alttp_vt_randomizer
config/auth.php
PHP
mit
3,280
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>traversable-fincontainer: 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.9.1 / traversable-fincontainer - 8.7.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> traversable-fincontainer <small> 8.7.0 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2022-01-27 07:02:49 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-01-27 07:02:49 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 Preprocessor-pretty-printer of OCaml conf-findutils 1 Virtual package relying on findutils conf-perl 2 Virtual package relying on perl coq 8.9.1 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.06.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.06.1 Official 4.06.1 release ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.2 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;Hugo.Herbelin@inria.fr&quot; homepage: &quot;https://github.com/coq-contribs/traversable-fincontainer&quot; license: &quot;ASL&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/TraversableFincontainer&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.7&quot; &amp; &lt; &quot;8.8~&quot;} ] tags: [ &quot;keyword: finitary container&quot; &quot;keyword: traversable functors&quot; &quot;category: Computer Science/Data Types and Data Structures&quot; ] authors: [ &quot;Russell O&#39;Connor &lt;oconnorr@google.com&gt;&quot; ] bug-reports: &quot;https://github.com/coq-contribs/traversable-fincontainer/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/traversable-fincontainer.git&quot; synopsis: &quot;Traversable Functors are Finitary Containers&quot; description: &quot;&quot;&quot; https://github.com/oconnorr/traversable-fincontainer A Coq proof that all Traversable functors are isomorphic to finitary containers.&quot;&quot;&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/traversable-fincontainer/archive/v8.7.0.tar.gz&quot; checksum: &quot;md5=82cbb2ec21e431051b57502cea6a8df2&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-traversable-fincontainer.8.7.0 coq.8.9.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.9.1). The following dependencies couldn&#39;t be met: - coq-traversable-fincontainer -&gt; coq &lt; 8.8~ -&gt; ocaml &lt; 4.06.0 base of this switch (use `--unlock-base&#39; to force) 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 coq-traversable-fincontainer.8.7.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://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </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>
coq-bench/coq-bench.github.io
clean/Linux-x86_64-4.06.1-2.0.5/released/8.9.1/traversable-fincontainer/8.7.0.html
HTML
mit
7,197
class TwitterHandle < ActiveRecord::Base belongs_to :topic has_many :tweets validates :twitter_handle, presence: true end
tweet-squared/Tweets-Squared-App
app/models/twitter_handle.rb
Ruby
mit
132
<!DOCTYPE html> <html xmlns:msxsl="urn:schemas-microsoft-com:xslt"> <head> <meta content="en-us" http-equiv="Content-Language" /> <meta content="text/html; charset=utf-16" http-equiv="Content-Type" /> <title _locid="PortabilityAnalysis0">.NET Portability Report</title> <style> /* Body style, for the entire document */ body { background: #F3F3F4; color: #1E1E1F; font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; padding: 0; margin: 0; } /* Header1 style, used for the main title */ h1 { padding: 10px 0px 10px 10px; font-size: 21pt; background-color: #E2E2E2; border-bottom: 1px #C1C1C2 solid; color: #201F20; margin: 0; font-weight: normal; } /* Header2 style, used for "Overview" and other sections */ h2 { font-size: 18pt; font-weight: normal; padding: 15px 0 5px 0; margin: 0; } /* Header3 style, used for sub-sections, such as project name */ h3 { font-weight: normal; font-size: 15pt; margin: 0; padding: 15px 0 5px 0; background-color: transparent; } h4 { font-weight: normal; font-size: 12pt; margin: 0; padding: 0 0 0 0; background-color: transparent; } /* Color all hyperlinks one color */ a { color: #1382CE; } /* Paragraph text (for longer informational messages) */ p { font-size: 10pt; } /* Table styles */ table { border-spacing: 0 0; border-collapse: collapse; font-size: 10pt; } table th { background: #E7E7E8; text-align: left; text-decoration: none; font-weight: normal; padding: 3px 6px 3px 6px; } table td { vertical-align: top; padding: 3px 6px 5px 5px; margin: 0px; border: 1px solid #E7E7E8; background: #F7F7F8; } .NoBreakingChanges { color: darkgreen; font-weight:bold; } .FewBreakingChanges { color: orange; font-weight:bold; } .ManyBreakingChanges { color: red; font-weight:bold; } .BreakDetails { margin-left: 30px; } .CompatMessage { font-style: italic; font-size: 10pt; } .GoodMessage { color: darkgreen; } /* Local link is a style for hyperlinks that link to file:/// content, there are lots so color them as 'normal' text until the user mouse overs */ .localLink { color: #1E1E1F; background: #EEEEED; text-decoration: none; } .localLink:hover { color: #1382CE; background: #FFFF99; text-decoration: none; } /* Center text, used in the over views cells that contain message level counts */ .textCentered { text-align: center; } /* The message cells in message tables should take up all avaliable space */ .messageCell { width: 100%; } /* Padding around the content after the h1 */ #content { padding: 0px 12px 12px 12px; } /* The overview table expands to width, with a max width of 97% */ #overview table { width: auto; max-width: 75%; } /* The messages tables are always 97% width */ #messages table { width: 97%; } /* All Icons */ .IconSuccessEncoded, .IconInfoEncoded, .IconWarningEncoded, .IconErrorEncoded { min-width: 18px; min-height: 18px; background-repeat: no-repeat; background-position: center; } /* Success icon encoded */ .IconSuccessEncoded { /* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */ /* [---XsltValidateInternal-Base64EncodedImage:IconSuccess#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABPElEQVR4Xp1Tv0vDUBi8FqeA4NpBcBLcWnQSApncOnTo4FSnjP0DsnXpH5CxiwbHDg4Zuj4oOEXiJgiC4FDcCkLWmIMc1Pfw+eMgQ77v3Xf3Pe51YKGqqisAEwCR1TIAsiAIblSo6xrdHeJR85Xle3mdmCQKb0PsfqyxxzM8K15HZADl/H5+sHpZwYfxyRjTs+kWwKBx8yoHd2mRiuzF8mkJniWH/13u3Fjrs/EdhsdDFHGB/DLXEJBDLh1MWPAhPo1BLB4WX5yQywHR+m3tVe/t97D52CB/ziG0nIgD/qDuYg8WuCcVZ2YGwlJ3YDugkpR/VNcAEx6GEKhERSr71FuO4YCM4XBdwKvecjIlkSnsO0Hyp/GxSeJAdzBKzpOtnPwyyiPdAZhpZptT04tU+zk7s8czeges//s5C5+CwqrR4/gw+AAAAABJRU5ErkJggg==); } /* Information icon encoded */ .IconInfoEncoded { /* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */ /* [---XsltValidateInternal-Base64EncodedImage:IconInformation#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABHElEQVR4Xs2TsUoDQRRF7wwoziokjZUKadInhdhukR9YP8DMX1hYW+QvdsXa/QHBbcXC7W0CamWTQnclFutceIQJwwaWNLlwm5k5d94M76mmaeCrrmsLYOocY12FcxZFUeozCqKqqgYA8uevv1H6VuPxcwlfk5N92KHBxfFeCSAxxswlYAW/Xr989x/mv9gkhtyMDhcAxgzRsp7flj8B/HF1RsMXq+NZMkopaHe7lbKxQUEIGbKsYNoGn969060hZBkQex/W8oRQwsQaW2o3Ago2SVcJUzAgY3N0lTCZZm+zPS8HB51gMmS1DEYyOz9acKO1D8JWTlafKIMxdhvlfdyT94Vv5h7P8Ky7nQzACmhvKq3zk3PjW9asz9D/1oigecsioooAAAAASUVORK5CYII=); } /* Warning icon encoded */ .IconWarningEncoded { /* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */ /* [---XsltValidateInternal-Base64EncodedImage:IconWarning#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAAx0lEQVR4XpWSMQ7CMAxFf4xAyBMLCxMrO8dhaBcuwdCJS3RJBw7SA/QGTCxdWJgiQYWKXJWKIXHIlyw5lqr34tQgEOdcBsCOx5yZK3hCCKdYXneQkh4pEfqzLfu+wVDSyyzFoJjfz9NB+pAF+eizx2Vruts0k15mPgvS6GYvpVtQhB61IB/dk6AF6fS4Ben0uIX5odtFe8Q/eW1KvFeH4e8khT6+gm5B+t3juyDt7n0jpe+CANTd+oTUjN/U3yVaABnSUjFz/gFq44JaVSCXeQAAAABJRU5ErkJggg==); } /* Error icon encoded */ .IconErrorEncoded { /* Note: Do not delete the comment below. It is used to verify the correctness of the encoded image resource below before the product is released */ /* [---XsltValidateInternal-Base64EncodedImage:IconError#Begin#background-image: url(data:image/png;base64,#Separator#);#End#] */ background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAABQElEQVR4XqWTvUoEQRCE6wYPZUA80AfwAQz23uCMjA7MDRQEIzPBVEyNTQUFIw00vcQTTMzuAh/AxEQQT8HF/3G/oGGnEUGuoNnd6qoZuqltyKEsyzVJq5I6rnUp6SjGeGhESikzzlc1eL7opfuVbrqbU1Zw9NCgtQMaZpY0eNnaaL2fHusvTK5vKu7sjSS1Y4y3QUA6K3e3Mau5UFDyMP7tYF9o8cAHZv68vipoIJg971PZIZ5HiwdvYGGvFVFHmGmZ2MxwmQYPXubPl9Up0tfoMQGetXd6mRbvhBw+boZ6WF7Mbv1+GsHRk0fQmPAH1GfmZirbCfDJ61tw3Px8/8pZsPAG4jlVhcPgZ7adwNWBB68lkRQWFiTgFlbnLY3DGGM7izIJIyT/jjIvEJw6fdJTc6krDzh6aMwMP9bvDH4ADSsa9uSWVJkAAAAASUVORK5CYII=); } </style> </head> <body> <h1 _locid="PortabilityReport">.NET Portability Report</h1> <div id="content"> <div id="submissionId" style="font-size:8pt;"> <p> <i> Submission Id&nbsp; 424faa61-5769-4652-9f78-3127957dfe9e </i> </p> </div> <h2 _locid="SummaryTitle"> <a name="Portability Summary"></a>Portability Summary </h2> <div id="summary"> <table> <tbody> <tr> <th>Assembly</th> <th>ASP.NET 5,Version=v1.0</th> <th>Windows,Version=v8.1</th> <th>.NET Framework,Version=v4.6</th> <th>Windows Phone,Version=v8.1</th> </tr> <tr> <td><strong><a href="#Tierless.Infrastructure.Data">Tierless.Infrastructure.Data</a></strong></td> <td class="text-center">66.49 %</td> <td class="text-center">40.54 %</td> <td class="text-center">100.00 %</td> <td class="text-center">40.54 %</td> </tr> </tbody> </table> </div> <div id="details"> <a name="Tierless.Infrastructure.Data"><h3>Tierless.Infrastructure.Data</h3></a> <table> <tbody> <tr> <th>Target type</th> <th>ASP.NET 5,Version=v1.0</th> <th>Windows,Version=v8.1</th> <th>.NET Framework,Version=v4.6</th> <th>Windows Phone,Version=v8.1</th> <th>Recommended changes</th> </tr> <tr> <td>System.ComponentModel.Component</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td>Remove usage</td> </tr> <tr> <td style="padding-left:2em">Dispose</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td>Remove usage</td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Configuration.ConfigurationManager</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td>Remove usage: track configuration via alternate means.</td> </tr> <tr> <td style="padding-left:2em">get_ConnectionStrings</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td>Remove usage: track configuration via alternate means.</td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Configuration.ConnectionStringSettings</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td>Use configuration appropriate for your application model. For portable Framework Components, expose API for configuration on type</td> </tr> <tr> <td style="padding-left:2em">#ctor(System.String,System.String,System.String)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td>Use configuration appropriate for your application model. For portable Framework Components, expose API for configuration on type</td> </tr> <tr> <td style="padding-left:2em">get_ConnectionString</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_ProviderName</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Configuration.ConnectionStringSettingsCollection</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Item(System.String)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Data.CommandBehavior</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Data.CommandType</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Data.Common.DataAdapter</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">Fill(System.Data.DataSet)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Data.Common.DbCommand</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">ExecuteNonQuery</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">ExecuteReader(System.Data.CommandBehavior)</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">ExecuteScalar</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Parameters</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_CommandText(System.String)</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_CommandTimeout(System.Int32)</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_CommandType(System.Data.CommandType)</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_Connection(System.Data.Common.DbConnection)</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_Transaction(System.Data.Common.DbTransaction)</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Data.Common.DbCommandBuilder</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">GetDeleteCommand(System.Boolean)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">GetInsertCommand(System.Boolean)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">GetUpdateCommand(System.Boolean)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_DataAdapter(System.Data.Common.DbDataAdapter)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Data.Common.DbConnection</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">BeginTransaction</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">BeginTransaction(System.Data.IsolationLevel)</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">Open</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_ConnectionString(System.String)</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Data.Common.DbDataAdapter</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">Fill(System.Data.DataSet,System.String)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_DeleteCommand</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_InsertCommand</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_SelectCommand</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_UpdateCommand</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_DeleteCommand(System.Data.Common.DbCommand)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_InsertCommand(System.Data.Common.DbCommand)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_SelectCommand(System.Data.Common.DbCommand)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_UpdateCommand(System.Data.Common.DbCommand)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">Update(System.Data.DataRow[])</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">Update(System.Data.DataSet,System.String)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">Update(System.Data.DataTable)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Data.Common.DbDataReader</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Data.Common.DbParameter</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_DbType</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Direction</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Size</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Value</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_DbType(System.Data.DbType)</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_Direction(System.Data.ParameterDirection)</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_ParameterName(System.String)</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_Size(System.Int32)</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_Value(System.Object)</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Data.Common.DbParameterCollection</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">Add(System.Object)</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Item(System.Int32)</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Data.Common.DbProviderFactories</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">GetFactory(System.String)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Data.Common.DbProviderFactory</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">CreateCommand</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">CreateCommandBuilder</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">CreateConnection</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">CreateDataAdapter</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">CreateParameter</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Data.Common.DbTransaction</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">Commit</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">Dispose</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">Rollback</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Data.DataRow</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Data.DataRowCollection</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Item(System.Int32)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Data.DataSet</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">#ctor</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Tables</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Data.DataTable</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Rows</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Data.DataTableCollection</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Item(System.Int32)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Data.DbType</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Data.IDataReader</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">GetSchemaTable</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Data.IDbDataParameter</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Precision</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Scale</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_Precision(System.Byte)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">set_Scale(System.Byte)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Data.InternalDataCollectionBase</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Count</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Data.IsolationLevel</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Data.ParameterDirection</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Data.SqlClient.SqlException</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Number</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.DBNull</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">Value</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Threading.Thread</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">Sleep(System.Int32)</td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Transactions.Transaction</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">add_TransactionCompleted(System.Transactions.TransactionCompletedEventHandler)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Current</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">op_Equality(System.Transactions.Transaction,System.Transactions.Transaction)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">op_Inequality(System.Transactions.Transaction,System.Transactions.Transaction)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Transactions.TransactionCompletedEventHandler</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">#ctor(System.Object,System.IntPtr)</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>System.Transactions.TransactionEventArgs</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td style="padding-left:2em">get_Transaction</td> <td class="IconErrorEncoded"></td> <td class="IconErrorEncoded"></td> <td class="IconSuccessEncoded"></td> <td class="IconErrorEncoded"></td> <td></td> </tr> <tr> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> <td>&nbsp;</td> </tr> </tbody> </table> <p> <a href="#Portability Summary">Back to Summary</a> </p> </div> </div> </body> </html>
kuhlenh/port-to-core
Reports/ti/tierless.framework.server.0.9.4363.29819/Tierless.Infrastructure.Data-net35.html
HTML
mit
71,541
$(document).ready(function () { var svgContainer = document.getElementById('svgContainer'); if (svgContainer) { var mama = new bodymovin.loadAnimation({ wrapper: svgContainer, autoplay: false, animType: 'svg', loop: false, name: 'test', animationData: JSON.parse(animationData) }); mama.play('test'); mama.setSpeed(1.5, 'test'); mama.setDirection(1, 'test'); $("#svgContainer").mouseenter(function () { mama.stop(); mama.play('test'); mama.setSpeed(1.5, 'test'); mama.setDirection(1, 'test'); }); } });
soywod/MAD
public/js/index.js
JavaScript
mit
697
"use strict" // String interpolation: supports string interpolation via template literals let first = 'Jon'; let last = 'Smith'; console.log(`Hello ${first} ${last}!`); // Hello Jon Smith // Multi-line string const multiLine = ` This is a string with four lines`; console.log (multiLine); // This is // a string // with four // lines
dlinaz/Simple-es6
src/stringFeatures.js
JavaScript
mit
350
namespace DemoForum.Data.Migrations { using Microsoft.AspNet.Identity; using Microsoft.AspNet.Identity.EntityFramework; using Models; using System; using System.Data.Entity; using System.Data.Entity.Migrations; using System.Linq; internal sealed class Configuration : DbMigrationsConfiguration<DemoForum.Data.MsSqlDbContext> { public Configuration() { AutomaticMigrationsEnabled = false; } protected override void Seed(MsSqlDbContext context) { const string AdministratorUserName = "info@telerikacademy.com"; const string AdministratorPassword = "123456"; this.SeedAdmin(context, AdministratorUserName, AdministratorPassword); this.SampleData(context, AdministratorUserName); } private void SeedAdmin(MsSqlDbContext context, string AdministratorUserName, string AdministratorPassword) { if (!context.Roles.Any()) { var roleName = "Admin"; var roleStore = new RoleStore<IdentityRole>(context); var roleManager = new RoleManager<IdentityRole>(roleStore); var role = new IdentityRole { Name = roleName }; roleManager.Create(role); var userStore = new UserStore<User>(context); var userManager = new UserManager<User>(userStore); var user = new User { UserName = AdministratorUserName, Email = AdministratorUserName, EmailConfirmed = true, CreatedOn = DateTime.Now }; userManager.Create(user, AdministratorPassword); userManager.AddToRole(user.Id, roleName); } } private void SampleData(MsSqlDbContext context, string userName) { if (!context.Posts.Any()) { for (int i = 0; i < 5; i++) { var post = new Post() { Title = "Post " + i, Content = "Bacon ipsum dolor amet brisket jowl shankle meatloaf salami biltong jerky shoulder drumstick, ball tip bresaola prosciutto ham hock venison. Swine tail prosciutto meatloaf, sausage pork belly kevin pork chop.", Author = context.Users.First(x => x.Email == userName), CreatedOn = DateTime.Now }; context.Posts.Add(post); } } } } }
zachdimitrov/Learning_2017
ASP.NET-MVC/DemoForum/DemoForum.Data/Migrations/Configuration.cs
C#
mit
2,643
# mailstat.console # Console utilities for mailstat # # Author: Benjamin Bengfort <benjamin@bengfort.com> # Created: Sun Dec 29 15:57:44 2013 -0600 # # Copyright (C) 2013 Bengfort.com # For license information, see LICENSE.txt # # ID: console.py [] benjamin@bengfort.com $ """ Console utilities for mailstat """ ########################################################################## ## Imports ########################################################################## import os import json import baker from datetime import datetime from mailstat.analyze import Analysis from mailstat.exceptions import ConsoleError from mailstat.utils.testgen import TestDataGenerator ########################################################################## ## Helper functions ########################################################################## def working_output(name="output", timestamp=False, dtfmt="%Y%m%d"): """ Helper function that creates a file path from the current working dir and the name provided as the first argument. Optionally will add the time as a format string to the name object. """ cwd = os.getcwd() if timestamp: try: name = name % datetime.now().strftime(dtfmt) except TypeError: raise ConsoleError("If timestamp is provied, a format string must be used.") return os.path.join(cwd, name) ########################################################################## ## Command line functions ########################################################################## @baker.command def testdata(names, domains, fixture=None, output=None): """ Generates a testdata set from a names and domains file :param names: a list of names to use :param domains: a list of domains to use :param fixture: already created data to anonymize :param output: where to write the test fixture """ output = output or working_output("email_metrics.csv") generator = TestDataGenerator(names, domains, fixture) generator.write(output) @baker.command(default=True) def analyze(emails, output=None): """ Perform analysis of email csv and output HTML report :param emails: The email csv generated by MineMyMail :param output: The path to output the report """ output = output or working_output("report-%s.json", True) analysis = Analysis(emails) analysis.analyze() with open(output, 'w') as outfile: json.dump(analysis.serialize(), outfile, indent=2)
bbengfort/email-analysis
mailstat/console.py
Python
mit
2,516
<?php return [ '@class' => 'Grav\\Common\\File\\CompiledYamlFile', 'filename' => '/Users/kenrickkelly/Sites/hokui/user/plugins/admin/languages/eu.yaml', 'modified' => 1527231007, 'data' => [ 'PLUGIN_ADMIN' => [ 'ADMIN_BETA_MSG' => 'Beta bertsio bat da hau! Produkzioan erabili ezazu zure ardurapean...', 'ADMIN_REPORT_ISSUE' => 'Arazoren bat topatu duzu? Mesedez, horren berri eman GitHub-en.', 'EMAIL_FOOTER' => '<a href="http://getgrav.org">Grav-ekin eginda</a> - Fitxategi lauzko CMS modernoa', 'LOGIN_BTN' => 'Sartu', 'LOGIN_BTN_FORGOT' => 'Ahaztu', 'LOGIN_BTN_RESET' => 'Berrezarri pasahitza', 'LOGIN_BTN_SEND_INSTRUCTIONS' => 'Bidali reset egiteko argibideak', 'LOGIN_BTN_CLEAR' => 'Garbitu inprimakia', 'LOGIN_BTN_CREATE_USER' => 'Sortu erabiltzailea', 'LOGIN_LOGGED_IN' => 'Saioa arrakastaz hastea lortu duzu', 'LOGIN_FAILED' => 'Akatsa sartzerakoan', 'LOGGED_OUT' => 'Saiotik irten zara', 'RESET_NEW_PASSWORD' => 'Mesedez sartu pasahitz berri bat &hellip;', 'RESET_LINK_EXPIRED' => 'Reset egiteko esteka iraungi da, mesedez saiatu berriro', 'RESET_PASSWORD_RESET' => 'Pasahitza berrezarri da', 'RESET_INVALID_LINK' => 'Reset egiteko esteka baliogabea, mesedez saiatu berriro', 'FORGOT_INSTRUCTIONS_SENT_VIA_EMAIL' => 'Zure pasahitza berriz ezartzeko argibideak zure helbide elektronikora bidali dira', 'FORGOT_FAILED_TO_EMAIL' => 'Akatsa argibideak posta elektroniko bidez bidaltzean, mesedez saiatu berriro beranduago', 'FORGOT_CANNOT_RESET_EMAIL_NO_EMAIL' => 'Ezinezkoa da pasahitza berriro ezartzea %s-rentzat, ez da helbide elektronikorik ezarri', 'FORGOT_USERNAME_DOES_NOT_EXIST' => '<b>%s</b> erabiltzailea ez da existitzen', 'FORGOT_EMAIL_NOT_CONFIGURED' => 'Ezin da pasahitza berrezarri. Gune hau ez dago konfiguratuta mezu elektronikoak bidaltzeko', 'FORGOT_EMAIL_SUBJECT' => '%s Pasahitza Berrezartzeko Eskaera', 'FORGOT_EMAIL_BODY' => '<h1>Pazahitza berrezarketa</h1><p>%1$s estimatua,</p><p>Eskaera egin da <b>%4$s</b> zure pasahitza berrezartzeko.</p><p><br /><a href="%2$s" class="btn-primary">Klik egin hemen zure pasahitza berrezartzeko</a><br /><br /></p><p>Edo bestela kopiatu hurrengo URLa zure nabigatzailearen helbide barran</p> <p>%2$s</p><p><br />Begirunez,<br /><br />%3$s</p>', 'MANAGE_PAGES' => 'Orrialdeak Kudeatu', 'CONFIGURATION' => 'Konfigurazioa', 'PAGES' => 'Orrialdeak', 'PLUGINS' => 'Pluginak', 'PLUGIN' => 'Plugina', 'THEMES' => 'Itxurak', 'LOGOUT' => 'Irten', 'BACK' => 'Itzuli', 'ADD_PAGE' => 'Gehitu orrialdea', 'ADD_MODULAR' => 'Gehitu modulua', 'MOVE' => 'Mugitu', 'DELETE' => 'Ezabatu', 'SAVE' => 'Gorde', 'NORMAL' => 'Normala', 'EXPERT' => 'Aditua', 'EXPAND_ALL' => 'Guztia Zabaldu', 'COLLAPSE_ALL' => 'Tolestu dena', 'ERROR' => 'Errorea', 'CLOSE' => 'Itxi', 'CANCEL' => 'Utzi', 'CONTINUE' => 'Jarraitu', 'MODAL_DELETE_PAGE_CONFIRMATION_REQUIRED_TITLE' => 'Egiaztapena Beharrezkoa da', 'MODAL_CHANGED_DETECTED_TITLE' => 'Aldaketak Aurkituta', 'MODAL_CHANGED_DETECTED_DESC' => 'Gorde gabeko aldaketak dauzkazu. Ziur al zaude irten nahi duzula?', 'MODAL_DELETE_FILE_CONFIRMATION_REQUIRED_TITLE' => 'Egiaztapena Beharrezkoa da', 'MODAL_DELETE_FILE_CONFIRMATION_REQUIRED_DESC' => 'Ziur al zaude fitxategi hau ezabatu nahi duzula? Ekintza hau ezingo da desegin.', 'ADD_FILTERS' => 'Iragazkiak gehitu', 'SEARCH_PAGES' => 'Orrialdeak Bilatu', 'VERSION' => 'Bertsioa', 'UPDATE_THEME' => 'Itxura Eguneratu', 'UPDATE_PLUGIN' => 'Plugina Eguneratu', 'AUTHOR' => 'Egilea', 'HOMEPAGE' => 'Hasiera Orrialdea', 'DEMO' => 'Demo', 'BUG_TRACKER' => 'Akatsen Jarraitzailea', 'KEYWORDS' => 'Hitz gakoak', 'LICENSE' => 'Lizentzia', 'DESCRIPTION' => 'Deskribapena', 'README' => 'Irakur nazazu', 'REMOVE_THEME' => 'Itxura Ezabatu', 'INSTALL_THEME' => 'Itxura instalatu', 'THEME' => 'Itxura', 'BACK_TO_THEMES' => 'Itxuretara Itzuli', 'BACK_TO_PLUGINS' => 'Pluginetara Itzuli', 'CHECK_FOR_UPDATES' => 'Begiratu Eguneraketak', 'ADD' => 'Gehitu', 'CLEAR_CACHE' => 'Garbitu Katxea', 'CLEAR_CACHE_ALL_CACHE' => 'Katxe Guztia', 'CLEAR_CACHE_ASSETS_ONLY' => 'Asset-ak Bakarrik', 'CLEAR_CACHE_IMAGES_ONLY' => 'Irudiak Bakarrik', 'CLEAR_CACHE_CACHE_ONLY' => 'Katxea Bakarrik', 'CLEAR_CACHE_TMP_ONLY' => 'Tmp Bakarrik', 'DASHBOARD' => 'Arbela', 'UPDATES_AVAILABLE' => 'Eguneraketak Eskuragarri', 'DAYS' => 'Egun', 'UPDATE' => 'Eguneratu', 'BACKUP' => 'Segurtasun kopia', 'STATISTICS' => 'Estatistikak', 'TODAY' => 'Gaur', 'WEEK' => 'Astea', 'MONTH' => 'Hilabetea', 'LATEST_PAGE_UPDATES' => 'Eguneratutako Azken Orrialdeak', 'MAINTENANCE' => 'Mantenua', 'UPDATED' => 'Eguneratuta', 'MON' => 'Al.', 'TUE' => 'Ar.', 'WED' => 'Az.', 'THU' => 'Og.', 'FRI' => 'Ol.', 'SAT' => 'Lr.', 'SUN' => 'Ig.', 'COPY' => 'Kopiatu', 'EDIT' => 'Editatu', 'CREATE' => 'Sortu', 'GRAV_ADMIN' => 'Grav Admin', 'GRAV_OFFICIAL_PLUGIN' => 'Grav-en Plugin Ofiziala', 'GRAV_OFFICIAL_THEME' => 'Grav-en Itxura Ofiziala', 'PLUGIN_SYMBOLICALLY_LINKED' => 'Plugin hau sinbolikoki estekatuta dago. Eguneraketak ezingo dira aurkitu.', 'THEME_SYMBOLICALLY_LINKED' => 'Plugin hau sinbolikoki estekatuta dago. Eguneraketak ezingo dira aurkitu', 'REMOVE_PLUGIN' => 'Plugina Ezabatu', 'INSTALL_PLUGIN' => 'Plugina instalatu', 'AVAILABLE' => 'Eskuragarri', 'INSTALLED' => 'Instalatuta', 'INSTALL' => 'Instalatu', 'ACTIVE_THEME' => 'Itxura Aktiboa', 'SWITCHING_TO_DESCRIPTION' => 'Itxura ezberdin batera aldatuz gero, ezingo da ziurtatu orrialdeen egiturak ondo eutsiko dutenik, potentzialki erroreak eragingo dituzte orrialdeak kargatzen saiatzean.', 'SWITCHING_TO_CONFIRMATION' => 'Jarraitu eta Itxura aldatu nahi al duzu', 'CREATE_NEW_USER' => 'Erabiltzaile Berri Bat Sortu', 'REMOVE_USER' => 'Erabiltzailea Ezabatu', 'ACCESS_DENIED' => 'Sarbide debekatua', 'ACCOUNT_NOT_ADMIN' => 'zure kontuak ez dauka administratzaile baimenik', 'PHP_INFO' => 'PHP Info', 'INSTALLER' => 'Instalatzaile', 'AVAILABLE_THEMES' => 'Eskuragarri Dauden Itxurak', 'AVAILABLE_PLUGINS' => 'Eskuragarri Dauden Pluginak', 'INSTALLED_THEMES' => 'Instalatutako Itxurak', 'INSTALLED_PLUGINS' => 'Instalatutako Pluginak', 'BROWSE_ERROR_LOGS' => 'Begiratu Errore Erregistroa', 'SITE' => 'Gunea', 'INFO' => 'Info', 'SYSTEM' => 'Sistema', 'USER' => 'Erabiltzailea', 'ADD_ACCOUNT' => 'Gehitu Kontua', 'SWITCH_LANGUAGE' => 'Aldatu Hizkuntza', 'SUCCESSFULLY_ENABLED_PLUGIN' => 'Plugina ondo gaitu da', 'SUCCESSFULLY_DISABLED_PLUGIN' => 'Plugina ondo desgaitu da', 'SUCCESSFULLY_CHANGED_THEME' => 'Itxura lehenetsia ondo aldatu da', 'INSTALLATION_FAILED' => 'Instalazioak huts egin du', 'INSTALLATION_SUCCESSFUL' => 'Instalazioa ondo egin da', 'UNINSTALL_FAILED' => 'Desinstalazioak huts egin du', 'UNINSTALL_SUCCESSFUL' => 'Desinstalazioa ondo egin da', 'SUCCESSFULLY_SAVED' => 'Ondo gorde da', 'SUCCESSFULLY_COPIED' => 'Ondo kopiatu da', 'REORDERING_WAS_SUCCESSFUL' => 'Ordenaren aldaketa ondo egin da', 'SUCCESSFULLY_DELETED' => 'Ondo ezabatu da', 'SUCCESSFULLY_SWITCHED_LANGUAGE' => 'Hizkuntza ondo aldatu da', 'INSUFFICIENT_PERMISSIONS_FOR_TASK' => 'Ez daukazu bahimen nahikorik zereginerako', 'CACHE_CLEARED' => 'Katxea garbituta', 'METHOD' => 'Metodoa', 'ERROR_CLEARING_CACHE' => 'Errorea katxea garbitzean', 'AN_ERROR_OCCURRED' => 'Errore bat gertatu da', 'YOUR_BACKUP_IS_READY_FOR_DOWNLOAD' => 'Zure segurtasun kopia deskargatzeko prest dago', 'DOWNLOAD_BACKUP' => 'Segurtasun kopia deskargatu', 'PAGES_FILTERED' => 'Orrialdeak iragazita', 'NO_PAGE_FOUND' => 'Ez da Orrialderik aurkitu', 'INVALID_PARAMETERS' => 'Baliogabeko Parametroak', 'NO_FILES_SENT' => 'Fitxategirik ez da bidali', 'EXCEEDED_FILESIZE_LIMIT' => 'PHP konfigurazio fitxategiaren tamainaren muga gainditu da', 'UNKNOWN_ERRORS' => 'Errore ezezagunak', 'EXCEEDED_GRAV_FILESIZE_LIMIT' => 'Grav konfigurazio fitxategiaren tamainaren muga gainditu da', 'UNSUPPORTED_FILE_TYPE' => 'Fitxategi mota bateraezina', 'FAILED_TO_MOVE_UPLOADED_FILE' => 'Akatsa igotako fitxategia mugitzean', 'FILE_UPLOADED_SUCCESSFULLY' => 'Fitxategia ondo igo da', 'FILE_DELETED' => 'Fitxategia ezabatuta', 'FILE_COULD_NOT_BE_DELETED' => 'Fitxategia ezin da ezabatu', 'FILE_NOT_FOUND' => 'Fitxategia ez da aurkitu', 'NO_FILE_FOUND' => 'Fitxategirik ez da aurkitu', 'GRAV_UPDATE_FAILED' => 'Grav eguneraketak huts egin du', 'EVERYTHING_UPDATED' => 'Dena eguneratuta', 'UPDATES_FAILED' => 'Eguneraketek huts egin dute', 'LAST_BACKUP' => 'Azkenengo babes kopia', 'FULL_NAME' => 'Izen osoa', 'USERNAME' => 'Erabiltzaile izena', 'EMAIL' => 'Helbide Elektronikoa', 'USERNAME_EMAIL' => 'Erabiltzaile izena edo helbide elektronikoa', 'PASSWORD' => 'Pasahitza', 'PASSWORD_CONFIRM' => 'Pasahitza egiaztatu', 'TITLE' => 'Izenburua', 'LANGUAGE' => 'Hizkuntza', 'ACCOUNT' => 'Kontua', 'EMAIL_VALIDATION_MESSAGE' => 'Benetako helbide elektroniko bat izan behar da', 'PASSWORD_VALIDATION_MESSAGE' => 'Pasahitzak zenbaki bat eta letra maiuskula eta minuskula bat eduki eduki behar du gutxienez, eta 8 edo karaktere gehiago', 'LANGUAGE_HELP' => 'Gogoko hizkuntza ezarri', 'MEDIA' => 'Media', 'DEFAULTS' => 'Lehenetsitakoak', 'SITE_TITLE' => 'Gunearen Izenburua', 'SITE_TITLE_PLACEHOLDER' => 'Gune osoko izenburua' ] ] ];
h0kui/hokui
cache/compiled/files/f9471ea96fca48eee43207f0cb30d8d6.yaml.php
PHP
mit
11,189
package us.grahn.trojanow.presentation.feed; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import us.grahn.trojanow.R; /** * An interface to display to display the default feed for the user. This will contain posts which * are made by pals and posts which are made by strangers. * * @us.grahn.class FeedInterface * @us.grahn.component FeedInterface * @us.grahn.tier Presentation */ public class FeedActivity extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_feed); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.menu_feed, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } }
dgrahn/csci578
client/app/src/main/java/us/grahn/trojanow/presentation/feed/FeedActivity.java
Java
mit
1,442
--- layout: post title: Generative models in statistical physics categories: machine learning author: Austen Lamacraft --- Statistical mechanics - or at least equilibrium statistical mechanics is 'just' about the calculation of the partition function $$ Z = \sum_j \exp(-\beta \epsilon_j). $$ The point, of course, is that for any but the simplest systems (e.g. free particles) evaluating $Z$ is computationally intractable. Approximating the partition function and its derivatives, as well as the marginal distribution and correlation functions of subsets of observables, is the real work of statistical physics. The same goes for machine learning. NeuralRG proposed by Li and Wang ![](/images/blog/neuralrg.png)
AustenLamacraft/austenlamacraft.github.io
blog/_drafts/generative-models-in-statistical-physics.md
Markdown
mit
721
import React from 'react'; import { css } from 'emotion'; import { Col, Row } from 'reactstrap'; import Localized from 'components/Localized/Localized'; import Locations from 'components/Locations/Locations'; import { useGameLocations } from 'selectors/gameLocations'; import { useSelectedLocationsCount } from 'selectors/selectedLocationsCount'; import { useConfigSpyCount } from 'selectors/configSpyCount'; import { useGamePrevLocation } from 'selectors/gamePrevLocation'; import { useGameMatchId } from 'selectors/gameMatchId'; import SpyCount from 'components/SpyCount/SpyCount'; import { useGameSpies } from 'selectors/gameSpies'; import { useConfigHideSpyCount } from 'selectors/configHideSpyCount'; import { useGameAllSpies } from 'selectors/gameAllSpies'; import TimerManager from './TimerManager'; export const GameInfo = () => { const [spyCount] = useConfigSpyCount(); const prevLocation = useGamePrevLocation(); const matchId = useGameMatchId(); const spies = useGameSpies(); const [hideSpyCount] = useConfigHideSpyCount(); const allSpies = useGameAllSpies(); const selectedLocationsCount = useSelectedLocationsCount(); const gameLocations = useGameLocations(); return ( <div> <SpyCount spyCount={spyCount} spies={spies} allSpies={allSpies} hideSpyCount={hideSpyCount} className={styles.spiesCountContainer} /> <Row className={styles.locationsContainer}> <Col className="text-center"> <h4><Localized name="interface.game_locations" /> ({selectedLocationsCount})</h4> </Col> </Row> <Locations matchId={matchId} locations={gameLocations} prevLocation={prevLocation} /> <TimerManager /> </div> ); }; const styles = { spiesCountContainer: css({ marginTop: 20, }), locationsContainer: css({ marginTop: 20, }), }; export default React.memo(GameInfo);
adrianocola/spyfall
app/containers/Game/GameInfo.js
JavaScript
mit
1,907